lithium\data\source\MongoDb::relationFieldName PHP Method

relationFieldName() public method

Returns the field name of a relation name (camelBack).
public relationFieldName ( $type, $name ) : string
return string
    public function relationFieldName($type, $name)
    {
        $fieldName = Inflector::camelize($name, false);
        if (preg_match('/Many$/', $type)) {
            $fieldName = Inflector::pluralize($fieldName);
        } else {
            $fieldName = Inflector::singularize($fieldName);
        }
        return $fieldName;
    }