Download the PHP package app-arena/php-sdk without Composer
On this page you can find all versions of the php package app-arena/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download app-arena/php-sdk
More information about app-arena/php-sdk
Files in app-arena/php-sdk
Package php-sdk
Short Description App-Arena.com App-Manager PHP SDK
License MIT
Homepage http://docs.app-arena.com
Informations about the package php-sdk
App-Arena.com php-sdk
Getting started
Use this SDK to setup the connection to your App-Arena™ Plattform Project.
Installation
Install the latest version of the SDK using composer.
Initialize the SDK within our index.php or similar
Now the connection is setup up and you can receive content from the App-Manager. The App-Manager SDK automatically detects if you want to display an app, template or version by the Query parameters your are sending with your request:
Query Parameter | Description | Example |
---|---|---|
appId | Returns all configs, translations and infos from the submitted app | http://www.domainofmyapp.com/?appId=1234 |
templateId | Returns all configs, translations and infos from the submitted template | http://www.domainofmyapp.com/?templateId=1234 |
versionId | Returns all configs, translations and infos from the submitted verion | http://www.domainofmyapp.com/?versionId=1234 |
If you specify multiple of these query parameters, then
versionId
is more important thantemplateId
is more important thanappId
.
Core concepts
- Cache: Activate on of the build in backend caches to speed up load time for your users
- CSS / LESS / SCSS: See how the PHP SDK makes it easy for you to compile files individual for each app
- SmartLink: Intelligent user redirection based on the users device and settings
Special GET parameters
Attach one of these parameters to the url to modify the PHP SDK behaviour
Parameter | Description | Values |
---|---|---|
cacheInvalidate | Clean certain caches within the app, before the page is loaded. See Cache section for more details. | |
device | Use this parameter to simulate a certain device type. When you attach ?device=tablet to your url, the getDeviceType() function of the PHP SDK will return tablet, to emulate this device type. |
'desktop', 'tablet', 'mobile' |
preview | Attaches a cache busting parameter (?v=TIMESTAMP) to all CSS files Urls (response of method getCssFiles($css_config) . This prevents the user to see a cached version of CSS files |
'true', 'false' |
Methods
Method | Description | Parameters | Response |
---|---|---|---|
addParams($params) | This will add parameters to the smartLink Url. These parameters will be available as GET-Parameters, when a user clicks on the smartLink. The parameters will be available as GET parameters as well in the facebook page tab or within an iframe | array $params Array of parameters which should be passed through |
|
cacheInvalidate($action = 'all') | Invalidate the cache of a submitted entity. See parameter settings in cache section | String $action Can be 'all', 'configs', 'infos', 'languages', 'translations', 'apps' or 'templates' |
|
getBaseUrl() | Returns the BaseUrl your Sharing Url is generated with. By default it will use the currently used domain | string | |
getBrowser() | Returns a browser object you can | array | |
getChannels() | Returns a list of channels the current app is installed on. If current entity is not an app, it will return an empty array. | array List of channels the current entity has been published on. | |
getCssFiles($css_config) | Returns CSS Helper object to compile and concatenate Less, CSS and Config-Type (CSS) values | array $css_config Array to define the compilation process (@see CSS Config. ) |
array List of compiled CSS file path’s |
getDevice() | Returns user device information | array | |
getDeviceType() | Returns the device type of the current device mobile, tablet, desktop | string | |
getEnvironment() | Returns if the app currently running on a website, facebook or direct website means the app is embedded via iframe to a website facebook means the app is embedded in a facebook page tab direct means the app is being accessed directly without iframe embed | string | |
getExpiryDate() | Returns a Datetime object, containing the date, the app license expires | DateTime | |
getFacebook() | Returns all available Facebook information, like currently used fanpage and canvas information. | ||
getLang() | Returns the currently used Language as Language Code (e.g. de_DE, en_US, ...) | string | |
getParams() | Returns all params submitted to the SmartLink before redirection | array | |
getOperatingSystem() | Returns the operating system of the current user | string | |
getStartDate() | Returns a Datetime object, containing the date, the app should be publicly accessible | DateTime | |
getUrl() | Returns the SmartLink Url for Sharing | string | |
getUrlLong() | Returns the SmartLink Url without Url Shortener | bool $shorten Shorten URL using smartl.ink |
string |
getUserLimit() | Returns the number of users exportable for an app | int | |
renderSharePage ($debug = false) | Renders the complete HTML of the Share page including all meta tags and redirection. | bool $debug - Show debug information on the page? |
string |
setBaseUrl($base_url) | Sets a new base url for your sharing links (->getUrl()). | string $base_url New base url |
void |
setFilename($filename) | Sets the filename for the SmartLink (default: smartlink.php) | string $filename |
void |
setLang($lang) | Sets a new language for the current instance | string $lang 5 char Language Code,e .g. de_DE |
|
setMeta($meta) | Sets the meta data for SmartLink Share page. All key value pairs will be generated as meta information into the head of the share page. The array keys title, desc, image are the most important. The array values can be Strings or config identifiers of the instance | array $meta (see description) |
array |
setParams($params) | This will reset all parameters of the smartLink Url. These parameters will be available as GET-Parameters, when a user clicks on the smartLink. The parameters will be available as GET parameters as well in the facebook page tab or within an iframe | array $params Array of parameters which should be passed through |
All versions of php-sdk with dependencies
ext-json Version *
ext-gd Version *
leafo/scssphp Version ^v0.8.4
mobiledetect/mobiledetectlib Version ^2.8.34
mustache/mustache Version v2.13.0
oyejorge/less.php Version ^1.7.0
php Version >=7.1
symfony/cache Version ^3.4.36
thadafinser/user-agent-parser Version ^v2.0.0
whichbrowser/parser Version ^2.0.37