WS_OK_7.4.33 HEX
HEX
Server: nginx/1.21.4
System: Linux v12674 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64
User: endtheignorance (1014)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source
Upload Files
File: /storage/v12674/lcafresno/public_html/wp-content/plugins/mailpoet/lib/Entities/WpPostEntity.php
<?php declare(strict_types = 1);

namespace MailPoet\Entities;

if (!defined('ABSPATH')) exit;


use MailPoet\RuntimeException;
use MailPoetVendor\Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(readOnly=true)
 * @ORM\Table(name="posts")
 */
class WpPostEntity {
  /**
   * @ORM\Column(type="integer", name="ID")
   * @ORM\Id
   * @ORM\GeneratedValue
   * @var int
   */
  private $id;

  /**
   * @ORM\Column(type="string", name="post_title")
   * @var string
   */
  private $postTitle;

  public function __construct() {
    throw new RuntimeException('WpPostEntity is read only and cannot be instantiated.');
  }

  public function getId(): int {
    return $this->id;
  }

  public function getPostTitle(): string {
    return $this->postTitle;
  }

  /**
   * We don't use typehint for now because doctrine cache generator would fail as it doesn't know the class.
   * @return \WP_Post|null
   */
  public function getWpPostInstance() {
    $post = \WP_Post::get_instance($this->id);
    return $post ?: null;
  }
}