Google\Cloud\Logging\Metric::__construct PHP Method

__construct() public method

public __construct ( Google\Cloud\Logging\Connection\ConnectionInterface $connection, string $name, string $projectId, array $info = [] )
$connection Google\Cloud\Logging\Connection\ConnectionInterface Represents a connection to Cloud Logging.
$name string The metric's name.
$projectId string The project's ID.
$info array [optional] The metric's metadata.
    public function __construct(ConnectionInterface $connection, $name, $projectId, array $info = [])
    {
        $this->connection = $connection;
        $this->info = $info;
        $this->formattedName = "projects/{$projectId}/metrics/{$name}";
        $this->name = $name;
    }