master

laravel/framework

Last updated at: 29/12/2023 09:21

ConnectorInterface.php

TLDR

The file ConnectorInterface.php is an interface file that defines a contract for database connection classes. It provides a single method connect() that should be implemented by classes that want to establish a database connection.

Methods

connect

This method is responsible for establishing a database connection. It takes an array $config as a parameter, which contains the configuration details for the connection. The method should return an instance of the \PDO class, which represents the database connection.

Classes

No classes are defined in this file.

<?php

namespace Illuminate\Database\Connectors;

interface ConnectorInterface
{
    /**
     * Establish a database connection.
     *
     * @param  array  $config
     * @return \PDO
     */
    public function connect(array $config);
}