/**
  * @param ResourceCollection $resourceCollection
  *
  * @return OwnershipManager
  */
 public function buildManager(ResourceCollection $resourceCollection)
 {
     $hashKey = $resourceCollection->getHashValue();
     if (isset($this->managerList[$hashKey])) {
         return $this->managerList[$hashKey];
     }
     $this->managerList[$hashKey] = $manager = new OwnershipManager($this->performer, $resourceCollection);
     return $manager;
 }
 /**
  * @param ResourceInterface $prototype
  * @param array             $allSetting
  *
  * @return ResourceCollection
  */
 public function makeCollection(ResourceInterface $prototype, array $allSetting)
 {
     $factory = new ResourceFactory();
     $factory->setPrototype($prototype);
     $collection = new ResourceCollection();
     foreach ($allSetting as $setting) {
         $resource = $factory->make($setting);
         $collection->add($resource);
     }
     return $collection;
 }