public function SFID::__construct in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 src/SFID.php \Drupal\salesforce\SFID::__construct()
- 5.0.x src/SFID.php \Drupal\salesforce\SFID::__construct()
SFID constructor.
Parameters
string $id: The SFID.
Throws
\Exception
File
- src/
SFID.php, line 23
Class
- SFID
- Class SFID.
Namespace
Drupal\salesforceCode
public function __construct($id) {
if (strlen($id) != 15 && strlen($id) != self::MAX_LENGTH) {
throw new \Exception('Invalid sfid ' . strlen($id));
}
$this->id = $id;
if (strlen($this->id) == 15) {
$this->id = self::convertId($id);
}
}