Fetch matrix field attributes in controller In my controller I fetched the Entry

$criteria = craft()-&gt;elements-&gt;getCriteria('Entry');
$criteria-&gt;section = 'offlineEvents';
$event = $criteria-&gt;first();


The Entry has a matrix field with handler called eventDetails

How can I access this matrix field values? I want to do it like I'd do it in template:

{% for items in entry.eventDetails %}
    {% if items.getType() == 'heading' %}  
     ....


but I cant do 

foreach ($event-&gt;eventDetails as $details) { ... }


it's giving me empty array.
Your code looks right. I'd double check for spelling mistakes and check if there's a entry model returned from your $event = $criteria-&gt;first(); by outputting its ID with return $event-&gt;id.