110 lines
3.1 KiB
YAML
110 lines
3.1 KiB
YAML
|
name: MonitorCommand
|
||
|
class_comment: null
|
||
|
dependencies:
|
||
|
- name: Dispatcher
|
||
|
type: class
|
||
|
source: Illuminate\Contracts\Events\Dispatcher
|
||
|
- name: ConnectionResolverInterface
|
||
|
type: class
|
||
|
source: Illuminate\Database\ConnectionResolverInterface
|
||
|
- name: DatabaseBusy
|
||
|
type: class
|
||
|
source: Illuminate\Database\Events\DatabaseBusy
|
||
|
- name: AsCommand
|
||
|
type: class
|
||
|
source: Symfony\Component\Console\Attribute\AsCommand
|
||
|
properties:
|
||
|
- name: signature
|
||
|
visibility: protected
|
||
|
comment: '# * The name and signature of the console command.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: description
|
||
|
visibility: protected
|
||
|
comment: '# * The console command description.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var string'
|
||
|
- name: connection
|
||
|
visibility: protected
|
||
|
comment: '# * The connection resolver instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Database\ConnectionResolverInterface'
|
||
|
- name: events
|
||
|
visibility: protected
|
||
|
comment: '# * The events dispatcher instance.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @var \Illuminate\Contracts\Events\Dispatcher'
|
||
|
methods:
|
||
|
- name: __construct
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: connection
|
||
|
- name: events
|
||
|
comment: "# * The name and signature of the console command.\n# *\n# * @var string\n\
|
||
|
# */\n# protected $signature = 'db:monitor\n# {--databases= : The database connections\
|
||
|
\ to monitor}\n# {--max= : The maximum number of connections that can be open\
|
||
|
\ before an event is dispatched}';\n# \n# /**\n# * The console command description.\n\
|
||
|
# *\n# * @var string\n# */\n# protected $description = 'Monitor the number of\
|
||
|
\ connections on the specified database';\n# \n# /**\n# * The connection resolver\
|
||
|
\ instance.\n# *\n# * @var \\Illuminate\\Database\\ConnectionResolverInterface\n\
|
||
|
# */\n# protected $connection;\n# \n# /**\n# * The events dispatcher instance.\n\
|
||
|
# *\n# * @var \\Illuminate\\Contracts\\Events\\Dispatcher\n# */\n# protected $events;\n\
|
||
|
# \n# /**\n# * Create a new command instance.\n# *\n# * @param \\Illuminate\\\
|
||
|
Database\\ConnectionResolverInterface $connection\n# * @param \\Illuminate\\\
|
||
|
Contracts\\Events\\Dispatcher $events"
|
||
|
- name: handle
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * Execute the console command.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @return void'
|
||
|
- name: parseDatabases
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: databases
|
||
|
comment: '# * Parse the database into an array of the connections.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param string $databases
|
||
|
|
||
|
# * @return \Illuminate\Support\Collection'
|
||
|
- name: displayConnections
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: databases
|
||
|
comment: '# * Display the databases and their connection counts in the console.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Illuminate\Support\Collection $databases
|
||
|
|
||
|
# * @return void'
|
||
|
- name: dispatchEvents
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: databases
|
||
|
comment: '# * Dispatch the database monitoring events.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @param \Illuminate\Support\Collection $databases
|
||
|
|
||
|
# * @return void'
|
||
|
traits:
|
||
|
- Illuminate\Contracts\Events\Dispatcher
|
||
|
- Illuminate\Database\ConnectionResolverInterface
|
||
|
- Illuminate\Database\Events\DatabaseBusy
|
||
|
- Symfony\Component\Console\Attribute\AsCommand
|
||
|
interfaces: []
|