diff --git a/404.html b/404.html index cea40512..3fe3e31a 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Rekalogika.DEV - + diff --git a/assets/js/fd37b2f4.f64afc3b.js b/assets/js/fd37b2f4.cb8f5e32.js similarity index 86% rename from assets/js/fd37b2f4.f64afc3b.js rename to assets/js/fd37b2f4.cb8f5e32.js index 9c0d100c..7bcf25e9 100644 --- a/assets/js/fd37b2f4.f64afc3b.js +++ b/assets/js/fd37b2f4.cb8f5e32.js @@ -1 +1 @@ -"use strict";(self.webpackChunkrekalogika_docs=self.webpackChunkrekalogika_docs||[]).push([[3814],{5268:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=t(5893),a=t(1151);const o={title:"Associating Files to Doctrine Entities"},s=void 0,r={id:"file-bundle/doctrine-entity",title:"Associating Files to Doctrine Entities",description:"This chapter describes how to create a file property in a Doctrine entity that",source:"@site/docs/file-bundle/03-doctrine-entity.md",sourceDirName:"file-bundle",slug:"/file-bundle/doctrine-entity",permalink:"/file-bundle/doctrine-entity",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/rekalogika-docs/edit/main/docs/file-bundle/03-doctrine-entity.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Associating Files to Doctrine Entities"},sidebar:"docs",previous:{title:"Installation & Configuration",permalink:"/file-bundle/installation"},next:{title:"Working With Entities & Files",permalink:"/file-bundle/working-with-entities"}},l={},c=[{value:"Creating a File Property in an Entity",id:"creating-a-file-property-in-an-entity",level:2},{value:"Mandatory File",id:"mandatory-file",level:2}];function d(e){const i={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.p,{children:"This chapter describes how to create a file property in a Doctrine entity that\nyou can use to associate a file to an entity, including to store the result of a\nfile upload."}),"\n",(0,n.jsxs)(i.admonition,{title:"Preparation",type:"info",children:[(0,n.jsxs)(i.p,{children:["To enable this feature, you need to install the package\n",(0,n.jsx)(i.code,{children:"rekalogika/file-association"}),":"]}),(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-bash",children:"composer require rekalogika/file-association\n"})})]}),"\n",(0,n.jsx)(i.h2,{id:"creating-a-file-property-in-an-entity",children:"Creating a File Property in an Entity"}),"\n",(0,n.jsx)(i.p,{children:"To create a file property in an entity that will be managed by this framework,\nyou need to:"}),"\n",(0,n.jsxs)(i.ol,{children:["\n",(0,n.jsxs)(i.li,{children:["Create a property that accepts a ",(0,n.jsx)(i.code,{children:"FileInterface"}),"."]}),"\n",(0,n.jsxs)(i.li,{children:["Add the attribute ",(0,n.jsx)(i.code,{children:"#[WithFileAssociation]"})," to the class."]}),"\n",(0,n.jsxs)(i.li,{children:["Add the attribute ",(0,n.jsx)(i.code,{children:"#[AsFileAssociation]"})," to the property."]}),"\n"]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-php",children:"use Rekalogika\\Contracts\\File\\FileInterface;\nuse Rekalogika\\File\\Association\\Attribute\\WithFileAssociation;\nuse Rekalogika\\File\\Association\\Attribute\\AsFileAssociation;\nuse Rekalogika\\File\\File;\n\n// highlight-next-line\n#[WithFileAssociation]\nclass Product\n{\n /**\n * The file property must accept a FileInterface\n */\n // highlight-start\n #[AsFileAssociation]\n private ?FileInterface $image = null;\n // highlight-end\n\n //\n // The rest of this class is inconsequential to the framework\n //\n\n /**\n * This framework reads and writes directly to the properties, even if\n * private. Therefore, you are free to have your own business logic in the\n * getters and setters.\n */\n public function getImage(): FileInterface\n {\n if (date('m-d') == '04-01') { // if today is april 1st\n return new File('shock-image.jpg'); // april fools!\n }\n\n return $this->image;\n }\n\n public function setImage(?FileInterface $image): self\n {\n if ($this->status == 'published') {\n throw new \\Exception(\"Cannot change a published product's image\");\n }\n\n $this->image = $image;\n\n return $this;\n }\n}\n"})}),"\n",(0,n.jsx)(i.h2,{id:"mandatory-file",children:"Mandatory File"}),"\n",(0,n.jsxs)(i.p,{children:["If your business logic necessitates that the file is mandatory to an entity, you\ncan omit the ",(0,n.jsx)(i.code,{children:"?"})," in the property type hint:"]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-php",children:"use Rekalogika\\Contracts\\File\\FileInterface;\nuse Rekalogika\\File\\Association\\Attribute\\WithFileAssociation;\nuse Rekalogika\\File\\Association\\Attribute\\AsFileAssociation;\n\n#[WithFileAssociation]\nclass Product\n{\n #[AsFileAssociation]\n // highlight-start\n private FileInterface $image = null;\n // highlight-end\n}\n"})}),"\n",(0,n.jsxs)(i.p,{children:["Read more about mandatory files in the chapter ",(0,n.jsx)(i.a,{href:"mandatory-file",children:"Mandatory File"}),"."]})]})}function h(e={}){const{wrapper:i}={...(0,a.a)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},1151:(e,i,t)=>{t.d(i,{Z:()=>r,a:()=>s});var n=t(7294);const a={},o=n.createContext(a);function s(e){const i=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function r(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(o.Provider,{value:i},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkrekalogika_docs=self.webpackChunkrekalogika_docs||[]).push([[3814],{5268:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});var n=t(5893),a=t(1151);const o={title:"Associating Files to Doctrine Entities"},s=void 0,r={id:"file-bundle/doctrine-entity",title:"Associating Files to Doctrine Entities",description:"This chapter describes how to create a file property in a Doctrine entity that",source:"@site/docs/file-bundle/03-doctrine-entity.md",sourceDirName:"file-bundle",slug:"/file-bundle/doctrine-entity",permalink:"/file-bundle/doctrine-entity",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/rekalogika-docs/edit/main/docs/file-bundle/03-doctrine-entity.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{title:"Associating Files to Doctrine Entities"},sidebar:"docs",previous:{title:"Installation & Configuration",permalink:"/file-bundle/installation"},next:{title:"Working With Entities & Files",permalink:"/file-bundle/working-with-entities"}},l={},c=[{value:"Creating a File Property in an Entity",id:"creating-a-file-property-in-an-entity",level:2},{value:"Mandatory File",id:"mandatory-file",level:2}];function d(e){const i={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",...(0,a.a)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.p,{children:"This chapter describes how to create a file property in a Doctrine entity that\nyou can use to associate a file to an entity, including to store the result of a\nfile upload."}),"\n",(0,n.jsxs)(i.admonition,{title:"Preparation",type:"info",children:[(0,n.jsxs)(i.p,{children:["To enable this feature, you need to install the package\n",(0,n.jsx)(i.code,{children:"rekalogika/file-association"}),":"]}),(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-bash",children:"composer require rekalogika/file-association\n"})})]}),"\n",(0,n.jsx)(i.h2,{id:"creating-a-file-property-in-an-entity",children:"Creating a File Property in an Entity"}),"\n",(0,n.jsx)(i.p,{children:"To create a file property in an entity that will be managed by this framework,\nyou need to:"}),"\n",(0,n.jsxs)(i.ol,{children:["\n",(0,n.jsxs)(i.li,{children:["Create a property that accepts a ",(0,n.jsx)(i.code,{children:"FileInterface"}),"."]}),"\n",(0,n.jsxs)(i.li,{children:["Add the attribute ",(0,n.jsx)(i.code,{children:"#[WithFileAssociation]"})," to the class."]}),"\n",(0,n.jsxs)(i.li,{children:["Add the attribute ",(0,n.jsx)(i.code,{children:"#[AsFileAssociation]"})," to the property."]}),"\n"]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-php",children:"use Rekalogika\\Contracts\\File\\FileInterface;\nuse Rekalogika\\File\\Association\\Attribute\\WithFileAssociation;\nuse Rekalogika\\File\\Association\\Attribute\\AsFileAssociation;\nuse Rekalogika\\File\\File;\n\n// highlight-next-line\n#[WithFileAssociation]\nclass Product\n{\n /**\n * The file property must accept a FileInterface\n */\n // highlight-start\n #[AsFileAssociation]\n private ?FileInterface $image = null;\n // highlight-end\n\n //\n // The rest of this class is inconsequential to the framework\n //\n\n /**\n * This framework reads and writes directly to the properties, even if\n * private. Therefore, you are free to have your own business logic in the\n * getters and setters.\n */\n public function getImage(): FileInterface\n {\n if (date('m-d') == '04-01') { // if today is april 1st\n return new File('shock-image.jpg'); // april fools!\n }\n\n return $this->image;\n }\n\n public function setImage(?FileInterface $image): self\n {\n if ($this->status == 'published') {\n throw new \\Exception(\"Cannot change a published product's image\");\n }\n\n $this->image = $image;\n\n return $this;\n }\n}\n"})}),"\n",(0,n.jsx)(i.h2,{id:"mandatory-file",children:"Mandatory File"}),"\n",(0,n.jsxs)(i.p,{children:["If your business logic necessitates that the file is mandatory to an entity, you\ncan omit the ",(0,n.jsx)(i.code,{children:"?"})," in the property type hint:"]}),"\n",(0,n.jsx)(i.pre,{children:(0,n.jsx)(i.code,{className:"language-php",children:"use Rekalogika\\Contracts\\File\\FileInterface;\nuse Rekalogika\\File\\Association\\Attribute\\WithFileAssociation;\nuse Rekalogika\\File\\Association\\Attribute\\AsFileAssociation;\n\n#[WithFileAssociation]\nclass Product\n{\n #[AsFileAssociation]\n // highlight-start\n private FileInterface $image;\n // highlight-end\n}\n"})}),"\n",(0,n.jsxs)(i.p,{children:["Read more about mandatory files in the chapter ",(0,n.jsx)(i.a,{href:"mandatory-file",children:"Mandatory File"}),"."]})]})}function h(e={}){const{wrapper:i}={...(0,a.a)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},1151:(e,i,t)=>{t.d(i,{Z:()=>r,a:()=>s});var n=t(7294);const a={},o=n.createContext(a);function s(e){const i=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function r(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),n.createElement(o.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.791ab385.js b/assets/js/runtime~main.aa6ca8de.js similarity index 99% rename from assets/js/runtime~main.791ab385.js rename to assets/js/runtime~main.aa6ca8de.js index 005d1608..f8d98274 100644 --- a/assets/js/runtime~main.791ab385.js +++ b/assets/js/runtime~main.aa6ca8de.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,f,c,b,d={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={exports:{}};return d[e].call(f.exports,f,f.exports,r),f.exports}r.m=d,e=[],r.O=(a,f,c,b)=>{if(!f){var d=1/0;for(i=0;i=b)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[f,c,b]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var d={};a=a||[null,f({}),f([]),f(f)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,r.d(b,d),b},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({12:"e758c9ad",17:"e3fdc92c",53:"935f2afb",367:"b02eb586",506:"fd728aac",511:"f6f6785e",1043:"fe998a72",1215:"e91438da",1569:"498f3971",1652:"bb6295cf",1669:"d39191ae",1737:"85b58447",1834:"c5761173",1903:"4ef8bca5",2130:"4d08d432",2388:"3fc97551",2489:"9af9e2d3",2491:"a0cb2ff0",2796:"e008aab7",2944:"5060314a",3175:"aeb852b9",3197:"38be5a5a",3349:"27d2408b",3449:"6e829f05",3814:"fd37b2f4",3823:"c6e69d14",4178:"a1516275",4193:"d11d1fff",4195:"c4f5d8e4",4205:"6b1ab773",4368:"a94703ab",4558:"17b6df24",4645:"c2040271",4947:"08447aa8",5118:"ab646a7c",5160:"6cacf3ff",5208:"2d2b4e63",5386:"0ee148be",5881:"77356f5a",6182:"03f62eaa",6317:"5cabcc74",6496:"86f92be2",6559:"05b80167",6787:"68b66c02",7138:"94d2cbb6",7425:"5498dd6e",7469:"b2c8757a",7522:"bef88291",7634:"01c6402f",7748:"9e75f0a3",7862:"e6bf16cc",7918:"17896441",8054:"f3446560",8358:"c0165185",8518:"a7bd4aaa",8853:"e4a9ab5b",9075:"a68c2242",9137:"81d3dbad",9241:"7fb96d85",9441:"4215e4a8",9475:"581e27f1",9661:"5e95c892",9706:"ce2f93b1",9882:"93c186b3"}[e]||e)+"."+{12:"570f86ee",17:"e342d0cb",53:"768f1f06",367:"c882ba5c",506:"65f34dbd",511:"5758cf85",1043:"9767eb0f",1215:"d7db27a9",1569:"20232d8e",1652:"d6bca9e2",1669:"09a942f3",1737:"11bbf86a",1772:"68fb288f",1834:"f405b4b2",1903:"ea33b9b5",2130:"6a9a9d71",2388:"3c3b4ee9",2489:"0b8f7fbd",2491:"358781ed",2796:"bce50d5c",2944:"eda6f71c",3175:"6ae0d87c",3197:"bd70798c",3349:"461bd6f3",3449:"9bad530d",3814:"f64afc3b",3823:"394bc608",4178:"ca25e848",4193:"514e849d",4195:"e08d2e45",4205:"90c9ee48",4368:"416d33f6",4558:"75896a03",4645:"d3acdd6d",4947:"d286d7d7",5118:"f5e623f5",5160:"7f5627cd",5208:"6b745b9a",5386:"ac6d34b2",5881:"9c582d90",6182:"d18636af",6317:"fd086852",6496:"4e293b04",6559:"a072103a",6787:"75754378",7138:"c3eb9cb5",7425:"371f174e",7469:"c0dc1144",7522:"d976d519",7634:"f868dc4f",7748:"d62e735c",7862:"bf377214",7918:"4400d07e",8054:"9191d4f8",8358:"f39280da",8518:"ecdd1e86",8853:"0f6a8262",9075:"89e467b5",9137:"4e14c74f",9241:"88c46dd0",9441:"4e40a297",9475:"2ad8568e",9661:"6173a5b3",9706:"720967cb",9882:"3f44b127"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},b="rekalogika-docs:",r.l=(e,a,f,d)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"7918",e758c9ad:"12",e3fdc92c:"17","935f2afb":"53",b02eb586:"367",fd728aac:"506",f6f6785e:"511",fe998a72:"1043",e91438da:"1215","498f3971":"1569",bb6295cf:"1652",d39191ae:"1669","85b58447":"1737",c5761173:"1834","4ef8bca5":"1903","4d08d432":"2130","3fc97551":"2388","9af9e2d3":"2489",a0cb2ff0:"2491",e008aab7:"2796","5060314a":"2944",aeb852b9:"3175","38be5a5a":"3197","27d2408b":"3349","6e829f05":"3449",fd37b2f4:"3814",c6e69d14:"3823",a1516275:"4178",d11d1fff:"4193",c4f5d8e4:"4195","6b1ab773":"4205",a94703ab:"4368","17b6df24":"4558",c2040271:"4645","08447aa8":"4947",ab646a7c:"5118","6cacf3ff":"5160","2d2b4e63":"5208","0ee148be":"5386","77356f5a":"5881","03f62eaa":"6182","5cabcc74":"6317","86f92be2":"6496","05b80167":"6559","68b66c02":"6787","94d2cbb6":"7138","5498dd6e":"7425",b2c8757a:"7469",bef88291:"7522","01c6402f":"7634","9e75f0a3":"7748",e6bf16cc:"7862",f3446560:"8054",c0165185:"8358",a7bd4aaa:"8518",e4a9ab5b:"8853",a68c2242:"9075","81d3dbad":"9137","7fb96d85":"9241","4215e4a8":"9441","581e27f1":"9475","5e95c892":"9661",ce2f93b1:"9706","93c186b3":"9882"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,f)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var b=new Promise(((f,b)=>c=e[a]=[f,b]));f.push(c[2]=b);var d=r.p+r.u(a),t=new Error;r.l(d,(f=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var b=f&&("load"===f.type?"missing":f.type),d=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+d+")",t.name="ChunkLoadError",t.type=b,t.request=d,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var c,b,d=f[0],t=f[1],o=f[2],n=0;if(d.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(f);n{"use strict";var e,a,f,c,b,d={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={exports:{}};return d[e].call(f.exports,f,f.exports,r),f.exports}r.m=d,e=[],r.O=(a,f,c,b)=>{if(!f){var d=1/0;for(i=0;i=b)&&Object.keys(r.O).every((e=>r.O[e](f[o])))?f.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[f,c,b]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var d={};a=a||[null,f({}),f([]),f(f)];for(var t=2&c&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach((a=>d[a]=()=>e[a]));return d.default=()=>e,r.d(b,d),b},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,f)=>(r.f[f](e,a),a)),[])),r.u=e=>"assets/js/"+({12:"e758c9ad",17:"e3fdc92c",53:"935f2afb",367:"b02eb586",506:"fd728aac",511:"f6f6785e",1043:"fe998a72",1215:"e91438da",1569:"498f3971",1652:"bb6295cf",1669:"d39191ae",1737:"85b58447",1834:"c5761173",1903:"4ef8bca5",2130:"4d08d432",2388:"3fc97551",2489:"9af9e2d3",2491:"a0cb2ff0",2796:"e008aab7",2944:"5060314a",3175:"aeb852b9",3197:"38be5a5a",3349:"27d2408b",3449:"6e829f05",3814:"fd37b2f4",3823:"c6e69d14",4178:"a1516275",4193:"d11d1fff",4195:"c4f5d8e4",4205:"6b1ab773",4368:"a94703ab",4558:"17b6df24",4645:"c2040271",4947:"08447aa8",5118:"ab646a7c",5160:"6cacf3ff",5208:"2d2b4e63",5386:"0ee148be",5881:"77356f5a",6182:"03f62eaa",6317:"5cabcc74",6496:"86f92be2",6559:"05b80167",6787:"68b66c02",7138:"94d2cbb6",7425:"5498dd6e",7469:"b2c8757a",7522:"bef88291",7634:"01c6402f",7748:"9e75f0a3",7862:"e6bf16cc",7918:"17896441",8054:"f3446560",8358:"c0165185",8518:"a7bd4aaa",8853:"e4a9ab5b",9075:"a68c2242",9137:"81d3dbad",9241:"7fb96d85",9441:"4215e4a8",9475:"581e27f1",9661:"5e95c892",9706:"ce2f93b1",9882:"93c186b3"}[e]||e)+"."+{12:"570f86ee",17:"e342d0cb",53:"768f1f06",367:"c882ba5c",506:"65f34dbd",511:"5758cf85",1043:"9767eb0f",1215:"d7db27a9",1569:"20232d8e",1652:"d6bca9e2",1669:"09a942f3",1737:"11bbf86a",1772:"68fb288f",1834:"f405b4b2",1903:"ea33b9b5",2130:"6a9a9d71",2388:"3c3b4ee9",2489:"0b8f7fbd",2491:"358781ed",2796:"bce50d5c",2944:"eda6f71c",3175:"6ae0d87c",3197:"bd70798c",3349:"461bd6f3",3449:"9bad530d",3814:"cb8f5e32",3823:"394bc608",4178:"ca25e848",4193:"514e849d",4195:"e08d2e45",4205:"90c9ee48",4368:"416d33f6",4558:"75896a03",4645:"d3acdd6d",4947:"d286d7d7",5118:"f5e623f5",5160:"7f5627cd",5208:"6b745b9a",5386:"ac6d34b2",5881:"9c582d90",6182:"d18636af",6317:"fd086852",6496:"4e293b04",6559:"a072103a",6787:"75754378",7138:"c3eb9cb5",7425:"371f174e",7469:"c0dc1144",7522:"d976d519",7634:"f868dc4f",7748:"d62e735c",7862:"bf377214",7918:"4400d07e",8054:"9191d4f8",8358:"f39280da",8518:"ecdd1e86",8853:"0f6a8262",9075:"89e467b5",9137:"4e14c74f",9241:"88c46dd0",9441:"4e40a297",9475:"2ad8568e",9661:"6173a5b3",9706:"720967cb",9882:"3f44b127"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),c={},b="rekalogika-docs:",r.l=(e,a,f,d)=>{if(c[e])c[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(f))),a)return a(f)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={17896441:"7918",e758c9ad:"12",e3fdc92c:"17","935f2afb":"53",b02eb586:"367",fd728aac:"506",f6f6785e:"511",fe998a72:"1043",e91438da:"1215","498f3971":"1569",bb6295cf:"1652",d39191ae:"1669","85b58447":"1737",c5761173:"1834","4ef8bca5":"1903","4d08d432":"2130","3fc97551":"2388","9af9e2d3":"2489",a0cb2ff0:"2491",e008aab7:"2796","5060314a":"2944",aeb852b9:"3175","38be5a5a":"3197","27d2408b":"3349","6e829f05":"3449",fd37b2f4:"3814",c6e69d14:"3823",a1516275:"4178",d11d1fff:"4193",c4f5d8e4:"4195","6b1ab773":"4205",a94703ab:"4368","17b6df24":"4558",c2040271:"4645","08447aa8":"4947",ab646a7c:"5118","6cacf3ff":"5160","2d2b4e63":"5208","0ee148be":"5386","77356f5a":"5881","03f62eaa":"6182","5cabcc74":"6317","86f92be2":"6496","05b80167":"6559","68b66c02":"6787","94d2cbb6":"7138","5498dd6e":"7425",b2c8757a:"7469",bef88291:"7522","01c6402f":"7634","9e75f0a3":"7748",e6bf16cc:"7862",f3446560:"8054",c0165185:"8358",a7bd4aaa:"8518",e4a9ab5b:"8853",a68c2242:"9075","81d3dbad":"9137","7fb96d85":"9241","4215e4a8":"9441","581e27f1":"9475","5e95c892":"9661",ce2f93b1:"9706","93c186b3":"9882"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(a,f)=>{var c=r.o(e,a)?e[a]:void 0;if(0!==c)if(c)f.push(c[2]);else if(/^(1303|532)$/.test(a))e[a]=0;else{var b=new Promise(((f,b)=>c=e[a]=[f,b]));f.push(c[2]=b);var d=r.p+r.u(a),t=new Error;r.l(d,(f=>{if(r.o(e,a)&&(0!==(c=e[a])&&(e[a]=void 0),c)){var b=f&&("load"===f.type?"missing":f.type),d=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+d+")",t.name="ChunkLoadError",t.type=b,t.request=d,c[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var c,b,d=f[0],t=f[1],o=f[2],n=0;if(d.some((a=>0!==e[a]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(a&&a(f);n rekalogika/direct-property-access | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator.html b/doctrine-collections-decorator.html index 635a9215..508924e6 100644 --- a/doctrine-collections-decorator.html +++ b/doctrine-collections-decorator.html @@ -4,7 +4,7 @@ rekalogika/doctrine-collections-decorator | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/class-diagram.html b/doctrine-collections-decorator/class-diagram.html index 823cd456..de45cef7 100644 --- a/doctrine-collections-decorator/class-diagram.html +++ b/doctrine-collections-decorator/class-diagram.html @@ -4,7 +4,7 @@ Class Diagram | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/classes.html b/doctrine-collections-decorator/classes.html index f26c800f..3ed04a3b 100644 --- a/doctrine-collections-decorator/classes.html +++ b/doctrine-collections-decorator/classes.html @@ -4,7 +4,7 @@ Decorator Classes and Traits | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook.html b/doctrine-collections-decorator/cookbook.html index 405cc26d..d49828f0 100644 --- a/doctrine-collections-decorator/cookbook.html +++ b/doctrine-collections-decorator/cookbook.html @@ -4,7 +4,7 @@ Cookbook | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook/decorating-members.html b/doctrine-collections-decorator/cookbook/decorating-members.html index 5d48b48f..03118fd3 100644 --- a/doctrine-collections-decorator/cookbook/decorating-members.html +++ b/doctrine-collections-decorator/cookbook/decorating-members.html @@ -4,7 +4,7 @@ Decorating Member Objects | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook/extra-lazy-load-prevention.html b/doctrine-collections-decorator/cookbook/extra-lazy-load-prevention.html index 4d643c53..3caefd12 100644 --- a/doctrine-collections-decorator/cookbook/extra-lazy-load-prevention.html +++ b/doctrine-collections-decorator/cookbook/extra-lazy-load-prevention.html @@ -4,7 +4,7 @@ Loading Prevention in Extra Lazy Collections | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook/lazy-chained-matching.html b/doctrine-collections-decorator/cookbook/lazy-chained-matching.html index 4281ba82..1ebb3294 100644 --- a/doctrine-collections-decorator/cookbook/lazy-chained-matching.html +++ b/doctrine-collections-decorator/cookbook/lazy-chained-matching.html @@ -4,7 +4,7 @@ Lazy Chained Matching | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook/record-precounting.html b/doctrine-collections-decorator/cookbook/record-precounting.html index 1bd54240..8fea399f 100644 --- a/doctrine-collections-decorator/cookbook/record-precounting.html +++ b/doctrine-collections-decorator/cookbook/record-precounting.html @@ -4,7 +4,7 @@ Record Precounting | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook/selectable-abstraction.html b/doctrine-collections-decorator/cookbook/selectable-abstraction.html index 0b41263f..0b8ae180 100644 --- a/doctrine-collections-decorator/cookbook/selectable-abstraction.html +++ b/doctrine-collections-decorator/cookbook/selectable-abstraction.html @@ -4,7 +4,7 @@ Selectable Abstraction | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/cookbook/type-safety.html b/doctrine-collections-decorator/cookbook/type-safety.html index 1408f29a..53efefd8 100644 --- a/doctrine-collections-decorator/cookbook/type-safety.html +++ b/doctrine-collections-decorator/cookbook/type-safety.html @@ -4,7 +4,7 @@ Type Safety | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/creating.html b/doctrine-collections-decorator/creating.html index 9e26ef78..95e70f76 100644 --- a/doctrine-collections-decorator/creating.html +++ b/doctrine-collections-decorator/creating.html @@ -4,7 +4,7 @@ Creating a Decorator Class | Rekalogika.DEV - + diff --git a/doctrine-collections-decorator/intro.html b/doctrine-collections-decorator/intro.html index 9ed35271..993ad774 100644 --- a/doctrine-collections-decorator/intro.html +++ b/doctrine-collections-decorator/intro.html @@ -4,7 +4,7 @@ Introduction & Installation | Rekalogika.DEV - + diff --git a/domain-event.html b/domain-event.html index cc3cb0cb..8a1d7dc6 100644 --- a/domain-event.html +++ b/domain-event.html @@ -4,7 +4,7 @@ rekalogika/domain-event | Rekalogika.DEV - + diff --git a/domain-event/basic-usage.html b/domain-event/basic-usage.html index 1eda4186..29abb5b8 100644 --- a/domain-event/basic-usage.html +++ b/domain-event/basic-usage.html @@ -4,7 +4,7 @@ Basic Usage | Rekalogika.DEV - + diff --git a/domain-event/immediate-dispatcher.html b/domain-event/immediate-dispatcher.html index 8606e7eb..e283924a 100644 --- a/domain-event/immediate-dispatcher.html +++ b/domain-event/immediate-dispatcher.html @@ -4,7 +4,7 @@ Immediate Dispatcher Handling & Troubleshooting | Rekalogika.DEV - + diff --git a/domain-event/intro.html b/domain-event/intro.html index 62db4c7c..1186bb0b 100644 --- a/domain-event/intro.html +++ b/domain-event/intro.html @@ -4,7 +4,7 @@ Introduction & Installation | Rekalogika.DEV - + diff --git a/domain-event/manual-control.html b/domain-event/manual-control.html index 2b935d3e..f3e3af35 100644 --- a/domain-event/manual-control.html +++ b/domain-event/manual-control.html @@ -4,7 +4,7 @@ Manual Control | Rekalogika.DEV - + diff --git a/domain-event/tips.html b/domain-event/tips.html index b59c51dc..fb4174cc 100644 --- a/domain-event/tips.html +++ b/domain-event/tips.html @@ -4,7 +4,7 @@ Tips and Caveats | Rekalogika.DEV - + diff --git a/file-bundle.html b/file-bundle.html index c85c843c..2f126782 100644 --- a/file-bundle.html +++ b/file-bundle.html @@ -4,7 +4,7 @@ rekalogika/file-bundle | Rekalogika.DEV - + diff --git a/file-bundle/advanced/creating-filters.html b/file-bundle/advanced/creating-filters.html index d267beec..d2b502ac 100644 --- a/file-bundle/advanced/creating-filters.html +++ b/file-bundle/advanced/creating-filters.html @@ -4,7 +4,7 @@ Creating Filters | Rekalogika.DEV - + diff --git a/file-bundle/advanced/entity-association-internal.html b/file-bundle/advanced/entity-association-internal.html index 3865000c..aac685ad 100644 --- a/file-bundle/advanced/entity-association-internal.html +++ b/file-bundle/advanced/entity-association-internal.html @@ -4,7 +4,7 @@ File Association Internal Details | Rekalogika.DEV - + diff --git a/file-bundle/advanced/file-association-interface.html b/file-bundle/advanced/file-association-interface.html index 1ed3c8e3..cecb4779 100644 --- a/file-bundle/advanced/file-association-interface.html +++ b/file-bundle/advanced/file-association-interface.html @@ -4,7 +4,7 @@ Marking Entities using Interface | Rekalogika.DEV - + diff --git a/file-bundle/advanced/object-id-resolver.html b/file-bundle/advanced/object-id-resolver.html index 95012692..c1dcfea8 100644 --- a/file-bundle/advanced/object-id-resolver.html +++ b/file-bundle/advanced/object-id-resolver.html @@ -4,7 +4,7 @@ Object ID Resolver | Rekalogika.DEV - + diff --git a/file-bundle/collection.html b/file-bundle/collection.html index 0d533e45..000f77c7 100644 --- a/file-bundle/collection.html +++ b/file-bundle/collection.html @@ -4,7 +4,7 @@ Implementing a Collection of Files | Rekalogika.DEV - + diff --git a/file-bundle/doctrine-entity.html b/file-bundle/doctrine-entity.html index 7baf3b2a..db6a751a 100644 --- a/file-bundle/doctrine-entity.html +++ b/file-bundle/doctrine-entity.html @@ -4,7 +4,7 @@ Associating Files to Doctrine Entities | Rekalogika.DEV - + @@ -25,7 +25,7 @@

Mandatory File​

If your business logic necessitates that the file is mandatory to an entity, you can omit the ? in the property type hint:

-
use Rekalogika\Contracts\File\FileInterface;
use Rekalogika\File\Association\Attribute\WithFileAssociation;
use Rekalogika\File\Association\Attribute\AsFileAssociation;

#[WithFileAssociation]
class Product
{
#[AsFileAssociation]
private FileInterface $image = null;
}
+
use Rekalogika\Contracts\File\FileInterface;
use Rekalogika\File\Association\Attribute\WithFileAssociation;
use Rekalogika\File\Association\Attribute\AsFileAssociation;

#[WithFileAssociation]
class Product
{
#[AsFileAssociation]
private FileInterface $image;
}

Read more about mandatory files in the chapter Mandatory File.

\ No newline at end of file diff --git a/file-bundle/file-upload-filepond.html b/file-bundle/file-upload-filepond.html index 1c82a83f..f40e7e69 100644 --- a/file-bundle/file-upload-filepond.html +++ b/file-bundle/file-upload-filepond.html @@ -4,7 +4,7 @@ File Uploads Using FilePond | Rekalogika.DEV - + diff --git a/file-bundle/filtering.html b/file-bundle/filtering.html index 5e10c73a..c9ecafd5 100644 --- a/file-bundle/filtering.html +++ b/file-bundle/filtering.html @@ -4,7 +4,7 @@ Filtering | Rekalogika.DEV - + diff --git a/file-bundle/installation.html b/file-bundle/installation.html index eab3c2bc..04053cc6 100644 --- a/file-bundle/installation.html +++ b/file-bundle/installation.html @@ -4,7 +4,7 @@ Installation & Configuration | Rekalogika.DEV - + diff --git a/file-bundle/intro.html b/file-bundle/intro.html index 43c78741..3d3c6f42 100644 --- a/file-bundle/intro.html +++ b/file-bundle/intro.html @@ -4,7 +4,7 @@ Introduction | Rekalogika.DEV - + diff --git a/file-bundle/lazy-loading.html b/file-bundle/lazy-loading.html index 27021bd2..6ae60498 100644 --- a/file-bundle/lazy-loading.html +++ b/file-bundle/lazy-loading.html @@ -4,7 +4,7 @@ Lazy-Loading Files | Rekalogika.DEV - + diff --git a/file-bundle/mandatory-file.html b/file-bundle/mandatory-file.html index f31093b7..efbff031 100644 --- a/file-bundle/mandatory-file.html +++ b/file-bundle/mandatory-file.html @@ -4,7 +4,7 @@ Mandatory File | Rekalogika.DEV - + diff --git a/file-bundle/replicating-metadata-in-entities.html b/file-bundle/replicating-metadata-in-entities.html index a9429fa2..a41c6676 100644 --- a/file-bundle/replicating-metadata-in-entities.html +++ b/file-bundle/replicating-metadata-in-entities.html @@ -4,7 +4,7 @@ Replicating Metadata in Entities | Rekalogika.DEV - + diff --git a/file-bundle/serving-files.html b/file-bundle/serving-files.html index f0d7b2ad..417dd367 100644 --- a/file-bundle/serving-files.html +++ b/file-bundle/serving-files.html @@ -4,7 +4,7 @@ Serving Files | Rekalogika.DEV - + diff --git a/file-bundle/symfony.html b/file-bundle/symfony.html index 98ad68df..7938244a 100644 --- a/file-bundle/symfony.html +++ b/file-bundle/symfony.html @@ -4,7 +4,7 @@ Integration With Symfony Components | Rekalogika.DEV - + diff --git a/file-bundle/translation.html b/file-bundle/translation.html index d7c10c47..b3434b53 100644 --- a/file-bundle/translation.html +++ b/file-bundle/translation.html @@ -4,7 +4,7 @@ Translation | Rekalogika.DEV - + diff --git a/file-bundle/working-with-entities.html b/file-bundle/working-with-entities.html index 7750d473..37913568 100644 --- a/file-bundle/working-with-entities.html +++ b/file-bundle/working-with-entities.html @@ -4,7 +4,7 @@ Working With Entities & Files | Rekalogika.DEV - + diff --git a/file-bundle/zip-streaming.html b/file-bundle/zip-streaming.html index c98f29b7..80b3556e 100644 --- a/file-bundle/zip-streaming.html +++ b/file-bundle/zip-streaming.html @@ -4,7 +4,7 @@ Streaming a ZIP File of Files | Rekalogika.DEV - + diff --git a/file.html b/file.html index 0d424d37..cddb44b5 100644 --- a/file.html +++ b/file.html @@ -4,7 +4,7 @@ rekalogika/file | Rekalogika.DEV - + diff --git a/file/adapters.html b/file/adapters.html index 44382ef2..56d977ce 100644 --- a/file/adapters.html +++ b/file/adapters.html @@ -4,7 +4,7 @@ Adapters | Rekalogika.DEV - + diff --git a/file/concepts.html b/file/concepts.html index 5e89c12e..7c9d8b9d 100644 --- a/file/concepts.html +++ b/file/concepts.html @@ -4,7 +4,7 @@ Concepts & Terms | Rekalogika.DEV - + diff --git a/file/derivation.html b/file/derivation.html index 93d73d2e..709d3c52 100644 --- a/file/derivation.html +++ b/file/derivation.html @@ -4,7 +4,7 @@ Derivation | Rekalogika.DEV - + diff --git a/file/file.html b/file/file.html index 3c4ada10..1c7daf46 100644 --- a/file/file.html +++ b/file/file.html @@ -4,7 +4,7 @@ Using File & FileRepository | Rekalogika.DEV - + diff --git a/file/installation.html b/file/installation.html index 864f9d34..d7130a84 100644 --- a/file/installation.html +++ b/file/installation.html @@ -4,7 +4,7 @@ Installation & Configuration | Rekalogika.DEV - + diff --git a/file/intro.html b/file/intro.html index 2def0ff6..dc80a3c0 100644 --- a/file/intro.html +++ b/file/intro.html @@ -4,7 +4,7 @@ Introduction | Rekalogika.DEV - + diff --git a/file/metadata.html b/file/metadata.html index 8d138b11..52e522c5 100644 --- a/file/metadata.html +++ b/file/metadata.html @@ -4,7 +4,7 @@ Metadata | Rekalogika.DEV - + diff --git a/file/null-file.html b/file/null-file.html index fab11ec3..ff479d8c 100644 --- a/file/null-file.html +++ b/file/null-file.html @@ -4,7 +4,7 @@ Null File | Rekalogika.DEV - + diff --git a/file/proxy.html b/file/proxy.html index 24f1857c..eb8461e5 100644 --- a/file/proxy.html +++ b/file/proxy.html @@ -4,7 +4,7 @@ Lazy-Loading Proxy | Rekalogika.DEV - + diff --git a/gotenberg-pdf-bundle.html b/gotenberg-pdf-bundle.html index c75b4249..7fc29a57 100644 --- a/gotenberg-pdf-bundle.html +++ b/gotenberg-pdf-bundle.html @@ -4,7 +4,7 @@ rekalogika/gotenberg-pdf-bundle | Rekalogika.DEV - + diff --git a/gotenberg-pdf-bundle/installation.html b/gotenberg-pdf-bundle/installation.html index bbcd8dda..49aed4da 100644 --- a/gotenberg-pdf-bundle/installation.html +++ b/gotenberg-pdf-bundle/installation.html @@ -4,7 +4,7 @@ Installation & Quick Start | Rekalogika.DEV - + diff --git a/gotenberg-pdf-bundle/usage.html b/gotenberg-pdf-bundle/usage.html index 2f86b4d7..e20a1447 100644 --- a/gotenberg-pdf-bundle/usage.html +++ b/gotenberg-pdf-bundle/usage.html @@ -4,7 +4,7 @@ Usage | Rekalogika.DEV - + diff --git a/index.html b/index.html index 7c4cd9f5..f0f28c00 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Rekalogika.DEV - + diff --git a/psr-16-simple-cache-bundle.html b/psr-16-simple-cache-bundle.html index c38fcb4a..4289ea53 100644 --- a/psr-16-simple-cache-bundle.html +++ b/psr-16-simple-cache-bundle.html @@ -4,7 +4,7 @@ rekalogika/psr-16-simple-cache-bundle | Rekalogika.DEV - + diff --git a/reconstitutor.html b/reconstitutor.html index f2a857c2..d86023e6 100644 --- a/reconstitutor.html +++ b/reconstitutor.html @@ -4,7 +4,7 @@ rekalogika/reconstitutor | Rekalogika.DEV - + diff --git a/reconstitutor/intro.html b/reconstitutor/intro.html index c533c113..73aa6dce 100644 --- a/reconstitutor/intro.html +++ b/reconstitutor/intro.html @@ -4,7 +4,7 @@ Introduction & Installation | Rekalogika.DEV - + diff --git a/reconstitutor/usage.html b/reconstitutor/usage.html index 34ffc59e..6fffe4bd 100644 --- a/reconstitutor/usage.html +++ b/reconstitutor/usage.html @@ -4,7 +4,7 @@ Usage | Rekalogika.DEV - + diff --git a/temporary-url-bundle.html b/temporary-url-bundle.html index 09e2222f..9efaa639 100644 --- a/temporary-url-bundle.html +++ b/temporary-url-bundle.html @@ -4,7 +4,7 @@ rekalogika/temporary-url-bundle | Rekalogika.DEV - +