-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkernel.html
31 lines (29 loc) · 8.67 KB
/
kernel.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Kernel details | Pinatra</title>
<meta name="description" content="A PHP verison of Sinatra: a DSL for quickly creating web applications in PHP with minimal effort.">
<link rel="preload" href="/assets/css/0.styles.73742341.css" as="style"><link rel="preload" href="/assets/js/app.35633900.js" as="script"><link rel="preload" href="/assets/js/8.3b2a41b2.js" as="script"><link rel="prefetch" href="/assets/js/4.dd1ee4a1.js"><link rel="prefetch" href="/assets/js/2.9834f0cc.js"><link rel="prefetch" href="/assets/js/3.2b86a6bc.js"><link rel="prefetch" href="/assets/js/5.ad87e3bc.js"><link rel="prefetch" href="/assets/js/6.7a49fda2.js"><link rel="prefetch" href="/assets/js/7.490e94d8.js"><link rel="prefetch" href="/assets/js/9.cfda04a6.js"><link rel="prefetch" href="/assets/js/10.20f55d86.js"><link rel="prefetch" href="/assets/js/11.fbd446e0.js"><link rel="prefetch" href="/assets/js/12.7418dee3.js"><link rel="prefetch" href="/assets/js/13.111e6ced.js"><link rel="prefetch" href="/assets/js/14.78258348.js"><link rel="prefetch" href="/assets/js/15.73297d5e.js"><link rel="prefetch" href="/assets/js/16.63b4556e.js"><link rel="prefetch" href="/assets/js/17.c9391c34.js"><link rel="prefetch" href="/assets/js/18.584449ed.js"><link rel="prefetch" href="/assets/js/19.c8dececa.js"><link rel="prefetch" href="/assets/js/vendors~docsearch.41d79f37.js">
<link rel="stylesheet" href="/assets/css/0.styles.73742341.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">Pinatra</span></a> <div class="links" style="max-width:nullpx;"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="https://github.com/Pinatra/Pinatra" target="_blank" rel="noopener noreferrer" class="nav-link external">
Source
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Languages</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/kernel.html" class="nav-link router-link-exact-active router-link-active">English</a></li><li class="dropdown-item"><!----> <a href="/zh/kernel.html" class="nav-link">简体中文</a></li></ul></div></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <div class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="https://github.com/Pinatra/Pinatra" target="_blank" rel="noopener noreferrer" class="nav-link external">
Source
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div><div class="nav-item"><div class="dropdown-wrapper"><a class="dropdown-title"><span class="title">Languages</span> <span class="arrow right"></span></a> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="/kernel.html" class="nav-link router-link-exact-active router-link-active">English</a></li><li class="dropdown-item"><!----> <a href="/zh/kernel.html" class="nav-link">简体中文</a></li></ul></div></div> <!----></nav> <ul class="sidebar-links"><li><div class="sidebar-group first"><p class="sidebar-heading open"><span>Guide</span> <!----></p> <ul class="sidebar-group-items"><li><a href="/" class="sidebar-link">Introduction</a></li><li><a href="/install.html" class="sidebar-link">Installation</a></li><li><a href="/routing.html" class="sidebar-link">Routing</a></li><li><a href="/controller.html" class="sidebar-link">Controller</a></li><li><a href="/view.html" class="sidebar-link">Views</a></li><li><a href="/model.html" class="sidebar-link">Model</a></li><li><a href="/kernel.html" class="active sidebar-link">Kernel details</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/kernel.html#request-processing-flow" class="sidebar-link">Request processing flow</a></li><li class="sidebar-sub-header"><a href="/kernel.html#key-point" class="sidebar-link">key point</a></li><li class="sidebar-sub-header"><a href="/kernel.html#todo" class="sidebar-link">// Todo</a></li><li class="sidebar-sub-header"><a href="/kernel.html#help-pinatra-being-better" class="sidebar-link">Help Pinatra being better</a></li></ul></li><li><a href="/benchmark.html" class="sidebar-link">Benchmark</a></li></ul></div></li></ul> </div> <div class="page"> <div class="content"><h1 id="kernel-details"><a href="#kernel-details" aria-hidden="true" class="header-anchor">#</a> Kernel details</h1> <p>Standing on Composer's shoulder, the 0.0.2 version of Pinatra has only 5 PHP files.</p> <p><img src="/assets/img/7.7a4cfca2.jpg" alt="6 files"></p> <h2 id="request-processing-flow"><a href="#request-processing-flow" aria-hidden="true" class="header-anchor">#</a> Request processing flow</h2> <p><img src="/assets/img/8.6d5d28d3.jpg" alt="Pinatra processing flow"></p> <h2 id="key-point"><a href="#key-point" aria-hidden="true" class="header-anchor">#</a> key point</h2> <ul><li>Use <code>register_shutdown_function('dispatch')</code> to implement hands-off</li> <li>The core of the framework is routing, routing code must be tempered (don't worry, they have been tested with 100% coverage)</li> <li>Without the introduction of the template engine, the implementation of View is also very simple</li> <li>Thanks to Laravel for providing an extremely powerful ORM</li> <li>Composer and the open source community give Pinatra endless possibilities, and Pinatra only needs to do as little as possible to invade user intent.</li></ul> <h2 id="todo"><a href="#todo" aria-hidden="true" class="header-anchor">#</a> // Todo</h2> <p>The 0.0.2 version of Pinatra has a lot of deficiencies. The following is a list of features that have been planned for development. Please let me know what features you want to add.</p> <p>Log function
2. debug switch
3. Unify the error page (eg 404, 500)</p> <h2 id="help-pinatra-being-better"><a href="#help-pinatra-being-better" aria-hidden="true" class="header-anchor">#</a> Help Pinatra being better</h2> <p>Welcome to Pinatra for an issue: <a href="https://github.com/Pinatra/Pinatra/issues/new" target="_blank" rel="noopener noreferrer">https://github.com/Pinatra/Pinatra/issues/new<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></p></div> <div class="page-edit"><!----> <div class="last-updated"><span class="prefix">Last Updated: </span> <span class="time">9/20/2018, 4:32:21 PM</span></div></div> <div class="page-nav"><p class="inner"><span class="prev">
←
<a href="/model.html" class="prev">
Model
</a></span> <span class="next"><a href="/benchmark.html">
Benchmark
</a>
→
</span></p></div> </div> <!----></div></div>
<script src="/assets/js/8.3b2a41b2.js" defer></script><script src="/assets/js/app.35633900.js" defer></script>
</body>
</html>