lib/MwbExporter/Model/Table.php
protected function getForeignKeyReferenceCount($fkey, $max = null)
    {
        $count = 0;
        $tablename = $fkey->getReferencedTable()->getRawTableName();
        $columns = array();
        foreach ($this->getColumns() as $column) {
            foreach ($column->getForeignKeys() as $foreignKey) {
                // process only unique foreign key
                if (in_array($foreignKey->getId(), $columns)) {
                    continue;
                }
                $columns[] = $foreignKey->getId();
                if ($this->checkForeignKeyOwnerTableName($foreignKey, $tablename)) {
                    $count++;
                }
                if ($max && $count == $max) {
                    break;
                }
            }
        }

        return $count;
    }
protected function getForeignKeyReferenceCount($fkey, $max = null)
    {
        $count = 0;
        $tablename = $fkey->getReferencedTable()->getRawTableName();
        $columns = array();
        foreach ($this->getColumns() as $column) {
            foreach ($column->getForeignKeys() as $foreignKey) {
                // process only unique foreign key
                if (in_array($foreignKey->getId(), $columns)) {
                    continue;
                }
                $columns[] = $foreignKey->getId();
                if ($this->checkForeignKeyOwnerTableName($foreignKey, $tablename)) {
                    $count++;
                }
                if ($max && $count == $max) {
                    break;
                }
            }
        }

        return $count;
    }
protected function getForeignKeyReferenceCount ( $ fkey , $ max = null ) { $ count = 0 ; $ tablename = $ fkey -> getReferencedTable ( ) -> getRawTableName ( ) ; $ columns = array ( ) ; foreach ( $ this -> getColumns ( ) as $ column ) { foreach ( $ column -> getForeignKeys ( ) as $ foreignKey ) { // process only unique foreign key if ( in_array ( $ foreignKey -> getId ( ) , $ columns ) ) { continue ; } $ columns [ ] = $ foreignKey -> getId ( ) ; if ( $ this -> checkForeignKeyOwnerTableName ( $ foreignKey , $ tablename ) ) { $ count ++ ; } if ( $ max && $ count == $ max ) { break ; } } } return $ count ; }
Get the foreign key reference count.

@param \MwbExporter\Model\ForeignKey $fkey   The foreign key
@param int        $max    The maximum count
@return int
Get the foreign key reference count .