-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSalesforceProxy.php
More file actions
44 lines (38 loc) · 1.2 KB
/
SalesforceProxy.php
File metadata and controls
44 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
declare(strict_types=1);
namespace MatchBot\Domain;
use Doctrine\ORM\Mapping as ORM;
/**
* @see SalesforceReadProxy
* @see SalesforceWriteProxy
*/
abstract class SalesforceProxy extends Model
{
/**
* @deprecated - treat as private, access via getters and setters unless you know the instance
* is already loaded from the DB, to allow Doctrine Proxies to do their lazy-loading thing. (update - may not be
* an issue now doctrine proxies are replaced by PHP Lazy Objects)
*
* Actually setting as private breaks use of this property by the ORM for child classes.
*
* @var string|null Nullable because write proxies may be created before the first Salesforce push
*/
#[ORM\Column(length: 18, unique: true, nullable: true)]
protected ?string $salesforceId = null;
/**
* @return string
*/
public function getSalesforceId(): ?string
{
/** @psalm-suppress DeprecatedProperty */
return $this->salesforceId;
}
/**
* @param string $salesforceId
*/
public function setSalesforceId(string $salesforceId): void
{
/** @psalm-suppress DeprecatedProperty */
$this->salesforceId = $salesforceId;
}
}