forked from libvips/php-vips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConnection.php
36 lines (31 loc) · 915 Bytes
/
Connection.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
namespace Jcupitt\Vips;
abstract class Connection extends VipsObject
{
/**
* A pointer to the underlying Connection. This is the same as the
* GObject, just cast to Connection to help FFI.
*
* @internal
*/
public \FFI\CData $pointer;
public function __construct(\FFI\CData $pointer)
{
$this->pointer = FFI::vips()->cast(FFI::ctypes('VipsConnection'), $pointer);
parent::__construct($pointer);
}
/**
* Get the filename associated with a connection. Return null if there is no associated file.
*/
public function filename(): ?string
{
return FFI::vips()->vips_connection_filename($this->pointer);
}
/**
* Make a human-readable name for a connection suitable for error messages.
*/
public function nick(): ?string
{
return FFI::vips()->vips_connection_nick($this->pointer);
}
}