GithubHelp home page GithubHelp logo

sofregaz / lyapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrxiaozhuox/lyapi

0.0 0.0 0.0 1.44 MB

A lightweight PHP API development framework

Home Page: http://lyapi.org

License: MIT License

PHP 97.74% HTML 2.26%

lyapi's Introduction

LyAPI FrameWork

Travis Travis Travis

LyAPI是一款轻量级的PHP 接口开发框架,可快速开发出易维护、高性能的API接口。内置缓存、日志、数据库操作、国际化等功能。

支持功能

  • 数据格式:通过配置文件修改数据格式。
  • 国际化操作:返回不同语言的数据。
  • 文件缓存:内置文件缓存功能。
  • 其他缓存:内置PRedis封装,方便使用Redis。
  • 日志记录:简单的日志记录功能。
  • 数据库操作:使用第三方库 Medoo、NotORM。
  • 注册树:将对象存入注册树,并在任何地方取出。
  • 自定义配置:可创建自定义配置,方便程序调用。
  • CURL:封装CURL操作,方便请求数据。
  • 内部启动:在程序中直接调用接口函数获取数据。
  • Cookie:对Cookie进行简单封装。
  • 视图渲染:支持渲染HTML页面。
  • 插件管理:可安装插件,使用插件完成快速开发。
  • 脚本系统:使用方便的脚本开发接口(开发中)。
  • 可视化管理:使用可视化管理工具操作框架(开发中)。
  • 框架项目持续更新中...

安装方法

使用Composer构建LyApi项目:

$ composer create-project mrxzx/lyapi

使用宝塔面板一键部署LyApi项目:

详细教程: http://blog.wwsg18.com/index.php/archives/48/

简单Demo

// ./app/api/Demo.php
<?php

namespace APP\api;

use LyApi\core\API;

class Demo extends API{
    public function User(){
        return array(
            'username' => 'mr小卓X',
            'password' => '12345678'
        );
    }
}

运行结果:

{
    "code":"200",
    "data":{
        "username":"mr小卓X",
        "password":"12345678"
    },
    "msg":""
}

图片演示

avatar avatar

在线体验

不想下载?你可以使用在线体验功能!

在线文档

想深入了解LyAPI?快来看看在线文档吧!

最近更新

  • 框架更新请前往version.txt查看更新

插件拓展

LyAPI将会不断的更新插件拓展:

  • LyView 内置模板引擎的页面渲染系统
  • LyDocs 根据注释自动生成接口文档
  • PConfig 插件配置文件系统
  • VisitRecord 接口访问数量统计
  • 更多插件请前往论坛查看

插件安装

下载地址推荐:

插件使用

所有插件都在命名空间: plugin 下的 PS: 快速引入函数:DI::PluginDyn(插件名,获取类,参数...);

参与贡献

  1. Fork代码到你的仓库
  2. 增加功能并自行测试
  3. 发起Pull Requests
  4. 等待管理员审查

开源协议

LyAPI使用MIT协议,更多信息请查看MIT协议官网

联系作者

作者: mr小卓X

Q Q: 3507952990

交流群: 769094015 (加群提问)

个人博客: http://blog.wwsg18.com

Gitee: https://gitee.com/mrxzx/LyApi

GitHub: https://github.com/xiaozhuox/LyApi

PS: 任何问题直接联系我就行,我会第一时间解决问题。

已知问题

问题1:Composer创建的项目报错:

解决方法:删除vendor文件夹,重新install即可

问题2:FileCahce和Log无法正常使用:

解决方法:在根目录新建data文件夹,里面再建cahce和log文件夹

如发现更多问题请 发布Issue 或 加群反馈

lyapi's People

Contributors

mrxiaozhuox avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.