public function initialize(AuthorizationContext $context, $params = [])
 {
     parent::initialize($context, $params);
     if (!is_callable($params)) {
         throw new InvalidArgumentException("Not callable function");
     }
 }
 /**
  * Test initlization
  */
 public function testInitilization()
 {
     $resolvable = new ResolvableAuthorization();
     $resolvable->initialize($this->context, ['params']);
     $this->assertSame($this->context, $resolvable->context);
     $this->assertSame(['params'], $resolvable->params);
     $this->assertFalse($resolvable->resolved());
     $this->assertNull($resolvable->state());
     $this->assertTrue($resolvable->value());
 }
 /**
  * Initialization
  *
  * Load all resolvables
  *
  * @param AuthorizationContext $context
  * @param array $params
  * @return null
  * @throws \InvalidArgumentException
  */
 public function initialize(AuthorizationContext $context, $params = [])
 {
     parent::initialize($context, $params);
     $this->manager = $context->manager;
     $this->resolvable = $params;
 }