protected function CreateProperties(Domain $Domain) { $this->Title = new Properties\DataProperty(new Accessors\Field('Title'), true); $this->Content = new Properties\DataProperty(new Accessors\Field('Content')); $this->CreatedDate = new Properties\DataProperty(new Accessors\Field('CreatedDate')); $this->Blog = new Properties\DataProperty(new Accessors\Field('Blog')); $this->Author = new Properties\EntityProperty(new Accessors\Field('Author'), \StormExamples\One\Entities\Author::GetType(), new Properties\Relationships\CascadeNonIdentifying()); $this->Tags = new Properties\CollectionProperty(new Accessors\Field('Tags'), \StormExamples\One\Entities\Tag::GetType(), new Properties\Relationships\CascadeNonIdentifying()); }
public function Run(Storm $BloggingStorm) { $BlogRepository = $BloggingStorm->GetRepository(Entities\Blog::GetType()); $TagRepository = $BloggingStorm->GetRepository(Entities\Tag::GetType()); $AuthorRepository = $BloggingStorm->GetRepository(Entities\Author::GetType()); $Action = self::Retreive; $Amount = 1; $Last; for ($Count = 0; $Count < $Amount; $Count++) { $Last = $this->Act($Action, $BloggingStorm, $BlogRepository, $AuthorRepository, $TagRepository); } return $Last; }
protected function EntityMap(Object\Domain $Domain) { return $Domain->GetEntityMap(Author::GetType()); }
protected function EntityType() { return Author::GetType(); }