|
|
|
@ -18,49 +18,43 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
@@ -18,49 +18,43 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
|
|
|
|
|
|
|
|
|
|
// Set defaults |
|
|
|
|
$this->_pool->set( |
|
|
|
|
'completed', |
|
|
|
|
false |
|
|
|
|
'completed' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_pool->set( |
|
|
|
|
'title', |
|
|
|
|
null |
|
|
|
|
'title' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_pool->set( |
|
|
|
|
'subtitle', |
|
|
|
|
null |
|
|
|
|
'subtitle' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_pool->set( |
|
|
|
|
'tooltip', |
|
|
|
|
null |
|
|
|
|
'tooltip' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_pool->set( |
|
|
|
|
'mime', |
|
|
|
|
null |
|
|
|
|
'mime' |
|
|
|
|
); |
|
|
|
|
$this->_pool->set( |
|
|
|
|
'data', |
|
|
|
|
null |
|
|
|
|
'data' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_pool->set( |
|
|
|
|
'redirect', |
|
|
|
|
null |
|
|
|
|
'redirect' |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
$this->_pool->set( |
|
|
|
|
'request', |
|
|
|
|
null |
|
|
|
|
'request' |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function isCompleted(): bool |
|
|
|
|
{ |
|
|
|
|
return $this->_pool->get( |
|
|
|
|
return boolval( |
|
|
|
|
$this->_pool->get( |
|
|
|
|
'completed' |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -70,7 +64,9 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
@@ -70,7 +64,9 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
|
|
|
|
|
{ |
|
|
|
|
$this->_pool->set( |
|
|
|
|
'completed', |
|
|
|
|
strval( |
|
|
|
|
$completed |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -178,11 +174,16 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
@@ -178,11 +174,16 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
|
|
|
|
|
|
|
|
|
|
public function getRequest(): ?array |
|
|
|
|
{ |
|
|
|
|
return $this->_pool->get( |
|
|
|
|
'request' |
|
|
|
|
if ($request = $this->_pool->get('request')) |
|
|
|
|
{ |
|
|
|
|
return unserialize( |
|
|
|
|
$request |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function setRequest( |
|
|
|
|
?string $placeholder, |
|
|
|
|
bool $visible = true |
|
|
|
@ -190,27 +191,31 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
@@ -190,27 +191,31 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection
|
|
|
|
|
{ |
|
|
|
|
$this->_pool->set( |
|
|
|
|
'request', |
|
|
|
|
serialize( |
|
|
|
|
[ |
|
|
|
|
'placeholder' => $placeholder, |
|
|
|
|
'visible' => $visible |
|
|
|
|
] |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function unsetRequest(): void |
|
|
|
|
{ |
|
|
|
|
$this->_pool->set( |
|
|
|
|
'request', |
|
|
|
|
null |
|
|
|
|
'request' |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function getLength(): ?int |
|
|
|
|
{ |
|
|
|
|
if ($data = $this->_pool->get('data')) |
|
|
|
|
{ |
|
|
|
|
return mb_strlen( |
|
|
|
|
$this->_pool->get( |
|
|
|
|
'data' |
|
|
|
|
) |
|
|
|
|
$data |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
|
} |