getBatch() 공개 메소드

Retrieves an array of directives to values from a given namespace
public getBatch ( string $namespace ) : array
$namespace string String namespace
리턴 array
예제 #1
0
 public function test_getBatch()
 {
     $this->schema->add('Variables.TangentialAcceleration', 'a_tan', 'string', false);
     $this->schema->add('Variables.AngularAcceleration', 'alpha', 'string', false);
     $config = new HTMLPurifier_Config($this->schema);
     $config->autoFinalize = false;
     $config->chatty = false;
     // grab a namespace
     $this->assertIdentical($config->getBatch('Variables'), array('TangentialAcceleration' => 'a_tan', 'AngularAcceleration' => 'alpha'));
     // grab a non-existant namespace
     $this->expectError('Cannot retrieve undefined namespace Constants');
     $config->getBatch('Constants');
 }