<commit_before><?php 
/**
 * @package plugins.huluDistribution
 * @subpackage admin
 */
class Form_HuluProfileConfiguration extends Form_ConfigurableProfileConfiguration
{
	public function init()
	{
		parent::init();
		$this->setDescription('Hulu Distribution Profile');
	}
	
	public function getObject($objectType, array $properties, $add_underscore = true, $include_empty_fields = false)
	{
		$object = parent::getObject($objectType, $properties, $add_underscore, $include_empty_fields);
		
		$additionalCategories = isset($properties['series_additional_categories']) && is_array($properties['itemXpathsToExtend']) ? $properties['series_additional_categories'] : array();
		foreach($additionalCategories as &$val)
		{
			$temp = new Kaltura_Client_Type_String();
			$temp->value = $val;
			$val = $temp;
		}
		$object->seriesAdditionalCategories = $additionalCategories;
		
		return $object;
	}
	
	public function populateFromObject($object, $add_underscore = true)
	{
		parent::populateFromObject($object, $add_underscore);
		
		$additionalCategories = array();
		foreach($object->seriesAdditionalCategories as $category)
		{
			$additionalCategories[] = $category->value;
		}
		
		$this->setDefault(series_additional_categories, $additionalCategories);
	}
	
	protected function addProviderElements()
	{
		$element = new Zend_Form_Element_Hidden('providerElements');
		$element->setLabel('Hulu Specific Configuration');
		$element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag',  array('tag' => 'b'))));
		
		$this->addElements(array($element));
		
		$this->addElement('text', 'sftp_host', array(
			'label'			=> 'SFTP Host:',
			'filters'		=> array('StringTrim'),
			'default'		=> 'sftp.hulu.com'
		));
	
		$this->addElement('text', 'sftp_login', array(
			'label'			=> 'SFTP Login:',
			'filters'		=> array('StringTrim'),
		));
		
		$this->addElement('text', 'sftp_pass', array(
			'label'			=> 'SFTP Password:',
			'filters'		=> array('StringTrim'),<commit_msg>qnd: hulu distribution provider typo fix<commit_after><?php 
/**
 * @package plugins.huluDistribution
 * @subpackage admin
 */
class Form_HuluProfileConfiguration extends Form_ConfigurableProfileConfiguration
{
	public function init()
	{
		parent::init();
		$this->setDescription('Hulu Distribution Profile');
	}
	
	public function getObject($objectType, array $properties, $add_underscore = true, $include_empty_fields = false)
	{
		$object = parent::getObject($objectType, $properties, $add_underscore, $include_empty_fields);
		
		$additionalCategories = isset($properties['series_additional_categories']) && is_array($properties['itemXpathsToExtend']) ? $properties['series_additional_categories'] : array();
		foreach($additionalCategories as &$val)
		{
			$temp = new Kaltura_Client_Type_String();
			$temp->value = $val;
			$val = $temp;
		}
		$object->seriesAdditionalCategories = $additionalCategories;
		
		return $object;
	}
	
	public function populateFromObject($object, $add_underscore = true)
	{
		parent::populateFromObject($object, $add_underscore);
		
		$additionalCategories = array();
		foreach($object->seriesAdditionalCategories as $category)
		{
			$additionalCategories[] = $category->value;
		}
		
		$this->setDefault('series_additional_categories', $additionalCategories);
	}
	
	protected function addProviderElements()
	{
		$element = new Zend_Form_Element_Hidden('providerElements');
		$element->setLabel('Hulu Specific Configuration');
		$element->setDecorators(array('ViewHelper', array('Label', array('placement' => 'append')), array('HtmlTag',  array('tag' => 'b'))));
		
		$this->addElements(array($element));
		
		$this->addElement('text', 'sftp_host', array(
			'label'			=> 'SFTP Host:',
			'filters'		=> array('StringTrim'),
			'default'		=> 'sftp.hulu.com'
		));
	
		$this->addElement('text', 'sftp_login', array(
			'label'			=> 'SFTP Login:',
			'filters'		=> array('StringTrim'),
		));
		
		$this->addElement('text', 'sftp_pass', array(
			'label'			=> 'SFTP Password:',
			'filters'		=> array('StringTrim'),
{'fraction_non_alphanumeric': 0.16105237275633144, 'fraction_numerical': 0.0, 'mean_word_length': 5.668852459016393, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4743986', 'n_tokens_mistral': 1450, 'n_tokens_neox': 1237, 'n_words': 220}