// get all resource objects
$resources = $datapackage->resources();
is_a($resources[0], "frictionlessdata\\datapackage\\Resources\\DefaultResource");
is_a($resources[1], "frictionlessdata\\datapackage\\Resources\\TabularResource");
// delete a resource by position in the resources array
$datapackage->deleteResource(0);
// get the new resource objects
$resources = $datapackage->resources();
is_a($resources[0], "frictionlessdata\\datapackage\\Resources\\TabularResource");
// add a resource
$datapackage->addResource(DefaultResource::create("my-new-resource"));
$resources = $datapackage->resources();
is_a($resources[0], "frictionlessdata\\datapackage\\Resources\\TabularResource");
is_a($resources[1], "frictionlessdata\\datapackage\\Resources\\DefaultResource");
// get a resource by name
$resource = $datapackage->getResourceByName("my-resource");