VersionPress\Database\DbSchemaInfo::trimPrefix PHP Method

trimPrefix() public method

public trimPrefix ( $tableName )
    public function trimPrefix($tableName)
    {
        return substr($tableName, strlen($this->prefix));
    }

Usage Example

 public function delete($table, $where, $parentIds)
 {
     if ($this->disabled) {
         return;
     }
     $entityInfo = $this->dbSchemaInfo->getEntityInfoByPrefixedTableName($table);
     if ($entityInfo) {
         $this->deleteEntity($table, $where, $parentIds);
         return;
     }
     $referenceDetails = $this->dbSchemaInfo->getMnReferenceDetails($this->dbSchemaInfo->trimPrefix($table));
     if ($referenceDetails) {
         $this->deleteReference($referenceDetails, $where);
     }
 }
All Usage Examples Of VersionPress\Database\DbSchemaInfo::trimPrefix