Uname: Linux webm012.cluster130.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 8.0.30 [ PHP INFO ] PHP os: Linux
Server Ip: 145.239.37.162
Your Ip: 216.73.216.190
User: dreampi (1009562) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : 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;
  }
}
© 2026 GrazzMean-Shell