function define($context = FALSE) { $object_name = 'ngg_order'; // Add the object name to the context of the object as well // This allows us to adapt the driver itself, if required if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); parent::define($object_name, $context); $this->add_mixin('Mixin_Order_Mapper'); $this->set_model_factory_method($object_name); // Define columns/properties $this->define_column('ID', 'BIGINT', 0); $this->define_column('email', 'VARCHAR(255)'); $this->define_column('customer_name', 'VARCHAR(255'); $this->define_column('phone', 'VARCHAR(255)'); $this->define_column('total_amount', 'DECIMAL', 0.0); $this->define_column('payment_gateway', 'VARCHAR(255)'); $this->define_column('shipping_street_address', 'VARCHAR(255)'); $this->define_column('shipping_address_line', 'VARCHAR(255)'); $this->define_column('shipping_city', 'VARCHAR(255)'); $this->define_column('shipping_state', 'VARCHAR(255)'); $this->define_column('shipping_zip', 'VARCHAR(255)'); $this->define_column('shipping_country', 'VARCHAR(255)'); $this->define_column('shipping_phone', 'VARCHAR(255)'); $this->define_column('cart', 'TEXT'); $this->define_column('hash', 'VARCHAR(255)'); $this->define_column('gateway_admin_note', 'VARCHAR(255)'); $this->add_serialized_column('cart'); }
function define($object_name, $context = FALSE) { parent::define('photocrati-comments', array($context, 'photocrati-comments')); $this->add_mixin('Mixin_Comment_Mapper'); $this->implement('I_Comment_Mapper'); $this->set_model_factory_method('comment_container'); }
/** * Defines the lightbox library datamapper * @param type $context */ function define($context = FALSE) { if (!is_array($context)) { $context = array($context); } array_push($context, 'lightbox_library'); parent::define('lightbox_library', $context); $this->add_mixin('Mixin_Lightbox_Library_Mapper'); $this->implement('I_Lightbox_Library_Mapper'); $this->set_model_factory_method('lightbox_library'); }
function define($context = FALSE) { parent::define(NULL, array($context, 'display_gallery')); $this->add_mixin('Mixin_Displayed_Gallery_Defaults'); $this->implement('I_Displayed_Gallery_Mapper'); $this->set_model_factory_method('displayed_gallery'); // $this->add_post_hook( // 'save', // 'Propagate thumbnail dimensions', // 'Hook_Propagate_Thumbnail_Dimensions_To_Settings' // ); }
function define($context = FALSE, $not_used = FALSE) { $object_name = 'display_type'; // Add the object name to the context of the object as well // This allows us to adapt the driver itself, if required if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); parent::define($object_name, $context); $this->add_mixin('Mixin_Display_Type_Mapper'); $this->implement('I_Display_Type_Mapper'); $this->set_model_factory_method($object_name); }
/** * Define the mapper * @param string|array|bool $context */ function define($context = FALSE) { $object_name = 'gal_display_source'; // Add the object name to the context of the object as well // This allows us to adapt the driver itself, if required if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); // Define the driver parent::define(NULL, $context); // Add the mixin of instance methods $this->add_mixin('Mixin_Displayed_Gallery_Source_Mapper'); // Implement the interface $this->implement('I_Displayed_Gallery_Source_Mapper'); // Set the factory method for instantiating models $this->set_model_factory_method('displayed_gallery_source'); }
function define($context = FALSE) { $object_name = 'nextgen_proof'; if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); parent::define($object_name, $context); $this->add_mixin('Mixin_Proofing_Mapper'); $this->set_model_factory_method($object_name); $this->define_column('ID', 'BIGINT', 0); $this->define_column('title', 'VARCHAR(255)'); $this->define_column('email', 'VARCHAR(255)'); $this->define_column('customer_name', 'VARCHAR(255)'); $this->define_column('proofed_gallery', 'VARCHAR(255)'); $this->define_column('referer', 'VARCHAR(255)'); $this->define_column('hash', 'VARCHAR(255)'); }
function define($context = FALSE) { $object_name = 'ngg_pricelist_item'; // Add the object name to the context of the object as well // This allows us to adapt the driver itself, if required if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); parent::define($object_name, $context); $this->set_model_factory_method($object_name); // Define columns $this->define_column('ID', 'BIGINT', 0); $this->define_column('pricelist_id', 'BIGINT', 0); $this->define_column('price', 'DECIMAL', 0.0); $this->define_column('source', 'VARCHAR(255)'); $this->define_column('resolution', 'DECIMAL'); $this->define_column('is_shippable', 'BOOLEAN', FALSE); }
function define($context = FALSE, $not_used = FALSE) { $object_name = 'ngg_pricelist'; // Add the object name to the context of the object as well // This allows us to adapt the driver itself, if required if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); parent::define($object_name, $context); $this->add_mixin('Mixin_Pricelist_Mapper'); $this->set_model_factory_method($object_name); // Define columns $this->define_column('ID', 'BIGINT'); $this->define_column('post_author', 'BIGINT'); $this->define_column('title', 'VARCHAR(255)'); $this->define_column('manual_settings', 'TEXT'); $this->define_column('digital_download_settings', 'TEXT'); // Mark the columns which should be unserialized $this->add_serialized_column('manual_settings'); $this->add_serialized_column('digital_download_settings'); }
function define($context = FALSE, $not_used = FALSE) { $object_name = 'display_type'; // Add the object name to the context of the object as well // This allows us to adapt the driver itself, if required if (!is_array($context)) { $context = array($context); } array_push($context, $object_name); parent::define($object_name, $context); $this->add_mixin('Mixin_Display_Type_Mapper'); $this->implement('I_Display_Type_Mapper'); $this->set_model_factory_method($object_name); // Define columns $this->define_column('ID', 'BIGINT', 0); $this->define_column('name', 'VARCHAR(255)'); $this->define_column('title', 'VARCHAR(255)'); $this->define_column('preview_image_relpath', 'VARCHAR(255)'); $this->define_column('default_source', 'VARCHAR(255)'); $this->define_column('view_order', 'BIGINT', NGG_DISPLAY_PRIORITY_BASE); $this->add_serialized_column('settings'); $this->add_serialized_column('entity_types'); }
public function define($context = FALSE, $not_used = FALSE) { parent::define('displayed_gallery', array($context, 'displayed_gallery', 'display_gallery')); $this->add_mixin('Mixin_Displayed_Gallery_Defaults'); $this->implement('I_Displayed_Gallery_Mapper'); $this->set_model_factory_method('displayed_gallery'); }