public function EasyRdf_Container::offsetGet in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/easyrdf/easyrdf/lib/EasyRdf/Container.php \EasyRdf_Container::offsetGet()
Array Access: get an item at a specified position in container using array syntax
Example: $item = $seq[2];
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Container.php, line 182
Class
- EasyRdf_Container
- Sub-class of EasyRdf_Resource that represents an RDF container (rdf:Alt, rdf:Bag and rdf:Seq)
Code
public function offsetGet($offset) {
if (is_int($offset) and $offset > 0) {
return $this
->get('rdf:_' . $offset);
}
else {
throw new InvalidArgumentException("Container position must be a positive integer");
}
}