You are here

public static function SFID::isValid in Salesforce Suite 5.0.x

Same name and namespace in other branches
  1. 8.4 src/SFID.php \Drupal\salesforce\SFID::isValid()

Returns TRUE if $id is a valid length.

Parameters

string $id: An sfid.

Return value

bool Returns TRUE if $id is a valid length.

2 calls to SFID::isValid()
SFID::createIfValid in src/SFID.php
Given a potential SFID, return a new SFID object if it's valid.
SObject::createIfValid in src/SObject.php
Given SObject data, instantiate a new SObject if data is valid.

File

src/SFID.php, line 64

Class

SFID
Class SFID.

Namespace

Drupal\salesforce

Code

public static function isValid($id) {
  return strlen($id) == 15 || strlen($id) == self::MAX_LENGTH;
}