Overview

Namespaces

  • PipelinerSales
    • ApiClient
      • Http
      • Query
      • Repository
        • Rest

Classes

  • RestCreatedResponse
  • RestInfoMethods
  • RestRepository
  • RestRepositoryFactory
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: /**
 3:  * This file is part of the Pipeliner API client library for PHP
 4:  *
 5:  * Copyright 2014 Pipelinersales, Inc. All Rights Reserved.
 6:  * For the full license information, see the attached LICENSE file.
 7:  */
 8: 
 9: namespace PipelinerSales\ApiClient\Repository\Rest;
10: 
11: use PipelinerSales\ApiClient\Repository\RepositoryFactoryInterface;
12: 
13: class RestRepositoryFactory implements RepositoryFactoryInterface
14: {
15:     private $baseUrl;
16:     private $httpClient;
17:     private $dateTimeFormat;
18:     
19:     public function __construct($baseUrl, $httpClient, $dateTimeFormat)
20:     {
21:         $this->baseUrl = $baseUrl;
22:         $this->httpClient = $httpClient;
23:         $this->dateTimeFormat = $dateTimeFormat;
24:     }
25: 
26:     public function createRepository($entitySingular, $entityPlural)
27:     {
28:         return new RestRepository(
29:             $this->baseUrl,
30:             $entitySingular,
31:             $entityPlural,
32:             $this->httpClient,
33:             $this->dateTimeFormat
34:         );
35:     }
36: }
37: 
API documentation generated by ApiGen