mirror of
https://github.com/cachethq/cachet.git
synced 2026-03-04 01:57:00 +00:00
Compare commits
191 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e9f4ce32f | ||
|
|
207a6d5a7c | ||
|
|
babd6a5945 | ||
|
|
2d68ba19a9 | ||
|
|
a3a779ea8a | ||
|
|
38274652bb | ||
|
|
d392728a7d | ||
|
|
9f2d98a9f4 | ||
|
|
5046884dc2 | ||
|
|
c056b11524 | ||
|
|
593c4a9e43 | ||
|
|
fee62bcb3b | ||
|
|
d6fb55a4d8 | ||
|
|
3326b561a8 | ||
|
|
6baf287e20 | ||
|
|
f5c60c476f | ||
|
|
4c5573b6c0 | ||
|
|
5bc280f4a2 | ||
|
|
f42ff814b9 | ||
|
|
d5a687a2ff | ||
|
|
d212005ddc | ||
|
|
c456c663f0 | ||
|
|
7569f5bbf7 | ||
|
|
c896e23126 | ||
|
|
fd0bb2ad75 | ||
|
|
eb2b47d69a | ||
|
|
8d3ef53d8b | ||
|
|
f2da773549 | ||
|
|
aabb4b8557 | ||
|
|
9a07f0ba21 | ||
|
|
b18e5c9571 | ||
|
|
aaae03440d | ||
|
|
93a9f8a253 | ||
|
|
c1b12e5c47 | ||
|
|
36aff48121 | ||
|
|
720b9952ae | ||
|
|
58be81bd9a | ||
|
|
a8456116cd | ||
|
|
da3d9e3688 | ||
|
|
4fcd3bc78b | ||
|
|
d22d5f529a | ||
|
|
dea20e5ffb | ||
|
|
2e3fc293be | ||
|
|
6bf8a58a83 | ||
|
|
8453501d72 | ||
|
|
5e6e01f017 | ||
|
|
586a8c1b37 | ||
|
|
92ad41e4a1 | ||
|
|
0ee1e3c43a | ||
|
|
4b798155b2 | ||
|
|
007e6e369a | ||
|
|
717c22b3b3 | ||
|
|
5de867b2c5 | ||
|
|
1c34a7208f | ||
|
|
ccd1b736d7 | ||
|
|
ed9f3929e0 | ||
|
|
5a1ca0950b | ||
|
|
127df0b80d | ||
|
|
d2a985e11b | ||
|
|
c1afec675d | ||
|
|
667775f202 | ||
|
|
e9d31a5062 | ||
|
|
4e7bf5b023 | ||
|
|
7acec4785c | ||
|
|
b2697747d2 | ||
|
|
cafde72b76 | ||
|
|
4bf2598bf3 | ||
|
|
0f55f23e06 | ||
|
|
f6e20ca613 | ||
|
|
688a12e20b | ||
|
|
d5bf53c6cc | ||
|
|
f8627539b5 | ||
|
|
03fe62565b | ||
|
|
7ab27a9bff | ||
|
|
0e00d09433 | ||
|
|
81796b27f0 | ||
|
|
da4bdf4291 | ||
|
|
2d969d7eb5 | ||
|
|
5d98c2348e | ||
|
|
d0a47f96e7 | ||
|
|
e2678fe3b9 | ||
|
|
58068c6f3c | ||
|
|
cfdd202489 | ||
|
|
4700f76e26 | ||
|
|
580ef3fac7 | ||
|
|
e567c37cb2 | ||
|
|
f60baaaeb3 | ||
|
|
002a3d0341 | ||
|
|
6afa72edbb | ||
|
|
8d74ba1fb3 | ||
|
|
ff01e419f2 | ||
|
|
2a690404b8 | ||
|
|
e7fae333ac | ||
|
|
f63fa0bfc7 | ||
|
|
3aaeac54d0 | ||
|
|
11c9113a70 | ||
|
|
a88027b434 | ||
|
|
b922ba5a40 | ||
|
|
bde1f2bc0f | ||
|
|
e0e3a2bb7d | ||
|
|
4ebeba1159 | ||
|
|
8d4a5d9963 | ||
|
|
e69ddaf7e9 | ||
|
|
ee1204c841 | ||
|
|
f75781ab78 | ||
|
|
1e729a00ec | ||
|
|
a6d79fe15e | ||
|
|
cc3a971ff8 | ||
|
|
a382d061e5 | ||
|
|
22ddcaaa93 | ||
|
|
1f14005ea7 | ||
|
|
b4fe9882ef | ||
|
|
5a298fbe16 | ||
|
|
aa033c4c1a | ||
|
|
8ce5e05030 | ||
|
|
05b21a8703 | ||
|
|
d84e8e949d | ||
|
|
bc43ef6d73 | ||
|
|
883d2e7329 | ||
|
|
4f46337d7d | ||
|
|
bea9b79a70 | ||
|
|
e770832a0d | ||
|
|
b534f1c77b | ||
|
|
35f0408a83 | ||
|
|
92233e354e | ||
|
|
f38555174a | ||
|
|
5162f80a98 | ||
|
|
ef2b864bcc | ||
|
|
3913dfebe3 | ||
|
|
39f148d672 | ||
|
|
87734388c8 | ||
|
|
d5721ea578 | ||
|
|
8d34d43778 | ||
|
|
de1670d08a | ||
|
|
8af273215b | ||
|
|
86a72ea382 | ||
|
|
9cf1ff5f17 | ||
|
|
2dc2ecbfcc | ||
|
|
6f12f9403e | ||
|
|
de96a9ce28 | ||
|
|
eea007a9d3 | ||
|
|
962685aa12 | ||
|
|
a6e9dd1c3e | ||
|
|
e4780b3278 | ||
|
|
4d9fe2f9c9 | ||
|
|
00c661b0ba | ||
|
|
a3ca218f97 | ||
|
|
5fd59c5b05 | ||
|
|
72f3592f58 | ||
|
|
a2213c9d2c | ||
|
|
9909bc665d | ||
|
|
5acc978d60 | ||
|
|
96a22a9c34 | ||
|
|
ffbed0c296 | ||
|
|
5423df61cf | ||
|
|
ee23e952a6 | ||
|
|
6624a761a8 | ||
|
|
d488e70a66 | ||
|
|
dd1c361dac | ||
|
|
58c7d37fe3 | ||
|
|
e872b479e9 | ||
|
|
5daad9303d | ||
|
|
6295ded597 | ||
|
|
3960e52135 | ||
|
|
7a07548748 | ||
|
|
952cada198 | ||
|
|
322a11dced | ||
|
|
6111bc0433 | ||
|
|
8c86dc350f | ||
|
|
f31c514d38 | ||
|
|
7ab855f2ff | ||
|
|
7c2a6ffe92 | ||
|
|
9655626ee2 | ||
|
|
cbc4695e79 | ||
|
|
f43026bbd0 | ||
|
|
c01ea14981 | ||
|
|
441a09c54a | ||
|
|
090ce6c474 | ||
|
|
b5fde23075 | ||
|
|
b39c466907 | ||
|
|
b42e5b9726 | ||
|
|
a85a36df58 | ||
|
|
69497078e9 | ||
|
|
cf4260e5f9 | ||
|
|
cf674850dd | ||
|
|
8b565ab7f0 | ||
|
|
3300157be1 | ||
|
|
91e4d8aba7 | ||
|
|
19fcfd4420 | ||
|
|
c73d5e0799 | ||
|
|
2d0ef4ebd5 |
@@ -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
|
||||
|
||||
94
.env.example
94
.env.example
@@ -1,44 +1,72 @@
|
||||
APP_ENV=production
|
||||
APP_DEBUG=false
|
||||
APP_URL=http://localhost
|
||||
APP_TIMEZONE=UTC
|
||||
APP_NAME=Cachet
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
DEBUGBAR_ENABLED=false
|
||||
APP_DEBUG=true
|
||||
APP_TIMEZONE=UTC
|
||||
APP_URL=http://cachet.test
|
||||
|
||||
DB_DRIVER=mysql
|
||||
DB_HOST=localhost
|
||||
DB_UNIX_SOCKET=null
|
||||
DB_DATABASE=cachet
|
||||
DB_USERNAME=homestead
|
||||
DB_PASSWORD=secret
|
||||
DB_PORT=null
|
||||
DB_PREFIX=null
|
||||
APP_LOCALE=en
|
||||
APP_FALLBACK_LOCALE=en
|
||||
APP_FAKER_LOCALE=en_US
|
||||
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
QUEUE_DRIVER=sync
|
||||
APP_MAINTENANCE_DRIVER=file
|
||||
# APP_MAINTENANCE_STORE=database
|
||||
|
||||
CACHET_BEACON=true
|
||||
CACHET_EMOJI=false
|
||||
CACHET_AUTO_TWITTER=true
|
||||
BCRYPT_ROUNDS=12
|
||||
|
||||
MAIL_DRIVER=log
|
||||
MAIL_HOST=null
|
||||
MAIL_PORT=null
|
||||
LOG_CHANNEL=stack
|
||||
LOG_STACK=single
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=sqlite
|
||||
# DB_HOST=127.0.0.1
|
||||
# DB_PORT=3306
|
||||
# DB_DATABASE=laravel
|
||||
# DB_USERNAME=root
|
||||
# DB_PASSWORD=
|
||||
|
||||
SESSION_DRIVER=database
|
||||
SESSION_LIFETIME=120
|
||||
SESSION_ENCRYPT=false
|
||||
SESSION_PATH=/
|
||||
SESSION_DOMAIN=null
|
||||
|
||||
BROADCAST_CONNECTION=log
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=database
|
||||
|
||||
CACHE_STORE=database
|
||||
CACHE_PREFIX=
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_CLIENT=phpredis
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=127.0.0.1
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ADDRESS=null
|
||||
MAIL_NAME=null
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
REDIS_HOST=null
|
||||
REDIS_DATABASE=null
|
||||
REDIS_PORT=null
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
GITHUB_TOKEN=null
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
|
||||
NEXMO_KEY=null
|
||||
NEXMO_SECRET=null
|
||||
NEXMO_SMS_FROM=Cachet
|
||||
CACHET_BEACON=false
|
||||
CACHET_EMOJI=false
|
||||
CACHET_AUTO_TWITTER=true
|
||||
CACHET_PATH=/
|
||||
CACHET_TRUSTED_PROXIES=""
|
||||
|
||||
TRUSTED_PROXIES=
|
||||
NIGHTWATCH_ENABLED=false
|
||||
|
||||
29
.github/dependabot.yml
vendored
Normal file
29
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: composer
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "07:00"
|
||||
groups:
|
||||
php-dependencies:
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
||||
allow:
|
||||
- dependency-type: direct
|
||||
versioning-strategy: increase-if-necessary
|
||||
|
||||
- package-ecosystem: npm
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
day: monday
|
||||
groups:
|
||||
js-dependencies:
|
||||
update-types:
|
||||
- "minor"
|
||||
- "patch"
|
||||
allow:
|
||||
- dependency-type: direct
|
||||
versioning-strategy: increase-if-necessary
|
||||
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,12 +1,22 @@
|
||||
/.phpunit.cache
|
||||
/node_modules
|
||||
/public/build
|
||||
/public/hot
|
||||
/public/storage
|
||||
/public/css/filament
|
||||
/public/js/filament
|
||||
/public/vendor/cachethq/cachet
|
||||
/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
|
||||
|
||||
38
.travis.yml
38
.travis.yml
@@ -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
12
LICENSE
@@ -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.
|
||||
50
LICENSE.md
Normal file
50
LICENSE.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Cachet license
|
||||
|
||||
This License from Alt Three Services Limited. (“Cachet”) governs your use of the accompanying Software. By using the Software, you accept the terms of this License. The Cachet software is copyrighted by Alt Three Services Limited.
|
||||
|
||||
## Permissions
|
||||
|
||||
Subject to the following conditions, you are permitted to:
|
||||
|
||||
- Use the Software in your commercial or non-commercial projects.
|
||||
- Modify the Software to suit your needs.
|
||||
- Bundle the Software with your own projects.
|
||||
- Submit modifications of the Software to Cachet.
|
||||
|
||||
## Conditions
|
||||
|
||||
In exchange for these permissions, you agree:
|
||||
|
||||
- Not to remove any copyright or other notices from the Software.
|
||||
- Not to make the Software available under a license that supersedes or negates the effect of this License.
|
||||
- Not to distribute the Software or modifications of the Software as a standalone product, but only as part of another application.
|
||||
- To include a verbatim copy of this License in any distribution of the Software.
|
||||
- To comply with Cachet's [trademark policy](https://github.com/cachethq/core/blob/main/TRADEMARKS.md).
|
||||
|
||||
### Termination
|
||||
|
||||
Your license to use the Software will terminate automatically if you breach any terms of this License or initiate a copyright, trade secret, or patent claim against Cachet, any of its affiliates, or any user of the Software (including as modified by you).
|
||||
|
||||
### Disclaimer of Warranties
|
||||
|
||||
The Software is provided "AS IS," without any warranties. This includes any implied warranties of merchantability, fitness for a particular purpose, or non-infringement. You must pass this disclaimer on whenever you distribute the Software or derivative works.
|
||||
|
||||
### Limitation of Liability
|
||||
|
||||
Cachet is not liable for any damages related to the Software or this License, including direct, indirect, special, or incidental damages, to the fullest extent permitted by law. You must pass this limitation of liability on whenever you distribute the Software or derivative works.
|
||||
|
||||
### Governing Law
|
||||
|
||||
This License is governed by the laws of Delaware, and the parties consent to exclusive jurisdiction in Delaware courts. The parties waive all defenses of lack of personal jurisdiction and forum non-conveniens.
|
||||
|
||||
### Entire Agreement / Assignment
|
||||
|
||||
This License is the entire agreement between the parties, and supersedes any and all prior agreements, understandings or communications, written or oral, between the parties relating to the subject matter hereof. This License may be assigned by Cachet without your prior consent.
|
||||
|
||||
### Reservation of Rights
|
||||
|
||||
Alt Three Services Limited reserves all rights not expressly granted to you in this License. Alt Three Services Limited owns all right, title, and interest in and to the Software.
|
||||
|
||||
## Alternative License
|
||||
|
||||
For alternative licensing, please contact support@cachethq.io.
|
||||
38
README.md
38
README.md
@@ -5,32 +5,17 @@
|
||||
</picture>
|
||||
</p>
|
||||
|
||||
Cachet, the open-source status page system.
|
||||
Cachet, the open-source self-hosted 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
|
||||
|
||||
- List your service components
|
||||
- Report incidents
|
||||
- Customise the look of your status page
|
||||
- Markdown support for incident messages
|
||||
- A powerful JSON API
|
||||
- Metrics
|
||||
- Multi-lingual
|
||||
- Subscriber notifications via email
|
||||
- Two factor authentication
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 7.1.3 – 7.3
|
||||
- HTTP server with PHP support (e.g.: Apache, Nginx, Caddy)
|
||||
- PHP 8.2 or later
|
||||
- [Composer](https://getcomposer.org)
|
||||
- A supported database: MySQL, PostgreSQL or SQLite
|
||||
- A supported database: MariaDB, MySQL, PostgreSQL or SQLite
|
||||
|
||||
## Installation, Upgrades and Documentation
|
||||
|
||||
@@ -38,18 +23,27 @@ You can find documentation at [https://docs.cachethq.io](https://docs.cachethq.i
|
||||
|
||||
Here are some useful quick links:
|
||||
|
||||
- [Installing Cachet](https://docs.cachethq.io/installation/)
|
||||
- [Getting started with Docker](https://docs.cachethq.io/installation/docker)
|
||||
- [Installing Cachet](https://docs.cachethq.io/v3.x/installation)
|
||||
|
||||
### 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@test.com`
|
||||
- **Password:** `test123`
|
||||
|
||||
> **Note**
|
||||
> The demo will automatically reset every 30 minutes.
|
||||
>
|
||||
## Sponsors
|
||||
|
||||
<p align="center">
|
||||
<a href="https://jump24.co.uk"><img width="100px" src="https://github.com/jumptwentyfour.png" alt="Jump24"></a>
|
||||
<a href="https://dreamtilt.com.au"><img width="100px" src="https://github.com/dreamtilt.png" alt="Dreamtilt"></a>
|
||||
<a href="https://xyphen-it.nl"><img width="100px" src="https://github.com/xyphen-it.png" alt="Xyphen-IT"></a>
|
||||
<a href="https://coderabbit.ai/"><img width="100px" src="https://github.com/coderabbitai.png" alt="Code Rabbit"></a>
|
||||
<a href="https://scramble.dedoc.co/"><img width="100px" src="https://github.com/dedoc.png" alt="de:doc"></a>
|
||||
</p>
|
||||
|
||||
## Security Vulnerabilities
|
||||
|
||||
|
||||
66
TRADEMARKS.md
Normal file
66
TRADEMARKS.md
Normal file
@@ -0,0 +1,66 @@
|
||||
# Cachet Trademark Guidelines
|
||||
|
||||
This trademark policy was prepared to help you understand how to use the Cachet trademarks, service marks and logos.
|
||||
|
||||
While the copyright to our open source software is licensed under the Cachet license, our trademarks appearing in or on the open source software are the exclusive property of Cachet Inc. This means that our open source license does not include a license to use our trademarks.
|
||||
|
||||
Because we make some of our code available to download and modify, proper use of our trademarks is essential to inform people whether or not Cachet stands behind a product or service. When using Cachet trademarks, you must comply with these Cachet Trademark Guidelines.
|
||||
|
||||
This policy is intended to explain how to use our trademarks in a way that is consistent with background law and community expectations. This policy covers:
|
||||
|
||||
1. Our word trademarks and service marks: Cachet
|
||||
2. Our logos: The Cachet logos
|
||||
|
||||
This policy encompasses all trademarks and service marks, whether they are registered or not.
|
||||
|
||||
## General guidelines
|
||||
|
||||
Whenever you use one of our marks, you must always do so in a way that does not mislead anyone about what they are getting and from whom.
|
||||
|
||||
Do not use the Cachet marks in any way that could mistakenly imply that Cachet has reviewed, approved or guaranteed your goods or services. You also cannot use our logo on your website in a way that suggests that your website is an official website or that we endorse your website. You can, though, say you like the Cachet software, that you use Cachet, that the analytics are powered by Cachet or that you participate in the Cachet community.
|
||||
|
||||
Do not use the "Cachet" prefix in a way that could mistakenly imply that your product is related to Cachet. For example, an analytics product that uses Cachet should not use the name "cachetanalytics".
|
||||
|
||||
You may not use or register our marks or variations of them as part of your trademark, business, product, service, app, domain name, social media account or business indicator. You may not use our marks as a part of an advertising campaign. You may not display Cachet trademarks more prominently than your product, service or company name. You may not use Cachet trademarks on merchandise for sale (e.g., selling t-shirts, mugs, etc).
|
||||
|
||||
Trademark law does not allow your use of names or trademarks that are too similar to ours. You therefore may not use an obvious variation of any of our marks or any phonetic equivalent, foreign language equivalent, takeoff, or abbreviation for a similar or compatible product or service.
|
||||
|
||||
## Acceptable uses
|
||||
|
||||
You can use the Cachet name to truthfully and accurately refer to or identify Cachet and its products and services in the following instances:
|
||||
|
||||
- To refer to Cachet and its products and services in news articles and other content without alteration
|
||||
- To discuss Cachet and its products in a fair and honest manner that does not suggest sponsorship or endorsement by or affiliation with Cachet
|
||||
- To refer to and/or to link to the products and services hosted on Cachet’s servers and website
|
||||
- To indicate if your product, service or solution integrates, or is interoperable or compatible, with Cachet, for example, “we offer a simple integration with Cachet”, provided that doing so does not create a likelihood of confusion as to the origin of such product, service, or solution
|
||||
- You may use our word marks as part of a public subdomain solely for the purpose of serving as the URL for your self-managed Cachet instance, for example, cachethq.iopanyname.com
|
||||
|
||||
## Prohibited uses
|
||||
|
||||
Unless you have express written permission from Cachet, or your use is permitted pursuant to the acceptable uses set forth above, the use of Cachet trademarks is strictly prohibited. Here is a short, non-exhaustive list of the kinds of uses that are not permitted without Cachet’s express written permission but that Cachet may consider granting you the right to do should you request permission:
|
||||
|
||||
- Use of Cachet trademarks in connection with the provision of a public website that makes Cachet software available for installation and use on a server (rather than directing users to the official Cachet site)
|
||||
- Use of Cachet trademarks in connection with versions of Cachet products made publicly available or made available in the cloud on a managed service provider, resale or other commercial basis
|
||||
- Use of Cachet trademarks in connection with Cachet product bundled with other software
|
||||
|
||||
In the above cases:
|
||||
|
||||
- You must follow the terms of the open source license for Cachet software products and code
|
||||
- You must remove all of our logos from it and choose your branding, logos and trademarks that denote your unique identity to clearly signal to users that there is no affiliation with or endorsement by Cachet
|
||||
- You must not use any Cachet trademark in connection with the user-facing name, branding or marketing materials of your project
|
||||
- You may use word marks, but not our logos, in truthful statements that describe the relationship between your software and ours, for example, “this software is derived from the source code of the Cachet software”, as long as you also include a statement that your project is not officially associated with Cachet or its products
|
||||
- Cachet reserves the right in its sole discretion to (i) terminate, revoke, modify, or otherwise change permission to use the trademarks at any time and; (ii) object to any use or misuse of the trademarks in any jurisdiction worldwide. All changes to these guidelines are effective immediately when posted and your continued use of the trademarks following the posting of revised guidelines signifies your acceptance of such revision.
|
||||
|
||||
## To request the use of the trademarks
|
||||
|
||||
Anyone wishing to use any of Cachet’s trademarks in a manner other than the acceptable uses listed above, including but not limited to marketing, promotion or advertising, or on software derivative of Cachet software, must obtain Cachet’s express, written permission in advance.
|
||||
|
||||
To request the use of the trademarks in a manner or for a purpose not expressly permitted in these guidelines, including use for any purpose of the logos, please email [hello@cachethq.io](mailto:hello@cachethq.io) to discuss. If you need clarification on whether your use qualifies, please ask.
|
||||
|
||||
## To report misuse
|
||||
|
||||
If you want to report misuse of a Cachet trademark, please email [hello@cachethq.io](mailto:hello@cachethq.io).
|
||||
|
||||
Last updated: November 25 2024
|
||||
|
||||
These guidelines are based on the Model Trademark Guidelines, available at http://www.modeltrademarkguidelines.org., used under a Creative Commons Attribution 3.0 Unported license: https://creativecommons.org/licenses/by/3.0/deed.en_US
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
{
|
||||
//
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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.';
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user