3:I[5613,[],""] 4:I[1778,[],""] 5:I[2266,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","787","static/chunks/787-34619535dc4c8b8e.js","185","static/chunks/app/layout-09adbc10fe12bbc4.js"],"Providers"] 6:I[4676,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","787","static/chunks/787-34619535dc4c8b8e.js","185","static/chunks/app/layout-09adbc10fe12bbc4.js"],"Layout"] 7:I[5250,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","970","static/chunks/app/docs/di/page-9dcf8dd141eb92dd.js"],""] 0:["BUBEAAcODzJ5deDZjftgQ",[[["",{"children":["docs",{"children":["di",{"children":["__PAGE__",{}]}]}]},"$undefined","$undefined",true],["",{"children":["docs",{"children":["di",{"children":["__PAGE__",{},["$L1","$L2",null]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children","di","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children","docs","children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","styles":null}]]},[null,["$","html",null,{"lang":"en","className":"h-full antialiased __variable_aaf875 __variable_b436a8","suppressHydrationWarning":true,"children":["$","body",null,{"className":"flex min-h-full bg-white dark:bg-slate-900","children":["$","$L5",null,{"children":["$","$L6",null,{"children":["$","$L3",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","loadingScripts":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":["$","div",null,{"className":"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16","children":["$","div",null,{"className":"flex h-full flex-col items-center justify-center text-center","children":[["$","p",null,{"className":"font-display text-sm font-medium text-slate-900 dark:text-white","children":"404"}],["$","h1",null,{"className":"mt-3 font-display text-3xl tracking-tight text-slate-900 dark:text-white","children":"Page not found"}],["$","p",null,{"className":"mt-2 text-sm text-slate-500 dark:text-slate-400","children":"Sorry, we couldn’t find the page you’re looking for."}],["$","$L7",null,{"href":"/","className":"mt-8 text-sm font-medium text-slate-900 dark:text-white","children":"Go back home"}]]}]}],"notFoundStyles":[],"styles":null}]}]}]}]}],null]],[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/9467422f3158babf.css","precedence":"next","crossOrigin":""}]],"$L8"]]]] 9:I[4841,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","970","static/chunks/app/docs/di/page-9dcf8dd141eb92dd.js"],"DocsHeader"] a:I[659,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","970","static/chunks/app/docs/di/page-9dcf8dd141eb92dd.js"],"Fence"] b:I[5357,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","970","static/chunks/app/docs/di/page-9dcf8dd141eb92dd.js"],"PrevNextLinks"] c:I[3184,["250","static/chunks/250-e45a0a9f1f87fcb8.js","123","static/chunks/123-437e492929b8e5cd.js","970","static/chunks/app/docs/di/page-9dcf8dd141eb92dd.js"],"TableOfContents"] 2:[["$","div",null,{"className":"min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16","children":[["$","article",null,{"children":[["$","$L9",null,{"title":"Dependecy injection"}],["$","div",null,{"className":"prose prose-slate max-w-none dark:prose-invert dark:text-slate-400 prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 dark:prose-lead:text-slate-400 prose-a:font-semibold dark:prose-a:text-sky-400 prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] dark:[--tw-prose-background:theme(colors.slate.900)] dark:prose-a:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.sky.800))] dark:hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800","children":[["$","p",null,{"children":["Because of stateless nature of PHP there is no need to use anything else than singletons.",["$","br",null,{}],"Everything after request ends is destroyed.",["$","br",null,{}],"DI automatically register components"," ","from ",["$","strong",null,{"children":"src"}]," directory and key framework components like I18n, Di, IdentityUser."]}],["$","$La",null,{"language":"php","children":"#[Controller]\n#[Route(\"/admin/articles\")]\nreadonly class ArticleController\n{\n public function __construct(\n private Request $request,\n private ArticleStore $articleStore,\n private ArticleFinder $articleFinder,\n private ArticleService $articleService\n ) { }\n}\n"}],["$","h2",null,{"id":"build-in-components-registerd-by-di","children":"Build-in components registerd by DI"}],["$","$La",null,{"language":"php","children":"Request $request\nResponse $response\nAppConfiguration $configuration\nDi $dependencyInjector\nIdentityUser $identityUser\n\n\n"}],["$","p",null,{"children":["Components like ",["$","em",null,{"children":"database connection"}]," or ",["$","em",null,{"children":"settings"}]," can be registered manually in configuration section.",["$","br",null,{}],"More about that in next chapter."]}]]}]]}],["$","$Lb",null,{}]]}],["$","$Lc",null,{"tableOfContents":[{"level":2,"id":"build-in-components-registerd-by-di","title":"Build-in components registerd by DI","children":[]}]}]] 8:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Stormmore Guide - DI - Docs"}],["$","meta","3",{"name":"description","content":"Using dependecy injection in Stormmore application."}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"16x16"}],["$","meta","5",{"name":"next-size-adjust"}]] 1:null