/**
  * @param BuilderInterface              $builder
  * @param CertificationContextInterface $certificationContext
  */
 public function execute(BuilderInterface $builder, CertificationContextInterface $certificationContext)
 {
     $this->provider->load($certificationContext->getName());
     $this->collector->addResource($this->provider->getName(), $certificationContext->getName(), $this->provider->getResources());
 }
 /**
  * @param CertificationContextInterface $context
  *
  * @return Certification
  */
 public function build(CertificationContextInterface $context)
 {
     if ($this->collector->isDirty()) {
         $this->collector->release();
     }
     if (null !== $this->logger) {
         $this->logger->debug(sprintf('Build certification %s', $context->getName()));
     }
     $oid = md5(serialize($context));
     //It's not based of object instance, but on his content.
     if (!isset($this->cache[$oid])) {
         foreach ($this->builderPass as $pass) {
             $pass->setCollector($this->collector);
             $pass->execute($this, $context);
         }
         $this->cache[$oid] = $this->normalize($context);
     }
     return $this->cache[$oid];
 }