/** * @throws IOException */ public function stream_close() { $res = \rados_ioctx_destroy($this->ioctx); if ($res < 0) { throw new IOException('Could not destroy io context after reading ' . $this->stat['oid']); } $ret = \rados_shutdown($this->rados); if ($ret < 0) { throw new IOException('Could not shutdown rados resource'); } }
<?php $rados = rados_create(); rados_conf_read_file($rados, "/etc/ceph/ceph.conf"); rados_connect($rados); $io = rados_ioctx_create($rados, "rbd"); var_dump(rados_ioctx_pool_stat($io)); rados_ioctx_destroy($io); rados_shutdown($rados);
/** * @depends testRadosConnect */ public function testRadosShutDown($cluster) { $this->assertTrue(rados_shutdown($cluster)); }
/** * * @return self */ public function shutdown() { \rados_shutdown($this->_cluster); return $this; }