Laravel 10 + Cachet Core

This commit is contained in:
James Brooks 2024-01-19 20:03:17 +00:00
parent 8b565ab7f0
commit cf674850dd
1271 changed files with 8105 additions and 123368 deletions

View File

@ -1,15 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[{*.json,*.yml}]
[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
[docker-compose.yml]
indent_size = 4

15
.gitignore vendored
View File

@ -1,12 +1,19 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
/.idea
/.vagrant
.env
.env.backup
.env.production
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
.env
package-lock.json
yarn-error.log
/.fleet
/.idea
/.vscode

View File

@ -1,38 +0,0 @@
language: php
dist: trusty
sudo: false
branches:
except:
- l10n_2.3
- l10n_2.4
before_install:
- cp .env.example .env
install:
- travis_retry composer install --no-interaction --no-suggest
jobs:
include:
# - stage: Security check
# script:
# - phpenv config-rm xdebug.ini || true
# - wget https://get.sensiolabs.org/security-checker.phar
# - php security-checker.phar security:check ./composer.lock
# php: 7.1
- stage: Unit tests
script:
- phpenv config-rm xdebug.ini || true
- vendor/bin/phpunit
php: 7.1
- stage: Unit tests
script:
- phpenv config-rm xdebug.ini || true
- vendor/bin/phpunit
php: 7.2
- stage: Unit tests
script:
- phpenv config-rm xdebug.ini || true
- vendor/bin/phpunit
php: 7.3

12
LICENSE
View File

@ -1,12 +0,0 @@
Copyright (c) 2015-2019 Alt Three Services Limited.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the Cachet nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -9,8 +9,6 @@ Cachet, the open-source status page system.
## Cachet 3.x Announcement
We are shifting our attention and resources to Cachet 3.x and will no longer be supporting the 2.x version.
For more information on the Cachet rebuild and our plans for 3.x, you can read the announcement [here](https://github.com/CachetHQ/Cachet/discussions/4342).
## Features
@ -27,8 +25,7 @@ For more information on the Cachet rebuild and our plans for 3.x, you can read t
## Requirements
- PHP 7.1.3 7.3
- HTTP server with PHP support (e.g.: Apache, Nginx, Caddy)
- PHP 8.1 or later
- [Composer](https://getcomposer.org)
- A supported database: MySQL, PostgreSQL or SQLite
@ -43,9 +40,9 @@ Here are some useful quick links:
### Demo
To test out the demo, you can log in to the [Cachet dashboard](https://demo.cachethq.io/dashboard) with the following credentials:
To test out the v3 demo, you can log in to the [Cachet dashboard](https://v3.cachethq.io/dashboard) with the following credentials:
- **Username:** `test` or `test@example.com`
- **Email:** `test@example.com`
- **Password:** `test123`
> **Note**

View File

@ -1 +0,0 @@
2.4.0-dev

View File

@ -1,128 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Component;
/**
* This is the create component command class.
*
* @author James Brooks <james@alt-three.com>
*/
final class CreateComponentCommand
{
/**
* The component name.
*
* @var string
*/
public $name;
/**
* The component description.
*
* @var string
*/
public $description;
/**
* The component status.
*
* @var int
*/
public $status;
/**
* The component link.
*
* @var string
*/
public $link;
/**
* The component order.
*
* @var int
*/
public $order;
/**
* The component group.
*
* @var int
*/
public $group_id;
/**
* Is the component enabled?
*
* @var bool
*/
public $enabled;
/**
* JSON meta data for the component.
*
* @var array|null
*/
public $meta;
/**
* Tags string.
*
* @var string
*/
public $tags;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'description' => 'nullable|string',
'status' => 'required|int|min:0|max:4',
'link' => 'nullable|url',
'order' => 'nullable|int',
'group_id' => 'nullable|int',
'enabled' => 'nullable|bool',
'meta' => 'nullable|array',
'tags' => 'nullable|string',
];
/**
* Create a new add component command instance.
*
* @param string $name
* @param string $description
* @param int $status
* @param string $link
* @param int $order
* @param int $group_id
* @param bool $enabled
* @param array|null $meta
* @param string|null $tags
*
* @return void
*/
public function __construct($name, $description, $status, $link, $order, $group_id, $enabled, $meta, $tags = null)
{
$this->name = $name;
$this->description = $description;
$this->status = (int) $status;
$this->link = $link;
$this->order = $order;
$this->group_id = $group_id;
$this->enabled = $enabled;
$this->meta = $meta;
$this->tags = $tags;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Component;
use CachetHQ\Cachet\Models\Component;
final class RemoveComponentCommand
{
/**
* The component to remove.
*
* @var \CachetHQ\Cachet\Models\Component
*/
public $component;
/**
* Create a new remove component command instance.
*
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(Component $component)
{
$this->component = $component;
}
}

View File

@ -1,144 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Component;
use CachetHQ\Cachet\Models\Component;
final class UpdateComponentCommand
{
/**
* The component to update.
*
* @var \CachetHQ\Cachet\Models\Component
*/
public $component;
/**
* The component name.
*
* @var string|null
*/
public $name;
/**
* The component description.
*
* @var string|null
*/
public $description;
/**
* The component status.
*
* @var int|null
*/
public $status;
/**
* The component link.
*
* @var string|null
*/
public $link;
/**
* The component order.
*
* @var int|null
*/
public $order;
/**
* The component group.
*
* @var int|null
*/
public $group_id;
/**
* Is the component enabled?
*
* @var bool|null
*/
public $enabled;
/**
* JSON meta data for the component.
*
* @var array|null
*/
public $meta;
/**
* The tags.
*
* @var string|null
*/
public $tags;
/**
* If this is true, we won't notify subscribers of the change.
*
* @var bool
*/
public $silent;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'nullable|string',
'description' => 'nullable|string',
'status' => 'nullable|int|min:0|max:4',
'link' => 'nullable|url',
'order' => 'nullable|int',
'group_id' => 'nullable|int',
'enabled' => 'nullable|bool',
'meta' => 'nullable|array',
'silent' => 'nullable|bool',
];
/**
* Create a new update component command instance.
*
* @param \CachetHQ\Cachet\Models\Component $component
* @param string|null $name
* @param string|null $description
* @param int|null $status
* @param string|null $link
* @param int|null $order
* @param int|null $group_id
* @param bool|null $enabled
* @param array|null $meta
* @param string|null $tags
* @param bool $silent
*
* @return void
*/
public function __construct(Component $component, $name = null, $description = null, $status = null, $link = null, $order = null, $group_id = null, $enabled = null, $meta = null, $tags = null, $silent = null)
{
$this->component = $component;
$this->name = $name;
$this->description = $description;
$this->status = $status;
$this->link = $link;
$this->order = $order;
$this->group_id = $group_id;
$this->enabled = $enabled;
$this->meta = $meta;
$this->tags = $tags;
$this->silent = $silent;
$this->tags = $tags;
}
}

View File

@ -1,78 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
/**
* This is the create component group command.
*
* @author James Brooks <james@alt-three.com>
*/
final class CreateComponentGroupCommand
{
/**
* The component group name.
*
* @var string
*/
public $name;
/**
* The component group description.
*
* @var int
*/
public $order;
/**
* Is the component group collapsed?
*
* @var int
*/
public $collapsed;
/**
* Is the component visible to public?
*
* @var int
*/
public $visible;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'order' => 'required|int',
'collapsed' => 'required|int|between:0,4',
'visible' => 'required|bool',
];
/**
* Create a add component group command instance.
*
* @param string $name
* @param int $order
* @param int $collapsed
* @param int $visible
*
* @return void
*/
public function __construct($name, $order, $collapsed, $visible)
{
$this->name = $name;
$this->order = (int) $order;
$this->collapsed = $collapsed;
$this->visible = (int) $visible;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
final class RemoveComponentGroupCommand
{
/**
* The component group to remove.
*
* @var \CachetHQ\Cachet\Models\ComponentGroup
*/
public $group;
/**
* Create a new remove component group command instance.
*
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(ComponentGroup $group)
{
$this->group = $group;
}
}

View File

@ -1,89 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
/**
* This is the update component group command.
*
* @author James Brooks <james@alt-three.com>
*/
final class UpdateComponentGroupCommand
{
/**
* The component group.
*
* @var \CachetHQ\Cachet\Models\ComponentGroup
*/
public $group;
/**
* The component group name.
*
* @var string
*/
public $name;
/**
* The component group description.
*
* @var int
*/
public $order;
/**
* Is the component group collapsed?
*
* @var int
*/
public $collapsed;
/**
* Is the component visible to public?
*
* @var int
*/
public $visible;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'nullable|string',
'order' => 'nullable|int',
'collapsed' => 'nullable|int|between:0,4',
'visible' => 'nullable|bool',
];
/**
* Create a add component group command instance.
*
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
* @param string $name
* @param int $order
* @param int $collapsed
* @param int $visible
*
* @return void
*/
public function __construct(ComponentGroup $group, $name, $order, $collapsed, $visible)
{
$this->group = $group;
$this->name = $name;
$this->order = (int) $order;
$this->collapsed = $collapsed;
$this->visible = (int) $visible;
}
}

View File

@ -1,158 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Incident;
/**
* This is the create incident command.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class CreateIncidentCommand
{
/**
* The incident name.
*
* @var string
*/
public $name;
/**
* The incident status.
*
* @var int
*/
public $status;
/**
* The incident message.
*
* @var string
*/
public $message;
/**
* The incident visibility.
*
* @var int
*/
public $visible;
/**
* The incident component.
*
* @var int
*/
public $component_id;
/**
* The component status.
*
* @var int
*/
public $component_status;
/**
* Whether to notify about the incident or not.
*
* @var bool
*/
public $notify;
/**
* Whether to stick the incident on top.
*
* @var bool
*/
public $stickied;
/**
* The date at which the incident occurred at.
*
* @var string|null
*/
public $occurred_at;
/**
* A given incident template.
*
* @var string|null
*/
public $template;
/**
* Variables for the incident template.
*
* @var string[]|null
*/
public $template_vars;
/**
* Meta key/value pairs.
*
* @var array
*/
public $meta = [];
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'status' => 'required|int|min:0|max:4',
'message' => 'nullable|string',
'visible' => 'nullable|bool',
'component_id' => 'nullable|required_with:component_status|int',
'component_status' => 'nullable|required_with:component_id|int|min:0|max:4',
'notify' => 'nullable|bool',
'stickied' => 'required|bool',
'occurred_at' => 'nullable|string',
'template' => 'nullable|string',
'meta' => 'nullable|array',
];
/**
* Create a new create incident command instance.
*
* @param string $name
* @param int $status
* @param string $message
* @param int $visible
* @param int $component_id
* @param int $component_status
* @param bool $notify
* @param bool $stickied
* @param string|null $occurred_at
* @param string|null $template
* @param array $template_vars
* @param array $meta
*
* @return void
*/
public function __construct($name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $occurred_at, $template, array $template_vars = [], array $meta = [])
{
$this->name = $name;
$this->status = $status;
$this->message = $message;
$this->visible = $visible;
$this->component_id = $component_id;
$this->component_status = $component_status;
$this->notify = $notify;
$this->stickied = $stickied;
$this->occurred_at = $occurred_at;
$this->template = $template;
$this->template_vars = $template_vars;
$this->meta = $meta;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Incident;
use CachetHQ\Cachet\Models\Incident;
final class RemoveIncidentCommand
{
/**
* The incident to remove.
*
* @var \CachetHQ\Cachet\Models\Incident
*/
public $incident;
/**
* Create a new remove incident command instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(Incident $incident)
{
$this->incident = $incident;
}
}

View File

@ -1,170 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Incident;
use CachetHQ\Cachet\Models\Incident;
/**
* This is the update incident command.
*
* @author James Brooks <james@alt-three.com>
* @author Joseph Cohem <joe@alt-three.com>
* @author Graham Campbell <graham@alt-three.com>
*/
final class UpdateIncidentCommand
{
/**
* The incident to update.
*
* @var \CachetHQ\Cachet\Models\Incident
*/
public $incident;
/**
* The incident name.
*
* @var string
*/
public $name;
/**
* The incident status.
*
* @var int
*/
public $status;
/**
* The incident message.
*
* @var string
*/
public $message;
/**
* The incident visibility.
*
* @var int
*/
public $visible;
/**
* The incident component.
*
* @var int
*/
public $component_id;
/**
* The component status.
*
* @var int
*/
public $component_status;
/**
* Whether to notify about the incident or not.
*
* @var bool
*/
public $notify;
/**
* Whether to stick the incident on top.
*
* @var bool
*/
public $stickied;
/**
* The timestamp that the incident occurred at.
*
* @var string|null
*/
public $occurred_at;
/**
* A given incident template.
*
* @var string|null
*/
public $template;
/**
* Variables for the incident template.
*
* @var string[]|null
*/
public $template_vars;
/**
* Meta key/value pairs.
*
* @var array
*/
public $meta = [];
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'nullable|string',
'status' => 'nullable|int|min:0|max:4',
'message' => 'nullable|string',
'visible' => 'nullable|bool',
'component_id' => 'nullable|int',
'component_status' => 'nullable|int|min:0|max:4|required_with:component_id',
'notify' => 'nullable|bool',
'stickied' => 'nullable|bool',
'occurred_at' => 'nullable|string',
'template' => 'nullable|string',
'meta' => 'nullable|array',
];
/**
* Create a new update incident command instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
* @param string $name
* @param int $status
* @param string $message
* @param int $visible
* @param int $component_id
* @param int $component_status
* @param bool $notify
* @param bool $stickied
* @param string|null $occurred_at
* @param string|null $template
* @param array $template_vars
* @param array $meta
*
* @return void
*/
public function __construct(Incident $incident, $name, $status, $message, $visible, $component_id, $component_status, $notify, $stickied, $occurred_at, $template, array $template_vars = [], array $meta = [])
{
$this->incident = $incident;
$this->name = $name;
$this->status = $status;
$this->message = $message;
$this->visible = $visible;
$this->component_id = $component_id;
$this->component_status = $component_status;
$this->notify = $notify;
$this->stickied = $stickied;
$this->occurred_at = $occurred_at;
$this->template = $template;
$this->template_vars = $template_vars;
$this->meta = $meta;
}
}

View File

@ -1,97 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\IncidentUpdate;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\User;
/**
* This is the report incident update command.
*
* @author James Brooks <james@alt-three.com>
*/
final class CreateIncidentUpdateCommand
{
/**
* The incident.
*
* @var \CachetHQ\Cachet\Models\Incident
*/
public $incident;
/**
* The incident status.
*
* @var int
*/
public $status;
/**
* The incident message.
*
* @var string
*/
public $message;
/**
* The incident component.
*
* @var int
*/
public $component_id;
/**
* The component status.
*
* @var int
*/
public $component_status;
/**
* The user.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'incident' => 'required',
'status' => 'required|int|min:1|max:4',
'message' => 'required|string',
'component_id' => 'nullable|required_with:component_status|int',
'component_status' => 'nullable|required_with:component_id|int|min:0|max:4',
'user' => 'required',
];
/**
* Create a new report incident update command instance.
*
* @param \CachetHQ\Cachet\Models\Incident $incident
* @param string $status
* @param string $message
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(Incident $incident, $status, $message, $component_id, $component_status, User $user)
{
$this->incident = $incident;
$this->status = $status;
$this->message = $message;
$this->component_id = $component_id;
$this->component_status = $component_status;
$this->user = $user;
}
}

View File

@ -1,41 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\IncidentUpdate;
use CachetHQ\Cachet\Models\IncidentUpdate;
/**
* This is the remove incident update command.
*
* @author James Brooks <james@alt-three.com>
*/
final class RemoveIncidentUpdateCommand
{
/**
* The incident update to remove.
*
* @var \CachetHQ\Cachet\Models\IncidentUpdate
*/
public $incidentUpdate;
/**
* Create a new remove incident update command instance.
*
* @param \CachetHQ\Cachet\Models\IncidentUpdate $incidentUpdate
*
* @return void
*/
public function __construct(IncidentUpdate $incidentUpdate)
{
$this->incidentUpdate = $incidentUpdate;
}
}

View File

@ -1,79 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\IncidentUpdate;
use CachetHQ\Cachet\Models\IncidentUpdate;
use CachetHQ\Cachet\Models\User;
/**
* This is the update incident update command.
*
* @author James Brooks <james@alt-three.com>
*/
final class UpdateIncidentUpdateCommand
{
/**
* The incident update.
*
* @var \CachetHQ\Cachet\Models\IncidentUpdate
*/
public $update;
/**
* The incident status.
*
* @var int
*/
public $status;
/**
* The incident message.
*
* @var string
*/
public $message;
/**
* The user.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'status' => 'nullable|int|min:1|max:4',
'message' => 'nullable|string',
];
/**
* Create a new update incident update command instance.
*
* @param \CachetHQ\Cachet\Models\IncidentUpdate $update
* @param string $status
* @param string $message
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(IncidentUpdate $update, $status, $message, User $user)
{
$this->update = $update;
$this->status = $status;
$this->message = $message;
$this->user = $user;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Invite;
use CachetHQ\Cachet\Models\Invite;
final class ClaimInviteCommand
{
/**
* The invite to mark as claimed.
*
* @var \CachetHQ\Cachet\Models\Invite
*/
public $invite;
/**
* Create a new claim invite command instance.
*
* @param \CachetHQ\Cachet\Models\Invite $invite
*
* @return void
*/
public function __construct(Invite $invite)
{
$this->invite = $invite;
}
}

View File

@ -1,149 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Metric;
/**
* This is the create metric command class.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class CreateMetricCommand
{
/**
* The metric name.
*
* @var string
*/
public $name;
/**
* The metric suffix.
*
* @var string
*/
public $suffix;
/**
* The metric description.
*
* @var string
*/
public $description;
/**
* The metric default value.
*
* @var float
*/
public $default_value;
/**
* The metric calculation type.
*
* @var int
*/
public $calc_type;
/**
* The metric display chart.
*
* @var int
*/
public $display_chart;
/**
* The metric decimal places.
*
* @var int
*/
public $places;
/**
* The view to show the metric points in.
*
* @var int
*/
public $default_view;
/**
* The threshold to buffer the metric points in.
*
* @var int
*/
public $threshold;
/**
* The order of which to place the metric in.
*
* @var int
*/
public $order;
/**
* The visibility of the metric.
*
* @var int
*/
public $visible;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'suffix' => 'required|string',
'description' => 'nullable|string',
'default_value' => 'required|int',
'calc_type' => 'required|int',
'display_chart' => 'nullable|int',
'places' => 'nullable|int|between:0,4',
'default_view' => 'required|int|between:0,3',
'threshold' => 'required|int',
'order' => 'nullable|int',
'visible' => 'required|int|between:0,2',
];
/**
* Create a new add metric command instance.
*
* @param string $name
* @param string $suffix
* @param string $description
* @param float $default_value
* @param int $calc_type
* @param int $display_chart
* @param int $places
* @param int $default_view
* @param int $threshold
* @param int $order
* @param int $visible
*
* @return void
*/
public function __construct($name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view, $threshold, $order = 0, $visible = 1)
{
$this->name = $name;
$this->suffix = $suffix;
$this->description = $description;
$this->default_value = $default_value;
$this->calc_type = $calc_type;
$this->display_chart = $display_chart;
$this->places = $places;
$this->default_view = $default_view;
$this->threshold = $threshold;
$this->order = $order;
$this->visible = $visible;
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
/**
* This is the create metric point command class.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class CreateMetricPointCommand
{
/**
* The metric to add.
*
* @var \CachetHQ\Cachet\Models\Metric
*/
public $metric;
/**
* The metric point value.
*
* @var int
*/
public $value;
/**
* The metric point created at.
*
* @var int
*/
public $created_at;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'value' => 'required|numeric',
'created_at' => 'nullable|int',
];
/**
* Create a new add metric point command instance.
*
* @param \CachetHQ\Cachet\Models\Metric $metric
* @param int $value
* @param int $created_at
*
* @return void
*/
public function __construct(Metric $metric, $value, $created_at)
{
$this->metric = $metric;
$this->value = $value;
$this->created_at = $created_at;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
final class RemoveMetricCommand
{
/**
* The metric to remove.
*
* @var \CachetHQ\Cachet\Models\Metric
*/
public $metric;
/**
* Create a new remove metric command instance.
*
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(Metric $metric)
{
$this->metric = $metric;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
final class RemoveMetricPointCommand
{
/**
* The metric point to remove.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $metricPoint;
/**
* Create a new remove metric point command instance.
*
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
*
* @return void
*/
public function __construct(MetricPoint $metricPoint)
{
$this->metricPoint = $metricPoint;
}
}

View File

@ -1,154 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
final class UpdateMetricCommand
{
/**
* The metric.
*
* @var \CachetHQ\Cachet\Models\Metric
*/
public $metric;
/**
* The metric name.
*
* @var string
*/
public $name;
/**
* The metric suffix.
*
* @var string
*/
public $suffix;
/**
* The metric description.
*
* @var string
*/
public $description;
/**
* The metric default value.
*
* @var float
*/
public $default_value;
/**
* The metric calculation type.
*
* @var int
*/
public $calc_type;
/**
* The metric display chart.
*
* @var int
*/
public $display_chart;
/**
* The metric decimal places.
*
* @var int
*/
public $places;
/**
* The view to show the metric points in.
*
* @var int
*/
public $default_view;
/**
* The threshold to buffer the metric points in.
*
* @var int
*/
public $threshold;
/**
* The order of which to place the metric in.
*
* @var int|null
*/
public $order;
/**
* The visibility of the metric.
*
* @var int
*/
public $visible;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'nullable|string',
'suffix' => 'nullable|string',
'description' => 'nullable|string',
'default_value' => 'nullable|numeric',
'calc_type' => 'nullable|int|in:0,1',
'display_chart' => 'nullable|int',
'places' => 'nullable|numeric|between:0,4',
'default_view' => 'nullable|numeric|between:0,4',
'threshold' => 'nullable|int',
'order' => 'nullable|int',
'visible' => 'nullable|int|between:0,2',
];
/**
* Create a new update metric command instance.
*
* @param \CachetHQ\Cachet\Models\Metric $metric
* @param string $name
* @param string $suffix
* @param string $description
* @param float $default_value
* @param int $calc_type
* @param int $display_chart
* @param int $places
* @param int $default_view
* @param int $threshold
* @param int|null $order
* @param int $visible
*
* @return void
*/
public function __construct(Metric $metric, $name, $suffix, $description, $default_value, $calc_type, $display_chart, $places, $default_view, $threshold, $order = null, $visible = null)
{
$this->metric = $metric;
$this->name = $name;
$this->suffix = $suffix;
$this->description = $description;
$this->default_value = $default_value;
$this->calc_type = $calc_type;
$this->display_chart = $display_chart;
$this->places = $places;
$this->default_view = $default_view;
$this->threshold = $threshold;
$this->order = $order;
$this->visible = $visible;
}
}

View File

@ -1,79 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
/**
* This is the update metric point command.
*
* @author James Brooks <james@alt-three.com>
*/
final class UpdateMetricPointCommand
{
/**
* The metric point.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $point;
/**
* The metric.
*
* @var \CachetHQ\Cachet\Models\Metric
*/
public $metric;
/**
* The metric point value.
*
* @var float
*/
public $value;
/**
* The metric point created at.
*
* @var string
*/
public $created_at;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'value' => 'nullable|numeric',
'created_at' => 'nullable|string',
];
/**
* Create a new update metric point command instance.
*
* @param \CachetHQ\Cachet\Models\MetricPoint $point
* @param \CachetHQ\Cachet\Models\Metric $metric
* @param float $value
* @param string $created_at
*
* @return void
*/
public function __construct(MetricPoint $point, Metric $metric, $value, $created_at)
{
$this->point = $point;
$this->metric = $metric;
$this->value = $value;
$this->created_at = $created_at;
}
}

View File

@ -1,108 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Schedule;
/**
* This is the create schedule command.
*
* @author James Brooks <james@alt-three.com>
*/
final class CreateScheduleCommand
{
/**
* The schedule name.
*
* @var string
*/
public $name;
/**
* The schedule message.
*
* @var string
*/
public $message;
/**
* The schedule status.
*
* @var int
*/
public $status;
/**
* The schedule date.
*
* @var string
*/
public $scheduled_at;
/**
* The completed at date.
*
* @var string
*/
public $completed_at;
/**
* The components affected by the schedule.
*
* @var array
*/
public $components;
/**
* Whether to notify that the incident was reported.
*
* @var bool
*/
public $notify;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'message' => 'nullable|string',
'status' => 'required|int|min:0|max:2',
'scheduled_at' => 'required|string',
'completed_at' => 'nullable|string',
'components' => 'nullable|array',
'notify' => 'nullable|bool',
];
/**
* Create a new create schedule command instance.
*
* @param string $name
* @param string $message
* @param int $status
* @param string $scheduled_at
* @param string $completed_at
* @param array $components
* @param bool $notify
*
* @return void
*/
public function __construct($name, $message, $status, $scheduled_at, $completed_at, $components, $notify)
{
$this->name = $name;
$this->message = $message;
$this->status = $status;
$this->scheduled_at = $scheduled_at;
$this->completed_at = $completed_at;
$this->components = $components;
$this->notify = $notify;
}
}

View File

@ -1,50 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Schedule;
use CachetHQ\Cachet\Models\Schedule;
/**
* This is the delete schedule command.
*
* @author James Brooks <james@alt-three.com>
*/
final class DeleteScheduleCommand
{
/**
* The schedule to delete.
*
* @var \CachetHQ\Cachet\Models\Schedule
*/
public $schedule;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'schedule' => 'required',
];
/**
* Create a new delete schedule command instance.
*
* @param \CachetHQ\Cachet\Models\Schedule $schedule
*
* @return void
*/
public function __construct(Schedule $schedule)
{
$this->schedule = $schedule;
}
}

View File

@ -1,110 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Schedule;
use CachetHQ\Cachet\Models\Schedule;
/**
* This is the update schedule command.
*
* @author James Brooks <james@alt-three.com>
*/
final class UpdateScheduleCommand
{
/**
* The schedule to update.
*
* @param \CachetHQ\Cachet\Models\Schedule
*/
public $schedule;
/**
* The schedule name.
*
* @var string
*/
public $name;
/**
* The schedule message.
*
* @var string
*/
public $message;
/**
* The schedule status.
*
* @var int
*/
public $status;
/**
* The schedule date.
*
* @var string
*/
public $scheduled_at;
/**
* The completed at date.
*
* @var string
*/
public $completed_at;
/**
* The components affected by the schedule.
*
* @var array
*/
public $components;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'schedule' => 'required',
'name' => 'nullable|string',
'message' => 'nullable|string',
'status' => 'nullable|int|min:0|max:2',
'scheduled_at' => 'nullable|string',
'completed_at' => 'nullable|string',
'components' => 'nullable|array',
];
/**
* Create a new update schedule command instance.
*
* @param \CachetHQ\Cachet\Models\Schedule $schedule
* @param string $name
* @param string $message
* @param int $status
* @param string $scheduled_at
* @param string $completed_at
* @param array $components
*
* @return void
*/
public function __construct(Schedule $schedule, $name, $message, $status, $scheduled_at, $completed_at, array $components = [])
{
$this->schedule = $schedule;
$this->name = $name;
$this->message = $message;
$this->status = $status;
$this->scheduled_at = $scheduled_at;
$this->completed_at = $completed_at;
$this->components = $components;
}
}

View File

@ -1,66 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
/**
* This is the subscribe subscriber command.
*
* @author James Brooks <james@alt-three.com>
*/
final class SubscribeSubscriberCommand
{
/**
* The subscriber email.
*
* @var string
*/
public $email;
/**
* The subscriber auto verification.
*
* @var bool
*/
public $verified;
/**
* The list of subscriptions to set the subscriber up with.
*
* @var array|null
*/
public $subscriptions;
/**
* The validation rules.
*
* @var array
*/
public $rules = [
'email' => 'required|email',
];
/**
* Create a new subscribe subscriber command instance.
*
* @param string $email
* @param bool $verified
* @param array|null $subscriptions
*
* @return void
*/
public function __construct($email, $verified = false, $subscriptions = null)
{
$this->email = $email;
$this->verified = $verified;
$this->subscriptions = $subscriptions;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
final class UnsubscribeSubscriberCommand
{
/**
* The subscriber to unsubscribe.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a unsubscribe subscriber command instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscription;
final class UnsubscribeSubscriptionCommand
{
/**
* The subscription to unsubscribe.
*
* @var \CachetHQ\Cachet\Models\Subscription
*/
public $subscription;
/**
* Create a unsubscribe subscription command instance.
*
* @param \CachetHQ\Cachet\Models\Subscription $subscription
*
* @return void
*/
public function __construct(Subscription $subscription)
{
$this->subscription = $subscription;
}
}

View File

@ -1,50 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
/**
* This is the subscribe subscriber command.
*
* @author Joseph Cohen <joe@alt-three.com>
*/
final class UpdateSubscriberSubscriptionCommand
{
/**
* The subscriber email.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* The subscriptions that we want to add.
*
* @var array|null
*/
public $subscriptions;
/**
* Create a new subscribe subscriber command instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
* @param null|array $subscriptions
*
* @return void
*/
public function __construct($subscriber, $subscriptions = null)
{
$this->subscriber = $subscriber;
$this->subscriptions = $subscriptions;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
final class VerifySubscriberCommand
{
/**
* The subscriber to verify.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a verify subscriber command instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
}

View File

@ -1,39 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\System\Config;
/**
* This is the update config command class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UpdateConfigCommand
{
/**
* This is the config key/values array.
*
* @var array
*/
public $values;
/**
* Create a new update config command instance.
*
* @param array $values
*
* @return void
*/
public function __construct($values)
{
$this->values = $values;
}
}

View File

@ -1,77 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\User;
/**
* This is the create user command.
*
* @author James Brooks <james@alt-three.com>
*/
final class CreateUserCommand
{
/**
* The user username.
*
* @var string
*/
public $username;
/**
* The user password.
*
* @var string
*/
public $password;
/**
* The user email.
*
* @var string
*/
public $email;
/**
* The user level.
*
* @var int
*/
public $level;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'username' => 'required|string',
'password' => 'required|string',
'level' => 'required|int',
];
/**
* Create a new add team member command instance.
*
* @param string $username
* @param string $password
* @param string $email
* @param int $level
*
* @return void
*/
public function __construct($username, $password, $email, $level)
{
$this->username = $username;
$this->password = $password;
$this->email = $email;
$this->level = $level;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\User;
use CachetHQ\Cachet\Models\User;
final class GenerateApiTokenCommand
{
/**
* The user to generate the token.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new generate api token command instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@ -1,48 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\User;
/**
* This is the invite user command.
*
* @author James Brooks <james@alt-three.com>
*/
final class InviteUserCommand
{
/**
* The invite emails.
*
* @var string[]
*/
public $emails;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'emails.*' => 'required|email',
];
/**
* Create a new invite user command instance.
*
* @param string[] $emails
*
* @return void
*/
public function __construct(array $emails)
{
$this->emails = $emails;
}
}

View File

@ -1,36 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\User;
use CachetHQ\Cachet\Models\User;
final class RemoveUserCommand
{
/**
* The user to remove.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new remove user command instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@ -1,73 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\User;
final class SignupUserCommand
{
/**
* The user username.
*
* @var string
*/
public $username;
/**
* The user password.
*
* @var string
*/
public $password;
/**
* The user email.
*
* @var string
*/
public $email;
/**
* The user level.
*
* @var int
*/
public $level;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'username' => 'required|string',
'password' => 'required|string',
'email' => 'required|string|email',
'level' => 'required|int',
];
/**
* Create a new signup user command instance.
*
* @param string $username
* @param string $password
* @param string $email
* @param int $level
*
* @return void
*/
public function __construct($username, $password, $email, $level)
{
$this->username = $username;
$this->password = $password;
$this->email = $email;
$this->level = $level;
}
}

View File

@ -1,41 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Commands\User;
use CachetHQ\Cachet\Models\User;
/**
* This is the welcome user command.
*
* @author James Brooks <james@alt-three.com>
*/
final class WelcomeUserCommand
{
/**
* The user.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new welcome user command instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
}

View File

@ -1,28 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events;
/**
* This is the action interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface ActionInterface
{
/**
* Get the event action.
*
* @return array
*/
public function getAction();
}

View File

@ -1,24 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Beacon;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the beacon event interface.
*
* @author James Brooks <james@alt-three.com>
*/
interface BeaconEventInterface extends EventInterface
{
//
}

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Beacon;
/**
* This is the beacon failed to send event.
*
* @author James Brooks <james@alt-three.com>
*/
final class BeaconFailedToSendEvent implements BeaconEventInterface
{
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Beacon failed to send.';
}
}

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Beacon;
/**
* This is the beacon was sent event.
*
* @author James Brooks <james@alt-three.com>
*/
final class BeaconWasSentEvent implements BeaconEventInterface
{
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Beacon was sent.';
}
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the component event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface ComponentEventInterface extends EventInterface
{
//
}

View File

@ -1,102 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\User;
/**
* This is the component status was changed event.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentStatusWasChangedEvent implements ActionInterface, ComponentEventInterface
{
/**
* The user who changed the component.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component that was changed.
*
* @var \CachetHQ\Cachet\Models\Component
*/
public $component;
/**
* The original status of the component.
*
* @var int
*/
public $original_status;
/**
* The new status of the component.
*
* @var int
*/
public $new_status;
/**
* If silent, we won't notify.
*
* @var bool
*/
public $silent;
/**
* Create a new component was updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Component $component
* @param int $original_status
* @param int $new_status
* @param bool $silent
*
* @return void
*/
public function __construct(User $user, Component $component, $original_status, $new_status, $silent)
{
$this->user = $user;
$this->component = $component;
$this->original_status = $original_status;
$this->new_status = $new_status;
$this->silent = $silent;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component status was changed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\User;
/**
* This is the component was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentWasCreatedEvent implements ActionInterface, ComponentEventInterface
{
/**
* The user who added the component.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component that was added.
*
* @var \CachetHQ\Cachet\Models\Component
*/
public $component;
/**
* Create a new component was added event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(User $user, Component $component)
{
$this->user = $user;
$this->component = $component;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component was added.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\User;
/**
* This is the component was removed event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentWasRemovedEvent implements ActionInterface, ComponentEventInterface
{
/**
* The user who removed the component.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component that was removed.
*
* @var \CachetHQ\Cachet\Models\Component
*/
public $component;
/**
* Create a new component was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(User $user, Component $component)
{
$this->user = $user;
$this->component = $component;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,76 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Component;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\User;
/**
* This is the component was updated event class.
*
* @author James Brooks <james@alt-three.com>
* @author Graham Campbell <graham@alt-three.com>
*/
final class ComponentWasUpdatedEvent implements ActionInterface, ComponentEventInterface
{
/**
* The user who updated the component.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component that was updated.
*
* @var \CachetHQ\Cachet\Models\Component
*/
public $component;
/**
* Create a new component was updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Component $component
*
* @return void
*/
public function __construct(User $user, Component $component)
{
$this->user = $user;
$this->component = $component;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the component group event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface ComponentGroupEventInterface extends EventInterface
{
//
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\User;
/**
* This is the component group was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ComponentGroupWasCreatedEvent implements ActionInterface, ComponentGroupEventInterface
{
/**
* The user who added the component group.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component group that was added.
*
* @var \CachetHQ\Cachet\Models\ComponentGroup
*/
public $group;
/**
* Create a new component group was added event instance.
*
* @param \CachetHQ\Cachet\Models\User $group
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(User $user, ComponentGroup $group)
{
$this->user = $user;
$this->group = $group;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component Group was added.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\User;
final class ComponentGroupWasRemovedEvent implements ActionInterface, ComponentGroupEventInterface
{
/**
* The user who removed the component group.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component group that was removed.
*
* @var \CachetHQ\Cachet\Models\ComponentGroup
*/
public $group;
/**
* Create a new component group was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(User $user, ComponentGroup $group)
{
$this->user = $user;
$this->group = $group;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component Group was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\ComponentGroup;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\User;
final class ComponentGroupWasUpdatedEvent implements ActionInterface, ComponentGroupEventInterface
{
/**
* The user who updated the component group.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The component group that was updated.
*
* @var \CachetHQ\Cachet\Models\ComponentGroup
*/
public $group;
/**
* Create a new component group was updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\ComponentGroup $group
*
* @return void
*/
public function __construct(User $user, ComponentGroup $group)
{
$this->user = $user;
$this->group = $group;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Component Group was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,23 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events;
/**
* This is the event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface EventInterface
{
//
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the incident event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface IncidentEventInterface extends EventInterface
{
//
}

View File

@ -1,79 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\User;
final class IncidentWasCreatedEvent implements ActionInterface, IncidentEventInterface
{
/**
* The user who reported the event.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The incident that has been reported.
*
* @var \CachetHQ\Cachet\Models\Incident
*/
public $incident;
/**
* Whether to notify that the incident was reported.
*
* @var bool
*/
public $notify;
/**
* Create a new incident has reported event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Incident $incident
* @param bool $notify
*
* @return void
*/
public function __construct(User $user, Incident $incident, $notify = false)
{
$this->user = $user;
$this->incident = $incident;
$this->notify = $notify;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident was reported.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\User;
final class IncidentWasRemovedEvent implements ActionInterface, IncidentEventInterface
{
/**
* The user who removed the event.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The incident that has been removed.
*
* @var \CachetHQ\Cachet\Models\Incident
*/
public $incident;
/**
* Create a new incident was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(User $user, Incident $incident)
{
$this->user = $user;
$this->incident = $incident;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Incident;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\User;
final class IncidentWasUpdatedEvent implements ActionInterface, IncidentEventInterface
{
/**
* The user who updated the event.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The incident that has been updated.
*
* @var \CachetHQ\Cachet\Models\Incident
*/
public $incident;
/**
* Create a new incident has updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Incident $incident
*
* @return void
*/
public function __construct(User $user, Incident $incident)
{
$this->user = $user;
$this->incident = $incident;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,24 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\IncidentUpdate;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the incident update event interface.
*
* @author James Brooks <james@alt-three.com>
*/
interface IncidentUpdateEventInterface extends EventInterface
{
//
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\IncidentUpdate;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\IncidentUpdate;
use CachetHQ\Cachet\Models\User;
/**
* This is the incident update was removed event.
*
* @author James Brooks <james@alt-three.com>
*/
final class IncidentUpdateWasRemovedEvent implements ActionInterface, IncidentUpdateEventInterface
{
/**
* The user who removed the incident update.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The incident update that has been removed.
*
* @var \CachetHQ\Cachet\Models\IncidentUpdate
*/
public $update;
/**
* Create a new incident update was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\IncidentUpdate $update
*
* @return void
*/
public function __construct(User $user, IncidentUpdate $update)
{
$this->user = $user;
$this->update = $update;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident Update was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\IncidentUpdate;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\IncidentUpdate;
use CachetHQ\Cachet\Models\User;
/**
* This is the incident update was reported event.
*
* @author James Brooks <james@alt-three.com>
*/
final class IncidentUpdateWasReportedEvent implements ActionInterface, IncidentUpdateEventInterface
{
/**
* The user who reported the incident update.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The incident update that has been reported.
*
* @var \CachetHQ\Cachet\Models\IncidentUpdate
*/
public $update;
/**
* Create a new incident update was reported event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\IncidentUpdate $update
*
* @return void
*/
public function __construct(User $user, IncidentUpdate $update)
{
$this->user = $user;
$this->update = $update;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident Update was reported.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,74 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\IncidentUpdate;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\IncidentUpdate;
use CachetHQ\Cachet\Models\User;
/**
* This is the incident update was updated event.
*
* @author James Brooks <james@alt-three.com>
*/
final class IncidentUpdateWasUpdatedEvent implements ActionInterface, IncidentUpdateEventInterface
{
/**
* The user who updated the incident update.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The incident update that has been updated.
*
* @var \CachetHQ\Cachet\Models\IncidentUpdate
*/
public $update;
/**
* Create a new incident update was updated event instance.
*
* @param \CachetHQ\Cachet\Models\IncidentUpdate $update
*
* @return void
*/
public function __construct(User $user, IncidentUpdate $update)
{
$this->user = $user;
$this->update = $update;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Incident Update was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Invite;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the invite event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface InviteEventInterface extends EventInterface
{
//
}

View File

@ -1,44 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Invite;
use CachetHQ\Cachet\Models\Invite;
final class InviteWasClaimedEvent implements InviteEventInterface
{
/**
* The invite that has been claimed.
*
* @var \CachetHQ\Cachet\Models\Invite
*/
public $invite;
/**
* Create a new invite was claimed event instance.
*
* @return void
*/
public function __construct(Invite $invite)
{
$this->invite = $invite;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Invite was claimed.';
}
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the metric event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface MetricEventInterface extends EventInterface
{
//
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\MetricPoint;
use CachetHQ\Cachet\Models\User;
/**
* This is the metric point was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class MetricPointWasCreatedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who added the metric point.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The metric point that was added.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $metricPoint;
/**
* Create a new metric point was added event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
*
* @return void
*/
public function __construct(User $user, MetricPoint $metricPoint)
{
$this->user = $user;
$this->metricPoint = $metricPoint;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric Point was added.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\MetricPoint;
use CachetHQ\Cachet\Models\User;
final class MetricPointWasRemovedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who removed the metric point.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The metric point that was removed.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $metricPoint;
/**
* Create a new metric point was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\MetricPoint $memtricPoint
*
* @return void
*/
public function __construct(User $user, MetricPoint $metricPoint)
{
$this->user = $user;
$this->metricPoint = $metricPoint;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric Point was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\MetricPoint;
use CachetHQ\Cachet\Models\User;
final class MetricPointWasUpdatedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who updated the metric point.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The metric point that was updated.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $metricPoint;
/**
* Create a new metric point was updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\MetricPoint $metricPoint
*
* @return void
*/
public function __construct(User $user, MetricPoint $metricPoint)
{
$this->user = $user;
$this->metricPoint = $metricPoint;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric Point was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\User;
/**
* This is the metric was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class MetricWasCreatedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who added the metric.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The metric that was added.
*
* @var \CachetHQ\Cachet\Models\Metric
*/
public $metric;
/**
* Create a new metric was added event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(User $user, Metric $metric)
{
$this->user = $user;
$this->metric = $metric;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric was added.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\User;
final class MetricWasRemovedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who removed the metric.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The metric that was removed.
*
* @var \CachetHQ\Cachet\Models\Metric
*/
public $metric;
/**
* Create a new metric was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(User $user, Metric $metric)
{
$this->user = $user;
$this->metric = $metric;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,70 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Metric;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\User;
final class MetricWasUpdatedEvent implements ActionInterface, MetricEventInterface
{
/**
* The user who update the metric.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The metric that was updated.
*
* @var \CachetHQ\Cachet\Models\MetricPoint
*/
public $metric;
/**
* Create a new metric was updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Metric $metric
*
* @return void
*/
public function __construct(User $user, Metric $metric)
{
$this->user = $user;
$this->metric = $metric;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Metric was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,24 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Schedule;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the schedule event interface.
*
* @author James Brooks <james@alt-three.com>
*/
interface ScheduleEventInterface extends EventInterface
{
//
}

View File

@ -1,84 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Schedule;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Schedule;
use CachetHQ\Cachet\Models\User;
/**
* This is the schedule was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ScheduleWasCreatedEvent implements ActionInterface, ScheduleEventInterface
{
/**
* The user that created the schedule.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The schedule that has been created.
*
* @var \CachetHQ\Cachet\Models\Schedule
*/
public $schedule;
/**
* Whether to notify that the incident was reported.
*
* @var bool
*/
public $notify;
/**
* Create a new schedule was created event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Schedule $schedule
* @param bool notify
*
* @return void
*/
public function __construct(User $user, Schedule $schedule, $notify = false)
{
$this->user = $user;
$this->schedule = $schedule;
$this->notify = $notify;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Schedule was created.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Schedule;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Schedule;
use CachetHQ\Cachet\Models\User;
/**
* This is the schedule was removed event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ScheduleWasRemovedEvent implements ActionInterface, ScheduleEventInterface
{
/**
* The user that removed the schedule.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The schedule that has been removed.
*
* @var \CachetHQ\Cachet\Models\Schedule
*/
public $schedule;
/**
* Create a new schedule was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Schedule $schedule
*
* @return void
*/
public function __construct(User $user, Schedule $schedule)
{
$this->user = $user;
$this->schedule = $schedule;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Schedule was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Schedule;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Schedule;
use CachetHQ\Cachet\Models\User;
/**
* This is the schedule was updated event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class ScheduleWasUpdatedEvent implements ActionInterface, ScheduleEventInterface
{
/**
* The user that created the schedule.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The schedule that has been updated.
*
* @var \CachetHQ\Cachet\Models\Schedule
*/
public $schedule;
/**
* Create a new schedule was updated event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Schedule $schedule
*
* @return void
*/
public function __construct(User $user, Schedule $schedule)
{
$this->user = $user;
$this->schedule = $schedule;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Schedule was updated.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the subscriber event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface SubscriberEventInterface extends EventInterface
{
//
}

View File

@ -1,46 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
final class SubscriberHasSubscribedEvent implements SubscriberEventInterface
{
/**
* The subscriber who has subscribed.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a new subscriber has subscribed event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has subscribed.';
}
}

View File

@ -1,46 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
final class SubscriberHasUnsubscribedEvent implements SubscriberEventInterface
{
/**
* The subscriber who has unsubscribed.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a new subscriber has unsubscribed event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has unsubscribed.';
}
}

View File

@ -1,51 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
/**
* This is the subscriber has updated subscriptions event.
*
* @author James Brooks <james@alt-three.com>
*/
final class SubscriberHasUpdatedSubscriptionsEvent implements SubscriberEventInterface
{
/**
* The subscriber.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a new subscriber has updated subscriptions event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has updated subscription.';
}
}

View File

@ -1,46 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
final class SubscriberHasVerifiedEvent implements SubscriberEventInterface
{
/**
* The subscriber who has verified.
*
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
/**
* Create a new subscriber has subscribed event instance.
*
* @param \CachetHQ\Cachet\Models\Subscriber $subscriber
*
* @return void
*/
public function __construct(Subscriber $subscriber)
{
$this->subscriber = $subscriber;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'Subscriber has verified.';
}
}

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\System;
/**
* This is the system checked for updates event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class SystemCheckedForUpdatesEvent implements SystemEventInterface
{
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System checked for updated.';
}
}

View File

@ -1,24 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\System;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the system event interface.
*
* @author James Brooks <james@alt-three.com>
*/
interface SystemEventInterface extends EventInterface
{
//
}

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\System;
/**
* This is the system was installed event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class SystemWasInstalledEvent implements SystemEventInterface
{
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System was installed.';
}
}

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\System;
/**
* This is the system was reset event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class SystemWasResetEvent implements SystemEventInterface
{
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System was reset.';
}
}

View File

@ -1,30 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\System;
/**
* This is the system was updated event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class SystemWasUpdatedEvent implements SystemEventInterface
{
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'System was updated.';
}
}

View File

@ -1,75 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\Invite;
use CachetHQ\Cachet\Models\User;
/**
* This is the user accepted invite event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserAcceptedInviteEvent implements ActionInterface, UserEventInterface
{
/**
* The user that accepted the invite.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* The invite that the user accepted.
*
* @var \CachetHQ\Cachet\Models\Invite
*/
public $invite;
/**
* Create a new user accepted invite event class.
*
* @param \CachetHQ\Cachet\Models\User $user
* @param \CachetHQ\Cachet\Models\Invite $invite
*
* @return void
*/
public function __construct(User $user, Invite $invite)
{
$this->user = $user;
$this->invite = $invite;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User accepted invite.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user disabled two auth event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserDisabledTwoAuthEvent implements ActionInterface, UserEventInterface
{
/**
* The user that disabled two auth.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user disabled two auth event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User disabled two-factor authentication.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user enabled two auth event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserEnabledTwoAuthEvent implements ActionInterface, UserEventInterface
{
/**
* The user that enabled two auth.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user enabled two auth event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User enabled two-factor authentication.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,25 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\EventInterface;
/**
* This is the user event interface.
*
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
interface UserEventInterface extends EventInterface
{
//
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user failed two auth event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserFailedTwoAuthEvent implements ActionInterface, UserEventInterface
{
/**
* The user that failed two auth.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user failed two auth event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User failed two-factor authentication.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user logged in event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserLoggedInEvent implements ActionInterface, UserEventInterface
{
/**
* The user that logged in.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user logged in event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User logged in.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user logged out event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserLoggedOutEvent implements ActionInterface, UserEventInterface
{
/**
* The user that logged out.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user logged out event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User logged out.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user passed two auth event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserPassedTwoAuthEvent implements ActionInterface, UserEventInterface
{
/**
* The user that passed two auth.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user passed two auth event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User passed two-factor authentication.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user regenerated api token event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserRegeneratedApiTokenEvent implements ActionInterface, UserEventInterface
{
/**
* The user that regenerated their api token.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user regenerated api token event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User regenerated api token.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user was created event class.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserWasCreatedEvent implements ActionInterface, UserEventInterface
{
/**
* The user that has been added.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user was added event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was created.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,53 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Models\Invite;
/**
* This is the user was invited event class.
*
* @author Joseph Cohen <joe@alt-three.com>
* @author Graham Campbell <graham@alt-three.com>
* @author James Brooks <james@alt-three.com>
*/
final class UserWasInvitedEvent implements UserEventInterface
{
/**
* The invite that has been created.
*
* @var \CachetHQ\Cachet\Models\Invite
*/
public $invite;
/**
* Create a new user was invite event instance.
*
* @param \CachetHQ\Cachet\Models\Invite $invite
*
* @return void
*/
public function __construct(Invite $invite)
{
$this->invite = $invite;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was invited.';
}
}

View File

@ -1,60 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
final class UserWasRemovedEvent implements ActionInterface, UserEventInterface
{
/**
* The user that has been removed.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user was removed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was removed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,65 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Events\User;
use CachetHQ\Cachet\Bus\Events\ActionInterface;
use CachetHQ\Cachet\Models\User;
/**
* This is the user was welcomed event.
*
* @author James Brooks <james@alt-three.com>
*/
final class UserWasWelcomedEvent implements ActionInterface, UserEventInterface
{
/**
* The user.
*
* @var \CachetHQ\Cachet\Models\User
*/
public $user;
/**
* Create a new user was welcomed event instance.
*
* @param \CachetHQ\Cachet\Models\User $user
*
* @return void
*/
public function __construct(User $user)
{
$this->user = $user;
}
/**
* Get the event description.
*
* @return string
*/
public function __toString()
{
return 'User was welcomed.';
}
/**
* Get the event action.
*
* @return array
*/
public function getAction()
{
return [
'user' => $this->user,
'description' => (string) $this,
];
}
}

View File

@ -1,24 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Exceptions\Component;
use CachetHQ\Cachet\Bus\Exceptions\ExceptionInterface;
/**
* This is the component exception interface.
*
* @author James Brooks <james@alt-three.com>
*/
interface ComponentExceptionInterface extends ExceptionInterface
{
//
}

View File

@ -1,24 +0,0 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Cachet\Bus\Exceptions\ComponentGroup;
use CachetHQ\Cachet\Bus\Exceptions\ExceptionInterface;
/**
* This is the component group exception interface.
*
* @author James Brooks <james@alt-three.com>
*/
interface ComponentGroup extends ExceptionInterface
{
//
}

Some files were not shown because too many files have changed in this diff Show More