arloopa/vuforia-php-sdk

This package is abandoned and no longer maintained. No replacement package was suggested.
There is no license information available for the latest version (0.7.2) of this package.

Unofficial PHP SDK for Vuforia

0.7.2 2017-02-20 14:03 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:34:41 UTC


README

Latest Stable Version Total Downloads Build Status StyleCI codecov.io PHP-Eye

An unofficial SDK for Vuforia.

use Vuforia\Vuforia;
use Vuforia\Models\Target;

// Here is the database access and secret keys. You can
// find them on Vuforia's database page
$access_key = '';
$secret_key = '';

Vuforia::config($access_key, $secret_key);

// To get all targets
$targets = Target::all();

// To get specified target
$target = Target::find('target_id');

// To get target duplicates
$target_duplicates = $target->getDuplicates();

// To get target info
var_dump($target->id);
var_dump($target->name);
var_dump($target->active_flag);
var_dump($target->tracking_rating);
var_dump($target->status);
var_dump($target->width);
var_dump($target->reco_rating);

// To get target summary
var_dump($target->summary->database_name);
var_dump($target->summary->target_name);
var_dump($target->summary->upload_date);
var_dump($target->summary->active_flag);
var_dump($target->summary->status);
var_dump($target->summary->tracking_rating);
var_dump($target->summary->total_recos);
var_dump($target->summary->current_month_recos);
var_dump($target->summary->previous_month_recos);

// To create a new target
Target::create('marker image path (local or remote)', 'name of target', $width, 'metadata', $is_active);

// To update an existing target
// Note that each method bellow makes an API call to Vuforia
$target->changeName('new target name');
$target->changeMarker('new marker image path');
$target->changeMetadata('new metadata');
$target->changeWidth($new_width);
$target->makeInactive();
$target->makeActive();
// or
$target->activate();

// To delete the target
$target->delete();

Installation

$ composer require arloopa/vuforia-php-sdk