Getting all content, including Matrix fields from an EntryModel Initially I was doing $entry-&gt;getContent()-&gt;getAttributes(), but noticed my Matrix fields were all null.

What is the right way to do this?

I see that $entry-&gt;myMatrixField gives me the ElementCriteriaModel for my Matrix that I need, I thought that would be the same as using `getAttribute('myMatrixField'), but i guess not.
ContentModel will only have the values in the actual content table, and the values that are actually there still may not be what you’re after, because accessing those values directly won’t give the field types a chance to do any preprocessing on their data.

So the best way to reliably get an array of all of an element’s custom field content is to go through its Field Layout, via BaseElementModel::getFieldLayout():

$values = array();

foreach ($element-&gt;getFieldLayout()-&gt;getFields() as $fieldLayoutField)
{
    // $fieldLayoutField is a FieldLayoutFieldModel, *not* a FieldModel
    // http://buildwithcraft.com/classreference/models/FieldLayoutFieldModel
    // so get the actual FieldModel here
    $field = $fieldLayoutField-&gt;getField();

    // Now get the prepped field value
    $value = $element-&gt;getFieldValue($field-&gt;handle);

    $values[$field-&gt;handle] = $value;
}