コード例 #1
0
 public function testInvoke()
 {
     $obj = new TestObject();
     $metadata = new MethodMetadata('Metadata\\Tests\\Fixtures\\TestObject', 'setFoo');
     $this->assertNull($obj->getFoo());
     $metadata->invoke($obj, array('foo'));
     $this->assertEquals('foo', $obj->getFoo());
 }
コード例 #2
0
 public function unserialize($str)
 {
     list($parentStr, $this->roles, $this->paramPermissions, $this->returnPermissions, $this->runAsRoles, $this->satisfiesParentSecurityPolicy) = unserialize($str);
     parent::unserialize($parentStr);
 }
コード例 #3
0
 /**
  * {@inheritdoc}
  */
 public function unserialize($str)
 {
     list($this->isMethod, $this->isFormHandler, $this->hasNamedParams, $this->isStrict, $this->hasSession, $parameterNames, $this->parameterMetadata, $this->result, $this->authorizationExpression, $parentStr) = unserialize($str);
     parent::unserialize($parentStr);
     foreach ($parameterNames as $parameterName) {
         $this->parameters[$parameterName] = new \ReflectionParameter(array($this->reflection->getDeclaringClass()->name, $this->reflection->name), $parameterName);
     }
 }