| 1 |
<?php |
| 2 |
/** |
| 3 |
* MLS provider adapter: MLS Grid (RESO Web API standard). |
| 4 |
* |
| 5 |
* Owns MLS Grid identity and saved-token login behavior. |
| 6 |
*/ |
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
// Block direct web access — only load when WordPress is bootstrapped. |
| 9 |
exit; // Exit if accessed directly |
| 10 |
} |
| 11 |
|
| 12 |
/* |
| 13 |
* To change this license header, choose License Headers in Project Properties. |
| 14 |
* To change this template file, choose Tools | Templates |
| 15 |
* and open the template in the editor. |
| 16 |
*/ |
| 17 |
|
| 18 |
/** |
| 19 |
* MLS Grid Provider Family adapter. |
| 20 |
* |
| 21 |
* @author cretu |
| 22 |
*/ |
| 23 |
class MlsgridResoClass extends ResoBase { |
| 24 |
|
| 25 |
/** @var string Stable provider type saved for MLS Grid. */ |
| 26 |
protected $provider_type = 'mlsgrid'; |
| 27 |
|
| 28 |
/** @var bool MLS Grid sends its saved bearer token unchanged. */ |
| 29 |
protected $direct_uses_stored_token = true; |
| 30 |
|
| 31 |
// Active theme adapter (e.g. ResidenceClass) this provider maps RESO fields through. |
| 32 |
public $theme_importer; |
| 33 |
|
| 34 |
/** |
| 35 |
* Store the theme importer so RESO-to-theme mapping can delegate to it. |
| 36 |
* |
| 37 |
* @param object $theme_importer The active theme adapter instance. |
| 38 |
*/ |
| 39 |
public function __construct( $theme_importer ) { |
| 40 |
// Keep the theme adapter reference for later field mapping. |
| 41 |
$this->theme_importer = $theme_importer; |
| 42 |
} |
| 43 |
} |
| 44 |
|