1
0
mirror of synced 2025-02-03 22:09:26 +03:00
doctrine2/tests/Doctrine/Tests/Models/DirectoryTree/AbstractContentItem.php
2016-10-26 13:24:33 -03:00

80 lines
1.3 KiB
PHP

<?php
namespace Doctrine\Tests\Models\DirectoryTree;
/**
* @MappedSuperclass
*/
abstract class AbstractContentItem
{
const CLASSNAME = __CLASS__;
/**
* @Id @Column(type="integer") @GeneratedValue
*/
private $id;
/**
* @ManyToOne(targetEntity="Directory")
*/
protected $parentDirectory;
/** @column(type="string") */
protected $name;
/**
* This field is transient and private on purpose
*
* @var bool
*/
private $nodeIsLoaded = false;
/**
* This field is transient on purpose
*
* @var mixed
*/
public static $fileSystem;
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;
}
/**
* @return bool
*/
public function getNodeIsLoaded()
{
return $this->nodeIsLoaded;
}
/**
* @param bool $nodeIsLoaded
*/
public function setNodeIsLoaded($nodeIsLoaded)
{
$this->nodeIsLoaded = (bool) $nodeIsLoaded;
}
}