src/Codegen/CodegenBase.php
protected function modelReferenceColumnName($strColumnName)
    {
        $intNameLength = strlen($strColumnName);

        // Does the column name for this reference column end in "_id"?
        if (($intNameLength > 3) && (substr($strColumnName, $intNameLength - 3) == "_id")) {
            // It ends in "_id" but we don't want to include the "Id" suffix
            // in the Variable Name.  So remove it.
            $strColumnName = substr($strColumnName, 0, $intNameLength - 3);
        } else {
            // Otherwise, let's add "_object" so that we don't confuse this variable name
            // from the variable that was mapped from the physical database
            // E.g., if it's a numeric FK, and the column is defined as "person INT",
            // there will end up being two variables, one for the Person id integer, and
            // one for the Person object itself.  We'll add Object to the name of the Person object
            // to make this deliniation.
            $strColumnName = sprintf("%s_object", $strColumnName);
        }

        return $strColumnName;
    }
protected function modelReferenceColumnName($strColumnName)
    {
        $intNameLength = strlen($strColumnName);

        // Does the column name for this reference column end in "_id"?
        if (($intNameLength > 3) && (substr($strColumnName, $intNameLength - 3) == "_id")) {
            // It ends in "_id" but we don't want to include the "Id" suffix
            // in the Variable Name.  So remove it.
            $strColumnName = substr($strColumnName, 0, $intNameLength - 3);
        } else {
            // Otherwise, let's add "_object" so that we don't confuse this variable name
            // from the variable that was mapped from the physical database
            // E.g., if it's a numeric FK, and the column is defined as "person INT",
            // there will end up being two variables, one for the Person id integer, and
            // one for the Person object itself.  We'll add Object to the name of the Person object
            // to make this deliniation.
            $strColumnName = sprintf("%s_object", $strColumnName);
        }

        return $strColumnName;
    }
protected function modelReferenceColumnName ( $ strColumnName ) { $ intNameLength = strlen ( $ strColumnName ) ; // Does the column name for this reference column end in "_id"? if ( ( $ intNameLength > 3 ) && ( substr ( $ strColumnName , $ intNameLength - 3 ) == "_id" ) ) { // It ends in "_id" but we don't want to include the "Id" suffix // in the Variable Name.  So remove it. $ strColumnName = substr ( $ strColumnName , 0 , $ intNameLength - 3 ) ; } else { // Otherwise, let's add "_object" so that we don't confuse this variable name // from the variable that was mapped from the physical database // E.g., if it's a numeric FK, and the column is defined as "person INT", // there will end up being two variables, one for the Person id integer, and // one for the Person object itself.  We'll add Object to the name of the Person object // to make this deliniation. $ strColumnName = sprintf ( "%s_object" , $ strColumnName ) ; } return $ strColumnName ; }
Given the name of a column that is a foreign key to another table, returns a kind of
virtual column name that would refer to the object pointed to. This new name is used to refer to the object
version of the column by json and other encodings, and derivatives
of this name are used to represent a variable and property name that refers to this object that will get stored
in the model.

@param string $strColumnName
@return string
Given the name of a column that is a foreign key to another table returns a kind of virtual column name that would refer to the object pointed to . This new name is used to refer to the object version of the column by json and other encodings and derivatives of this name are used to represent a variable and property name that refers to this object that will get stored in the model .