Download the PHP package cyrille-hugues/alyosha without Composer

On this page you can find all versions of the php package cyrille-hugues/alyosha. 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 alyosha

Alyosha

What is this ?

Alyosha is a framework for IRC bot, and basically a event driven framework to fiddle with for any purpose – be it a cross social media bot or a web server (please don't do this).

Why ?

Because the other framework for IRC were entirely focused on IRC and I wanted something cross medium. By writing a module, you can wire up Slack, Facebook bot, ...

It's written in PHP because I like this language pretty much and I started before thinking about the asynchronous needs of this project.

Usage

Requirements

Installation

Create a new composer project with this library.

Add the following bot.php to the project

You can now start the bot, which does nothing because he doesn't have any modules.

Your first use

Let's say you use IRC to chat with some friends and want to celebrate the leet time, which is 13:37. For this, you need the following modules:

So let's add them to the mix in bot.php.

Execute the script again: php bot.php.

Wow it's writing a whole bunch of text !

Yep, it connected to irc.iiens.net server and handled all the tedious work to get you to the Alyosha channel.

Nice, that's not where I want it to connect.

Ok, let's talk about configuration.

Configuration

If you read your bot.php script, you have this line:

It create the kernel with a .yml file from the lib. Let's write our own config.yml. Let's start with the IRC configuration:

Here we configured the bot to connect to my.super.server with the nickname i_m_a_robot. You can make it connect to several server by adding another key (see https://symfony.com/doc/3.3/components/yaml.html).

For this server we make it connect to a list of one chan, doc_chan.

Since we are responsible, we use IrcAdminModule which need a password for you to authenticate yourself.

Now, let's make our bot take this configuration into account by modifying this line

to

and start the bot again. It connect to your channel with the provided nickname ... and does nothing. Let's change that.

Scripting

Configuring composer to autoload our classes

Look, i'm not a monster to send scripting like it's PHP4 with include and require. Add the following to your composer.json

and run composer install again. Now you can write PHP classes in the src and use Bot\Smthg as in every modern PHP files.

Creating your first module

Create a src/LeetModule.php with this content

and add it to the bot.php script.

Now you can execute php bot.php and at 13:37 every day, it will output "LEET TIME !!" in all the channels.

Managing Alyosha

Don't let the script in a random window on a computer/server. Please use PM2 to manage Alyosha's process.


All versions of alyosha with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
symfony/yaml Version ~2.7
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 cyrille-hugues/alyosha contains the following files

Loading the files please wait ....