Download the PHP package gpaton/parse-bundle without Composer

On this page you can find all versions of the php package gpaton/parse-bundle. 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 parse-bundle

Parse Bundle

Introduction

This bundle provides integration for Parse.com PHP SDK in your Symfony2 Project.

As I currently don't use other Parse.com tools, I've only implemented Push notifications. You're free to contribute to add other tools.

Changelog

1.1.0

1.0.0

Installation

Install GpatonParseBundle

Simply run assuming you have installed composer.phar or composer binary:

$ php composer.phar require gpaton/parse-bundle 1.1.*

Enable the bundle

Finally, enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Gpaton\ParseBundle\GpatonParseBundle(),

    );
}

Push Notifications

Setting up

First, you need to configure the bundle with the keys obtained when you've created your application on Parse.com :

# app/config/config.yml

gpaton_parse:
    app_id: APPLICATION_ID
    rest_key: REST_KEY
    master_key: MASTER_KEY

Usage

Then, you may send push notifications from your controller by loading the service gpaton.parse.push and use the send method :

<?php
// Acme\DemoBundle\Controller\PushController

namespace Acme\DemoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class PushController extends Controller {

    public function indexAction() {

        $push = $this->get('gpaton.parse.push');

        $data = ['alert' => 'Hi there !'];
        $channels = ['My Channel'];

        $push->send($data, $channels);

        // ...
    }
}

The send method takes up to 4 arguments. First is mandatory and you must supply at least second or third argument :

  1. data array

  2. Channels array (optional)

  3. ParseQuery (optional)

  4. pushTime \DateTime (optional)

If you want to send your push to channel(s), just follow the previous sample. To push to Query, you will use the createQuery method :

<?php
// Acme\DemoBundle\Controller\PushController

namespace Acme\DemoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class PushController extends Controller {

    public function indexAction() {

        $push = $this->get('gpaton.parse.push');

        $data = ['alert' => 'Hi there !'];
        $query = $push->createQuery();
        $query->equalTo('foo', 'bar');

        $push->send($data, null, $query);

        // ...
    }
}

If you want to schedule your Push in advance (2 weeks maximum due to Parse.com limitation) :

<?php
// Acme\DemoBundle\Controller\PushController

namespace Acme\DemoBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class PushController extends Controller {

    public function indexAction() {

        $push = $this->get('gpaton.parse.push');

        $data = ['alert' => 'Hi there !'];
        $query = $push->createQuery();
        $query->equalTo('foo', 'bar');
        $scheduledTime = new \DateTime();
        $scheduledTime->modify('+5 days');

        $push->send($data, null, $query, $scheduledTime);

        // ...
    }
}

License

This bundle is under GPL v2 license. See the complete license in the bundle:

Resources/meta/LICENSE

All versions of parse-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
symfony/framework-bundle Version >=2.1
parse/php-sdk Version 1.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 gpaton/parse-bundle contains the following files

Loading the files please wait ....