/** * Load system keys by a path. */ public function loadByPath($path) { $repository = $this->getEntityManager()->getRepository('RegistryBundle:System'); $stmt = $this->getEntityManager()->getConnection()->prepare('SELECT * FROM system s1 WHERE s1.systemkey LIKE :path'); $params = array('path' => $path); $stmt->execute($params); $result = array(); while ($row = $stmt->fetch()) { $s = new System(); $s->LoadByArray($row); $result[] = $s; } return $result; }