assertValidIdentifier() публичный статический Метод

Assertion for Oracle identifiers.
public static assertValidIdentifier ( string $identifier )
$identifier string
Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function lastInsertId($name = null)
 {
     if ($name === null) {
         return false;
     }
     OraclePlatform::assertValidIdentifier($name);
     $sql = 'SELECT ' . $name . '.CURRVAL FROM DUAL';
     $stmt = $this->query($sql);
     $result = $stmt->fetch(\PDO::FETCH_ASSOC);
     if ($result === false || !isset($result['CURRVAL'])) {
         throw new OCI8Exception("lastInsertId failed: Query was executed but no result was returned.");
     }
     return (int) $result['CURRVAL'];
 }