Page Not Found
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
From 211ab8e63d2056641ec4919a93bc2cfd1267a351 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Jul 2024 21:43:54 +0000 Subject: [PATCH] deploy: 773befffd1e2d66b7835784b52d07a31dc745ed0 --- 404.html | 4 +- assets/js/2693d1d3.e2f67253.js | 1 + assets/js/3cd0a4e8.f363e48a.js | 1 + assets/js/3e71c51e.bc63e446.js | 1 - assets/js/3faa3f93.02d03f8c.js | 1 + assets/js/5346779c.07b7fb0b.js | 1 - assets/js/5346779c.cd6667ae.js | 1 + .../js/{237.02cb92cf.js => 618.d250a315.js} | 2 +- assets/js/6acb28a5.c854b334.js | 1 + assets/js/7d4b0408.4c146063.js | 1 + assets/js/84b2f205.02b9e11a.js | 1 - assets/js/a8678e95.99ba5256.js | 1 - assets/js/aaa7fdeb.6efb89df.js | 1 + ...b363d.e7b8ad22.js => adf393e9.90c09dc4.js} | 2 +- assets/js/bbb724c6.8ff2b955.js | 1 - assets/js/dc8eeda6.383ce9d1.js | 1 - assets/js/f2e54508.3e7a1df5.js | 1 - assets/js/f2e54508.538d7ba3.js | 1 + assets/js/main.0be49dd0.js | 2 - assets/js/main.44f49a57.js | 2 + ...CENSE.txt => main.44f49a57.js.LICENSE.txt} | 0 assets/js/runtime~main.8ea3a067.js | 1 - assets/js/runtime~main.dde457c9.js | 1 + blog/archive/index.html | 4 +- blog/hello-world/index.html | 4 +- blog/index.html | 4 +- blog/tags/hello/index.html | 4 +- blog/tags/index.html | 4 +- docs/arsitektur/index.html | 4 +- docs/arsitektur/layering/index.html | 4 +- docs/intro/index.html | 4 +- docs/tutorial/{ => domain}/bekerja/index.html | 30 +++++--- .../{ => domain}/domain-testing/index.html | 12 ++-- docs/tutorial/domain/entity/index.html | 69 +++++++++++++++++++ docs/tutorial/domain/index.html | 67 ++---------------- .../{ => domain}/migrations/index.html | 16 ++--- docs/tutorial/{ => domain}/orm/index.html | 16 ++--- .../{ => domain}/repository/index.html | 16 ++--- docs/tutorial/index.html | 10 ++- index.html | 4 +- markdown-page/index.html | 4 +- sitemap.xml | 2 +- 42 files changed, 165 insertions(+), 142 deletions(-) create mode 100644 assets/js/2693d1d3.e2f67253.js create mode 100644 assets/js/3cd0a4e8.f363e48a.js delete mode 100644 assets/js/3e71c51e.bc63e446.js create mode 100644 assets/js/3faa3f93.02d03f8c.js delete mode 100644 assets/js/5346779c.07b7fb0b.js create mode 100644 assets/js/5346779c.cd6667ae.js rename assets/js/{237.02cb92cf.js => 618.d250a315.js} (94%) create mode 100644 assets/js/6acb28a5.c854b334.js create mode 100644 assets/js/7d4b0408.4c146063.js delete mode 100644 assets/js/84b2f205.02b9e11a.js delete mode 100644 assets/js/a8678e95.99ba5256.js create mode 100644 assets/js/aaa7fdeb.6efb89df.js rename assets/js/{785b363d.e7b8ad22.js => adf393e9.90c09dc4.js} (68%) delete mode 100644 assets/js/bbb724c6.8ff2b955.js delete mode 100644 assets/js/dc8eeda6.383ce9d1.js delete mode 100644 assets/js/f2e54508.3e7a1df5.js create mode 100644 assets/js/f2e54508.538d7ba3.js delete mode 100644 assets/js/main.0be49dd0.js create mode 100644 assets/js/main.44f49a57.js rename assets/js/{main.0be49dd0.js.LICENSE.txt => main.44f49a57.js.LICENSE.txt} (100%) delete mode 100644 assets/js/runtime~main.8ea3a067.js create mode 100644 assets/js/runtime~main.dde457c9.js rename docs/tutorial/{ => domain}/bekerja/index.html (76%) rename docs/tutorial/{ => domain}/domain-testing/index.html (74%) create mode 100644 docs/tutorial/domain/entity/index.html rename docs/tutorial/{ => domain}/migrations/index.html (55%) rename docs/tutorial/{ => domain}/orm/index.html (82%) rename docs/tutorial/{ => domain}/repository/index.html (82%) diff --git a/404.html b/404.html index 5d9e8c2..5dbc86a 100644 --- a/404.html +++ b/404.html @@ -5,8 +5,8 @@
We could not find what you were looking for.
Please contact the owner of the site that linked you to the original URL and let them know their link is broken.
Post
Baru dan Menyimpannya ke Database",id:"membuat-post-baru-dan-menyimpannya-ke-database",level:2},{value:"Mengambil Post
dari Database",id:"mengambil-post-dari-database",level:2},{value:"Mengubah Post
dan Menyimpannya ke Database",id:"mengubah-post-dan-menyimpannya-ke-database",level:2},{value:"Menghapus Post
dari Database",id:"menghapus-post-dari-database",level:2},{value:"Melakukan Iterasi Terhadap Semua Post
",id:"melakukan-iterasi-terhadap-semua-post",level:2}];function c(e){const a={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.p,{children:"Setelah membuat domain, mapping database, dan repositorynya, kita sudah bisa\nbekerja dengan entity tersebut."}),"\n",(0,t.jsxs)(a.h2,{id:"membuat-post-baru-dan-menyimpannya-ke-database",children:["Membuat ",(0,t.jsx)(a.code,{children:"Post"})," Baru dan Menyimpannya ke Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n$post = new Post('Title', 'Content');\n$postRepository->add($post);\n$entityManager->flush();\n"})}),"\n",(0,t.jsx)(a.admonition,{title:"Perbedaan Dengan Doctrine Standar",type:"caution",children:(0,t.jsxs)(a.p,{children:["Repository standar Doctrine menggunakan ",(0,t.jsx)(a.code,{children:"EntitymanagerInterface::persist()"}),",\nsedangkan repository kita bisa menggunakan ",(0,t.jsx)(a.code,{children:"Repository::add()"}),"."]})}),"\n",(0,t.jsxs)(a.h2,{id:"mengambil-post-dari-database",children:["Mengambil ",(0,t.jsx)(a.code,{children:"Post"})," dari Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\n\n/** @var PostRepository $postRepository */\n\n// $post akan null jika tidak ditemukan di database\n$post = $postRepository->get('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n\n// akan throw exception jika tidak ditemukan di database, dan otomatis\n// menjadi error 404 di browser\n$post = $postRepository->fetch('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n"})}),"\n",(0,t.jsx)(a.admonition,{title:"Perbedaan Dengan Doctrine Standar",type:"caution",children:(0,t.jsxs)(a.p,{children:["Repository standar Doctrine menggunakan ",(0,t.jsx)(a.code,{children:"find()"}),", sedangkan repository kita\nmenggunakan ",(0,t.jsx)(a.code,{children:"get()"})," dan ",(0,t.jsx)(a.code,{children:"fetch()"}),"."]})}),"\n",(0,t.jsxs)(a.h2,{id:"mengubah-post-dan-menyimpannya-ke-database",children:["Mengubah ",(0,t.jsx)(a.code,{children:"Post"})," dan Menyimpannya ke Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n$post = $postRepository->get('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n$post->setTitle('New Title');\n$post->setContent('New Content');\n$entityManager->flush();\n"})}),"\n",(0,t.jsxs)(a.h2,{id:"menghapus-post-dari-database",children:["Menghapus ",(0,t.jsx)(a.code,{children:"Post"})," dari Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n// cara pertama\n$post = $postRepository->get('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n$postRepository->removeElement($post);\n$entityManager->flush();\n\n// cara kedua\n$postRepository->remove('91b2679e-47a5-11ef-b06f-8c8caa77b0f');\n$entityManager->flush();\n"})}),"\n",(0,t.jsx)(a.admonition,{title:"Perbedaan Dengan Doctrine Standar",type:"caution",children:(0,t.jsxs)(a.p,{children:["Repository standar Doctrine menggunakan ",(0,t.jsx)(a.code,{children:"remove()"}),", sedangkan repository kita\nmenggunakan ",(0,t.jsx)(a.code,{children:"removeElement()"}),"."]})}),"\n",(0,t.jsxs)(a.h2,{id:"melakukan-iterasi-terhadap-semua-post",children:["Melakukan Iterasi Terhadap Semua ",(0,t.jsx)(a.code,{children:"Post"})]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\DomainService\\Repository\\PostRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n// cara langsung, akan mengambil semua data dari database sekaligus, dan\n// berpotensi out of memory jika data terlalu banyak:\n\nforeach ($postRepository as $post) {\n // lakukan sesuatu dengan $post\n}\n\n// menggunakan batch, akan mengambil data per halaman, dan tidak akan\n// mengalami out of memory:\n\nforeach ($postRepository->withItemsPerPage(1000)->getPages() as $page) {\n foreach ($page as $post) {\n // lakukan sesuatu dengan $post\n }\n\n $entityManager->clear();\n}\n"})}),"\n",(0,t.jsx)(a.admonition,{title:"Perbedaan Dengan Doctrine Standar",type:"caution",children:(0,t.jsxs)(a.p,{children:["Repository standar Doctrine menggunakan ",(0,t.jsx)(a.code,{children:"findAll()"}),", sedangkan repository kita\nadalah ",(0,t.jsx)(a.code,{children:"iterable"}),"-nya itu sendiri."]})})]})}function l(e={}){const{wrapper:a}={...(0,o.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>r});var t=n(6540);const o={},s=t.createContext(o);function i(e){const a=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(s.Provider,{value:a},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/3e71c51e.bc63e446.js b/assets/js/3e71c51e.bc63e446.js
deleted file mode 100644
index 93badc3..0000000
--- a/assets/js/3e71c51e.bc63e446.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[569],{7738:(a,e,n)=>{n.r(e),n.d(e,{assets:()=>l,contentTitle:()=>s,default:()=>m,frontMatter:()=>r,metadata:()=>o,toc:()=>u});var i=n(4848),t=n(8453);const r={title:"Migrations"},s=void 0,o={id:"tutorial/migrations",title:"Migrations",description:"Migrations adalah cara untuk mengelola perubahan skema database.",source:"@site/docs/03-tutorial/04-migrations.md",sourceDirName:"03-tutorial",slug:"/tutorial/migrations",permalink:"/doksli/docs/tutorial/migrations",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/doksli/edit/main/docs/03-tutorial/04-migrations.md",tags:[],version:"current",sidebarPosition:4,frontMatter:{title:"Migrations"},sidebar:"tutorialSidebar",previous:{title:"Konfigurasi ORM",permalink:"/doksli/docs/tutorial/orm"},next:{title:"Repository",permalink:"/doksli/docs/tutorial/repository"}},l={},u=[{value:"Membuat Migrasi",id:"membuat-migrasi",level:2},{value:"Menjalankan Migrasi",id:"menjalankan-migrasi",level:2}];function d(a){const e={code:"code",h2:"h2",p:"p",pre:"pre",...(0,t.R)(),...a.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Migrations adalah cara untuk mengelola perubahan skema database."}),"\n",(0,i.jsx)(e.h2,{id:"membuat-migrasi",children:"Membuat Migrasi"}),"\n",(0,i.jsx)(e.p,{children:"Setelah memodifikasi file konfigurasi ORM, jalankan perintah berikut untuk\nmenghasilkan file migrasi:"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-bash",children:"$ make migrations-make\n"})}),"\n",(0,i.jsxs)(e.p,{children:["Perintah ini akan membuat file migrasi baru di direktori ",(0,i.jsx)(e.code,{children:"migrations/"}),". File\nmigrasi ini berisi perintah SQL untuk membuat, mengubah, atau menghapus tabel\natau kolom di database."]}),"\n",(0,i.jsxs)(e.p,{children:["Silakan cek isi file migrasi yang baru dibuat. Kadang perlu dilakukan\npenyesuaian manual, misalnya jika menambahkan kolom baru yang ",(0,i.jsx)(e.code,{children:"not null"}),", maka\nperlu diberikan nilai default. Atau dengan strategi membuat kolom baru dengan\n",(0,i.jsx)(e.code,{children:"null"}),", melakukan ",(0,i.jsx)(e.code,{children:"update"})," pada data yang sudah ada, lalu mengubah kolom menjadi\n",(0,i.jsx)(e.code,{children:"not null"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"menjalankan-migrasi",children:"Menjalankan Migrasi"}),"\n",(0,i.jsx)(e.p,{children:"Setelah file migrasi sudah disesuaikan, jalankan perintah berikut untuk\nmenjalankan migrasi:"}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-bash",children:"$ make migrations-migrate\n"})})]})}function m(a={}){const{wrapper:e}={...(0,t.R)(),...a.components};return e?(0,i.jsx)(e,{...a,children:(0,i.jsx)(d,{...a})}):d(a)}},8453:(a,e,n)=>{n.d(e,{R:()=>s,x:()=>o});var i=n(6540);const t={},r=i.createContext(t);function s(a){const e=i.useContext(r);return i.useMemo((function(){return"function"==typeof a?a(e):{...e,...a}}),[e,a])}function o(a){let e;return e=a.disableParentContext?"function"==typeof a.components?a.components(t):a.components||t:s(a.components),i.createElement(r.Provider,{value:e},a.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/3faa3f93.02d03f8c.js b/assets/js/3faa3f93.02d03f8c.js
new file mode 100644
index 0000000..6e469c9
--- /dev/null
+++ b/assets/js/3faa3f93.02d03f8c.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[873],{3661:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>s,metadata:()=>c,toc:()=>u});var r=n(4848),i=n(8453),o=n(3514);const s={title:"Domain"},a=void 0,c={id:"tutorial/domain/index",title:"Domain",description:"Untuk tutorial ini, kita akan membuat aplikasi blog sederhana. Aplikasi ini",source:"@site/docs/03-tutorial/01-domain/index.md",sourceDirName:"03-tutorial/01-domain",slug:"/tutorial/domain/",permalink:"/doksli/docs/tutorial/domain/",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/doksli/edit/main/docs/03-tutorial/01-domain/index.md",tags:[],version:"current",frontMatter:{title:"Domain"},sidebar:"tutorialSidebar",previous:{title:"Tutorial",permalink:"/doksli/docs/tutorial/"},next:{title:"Entity",permalink:"/doksli/docs/tutorial/domain/entity"}},l={},u=[];function d(e){const t={code:"code",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:["Untuk tutorial ini, kita akan membuat aplikasi blog sederhana. Aplikasi ini\nterdiri dari dua entitas utama: ",(0,r.jsx)(t.code,{children:"Post"})," dan ",(0,r.jsx)(t.code,{children:"Comment"}),"."]}),"\n",(0,r.jsx)(o.A,{})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3514:(e,t,n)=>{n.d(t,{A:()=>k});n(6540);var r=n(4164),i=n(1754),o=n(8774),s=n(5846),a=n(6654),c=n(1312),l=n(1107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(4848);function m(e){let{href:t,children:n}=e;return(0,d.jsx)(o.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function p(e){let{href:t,icon:n,title:i,description:o}=e;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(l.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:i,children:[n," ",i]}),o&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:o,children:o})]})}function f(e){let{item:t}=e;const n=(0,i.Nr)(t),r=function(){const{selectMessage:e}=(0,s.W)();return t=>e(t,(0,c.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return n?(0,d.jsx)(p,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??r(t.items.length)}):null}function h(e){let{item:t}=e;const n=(0,a.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,i.cC)(t.docId??void 0);return(0,d.jsx)(p,{href:t.href,icon:n,title:t.label,description:t.description??r?.description})}function x(e){let{item:t}=e;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function g(e){let{className:t}=e;const n=(0,i.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){const{items:t,className:n}=e;if(!t)return(0,d.jsx)(g,{...e});const o=(0,i.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:o.map(((e,t)=>(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(x,{item:e})},t)))})}},5846:(e,t,n)=>{n.d(t,{W:()=>l});var r=n(6540),i=n(4586);const o=["zero","one","two","few","many","other"];function s(e){return o.filter((t=>e.includes(t)))}const a={locale:"en",pluralForms:s(["one","other"]),select:e=>1===e?"one":"other"};function c(){const{i18n:{currentLocale:e}}=(0,i.A)();return(0,r.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:s(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),a}}),[e])}function l(){const e=c();return{selectMessage:(t,n)=>function(e,t,n){const r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);const i=n.select(t),o=n.pluralForms.indexOf(i);return r[Math.min(o,r.length-1)]}(n,t,e)}}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var r=n(6540);const i={},o=r.createContext(i);function s(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/5346779c.07b7fb0b.js b/assets/js/5346779c.07b7fb0b.js
deleted file mode 100644
index 8c7851e..0000000
--- a/assets/js/5346779c.07b7fb0b.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[403],{912:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>u});var r=n(4848),i=n(8453),o=n(3514);const s={title:"Tutorial"},a=void 0,l={id:"tutorial/index",title:"Tutorial",description:"Untuk tutorial ini, kita akan membuat aplikasi blog sederhana. Aplikasi ini",source:"@site/docs/03-tutorial/index.md",sourceDirName:"03-tutorial",slug:"/tutorial/",permalink:"/doksli/docs/tutorial/",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/doksli/edit/main/docs/03-tutorial/index.md",tags:[],version:"current",frontMatter:{title:"Tutorial"},sidebar:"tutorialSidebar",previous:{title:"Arsitektur",permalink:"/doksli/docs/arsitektur/layering"},next:{title:"Domain",permalink:"/doksli/docs/tutorial/domain"}},c={},u=[];function d(e){const t={code:"code",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:["Untuk tutorial ini, kita akan membuat aplikasi blog sederhana. Aplikasi ini\nterdiri dari dua entitas utama: ",(0,r.jsx)(t.code,{children:"Post"})," dan ",(0,r.jsx)(t.code,{children:"Comment"}),"."]}),"\n",(0,r.jsx)(o.A,{})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},3514:(e,t,n)=>{n.d(t,{A:()=>k});n(6540);var r=n(4164),i=n(1754),o=n(8774),s=n(5846),a=n(6654),l=n(1312),c=n(1107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(4848);function m(e){let{href:t,children:n}=e;return(0,d.jsx)(o.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function p(e){let{href:t,icon:n,title:i,description:o}=e;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(c.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:i,children:[n," ",i]}),o&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:o,children:o})]})}function f(e){let{item:t}=e;const n=(0,i.Nr)(t),r=function(){const{selectMessage:e}=(0,s.W)();return t=>e(t,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return n?(0,d.jsx)(p,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??r(t.items.length)}):null}function h(e){let{item:t}=e;const n=(0,a.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,i.cC)(t.docId??void 0);return(0,d.jsx)(p,{href:t.href,icon:n,title:t.label,description:t.description??r?.description})}function x(e){let{item:t}=e;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(f,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function g(e){let{className:t}=e;const n=(0,i.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){const{items:t,className:n}=e;if(!t)return(0,d.jsx)(g,{...e});const o=(0,i.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:o.map(((e,t)=>(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(x,{item:e})},t)))})}},5846:(e,t,n)=>{n.d(t,{W:()=>c});var r=n(6540),i=n(4586);const o=["zero","one","two","few","many","other"];function s(e){return o.filter((t=>e.includes(t)))}const a={locale:"en",pluralForms:s(["one","other"]),select:e=>1===e?"one":"other"};function l(){const{i18n:{currentLocale:e}}=(0,i.A)();return(0,r.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:s(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),a}}),[e])}function c(){const e=l();return{selectMessage:(t,n)=>function(e,t,n){const r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);const i=n.select(t),o=n.pluralForms.indexOf(i);return r[Math.min(o,r.length-1)]}(n,t,e)}}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>a});var r=n(6540);const i={},o=r.createContext(i);function s(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/5346779c.cd6667ae.js b/assets/js/5346779c.cd6667ae.js
new file mode 100644
index 0000000..2e0588f
--- /dev/null
+++ b/assets/js/5346779c.cd6667ae.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[403],{912:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>c,default:()=>m,frontMatter:()=>s,metadata:()=>l,toc:()=>u});var r=n(4848),o=n(8453),i=n(3514);const s={title:"Tutorial"},c=void 0,l={id:"tutorial/index",title:"Tutorial",description:"",source:"@site/docs/03-tutorial/index.md",sourceDirName:"03-tutorial",slug:"/tutorial/",permalink:"/doksli/docs/tutorial/",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/doksli/edit/main/docs/03-tutorial/index.md",tags:[],version:"current",frontMatter:{title:"Tutorial"},sidebar:"tutorialSidebar",previous:{title:"Arsitektur",permalink:"/doksli/docs/arsitektur/layering"},next:{title:"Domain",permalink:"/doksli/docs/tutorial/domain/"}},a={},u=[];function d(e){return(0,r.jsx)(i.A,{})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d()}},3514:(e,t,n)=>{n.d(t,{A:()=>k});n(6540);var r=n(4164),o=n(1754),i=n(8774),s=n(5846),c=n(6654),l=n(1312),a=n(1107);const u={cardContainer:"cardContainer_fWXF",cardTitle:"cardTitle_rnsV",cardDescription:"cardDescription_PWke"};var d=n(4848);function m(e){let{href:t,children:n}=e;return(0,d.jsx)(i.A,{href:t,className:(0,r.A)("card padding--lg",u.cardContainer),children:n})}function f(e){let{href:t,icon:n,title:o,description:i}=e;return(0,d.jsxs)(m,{href:t,children:[(0,d.jsxs)(a.A,{as:"h2",className:(0,r.A)("text--truncate",u.cardTitle),title:o,children:[n," ",o]}),i&&(0,d.jsx)("p",{className:(0,r.A)("text--truncate",u.cardDescription),title:i,children:i})]})}function p(e){let{item:t}=e;const n=(0,o.Nr)(t),r=function(){const{selectMessage:e}=(0,s.W)();return t=>e(t,(0,l.T)({message:"1 item|{count} items",id:"theme.docs.DocCard.categoryDescription.plurals",description:"The default description for a category card in the generated index about how many items this category includes"},{count:t}))}();return n?(0,d.jsx)(f,{href:n,icon:"\ud83d\uddc3\ufe0f",title:t.label,description:t.description??r(t.items.length)}):null}function h(e){let{item:t}=e;const n=(0,c.A)(t.href)?"\ud83d\udcc4\ufe0f":"\ud83d\udd17",r=(0,o.cC)(t.docId??void 0);return(0,d.jsx)(f,{href:t.href,icon:n,title:t.label,description:t.description??r?.description})}function x(e){let{item:t}=e;switch(t.type){case"link":return(0,d.jsx)(h,{item:t});case"category":return(0,d.jsx)(p,{item:t});default:throw new Error(`unknown item type ${JSON.stringify(t)}`)}}function g(e){let{className:t}=e;const n=(0,o.$S)();return(0,d.jsx)(k,{items:n.items,className:t})}function k(e){const{items:t,className:n}=e;if(!t)return(0,d.jsx)(g,{...e});const i=(0,o.d1)(t);return(0,d.jsx)("section",{className:(0,r.A)("row",n),children:i.map(((e,t)=>(0,d.jsx)("article",{className:"col col--6 margin-bottom--lg",children:(0,d.jsx)(x,{item:e})},t)))})}},5846:(e,t,n)=>{n.d(t,{W:()=>a});var r=n(6540),o=n(4586);const i=["zero","one","two","few","many","other"];function s(e){return i.filter((t=>e.includes(t)))}const c={locale:"en",pluralForms:s(["one","other"]),select:e=>1===e?"one":"other"};function l(){const{i18n:{currentLocale:e}}=(0,o.A)();return(0,r.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:s(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),c}}),[e])}function a(){const e=l();return{selectMessage:(t,n)=>function(e,t,n){const r=e.split("|");if(1===r.length)return r[0];r.length>n.pluralForms.length&&console.error(`For locale=${n.locale}, a maximum of ${n.pluralForms.length} plural forms are expected (${n.pluralForms.join(",")}), but the message contains ${r.length}: ${e}`);const o=n.select(t),i=n.pluralForms.indexOf(o);return r[Math.min(i,r.length-1)]}(n,t,e)}}},8453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>c});var r=n(6540);const o={},i=r.createContext(o);function s(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/237.02cb92cf.js b/assets/js/618.d250a315.js
similarity index 94%
rename from assets/js/237.02cb92cf.js
rename to assets/js/618.d250a315.js
index 0d12f6d..c5e5926 100644
--- a/assets/js/237.02cb92cf.js
+++ b/assets/js/618.d250a315.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[237],{3363:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var i=n(4164),o=n(1312),s=n(1107),r=n(4848);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,i.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(6540);var i=n(1312),o=n(1213),s=n(781),r=n(3363),a=n(4848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[618],{3363:(e,t,n)=>{n.d(t,{A:()=>a});n(6540);var i=n(4164),o=n(1312),s=n(1107),r=n(4848);function a(e){let{className:t}=e;return(0,r.jsx)("main",{className:(0,i.A)("container margin-vert--xl",t),children:(0,r.jsx)("div",{className:"row",children:(0,r.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,r.jsx)(s.A,{as:"h1",className:"hero__title",children:(0,r.jsx)(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page",children:"Page Not Found"})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page",children:"We could not find what you were looking for."})}),(0,r.jsx)("p",{children:(0,r.jsx)(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page",children:"Please contact the owner of the site that linked you to the original URL and let them know their link is broken."})})]})})})}},2237:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});n(6540);var i=n(1312),o=n(1213),s=n(781),r=n(3363),a=n(4848);function d(){const e=(0,i.T)({id:"theme.NotFound.title",message:"Page Not Found"});return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.be,{title:e}),(0,a.jsx)(s.A,{children:(0,a.jsx)(r.A,{})})]})}}}]);
\ No newline at end of file
diff --git a/assets/js/6acb28a5.c854b334.js b/assets/js/6acb28a5.c854b334.js
new file mode 100644
index 0000000..d3b62a5
--- /dev/null
+++ b/assets/js/6acb28a5.c854b334.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[211],{5667:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var r=t(4848),o=t(8453);const i={title:"Repository"},s=void 0,a={id:"tutorial/domain/repository",title:"Repository",description:"Repository pattern adalah pola design yang memberikan abstraksi untuk mengakses",source:"@site/docs/03-tutorial/01-domain/05-repository.md",sourceDirName:"03-tutorial/01-domain",slug:"/tutorial/domain/repository",permalink:"/doksli/docs/tutorial/domain/repository",draft:!1,unlisted:!1,editUrl:"https://github.com/rekalogika/doksli/edit/main/docs/03-tutorial/01-domain/05-repository.md",tags:[],version:"current",sidebarPosition:5,frontMatter:{title:"Repository"},sidebar:"tutorialSidebar",previous:{title:"Migrations",permalink:"/doksli/docs/tutorial/domain/migrations"},next:{title:"Bekerja Dengan Entity",permalink:"/doksli/docs/tutorial/domain/bekerja"}},p={},c=[{value:"Membuat Interface Repository",id:"membuat-interface-repository",level:2},{value:"Membuat Implementasi Repository",id:"membuat-implementasi-repository",level:2}];function m(e){const n={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Repository pattern adalah pola design yang memberikan abstraksi untuk mengakses\ndata. Kita menggunakan repository untuk mengambil dan menyimpan data ke dalam\ndatabase."}),"\n",(0,r.jsx)(n.p,{children:"Hal tersebut dilakukan melalui satu pintu. Keluar masuk entity dari dan ke\ndatabase dilakukan hanya melalui repository. Apabila ada perubahan cara\npenyimpanan data, hal tersebut mudah dilakukan karena hanya perlu mengubah\nimplementasi repository."}),"\n",(0,r.jsx)(n.h2,{id:"membuat-interface-repository",children:"Membuat Interface Repository"}),"\n",(0,r.jsx)(n.p,{children:"Pada arsitektur yang kita gunakan, repository berada di layer domain service.\nKarena repository berhubungan dengan infrastruktur, kita hanya akan membuat\ninterfacenya saja di layer domain service:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-php",metastring:'title="src/DomainService/Repository/PostRepository.php"',children:"namespace App\\DomainService\\Repository;\n\nuse App\\Domain\\Entity\\Post;\nuse Rekalogika\\Contracts\\Collections\\Repository;\n\n/**\n * @extends RepositoryPost
",id:"konfigurasi-untuk-post",level:2},{value:"Konfigurasi Untuk Comment
",id:"konfigurasi-untuk-comment",level:2}];function c(n){const e={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Setelah pembuatan domain selesai, baru kita memikirkan bagaimana cara menyimpan\ndata ke database. Untuk melakukan itu, kita membuat konfigurasi ORM Doctrine\ndalam bentuk XML."}),"\n",(0,i.jsxs)(e.h2,{id:"konfigurasi-untuk-post",children:["Konfigurasi Untuk ",(0,i.jsx)(e.code,{children:"Post"})]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-xml",metastring:'title="config/doctrine/Post.orm.xml"',children:'\n\nPost
",id:"konfigurasi-untuk-post",level:2},{value:"Konfigurasi Untuk Comment
",id:"konfigurasi-untuk-comment",level:2}];function d(n){const e={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,a.R)(),...n.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:"Setelah pembuatan domain selesai, baru kita memikirkan bagaimana cara menyimpan\ndata ke database. Untuk melakukan itu, kita membuat konfigurasi ORM Doctrine\ndalam bentuk XML."}),"\n",(0,i.jsxs)(e.h2,{id:"konfigurasi-untuk-post",children:["Konfigurasi Untuk ",(0,i.jsx)(e.code,{children:"Post"})]}),"\n",(0,i.jsx)(e.pre,{children:(0,i.jsx)(e.code,{className:"language-xml",metastring:'title="config/doctrine/Post.orm.xml"',children:'\n\nPost
",id:"entity-post",level:2},{value:"Entity Comment
",id:"entity-comment",level:2},{value:"Relasi Pada Sisi Post
",id:"relasi-pada-sisi-post",level:2},{value:"Relasi Pada Sisi Comment
",id:"relasi-pada-sisi-comment",level:2}];function d(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.p,{children:"Untuk memulai, pertama-tama kita perlu desain domain-nya. Komponen utama domain\nadalah entity dan value object. Bedanya, entity memiliki state, dan biasanya\nakan disimpan di database. Sedangkan value object tidak memiliki state."}),"\n",(0,a.jsx)(e.admonition,{type:"caution",children:(0,a.jsx)(e.p,{children:"Kita menggunakan paradigma DDD. Pada tahap ini kita tidak perlu memikirkan\nteknologi yang digunakan, seperti bagaimana menyimpan ke database dan\nsebagainya. Kita hanya perlu fokus pada model bisnisnya saja."})}),"\n",(0,a.jsxs)(e.h2,{id:"entity-post",children:["Entity ",(0,a.jsx)(e.code,{children:"Post"})]}),"\n",(0,a.jsxs)(e.p,{children:["Berikut contoh entity untuk ",(0,a.jsx)(e.code,{children:"Post"}),":"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",metastring:'title="src/Domain/Entity/Post.php"',children:"namespace App\\Domain\\Entity;\n\nuse Rekalogika\\CommonBundle\\Domain\\Entity\\AbstractAggregateRoot;\nuse Symfony\\Component\\Clock\\DatePoint;\n\nclass Post extends AbstractAggregateRoot\n{\n private \\DateTimeInterface $createdTime;\n private string $title;\n private string $content;\n\n public function __construct(\n string $title,\n string $content,\n ) {\n $this->title = $title;\n $this->createdTime = new DatePoint();\n }\n}\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Terlihat bahwa class ini sudah bisa mewakili fungsi dasar dari blog post. Setiap\nblog post memiliki judul, konten, dan waktu pembuatan. Waktu pembuatan otomatis\ndibuat saat objek dibuat. Sedangkan terlihat ",(0,a.jsx)(e.code,{children:"title"})," dan ",(0,a.jsx)(e.code,{children:"content"})," adalah\nproperty yang wajib ada (tidak boleh kosong), dan harus ada saat objek pertama\nkali dibuat."]}),"\n",(0,a.jsx)(e.admonition,{type:"info",children:(0,a.jsxs)(e.p,{children:[(0,a.jsx)(e.code,{children:"DateTimeInterface"})," adalah interface dari semua objek waktu di PHP.\nImplementasi di PHP berupa ",(0,a.jsx)(e.code,{children:"DateTimeImmutable"})," dan ",(0,a.jsx)(e.code,{children:"DateTime"}),". Di sini kita\nmenggunakan ",(0,a.jsx)(e.code,{children:"DatePoint"})," dari Symfony Clock. Alasannya karena ",(0,a.jsx)(e.code,{children:"DatePoint"})," lebih\nmudah diuji daripada ",(0,a.jsx)(e.code,{children:"DateTimeImmutable"})," dan ",(0,a.jsx)(e.code,{children:"DateTime"}),"."]})}),"\n",(0,a.jsxs)(e.p,{children:["Properti ",(0,a.jsx)(e.code,{children:"createdTime"})," tidak boleh diubah setelah, hanya bisa dilihat, maka kita\njadikan ",(0,a.jsx)(e.code,{children:"readonly"})," dan hanya kita buatkan getternya, tidak perlu setter:"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:"class Post extends AbstractAggregateRoot\n{\n private readonly \\DateTimeInterface $createdTime;\n\n public function getCreatedTime(): \\DateTimeInterface\n {\n return $this->createdTime;\n }\n}\n"})}),"\n",(0,a.jsx)(e.admonition,{type:"info",children:(0,a.jsxs)(e.p,{children:["Objek ",(0,a.jsx)(e.code,{children:"DateTimeInterface"})," adalah salah satu contoh dari value object."]})}),"\n",(0,a.jsxs)(e.p,{children:["Karena ",(0,a.jsx)(e.code,{children:"title"})," dan ",(0,a.jsx)(e.code,{children:"content"})," boleh diubah setelah pos dibuat, maka kita buatkan\ngetter dan setternya:"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:"class Post extends AbstractAggregateRoot\n{\n public function getTitle(): string\n {\n return $this->title;\n }\n\n public function setTitle(string $title): void\n {\n $this->title = $title;\n }\n\n public function getContent(): string\n {\n return $this->content;\n }\n\n public function setContent(string $content): void\n {\n $this->content = $content;\n }\n}\n"})}),"\n",(0,a.jsxs)(e.h2,{id:"entity-comment",children:["Entity ",(0,a.jsx)(e.code,{children:"Comment"})]}),"\n",(0,a.jsx)(e.p,{children:"Karena setiap pos bisa memiliki komentar, maka kita buat entity komentar:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",metastring:'title="src/Domain/Entity/Comment.php"',children:"namespace App\\Domain\\Entity;\n\nuse Rekalogika\\CommonBundle\\Domain\\Entity\\AbstractEntity;\nuse Symfony\\Component\\Clock\\DatePoint;\n\nclass Comment extends AbstractEntity\n{\n private string $content;\n private readonly \\DateTimeInterface $createdTime;\n\n public function __construct(string $content)\n {\n $this->content = $content;\n $this->createdTime = new DatePoint();\n }\n\n public function getCreatedTime(): \\DateTimeInterface\n {\n return $this->createdTime;\n }\n}\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Kurang lebih sama perilakunya dengan ",(0,a.jsx)(e.code,{children:"Post"}),". Komentar memiliki konten dan waktu."]}),"\n",(0,a.jsxs)(e.h2,{id:"relasi-pada-sisi-post",children:["Relasi Pada Sisi ",(0,a.jsx)(e.code,{children:"Post"})]}),"\n",(0,a.jsxs)(e.p,{children:["Karena setiap pos bisa memiliki beberapa komentar, maka kita perlu membuat\nrelasinya. Kita bisa membuat property ",(0,a.jsx)(e.code,{children:"comments"})," di ",(0,a.jsx)(e.code,{children:"Post"}),":"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:"use Doctrine\\Common\\Collections\\Collection;\nuse Rekalogika\\Contracts\\Collections\\Recollection;\nuse Rekalogika\\Domain\\Collections\\ArrayCollection;\nuse Rekalogika\\Domain\\Collections\\RecollectionDecorator;\n\nclass Post extends AbstractAggregateRoot\n{\n /**\n * @var CollectionPost
",id:"entity-post",level:2},{value:"Entity Comment
",id:"entity-comment",level:2},{value:"Relasi Pada Sisi Post
",id:"relasi-pada-sisi-post",level:2},{value:"Relasi Pada Sisi Comment
",id:"relasi-pada-sisi-comment",level:2}];function d(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e.p,{children:"Untuk memulai, pertama-tama kita perlu desain domain-nya. Komponen utama domain\nadalah entity dan value object. Bedanya, entity memiliki state, dan biasanya\nakan disimpan di database. Sedangkan value object tidak memiliki state."}),"\n",(0,a.jsx)(e.admonition,{type:"caution",children:(0,a.jsx)(e.p,{children:"Kita menggunakan paradigma DDD. Pada tahap ini kita tidak perlu memikirkan\nteknologi yang digunakan, seperti bagaimana menyimpan ke database dan\nsebagainya. Kita hanya perlu fokus pada model bisnisnya saja."})}),"\n",(0,a.jsxs)(e.h2,{id:"entity-post",children:["Entity ",(0,a.jsx)(e.code,{children:"Post"})]}),"\n",(0,a.jsxs)(e.p,{children:["Berikut contoh entity untuk ",(0,a.jsx)(e.code,{children:"Post"}),":"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",metastring:'title="src/Domain/Entity/Post.php"',children:"namespace App\\Domain\\Entity;\n\nuse Rekalogika\\CommonBundle\\Domain\\Entity\\AbstractAggregateRoot;\nuse Symfony\\Component\\Clock\\DatePoint;\n\nclass Post extends AbstractAggregateRoot\n{\n private \\DateTimeInterface $createdTime;\n private string $title;\n private string $content;\n\n public function __construct(\n string $title,\n string $content,\n ) {\n $this->title = $title;\n $this->createdTime = new DatePoint();\n }\n}\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Terlihat bahwa class ini sudah bisa mewakili fungsi dasar dari blog post. Setiap\nblog post memiliki judul, konten, dan waktu pembuatan. Waktu pembuatan otomatis\ndibuat saat objek dibuat. Sedangkan terlihat ",(0,a.jsx)(e.code,{children:"title"})," dan ",(0,a.jsx)(e.code,{children:"content"})," adalah\nproperty yang wajib ada (tidak boleh kosong), dan harus ada saat objek pertama\nkali dibuat."]}),"\n",(0,a.jsx)(e.admonition,{type:"info",children:(0,a.jsxs)(e.p,{children:[(0,a.jsx)(e.code,{children:"DateTimeInterface"})," adalah interface dari semua objek waktu di PHP.\nImplementasi di PHP berupa ",(0,a.jsx)(e.code,{children:"DateTimeImmutable"})," dan ",(0,a.jsx)(e.code,{children:"DateTime"}),". Di sini kita\nmenggunakan ",(0,a.jsx)(e.code,{children:"DatePoint"})," dari Symfony Clock. Alasannya karena ",(0,a.jsx)(e.code,{children:"DatePoint"})," lebih\nmudah diuji daripada ",(0,a.jsx)(e.code,{children:"DateTimeImmutable"})," dan ",(0,a.jsx)(e.code,{children:"DateTime"}),"."]})}),"\n",(0,a.jsxs)(e.p,{children:["Properti ",(0,a.jsx)(e.code,{children:"createdTime"})," tidak boleh diubah setelah, hanya bisa dilihat, maka kita\njadikan ",(0,a.jsx)(e.code,{children:"readonly"})," dan hanya kita buatkan getternya, tidak perlu setter:"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:"class Post extends AbstractAggregateRoot\n{\n private readonly \\DateTimeInterface $createdTime;\n\n public function getCreatedTime(): \\DateTimeInterface\n {\n return $this->createdTime;\n }\n}\n"})}),"\n",(0,a.jsx)(e.admonition,{type:"info",children:(0,a.jsxs)(e.p,{children:["Objek ",(0,a.jsx)(e.code,{children:"DateTimeInterface"})," adalah salah satu contoh dari value object."]})}),"\n",(0,a.jsxs)(e.p,{children:["Karena ",(0,a.jsx)(e.code,{children:"title"})," dan ",(0,a.jsx)(e.code,{children:"content"})," boleh diubah setelah pos dibuat, maka kita buatkan\ngetter dan setternya:"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:"class Post extends AbstractAggregateRoot\n{\n public function getTitle(): string\n {\n return $this->title;\n }\n\n public function setTitle(string $title): void\n {\n $this->title = $title;\n }\n\n public function getContent(): string\n {\n return $this->content;\n }\n\n public function setContent(string $content): void\n {\n $this->content = $content;\n }\n}\n"})}),"\n",(0,a.jsxs)(e.h2,{id:"entity-comment",children:["Entity ",(0,a.jsx)(e.code,{children:"Comment"})]}),"\n",(0,a.jsx)(e.p,{children:"Karena setiap pos bisa memiliki komentar, maka kita buat entity komentar:"}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",metastring:'title="src/Domain/Entity/Comment.php"',children:"namespace App\\Domain\\Entity;\n\nuse Rekalogika\\CommonBundle\\Domain\\Entity\\AbstractEntity;\nuse Symfony\\Component\\Clock\\DatePoint;\n\nclass Comment extends AbstractEntity\n{\n private string $content;\n private readonly \\DateTimeInterface $createdTime;\n\n public function __construct(string $content)\n {\n $this->content = $content;\n $this->createdTime = new DatePoint();\n }\n\n public function getCreatedTime(): \\DateTimeInterface\n {\n return $this->createdTime;\n }\n}\n"})}),"\n",(0,a.jsxs)(e.p,{children:["Kurang lebih sama perilakunya dengan ",(0,a.jsx)(e.code,{children:"Post"}),". Komentar memiliki konten dan waktu."]}),"\n",(0,a.jsxs)(e.h2,{id:"relasi-pada-sisi-post",children:["Relasi Pada Sisi ",(0,a.jsx)(e.code,{children:"Post"})]}),"\n",(0,a.jsxs)(e.p,{children:["Karena setiap pos bisa memiliki beberapa komentar, maka kita perlu membuat\nrelasinya. Kita bisa membuat property ",(0,a.jsx)(e.code,{children:"comments"})," di ",(0,a.jsx)(e.code,{children:"Post"}),":"]}),"\n",(0,a.jsx)(e.pre,{children:(0,a.jsx)(e.code,{className:"language-php",children:"use Doctrine\\Common\\Collections\\Collection;\nuse Rekalogika\\Contracts\\Collections\\Recollection;\nuse Rekalogika\\Domain\\Collections\\ArrayCollection;\nuse Rekalogika\\Domain\\Collections\\RecollectionDecorator;\n\nclass Post extends AbstractAggregateRoot\n{\n /**\n * @var CollectionPost
Baru dan Menyimpannya ke Database",id:"membuat-post-baru-dan-menyimpannya-ke-database",level:2},{value:"Mengambil Post
dari Database",id:"mengambil-post-dari-database",level:2},{value:"Mengubah Post
dan Menyimpannya ke Database",id:"mengubah-post-dan-menyimpannya-ke-database",level:2},{value:"Menghapus Post
dari Database",id:"menghapus-post-dari-database",level:2},{value:"Melakukan Iterasi Terhadap Semua Post
",id:"melakukan-iterasi-terhadap-semua-post",level:2}];function c(e){const a={code:"code",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.p,{children:"Setelah membuat domain, mapping database, dan repositorynya, kita sudah bisa\nbekerja dengan entity tersebut."}),"\n",(0,t.jsxs)(a.h2,{id:"membuat-post-baru-dan-menyimpannya-ke-database",children:["Membuat ",(0,t.jsx)(a.code,{children:"Post"})," Baru dan Menyimpannya ke Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n$post = new Post('Title', 'Content');\n$postRepository->add($post);\n$entityManager->flush();\n"})}),"\n",(0,t.jsxs)(a.h2,{id:"mengambil-post-dari-database",children:["Mengambil ",(0,t.jsx)(a.code,{children:"Post"})," dari Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\n\n/** @var PostRepository $postRepository */\n\n// $post akan null jika tidak ditemukan di database\n$post = $postRepository->get('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n\n// akan throw exception jika tidak ditemukan di database, dan otomatis\n// menjadi error 404 di browser\n$post = $postRepository->fetch('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n"})}),"\n",(0,t.jsxs)(a.h2,{id:"mengubah-post-dan-menyimpannya-ke-database",children:["Mengubah ",(0,t.jsx)(a.code,{children:"Post"})," dan Menyimpannya ke Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n$post = $postRepository->get('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n$post->setTitle('New Title');\n$post->setContent('New Content');\n$entityManager->flush();\n"})}),"\n",(0,t.jsxs)(a.h2,{id:"menghapus-post-dari-database",children:["Menghapus ",(0,t.jsx)(a.code,{children:"Post"})," dari Database"]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\Domain\\Entity\\Post;\nuse App\\DomainService\\Repository\\PostRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n// cara pertama\n$post = $postRepository->get('91b2679e-47a5-11ef-b06f-8c8caab77b0f');\n$postRepository->removeElement($post);\n$entityManager->flush();\n\n// cara kedua\n$postRepository->remove('91b2679e-47a5-11ef-b06f-8c8caa77b0f');\n$entityManager->flush();\n"})}),"\n",(0,t.jsxs)(a.h2,{id:"melakukan-iterasi-terhadap-semua-post",children:["Melakukan Iterasi Terhadap Semua ",(0,t.jsx)(a.code,{children:"Post"})]}),"\n",(0,t.jsx)(a.pre,{children:(0,t.jsx)(a.code,{className:"language-php",children:"use App\\DomainService\\Repository\\PostRepository;\nuse Doctrine\\ORM\\EntityManagerInterface;\n\n/** @var PostRepository $postRepository */\n/** @var EntityManagerInterface $entityManager */\n\n// cara langsung, akan mengambil semua data dari database sekaligus, dan\n// berpotensi out of memory jika data terlalu banyak:\n\nforeach ($postRepository as $post) {\n // lakukan sesuatu dengan $post\n}\n\n// menggunakan batch, akan mengambil data per halaman, dan tidak akan\n// mengalami out of memory:\n\nforeach ($postRepository->withItemsPerPage(1000)->getPages() as $page) {\n foreach ($page as $post) {\n // lakukan sesuatu dengan $post\n }\n\n $entityManager->clear();\n}\n"})})]})}function l(e={}){const{wrapper:a}={...(0,s.R)(),...e.components};return a?(0,t.jsx)(a,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},8453:(e,a,n)=>{n.d(a,{R:()=>i,x:()=>r});var t=n(6540);const s={},o=t.createContext(s);function i(e){const a=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(a):{...a,...e}}),[a,e])}function r(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(o.Provider,{value:a},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/f2e54508.3e7a1df5.js b/assets/js/f2e54508.3e7a1df5.js
deleted file mode 100644
index f0fb665..0000000
--- a/assets/js/f2e54508.3e7a1df5.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[896],{9170:i=>{i.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Intro","href":"/doksli/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Arsitektur","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Arsitektur","href":"/doksli/docs/arsitektur/layering","docId":"arsitektur/layering","unlisted":false}],"href":"/doksli/docs/arsitektur/"},{"type":"category","label":"Tutorial","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Domain","href":"/doksli/docs/tutorial/domain","docId":"tutorial/domain","unlisted":false},{"type":"link","label":"Domain Testing","href":"/doksli/docs/tutorial/domain-testing","docId":"tutorial/domain-testing","unlisted":false},{"type":"link","label":"Konfigurasi ORM","href":"/doksli/docs/tutorial/orm","docId":"tutorial/orm","unlisted":false},{"type":"link","label":"Migrations","href":"/doksli/docs/tutorial/migrations","docId":"tutorial/migrations","unlisted":false},{"type":"link","label":"Repository","href":"/doksli/docs/tutorial/repository","docId":"tutorial/repository","unlisted":false},{"type":"link","label":"Bekerja Dengan Entity","href":"/doksli/docs/tutorial/bekerja","docId":"tutorial/bekerja","unlisted":false}],"href":"/doksli/docs/tutorial/"}]},"docs":{"arsitektur/index":{"id":"arsitektur/index","title":"Arsitektur","description":"","sidebar":"tutorialSidebar"},"arsitektur/layering":{"id":"arsitektur/layering","title":"Arsitektur","description":"Aplikasi didesain menggunakan DDD (domain-driven design) dan _onion","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Intro","description":"","sidebar":"tutorialSidebar"},"tutorial/bekerja":{"id":"tutorial/bekerja","title":"Bekerja Dengan Entity","description":"Setelah membuat domain, mapping database, dan repositorynya, kita sudah bisa","sidebar":"tutorialSidebar"},"tutorial/domain":{"id":"tutorial/domain","title":"Domain","description":"Untuk memulai, pertama-tama kita perlu desain domain-nya. Komponen utama domain","sidebar":"tutorialSidebar"},"tutorial/domain-testing":{"id":"tutorial/domain-testing","title":"Domain Testing","description":"Setelah ada domain yang sudah diimplementasikan, kita buat unit test sederhana.","sidebar":"tutorialSidebar"},"tutorial/index":{"id":"tutorial/index","title":"Tutorial","description":"Untuk tutorial ini, kita akan membuat aplikasi blog sederhana. Aplikasi ini","sidebar":"tutorialSidebar"},"tutorial/migrations":{"id":"tutorial/migrations","title":"Migrations","description":"Migrations adalah cara untuk mengelola perubahan skema database.","sidebar":"tutorialSidebar"},"tutorial/orm":{"id":"tutorial/orm","title":"Konfigurasi ORM","description":"Setelah pembuatan domain selesai, baru kita memikirkan bagaimana cara menyimpan","sidebar":"tutorialSidebar"},"tutorial/repository":{"id":"tutorial/repository","title":"Repository","description":"Repository pattern adalah pola design yang memberikan abstraksi untuk mengakses","sidebar":"tutorialSidebar"}}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/f2e54508.538d7ba3.js b/assets/js/f2e54508.538d7ba3.js
new file mode 100644
index 0000000..c73456b
--- /dev/null
+++ b/assets/js/f2e54508.538d7ba3.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[896],{9170:i=>{i.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"Intro","href":"/doksli/docs/intro","docId":"intro","unlisted":false},{"type":"category","label":"Arsitektur","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Arsitektur","href":"/doksli/docs/arsitektur/layering","docId":"arsitektur/layering","unlisted":false}],"href":"/doksli/docs/arsitektur/"},{"type":"category","label":"Tutorial","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Domain","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Entity","href":"/doksli/docs/tutorial/domain/entity","docId":"tutorial/domain/entity","unlisted":false},{"type":"link","label":"Domain Testing","href":"/doksli/docs/tutorial/domain/domain-testing","docId":"tutorial/domain/domain-testing","unlisted":false},{"type":"link","label":"Konfigurasi ORM","href":"/doksli/docs/tutorial/domain/orm","docId":"tutorial/domain/orm","unlisted":false},{"type":"link","label":"Migrations","href":"/doksli/docs/tutorial/domain/migrations","docId":"tutorial/domain/migrations","unlisted":false},{"type":"link","label":"Repository","href":"/doksli/docs/tutorial/domain/repository","docId":"tutorial/domain/repository","unlisted":false},{"type":"link","label":"Bekerja Dengan Entity","href":"/doksli/docs/tutorial/domain/bekerja","docId":"tutorial/domain/bekerja","unlisted":false}],"href":"/doksli/docs/tutorial/domain/"}],"href":"/doksli/docs/tutorial/"}]},"docs":{"arsitektur/index":{"id":"arsitektur/index","title":"Arsitektur","description":"","sidebar":"tutorialSidebar"},"arsitektur/layering":{"id":"arsitektur/layering","title":"Arsitektur","description":"Aplikasi didesain menggunakan DDD (domain-driven design) dan _onion","sidebar":"tutorialSidebar"},"intro":{"id":"intro","title":"Intro","description":"","sidebar":"tutorialSidebar"},"tutorial/domain/bekerja":{"id":"tutorial/domain/bekerja","title":"Bekerja Dengan Entity","description":"Setelah membuat domain, mapping database, dan repositorynya, kita sudah bisa","sidebar":"tutorialSidebar"},"tutorial/domain/domain-testing":{"id":"tutorial/domain/domain-testing","title":"Domain Testing","description":"Setelah ada domain yang sudah diimplementasikan, kita buat unit test sederhana.","sidebar":"tutorialSidebar"},"tutorial/domain/entity":{"id":"tutorial/domain/entity","title":"Entity","description":"Untuk memulai, pertama-tama kita perlu desain domain-nya. Komponen utama domain","sidebar":"tutorialSidebar"},"tutorial/domain/index":{"id":"tutorial/domain/index","title":"Domain","description":"Untuk tutorial ini, kita akan membuat aplikasi blog sederhana. Aplikasi ini","sidebar":"tutorialSidebar"},"tutorial/domain/migrations":{"id":"tutorial/domain/migrations","title":"Migrations","description":"Migrations adalah cara untuk mengelola perubahan skema database.","sidebar":"tutorialSidebar"},"tutorial/domain/orm":{"id":"tutorial/domain/orm","title":"Konfigurasi ORM","description":"Setelah pembuatan domain selesai, baru kita memikirkan bagaimana cara menyimpan","sidebar":"tutorialSidebar"},"tutorial/domain/repository":{"id":"tutorial/domain/repository","title":"Repository","description":"Repository pattern adalah pola design yang memberikan abstraksi untuk mengakses","sidebar":"tutorialSidebar"},"tutorial/index":{"id":"tutorial/index","title":"Tutorial","description":"","sidebar":"tutorialSidebar"}}}}')}}]);
\ No newline at end of file
diff --git a/assets/js/main.0be49dd0.js b/assets/js/main.0be49dd0.js
deleted file mode 100644
index a4ef806..0000000
--- a/assets/js/main.0be49dd0.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see main.0be49dd0.js.LICENSE.txt */
-(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[792],{8328:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"01a85c17":[()=>Promise.all([n.e(869),n.e(209)]).then(n.bind(n,9158)),"@theme/BlogTagsListPage",9158],"045397af":[()=>n.e(406).then(n.bind(n,586)),"@site/docs/02-arsitektur/01-layering.md",586],17896441:[()=>Promise.all([n.e(869),n.e(538),n.e(401)]).then(n.bind(n,2447)),"@theme/DocItem",2447],"1f391b9e":[()=>Promise.all([n.e(869),n.e(538),n.e(61)]).then(n.bind(n,7973)),"@theme/MDXPage",7973],28760537:[()=>Promise.all([n.e(869),n.e(769)]).then(n.bind(n,8499)),"@site/docs/02-arsitektur/index.md",8499],"36994c47":[()=>n.e(858).then(n.t.bind(n,5516,19)),"@generated/docusaurus-plugin-content-blog/default/__plugin.json",5516],"393be207":[()=>n.e(134).then(n.bind(n,633)),"@site/src/pages/markdown-page.md",633],"3e71c51e":[()=>n.e(569).then(n.bind(n,7738)),"@site/docs/03-tutorial/04-migrations.md",7738],"5346779c":[()=>Promise.all([n.e(869),n.e(403)]).then(n.bind(n,912)),"@site/docs/03-tutorial/index.md",912],"5e95c892":[()=>n.e(647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"6875c492":[()=>Promise.all([n.e(869),n.e(538),n.e(242),n.e(813)]).then(n.bind(n,3069)),"@theme/BlogTagsPostsPage",3069],"785b363d":[()=>n.e(81).then(n.bind(n,7230)),"@site/docs/03-tutorial/01-domain.md",7230],"814f3328":[()=>n.e(472).then(n.t.bind(n,5513,19)),"~blog/default/blog-post-list-prop-default.json",5513],"84b2f205":[()=>n.e(938).then(n.bind(n,4290)),"@site/docs/03-tutorial/03-orm.md",4290],"9e4087bc":[()=>n.e(711).then(n.bind(n,9331)),"@theme/BlogArchivePage",9331],a0df4889:[()=>n.e(291).then(n.t.bind(n,3961,19)),"@generated/docusaurus-plugin-content-blog/default/p/doksli-blog-tags-hello-506.json",3961],a6aa9e1f:[()=>Promise.all([n.e(869),n.e(538),n.e(242),n.e(643)]).then(n.bind(n,5124)),"@theme/BlogListPage",5124],a7456010:[()=>n.e(235).then(n.t.bind(n,8552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",8552],a7bd4aaa:[()=>n.e(98).then(n.bind(n,4532)),"@theme/DocVersionRoot",4532],a8678e95:[()=>n.e(258).then(n.bind(n,874)),"@site/docs/03-tutorial/05-repository.md",874],a94703ab:[()=>Promise.all([n.e(869),n.e(48)]).then(n.bind(n,2559)),"@theme/DocRoot",2559],aba21aa0:[()=>n.e(742).then(n.t.bind(n,7093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],acecf23e:[()=>n.e(903).then(n.t.bind(n,1912,19)),"~blog/default/blogMetadata-default.json",1912],b05f25d0:[()=>n.e(807).then(n.bind(n,223)),"@site/blog/2024-07-20-hello-world.md",223],bbb724c6:[()=>n.e(151).then(n.bind(n,1236)),"@site/docs/03-tutorial/02-domain-testing.md",1236],c22f1788:[()=>n.e(164).then(n.t.bind(n,9342,19)),"@generated/docusaurus-plugin-content-blog/default/p/doksli-blog-b51.json",9342],c4f5d8e4:[()=>Promise.all([n.e(869),n.e(634)]).then(n.bind(n,6467)),"@site/src/pages/index.js",6467],ccc49370:[()=>Promise.all([n.e(869),n.e(538),n.e(242),n.e(249)]).then(n.bind(n,3858)),"@theme/BlogPostPage",3858],dc8eeda6:[()=>n.e(83).then(n.bind(n,6333)),"@site/docs/03-tutorial/06-bekerja.md",6333],e5ceffa1:[()=>n.e(623).then(n.t.bind(n,7837,19)),"@generated/docusaurus-plugin-content-blog/default/p/doksli-blog-archive-dbb.json",7837],f2e54508:[()=>n.e(896).then(n.t.bind(n,9170,19)),"@generated/docusaurus-plugin-content-docs/default/p/doksli-docs-5eb.json",9170],f6d7b54b:[()=>n.e(1).then(n.t.bind(n,2920,19)),"@generated/docusaurus-plugin-content-blog/default/p/doksli-blog-tags-f6f.json",2920],f82fb5cb:[()=>n.e(861).then(n.bind(n,9393)),"@site/blog/2024-07-20-hello-world.md?truncated=true",9393],fed7d42c:[()=>n.e(54).then(n.bind(n,8121)),"@site/docs/01-intro.md",8121]};var l=n(4848);function s(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return a()({loading:s,loader:()=>n.e(237).then(n.bind(n,2237)),modules:["@theme/NotFound"],webpack:()=>[2237],render(e,t){const n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,{...t})})}});const r=o[`${e}-${t}`],d={},f=[],p=[],g=(0,u.A)(r);return Object.entries(g).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))})),a().Map({loading:s,loader:d,modules:f,webpack:()=>p,render(t,n){const a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const o=r.default;if(!o)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{o[e]=r[e]}));let i=a;const l=n.split(".");l.slice(0,-1).forEach((e=>{i=i[e]})),i[l[l.length-1]]=o}));const o=a.__comp;delete a.__comp;const i=a.__context;delete a.__context;const s=a.__props;return delete a.__props,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(o,{...a,...s,...n})})}})}const f=[{path:"/doksli/blog",component:d("/doksli/blog","e17"),exact:!0},{path:"/doksli/blog/archive",component:d("/doksli/blog/archive","f37"),exact:!0},{path:"/doksli/blog/hello-world",component:d("/doksli/blog/hello-world","08f"),exact:!0},{path:"/doksli/blog/tags",component:d("/doksli/blog/tags","c28"),exact:!0},{path:"/doksli/blog/tags/hello",component:d("/doksli/blog/tags/hello","2c4"),exact:!0},{path:"/doksli/markdown-page",component:d("/doksli/markdown-page","6db"),exact:!0},{path:"/doksli/docs",component:d("/doksli/docs","e32"),routes:[{path:"/doksli/docs",component:d("/doksli/docs","c12"),routes:[{path:"/doksli/docs",component:d("/doksli/docs","c41"),routes:[{path:"/doksli/docs/arsitektur/",component:d("/doksli/docs/arsitektur/","da8"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/arsitektur/layering",component:d("/doksli/docs/arsitektur/layering","9a6"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/intro",component:d("/doksli/docs/intro","1a2"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/",component:d("/doksli/docs/tutorial/","33d"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/bekerja",component:d("/doksli/docs/tutorial/bekerja","e81"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/domain",component:d("/doksli/docs/tutorial/domain","440"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/domain-testing",component:d("/doksli/docs/tutorial/domain-testing","025"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/migrations",component:d("/doksli/docs/tutorial/migrations","0f3"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/orm",component:d("/doksli/docs/tutorial/orm","5d9"),exact:!0,sidebar:"tutorialSidebar"},{path:"/doksli/docs/tutorial/repository",component:d("/doksli/docs/tutorial/repository","9a4"),exact:!0,sidebar:"tutorialSidebar"}]}]}]},{path:"/doksli/",component:d("/doksli/","504"),exact:!0},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848);const o=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,a.jsx)(o.Provider,{value:n,children:t})}},8536:(e,t,n)=>{"use strict";var r=n(6540),a=n(5338),o=n(545),i=n(4625),l=n(4784),s=n(8193);const u=[n(119),n(2649),n(6294),n(1043)];var c=n(8328),d=n(6347),f=n(2831),p=n(4848);function g(e){let{children:t}=e;return(0,p.jsx)(p.Fragment,{children:t})}var m=n(5260),h=n(4586),y=n(6025),b=n(6342),v=n(1213),k=n(2131),w=n(4090),x=n(2967),S=n(440),E=n(1463);function _(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,h.A)(),r=(0,k.o)(),a=n[e].htmlLang,o=e=>e.replace("-","_");return(0,p.jsxs)(m.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,p.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:o(a)}),Object.values(n).filter((e=>a!==e.htmlLang)).map((e=>(0,p.jsx)("meta",{property:"og:locale:alternate",content:o(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function C(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,h.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,h.A)(),{pathname:r}=(0,d.zy)();return e+(0,S.applyTrailingSlash)((0,y.Ay)(r),{trailingSlash:n,baseUrl:t})}(),a=t?`${n}${t}`:r;return(0,p.jsxs)(m.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function A(){const{i18n:{currentLocale:e}}=(0,h.A)(),{metadata:t,image:n}=(0,b.p)();return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(m.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:w.w})]}),n&&(0,p.jsx)(v.be,{image:n}),(0,p.jsx)(C,{}),(0,p.jsx)(_,{}),(0,p.jsx)(E.A,{tag:x.Cy,locale:e}),(0,p.jsx)(m.A,{children:t.map(((e,t)=>(0,p.jsx)("meta",{...e},t)))})]})}const T=new Map;var P=n(6125),N=n(6988),O=n(205);function j(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rYour Docusaurus site did not load properly.
\nA very common reason is a wrong site baseUrl configuration.
\nCurrent configured baseUrl = ${e} ${"/"===e?" (default value)":""}
\nWe suggest trying baseUrl =
\nYour Docusaurus site did not load properly.
\nA very common reason is a wrong site baseUrl configuration.
\nCurrent configured baseUrl = ${e} ${"/"===e?" (default value)":""}
\nWe suggest trying baseUrl =
\n