ApiController::actionVread PHP Method

actionVread() public method

Current implementation uses timestamp as version ID and only supports the current version
public actionVread ( string $resource_type, string $id, string $vid )
$resource_type string
$id string
$vid string
    public function actionVread($resource_type, $id, $vid)
    {
        $ref = $this->getRef($resource_type, $id);
        $current_vid = $ref->getVersionId();
        if ($vid != $current_vid) {
            $this->sendError("Only accessing the current version of a resource is supported: latest is '{$current_vid}', attempted to fetch '{$vid}'", 405);
        }
        $this->sendResource($ref->resolve());
    }