/** * General method to search for triples. * NULL input for any parameter will match anything. * Example: $result = $m->find( NULL, NULL, $node ); * Finds all Statements with $node as object. * Returns an array of statements with ResResources. * * @param object ResResource $subject * @param object ResResource $predicate * @param object ResResource $object * @return array * @access public * @throws PhpError */ function find($subject, $predicate, $object) { $result = array(); //convert ResResources to Resources and Blanknodes $resmodel = $this->model->find($this->_resNode2Node($subject), $this->_resNode2Node($predicate), $this->_resNode2Node($object)); //convert Resources, Blanknodes to ResResources foreach ($resmodel->triples as $statement) { $result[] = new Statement($this->_node2ResNode($statement->getSubject()), $this->_node2ResNode($statement->getPredicate(), true), $this->_node2ResNode($statement->getObject())); } return $result; }