app-arena / php-sdk
App-Arena.com App-Manager PHP SDK
2.3.11
2020-03-25 15:39 UTC
Requires
- php: >=7.1
- ext-curl: *
- ext-gd: *
- ext-json: *
- leafo/scssphp: ^v0.8.4
- mobiledetect/mobiledetectlib: ^2.8.34
- mustache/mustache: v2.13.0
- oyejorge/less.php: ^1.7.0
- symfony/cache: ^3.4.36
- thadafinser/user-agent-parser: ^v2.0.0
- whichbrowser/parser: ^2.0.37
Requires (Dev)
- codeception/codeception: ^2.2
- dev-master
- 2.3.11
- 2.3.10
- 2.3.9
- 2.3.8
- 2.3.7
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.2.20
- 2.2.19
- 2.2.18
- 2.2.17
- 2.2.16
- 2.2.15
- 2.2.14
- 2.2.13
- 2.2.12
- 2.2.11
- 2.2.10
- 2.2.9
- 2.2.8
- 2.2.7
- 2.2.6
- 2.2.5
- 2.2.4
- 2.2.2
- 2.2.1
- 2.1.10
- 2.1.9
- 2.1.8.1
- 2.1.8
- 2.1.7
- 2.1.6
- 2.1.5
- 2.1.4
- 2.1.2
- 2.0.x-dev
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.2.17
- 1.2.16
- 1.2.15
- 1.2.14
- 1.2.13
- 1.2.12
- 1.1.x-dev
- 1.1.54
- 1.1.53
- 1.1.52
- 1.1.51
- 1.1.50
- 1.1.49
- 1.1.10
- 1.0.x-dev
- dev-develop
This package is auto-updated.
Last update: 2024-09-26 01:20:23 UTC
README
入门指南
使用此 SDK 设置与您的 App-Arena™ 平台项目 的连接。
安装
使用 composer 安装 SDK 的最新版本。
composer require app-arena/php-sdk
在 index.php 或类似的文件中初始化 SDK
// In your index.php require __DIR__ . '/vendor/autoload.php'; // Add App-Arena App-Manager $am = new \AppArena\AppManager([ 'appId' => 1234, // (optional) If you know the appId, then submit it here. Else the SDK will try to get it form GET, POST, REQUEST parameters or facebook settings 'versionId' => 123, // Add the required version ID of your project version here 'root_path' => __DIR__ . '/public', // Root path accessible from the web 'cache' => [ 'dir' => __DIR__ . '/public/var/cache', // Writable folder for file cache. Check the cache section for more options ], 'apikey' => 'ABCDEFGHIJKLMNOPQRSTUVW' // Add you API key here ]); // Get config values, languages, translations and infos from the current app, template or version $configs = $am->getConfigs(); $infos = $am->getInfos(); $languages = $am->getLanguages(); $translations = $am->getTranslations();
现在连接已设置,您可以从 App-Manager 接收内容。App-Manager SDK 会自动检测您是否想通过请求中发送的查询参数显示应用程序、模板或版本
如果您指定了多个这些查询参数,则
versionId
比templateId
更重要,而templateId
又比appId
重要。
核心概念
- 缓存:激活内置的后端缓存之一,以加快用户的加载时间
- CSS / LESS / SCSS:了解 PHP SDK 如何让您轻松地为每个应用程序编译文件
- 智能链接:基于用户设备和设置的智能用户重定向
特殊 GET 参数
将其中一个参数附加到 URL 以修改 PHP SDK 的行为