Download the PHP package cunningsoft/achievement-bundle without Composer

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

Build Status

Installation

  1. Add the following to your composer.json file:

  2. Run composer update cunningsoft/achievement-bundle to install the new dependencies.

  3. Register the new bundle in your AppKernel.php:

  4. Let your user entity implement the Cunningsoft\AchievementBundle\Entity\UserInterface:

  5. Map the interface to your user entity in your config.yml:

  6. Update your database schema:

  7. Import routes:

  8. Render the achievement list in your template:

  9. Render the "achievement unlocked" layer at the bottom of your template:

  10. Import js and css files:

  11. Create a child bundle which holds all informations about your achievements

  12. Tell twig where to find your assets

Usage

For every achievement you want to use, go through these steps. This is an example showing how to give an achievement for posting a comment with at least 100 characters.

  1. Add it to your achievement list

  2. Create an event class as a container for the informations about the event

  3. Create method to check for the achievement

  4. Create achievement image

  5. Add achievement description

  6. Create event

    
    // src/Acme/MainBundle/Controller/Comment.php
    // ...
    public function create()
    {
        // ...
        $this->get('event_dispatcher')->dispatch('comment_posted', new CommentEvent($comment));
    }
    // ...

Now every time a comment is created (in your business logic) an event is triggered. Because of your achievements.yml the achievement system knows to listen for that event and trigger the according method in your AchievementListener. Now the method in your listener can check whether or not the requirements for one or more achievements are met and if so it triggers the booking of the achievement. Of course you may also utilize existing events or use the events for other purposes as well.

Changelog

Notes

Please also visit my Open Source Browsergame Project Open Soccer Star.


All versions of achievement-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
symfony/symfony Version ~2.3
doctrine/orm Version >=2.2.0
sensio/framework-extra-bundle Version >=2.1.0
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 cunningsoft/achievement-bundle contains the following files

Loading the files please wait ....