@return string The matched route. */ public function get_matched_route() { return $this->matched_route; } /** * Sets the route (regex for path) that caused the response. * * @since 4.4.0 * * @param string $route Route name. */ public function set_matched_route( $route ) { $this->matched_route = $route; } /** * Retrieves the handler that was used to generate the response. * * @since 4.4.0 * * @return null|array The handler that was used to create the response. */ public function get_matched_handler() { return $this->matched_handler; } /** * Sets the handler that was responsible for generating the response. * * @since 4.4.0 * * @param array $handler The matched handler. */ public function set_matched_handler( $handler ) { $this->matched_handler = $handler; } /** * Checks if the response is an error, i.e. >= 400 response code. * * @since 4.4.0 * * @return bool Whether the response is an error. */ public function is_error() { return $this->get_status() >= 400; } /** * Retrieves a WP_Error object from the response. * * @since 4.4.0 * * @return WP_Error|null WP_Error or null on not an errored response. */ public function as_error() { if ( ! $this->is_error() ) { return null; } $error = new WP_Error(); if ( is_array( $this->get_data() ) ) { $data = $this->get_data(); $error->add( $data['code'], $data['message'], $data['data'] ); if ( ! empty( $data['additional_errors'] ) ) { foreach ( $data['additional_errors'] as $err ) { $error->add( $err['code'], $err['message'], $err['data'] ); } } } else { $error->add( $this->get_status(), '', array( 'status' => $this->get_status() ) ); } return $error; } /** * Retrieves the CURIEs (compact URIs) used for relations. * * @since 4.5.0 * * @return array Compact URIs. */ public function get_curies() { $curies = array( array( 'name' => 'wp', 'href' => 'https://api.w.org/{rel}', 'templated' => true, ), ); /** * Filters extra CURIEs available on REST API responses. * * CURIEs allow a shortened version of URI relations. This allows a more * usable form for custom relations than using the full URI. These work * similarly to how XML namespaces work. * * Registered CURIES need to specify a name and URI template. This will * automatically transform URI relations into their shortened version. * The shortened relation follows the format `{name}:{rel}`. `{rel}` in * the URI template will be replaced with the `{rel}` part of the * shortened relation. * * For example, a CURIE with name `example` and URI template * `http://w.org/{rel}` would transform a `http://w.org/term` relation * into `example:term`. * * Well-behaved clients should expand and normalize these back to their * full URI relation, however some naive clients may not resolve these * correctly, so adding new CURIEs may break backward compatibility. * * @since 4.5.0 * * @param array $additional Additional CURIEs to register with the REST API. */ $additional = apply_filters( 'rest_response_link_curies', array() ); return array_merge( $curies, $additional ); } }
Fatal error: Uncaught Error: Class "MailPoetVendor\Doctrine\DBAL\Types\TextType" not found in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Types/Type.php:35 Stack trace: #0 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Types/Type.php(29): MailPoetVendor\Doctrine\DBAL\Types\Type::createTypeRegistry() #1 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Types/Type.php(53): MailPoetVendor\Doctrine\DBAL\Types\Type::getTypeRegistry() #2 /htdocs/wp-content/plugins/mailpoet/lib/Doctrine/ConnectionFactory.php(95): MailPoetVendor\Doctrine\DBAL\Types\Type::hasType('bigint') #3 /htdocs/wp-content/plugins/mailpoet/lib/Doctrine/ConnectionFactory.php(63): MailPoet\Doctrine\ConnectionFactory->setupTypes() #4 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(636): MailPoet\Doctrine\ConnectionFactory->createConnection() #5 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(3226): MailPoetGenerated\FreeCachedContainer->getConnectionService() #6 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(646): MailPoetGenerated\FreeCachedContainer->getEntityManagerFactoryService() #7 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4908): MailPoetGenerated\FreeCachedContainer->getEntityManagerService() #8 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4898): MailPoetGenerated\FreeCachedContainer->getSettingsRepositoryService() #9 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2633): MailPoetGenerated\FreeCachedContainer->getSettingsController2Service() #10 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService() #11 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1) #12 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...') #13 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...') #14 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...') #15 /htdocs/wp-settings.php(526): include_once('/htdocs/wp-cont...') #16 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...') #17 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #18 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #19 /htdocs/index.php(17): require('/htdocs/wp-blog...') #20 {main} thrown in /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/doctrine/dbal/src/Types/Type.php on line 35