AbstractCmd::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
/**
4
 * @file AbstractCmd.php
5
 * @brief This file contains the AbstractCmd class.
6
 * @details
7
 * @author Filippo F. Fadda
8
 */
9
10
11
//! This namespace contains all the available concrete commands.
12
namespace EoC\Command;
13
14
15
use EoC\Server;
16
17
18
/*
19
 * @brief This class defines the ancestor for all the concrete Server commands.
20
 * @details To create a new command you must inherit from this class. This is the only extension point for commands.
21
 * In case of CouchDB design documents' structure changes, you just need to create a new command, starting from here.
22
 * @nosubgrouping
23
 */
24
abstract class AbstractCmd implements CmdInterface {
25
26
  protected $server;
27
  protected $args;
28
29
30
  /**
31
   * @brief Creates an instance of a concrete command.
32
   * @param[in] Server $server An instance of Server class.
33
   * @param[in] array $args An array of arguments.
34
   */
35
  public function __construct(Server $server, $args) {
36
    $this->server = $server;
37
    $this->args = $args;
38
  }
39
40
}