Developed with love by KnpLabs Hire us for your project!
35

KeenClient-PHP-SF2

by keenlabs

A Symfony2 Bundle for the Keen IO PHP Client

Keen IO Symfony2 Bundle

Build Status

Overview

The Keen IO Symfony2 Bundle allows you to quickly and easily use the Keen IO PHP Client in your Symfony 2 applications.

Community-Supported SDK

This is an unofficial community supported SDK.

KeenIO Bundle Installation

The best method of installation is through the use of composer.

Add the bundle to Composer
{
    "require": {
        "keen-io/keen-io-bundle": "~1.3"
    }
}
Update AppKernel.php

Add The KeenIO Bundle to your kernel bootstrap sequence

public function registerBundles()
{
    $bundles = array(
        // ...
        new KeenIO\Bundle\KeenIOBundle\KeenIOBundle(),
    );

    return $bundles;
}
Configure the Client

The values for the configuration can be found in the Project Overview section of your Keen IO Dashboard

#app/config.yml

keen_io:
    version:    <version> //version is optional and correctly defaults to 3.0
    project_id: <project id>
    master_key: <master key>
    write_key:  <write key>
    read_key:   <read key>

Using the Client

Once configured the client is available through the service container in your application.

#src/AcmeBundle/Controller/YourController

public function indexAction()
{
    $client = $this->get('keen_io');
    $client->addEvent('example_collection', array( 'foo' => 'bar' ));

    // ...
}

Or it can be passed into your services through dependency injection:

#app/config/services.yml

# Example Tracking Service
tracking.service:
    class: Acme\Bundle\AcmeBundle\Service\Tracking
    arguments:
        - @keen_io

Questions & Support

If you have any questions, bugs, or suggestions, please report them via Github Issues. Or, come chat with us anytime at http://keen.chat. We'd love to hear your feedback and ideas!

Contributing

This is an open source project and we love involvement from the community! Hit us up with pull requests and issues.

  • #18 Add support for Symfony 4
    By web-flow, 7 months ago
  • Add support for Symfony 4
    By stof, 1 year ago
  • update doc with newest version
    By web-flow, 1 year ago
  • Merge pull request #17 from stof/public_service
    By web-flow, 1 year ago
  • Merge pull request #14 from stof/autowiring
    By web-flow, 1 year ago
  • Mark service as public explicitly
    By stof, 1 year ago
  • Merge pull request #15 from stof/upgrade_phpunit
    By web-flow, 1 year ago
  • Add support for autowiring in Symfony 3.3+
    By stof, 1 year ago
  • Update the testsuite to use uptodate versions of PHPUnit
    By stof, 1 year ago
  • Update README.md
    By web-flow, 1 year ago
  • Merge pull request #16 from Sekonda/master
    By web-flow, 1 year ago
  • Merge pull request #13 from stof/patch-1
    By web-flow, 1 year ago
  • Use the project-specific version of PHPUnit on Travis
    By stof, 1 year ago
  • Fix README.md not displaying headers correctly.
    By web-flow, 1 year ago
  • Remove testing on HHVM
    By stof, 1 year ago
  • Update the Travis config for the migration from Precise to Trusty
    By web-flow, 1 year ago
  • Merge pull request #12 from stof/better_version
    By web-flow, 1 year ago
  • Merge pull request #11 from stof/symfony_3
    By web-flow, 1 year ago
  • Make the configuration of the version more user-friendly
    By stof, 2 years ago
  • Add support for Symfony 3
    By stof, 2 years ago
  • Merge pull request #8 from stof/improve_travis_setup
    By kmfk, 3 years ago
  • Merge pull request #9 from stof/symfony_compat
    By kmfk, 3 years ago
  • Update the bundle to avoid deprecated APIs on symfony 2.6+
    By stof, 3 years ago
  • Add the Symfony PHPUnit bridge to detect deprecated API usage
    By stof, 3 years ago
  • Improve the Travis configuration
    By stof, 3 years ago
  • Merge pull request #7 from mickaelandrieu/patch-1
    By kmfk, 4 years ago
  • Updated composer.json
    By mickaelandrieu, 4 years ago
  • Merge pull request #6 from stof/patch-1
    By kmfk, 4 years ago
  • Delete an outdated unused service file
    By stof, 4 years ago
  • Merge pull request #5 from kmfk/fix-composer
    By kmfk, 4 years ago