예제 #1
0
 public function __construct($httpResponseBody)
 {
     parent::__construct('Input Validation Failed', static::INVALID_INPUT);
     $this->httpResponseBody = $httpResponseBody;
     $errors = json_decode($httpResponseBody, true);
     if (is_array($errors) && array_key_exists('errors', $errors)) {
         $this->errors = $errors['errors'];
     }
 }
예제 #2
0
 public function __construct($message = null, $code = 0)
 {
     if (empty($message)) {
         $message = __('Facebook returned an unexpected dataset.', FPP_TEXT_DOMAIN) . ' ' . __('Try to resolve this issue, update the plugin or <a target="_blank" href="http://wordpress.org/tags/facebook-page-publish">inform the author</a> about the problem.', FPP_TEXT_DOMAIN);
     } else {
         $message = sprintf(__('Facebook returned an unexpected dataset: %s', FPP_TEXT_DOMAIN), $message) . '<br />' . __('Try to resolve this issue, update the plugin or <a target="_blank" href="http://wordpress.org/tags/facebook-page-publish">inform the author</a> about the problem.', FPP_TEXT_DOMAIN);
     }
     parent::__construct($message, $code);
 }