Small php framework

Project source address

Link address( https://github.com/cxp1539/mi...

Framework

Simple php framework

Framework features

  1. Single entry index.php
  2. Based on the MVC design idea and object-oriented idea, we use the pattern of observer, register, factory, agent, trait and so on.
  3. Use the namespace namespace.
  4. autoLoader automatically loads classes.
  5. debug, profiler (Performance Analyzer).
  6. Provide some common classes (picture, paging, file upload, verification code, etc.).
  7. Provide plugins commonly used by grunt (file compression, merge, observation, etc.).
  8. Access the configuration file through array subscript based on ArrayAccess.
  9. obcache cache.

Project directory structure

classes         Public class file storage
    --image.class.php           Picture operation class
    --logobserver.class.php     Observer log Implementation class
    --page.class.php            Paging class
    --upload.class.php          File upload class
    --vcode.class.php           Verification code class
conf            configuration file
    --database.php              Database configuration
    --memcache.php              memcached To configure
controls        Controller
intef           Basic interface or abstract class
    --db.class.php              Database interface specification
    --observer.class.php        Abnormal observer interface specification
libs            Default load library file
    --action.class.php          Call controller and method classes
    --autoloader.class.php      Autoload class
    --config.class.php          Read profile class
    --controller.class.php      Controller base class
    --debug.class.php           debug Debug class
    --factory.class.php         Factory class
    --globalf.class.php         Global function class
    --memcached.class.php       memcached Implementation class
    --mysqli.class.php          mysqli Implementation class
    --obcache.class.php         obcache Cache class
    --obexception.class.php     Custom exception handling class
    --profiler.class.php        Performance analysis
    --proxy.class.php           proxy class
    --register.class.php        Register class
    --singleton.class.php       Single case trait
    --url.class.php             url Request processing class    
node_modules    node Plug-in unit
    grunt-contrib-concat        grunt File merge plug in
    grunt-contrib-uglify        grunt File compression plug in
    grunt-contrib-watch         grunt File observation plug-in     
    grunt                       grunt Plug-in unit
statics         Static resource directory
    js                          js
    release_js                  grunt Processed js
    css                         css
    images                      images
    uploads                     Picture upload directory
vies            Template catalog
Gruntfile.js    grunt configuration file
README.md       README.md
common.inc.php  Core document
    1.Defining character sets
    2.Set time zone
    3.open session
    4.Define home and static resource directory constants
    5.autoLoader
    6.url Get call controller and method
    7.debugļ¼ŒProfiler open(Performance analyzer)
    8.Initialize the received controller and method processing action request(Reflection mechanism)
    9.debugļ¼ŒProfiler Interface, output debug information,execution time,Use memory, etc.
index.php       Main entrance
package.json    package.json

Tags: PHP Database JSON github

Posted on Mon, 02 Dec 2019 14:46:09 -0500 by madrazel