Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

kreait/personio-php

Repository files navigation

Personio PHP SDK

A PHP SDK to work with the Personio API.

This package is no longer maintained. Use https://github.com/jeromegamez/personio-php instead.

Current version Supported PHP version Build Status GitHub license

Installation

composer require kreait/personio

Usage

use Kreait\Personio;

try {
    $app = Personio::initializeApp([
        'client_id' => getenv('PERSONIO_CLIENT_ID'),
        'client_secret' => getenv('PERSONIO_CLIENT_SECRET'),
        'debug' => false, // default
    ]);

    $employees = $app->getEmployees(); 
    $employee = $app->getEmployee($id);
    
    $timeOffs = $app->getTimeOffPeriods();
    $timeOff = $app->getTimeOffPeriod($id);
    
    
} catch (Personio\Error $e) {
    echo $e->getMessage();
}