Пример #1
0
 public function __construct($config = array())
 {
     parent::__construct($config);
     // strip filename_orig from weird characters and transform underscores to camelcase
     $pattern = '/(.*[\\\\\\/])?(.*)$/';
     preg_match($pattern, $this->filename_orig, $matches);
     $sanatized = str_replace(array(' ', ':', '*', '?', '"', '<', '>', '|'), '_', $matches[2]);
     $inflector = new Zend_Filter_Inflector(':name');
     $inflector->setRules(array(':name' => array('Word_UnderscoreToCamelCase')));
     $filtered = $inflector->filter(array('name' => $sanatized));
     $this->filename_orig = $filtered;
 }
Пример #2
0
 /**
  * Helper method to transform object values to Google Event values
  *
  * @param	$values		TA_Model_Resource_Db_Table_Row_Abstract
  * @rerurn	array
  */
 protected function _modifyValues(TA_Model_Resource_Db_Table_Row_Abstract $row)
 {
     $values = $row->toArray();
     $return = array();
     if ($row instanceof Core_Resource_Event_Item || $row instanceof Core_Resource_Session_Item) {
         $return['title'] = $values['title'];
         $return['description'] = $values['description'];
         $return['start'] = $values['tstart'];
         $return['end'] = $values['tend'];
         $return['location'] = $values['location_address'];
     }
     return $return;
 }