protected function addToArrayKeyLookUp($phpName, Table $table, $plural)
    {
        if($phpName == "") {
            $phpName = $table->getPhpName();
        }

        $camelCaseName = $table->getCamelCaseName();
        $fieldName = $table->getName();

        if ($plural) {
            $phpName = $this->getPluralizer()->getPluralForm($phpName);
            $camelCaseName = $this->getPluralizer()->getPluralForm($camelCaseName);
            $fieldName = $this->getPluralizer()->getPluralForm($fieldName);
        }

        return "
                switch (\$keyType) {
                    case TableMap::TYPE_CAMELNAME:
                        \$key = '" . $camelCaseName . "';
                        break;
                    case TableMap::TYPE_FIELDNAME:
                        \$key = '" . $fieldName . "';
                        break;
                    default:
                        \$key = '" . $phpName . "';
                }
        ";
    }
protected function addToArrayKeyLookUp($phpName, Table $table, $plural)
    {
        if($phpName == "") {
            $phpName = $table->getPhpName();
        }

        $camelCaseName = $table->getCamelCaseName();
        $fieldName = $table->getName();

        if ($plural) {
            $phpName = $this->getPluralizer()->getPluralForm($phpName);
            $camelCaseName = $this->getPluralizer()->getPluralForm($camelCaseName);
            $fieldName = $this->getPluralizer()->getPluralForm($fieldName);
        }

        return "
                switch (\$keyType) {
                    case TableMap::TYPE_CAMELNAME:
                        \$key = '" . $camelCaseName . "';
                        break;
                    case TableMap::TYPE_FIELDNAME:
                        \$key = '" . $fieldName . "';
                        break;
                    default:
                        \$key = '" . $phpName . "';
                }
        ";
    }
protected function addToArrayKeyLookUp ( $ phpName , Table $ table , $ plural ) { if ( $ phpName == "" ) { $ phpName = $ table -> getPhpName ( ) ; } $ camelCaseName = $ table -> getCamelCaseName ( ) ; $ fieldName = $ table -> getName ( ) ; if ( $ plural ) { $ phpName = $ this -> getPluralizer ( ) -> getPluralForm ( $ phpName ) ; $ camelCaseName = $ this -> getPluralizer ( ) -> getPluralForm ( $ camelCaseName ) ; $ fieldName = $ this -> getPluralizer ( ) -> getPluralForm ( $ fieldName ) ; } return "
                switch (\$keyType) {
                    case TableMap::TYPE_CAMELNAME:
                        \$key = '" . $ camelCaseName . "';
                        break;
                    case TableMap::TYPE_FIELDNAME:
                        \$key = '" . $ fieldName . "';
                        break;
                    default:
                        \$key = '" . $ phpName . "';
                }
        " ; }
Adds the switch-statement for looking up the array-key name for toArray
@see toArray
Adds the switch - statement for looking up the array - key name for toArray