2017 © Pedro Peláez
 

library xdo

A fast,light Data Object for PHP

image

xtlsoft/xdo

A fast,light Data Object for PHP

  • Tuesday, November 7, 2017
  • by xtlsoft
  • Repository
  • 2 Watchers
  • 1 Stars
  • 157 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 39 % Grown

The README.md

XDO - PHP Data Object

Notice: This Project is no longer supported. Please see https://github.com/xtlsoft/NonDB

Latest Stable Version Total Downloads License Need PHP Version Build Status, (*1)

XDO is a PHP Data Object includes Database, Cache and Upload.
XDO 是一个 PHP 数据类,它包括了 数据库,缓存和上传。, (*2)

Author 作者

The Author of XDO is Tianle Xu(xtl@xtlsoft.top).
XDO 的作者是徐天乐(xtl@xtlsoft.top)。, (*3)

Dependency 依赖项

We only need PHP! (PHP>=5.4) This is a portable software!
我们只需要PHP! (PHP>=5.4) 这是一个绿色软件!, (*4)

Install 安装

1. Common
  1. Install PHP.
  2. Clone this project.
  3. Move the XDO-master directory into vendor/XDO
  4. add one line code to your PHP Script:
require_once("vendor/XDO/Autoload.php");
  1. Enjoy!
2. One-Key Script

Note: Please install wget first.
If you want to use this way to install XDO, please add a PATH env for PHP first., (*5)

  1. Run the script
wget http://raw.githubusercontents.com/xtlsoft/XDO/files/XDO-install.php -O XDO-install.php && php ./XDO-install.php
  1. add one line code to your PHP Script:
require_once("vendor/XDO/Autoload.php");
  1. Enjoy!
3. Use composer
composer require xtlsoft/xdo:dev-master

1. 通用
  1. 安装PHP。
  2. Clone 这个项目。
  3. XDO-master文件夹移动到vendor下并重命名为XDO
  4. 向你的程序添加一行:
require_once("vendor/XDO/Autoload.php");
  1. Enjoy!
2. 一键脚本

Note: 请先安装 wget
请先为PHP设置环境变量。, (*6)

  1. 运行脚本
wget http://raw.githubusercontents.com/xtlsoft/XDO/files/XDO-install.php -O XDO-install.php && php ./XDO-install.php
  1. 向你的程序添加一行:
require_once("vendor/XDO/Autoload.php");
  1. Enjoy!
3. Use composer
composer require xtlsoft/xdo:dev-master

Usage 使用

  • Install XDO.
  • Include XDO class:
use XDO\XDO;
  • Set a Data dir:
XDO::setDir("path/to/data");

Please clone the Data branch into your project. Replace the path/to/data string into the path to the Data branch you cloned. It includes some sample Data., (*7)

  • Create a Database object:
$db = XDO::Database("Test"); //"Test" is the ModelName. We include a Test Model in the `Data` branch.
  • Do some tests:
$db->get("Config"); //Get the Data from Config table.
$db->get("Config.#1"); //Get the Data from #1 of Config Table
$db->get("Config.where[name=xtlsoft%]"); //Get the Data which its name match "\^xtlsoft[\s\S]*$\" in Config table.
  • More: put,ins,del ::: Read our document

  • 安装 XDO.
  • 引入 XDO 类:
use XDO\XDO;
  • 设置一个 Data 目录:
XDO::setDir("path/to/data");

请 clone Data 分支。 把 path/to/data 替换成你 clone 的 Data 分支. 它包括一些测试数据。, (*8)

  • 创建一个 Database 实例:
$db = XDO::Database("Test"); //"Test" is the ModelName. We include a Test Model in the `Data` branch.
  • 做一些测试:
$db->get("Config"); //Get the Data from Config table.
$db->get("Config.#1"); //Get the Data from #1 of Config Table
$db->get("Config.where[name=xtlsoft%]"); //Get the Data which its name match "\^xtlsoft[\s\S]*$\" in Config table.
  • 更多方法: put,ins,del ::: 阅读我们的 文档

The Versions

07/11 2017

dev-master

9999999-dev https://github.com/xtlsoft/XDO

A fast,light Data Object for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

database cache upload data

08/08 2017

v0.1.3-stable

0.1.3.0 https://github.com/xtlsoft/XDO

A fast,light Data Object for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

database cache upload data

07/08 2017

v0.1.2-stable

0.1.2.0 https://github.com/xtlsoft/XDO

A fast,light Data Object for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

database cache upload data

14/05 2017

v0.1.0-stable

0.1.0.0 https://github.com/xtlsoft/XDO

A fast,light Data Object for PHP

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

database cache upload data