PHPackages                             app-arena/php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. app-arena/php-sdk

ActiveLibrary[API Development](/categories/api)

app-arena/php-sdk
=================

App-Arena.com App-Manager PHP SDK

2.3.11(6y ago)13.1k3MITPHPPHP &gt;=7.1CI failing

Since Jun 30Pushed 6y ago7 watchersCompare

[ Source](https://github.com/apparena/php-sdk)[ Packagist](https://packagist.org/packages/app-arena/php-sdk)[ Docs](http://docs.app-arena.com)[ RSS](/packages/app-arena-php-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (61)Used By (0)

App-Arena.com php-sdk
=====================

[](#app-arenacom-php-sdk)

Getting started
---------------

[](#getting-started)

Use this SDK to setup the connection to your [App-Arena™ Plattform Project](https://my.app-arena.com/projects).

Installation
------------

[](#installation)

Install the latest version of the SDK using [composer](https://getcomposer.org/).

```
composer require app-arena/php-sdk
```

Initialize the SDK within our index.php or similar

```
// 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();
```

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 ParameterDescriptionExampleappIdReturns all configs, translations and infos from the submitted app`http://www.domainofmyapp.com/?appId=1234`templateIdReturns all configs, translations and infos from the submitted template`http://www.domainofmyapp.com/?templateId=1234`versionIdReturns 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 than `templateId` is more important than `appId`.

Core concepts
-------------

[](#core-concepts)

- [Cache](docs/cache.md): Activate on of the build in backend caches to speed up load time for your users
- [CSS / LESS / SCSS](docs/css.md): See how the PHP SDK makes it easy for you to compile files individual for each app
- [SmartLink](docs/smartlink.md): Intelligent user redirection based on the users device and settings

Special GET parameters
----------------------

[](#special-get-parameters)

Attach one of these parameters to the url to modify the PHP SDK behaviour

ParameterDescriptionValuescacheInvalidateClean certain caches within the app, before the page is loaded. See [Cache section](docs/cache.md) for more details.deviceUse 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'previewAttaches 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
-------

[](#methods)

MethodDescriptionParametersResponseaddParams($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 throughcacheInvalidate($action = 'all')Invalidate the cache of a submitted entity. See parameter settings in [cache section](docs/cache.md)`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 domainstringgetBrowser()Returns a browser object you canarraygetChannels()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’sgetDevice()Returns user device informationarraygetDeviceType()Returns the device type of the current device mobile, tablet, desktopstringgetEnvironment()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 embedstringgetExpiryDate()Returns a Datetime object, containing the date, the app license expiresDateTimegetFacebook()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, ...)stringgetParams()Returns all params submitted to the SmartLink before redirectionarraygetOperatingSystem()Returns the operating system of the current userstringgetStartDate()Returns a Datetime object, containing the date, the app should be publicly accessibleDateTimegetUrl()Returns the SmartLink Url for SharingstringgetUrlLong()Returns the SmartLink Url without Url Shortener`bool` $shorten Shorten URL using smartl.inkstringgetUserLimit()Returns the number of users exportable for an appintrenderSharePage ($debug = false)Renders the complete HTML of the Share page including all meta tags and redirection.`bool` $debug - Show debug information on the page?stringsetBaseUrl($base\_url)Sets a new base url for your sharing links (-&gt;getUrl()).`string` $base\_url New base urlvoidsetFilename($filename)Sets the filename for the SmartLink (default: smartlink.php)`string` $filenamevoidsetLang($lang)Sets a new language for the current instance`string` $lang 5 char Language Code,e .g. de\_DEsetMeta($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)arraysetParams($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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~29 days

Recently: every ~124 days

Total

59

Last Release

2245d ago

Major Versions

1.2.17 → 2.0.02016-06-27

1.1.54 → 2.1.42016-12-21

PHP version history (3 changes)1.1.10PHP &gt;=5.3.2

2.2.1PHP &gt;=5.6

2.3.2PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6ea5faba3708161643afca786db2be1e96eb48f663a7719c793c9d7a6f65fd3?d=identicon)[sbuckpesch](/maintainers/sbuckpesch)

---

Top Contributors

[![cbc-ott-dev](https://avatars.githubusercontent.com/u/74541036?v=4)](https://github.com/cbc-ott-dev "cbc-ott-dev (1 commits)")[![dariusbepunkt](https://avatars.githubusercontent.com/u/4473944?v=4)](https://github.com/dariusbepunkt "dariusbepunkt (1 commits)")[![vklein](https://avatars.githubusercontent.com/u/756939?v=4)](https://github.com/vklein "vklein (1 commits)")

---

Tags

app-arenaapp-managerphp-sdkphpapisdkapp-arenaapp-manager

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/app-arena-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/app-arena-php-sdk/health.svg)](https://phpackages.com/packages/app-arena-php-sdk)
```

###  Alternatives

[pgrimaud/instagram-user-feed

This is a scraper to easily fetch any feed and interact with Instagram (like, follow, etc.) without OAuth for PHP.

940657.1k5](/packages/pgrimaud-instagram-user-feed)[jstolpe/instagram-graph-api-php-sdk

Instagram Graph API PHP SDK

13998.4k2](/packages/jstolpe-instagram-graph-api-php-sdk)[clever/clever-php

231.6k](/packages/clever-clever-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
