RemoteResource::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
abstract class RemoteResource
4
{
5
    protected $model;
6
    protected $uri;
7
8
9
    /**
10
     * Construct the RemoteResource
11
     * @param Model $model the Model object representing the application
12
     * @param string $uri the remote URI this object represents
13
     */
14
15
    public function __construct(Model $model, string $uri)
16
    {
17
        $this->model = $model;
18
        $this->uri = $uri;
19
    }
20
21
    /**
22
     * Resolve the URI of this resource to an RDF graph containing information about it
23
     * @param int $timeout timeout value for the resolution attempt, in seconds
24
     * @return EasyRdf\Resource the resolved resource, or null if the resolution failed
25
     */
26
    abstract public function resolve(int $timeout): ?EasyRdf\Resource;
27
}
28