Yoast\WP\SEO\MyYoast_Client\Application
Callback_Outcome::from_array
Creates a Callback_Outcome from a stored array.
Метод класса: Callback_Outcome{}
Хуков нет.
Возвращает
self.
Использование
$result = Callback_Outcome::from_array( $data ): self;
- $data(array<string, bool|строка|null>) (обязательный)
- The stored array data.
Код Callback_Outcome::from_array() Callback Outcome::from array Yoast 28.9
public static function from_array( array $data ): self {
$error_phase = ( isset( $data['error_phase'] ) && \is_string( $data['error_phase'] ) ) ? $data['error_phase'] : self::PHASE_NONE;
$error_code = ( isset( $data['error_code'] ) && \is_string( $data['error_code'] ) ) ? $data['error_code'] : null;
return new self(
! empty( $data['is_success'] ),
! empty( $data['is_no_op'] ),
$error_phase,
$error_code,
);
}