An open API service indexing awesome lists of open source software.

https://github.com/dczajkowski/colloquy

This repo contains @gtluszcz, @kerni08, @heartistizio and my project for Design Patterns classes at the AGH university
https://github.com/dczajkowski/colloquy

Last synced: 11 months ago
JSON representation

This repo contains @gtluszcz, @kerni08, @heartistizio and my project for Design Patterns classes at the AGH university

Awesome Lists containing this project

README

          

A framework-agnostic package for managing persistent conversation contexts.


Latest Stable Version
License
Scrutinizer Code Quality
Code Coverage
Build Status

# Installation
```bash
composer install dczajkowski/colloquy
```

# Usage

## Using in auto-mode with annotations
**Identifier resolver declaration**
```php
user = new \App\Models\User;
}

private function step2()
{
$this->user->name = 'John';
}

/** @ColloquyEnd */
private function step3()
{
echo $this->user->name; // John
}
}
```

## Manual Use

```php
name = $name;
}
}

/** Starting a Conversation */

$wrapper = new Colloquy(new FileDriver('storage'));

$homeContext = $wrapper->context('Home');
$formContext = $wrapper->context('Form');

/** Primitive types */

$homeContext->add('Joe', 'name');
$homeContext->add('ilovecats', 'password');
$formContext->add('Jane', 'name');

$name = $homeContext->get('name'); // Joe

$homeContext->set('John', 'name');

$name = $homeContext->get('name'); // John

/** Objects */

$user = new User('Jack');

$homeContext->add($user, 'user');

var_dump($user); // User { name: "Jack" }

$user = $homeContext->get('user');

var_dump($user); // User { name: "Jack" }

/** Ending a Conversation */

$wrapper->end('Form');
$wrapper->end('Home');
```

# Contribution
Contributions are very welcome. If you want, just drop a PR with any feature you'd like to see.

# Authors
The library was made by [Dariusz Czajkowski](https://dczajkowski.com), Grzegorz Tłuszcz, Aleksander Kuźma, Karol Piwnicki.

# License
The Colloquy package is open-sourced software licensed under the MIT license.