Inheritance: extends Entity
Ejemplo n.º 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());
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 3
0
 protected function EntityMap(Object\Domain $Domain)
 {
     return $Domain->GetEntityMap(Tag::GetType());
 }
Ejemplo n.º 4
0
 protected function EntityType()
 {
     return Tag::GetType();
 }