Inheritance: extends Entity
示例#1
0
 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());
 }
示例#2
0
 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;
 }
示例#3
0
 protected function EntityMap(Object\Domain $Domain)
 {
     return $Domain->GetEntityMap(Tag::GetType());
 }
示例#4
0
 protected function EntityType()
 {
     return Tag::GetType();
 }