Download the PHP package rbit/milk-sdk-php without Composer

On this page you can find all versions of the php package rbit/milk-sdk-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package milk-sdk-php

Milk SDK PHP

Actions Status GitHub license

Milk SDK PHP is a (fluent) open-source PHP library that makes it easy to integrate your PHP application with location services like:

Getting Started

Install the SDK

In your PHP project install package via composer:

Configuring XYZ HUB

With this SDK you can consume XYZ API. You have 2 options:

Configure SDK with your own instance of XYZ HUB

Running your own instance of XYZ HUB means that you already have your instance of https://github.com/heremaps/xyz-hub. A tutorial about how to setup XYZ Hub locally (on localhost): https://dev.to/robertobutti/restful-web-service-for-geospatial-data-12ii

Create a .env file. Fill it with:

Configure SDK with XYZ HUB Cloud service

Using XYZ HUB Cloud Service means that you are using this host https://xyz.api.here.com.

To use this service you need to sign in as developer on https://developer.here.com/ and create your plan (for exampole Feemium) and obtain your Access Token.

Once you have your access token, create a .env file. You can start from a sample file (.env.dist):

Then, you need to fill your XYZ_ACCESS_TOKEN in .env file with your access token.

Quick Examples

In order to use the Milk SDK, you need to:

Retrieve your XYZ Spaces

To get your XYZ Spaces:

To get XYZ Spaces by everybody (not only your own XYZ Spaces):

Delete Space

To delete a XYZ Space:

Create Space

To create a new XYZ Space:

Update Space

To update the XYZ Space with space id == \$spaceId:

Statistics

The get statistics from XYZ Space:

Features

Iterate features

Retrieve 1 Feature

You need to use feature() method with $featureId and $spaceId

Create or Edit 1 Feature

To create or edit a Feature you can use saveOne() method.

Create multiple features from a geojson file

If you have a Geojson File, you can upload it into a space.

Search features by property

To search features by properties you can use addSearchParams to add serach params, in the example below, you are searching features with name property equals "Colosseo".

Search features by proximity

To search feature close to latitude=41.890251 and longitude=12.492373 with a radius less than 1000 meters (close to Colosseum):

Weather API

To retrieve weather forecasts in Berlin:

Routing API (v7)

To retrive the fastest route by foot

Routing API (v8)

To retrive the fastest route by car

Useful reference

ReDoc API documentation: https://xyz.api.here.com/hub/static/redoc/

Open API documentation: https://xyz.api.here.com/hub/static/swagger/


All versions of milk-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0
guzzlehttp/guzzle Version ~6.0
jmikola/geojson Version ^1.0
vlucas/phpdotenv Version ^4.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package rbit/milk-sdk-php contains the following files

Loading the files please wait ....