Prado\Wsat\TWsatARGenerator::_buildSmartToString PHP Метод

_buildSmartToString() приватный Метод

private _buildSmartToString ( $tableInfo )
    private function _buildSmartToString($tableInfo)
    {
        $code = "\tpublic function __toString() {";
        $property = "throw new THttpException(500, 'Not implemented yet.');";
        try {
            foreach ($tableInfo->getColumns() as $column) {
                if (isset($column->IsPrimaryKey) && $column->IsPrimaryKey) {
                    $property = str_replace($this->uqChars, "", $column->ColumnName);
                } elseif ($column->PdoType == PDO::PARAM_STR && $column->DBType != "date") {
                    $property = str_replace($this->uqChars, "", $column->ColumnName);
                    break;
                }
            }
        } catch (Exception $ex) {
            Prado::trace($ex->getMessage());
        }
        $code .= "\n\t\treturn \$this->{$property};";
        $code .= "\n\t}";
        return $code;
    }