Keen.io php客户端(未找到类)

I have installed composer on Linux ,So i have edited composer.json as this :

{
    "name": "keen-io/keen-io",
    "description": "A PHP library for reporting events to the Keen IO API",
    "type": "library",
    "license": "MIT",
    "keywords": [
        "keen io",
        "analytics"
    ],
    "support": {
        "chat": "https://www.hipchat.com/gIdidQscL"
    },
    "require": {
        "php":           ">=5.3.3",
        "ext-mcrypt":    "*",
        "guzzle/guzzle": "~3.7"
    },
    "require-dev": {
        "phpunit/phpunit": "~3.7.0"
    },
    "homepage": "http://keen.io",
    "autoload": {
        "psr-4": {
            "KeenIO\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "KeenIO\\Tests\\": "tests/Tests"
        }
    },
    "authors": [
        {
            "name": "Tom Anderson",
            "email": "tom.h.anderson@gmail.com"
        },
        {
            "name": "Keith Kirk",
            "email": "keith@kmfk.io",
            "homepage": "http://kmfk.io"
        },
        {
            "name": "Michaël Gallego",
            "email": "mic.gallego@gmail.com",
            "homepage": "http://michaelgallego.fr"
        }
    ]
}

Then i have type this command $ composer update to update composer.json and generate ./vendor/autoload.php . and the purpose of this JSON is to connect to keen.io to use PHP client .

Then i coded this php script :

<?php


    require_once __DIR__ . '/vendor/autoload.php';
​
    use KeenIO\Client\KeenIOClient;


$client = KeenIOClient::factory([
    'projectId' => $projectId,
    'writeKey'  => $writeKey,
    'readKey'   => $readKey
]);
​
?>

But when i run the script the error is :

Fatal error: Class 'KeenIO\Client\KeenIOClient' not found in /opt/bitnami/apache2/htdocs/sandbox/keen.io/test-keen.php on line 9

--------------------------------------------------------------------------- ** scirpt.php:**

<?php

    //* Composer Directory : /htdocs/sandbox/project/KeenClient-PHP/

    //* Current Directory : ~/htdocs/sandbox/project/KeenClient-     PHP/script.php

    //* File_name : script.php

    require_once __DIR__ .'/vendor/autoload.php';

    use KeenIO\Client\KeenIOClient;


    $client = KeenIOClient::factory([
    'projectId' => "Project_ID",
    'writeKey'  => "Write_Key",
    'readKey'   => "Read_Key"
]);


?>

Your composer.json file's project is incorrect. This one is from Keen Library. You need something like this:

{
    "require": {
        "keen-io/keen-io": "~2.5"
    }
}

Then execute php composer.phar update and include your's vendor/autoload.php file.

------------------------- EDIT -------------------------

enter image description here

It works. If you copy your script.php to any folder, you must change require_once path, and also it will work for you (I've run it).