Skip to content

Commit a670010

Browse files
committed
Merge pull request doctrine#195 from excelwebzone/common-updates
Updated code to support latest common changes
2 parents 44cd7dd + 7cf1fd6 commit a670010

File tree

1 file changed

+47
-2
lines changed

1 file changed

+47
-2
lines changed

lib/Doctrine/ODM/MongoDB/Mapping/ClassMetadataInfo.php

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,23 +1505,68 @@ public function setLockField($lockField)
15051505
$this->lockField = $lockField;
15061506
}
15071507

1508+
/**
1509+
* A numerically indexed list of field names of this persistent class.
1510+
*
1511+
* This array includes identifier fields if present on this class.
1512+
*
1513+
* @return array
1514+
*/
15081515
public function getFieldNames()
15091516
{
1510-
throw new \BadMethodCallException(__METHOD__.'() is not implemented yet.');
1517+
return array_keys($this->fieldMappings);
15111518
}
15121519

1520+
/**
1521+
* A numerically indexed list of association names of this persistent class.
1522+
*
1523+
* This array includes identifier associations if present on this class.
1524+
*
1525+
* @return array
1526+
*/
15131527
public function getAssociationNames()
15141528
{
15151529
throw new \BadMethodCallException(__METHOD__.'() is not implemented yet.');
15161530
}
15171531

1532+
/**
1533+
* Gets the type of a field.
1534+
*
1535+
* @param string $fieldName
1536+
* @return Doctrine\DBAL\Types\Type
1537+
*/
15181538
public function getTypeOfField($fieldName)
15191539
{
1520-
throw new \BadMethodCallException(__METHOD__.'($fieldName) is not implemented yet.');
1540+
return isset($this->fieldMappings[$fieldName]) ?
1541+
$this->fieldMappings[$fieldName]['type'] : null;
15211542
}
15221543

1544+
/**
1545+
* Returns the target class name of the given association.
1546+
*
1547+
* @param string $assocName
1548+
* @return string
1549+
*/
15231550
public function getAssociationTargetClass($assocName)
15241551
{
15251552
throw new \BadMethodCallException(__METHOD__.'($assocName) is not implemented yet.');
15261553
}
1554+
1555+
/**
1556+
* @param string $fieldName
1557+
* @return bool
1558+
*/
1559+
public function isAssociationInverseSide($fieldName)
1560+
{
1561+
throw new \BadMethodCallException(__METHOD__.'() is not implemented yet.');
1562+
}
1563+
1564+
/**
1565+
* @param string $fieldName
1566+
* @return string
1567+
*/
1568+
public function getAssociationMappedByTargetField($fieldName)
1569+
{
1570+
throw new \BadMethodCallException(__METHOD__.'() is not implemented yet.');
1571+
}
15271572
}

0 commit comments

Comments
 (0)