File "FallbackFromGetTrait.php"
Full Path: /home/siazco/grocery.siazco.se/wp-content/plugins/flexible-shipping-pro/vendor_prefixed/wpdesk/wp-persistence/src/FallbackFromGetTrait.php
File size: 357 bytes
MIME-type: text/x-php
Charset: utf-8
<?php
namespace FSProVendor\WPDesk\Persistence;
use Psr\Container\NotFoundExceptionInterface;
trait FallbackFromGetTrait
{
public function get_fallback(string $id, $fallback = null)
{
try {
return $this->get($id);
} catch (\Psr\Container\NotFoundExceptionInterface $e) {
return $fallback;
}
}
}