{"id":18320686,"url":"https://github.com/xtlsoft/xdo","last_synced_at":"2025-04-05T22:32:00.047Z","repository":{"id":57085101,"uuid":"91156050","full_name":"xtlsoft/XDO","owner":"xtlsoft","description":"[DEPRECATED] XDO is a fast,light PHP Data Object. Includes DB,Cache,Upload.","archived":false,"fork":false,"pushed_at":"2017-11-07T08:51:50.000Z","size":17,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T13:12:46.585Z","etag":null,"topics":["cache","data","database","php","upload","web"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtlsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-13T07:03:05.000Z","updated_at":"2019-07-21T13:04:47.000Z","dependencies_parsed_at":"2022-08-25T00:50:16.542Z","dependency_job_id":null,"html_url":"https://github.com/xtlsoft/XDO","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2FXDO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2FXDO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2FXDO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtlsoft%2FXDO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtlsoft","download_url":"https://codeload.github.com/xtlsoft/XDO/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411238,"owners_count":20934650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","data","database","php","upload","web"],"created_at":"2024-11-05T18:17:13.160Z","updated_at":"2025-04-05T22:31:59.784Z","avatar_url":"https://github.com/xtlsoft.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XDO - PHP Data Object\n\n## Notice: This Project is no longer supported. Please see https://github.com/xtlsoft/NonDB\n\n[![Latest Stable Version](https://poser.pugx.org/xtlsoft/xdo/v/stable)](https://packagist.org/packages/xtlsoft/xdo)\n[![Total Downloads](https://poser.pugx.org/xtlsoft/xdo/downloads)](https://packagist.org/packages/xtlsoft/xdo)\n[![License](https://poser.pugx.org/xtlsoft/xdo/license)](https://packagist.org/packages/xtlsoft/xdo)\n[![Need PHP Version](https://img.shields.io/badge/PHP-5.4+-blue.svg)](https://php.net/)\n[![Build Status](https://travis-ci.org/xtlsoft/XDO.svg?branch=master)](https://travis-ci.org/xtlsoft/XDO)\n\n\n\u003e XDO is a PHP Data Object includes Database, Cache and Upload.\u003cbr\u003e\n\u003e XDO 是一个 PHP 数据类，它包括了 数据库，缓存和上传。\n\n### Author 作者\nThe Author of XDO is Tianle Xu([xtl@xtlsoft.top](mailto:xtl@xtlsoft.top)).\u003cbr\u003e\nXDO 的作者是徐天乐([xtl@xtlsoft.top](mailto:xtl@xtlsoft.top))。\n\n### Dependency 依赖项\nWe only need PHP! (PHP\u003e=5.4) This is a portable software!\u003cbr\u003e\n我们只需要PHP! (PHP\u003e=5.4) 这是一个绿色软件！\n\n### Install 安装\n###### 1. Common\n1. Install PHP.\n2. Clone this project.\n3. Move the `XDO-master` directory into `vendor/XDO`\n4. add one line code to your PHP Script:\n```\nrequire_once(\"vendor/XDO/Autoload.php\");\n```\n5. Enjoy!\n###### 2. One-Key Script\n\u003e Note: Please install `wget` first. \u003cbr\u003e \n\u003e If you want to use this way to install XDO, please add a `PATH` env for PHP first.\n\n1. Run the script\n```\nwget http://raw.githubusercontents.com/xtlsoft/XDO/files/XDO-install.php -O XDO-install.php \u0026\u0026 php ./XDO-install.php\n```\n2. add one line code to your PHP Script:\n```\nrequire_once(\"vendor/XDO/Autoload.php\");\n```\n3. Enjoy!\n###### 3. Use composer\n```\ncomposer require xtlsoft/xdo:dev-master\n```\n\n-------------------------\n###### 1. 通用\n1. 安装PHP。\n2. Clone 这个项目。\n3. 把`XDO-master`文件夹移动到`vendor`下并重命名为`XDO`\n4. 向你的程序添加一行:\n```\nrequire_once(\"vendor/XDO/Autoload.php\");\n```\n5. Enjoy!\n###### 2. 一键脚本\n\u003e Note: 请先安装 `wget` 。 \u003cbr\u003e \n\u003e 请先为PHP设置环境变量。\n\n1. 运行脚本\n```\nwget http://raw.githubusercontents.com/xtlsoft/XDO/files/XDO-install.php -O XDO-install.php \u0026\u0026 php ./XDO-install.php\n```\n2. 向你的程序添加一行:\n```\nrequire_once(\"vendor/XDO/Autoload.php\");\n```\n3. Enjoy!\n###### 3. Use composer\n```\ncomposer require xtlsoft/xdo:dev-master\n```\n\n### Usage 使用\n- Install XDO.\n- Include XDO class: \n```\nuse XDO\\XDO;\n```\n- Set a Data dir:\n```\nXDO::setDir(\"path/to/data\");\n```\n\u003e 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.\n\n- Create a Database object:\n```\n$db = XDO::Database(\"Test\"); //\"Test\" is the ModelName. We include a Test Model in the `Data` branch.\n``` \n- Do some tests:\n```\n$db-\u003eget(\"Config\"); //Get the Data from Config table.\n$db-\u003eget(\"Config.#1\"); //Get the Data from #1 of Config Table\n$db-\u003eget(\"Config.where[name=xtlsoft%]\"); //Get the Data which its name match \"\\^xtlsoft[\\s\\S]*$\\\" in Config table.\n```\n- More: put,ins,del ::: Read our [document](https://xdo.1im.pw/docs/en)\n\n-----\n- 安装 XDO.\n- 引入 XDO 类: \n```\nuse XDO\\XDO;\n```\n- 设置一个 Data 目录:\n```\nXDO::setDir(\"path/to/data\");\n```\n\u003e 请 clone `Data` 分支。 把 `path/to/data` 替换成你 clone 的 `Data` 分支.  它包括一些测试数据。\n\n- 创建一个 Database 实例:\n```\n$db = XDO::Database(\"Test\"); //\"Test\" is the ModelName. We include a Test Model in the `Data` branch.\n``` \n- 做一些测试:\n```\n$db-\u003eget(\"Config\"); //Get the Data from Config table.\n$db-\u003eget(\"Config.#1\"); //Get the Data from #1 of Config Table\n$db-\u003eget(\"Config.where[name=xtlsoft%]\"); //Get the Data which its name match \"\\^xtlsoft[\\s\\S]*$\\\" in Config table.\n```\n- 更多方法: put,ins,del ::: 阅读我们的 [文档](https://xdo.1im.pw/docs/zh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtlsoft%2Fxdo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtlsoft%2Fxdo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtlsoft%2Fxdo/lists"}