public function getAction($id, $data = null) { if (!isset($this->instances[$id])) { if (!$data) { $this->_db->setQuery("SELECT * FROM #__opengraph_action WHERE id = " . $this->_db->quote($id)); $data = $this->_db->loadObject(); } $action = new ogAction(); $action->setProperties($data); $this->instances[$id] = $action; } return $this->instances[$id]; }