public function nth($offset) { if (!isset($this->_matchedResponsesAtOffsets) || !array_key_exists($offset, $this->_matchedResponsesAtOffsets)) { $criteria = new Postmaster_TransportResponseCriteriaModel($this->getAttributes()); $criteria->offset = $offset; $criteria->limit = 1; $elements = $criteria->find(); if ($elements) { $this->_matchedResponsesAtOffsets[$offset] = $elements[0]; } else { $this->_matchedResponsesAtOffsets[$offset] = null; } } return $this->_matchedResponsesAtOffsets[$offset]; }
public function findById($id) { $criteria = new Postmaster_TransportResponseCriteriaModel(array('id' => $id)); return $criteria->first(); }