protected function getAttributesConfig(array $siteConfig)
	{
		$attrNames = $this->getAttributeNamesFromRegexps($siteConfig['extract']);
		foreach ($siteConfig['scrape'] as $scrapeConfig)
		{
			$attrNames += $this->getAttributeNamesFromRegexps($scrapeConfig['extract']);
		}

		$attributes = $siteConfig['attributes'] + array_fill_keys(array_keys($attrNames), []);
		foreach ($attributes as &$attrConfig)
		{
			$attrConfig += ['required' => false];
		}
		unset($attrConfig);

		return $attributes;
	}
protected function getAttributesConfig(array $siteConfig)
	{
		$attrNames = $this->getAttributeNamesFromRegexps($siteConfig['extract']);
		foreach ($siteConfig['scrape'] as $scrapeConfig)
		{
			$attrNames += $this->getAttributeNamesFromRegexps($scrapeConfig['extract']);
		}

		$attributes = $siteConfig['attributes'] + array_fill_keys(array_keys($attrNames), []);
		foreach ($attributes as &$attrConfig)
		{
			$attrConfig += ['required' => false];
		}
		unset($attrConfig);

		return $attributes;
	}
protected function getAttributesConfig ( array $ siteConfig ) { $ attrNames = $ this -> getAttributeNamesFromRegexps ( $ siteConfig [ 'extract' ] ) ; foreach ( $ siteConfig [ 'scrape' ] as $ scrapeConfig ) { $ attrNames += $ this -> getAttributeNamesFromRegexps ( $ scrapeConfig [ 'extract' ] ) ; } $ attributes = $ siteConfig [ 'attributes' ] + array_fill_keys ( array_keys ( $ attrNames ) , [ ] ) ; foreach ( $ attributes as & $ attrConfig ) { $ attrConfig += [ 'required' => false ] ; } unset ( $ attrConfig ) ; return $ attributes ; }
Get the attributes config for given site config

@param  array $siteConfig Site's config
@return array             Map of [attrName => attrConfig]
Get the attributes config for given site config