/** * @ singleton method used to instantiate class object * @ access public * * @param array $request_data * @return \EE_Export */ public static function instance($request_data = array()) { // check if class object is instantiated if (self::$_instance === NULL or !is_object(self::$_instance) or !self::$_instance instanceof EE_Export) { self::$_instance = new self($request_data); } return self::$_instance; }
/** * TODO handle category exports() * @return file export */ protected function _categories_export() { //todo: I don't like doing this but it'll do until we modify EE_Export Class. $new_request_args = array('export' => 'report', 'action' => 'categories', 'category_ids' => $this->_req_data['VEN_CAT_ID']); $this->_req_data = array_merge($this->_req_data, $new_request_args); EE_Registry::instance()->load_helper('File'); if (is_readable(EE_CLASSES . 'EE_Export.class.php')) { require_once EE_CLASSES . 'EE_Export.class.php'; $EE_Export = EE_Export::instance($this->_req_data); $EE_Export->export(); } }
public function _contact_list_export() { EE_Registry::instance()->load_helper('File'); if (is_readable(EE_CLASSES . 'EE_Export.class.php')) { require_once EE_CLASSES . 'EE_Export.class.php'; $EE_Export = EE_Export::instance($this->_req_data); $EE_Export->export_attendees(); } }
public function _contact_list_report() { if (!defined('EE_USE_OLD_CSV_REPORT_CLASS')) { wp_redirect(EE_Admin_Page::add_query_args_and_nonce(array('page' => 'espresso_batch', 'batch' => 'file', 'job_handler' => urlencode('EventEspressoBatchRequest\\JobHandlers\\AttendeesReport'), 'return_url' => urlencode($this->_req_data['return_url'])))); } else { EE_Registry::instance()->load_helper('File'); if (is_readable(EE_CLASSES . 'EE_Export.class.php')) { require_once EE_CLASSES . 'EE_Export.class.php'; $EE_Export = EE_Export::instance($this->_req_data); $EE_Export->report_attendees(); } } }
/** * Creates a sample CSV file for importing */ protected function _sample_export_file() { // require_once(EE_CLASSES . 'EE_Export.class.php'); EE_Export::instance()->export_sample(); }