Eigenschafts-Typen
orm-eigenschaften
Scalar
Scalar
DateTime
DateTime
class Article extends ObjectAdapter { private $publishDate; /** * @param \DateTime $lastMod */ public function getPublishDate() { return $this->publishDate; } public function setPublishDate(\DateTime $publishDate) { $this->publishDate = $publishDate; } // rest of class body }
Locale
locale
class Article extends ObjectAdapter { private $locale; /** * @param Locale $locale */ public function setLocale(Locale $locale) { $this->locale = $locale; } /** * @return Locale */ public function getLocale() { return $this->locale; } // rest of class body }
Lob
lob
File
File
ManagedFile
managed file
class Article extends ObjectAdapter { private static function _annos(AnnoInit $ai) { $ai->p('image', new AnnoManagedFile(FileManager::TYPE_PUBLIC)); } private $image; public function getImage() { return $this->image; } public function setImage(File $image) { $this->image = $image; } // rest of class body }
Typ | Beschreibung |
---|---|
FileManager::TYPE_PUBLIC |
|
FileManager::TYPE_PRIVATE |
$ai->p('image', new AnnoManagedFile(FileManager::TYPE_PUBLIC, new SimpleFileLocator(array('article', 'images'))));
Typ | Beschreibung |
---|---|
n2n\io\SimpleFileLocator |
|
n2n\io\WeeklyFileLocator |