. */ namespace Doctrine\Tests\Models\DirectoryTree; /** * @MappedSuperclass */ abstract class AbstractContentItem { /** * @Id @Column(type="integer") @GeneratedValue */ private $id; /** * @ManyToOne(targetEntity="Directory") */ protected $parentDirectory; /** @column(type="string") */ protected $name; public function __construct(Directory $parentDir = null) { $this->parentDirectory = $parentDir; } public function getId() { return $this->id; } public function setName($name) { $this->name = $name; } public function getName() { return $this->name; } public function getParent() { return $this->parentDirectory; } }