parseSourceList() public method

public parseSourceList ( array $sourceList ) : string
$sourceList array
return string
 /**
  * @dataProvider keywordsProvider
  */
 public function testQuotesKeywords($source, $expected)
 {
     $parser = new ContentSecurityPolicyParser();
     $sourceList = array($source);
     $result = $parser->parseSourceList($sourceList);
     $this->assertEquals($expected, $result, 'CSP parser should quote CSP keywords');
 }
 public static function fromConfig(PolicyManager $policyManager, array $config, $kind)
 {
     $directiveSet = new self($policyManager);
     $directiveSet->setLevel1Fallback(isset($config[$kind]) ? $config[$kind]['level1_fallback'] : false);
     if (!array_key_exists($kind, $config)) {
         return $directiveSet;
     }
     $parser = new ContentSecurityPolicyParser();
     foreach (self::getNames() as $name => $type) {
         if (!array_key_exists($name, $config[$kind])) {
             continue;
         }
         $directiveSet->setDirective($name, $parser->parseSourceList($config[$kind][$name]));
     }
     return $directiveSet;
 }