You are here

class Garage in GraphQL 8.3

Same name in this branch
  1. 8.3 tests/modules/graphql_plugin_test/src/Garage.php \Drupal\graphql_plugin_test\Garage
  2. 8.3 tests/modules/graphql_plugin_test/src/Plugin/GraphQL/Fields/Garage.php \Drupal\graphql_plugin_test\Plugin\GraphQL\Fields\Garage

Garage implementation.

Dummy implementation for the sake of of a complete service definition. To be replaced with prophecies in tests.

Hierarchy

Expanded class hierarchy of Garage

1 string reference to 'Garage'
graphql_plugin_test.services.yml in tests/modules/graphql_plugin_test/graphql_plugin_test.services.yml
tests/modules/graphql_plugin_test/graphql_plugin_test.services.yml
1 service uses Garage
graphql_test.garage in tests/modules/graphql_plugin_test/graphql_plugin_test.services.yml
Drupal\graphql_plugin_test\Garage

File

tests/modules/graphql_plugin_test/src/Garage.php, line 11

Namespace

Drupal\graphql_plugin_test
View source
class Garage implements GarageInterface {

  /**
   * The list of parked vehicles.
   *
   * @var array
   */
  protected $vehicles = [];

  /**
   * {@inheritdoc}
   */
  public function getVehicles() {
    return [];
  }

  /**
   * {@inheritdoc}
   */
  public function insertVehicle(array $vehicle, $lot = NULL) {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function getVehicle($lot) {
    return NULL;
  }

  /**
   * {@inheritdoc}
   */
  public function removeVehicle($lot) {
    return NULL;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Garage::$vehicles protected property The list of parked vehicles.
Garage::getVehicle public function Get vehicle by parking lot. Overrides GarageInterface::getVehicle
Garage::getVehicles public function Retrieve a list of vehicles. Overrides GarageInterface::getVehicles
Garage::insertVehicle public function Add a vehicle to your garage. Overrides GarageInterface::insertVehicle
Garage::removeVehicle public function Remove a vehicle from the garage. Overrides GarageInterface::removeVehicle