Scalr\Model\AbstractEntity::fields PHP Méthode

fields() public méthode

Gets comma separated list of the columns prefixed either with the table name or the specified table alias
public fields ( string $tableAlias = null, boolean $prefixed = false ) : string
$tableAlias string optional An table alias
$prefixed boolean optional Should the column names be provided with alias prefixed by the tableAlias
Résultat string Returns comma separated list of the columns
    public function fields($tableAlias = null, $prefixed = false)
    {
        $columns = '';
        /* @var $field Field */
        foreach ($this->getIterator()->fields() as $field) {
            $columns .= $field->getColumnName($tableAlias, $tableAlias && $prefixed ? $tableAlias . '__' . $field->column->name : null) . ', ';
        }
        return $columns !== '' ? substr($columns, 0, -2) : '';
    }