query
stringlengths
10
8.11k
document
stringlengths
17
398k
negatives
sequencelengths
19
20
metadata
dict
Create a container with parent containers in a buffer for a path. Returns reference to the created container.
protected function & createContainer(array & $buffer, $path) { $path = trim($path, '/'); $parts = explode('/', $path); $array = & $buffer; for ($i = 0; $i < count($parts) - 1; $i++) { if (!array_key_exists($parts[$i], $array)) { $array[$parts[$i]] = []; } $array = & $array[$parts[$i]]; } return $array; }
[ "public function getContainerFromContext($path)\n {\n $scheme = current(preg_split('#://#', $path));\n $options = stream_context_get_options(stream_context_get_default());\n\n return $options[$scheme]['Container'];\n }", "function createContainerByPath( string $type, string $path, string $site_name )\n{\n global $cascade, $slash;\n \n if( $path == $slash )\n {\n return $cascade->getAsset( $type, $path, $site_name );\n }\n \n // break up the path\n $path_array = u\\StringUtility::getExplodedStringArray( $slash, $path );\n $array_size = count( $path_array );\n $parent_path = \"\";\n $current_path = \"\";\n \n for( $i = 0; $i < $array_size; $i++ )\n {\n if( $i == 0 ) // must keep the slash\n $parent_path = $slash;\n else // trim slashes\n $parent_path = trim( $parent_path . $slash . $path_array[ $i - 1 ], $slash );\n\n $current_path = $current_path . $slash . $path_array[ $i ];\n $current_path = trim( $current_path, $slash );\n $container = NULL;\n \n try\n {\n // if the container exists, just return it\n $container = $cascade->getAsset( $type, $current_path, $site_name );\n }\n // the namespace shorthand does not work inside functions\n catch( cascade_ws_exception\\NullAssetException $e )\n {\n // else create it\n $parent = $cascade->getAsset( $type, $parent_path, $site_name );\n $method_name = cascade_ws_constants\\T::$type_property_name_map[ $type ];\n $method_name = \"create\" . ucwords( $method_name );\n $container = $cascade->$method_name( $parent, $path_array[ $i ] );\n }\n }\n \n return $container;\n}", "protected function createContainer()\n\t{\n\t\t$container = new Message_Container_1(self::SOURCE, self::DESTINATION);\n\t\t$container->setBody(self::BODY);\n\t\t\n\t\treturn $container;\n\t}", "public function createContainer()\n {\n return new Container($this);\n }", "public function testCreateContainerNodeInSharedFolder()\n {\n $testPath = '/' . Tinebase_Model_Container::TYPE_SHARED . '/testcontainer';\n $result = $this->_json->createNode($testPath, Tinebase_Model_Tree_Node::TYPE_FOLDER, NULL, FALSE);\n $createdNode = $result;\n \n $this->_objects['containerids'][] = $createdNode['name']['id'];\n \n $this->assertTrue(is_array($createdNode['name']));\n $this->assertEquals('testcontainer', $createdNode['name']['name']);\n $this->assertEquals($testPath, $createdNode['path']);\n \n return $createdNode;\n }", "public static function createContainer($container);", "protected function create()\n {\n return $this->manager->createContainer($this->configuration);\n }", "public function create(Container $container);", "public function getDependencyContainer() {\n $container = new DependencyContainer();\n\n $path = null;\n if ($this->path) {\n $path = $this->path . File::DIRECTORY_SEPARATOR;\n }\n\n $files = array_reverse($this->fileBrowser->getFiles($path . $this->file));\n foreach ($files as $file) {\n $this->readDependencies($container, $file);\n }\n\n if ($this->environment) {\n $path .= $this->environment . File::DIRECTORY_SEPARATOR;\n\n $files = array_reverse($this->fileBrowser->getFiles($path . $this->file));\n foreach ($files as $file) {\n $this->readDependencies($container, $file);\n }\n }\n\n return $container;\n }", "static public function containerWithMutable($mutable)\n {\n if (is_a($mutable, '\\Iresults\\Core\\Mutable\\Xml')) {\n /** @var PathContainer $container */\n $container = static::container();\n $container->initWithMutableFromXml($mutable);\n\n return $container;\n }\n\n return self::containerWithArray($mutable);\n }", "public function container(string $name);", "protected function buildContainer()\n {\n // Get MicroCMS container builder\n $builder = new ContainerBuilder($this->getContainerBuilder());\n\n // Set file loader for config files\n $config_dirs = array($this->getSystemConfigDir(), $this->getConfigDir());\n $config_locator = new FileLocator($config_dirs);\n $builder->setConfigLocator($config_locator);\n\n // Finish container\n $container = $builder->prepareContainer();\n $container->set('kernel', $this);\n $container->set('kernel.config_locator', $config_locator);\n $container->compile();\n\n return($container);\n }", "public function createContainerFromArray(array $data): ContainerInterface;", "abstract protected function createWhereContainer();", "public function loadContainer($path = '/library')\n {\n return new Containers\\MediaContainer($this->loadContainerRaw($path), $this);\n }", "public function createPsr11Container(IContainer $container): ContainerInterface;", "public function createContainer()\n {\n return new DatabaseContainer($this);\n }", "protected function createContainer()\n {\n $container = new ContainerBuilder();\n\n $container->set('config', $this->config);\n $container->set('githubClient', $this->githubClient);\n\n return $container;\n }", "protected function createContainer()\n {\n $container = new Container();\n\n // The CacheManager creates the cache \"repository\" based on config values.\n $default = $this->config->get('cache.default');\n\n if ($default == 'array') {\n $container['config'] = [\n 'cache.default' => 'array',\n 'cache.stores.array' => [\n 'driver' => $this->config->get('cache.stores.array.driver'),\n ]\n ];\n } elseif ($default == 'file') {\n $container['config'] = [\n 'cache.default' => 'file',\n 'cache.stores.file' => [\n 'driver' => $this->config->get('cache.stores.file.driver'),\n 'path' => $this->config->get('cache.stores.file.path')\n ]\n ];\n // To use the file cache driver we need an instance of Illuminate's Filesystem.\n $container['files'] = new Filesystem;\n }\n\n return $container;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the optional entity layouts.
public function getLayouts(): ?array;
[ "protected function getEntityLayoutStorage() {\n return $this->entityTypeManager->getStorage('entity_layout');\n }", "public function getLayouts(): ?array {\n $groups = $this->get('field_layouts');\n\n if ($groups == NULL) {\n return NULL;\n }\n\n $layouts = [];\n\n foreach ($groups as $group) {\n switch ($group->entity->getType()) {\n case 'text_content':\n if ($text = $group->entity->get('field_text')->first()) {\n $layouts[] = ['text' => $text->value];\n }\n break;\n }\n }\n\n return $layouts;\n }", "public function getLayout() {\n\n $entity = $this->php_self;\n $idItem = (int) Tools::getValue('id_' . $entity);\n\n $layoutDir = $this->getThemeDir();\n $layoutOverrideDir = $this->getOverrideThemeDir();\n\n $layout = false;\n\n if ($entity) {\n\n if ($idItem > 0 && file_exists($layoutOverrideDir . 'layout-' . $entity . '-' . $idItem . '.tpl')) {\n $layout = $layoutOverrideDir . 'layout-' . $entity . '-' . $idItem . '.tpl';\n } else\n\n if (file_exists($layoutOverrideDir . 'layout-' . $entity . '.tpl')) {\n $layout = $layoutOverrideDir . 'layout-' . $entity . '.tpl';\n }\n\n }\n\n if (!$layout && file_exists($layoutDir . 'layout.tpl')) {\n $layout = $layoutDir . 'layout.tpl';\n }\n\n return $layout;\n }", "public function getEntityLayoutFromRouteMatch() {\n if (!$this->entityLayout) {\n $content_entity = $this->getContentEntityFromRouteMatch();\n\n $this->entityLayout = $this->entityLayoutManager\n ->getEntityLayout($content_entity->getEntityTypeId(), $content_entity->bundle());\n }\n\n return $this->entityLayout;\n }", "abstract public function getLayouts();", "public function getParentEntityStorage() {\n $display_entity = $this->getDisplayEntity();\n /** @var \\Drupal\\layout_builder\\Entity\\LayoutEntityDisplayInterface $display_entity */\n $contexts['display'] = EntityContext::fromEntity($display_entity);\n $contexts['view_mode'] = new Context(new ContextDefinition('string'), $display_entity->getMode());\n return $this->sectionStorageManager->load('defaults', $contexts);\n }", "function page_layouts()\n {\n return app(\\Versatile\\Core\\Support\\Registry::class)->get('page_layouts', []);\n }", "public static function getLayouts() {\n\n\t\t$view_list = [\n\t\t\t'one_column',\n\t\t\t'one_sidebar',\n\t\t\t'two_sidebar',\n\t\t];\n\n\t\treturn elgg_trigger_plugin_hook('layouts', 'anypage', null, $view_list);\n\t}", "public function getLayout() {}", "public function get_default_layout()\n\t{\n\t\t$qry = $this->EE->db->get_where('dashee_layouts', array('site_id' => $this->_site_id, 'is_default' => TRUE));\n\t\t\n\t\tif($qry->num_rows() > 0)\n\t\t{\n\t\t\treturn $qry->row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$params = array(\n\t\t\t\t'site_id'\t\t=> $this->_site_id,\n\t\t\t\t'name' \t\t\t=> 'Default EE layout',\n\t\t\t\t'description'\t=> 'Default dashEE layout that mimics standard EE CP.',\n\t\t\t\t'config' \t\t=> json_encode($this->get_standard_default_template()),\n\t\t\t\t'is_default' \t=> TRUE\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$this->EE->db->insert('dashee_layouts', $params);\n\t\t\t\n\t\t\treturn $this->EE->db->get_where('dashee_layouts', array('site_id' => $this->_site_id, 'is_default' => TRUE))->row();\n\t\t}\n\t}", "function hook_ds_layout_settings_info() {\n $dslayouts = array();\n\n $dslayout = new stdClass;\n $dslayout->disabled = FALSE; /* Edit this to true to make a default dslayout disabled initially */\n $dslayout->api_version = 1;\n $dslayout->id = 'node|article|default';\n $dslayout->entity_type = 'node';\n $dslayout->bundle = 'article';\n $dslayout->view_mode = 'default';\n $dslayout->layout = 'ds_2col';\n $dslayout->settings = array(\n 'hide_empty_regions' => 0,\n 'regions' => array(\n 'left' => array(\n 0 => 'title',\n 1 => 'node_link',\n ),\n 'right' => array(\n 0 => 'body',\n ),\n ),\n 'fields' => array(\n 'title' => 'left',\n 'node_link' => 'left',\n 'body' => 'right',\n ),\n 'classes' => array(),\n );\n $dslayouts['node|article|default'] = $dslayout;\n\n return $dslayouts;\n}", "function extant_get_layout_types() {\n\n\treturn array(\n\t\t'full' => esc_html__( 'Full Width', 'extant' ),\n\t\t'boxed' => esc_html__( 'Boxed', 'extant' )\n\t);\n}", "function getLayouts(): array\n {\n return array_keys($this->options['layouts']);\n }", "public function getLayout();", "public function getLayoutSettings();", "public function getLayout()\n {\n if ($this->layout === null) {\n $this->layout = $this->image->hasAttribute(Attribute::LAYOUT)\n ? (string)$this->image->getAttribute(Attribute::LAYOUT)\n : '';\n }\n\n return $this->layout;\n }", "public function getDefaultLayout()\n\t{\n\t\treturn $this->defaultLayout();\n\t}", "function getLayout()\n{\n $layout = 'layouts.student.studentlayout';\n if (Is_Owner()) {\n $layout = 'layouts.admin.adminlayout';\n }\n if (is_parent()) {\n $layout = 'layouts.parent.parentlayout';\n }\n\n if (is_teacher()) {\n $layout = 'layouts.staff.stafflayout';\n }\n\n if (is_student_guide()) {\n $layout = 'layouts.student_guide.studentGuidelayout';\n }\n\n if (Is_Librarian()) {\n $layout = 'layouts.librarian.librarianlayout';\n }\n if (Is_Secondary_parent()) {\n $layout = 'users.secondary-parent.dashboard';\n }\n return $layout;\n}", "function get_layouts()\n{\n global $config;\n $layouts = array();\n \n $layoutNodes = $config->xpath('/fizzy/application/layouts/layout');\n foreach($layoutNodes as $node) {\n $layouts[(string) $node['name']] = (string) $node;\n }\n \n return $layouts;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns a products suggestion for the given key.
protected function suggestFor(string $preferenceKey) : Collection { $suggestions = Product::suggestionsFor($preferenceKey, $this->resolveTagsFor($preferenceKey)) ->whereNotIn('id', $this->excluding->all()) ->orderBy('rate_val', 'desc') ->take($this->limit) ->get(); if ($suggestions->count() < $this->limit) { $suggestions = $suggestions->merge($this->completeWithRandomProducts($suggestions)); } $this->excluding($suggestions); return $suggestions; }
[ "function suggest_products(){\n\t\t$product_name = $this->input->post('q', TRUE);\n \n $products = new Languages_Product(); \n $products->like('name', $product_name, 'after')->get_iterated(); \n\t\t\n\t\tforeach($products as $product){\n\t\t\techo $product->name.\"\\n\";\n\t\t}\n\t\treturn;\n\t}", "public function search($productKey){\n\t\tif(!array_key_exists($productKey,$this->products)){\n\t\t\tthrow new \\Exception('Product do not exists!');\n\t\t}\n\t\treturn $this->products[$productKey];\n\t}", "public static function searchProduct($searchkey)\n {\n\n $search = new Search();\n $search->setCategory('All');\n $search->setResponseGroup(array('Large', 'Small'));\n $search->setKeywords($searchkey);\n\n $formattedResponse = self::$API->runOperation($search);\n $response = json_decode(json_encode($formattedResponse), true);\n // print_r ($response); \n\n foreach ($response['Items']['Item'] as $key=>$p) {\n $title[] = $p['ItemAttributes']['Title'];\n $src[] = $p['LargeImage']['URL'];\n $price[] = $p['OfferSummary']['LowestNewPrice']['Amount'] / 100;\n $priceoriginal[] = $p['ItemAttributes']['ListPrice']['Amount'] / 100;\n $link[] = $p['DetailPageURL'];\n $size[] = $p['ItemAttributes']['ClothingSize'];\n $brand[] = $p['ItemAttributes']['Brand'];\n\n if($key==50){\n break;\n }\n }\n\n $product['title'] = $title;\n $product['src'] = $src;\n $product['price'] = $price;\n $product['priceoriginal'] = $priceoriginal;\n $product['link'] = $link;\n $product['size'] = $size;\n $product['brand'] = $brand;\n\n // print_r($product);\n\n\n $product_json=json_encode($product);\n\n return $product_json;\n\n \n //All','Beauty','Grocery','Industrial','PetSupplies','OfficeProducts','Electronics','Watches','Jewelry','Luggage','Shoes','Furniture','KindleStore','Automotive','Pantry','MusicalInstruments','GiftCards','Toys','SportingGoods','PCHardware','Books','LuxuryBeauty','Baby','HomeGarden','VideoGames','Apparel','Marketplace','DVD','Appliances','Music','LawnAndGarden','HealthPersonalCare','Software' \n \n }", "public function getSuggestedProducts()\n {\n return $this->suggestedProducts;\n }", "public function product_by_search(){\n\t\t$CI =& get_instance();\n\t\t$CI->load->model('dashboard/Suppliers');\n\t\t$suppliers_list = $CI->Suppliers->product_search_item($supplier_id);\n\t\t$i=0;\n\t\tforeach($suppliers_list as $k=>$v){$i++;\n $suppliers_list[$k]['sl']=$i;\n\t\t}\n\t\t$data = array(\n\t\t\t\t'title' => 'Suppliers Search Items',\n\t\t\t\t'suppliers_list' => $suppliers_list\n\t\t\t);\n\t\t$supplierList = $CI->parser->parse('supplier/supplier',$data,true);\n\t\treturn $supplierList;\n\t}", "public function productIdAutocompleteSuggester( $query ) {\n global $wpdb;\n $product_id = (int) $query;\n $post_meta_infos = $wpdb->get_results(\n $wpdb->prepare( \"SELECT a.ID AS id, a.post_title AS title, b.meta_value AS sku\n FROM {$wpdb->posts} AS a\n LEFT JOIN ( SELECT meta_value, post_id FROM {$wpdb->postmeta} WHERE `meta_key` = '_sku' ) AS b ON b.post_id = a.ID\n WHERE a.post_type = 'product' AND ( a.ID = '%d' OR b.meta_value LIKE '%%%s%%' OR a.post_title LIKE '%%%s%%' )\",\n $product_id > 0 ? $product_id : - 1, stripslashes( $query ), stripslashes( $query ) ), ARRAY_A );\n\n $results = array();\n if ( is_array( $post_meta_infos ) && ! empty( $post_meta_infos ) ) {\n foreach ( $post_meta_infos as $value ) {\n $data = array();\n $data['value'] = $value['id'];\n $data['label'] = esc_html__( 'Id', 'js_composer' ) . ': ' .\n $value['id'] .\n ( ( strlen( $value['title'] ) > 0 ) ? ' - ' . esc_html__( 'Title', 'js_composer' ) . ': ' .\n $value['title'] : '' ) .\n ( ( strlen( $value['sku'] ) > 0 ) ? ' - ' . esc_html__( 'Sku', 'js_composer' ) . ': ' .\n $value['sku'] : '' );\n $results[] = $data;\n }\n }\n\n return $results;\n }", "public function getProductKey();", "public function getProduct( $key )\n\t{\n\t\tif( !isset( $this->products[$key] ) ) {\n\t\t\tthrow new \\Aimeos\\MShop\\Order\\Exception( sprintf( 'Product not available' ) );\n\t\t}\n\n\t\treturn $this->products[$key];\n\t}", "public function getProductId($key) {\n\t\t$exp = explode('-', $key);\n\t\treturn isset($exp[0]) ? $exp[0] : 0;\n\t}", "public function product_search_by_supplier(){\n\n\t\t$CI =& get_instance();\n\t\t$this->auth->check_admin_auth();\n\t\t$CI->load->library('lpurchase');\n\t\t$CI->load->model('Suppliers');\n\t\t$supplier_id = $this->input->post('supplier_id');\t\t\t\n $content = $CI->Suppliers->product_search_item($supplier_id);\n\n if (empty($content)) {\n \techo display('product_not_found');\n\t }else{\n\t \t// Select option created for product\n\t echo \"<select name=\\\"product_id[]\\\" class=\\\"productSelection form-control\\\" id=\\\"product_id\\\">\";\n\t \techo \"<option value=\\\"0\\\">\".display('select_one').\"</option>\";\n\t \tforeach ($content as $product) {\n\t \t\t\techo \"<option value=\".$product['product_id'].\">\";\n\t \t\t\techo $product['product_name'].\"-(\".$product['product_model'].\")\";\n\t \t\t\techo \"</option>\"; \n\t \t}\t\n\t echo \"</select>\";\n\t }\n\t}", "protected function _getProductUrlKeySelect()\n {\n $urlKeyAttribute = $this->_getEavConfig()->getAttribute(self::ENTITY_PRODUCT, 'url_key');\n $nameAttribute = $this->_getEavConfig()->getAttribute(self::ENTITY_PRODUCT, 'name');\n\n $select = $this->_select();\n // Initialize tables for fullfilment of url key index for categories\n $select\n ->from(array('product' => $this->getTable('catalog/product')), array())\n // Data should be generated only for products that are assigned for that are available on the website\n ->join(\n array('product_website' => $this->getTable('catalog/product_website')),\n 'product_website.product_id = product.entity_id',\n array())\n ->join(\n array('store' => $this->getTable('core/store')),\n 'store.website_id = product_website.website_id',\n array())\n ->joinLeft(\n array('original' => $this->getTable(self::PRODUCT_URL_KEY)),\n 'original.product_id = product.entity_id AND original.store_id = store.store_id',\n array()\n )\n // Name attribute values retrieval (for default and store)\n ->join(array('name_default' => $nameAttribute->getBackendTable()),\n 'name_default.entity_id = product.entity_id'\n . ' AND name_default.store_id = 0'\n . $this->_quoteInto(\n ' AND name_default.attribute_id = ?',\n $nameAttribute->getAttributeId()),\n array())\n ->joinLeft(array('name_store' => $nameAttribute->getBackendTable()),\n 'name_store.entity_id = product.entity_id'\n . ' AND name_store.store_id = store.store_id'\n . $this->_quoteInto(\n ' AND name_store.attribute_id = ?',\n $nameAttribute->getAttributeId()),\n array())\n // Url key attribute retrieval (for default and store)\n ->joinLeft(array('url_key_default' => $urlKeyAttribute->getBackendTable()),\n 'url_key_default.entity_id = product.entity_id'\n . ' AND url_key_default.store_id = 0'\n . $this->_quoteInto(\n ' AND url_key_default.attribute_id = ?',\n $urlKeyAttribute->getAttributeId()),\n array())\n ->joinLeft(array('url_key_store' => $urlKeyAttribute->getBackendTable()),\n 'url_key_store.entity_id = product.entity_id'\n . ' AND url_key_store.store_id = store.store_id'\n . $this->_quoteInto(\n ' AND url_key_store.attribute_id = ?',\n $urlKeyAttribute->getAttributeId()),\n array());\n\n $urlKeySourceExpr = new Zend_Db_Expr(\n 'IFNULL('\n . ' IFNULL(url_key_store.value, url_key_default.value), '\n . ' IFNULL(name_store.value, name_default.value) '\n . ')'\n );\n\n $columns = array(\n 'store_id' => 'store.store_id',\n 'product_id' => 'product.entity_id',\n 'url_key_source' => $urlKeySourceExpr,\n 'updated' => new Zend_Db_Expr(\n 'IF(original.product_id IS NULL, 1, '\n . $urlKeySourceExpr . ' != original.url_key_source)'\n )\n );\n\n $select->columns($columns);\n\n Mage::dispatchEvent(\n 'ecomdev_urlrewrite_indexer_get_product_url_key_select',\n array('select' => $select, 'columns' => $columns, 'resource' => $this)\n );\n\n return $select;\n }", "public function productIdAutocompleteSuggester( $query ) {\n\t\tglobal $wpdb;\n\t\t$product_id = (int) $query;\n\t\t$post_meta_infos = $wpdb->get_results( $wpdb->prepare( \"SELECT a.ID AS id, a.post_title AS title, b.meta_value AS sku\n\t\t\t\t\tFROM {$wpdb->posts} AS a\n\t\t\t\t\tLEFT JOIN ( SELECT meta_value, post_id FROM {$wpdb->postmeta} WHERE `meta_key` = '_sku' ) AS b ON b.post_id = a.ID\n\t\t\t\t\tWHERE a.post_type = 'product' AND ( a.ID = '%d' OR b.meta_value LIKE '%%%s%%' OR a.post_title LIKE '%%%s%%' )\", $product_id > 0 ? $product_id : - 1, stripslashes( $query ), stripslashes( $query ) ), ARRAY_A );\n\n\t\t$results = array();\n\t\tif ( is_array( $post_meta_infos ) && ! empty( $post_meta_infos ) ) {\n\t\t\tforeach ( $post_meta_infos as $value ) {\n\t\t\t\t$data = array();\n\t\t\t\t$data['value'] = $value['id'];\n\t\t\t\t$data['label'] = __( 'Id', 'sneaker' ) . ': ' . $value['id'] . ( ( strlen( $value['title'] ) > 0 ) ? ' - ' . __( 'Title', 'sneaker' ) . ': ' . $value['title'] : '' ) . ( ( strlen( $value['sku'] ) > 0 ) ? ' - ' . __( 'Sku', 'sneaker' ) . ': ' . $value['sku'] : '' );\n\t\t\t\t$results[] = $data;\n\t\t\t}\n\t\t}\n\n\t\treturn $results;\n\t}", "public function load_suggested_products(){\n\t\t$suggested_products = $this->CI->prod_model->list_suggested_products_by_est($this->est_id);\n\t\t$data = array();\n\t\tforeach($suggested_products as $k => $prod){\n\t\t\t$data[$prod->cat_name][$prod->name] = $prod;\n\t\t\t\n\t\t\t//Images management\n\t\t\tif(!empty($prod->image)){\n\t\t\t\t$data[$prod->cat_name][$prod->name]->image = '/uploads/products/thumbnails/thumb_'.$prod->image;\n\t\t\t} elseif($prod->image=='0'){\n\t\t\t\t$data[$prod->cat_name][$prod->name]->image = '/assets/common/img/categories/default/'.$prod->cat_image;\n\t\t\t} else{\n\t\t\t\t$data[$prod->cat_name][$prod->name]->image = '';\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "public static function getBestSupplierForProduct(string $product_id) {\n return self::select('products.product_id as product', 'products.description', 'price', 'suppliers.entity as entity', 'suppliers.name as name', 'country')\n ->join('suppliers', 'product_suppliers.supplier_entity', '=', 'suppliers.entity')\n ->join('products', 'product_suppliers.product_id', '=', 'products.product_id')\n ->where('products.product_id' , '=', $product_id)\n ->orderBy('price', 'asc')\n ->first();\n }", "public function getProductBYKeyword(){\n $keyword = trim($this->input->get(\"term\"));\n $userId = trim($this->input->get('userId'));\n\n if($keyword ==\"\"){\n $error = array(\"status\" => \"0\", \"message\" => \"Not get Search key\");\n echo json_encode($error);\n exit;\n }\n\n $productList = $this->ProductApiModel->getProductVariationByKeyword($keyword);\n if(is_array($productList))\n {\n if(count($productList)>0){\n \n if($userId != ''){\n $wishItems = $this->getWishListItem($userId);\n if($wishItems != false){\n foreach($productList as &$prod)\n {\n $prod['isMyWish'] = '';\n foreach($wishItems as $wish){\n if($wish[\"product_variation_id\"] == $prod['id'])\n $prod['isMyWish'] = 'heart';\n }\n }\n }else{\n foreach($productList as &$prod)\n {\n $prod['isMyWish'] = '';\n }\n }\n\n }\n\n //getting variation details\n foreach($productList as &$prod){\n $variation = $this->basic_model->selectAll('variation_details',array('product_variation_id'=>$prod['id']));\n $minmumPrice = \"\";\n $minmumWeight = \"\";\n if(is_array($variation) && count($variation)>0){\n // echo \"<pre>\";print_r($variation);\n foreach($variation as $vari)\n {\n $temp = array();\n $temp['varition_detail_id'] = $vari['id'];\n $temp['varition'] = $vari['weight'];\n $temp['right_price'] = ($vari['sale_price'] > 0) ? $vari['order_price'] :$vari['regular_price'];\n $minmumPrice = $temp['right_price'];\n $minmumWeight = $temp['varition'];\n $prod['variation_details'][] = $temp;\n }\n\n $prod['selectedQty'] = 1;//0;\n $prod['selectedQtyPrice'] = floatval(($variation[0]['sale_price'] > 0) ? $variation[0]['order_price'] :$variation[0]['regular_price']);\n $prod['selectedQtyVariation'] = $variation[0]['weight'];\n $prod['selectedVariationID'] = $variation[0]['id'];\n $prod['selectedVariationPrice'] = floatval(($variation[0]['sale_price'] > 0) ? $variation[0]['order_price'] :$variation[0]['regular_price']);\n\n }\n }\n // echo \"<pre>\";\n // print_r($productList);die;\n $success = array(\"status\" => \"1\", \"searchProduct\"=>$productList);\n echo json_encode($success);\n exit;\n }else{\n $error = array(\"status\" => \"0\", \"message\" => \"not found any product\");\n echo json_encode($error);\n exit;\n }\n\n }else{\n $error = array(\"status\" => \"0\", \"message\" => \"Something went wrong\");\n echo json_encode($error);\n exit;\n }\n }", "public function prepareSearchSuggestList($searchQuery)\n {\n $inactiveBrandIds = $this->brandRepository->fetchInactiveBrand();\n $categoryCollection = $this->manageCategoryRepository->fetchAllActiveWithChildren();\n\n // find all active categories\n $activeCatIds = findActiveChildren($categoryCollection);\n\n // get search suggest list\n $productResult = $this->productRepository\n ->fetchProductSearchSuggestList($searchQuery, $inactiveBrandIds, $activeCatIds);\n\n $categoryResult = $this->manageCategoryRepository\n ->fetchCategorySearchSuggestList($searchQuery, $activeCatIds);\n \n $brandResult = $this->brandRepository\n ->fetchBrandySearchSuggestList($searchQuery);\n\n $productData = [];\n if (!__isEmpty($productResult)) {\n foreach ($productResult as $key => $product) {\n $productData[] = [\n 'id' => $product->id,\n 'name' => $product->name,\n 'type' => 1,\n 'searchUrl' => route('product.search').'?search_term='.htmlspecialchars($product->name),\n ];\n }\n\n }\n\n $categoryData = [];\n if (!__isEmpty($categoryResult)) {\n foreach ($categoryResult as $key => $category) {\n \t\t\n if (!__isEmpty($category->parentCategory)) {\n //check if parent category is active\n if ($category->parentCategory->status == 1) {\n \n $categoryName = $category->parentCategory->name.' &raquo; '.$category->name.' <small>(category)</small>';\n\n $categoryData[] = [\n 'id' => $category->id,\n 'name' => $categoryName,\n 'searchUrl' => route('products_by_category', [$category->id, htmlspecialchars($category->name)]),\n 'type' => 2\n ];\n }\n } else {\n $categoryName = $category->name.' <small>(category)</small>';\n\n $categoryData[] = [\n 'id' => $category->id,\n 'name' => $categoryName,\n 'searchUrl' => route('products_by_category', [$category->id, htmlspecialchars($category->name)]),\n 'type' => 2\n ];\n }\n }\n }\n \n $brandData = [];\n if (!__isEmpty($brandResult)) {\n foreach ($brandResult as $key => $brand) {\n $brandData[] = [\n 'id' => $brand->id,\n 'name' => $brand->name.' <small>(brand)</small>',\n 'searchUrl' => route('product.related.by.brand', [$brand->id, htmlspecialchars($brand->name)]),\n 'type' => 3\n ];\n }\n }\n\n $searchData = array_merge($brandData, $categoryData, $productData);\n\n return __engineReaction(1, ['searchResult' => $searchData]);\n }", "public function getSearchHint(Request $req){\n // return list of product have name like key word\n return Product::where('name', 'LIKE', '%'.$req->q.'%')->get();\n \n }", "function tep_get_header_tag_products_keywords($product_id) {\n global $languages_id, $_GET; \n\n $product_header_tags = tep_db_query(\"select products_head_keywords_tag from \" . TABLE_PRODUCTS_DESCRIPTION . \" where language_id = '\" . (int)$languages_id . \"' and products_id = '\" . (int)$_GET['products_id'] . \"'\");\n $product_header_tags_values = tep_db_fetch_array($product_header_tags);\n\n return $product_header_tags_values['products_head_keywords_tag'];\n }", "public function product_by_search() {\n $CI = & get_instance();\n $CI->load->model('manufacturers');\n $manufacturers_list = $CI->manufacturers->product_search_item($manufacturer_id);\n $i = 0;\n foreach ($manufacturers_list as $k => $v) {\n $i++;\n $manufacturers_list[$k]['sl'] = $i;\n }\n $data = array(\n 'title' => display('manage_manufacturer'),\n 'manufacturers_list' => $manufacturers_list\n );\n $manufacturerList = $CI->parser->parse('manufacturer/manufacturer', $data, true);\n return $manufacturerList;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders row values using $this>themeFunctions() as theme.
public function theme(ResultRow $values);
[ "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->SEG_LAT->FormValue == $this->SEG_LAT->CurrentValue && is_numeric(ew_StrToFloat($this->SEG_LAT->CurrentValue)))\n\t\t\t$this->SEG_LAT->CurrentValue = ew_StrToFloat($this->SEG_LAT->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->SEG_LONG->FormValue == $this->SEG_LONG->CurrentValue && is_numeric(ew_StrToFloat($this->SEG_LONG->CurrentValue)))\n\t\t\t$this->SEG_LONG->CurrentValue = ew_StrToFloat($this->SEG_LONG->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->FP_Armada->FormValue == $this->FP_Armada->CurrentValue && is_numeric(ew_StrToFloat($this->FP_Armada->CurrentValue)))\n\t\t\t$this->FP_Armada->CurrentValue = ew_StrToFloat($this->FP_Armada->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->FP_Ejercito->FormValue == $this->FP_Ejercito->CurrentValue && is_numeric(ew_StrToFloat($this->FP_Ejercito->CurrentValue)))\n\t\t\t$this->FP_Ejercito->CurrentValue = ew_StrToFloat($this->FP_Ejercito->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->FP_Policia->FormValue == $this->FP_Policia->CurrentValue && is_numeric(ew_StrToFloat($this->FP_Policia->CurrentValue)))\n\t\t\t$this->FP_Policia->CurrentValue = ew_StrToFloat($this->FP_Policia->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// llave\n\t\t// F_Sincron\n\t\t// USUARIO\n\t\t// Cargo_gme\n\t\t// NOM_PE\n\t\t// Otro_PE\n\t\t// NOM_APOYO\n\t\t// Otro_Nom_Apoyo\n\t\t// Otro_CC_Apoyo\n\t\t// NOM_ENLACE\n\t\t// Otro_Nom_Enlace\n\t\t// Otro_CC_Enlace\n\t\t// NOM_PGE\n\t\t// Otro_Nom_PGE\n\t\t// Otro_CC_PGE\n\t\t// Departamento\n\t\t// Muncipio\n\t\t// NOM_VDA\n\t\t// LATITUD\n\t\t// GRA_LAT\n\t\t// MIN_LAT\n\t\t// SEG_LAT\n\t\t// GRA_LONG\n\t\t// MIN_LONG\n\t\t// SEG_LONG\n\t\t// FECHA_ACC\n\t\t// HORA_ACC\n\t\t// Hora_ingreso\n\t\t// FP_Armada\n\t\t// FP_Ejercito\n\t\t// FP_Policia\n\t\t// NOM_COMANDANTE\n\t\t// TESTI1\n\t\t// CC_TESTI1\n\t\t// CARGO_TESTI1\n\t\t// TESTI2\n\t\t// CC_TESTI2\n\t\t// CARGO_TESTI2\n\t\t// Afectados\n\t\t// NUM_Afectado\n\t\t// Nom_Afectado\n\t\t// CC_Afectado\n\t\t// Cargo_Afectado\n\t\t// Tipo_incidente\n\t\t// Riesgo\n\t\t// Parte_Cuerpo\n\t\t// ESTADO_AFEC\n\t\t// EVACUADO\n\t\t// DESC_ACC\n\t\t// Modificado\n\t\t// llave_2\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// llave\n\t\t\t$this->llave->ViewValue = $this->llave->CurrentValue;\n\t\t\t$this->llave->ViewCustomAttributes = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->ViewValue = $this->F_Sincron->CurrentValue;\n\t\t\t$this->F_Sincron->ViewValue = ew_FormatDateTime($this->F_Sincron->ViewValue, 5);\n\t\t\t$this->F_Sincron->ViewCustomAttributes = \"\";\n\n\t\t\t// USUARIO\n\t\t\tif (strval($this->USUARIO->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`USUARIO`\" . ew_SearchString(\"=\", $this->USUARIO->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->USUARIO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `USUARIO` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->USUARIO->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->USUARIO->ViewValue = $this->USUARIO->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->USUARIO->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->USUARIO->ViewCustomAttributes = \"\";\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->ViewValue = $this->Cargo_gme->CurrentValue;\n\t\t\t$this->Cargo_gme->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_PE\n\t\t\tif (strval($this->NOM_PE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_PE`\" . ew_SearchString(\"=\", $this->NOM_PE->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PE` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_PE->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_PE->ViewValue = $this->NOM_PE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_PE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_PE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->ViewValue = $this->Otro_PE->CurrentValue;\n\t\t\t$this->Otro_PE->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_APOYO\n\t\t\tif (strval($this->NOM_APOYO->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_APOYO`\" . ew_SearchString(\"=\", $this->NOM_APOYO->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_APOYO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_APOYO` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_APOYO->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_APOYO->ViewValue = $this->NOM_APOYO->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_APOYO->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_APOYO->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->ViewValue = $this->Otro_Nom_Apoyo->CurrentValue;\n\t\t\t$this->Otro_Nom_Apoyo->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->ViewValue = $this->Otro_CC_Apoyo->CurrentValue;\n\t\t\t$this->Otro_CC_Apoyo->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_ENLACE\n\t\t\tif (strval($this->NOM_ENLACE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_ENLACE`\" . ew_SearchString(\"=\", $this->NOM_ENLACE->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_ENLACE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_ENLACE` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_ENLACE->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_ENLACE->ViewValue = $this->NOM_ENLACE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_ENLACE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_ENLACE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->ViewValue = $this->Otro_Nom_Enlace->CurrentValue;\n\t\t\t$this->Otro_Nom_Enlace->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->ViewValue = $this->Otro_CC_Enlace->CurrentValue;\n\t\t\t$this->Otro_CC_Enlace->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_PGE\n\t\t\tif (strval($this->NOM_PGE->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOM_PGE`\" . ew_SearchString(\"=\", $this->NOM_PGE->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PGE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PGE` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->NOM_PGE->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOM_PGE->ViewValue = $this->NOM_PGE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOM_PGE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->NOM_PGE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->ViewValue = $this->Otro_Nom_PGE->CurrentValue;\n\t\t\t$this->Otro_Nom_PGE->ViewCustomAttributes = \"\";\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->ViewValue = $this->Otro_CC_PGE->CurrentValue;\n\t\t\t$this->Otro_CC_PGE->ViewCustomAttributes = \"\";\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->ViewValue = $this->Departamento->CurrentValue;\n\t\t\t$this->Departamento->ViewCustomAttributes = \"\";\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->ViewValue = $this->Muncipio->CurrentValue;\n\t\t\t$this->Muncipio->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->ViewValue = $this->NOM_VDA->CurrentValue;\n\t\t\t$this->NOM_VDA->ViewCustomAttributes = \"\";\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->ViewValue = $this->LATITUD->CurrentValue;\n\t\t\t$this->LATITUD->ViewCustomAttributes = \"\";\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->ViewValue = $this->GRA_LAT->CurrentValue;\n\t\t\t$this->GRA_LAT->ViewCustomAttributes = \"\";\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->ViewValue = $this->MIN_LAT->CurrentValue;\n\t\t\t$this->MIN_LAT->ViewCustomAttributes = \"\";\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->ViewValue = $this->SEG_LAT->CurrentValue;\n\t\t\t$this->SEG_LAT->ViewCustomAttributes = \"\";\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->ViewValue = $this->GRA_LONG->CurrentValue;\n\t\t\t$this->GRA_LONG->ViewCustomAttributes = \"\";\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->ViewValue = $this->MIN_LONG->CurrentValue;\n\t\t\t$this->MIN_LONG->ViewCustomAttributes = \"\";\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->ViewValue = $this->SEG_LONG->CurrentValue;\n\t\t\t$this->SEG_LONG->ViewCustomAttributes = \"\";\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->ViewValue = $this->FECHA_ACC->CurrentValue;\n\t\t\t$this->FECHA_ACC->ViewCustomAttributes = \"\";\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->ViewValue = $this->HORA_ACC->CurrentValue;\n\t\t\t$this->HORA_ACC->ViewCustomAttributes = \"\";\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->ViewValue = $this->Hora_ingreso->CurrentValue;\n\t\t\t$this->Hora_ingreso->ViewCustomAttributes = \"\";\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->ViewValue = $this->FP_Armada->CurrentValue;\n\t\t\t$this->FP_Armada->ViewCustomAttributes = \"\";\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->ViewValue = $this->FP_Ejercito->CurrentValue;\n\t\t\t$this->FP_Ejercito->ViewCustomAttributes = \"\";\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->ViewValue = $this->FP_Policia->CurrentValue;\n\t\t\t$this->FP_Policia->ViewCustomAttributes = \"\";\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->ViewValue = $this->NOM_COMANDANTE->CurrentValue;\n\t\t\t$this->NOM_COMANDANTE->ViewCustomAttributes = \"\";\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->ViewValue = $this->TESTI1->CurrentValue;\n\t\t\t$this->TESTI1->ViewCustomAttributes = \"\";\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->ViewValue = $this->CC_TESTI1->CurrentValue;\n\t\t\t$this->CC_TESTI1->ViewCustomAttributes = \"\";\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->ViewValue = $this->CARGO_TESTI1->CurrentValue;\n\t\t\t$this->CARGO_TESTI1->ViewCustomAttributes = \"\";\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->ViewValue = $this->TESTI2->CurrentValue;\n\t\t\t$this->TESTI2->ViewCustomAttributes = \"\";\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->ViewValue = $this->CC_TESTI2->CurrentValue;\n\t\t\t$this->CC_TESTI2->ViewCustomAttributes = \"\";\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->ViewValue = $this->CARGO_TESTI2->CurrentValue;\n\t\t\t$this->CARGO_TESTI2->ViewCustomAttributes = \"\";\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->ViewValue = $this->Afectados->CurrentValue;\n\t\t\t$this->Afectados->ViewCustomAttributes = \"\";\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->ViewValue = $this->NUM_Afectado->CurrentValue;\n\t\t\t$this->NUM_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->ViewValue = $this->Nom_Afectado->CurrentValue;\n\t\t\t$this->Nom_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->ViewValue = $this->CC_Afectado->CurrentValue;\n\t\t\t$this->CC_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->ViewValue = $this->Cargo_Afectado->CurrentValue;\n\t\t\t$this->Cargo_Afectado->ViewCustomAttributes = \"\";\n\n\t\t\t// Tipo_incidente\n\t\t\tif (strval($this->Tipo_incidente->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`label`\" . ew_SearchString(\"=\", $this->Tipo_incidente->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Incidente'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Tipo_incidente, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->Tipo_incidente->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->Tipo_incidente->ViewValue = $this->Tipo_incidente->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Tipo_incidente->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->Tipo_incidente->ViewCustomAttributes = \"\";\n\n\t\t\t// Riesgo\n\t\t\tif (strval($this->Riesgo->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`label`\" . ew_SearchString(\"=\", $this->Riesgo->CurrentValue, EW_DATATYPE_STRING);\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Riesgo'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Riesgo, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->Riesgo->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->Riesgo->ViewValue = $this->Riesgo->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Riesgo->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->Riesgo->ViewCustomAttributes = \"\";\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->ViewValue = $this->Parte_Cuerpo->CurrentValue;\n\t\t\t$this->Parte_Cuerpo->ViewCustomAttributes = \"\";\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->ViewValue = $this->ESTADO_AFEC->CurrentValue;\n\t\t\t$this->ESTADO_AFEC->ViewCustomAttributes = \"\";\n\n\t\t\t// EVACUADO\n\t\t\tif (strval($this->EVACUADO->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->EVACUADO->CurrentValue) {\n\t\t\t\t\tcase $this->EVACUADO->FldTagValue(1):\n\t\t\t\t\t\t$this->EVACUADO->ViewValue = $this->EVACUADO->FldTagCaption(1) <> \"\" ? $this->EVACUADO->FldTagCaption(1) : $this->EVACUADO->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->EVACUADO->FldTagValue(2):\n\t\t\t\t\t\t$this->EVACUADO->ViewValue = $this->EVACUADO->FldTagCaption(2) <> \"\" ? $this->EVACUADO->FldTagCaption(2) : $this->EVACUADO->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->EVACUADO->ViewValue = $this->EVACUADO->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->EVACUADO->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->EVACUADO->ViewCustomAttributes = \"\";\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->ViewValue = $this->DESC_ACC->CurrentValue;\n\t\t\t$this->DESC_ACC->ViewCustomAttributes = \"\";\n\n\t\t\t// Modificado\n\t\t\tif (strval($this->Modificado->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($this->Modificado->CurrentValue) {\n\t\t\t\t\tcase $this->Modificado->FldTagValue(1):\n\t\t\t\t\t\t$this->Modificado->ViewValue = $this->Modificado->FldTagCaption(1) <> \"\" ? $this->Modificado->FldTagCaption(1) : $this->Modificado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $this->Modificado->FldTagValue(2):\n\t\t\t\t\t\t$this->Modificado->ViewValue = $this->Modificado->FldTagCaption(2) <> \"\" ? $this->Modificado->FldTagCaption(2) : $this->Modificado->CurrentValue;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$this->Modificado->ViewValue = $this->Modificado->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Modificado->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->Modificado->ViewCustomAttributes = \"\";\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->ViewValue = $this->llave_2->CurrentValue;\n\t\t\t$this->llave_2->ViewCustomAttributes = \"\";\n\n\t\t\t// llave\n\t\t\t$this->llave->LinkCustomAttributes = \"\";\n\t\t\t$this->llave->HrefValue = \"\";\n\t\t\t$this->llave->TooltipValue = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->LinkCustomAttributes = \"\";\n\t\t\t$this->F_Sincron->HrefValue = \"\";\n\t\t\t$this->F_Sincron->TooltipValue = \"\";\n\n\t\t\t// USUARIO\n\t\t\t$this->USUARIO->LinkCustomAttributes = \"\";\n\t\t\t$this->USUARIO->HrefValue = \"\";\n\t\t\t$this->USUARIO->TooltipValue = \"\";\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->LinkCustomAttributes = \"\";\n\t\t\t$this->Cargo_gme->HrefValue = \"\";\n\t\t\t$this->Cargo_gme->TooltipValue = \"\";\n\n\t\t\t// NOM_PE\n\t\t\t$this->NOM_PE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_PE->HrefValue = \"\";\n\t\t\t$this->NOM_PE->TooltipValue = \"\";\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_PE->HrefValue = \"\";\n\t\t\t$this->Otro_PE->TooltipValue = \"\";\n\n\t\t\t// NOM_APOYO\n\t\t\t$this->NOM_APOYO->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_APOYO->HrefValue = \"\";\n\t\t\t$this->NOM_APOYO->TooltipValue = \"\";\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Apoyo->HrefValue = \"\";\n\t\t\t$this->Otro_Nom_Apoyo->TooltipValue = \"\";\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Apoyo->HrefValue = \"\";\n\t\t\t$this->Otro_CC_Apoyo->TooltipValue = \"\";\n\n\t\t\t// NOM_ENLACE\n\t\t\t$this->NOM_ENLACE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_ENLACE->HrefValue = \"\";\n\t\t\t$this->NOM_ENLACE->TooltipValue = \"\";\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Enlace->HrefValue = \"\";\n\t\t\t$this->Otro_Nom_Enlace->TooltipValue = \"\";\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Enlace->HrefValue = \"\";\n\t\t\t$this->Otro_CC_Enlace->TooltipValue = \"\";\n\n\t\t\t// NOM_PGE\n\t\t\t$this->NOM_PGE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_PGE->HrefValue = \"\";\n\t\t\t$this->NOM_PGE->TooltipValue = \"\";\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_PGE->HrefValue = \"\";\n\t\t\t$this->Otro_Nom_PGE->TooltipValue = \"\";\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->LinkCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_PGE->HrefValue = \"\";\n\t\t\t$this->Otro_CC_PGE->TooltipValue = \"\";\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->LinkCustomAttributes = \"\";\n\t\t\t$this->Departamento->HrefValue = \"\";\n\t\t\t$this->Departamento->TooltipValue = \"\";\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->LinkCustomAttributes = \"\";\n\t\t\t$this->Muncipio->HrefValue = \"\";\n\t\t\t$this->Muncipio->TooltipValue = \"\";\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_VDA->HrefValue = \"\";\n\t\t\t$this->NOM_VDA->TooltipValue = \"\";\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->LinkCustomAttributes = \"\";\n\t\t\t$this->LATITUD->HrefValue = \"\";\n\t\t\t$this->LATITUD->TooltipValue = \"\";\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->LinkCustomAttributes = \"\";\n\t\t\t$this->GRA_LAT->HrefValue = \"\";\n\t\t\t$this->GRA_LAT->TooltipValue = \"\";\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->LinkCustomAttributes = \"\";\n\t\t\t$this->MIN_LAT->HrefValue = \"\";\n\t\t\t$this->MIN_LAT->TooltipValue = \"\";\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->LinkCustomAttributes = \"\";\n\t\t\t$this->SEG_LAT->HrefValue = \"\";\n\t\t\t$this->SEG_LAT->TooltipValue = \"\";\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->LinkCustomAttributes = \"\";\n\t\t\t$this->GRA_LONG->HrefValue = \"\";\n\t\t\t$this->GRA_LONG->TooltipValue = \"\";\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->LinkCustomAttributes = \"\";\n\t\t\t$this->MIN_LONG->HrefValue = \"\";\n\t\t\t$this->MIN_LONG->TooltipValue = \"\";\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->LinkCustomAttributes = \"\";\n\t\t\t$this->SEG_LONG->HrefValue = \"\";\n\t\t\t$this->SEG_LONG->TooltipValue = \"\";\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->LinkCustomAttributes = \"\";\n\t\t\t$this->FECHA_ACC->HrefValue = \"\";\n\t\t\t$this->FECHA_ACC->TooltipValue = \"\";\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->LinkCustomAttributes = \"\";\n\t\t\t$this->HORA_ACC->HrefValue = \"\";\n\t\t\t$this->HORA_ACC->TooltipValue = \"\";\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->LinkCustomAttributes = \"\";\n\t\t\t$this->Hora_ingreso->HrefValue = \"\";\n\t\t\t$this->Hora_ingreso->TooltipValue = \"\";\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->LinkCustomAttributes = \"\";\n\t\t\t$this->FP_Armada->HrefValue = \"\";\n\t\t\t$this->FP_Armada->TooltipValue = \"\";\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->LinkCustomAttributes = \"\";\n\t\t\t$this->FP_Ejercito->HrefValue = \"\";\n\t\t\t$this->FP_Ejercito->TooltipValue = \"\";\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->LinkCustomAttributes = \"\";\n\t\t\t$this->FP_Policia->HrefValue = \"\";\n\t\t\t$this->FP_Policia->TooltipValue = \"\";\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->LinkCustomAttributes = \"\";\n\t\t\t$this->NOM_COMANDANTE->HrefValue = \"\";\n\t\t\t$this->NOM_COMANDANTE->TooltipValue = \"\";\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->LinkCustomAttributes = \"\";\n\t\t\t$this->TESTI1->HrefValue = \"\";\n\t\t\t$this->TESTI1->TooltipValue = \"\";\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->LinkCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI1->HrefValue = \"\";\n\t\t\t$this->CC_TESTI1->TooltipValue = \"\";\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->LinkCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI1->HrefValue = \"\";\n\t\t\t$this->CARGO_TESTI1->TooltipValue = \"\";\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->LinkCustomAttributes = \"\";\n\t\t\t$this->TESTI2->HrefValue = \"\";\n\t\t\t$this->TESTI2->TooltipValue = \"\";\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->LinkCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI2->HrefValue = \"\";\n\t\t\t$this->CC_TESTI2->TooltipValue = \"\";\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->LinkCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI2->HrefValue = \"\";\n\t\t\t$this->CARGO_TESTI2->TooltipValue = \"\";\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->LinkCustomAttributes = \"\";\n\t\t\t$this->Afectados->HrefValue = \"\";\n\t\t\t$this->Afectados->TooltipValue = \"\";\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->NUM_Afectado->HrefValue = \"\";\n\t\t\t$this->NUM_Afectado->TooltipValue = \"\";\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->Nom_Afectado->HrefValue = \"\";\n\t\t\t$this->Nom_Afectado->TooltipValue = \"\";\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->CC_Afectado->HrefValue = \"\";\n\t\t\t$this->CC_Afectado->TooltipValue = \"\";\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->LinkCustomAttributes = \"\";\n\t\t\t$this->Cargo_Afectado->HrefValue = \"\";\n\t\t\t$this->Cargo_Afectado->TooltipValue = \"\";\n\n\t\t\t// Tipo_incidente\n\t\t\t$this->Tipo_incidente->LinkCustomAttributes = \"\";\n\t\t\t$this->Tipo_incidente->HrefValue = \"\";\n\t\t\t$this->Tipo_incidente->TooltipValue = \"\";\n\n\t\t\t// Riesgo\n\t\t\t$this->Riesgo->LinkCustomAttributes = \"\";\n\t\t\t$this->Riesgo->HrefValue = \"\";\n\t\t\t$this->Riesgo->TooltipValue = \"\";\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->LinkCustomAttributes = \"\";\n\t\t\t$this->Parte_Cuerpo->HrefValue = \"\";\n\t\t\t$this->Parte_Cuerpo->TooltipValue = \"\";\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->LinkCustomAttributes = \"\";\n\t\t\t$this->ESTADO_AFEC->HrefValue = \"\";\n\t\t\t$this->ESTADO_AFEC->TooltipValue = \"\";\n\n\t\t\t// EVACUADO\n\t\t\t$this->EVACUADO->LinkCustomAttributes = \"\";\n\t\t\t$this->EVACUADO->HrefValue = \"\";\n\t\t\t$this->EVACUADO->TooltipValue = \"\";\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->LinkCustomAttributes = \"\";\n\t\t\t$this->DESC_ACC->HrefValue = \"\";\n\t\t\t$this->DESC_ACC->TooltipValue = \"\";\n\n\t\t\t// Modificado\n\t\t\t$this->Modificado->LinkCustomAttributes = \"\";\n\t\t\t$this->Modificado->HrefValue = \"\";\n\t\t\t$this->Modificado->TooltipValue = \"\";\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->LinkCustomAttributes = \"\";\n\t\t\t$this->llave_2->HrefValue = \"\";\n\t\t\t$this->llave_2->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// llave\n\t\t\t$this->llave->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->llave->EditCustomAttributes = \"\";\n\t\t\t$this->llave->EditValue = $this->llave->CurrentValue;\n\t\t\t$this->llave->ViewCustomAttributes = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->F_Sincron->EditCustomAttributes = \"\";\n\t\t\t$this->F_Sincron->EditValue = $this->F_Sincron->CurrentValue;\n\t\t\t$this->F_Sincron->EditValue = ew_FormatDateTime($this->F_Sincron->EditValue, 5);\n\t\t\t$this->F_Sincron->ViewCustomAttributes = \"\";\n\n\t\t\t// USUARIO\n\t\t\t$this->USUARIO->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->USUARIO->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `USUARIO`, `USUARIO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->USUARIO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `USUARIO` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->USUARIO->EditValue = $arwrk;\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Cargo_gme->EditCustomAttributes = \"\";\n\t\t\t$this->Cargo_gme->EditValue = ew_HtmlEncode($this->Cargo_gme->CurrentValue);\n\t\t\t$this->Cargo_gme->PlaceHolder = ew_RemoveHtml($this->Cargo_gme->FldCaption());\n\n\t\t\t// NOM_PE\n\t\t\t$this->NOM_PE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_PE->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PE`, `NOM_PE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PE` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_PE->EditValue = $arwrk;\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_PE->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_PE->EditValue = ew_HtmlEncode($this->Otro_PE->CurrentValue);\n\t\t\t$this->Otro_PE->PlaceHolder = ew_RemoveHtml($this->Otro_PE->FldCaption());\n\n\t\t\t// NOM_APOYO\n\t\t\t$this->NOM_APOYO->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_APOYO->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_APOYO`, `NOM_APOYO` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_APOYO, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_APOYO` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_APOYO->EditValue = $arwrk;\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_Nom_Apoyo->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Apoyo->EditValue = ew_HtmlEncode($this->Otro_Nom_Apoyo->CurrentValue);\n\t\t\t$this->Otro_Nom_Apoyo->PlaceHolder = ew_RemoveHtml($this->Otro_Nom_Apoyo->FldCaption());\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_CC_Apoyo->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Apoyo->EditValue = ew_HtmlEncode($this->Otro_CC_Apoyo->CurrentValue);\n\t\t\t$this->Otro_CC_Apoyo->PlaceHolder = ew_RemoveHtml($this->Otro_CC_Apoyo->FldCaption());\n\n\t\t\t// NOM_ENLACE\n\t\t\t$this->NOM_ENLACE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_ENLACE->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_ENLACE`, `NOM_ENLACE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_ENLACE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_ENLACE` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_ENLACE->EditValue = $arwrk;\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_Nom_Enlace->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_Enlace->EditValue = ew_HtmlEncode($this->Otro_Nom_Enlace->CurrentValue);\n\t\t\t$this->Otro_Nom_Enlace->PlaceHolder = ew_RemoveHtml($this->Otro_Nom_Enlace->FldCaption());\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_CC_Enlace->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_Enlace->EditValue = ew_HtmlEncode($this->Otro_CC_Enlace->CurrentValue);\n\t\t\t$this->Otro_CC_Enlace->PlaceHolder = ew_RemoveHtml($this->Otro_CC_Enlace->FldCaption());\n\n\t\t\t// NOM_PGE\n\t\t\t$this->NOM_PGE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_PGE->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `NOM_PGE`, `NOM_PGE` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `view1_acc`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->NOM_PGE, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `NOM_PGE` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->NOM_PGE->EditValue = $arwrk;\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_Nom_PGE->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_Nom_PGE->EditValue = ew_HtmlEncode($this->Otro_Nom_PGE->CurrentValue);\n\t\t\t$this->Otro_Nom_PGE->PlaceHolder = ew_RemoveHtml($this->Otro_Nom_PGE->FldCaption());\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Otro_CC_PGE->EditCustomAttributes = \"\";\n\t\t\t$this->Otro_CC_PGE->EditValue = ew_HtmlEncode($this->Otro_CC_PGE->CurrentValue);\n\t\t\t$this->Otro_CC_PGE->PlaceHolder = ew_RemoveHtml($this->Otro_CC_PGE->FldCaption());\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Departamento->EditCustomAttributes = \"\";\n\t\t\t$this->Departamento->EditValue = ew_HtmlEncode($this->Departamento->CurrentValue);\n\t\t\t$this->Departamento->PlaceHolder = ew_RemoveHtml($this->Departamento->FldCaption());\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Muncipio->EditCustomAttributes = \"\";\n\t\t\t$this->Muncipio->EditValue = ew_HtmlEncode($this->Muncipio->CurrentValue);\n\t\t\t$this->Muncipio->PlaceHolder = ew_RemoveHtml($this->Muncipio->FldCaption());\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_VDA->EditCustomAttributes = \"\";\n\t\t\t$this->NOM_VDA->EditValue = ew_HtmlEncode($this->NOM_VDA->CurrentValue);\n\t\t\t$this->NOM_VDA->PlaceHolder = ew_RemoveHtml($this->NOM_VDA->FldCaption());\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->LATITUD->EditCustomAttributes = \"\";\n\t\t\t$this->LATITUD->EditValue = ew_HtmlEncode($this->LATITUD->CurrentValue);\n\t\t\t$this->LATITUD->PlaceHolder = ew_RemoveHtml($this->LATITUD->FldCaption());\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->GRA_LAT->EditCustomAttributes = \"\";\n\t\t\t$this->GRA_LAT->EditValue = ew_HtmlEncode($this->GRA_LAT->CurrentValue);\n\t\t\t$this->GRA_LAT->PlaceHolder = ew_RemoveHtml($this->GRA_LAT->FldCaption());\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->MIN_LAT->EditCustomAttributes = \"\";\n\t\t\t$this->MIN_LAT->EditValue = ew_HtmlEncode($this->MIN_LAT->CurrentValue);\n\t\t\t$this->MIN_LAT->PlaceHolder = ew_RemoveHtml($this->MIN_LAT->FldCaption());\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->SEG_LAT->EditCustomAttributes = \"\";\n\t\t\t$this->SEG_LAT->EditValue = ew_HtmlEncode($this->SEG_LAT->CurrentValue);\n\t\t\t$this->SEG_LAT->PlaceHolder = ew_RemoveHtml($this->SEG_LAT->FldCaption());\n\t\t\tif (strval($this->SEG_LAT->EditValue) <> \"\" && is_numeric($this->SEG_LAT->EditValue)) $this->SEG_LAT->EditValue = ew_FormatNumber($this->SEG_LAT->EditValue, -2, -1, -2, 0);\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->GRA_LONG->EditCustomAttributes = \"\";\n\t\t\t$this->GRA_LONG->EditValue = ew_HtmlEncode($this->GRA_LONG->CurrentValue);\n\t\t\t$this->GRA_LONG->PlaceHolder = ew_RemoveHtml($this->GRA_LONG->FldCaption());\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->MIN_LONG->EditCustomAttributes = \"\";\n\t\t\t$this->MIN_LONG->EditValue = ew_HtmlEncode($this->MIN_LONG->CurrentValue);\n\t\t\t$this->MIN_LONG->PlaceHolder = ew_RemoveHtml($this->MIN_LONG->FldCaption());\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->SEG_LONG->EditCustomAttributes = \"\";\n\t\t\t$this->SEG_LONG->EditValue = ew_HtmlEncode($this->SEG_LONG->CurrentValue);\n\t\t\t$this->SEG_LONG->PlaceHolder = ew_RemoveHtml($this->SEG_LONG->FldCaption());\n\t\t\tif (strval($this->SEG_LONG->EditValue) <> \"\" && is_numeric($this->SEG_LONG->EditValue)) $this->SEG_LONG->EditValue = ew_FormatNumber($this->SEG_LONG->EditValue, -2, -1, -2, 0);\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FECHA_ACC->EditCustomAttributes = \"\";\n\t\t\t$this->FECHA_ACC->EditValue = ew_HtmlEncode($this->FECHA_ACC->CurrentValue);\n\t\t\t$this->FECHA_ACC->PlaceHolder = ew_RemoveHtml($this->FECHA_ACC->FldCaption());\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->HORA_ACC->EditCustomAttributes = \"\";\n\t\t\t$this->HORA_ACC->EditValue = ew_HtmlEncode($this->HORA_ACC->CurrentValue);\n\t\t\t$this->HORA_ACC->PlaceHolder = ew_RemoveHtml($this->HORA_ACC->FldCaption());\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Hora_ingreso->EditCustomAttributes = \"\";\n\t\t\t$this->Hora_ingreso->EditValue = ew_HtmlEncode($this->Hora_ingreso->CurrentValue);\n\t\t\t$this->Hora_ingreso->PlaceHolder = ew_RemoveHtml($this->Hora_ingreso->FldCaption());\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FP_Armada->EditCustomAttributes = \"\";\n\t\t\t$this->FP_Armada->EditValue = ew_HtmlEncode($this->FP_Armada->CurrentValue);\n\t\t\t$this->FP_Armada->PlaceHolder = ew_RemoveHtml($this->FP_Armada->FldCaption());\n\t\t\tif (strval($this->FP_Armada->EditValue) <> \"\" && is_numeric($this->FP_Armada->EditValue)) $this->FP_Armada->EditValue = ew_FormatNumber($this->FP_Armada->EditValue, -2, -1, -2, 0);\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FP_Ejercito->EditCustomAttributes = \"\";\n\t\t\t$this->FP_Ejercito->EditValue = ew_HtmlEncode($this->FP_Ejercito->CurrentValue);\n\t\t\t$this->FP_Ejercito->PlaceHolder = ew_RemoveHtml($this->FP_Ejercito->FldCaption());\n\t\t\tif (strval($this->FP_Ejercito->EditValue) <> \"\" && is_numeric($this->FP_Ejercito->EditValue)) $this->FP_Ejercito->EditValue = ew_FormatNumber($this->FP_Ejercito->EditValue, -2, -1, -2, 0);\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->FP_Policia->EditCustomAttributes = \"\";\n\t\t\t$this->FP_Policia->EditValue = ew_HtmlEncode($this->FP_Policia->CurrentValue);\n\t\t\t$this->FP_Policia->PlaceHolder = ew_RemoveHtml($this->FP_Policia->FldCaption());\n\t\t\tif (strval($this->FP_Policia->EditValue) <> \"\" && is_numeric($this->FP_Policia->EditValue)) $this->FP_Policia->EditValue = ew_FormatNumber($this->FP_Policia->EditValue, -2, -1, -2, 0);\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOM_COMANDANTE->EditCustomAttributes = \"\";\n\t\t\t$this->NOM_COMANDANTE->EditValue = ew_HtmlEncode($this->NOM_COMANDANTE->CurrentValue);\n\t\t\t$this->NOM_COMANDANTE->PlaceHolder = ew_RemoveHtml($this->NOM_COMANDANTE->FldCaption());\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->TESTI1->EditCustomAttributes = \"\";\n\t\t\t$this->TESTI1->EditValue = ew_HtmlEncode($this->TESTI1->CurrentValue);\n\t\t\t$this->TESTI1->PlaceHolder = ew_RemoveHtml($this->TESTI1->FldCaption());\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CC_TESTI1->EditCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI1->EditValue = ew_HtmlEncode($this->CC_TESTI1->CurrentValue);\n\t\t\t$this->CC_TESTI1->PlaceHolder = ew_RemoveHtml($this->CC_TESTI1->FldCaption());\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CARGO_TESTI1->EditCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI1->EditValue = ew_HtmlEncode($this->CARGO_TESTI1->CurrentValue);\n\t\t\t$this->CARGO_TESTI1->PlaceHolder = ew_RemoveHtml($this->CARGO_TESTI1->FldCaption());\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->TESTI2->EditCustomAttributes = \"\";\n\t\t\t$this->TESTI2->EditValue = ew_HtmlEncode($this->TESTI2->CurrentValue);\n\t\t\t$this->TESTI2->PlaceHolder = ew_RemoveHtml($this->TESTI2->FldCaption());\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CC_TESTI2->EditCustomAttributes = \"\";\n\t\t\t$this->CC_TESTI2->EditValue = ew_HtmlEncode($this->CC_TESTI2->CurrentValue);\n\t\t\t$this->CC_TESTI2->PlaceHolder = ew_RemoveHtml($this->CC_TESTI2->FldCaption());\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CARGO_TESTI2->EditCustomAttributes = \"\";\n\t\t\t$this->CARGO_TESTI2->EditValue = ew_HtmlEncode($this->CARGO_TESTI2->CurrentValue);\n\t\t\t$this->CARGO_TESTI2->PlaceHolder = ew_RemoveHtml($this->CARGO_TESTI2->FldCaption());\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Afectados->EditCustomAttributes = \"\";\n\t\t\t$this->Afectados->EditValue = ew_HtmlEncode($this->Afectados->CurrentValue);\n\t\t\t$this->Afectados->PlaceHolder = ew_RemoveHtml($this->Afectados->FldCaption());\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NUM_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->NUM_Afectado->EditValue = ew_HtmlEncode($this->NUM_Afectado->CurrentValue);\n\t\t\t$this->NUM_Afectado->PlaceHolder = ew_RemoveHtml($this->NUM_Afectado->FldCaption());\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Nom_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->Nom_Afectado->EditValue = ew_HtmlEncode($this->Nom_Afectado->CurrentValue);\n\t\t\t$this->Nom_Afectado->PlaceHolder = ew_RemoveHtml($this->Nom_Afectado->FldCaption());\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->CC_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->CC_Afectado->EditValue = ew_HtmlEncode($this->CC_Afectado->CurrentValue);\n\t\t\t$this->CC_Afectado->PlaceHolder = ew_RemoveHtml($this->CC_Afectado->FldCaption());\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Cargo_Afectado->EditCustomAttributes = \"\";\n\t\t\t$this->Cargo_Afectado->EditValue = ew_HtmlEncode($this->Cargo_Afectado->CurrentValue);\n\t\t\t$this->Cargo_Afectado->PlaceHolder = ew_RemoveHtml($this->Cargo_Afectado->FldCaption());\n\n\t\t\t// Tipo_incidente\n\t\t\t$this->Tipo_incidente->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Tipo_incidente->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Incidente'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Tipo_incidente, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->Tipo_incidente->EditValue = $arwrk;\n\n\t\t\t// Riesgo\n\t\t\t$this->Riesgo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Riesgo->EditCustomAttributes = \"\";\n\t\t\t$sFilterWrk = \"\";\n\t\t\tswitch (@$gsLanguage) {\n\t\t\t\tcase \"en\":\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$sSqlWrk = \"SELECT DISTINCT `label`, `label` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `dominio`\";\n\t\t\t\t\t$sWhereWrk = \"\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$lookuptblfilter = \"`list name`='Riesgo'\";\n\t\t\tif (strval($lookuptblfilter) <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $lookuptblfilter);\n\t\t\t}\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->Riesgo, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `label` ASC\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\"), \"\", \"\", \"\", \"\", \"\", \"\", \"\"));\n\t\t\t$this->Riesgo->EditValue = $arwrk;\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Parte_Cuerpo->EditCustomAttributes = \"\";\n\t\t\t$this->Parte_Cuerpo->EditValue = ew_HtmlEncode($this->Parte_Cuerpo->CurrentValue);\n\t\t\t$this->Parte_Cuerpo->PlaceHolder = ew_RemoveHtml($this->Parte_Cuerpo->FldCaption());\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->ESTADO_AFEC->EditCustomAttributes = \"\";\n\t\t\t$this->ESTADO_AFEC->EditValue = ew_HtmlEncode($this->ESTADO_AFEC->CurrentValue);\n\t\t\t$this->ESTADO_AFEC->PlaceHolder = ew_RemoveHtml($this->ESTADO_AFEC->FldCaption());\n\n\t\t\t// EVACUADO\n\t\t\t$this->EVACUADO->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->EVACUADO->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array($this->EVACUADO->FldTagValue(1), $this->EVACUADO->FldTagCaption(1) <> \"\" ? $this->EVACUADO->FldTagCaption(1) : $this->EVACUADO->FldTagValue(1));\n\t\t\t$arwrk[] = array($this->EVACUADO->FldTagValue(2), $this->EVACUADO->FldTagCaption(2) <> \"\" ? $this->EVACUADO->FldTagCaption(2) : $this->EVACUADO->FldTagValue(2));\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$this->EVACUADO->EditValue = $arwrk;\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->DESC_ACC->EditCustomAttributes = \"\";\n\t\t\t$this->DESC_ACC->EditValue = ew_HtmlEncode($this->DESC_ACC->CurrentValue);\n\t\t\t$this->DESC_ACC->PlaceHolder = ew_RemoveHtml($this->DESC_ACC->FldCaption());\n\n\t\t\t// Modificado\n\t\t\t$this->Modificado->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->Modificado->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array($this->Modificado->FldTagValue(1), $this->Modificado->FldTagCaption(1) <> \"\" ? $this->Modificado->FldTagCaption(1) : $this->Modificado->FldTagValue(1));\n\t\t\t$arwrk[] = array($this->Modificado->FldTagValue(2), $this->Modificado->FldTagCaption(2) <> \"\" ? $this->Modificado->FldTagCaption(2) : $this->Modificado->FldTagValue(2));\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$this->Modificado->EditValue = $arwrk;\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->llave_2->EditCustomAttributes = \"\";\n\t\t\t$this->llave_2->EditValue = $this->llave_2->CurrentValue;\n\t\t\t$this->llave_2->ViewCustomAttributes = \"\";\n\n\t\t\t// Edit refer script\n\t\t\t// llave\n\n\t\t\t$this->llave->HrefValue = \"\";\n\n\t\t\t// F_Sincron\n\t\t\t$this->F_Sincron->HrefValue = \"\";\n\n\t\t\t// USUARIO\n\t\t\t$this->USUARIO->HrefValue = \"\";\n\n\t\t\t// Cargo_gme\n\t\t\t$this->Cargo_gme->HrefValue = \"\";\n\n\t\t\t// NOM_PE\n\t\t\t$this->NOM_PE->HrefValue = \"\";\n\n\t\t\t// Otro_PE\n\t\t\t$this->Otro_PE->HrefValue = \"\";\n\n\t\t\t// NOM_APOYO\n\t\t\t$this->NOM_APOYO->HrefValue = \"\";\n\n\t\t\t// Otro_Nom_Apoyo\n\t\t\t$this->Otro_Nom_Apoyo->HrefValue = \"\";\n\n\t\t\t// Otro_CC_Apoyo\n\t\t\t$this->Otro_CC_Apoyo->HrefValue = \"\";\n\n\t\t\t// NOM_ENLACE\n\t\t\t$this->NOM_ENLACE->HrefValue = \"\";\n\n\t\t\t// Otro_Nom_Enlace\n\t\t\t$this->Otro_Nom_Enlace->HrefValue = \"\";\n\n\t\t\t// Otro_CC_Enlace\n\t\t\t$this->Otro_CC_Enlace->HrefValue = \"\";\n\n\t\t\t// NOM_PGE\n\t\t\t$this->NOM_PGE->HrefValue = \"\";\n\n\t\t\t// Otro_Nom_PGE\n\t\t\t$this->Otro_Nom_PGE->HrefValue = \"\";\n\n\t\t\t// Otro_CC_PGE\n\t\t\t$this->Otro_CC_PGE->HrefValue = \"\";\n\n\t\t\t// Departamento\n\t\t\t$this->Departamento->HrefValue = \"\";\n\n\t\t\t// Muncipio\n\t\t\t$this->Muncipio->HrefValue = \"\";\n\n\t\t\t// NOM_VDA\n\t\t\t$this->NOM_VDA->HrefValue = \"\";\n\n\t\t\t// LATITUD\n\t\t\t$this->LATITUD->HrefValue = \"\";\n\n\t\t\t// GRA_LAT\n\t\t\t$this->GRA_LAT->HrefValue = \"\";\n\n\t\t\t// MIN_LAT\n\t\t\t$this->MIN_LAT->HrefValue = \"\";\n\n\t\t\t// SEG_LAT\n\t\t\t$this->SEG_LAT->HrefValue = \"\";\n\n\t\t\t// GRA_LONG\n\t\t\t$this->GRA_LONG->HrefValue = \"\";\n\n\t\t\t// MIN_LONG\n\t\t\t$this->MIN_LONG->HrefValue = \"\";\n\n\t\t\t// SEG_LONG\n\t\t\t$this->SEG_LONG->HrefValue = \"\";\n\n\t\t\t// FECHA_ACC\n\t\t\t$this->FECHA_ACC->HrefValue = \"\";\n\n\t\t\t// HORA_ACC\n\t\t\t$this->HORA_ACC->HrefValue = \"\";\n\n\t\t\t// Hora_ingreso\n\t\t\t$this->Hora_ingreso->HrefValue = \"\";\n\n\t\t\t// FP_Armada\n\t\t\t$this->FP_Armada->HrefValue = \"\";\n\n\t\t\t// FP_Ejercito\n\t\t\t$this->FP_Ejercito->HrefValue = \"\";\n\n\t\t\t// FP_Policia\n\t\t\t$this->FP_Policia->HrefValue = \"\";\n\n\t\t\t// NOM_COMANDANTE\n\t\t\t$this->NOM_COMANDANTE->HrefValue = \"\";\n\n\t\t\t// TESTI1\n\t\t\t$this->TESTI1->HrefValue = \"\";\n\n\t\t\t// CC_TESTI1\n\t\t\t$this->CC_TESTI1->HrefValue = \"\";\n\n\t\t\t// CARGO_TESTI1\n\t\t\t$this->CARGO_TESTI1->HrefValue = \"\";\n\n\t\t\t// TESTI2\n\t\t\t$this->TESTI2->HrefValue = \"\";\n\n\t\t\t// CC_TESTI2\n\t\t\t$this->CC_TESTI2->HrefValue = \"\";\n\n\t\t\t// CARGO_TESTI2\n\t\t\t$this->CARGO_TESTI2->HrefValue = \"\";\n\n\t\t\t// Afectados\n\t\t\t$this->Afectados->HrefValue = \"\";\n\n\t\t\t// NUM_Afectado\n\t\t\t$this->NUM_Afectado->HrefValue = \"\";\n\n\t\t\t// Nom_Afectado\n\t\t\t$this->Nom_Afectado->HrefValue = \"\";\n\n\t\t\t// CC_Afectado\n\t\t\t$this->CC_Afectado->HrefValue = \"\";\n\n\t\t\t// Cargo_Afectado\n\t\t\t$this->Cargo_Afectado->HrefValue = \"\";\n\n\t\t\t// Tipo_incidente\n\t\t\t$this->Tipo_incidente->HrefValue = \"\";\n\n\t\t\t// Riesgo\n\t\t\t$this->Riesgo->HrefValue = \"\";\n\n\t\t\t// Parte_Cuerpo\n\t\t\t$this->Parte_Cuerpo->HrefValue = \"\";\n\n\t\t\t// ESTADO_AFEC\n\t\t\t$this->ESTADO_AFEC->HrefValue = \"\";\n\n\t\t\t// EVACUADO\n\t\t\t$this->EVACUADO->HrefValue = \"\";\n\n\t\t\t// DESC_ACC\n\t\t\t$this->DESC_ACC->HrefValue = \"\";\n\n\t\t\t// Modificado\n\t\t\t$this->Modificado->HrefValue = \"\";\n\n\t\t\t// llave_2\n\t\t\t$this->llave_2->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "function formatRow(){\n $this->hook('formatRow');\n }", "abstract protected function _renderTable(array $rows);", "public function renderRow(): void\n {\n $this->tRow->set($this->model);\n\n if ($this->useHtmlTags) {\n // prepare row-specific HTML tags\n $htmlTags = [];\n\n foreach ($this->hook(Table\\Column::HOOK_GET_HTML_TAGS, [$this->model]) as $ret) {\n if (is_array($ret)) {\n $htmlTags = array_merge($htmlTags, $ret);\n }\n }\n\n foreach ($this->columns as $name => $columns) {\n if (!is_array($columns)) {\n $columns = [$columns];\n }\n $field = is_int($name) ? null : $this->model->getField($name);\n foreach ($columns as $column) {\n $htmlTags = array_merge($column->getHtmlTags($this->model, $field), $htmlTags);\n }\n }\n\n // Render row and add to body\n $this->tRow->dangerouslySetHtml($htmlTags);\n $this->tRow->set('dataId', (string) $this->model->getId());\n $this->template->dangerouslyAppendHtml('Body', $this->tRow->renderToHtml());\n $this->tRow->del(array_keys($htmlTags));\n } else {\n $this->template->dangerouslyAppendHtml('Body', $this->tRow->renderToHtml());\n }\n }", "public function render()\n\t{\n\t\t$html = '';\n\n\t\tif(array_key_exists($this->column_id, $this->rows) === TRUE)\n\t\t{\n\t\t\tforeach($this->rows[$this->column_id] as $row)\n\t\t\t{\n\t\t\t\t$this->view->columnPreview()->setRowId($row['id']);\n\t\t\t\t$columns = $this->view->columnPreview()->render();\n\n\t\t\t\tif(strlen($columns) > 0)\n\t\t\t\t{\n\t\t\t\t\t$html .= '<div class=\"row\" id=\"row-' . $row['id'] . '\"' .\n $this->view->stylingRow()->setRow($row['id']) . '>' . $columns . '</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "function RenderListRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// tanggal\n\t\t// periode\n\t\t// id\n\t\t// angsuran\n\t\t// masaangsuran\n\t\t// dispensasidenda\n\t\t// plafond\n\t\t// angsuranpokok\n\t\t// angsuranpokokauto\n\t\t// angsuranbunga\n\t\t// angsuranbungaauto\n\t\t// denda\n\t\t// dendapersen\n\t\t// totalangsuran\n\t\t// totalangsuranauto\n\t\t// sisaangsuran\n\t\t// sisaangsuranauto\n\t\t// tanggalbayar\n\t\t// terlambat\n\t\t// bayarpokok\n\t\t// bayarpokokauto\n\t\t// bayarbunga\n\t\t// bayarbungaauto\n\t\t// bayardenda\n\t\t// bayardendaauto\n\t\t// bayartitipan\n\t\t// bayartitipanauto\n\t\t// totalbayar\n\t\t// totalbayarauto\n\t\t// pelunasan\n\t\t// pelunasanauto\n\t\t// finalty\n\t\t// finaltyauto\n\t\t// status\n\t\t// keterangan\n\t\t// tanggal\n\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewValue = ew_FormatDateTime($this->tanggal->ViewValue, 0);\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// periode\n\t\t$this->periode->ViewValue = $this->periode->CurrentValue;\n\t\t$this->periode->ViewCustomAttributes = \"\";\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// angsuran\n\t\t$this->angsuran->ViewValue = $this->angsuran->CurrentValue;\n\t\t$this->angsuran->ViewCustomAttributes = \"\";\n\n\t\t// masaangsuran\n\t\t$this->masaangsuran->ViewValue = $this->masaangsuran->CurrentValue;\n\t\t$this->masaangsuran->ViewCustomAttributes = \"\";\n\n\t\t// dispensasidenda\n\t\t$this->dispensasidenda->ViewValue = $this->dispensasidenda->CurrentValue;\n\t\t$this->dispensasidenda->ViewCustomAttributes = \"\";\n\n\t\t// plafond\n\t\t$this->plafond->ViewValue = $this->plafond->CurrentValue;\n\t\t$this->plafond->ViewCustomAttributes = \"\";\n\n\t\t// angsuranpokok\n\t\t$this->angsuranpokok->ViewValue = $this->angsuranpokok->CurrentValue;\n\t\t$this->angsuranpokok->ViewCustomAttributes = \"\";\n\n\t\t// angsuranpokokauto\n\t\t$this->angsuranpokokauto->ViewValue = $this->angsuranpokokauto->CurrentValue;\n\t\t$this->angsuranpokokauto->ViewCustomAttributes = \"\";\n\n\t\t// angsuranbunga\n\t\t$this->angsuranbunga->ViewValue = $this->angsuranbunga->CurrentValue;\n\t\t$this->angsuranbunga->ViewCustomAttributes = \"\";\n\n\t\t// angsuranbungaauto\n\t\t$this->angsuranbungaauto->ViewValue = $this->angsuranbungaauto->CurrentValue;\n\t\t$this->angsuranbungaauto->ViewCustomAttributes = \"\";\n\n\t\t// denda\n\t\t$this->denda->ViewValue = $this->denda->CurrentValue;\n\t\t$this->denda->ViewCustomAttributes = \"\";\n\n\t\t// dendapersen\n\t\t$this->dendapersen->ViewValue = $this->dendapersen->CurrentValue;\n\t\t$this->dendapersen->ViewCustomAttributes = \"\";\n\n\t\t// totalangsuran\n\t\t$this->totalangsuran->ViewValue = $this->totalangsuran->CurrentValue;\n\t\t$this->totalangsuran->ViewCustomAttributes = \"\";\n\n\t\t// totalangsuranauto\n\t\t$this->totalangsuranauto->ViewValue = $this->totalangsuranauto->CurrentValue;\n\t\t$this->totalangsuranauto->ViewCustomAttributes = \"\";\n\n\t\t// sisaangsuran\n\t\t$this->sisaangsuran->ViewValue = $this->sisaangsuran->CurrentValue;\n\t\t$this->sisaangsuran->ViewCustomAttributes = \"\";\n\n\t\t// sisaangsuranauto\n\t\t$this->sisaangsuranauto->ViewValue = $this->sisaangsuranauto->CurrentValue;\n\t\t$this->sisaangsuranauto->ViewCustomAttributes = \"\";\n\n\t\t// tanggalbayar\n\t\t$this->tanggalbayar->ViewValue = $this->tanggalbayar->CurrentValue;\n\t\t$this->tanggalbayar->ViewValue = ew_FormatDateTime($this->tanggalbayar->ViewValue, 0);\n\t\t$this->tanggalbayar->ViewCustomAttributes = \"\";\n\n\t\t// terlambat\n\t\t$this->terlambat->ViewValue = $this->terlambat->CurrentValue;\n\t\t$this->terlambat->ViewCustomAttributes = \"\";\n\n\t\t// bayarpokok\n\t\t$this->bayarpokok->ViewValue = $this->bayarpokok->CurrentValue;\n\t\t$this->bayarpokok->ViewCustomAttributes = \"\";\n\n\t\t// bayarpokokauto\n\t\t$this->bayarpokokauto->ViewValue = $this->bayarpokokauto->CurrentValue;\n\t\t$this->bayarpokokauto->ViewCustomAttributes = \"\";\n\n\t\t// bayarbunga\n\t\t$this->bayarbunga->ViewValue = $this->bayarbunga->CurrentValue;\n\t\t$this->bayarbunga->ViewCustomAttributes = \"\";\n\n\t\t// bayarbungaauto\n\t\t$this->bayarbungaauto->ViewValue = $this->bayarbungaauto->CurrentValue;\n\t\t$this->bayarbungaauto->ViewCustomAttributes = \"\";\n\n\t\t// bayardenda\n\t\t$this->bayardenda->ViewValue = $this->bayardenda->CurrentValue;\n\t\t$this->bayardenda->ViewCustomAttributes = \"\";\n\n\t\t// bayardendaauto\n\t\t$this->bayardendaauto->ViewValue = $this->bayardendaauto->CurrentValue;\n\t\t$this->bayardendaauto->ViewCustomAttributes = \"\";\n\n\t\t// bayartitipan\n\t\t$this->bayartitipan->ViewValue = $this->bayartitipan->CurrentValue;\n\t\t$this->bayartitipan->ViewCustomAttributes = \"\";\n\n\t\t// bayartitipanauto\n\t\t$this->bayartitipanauto->ViewValue = $this->bayartitipanauto->CurrentValue;\n\t\t$this->bayartitipanauto->ViewCustomAttributes = \"\";\n\n\t\t// totalbayar\n\t\t$this->totalbayar->ViewValue = $this->totalbayar->CurrentValue;\n\t\t$this->totalbayar->ViewCustomAttributes = \"\";\n\n\t\t// totalbayarauto\n\t\t$this->totalbayarauto->ViewValue = $this->totalbayarauto->CurrentValue;\n\t\t$this->totalbayarauto->ViewCustomAttributes = \"\";\n\n\t\t// pelunasan\n\t\t$this->pelunasan->ViewValue = $this->pelunasan->CurrentValue;\n\t\t$this->pelunasan->ViewCustomAttributes = \"\";\n\n\t\t// pelunasanauto\n\t\t$this->pelunasanauto->ViewValue = $this->pelunasanauto->CurrentValue;\n\t\t$this->pelunasanauto->ViewCustomAttributes = \"\";\n\n\t\t// finalty\n\t\t$this->finalty->ViewValue = $this->finalty->CurrentValue;\n\t\t$this->finalty->ViewCustomAttributes = \"\";\n\n\t\t// finaltyauto\n\t\t$this->finaltyauto->ViewValue = $this->finaltyauto->CurrentValue;\n\t\t$this->finaltyauto->ViewCustomAttributes = \"\";\n\n\t\t// status\n\t\t$this->status->ViewValue = $this->status->CurrentValue;\n\t\t$this->status->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t$this->tanggal->HrefValue = \"\";\n\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t// periode\n\t\t$this->periode->LinkCustomAttributes = \"\";\n\t\t$this->periode->HrefValue = \"\";\n\t\t$this->periode->TooltipValue = \"\";\n\n\t\t// id\n\t\t$this->id->LinkCustomAttributes = \"\";\n\t\t$this->id->HrefValue = \"\";\n\t\t$this->id->TooltipValue = \"\";\n\n\t\t// angsuran\n\t\t$this->angsuran->LinkCustomAttributes = \"\";\n\t\t$this->angsuran->HrefValue = \"\";\n\t\t$this->angsuran->TooltipValue = \"\";\n\n\t\t// masaangsuran\n\t\t$this->masaangsuran->LinkCustomAttributes = \"\";\n\t\t$this->masaangsuran->HrefValue = \"\";\n\t\t$this->masaangsuran->TooltipValue = \"\";\n\n\t\t// dispensasidenda\n\t\t$this->dispensasidenda->LinkCustomAttributes = \"\";\n\t\t$this->dispensasidenda->HrefValue = \"\";\n\t\t$this->dispensasidenda->TooltipValue = \"\";\n\n\t\t// plafond\n\t\t$this->plafond->LinkCustomAttributes = \"\";\n\t\t$this->plafond->HrefValue = \"\";\n\t\t$this->plafond->TooltipValue = \"\";\n\n\t\t// angsuranpokok\n\t\t$this->angsuranpokok->LinkCustomAttributes = \"\";\n\t\t$this->angsuranpokok->HrefValue = \"\";\n\t\t$this->angsuranpokok->TooltipValue = \"\";\n\n\t\t// angsuranpokokauto\n\t\t$this->angsuranpokokauto->LinkCustomAttributes = \"\";\n\t\t$this->angsuranpokokauto->HrefValue = \"\";\n\t\t$this->angsuranpokokauto->TooltipValue = \"\";\n\n\t\t// angsuranbunga\n\t\t$this->angsuranbunga->LinkCustomAttributes = \"\";\n\t\t$this->angsuranbunga->HrefValue = \"\";\n\t\t$this->angsuranbunga->TooltipValue = \"\";\n\n\t\t// angsuranbungaauto\n\t\t$this->angsuranbungaauto->LinkCustomAttributes = \"\";\n\t\t$this->angsuranbungaauto->HrefValue = \"\";\n\t\t$this->angsuranbungaauto->TooltipValue = \"\";\n\n\t\t// denda\n\t\t$this->denda->LinkCustomAttributes = \"\";\n\t\t$this->denda->HrefValue = \"\";\n\t\t$this->denda->TooltipValue = \"\";\n\n\t\t// dendapersen\n\t\t$this->dendapersen->LinkCustomAttributes = \"\";\n\t\t$this->dendapersen->HrefValue = \"\";\n\t\t$this->dendapersen->TooltipValue = \"\";\n\n\t\t// totalangsuran\n\t\t$this->totalangsuran->LinkCustomAttributes = \"\";\n\t\t$this->totalangsuran->HrefValue = \"\";\n\t\t$this->totalangsuran->TooltipValue = \"\";\n\n\t\t// totalangsuranauto\n\t\t$this->totalangsuranauto->LinkCustomAttributes = \"\";\n\t\t$this->totalangsuranauto->HrefValue = \"\";\n\t\t$this->totalangsuranauto->TooltipValue = \"\";\n\n\t\t// sisaangsuran\n\t\t$this->sisaangsuran->LinkCustomAttributes = \"\";\n\t\t$this->sisaangsuran->HrefValue = \"\";\n\t\t$this->sisaangsuran->TooltipValue = \"\";\n\n\t\t// sisaangsuranauto\n\t\t$this->sisaangsuranauto->LinkCustomAttributes = \"\";\n\t\t$this->sisaangsuranauto->HrefValue = \"\";\n\t\t$this->sisaangsuranauto->TooltipValue = \"\";\n\n\t\t// tanggalbayar\n\t\t$this->tanggalbayar->LinkCustomAttributes = \"\";\n\t\t$this->tanggalbayar->HrefValue = \"\";\n\t\t$this->tanggalbayar->TooltipValue = \"\";\n\n\t\t// terlambat\n\t\t$this->terlambat->LinkCustomAttributes = \"\";\n\t\t$this->terlambat->HrefValue = \"\";\n\t\t$this->terlambat->TooltipValue = \"\";\n\n\t\t// bayarpokok\n\t\t$this->bayarpokok->LinkCustomAttributes = \"\";\n\t\t$this->bayarpokok->HrefValue = \"\";\n\t\t$this->bayarpokok->TooltipValue = \"\";\n\n\t\t// bayarpokokauto\n\t\t$this->bayarpokokauto->LinkCustomAttributes = \"\";\n\t\t$this->bayarpokokauto->HrefValue = \"\";\n\t\t$this->bayarpokokauto->TooltipValue = \"\";\n\n\t\t// bayarbunga\n\t\t$this->bayarbunga->LinkCustomAttributes = \"\";\n\t\t$this->bayarbunga->HrefValue = \"\";\n\t\t$this->bayarbunga->TooltipValue = \"\";\n\n\t\t// bayarbungaauto\n\t\t$this->bayarbungaauto->LinkCustomAttributes = \"\";\n\t\t$this->bayarbungaauto->HrefValue = \"\";\n\t\t$this->bayarbungaauto->TooltipValue = \"\";\n\n\t\t// bayardenda\n\t\t$this->bayardenda->LinkCustomAttributes = \"\";\n\t\t$this->bayardenda->HrefValue = \"\";\n\t\t$this->bayardenda->TooltipValue = \"\";\n\n\t\t// bayardendaauto\n\t\t$this->bayardendaauto->LinkCustomAttributes = \"\";\n\t\t$this->bayardendaauto->HrefValue = \"\";\n\t\t$this->bayardendaauto->TooltipValue = \"\";\n\n\t\t// bayartitipan\n\t\t$this->bayartitipan->LinkCustomAttributes = \"\";\n\t\t$this->bayartitipan->HrefValue = \"\";\n\t\t$this->bayartitipan->TooltipValue = \"\";\n\n\t\t// bayartitipanauto\n\t\t$this->bayartitipanauto->LinkCustomAttributes = \"\";\n\t\t$this->bayartitipanauto->HrefValue = \"\";\n\t\t$this->bayartitipanauto->TooltipValue = \"\";\n\n\t\t// totalbayar\n\t\t$this->totalbayar->LinkCustomAttributes = \"\";\n\t\t$this->totalbayar->HrefValue = \"\";\n\t\t$this->totalbayar->TooltipValue = \"\";\n\n\t\t// totalbayarauto\n\t\t$this->totalbayarauto->LinkCustomAttributes = \"\";\n\t\t$this->totalbayarauto->HrefValue = \"\";\n\t\t$this->totalbayarauto->TooltipValue = \"\";\n\n\t\t// pelunasan\n\t\t$this->pelunasan->LinkCustomAttributes = \"\";\n\t\t$this->pelunasan->HrefValue = \"\";\n\t\t$this->pelunasan->TooltipValue = \"\";\n\n\t\t// pelunasanauto\n\t\t$this->pelunasanauto->LinkCustomAttributes = \"\";\n\t\t$this->pelunasanauto->HrefValue = \"\";\n\t\t$this->pelunasanauto->TooltipValue = \"\";\n\n\t\t// finalty\n\t\t$this->finalty->LinkCustomAttributes = \"\";\n\t\t$this->finalty->HrefValue = \"\";\n\t\t$this->finalty->TooltipValue = \"\";\n\n\t\t// finaltyauto\n\t\t$this->finaltyauto->LinkCustomAttributes = \"\";\n\t\t$this->finaltyauto->HrefValue = \"\";\n\t\t$this->finaltyauto->TooltipValue = \"\";\n\n\t\t// status\n\t\t$this->status->LinkCustomAttributes = \"\";\n\t\t$this->status->HrefValue = \"\";\n\t\t$this->status->TooltipValue = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t$this->keterangan->HrefValue = \"\";\n\t\t$this->keterangan->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// tanggal\n\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t$this->tanggal->EditValue = ew_FormatDateTime($this->tanggal->CurrentValue, 8);\n\t\t$this->tanggal->PlaceHolder = ew_RemoveHtml($this->tanggal->FldCaption());\n\n\t\t// periode\n\t\t$this->periode->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->periode->EditCustomAttributes = \"\";\n\t\t$this->periode->EditValue = $this->periode->CurrentValue;\n\t\t$this->periode->PlaceHolder = ew_RemoveHtml($this->periode->FldCaption());\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t$this->id->PlaceHolder = ew_RemoveHtml($this->id->FldCaption());\n\n\t\t// nomor\n\t\t$this->nomor->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nomor->EditCustomAttributes = \"\";\n\t\t$this->nomor->EditValue = $this->nomor->CurrentValue;\n\t\t$this->nomor->ViewCustomAttributes = \"\";\n\n\t\t// transaksi\n\t\t$this->transaksi->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->transaksi->EditCustomAttributes = \"\";\n\t\t$this->transaksi->EditValue = $this->transaksi->CurrentValue;\n\t\t$this->transaksi->PlaceHolder = ew_RemoveHtml($this->transaksi->FldCaption());\n\n\t\t// referensi\n\t\t$this->referensi->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->referensi->EditCustomAttributes = \"\";\n\t\t$this->referensi->EditValue = $this->referensi->CurrentValue;\n\t\t$this->referensi->PlaceHolder = ew_RemoveHtml($this->referensi->FldCaption());\n\n\t\t// group\n\t\t$this->group->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->group->EditCustomAttributes = \"\";\n\t\t$this->group->EditValue = $this->group->CurrentValue;\n\t\t$this->group->PlaceHolder = ew_RemoveHtml($this->group->FldCaption());\n\n\t\t// rekening\n\t\t$this->rekening->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->rekening->EditCustomAttributes = \"\";\n\t\t$this->rekening->EditValue = $this->rekening->CurrentValue;\n\t\t$this->rekening->PlaceHolder = ew_RemoveHtml($this->rekening->FldCaption());\n\n\t\t// tipe\n\t\t$this->tipe->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->tipe->EditCustomAttributes = \"\";\n\t\t$this->tipe->EditValue = $this->tipe->CurrentValue;\n\t\t$this->tipe->PlaceHolder = ew_RemoveHtml($this->tipe->FldCaption());\n\n\t\t// posisi\n\t\t$this->posisi->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->posisi->EditCustomAttributes = \"\";\n\t\t$this->posisi->EditValue = $this->posisi->CurrentValue;\n\t\t$this->posisi->PlaceHolder = ew_RemoveHtml($this->posisi->FldCaption());\n\n\t\t// laporan\n\t\t$this->laporan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->laporan->EditCustomAttributes = \"\";\n\t\t$this->laporan->EditValue = $this->laporan->CurrentValue;\n\t\t$this->laporan->PlaceHolder = ew_RemoveHtml($this->laporan->FldCaption());\n\n\t\t// keterangan\n\t\t$this->keterangan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->keterangan->EditCustomAttributes = \"\";\n\t\t$this->keterangan->EditValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->PlaceHolder = ew_RemoveHtml($this->keterangan->FldCaption());\n\n\t\t// debet1\n\t\t$this->debet1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet1->EditCustomAttributes = \"\";\n\t\t$this->debet1->EditValue = $this->debet1->CurrentValue;\n\t\t$this->debet1->PlaceHolder = ew_RemoveHtml($this->debet1->FldCaption());\n\t\tif (strval($this->debet1->EditValue) <> \"\" && is_numeric($this->debet1->EditValue)) $this->debet1->EditValue = ew_FormatNumber($this->debet1->EditValue, -2, -1, -2, 0);\n\n\t\t// credit1\n\t\t$this->credit1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit1->EditCustomAttributes = \"\";\n\t\t$this->credit1->EditValue = $this->credit1->CurrentValue;\n\t\t$this->credit1->PlaceHolder = ew_RemoveHtml($this->credit1->FldCaption());\n\t\tif (strval($this->credit1->EditValue) <> \"\" && is_numeric($this->credit1->EditValue)) $this->credit1->EditValue = ew_FormatNumber($this->credit1->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo1\n\t\t$this->saldo1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo1->EditCustomAttributes = \"\";\n\t\t$this->saldo1->EditValue = $this->saldo1->CurrentValue;\n\t\t$this->saldo1->PlaceHolder = ew_RemoveHtml($this->saldo1->FldCaption());\n\t\tif (strval($this->saldo1->EditValue) <> \"\" && is_numeric($this->saldo1->EditValue)) $this->saldo1->EditValue = ew_FormatNumber($this->saldo1->EditValue, -2, -1, -2, 0);\n\n\t\t// debet2\n\t\t$this->debet2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet2->EditCustomAttributes = \"\";\n\t\t$this->debet2->EditValue = $this->debet2->CurrentValue;\n\t\t$this->debet2->PlaceHolder = ew_RemoveHtml($this->debet2->FldCaption());\n\t\tif (strval($this->debet2->EditValue) <> \"\" && is_numeric($this->debet2->EditValue)) $this->debet2->EditValue = ew_FormatNumber($this->debet2->EditValue, -2, -1, -2, 0);\n\n\t\t// credit2\n\t\t$this->credit2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit2->EditCustomAttributes = \"\";\n\t\t$this->credit2->EditValue = $this->credit2->CurrentValue;\n\t\t$this->credit2->PlaceHolder = ew_RemoveHtml($this->credit2->FldCaption());\n\t\tif (strval($this->credit2->EditValue) <> \"\" && is_numeric($this->credit2->EditValue)) $this->credit2->EditValue = ew_FormatNumber($this->credit2->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo2\n\t\t$this->saldo2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo2->EditCustomAttributes = \"\";\n\t\t$this->saldo2->EditValue = $this->saldo2->CurrentValue;\n\t\t$this->saldo2->PlaceHolder = ew_RemoveHtml($this->saldo2->FldCaption());\n\t\tif (strval($this->saldo2->EditValue) <> \"\" && is_numeric($this->saldo2->EditValue)) $this->saldo2->EditValue = ew_FormatNumber($this->saldo2->EditValue, -2, -1, -2, 0);\n\n\t\t// debet3\n\t\t$this->debet3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet3->EditCustomAttributes = \"\";\n\t\t$this->debet3->EditValue = $this->debet3->CurrentValue;\n\t\t$this->debet3->PlaceHolder = ew_RemoveHtml($this->debet3->FldCaption());\n\t\tif (strval($this->debet3->EditValue) <> \"\" && is_numeric($this->debet3->EditValue)) $this->debet3->EditValue = ew_FormatNumber($this->debet3->EditValue, -2, -1, -2, 0);\n\n\t\t// credit3\n\t\t$this->credit3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit3->EditCustomAttributes = \"\";\n\t\t$this->credit3->EditValue = $this->credit3->CurrentValue;\n\t\t$this->credit3->PlaceHolder = ew_RemoveHtml($this->credit3->FldCaption());\n\t\tif (strval($this->credit3->EditValue) <> \"\" && is_numeric($this->credit3->EditValue)) $this->credit3->EditValue = ew_FormatNumber($this->credit3->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo3\n\t\t$this->saldo3->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo3->EditCustomAttributes = \"\";\n\t\t$this->saldo3->EditValue = $this->saldo3->CurrentValue;\n\t\t$this->saldo3->PlaceHolder = ew_RemoveHtml($this->saldo3->FldCaption());\n\t\tif (strval($this->saldo3->EditValue) <> \"\" && is_numeric($this->saldo3->EditValue)) $this->saldo3->EditValue = ew_FormatNumber($this->saldo3->EditValue, -2, -1, -2, 0);\n\n\t\t// debet4\n\t\t$this->debet4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet4->EditCustomAttributes = \"\";\n\t\t$this->debet4->EditValue = $this->debet4->CurrentValue;\n\t\t$this->debet4->PlaceHolder = ew_RemoveHtml($this->debet4->FldCaption());\n\t\tif (strval($this->debet4->EditValue) <> \"\" && is_numeric($this->debet4->EditValue)) $this->debet4->EditValue = ew_FormatNumber($this->debet4->EditValue, -2, -1, -2, 0);\n\n\t\t// credit4\n\t\t$this->credit4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit4->EditCustomAttributes = \"\";\n\t\t$this->credit4->EditValue = $this->credit4->CurrentValue;\n\t\t$this->credit4->PlaceHolder = ew_RemoveHtml($this->credit4->FldCaption());\n\t\tif (strval($this->credit4->EditValue) <> \"\" && is_numeric($this->credit4->EditValue)) $this->credit4->EditValue = ew_FormatNumber($this->credit4->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo4\n\t\t$this->saldo4->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo4->EditCustomAttributes = \"\";\n\t\t$this->saldo4->EditValue = $this->saldo4->CurrentValue;\n\t\t$this->saldo4->PlaceHolder = ew_RemoveHtml($this->saldo4->FldCaption());\n\t\tif (strval($this->saldo4->EditValue) <> \"\" && is_numeric($this->saldo4->EditValue)) $this->saldo4->EditValue = ew_FormatNumber($this->saldo4->EditValue, -2, -1, -2, 0);\n\n\t\t// debet5\n\t\t$this->debet5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet5->EditCustomAttributes = \"\";\n\t\t$this->debet5->EditValue = $this->debet5->CurrentValue;\n\t\t$this->debet5->PlaceHolder = ew_RemoveHtml($this->debet5->FldCaption());\n\t\tif (strval($this->debet5->EditValue) <> \"\" && is_numeric($this->debet5->EditValue)) $this->debet5->EditValue = ew_FormatNumber($this->debet5->EditValue, -2, -1, -2, 0);\n\n\t\t// credit5\n\t\t$this->credit5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit5->EditCustomAttributes = \"\";\n\t\t$this->credit5->EditValue = $this->credit5->CurrentValue;\n\t\t$this->credit5->PlaceHolder = ew_RemoveHtml($this->credit5->FldCaption());\n\t\tif (strval($this->credit5->EditValue) <> \"\" && is_numeric($this->credit5->EditValue)) $this->credit5->EditValue = ew_FormatNumber($this->credit5->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo5\n\t\t$this->saldo5->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo5->EditCustomAttributes = \"\";\n\t\t$this->saldo5->EditValue = $this->saldo5->CurrentValue;\n\t\t$this->saldo5->PlaceHolder = ew_RemoveHtml($this->saldo5->FldCaption());\n\t\tif (strval($this->saldo5->EditValue) <> \"\" && is_numeric($this->saldo5->EditValue)) $this->saldo5->EditValue = ew_FormatNumber($this->saldo5->EditValue, -2, -1, -2, 0);\n\n\t\t// debet6\n\t\t$this->debet6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet6->EditCustomAttributes = \"\";\n\t\t$this->debet6->EditValue = $this->debet6->CurrentValue;\n\t\t$this->debet6->PlaceHolder = ew_RemoveHtml($this->debet6->FldCaption());\n\t\tif (strval($this->debet6->EditValue) <> \"\" && is_numeric($this->debet6->EditValue)) $this->debet6->EditValue = ew_FormatNumber($this->debet6->EditValue, -2, -1, -2, 0);\n\n\t\t// credit6\n\t\t$this->credit6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit6->EditCustomAttributes = \"\";\n\t\t$this->credit6->EditValue = $this->credit6->CurrentValue;\n\t\t$this->credit6->PlaceHolder = ew_RemoveHtml($this->credit6->FldCaption());\n\t\tif (strval($this->credit6->EditValue) <> \"\" && is_numeric($this->credit6->EditValue)) $this->credit6->EditValue = ew_FormatNumber($this->credit6->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo6\n\t\t$this->saldo6->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo6->EditCustomAttributes = \"\";\n\t\t$this->saldo6->EditValue = $this->saldo6->CurrentValue;\n\t\t$this->saldo6->PlaceHolder = ew_RemoveHtml($this->saldo6->FldCaption());\n\t\tif (strval($this->saldo6->EditValue) <> \"\" && is_numeric($this->saldo6->EditValue)) $this->saldo6->EditValue = ew_FormatNumber($this->saldo6->EditValue, -2, -1, -2, 0);\n\n\t\t// debet7\n\t\t$this->debet7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet7->EditCustomAttributes = \"\";\n\t\t$this->debet7->EditValue = $this->debet7->CurrentValue;\n\t\t$this->debet7->PlaceHolder = ew_RemoveHtml($this->debet7->FldCaption());\n\t\tif (strval($this->debet7->EditValue) <> \"\" && is_numeric($this->debet7->EditValue)) $this->debet7->EditValue = ew_FormatNumber($this->debet7->EditValue, -2, -1, -2, 0);\n\n\t\t// credit7\n\t\t$this->credit7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit7->EditCustomAttributes = \"\";\n\t\t$this->credit7->EditValue = $this->credit7->CurrentValue;\n\t\t$this->credit7->PlaceHolder = ew_RemoveHtml($this->credit7->FldCaption());\n\t\tif (strval($this->credit7->EditValue) <> \"\" && is_numeric($this->credit7->EditValue)) $this->credit7->EditValue = ew_FormatNumber($this->credit7->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo7\n\t\t$this->saldo7->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo7->EditCustomAttributes = \"\";\n\t\t$this->saldo7->EditValue = $this->saldo7->CurrentValue;\n\t\t$this->saldo7->PlaceHolder = ew_RemoveHtml($this->saldo7->FldCaption());\n\t\tif (strval($this->saldo7->EditValue) <> \"\" && is_numeric($this->saldo7->EditValue)) $this->saldo7->EditValue = ew_FormatNumber($this->saldo7->EditValue, -2, -1, -2, 0);\n\n\t\t// debet8\n\t\t$this->debet8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet8->EditCustomAttributes = \"\";\n\t\t$this->debet8->EditValue = $this->debet8->CurrentValue;\n\t\t$this->debet8->PlaceHolder = ew_RemoveHtml($this->debet8->FldCaption());\n\t\tif (strval($this->debet8->EditValue) <> \"\" && is_numeric($this->debet8->EditValue)) $this->debet8->EditValue = ew_FormatNumber($this->debet8->EditValue, -2, -1, -2, 0);\n\n\t\t// credit8\n\t\t$this->credit8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit8->EditCustomAttributes = \"\";\n\t\t$this->credit8->EditValue = $this->credit8->CurrentValue;\n\t\t$this->credit8->PlaceHolder = ew_RemoveHtml($this->credit8->FldCaption());\n\t\tif (strval($this->credit8->EditValue) <> \"\" && is_numeric($this->credit8->EditValue)) $this->credit8->EditValue = ew_FormatNumber($this->credit8->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo8\n\t\t$this->saldo8->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo8->EditCustomAttributes = \"\";\n\t\t$this->saldo8->EditValue = $this->saldo8->CurrentValue;\n\t\t$this->saldo8->PlaceHolder = ew_RemoveHtml($this->saldo8->FldCaption());\n\t\tif (strval($this->saldo8->EditValue) <> \"\" && is_numeric($this->saldo8->EditValue)) $this->saldo8->EditValue = ew_FormatNumber($this->saldo8->EditValue, -2, -1, -2, 0);\n\n\t\t// debet9\n\t\t$this->debet9->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet9->EditCustomAttributes = \"\";\n\t\t$this->debet9->EditValue = $this->debet9->CurrentValue;\n\t\t$this->debet9->PlaceHolder = ew_RemoveHtml($this->debet9->FldCaption());\n\t\tif (strval($this->debet9->EditValue) <> \"\" && is_numeric($this->debet9->EditValue)) $this->debet9->EditValue = ew_FormatNumber($this->debet9->EditValue, -2, -1, -2, 0);\n\n\t\t// credit9\n\t\t$this->credit9->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit9->EditCustomAttributes = \"\";\n\t\t$this->credit9->EditValue = $this->credit9->CurrentValue;\n\t\t$this->credit9->PlaceHolder = ew_RemoveHtml($this->credit9->FldCaption());\n\t\tif (strval($this->credit9->EditValue) <> \"\" && is_numeric($this->credit9->EditValue)) $this->credit9->EditValue = ew_FormatNumber($this->credit9->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo9\n\t\t$this->saldo9->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo9->EditCustomAttributes = \"\";\n\t\t$this->saldo9->EditValue = $this->saldo9->CurrentValue;\n\t\t$this->saldo9->PlaceHolder = ew_RemoveHtml($this->saldo9->FldCaption());\n\t\tif (strval($this->saldo9->EditValue) <> \"\" && is_numeric($this->saldo9->EditValue)) $this->saldo9->EditValue = ew_FormatNumber($this->saldo9->EditValue, -2, -1, -2, 0);\n\n\t\t// debet10\n\t\t$this->debet10->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet10->EditCustomAttributes = \"\";\n\t\t$this->debet10->EditValue = $this->debet10->CurrentValue;\n\t\t$this->debet10->PlaceHolder = ew_RemoveHtml($this->debet10->FldCaption());\n\t\tif (strval($this->debet10->EditValue) <> \"\" && is_numeric($this->debet10->EditValue)) $this->debet10->EditValue = ew_FormatNumber($this->debet10->EditValue, -2, -1, -2, 0);\n\n\t\t// credit10\n\t\t$this->credit10->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit10->EditCustomAttributes = \"\";\n\t\t$this->credit10->EditValue = $this->credit10->CurrentValue;\n\t\t$this->credit10->PlaceHolder = ew_RemoveHtml($this->credit10->FldCaption());\n\t\tif (strval($this->credit10->EditValue) <> \"\" && is_numeric($this->credit10->EditValue)) $this->credit10->EditValue = ew_FormatNumber($this->credit10->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo10\n\t\t$this->saldo10->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo10->EditCustomAttributes = \"\";\n\t\t$this->saldo10->EditValue = $this->saldo10->CurrentValue;\n\t\t$this->saldo10->PlaceHolder = ew_RemoveHtml($this->saldo10->FldCaption());\n\t\tif (strval($this->saldo10->EditValue) <> \"\" && is_numeric($this->saldo10->EditValue)) $this->saldo10->EditValue = ew_FormatNumber($this->saldo10->EditValue, -2, -1, -2, 0);\n\n\t\t// debet11\n\t\t$this->debet11->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet11->EditCustomAttributes = \"\";\n\t\t$this->debet11->EditValue = $this->debet11->CurrentValue;\n\t\t$this->debet11->PlaceHolder = ew_RemoveHtml($this->debet11->FldCaption());\n\t\tif (strval($this->debet11->EditValue) <> \"\" && is_numeric($this->debet11->EditValue)) $this->debet11->EditValue = ew_FormatNumber($this->debet11->EditValue, -2, -1, -2, 0);\n\n\t\t// credit11\n\t\t$this->credit11->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit11->EditCustomAttributes = \"\";\n\t\t$this->credit11->EditValue = $this->credit11->CurrentValue;\n\t\t$this->credit11->PlaceHolder = ew_RemoveHtml($this->credit11->FldCaption());\n\t\tif (strval($this->credit11->EditValue) <> \"\" && is_numeric($this->credit11->EditValue)) $this->credit11->EditValue = ew_FormatNumber($this->credit11->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo11\n\t\t$this->saldo11->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo11->EditCustomAttributes = \"\";\n\t\t$this->saldo11->EditValue = $this->saldo11->CurrentValue;\n\t\t$this->saldo11->PlaceHolder = ew_RemoveHtml($this->saldo11->FldCaption());\n\t\tif (strval($this->saldo11->EditValue) <> \"\" && is_numeric($this->saldo11->EditValue)) $this->saldo11->EditValue = ew_FormatNumber($this->saldo11->EditValue, -2, -1, -2, 0);\n\n\t\t// debet12\n\t\t$this->debet12->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->debet12->EditCustomAttributes = \"\";\n\t\t$this->debet12->EditValue = $this->debet12->CurrentValue;\n\t\t$this->debet12->PlaceHolder = ew_RemoveHtml($this->debet12->FldCaption());\n\t\tif (strval($this->debet12->EditValue) <> \"\" && is_numeric($this->debet12->EditValue)) $this->debet12->EditValue = ew_FormatNumber($this->debet12->EditValue, -2, -1, -2, 0);\n\n\t\t// credit12\n\t\t$this->credit12->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->credit12->EditCustomAttributes = \"\";\n\t\t$this->credit12->EditValue = $this->credit12->CurrentValue;\n\t\t$this->credit12->PlaceHolder = ew_RemoveHtml($this->credit12->FldCaption());\n\t\tif (strval($this->credit12->EditValue) <> \"\" && is_numeric($this->credit12->EditValue)) $this->credit12->EditValue = ew_FormatNumber($this->credit12->EditValue, -2, -1, -2, 0);\n\n\t\t// saldo12\n\t\t$this->saldo12->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->saldo12->EditCustomAttributes = \"\";\n\t\t$this->saldo12->EditValue = $this->saldo12->CurrentValue;\n\t\t$this->saldo12->PlaceHolder = ew_RemoveHtml($this->saldo12->FldCaption());\n\t\tif (strval($this->saldo12->EditValue) <> \"\" && is_numeric($this->saldo12->EditValue)) $this->saldo12->EditValue = ew_FormatNumber($this->saldo12->EditValue, -2, -1, -2, 0);\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "public function the_row() {\n the_row();\n }", "function RenderListRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// NO\n\t\t// Klinik\n\t\t// DOKTER\n\t\t// No_Pasien\n\t\t// Nama\n\t\t// Alamat\n\t\t// Tanggal\n\t\t// Masuk\n\t\t// Lewati\n\t\t// RMOK\n\t\t// CETAK\n\t\t// NOANTRI\n\t\t// NO\n\n\t\t$this->NO->ViewValue = $this->NO->CurrentValue;\n\t\t$this->NO->ViewCustomAttributes = \"\";\n\n\t\t// Klinik\n\t\t$this->Klinik->ViewValue = $this->Klinik->CurrentValue;\n\t\t$this->Klinik->ViewCustomAttributes = \"\";\n\n\t\t// DOKTER\n\t\t$this->DOKTER->ViewValue = $this->DOKTER->CurrentValue;\n\t\t$this->DOKTER->ViewCustomAttributes = \"\";\n\n\t\t// No_Pasien\n\t\t$this->No_Pasien->ViewValue = $this->No_Pasien->CurrentValue;\n\t\t$this->No_Pasien->ViewCustomAttributes = \"\";\n\n\t\t// Nama\n\t\t$this->Nama->ViewValue = $this->Nama->CurrentValue;\n\t\t$this->Nama->ViewCustomAttributes = \"\";\n\n\t\t// Alamat\n\t\t$this->Alamat->ViewValue = $this->Alamat->CurrentValue;\n\t\t$this->Alamat->ViewCustomAttributes = \"\";\n\n\t\t// Tanggal\n\t\t$this->Tanggal->ViewValue = $this->Tanggal->CurrentValue;\n\t\t$this->Tanggal->ViewValue = ew_FormatDateTime($this->Tanggal->ViewValue, 0);\n\t\t$this->Tanggal->ViewCustomAttributes = \"\";\n\n\t\t// Masuk\n\t\t$this->Masuk->ViewValue = $this->Masuk->CurrentValue;\n\t\t$this->Masuk->ViewCustomAttributes = \"\";\n\n\t\t// Lewati\n\t\t$this->Lewati->ViewValue = $this->Lewati->CurrentValue;\n\t\t$this->Lewati->ViewCustomAttributes = \"\";\n\n\t\t// RMOK\n\t\t$this->RMOK->ViewValue = $this->RMOK->CurrentValue;\n\t\t$this->RMOK->ViewCustomAttributes = \"\";\n\n\t\t// CETAK\n\t\t$this->CETAK->ViewValue = $this->CETAK->CurrentValue;\n\t\t$this->CETAK->ViewCustomAttributes = \"\";\n\n\t\t// NOANTRI\n\t\t$this->NOANTRI->ViewValue = $this->NOANTRI->CurrentValue;\n\t\t$this->NOANTRI->ViewCustomAttributes = \"\";\n\n\t\t// NO\n\t\t$this->NO->LinkCustomAttributes = \"\";\n\t\t$this->NO->HrefValue = \"\";\n\t\t$this->NO->TooltipValue = \"\";\n\n\t\t// Klinik\n\t\t$this->Klinik->LinkCustomAttributes = \"\";\n\t\t$this->Klinik->HrefValue = \"\";\n\t\t$this->Klinik->TooltipValue = \"\";\n\n\t\t// DOKTER\n\t\t$this->DOKTER->LinkCustomAttributes = \"\";\n\t\t$this->DOKTER->HrefValue = \"\";\n\t\t$this->DOKTER->TooltipValue = \"\";\n\n\t\t// No_Pasien\n\t\t$this->No_Pasien->LinkCustomAttributes = \"\";\n\t\t$this->No_Pasien->HrefValue = \"\";\n\t\t$this->No_Pasien->TooltipValue = \"\";\n\n\t\t// Nama\n\t\t$this->Nama->LinkCustomAttributes = \"\";\n\t\t$this->Nama->HrefValue = \"\";\n\t\t$this->Nama->TooltipValue = \"\";\n\n\t\t// Alamat\n\t\t$this->Alamat->LinkCustomAttributes = \"\";\n\t\t$this->Alamat->HrefValue = \"\";\n\t\t$this->Alamat->TooltipValue = \"\";\n\n\t\t// Tanggal\n\t\t$this->Tanggal->LinkCustomAttributes = \"\";\n\t\t$this->Tanggal->HrefValue = \"\";\n\t\t$this->Tanggal->TooltipValue = \"\";\n\n\t\t// Masuk\n\t\t$this->Masuk->LinkCustomAttributes = \"\";\n\t\t$this->Masuk->HrefValue = \"\";\n\t\t$this->Masuk->TooltipValue = \"\";\n\n\t\t// Lewati\n\t\t$this->Lewati->LinkCustomAttributes = \"\";\n\t\t$this->Lewati->HrefValue = \"\";\n\t\t$this->Lewati->TooltipValue = \"\";\n\n\t\t// RMOK\n\t\t$this->RMOK->LinkCustomAttributes = \"\";\n\t\t$this->RMOK->HrefValue = \"\";\n\t\t$this->RMOK->TooltipValue = \"\";\n\n\t\t// CETAK\n\t\t$this->CETAK->LinkCustomAttributes = \"\";\n\t\t$this->CETAK->HrefValue = \"\";\n\t\t$this->CETAK->TooltipValue = \"\";\n\n\t\t// NOANTRI\n\t\t$this->NOANTRI->LinkCustomAttributes = \"\";\n\t\t$this->NOANTRI->HrefValue = \"\";\n\t\t$this->NOANTRI->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// no\n\t\t$this->no->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->no->EditCustomAttributes = \"\";\n\t\t$this->no->EditValue = $this->no->CurrentValue;\n\t\t$this->no->ViewCustomAttributes = \"\";\n\n\t\t// nama\n\t\t$this->nama->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nama->EditCustomAttributes = \"\";\n\t\t$this->nama->EditValue = $this->nama->CurrentValue;\n\t\t$this->nama->PlaceHolder = ew_RemoveHtml($this->nama->FldCaption());\n\n\t\t// kelas\n\t\t$this->kelas->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->kelas->EditCustomAttributes = \"\";\n\t\t$this->kelas->EditValue = $this->kelas->CurrentValue;\n\t\t$this->kelas->PlaceHolder = ew_RemoveHtml($this->kelas->FldCaption());\n\n\t\t// ruang\n\t\t$this->ruang->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ruang->EditCustomAttributes = \"\";\n\t\t$this->ruang->EditValue = $this->ruang->CurrentValue;\n\t\t$this->ruang->PlaceHolder = ew_RemoveHtml($this->ruang->FldCaption());\n\n\t\t// jumlah_tt\n\t\t$this->jumlah_tt->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->jumlah_tt->EditCustomAttributes = \"\";\n\t\t$this->jumlah_tt->EditValue = $this->jumlah_tt->CurrentValue;\n\t\t$this->jumlah_tt->PlaceHolder = ew_RemoveHtml($this->jumlah_tt->FldCaption());\n\n\t\t// ket_ruang\n\t\t$this->ket_ruang->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ket_ruang->EditCustomAttributes = \"\";\n\t\t$this->ket_ruang->EditValue = $this->ket_ruang->CurrentValue;\n\t\t$this->ket_ruang->PlaceHolder = ew_RemoveHtml($this->ket_ruang->FldCaption());\n\n\t\t// fasilitas\n\t\t$this->fasilitas->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->fasilitas->EditCustomAttributes = \"\";\n\t\t$this->fasilitas->EditValue = $this->fasilitas->CurrentValue;\n\t\t$this->fasilitas->PlaceHolder = ew_RemoveHtml($this->fasilitas->FldCaption());\n\n\t\t// keterangan\n\t\t$this->keterangan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->keterangan->EditCustomAttributes = \"\";\n\t\t$this->keterangan->EditValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->PlaceHolder = ew_RemoveHtml($this->keterangan->FldCaption());\n\n\t\t// kepala_ruangan\n\t\t$this->kepala_ruangan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->kepala_ruangan->EditCustomAttributes = \"\";\n\t\t$this->kepala_ruangan->EditValue = $this->kepala_ruangan->CurrentValue;\n\t\t$this->kepala_ruangan->PlaceHolder = ew_RemoveHtml($this->kepala_ruangan->FldCaption());\n\n\t\t// nip_kepala_ruangan\n\t\t$this->nip_kepala_ruangan->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nip_kepala_ruangan->EditCustomAttributes = \"\";\n\t\t$this->nip_kepala_ruangan->EditValue = $this->nip_kepala_ruangan->CurrentValue;\n\t\t$this->nip_kepala_ruangan->PlaceHolder = ew_RemoveHtml($this->nip_kepala_ruangan->FldCaption());\n\n\t\t// group_id\n\t\t$this->group_id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->group_id->EditCustomAttributes = \"\";\n\t\t$this->group_id->EditValue = $this->group_id->CurrentValue;\n\t\t$this->group_id->PlaceHolder = ew_RemoveHtml($this->group_id->FldCaption());\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "public function renderListRow()\n {\n global $Security, $CurrentLanguage, $Language;\n\n // Call Row Rendering event\n $this->rowRendering();\n\n // Common render codes\n\n // NIK\n\n // NAMA_PEMILIK\n\n // NO_HP\n\n // NAMA_USAHA\n\n // KALURAHAN\n\n // KAPANEWON\n\n // skor_produksi\n\n // maxskor_produksi\n\n // bobot_produksi\n\n // skor_pemasaran\n\n // maxskor_pemasaran\n\n // bobot_pemasaran\n\n // skor_pemasaranonline\n\n // maxskor_pemasaranonline\n\n // bobot_pemasaranonline\n\n // skor_kelembagaan\n\n // maxskor_kelembagaan\n\n // bobot_kelembagaan\n\n // skor_keuangan\n\n // maxskor_keuangan\n\n // bobot_keuangan\n\n // skor_sdm\n\n // maxskor_sdm\n\n // bobot_sdm\n\n // skor_kelas\n\n // maxskor_kelas\n\n // kelas_umkm\n\n // NIK\n $this->NIK->ViewValue = $this->NIK->CurrentValue;\n $this->NIK->ViewCustomAttributes = \"\";\n\n // NAMA_PEMILIK\n $this->NAMA_PEMILIK->ViewValue = $this->NAMA_PEMILIK->CurrentValue;\n $this->NAMA_PEMILIK->ViewCustomAttributes = \"\";\n\n // NO_HP\n $this->NO_HP->ViewValue = $this->NO_HP->CurrentValue;\n $this->NO_HP->ViewCustomAttributes = \"\";\n\n // NAMA_USAHA\n $this->NAMA_USAHA->ViewValue = $this->NAMA_USAHA->CurrentValue;\n $this->NAMA_USAHA->ViewCustomAttributes = \"\";\n\n // KALURAHAN\n $this->KALURAHAN->ViewValue = $this->KALURAHAN->CurrentValue;\n $this->KALURAHAN->ViewCustomAttributes = \"\";\n\n // KAPANEWON\n $this->KAPANEWON->ViewValue = $this->KAPANEWON->CurrentValue;\n $this->KAPANEWON->ViewCustomAttributes = \"\";\n\n // skor_produksi\n $this->skor_produksi->ViewValue = $this->skor_produksi->CurrentValue;\n $this->skor_produksi->ViewValue = FormatNumber($this->skor_produksi->ViewValue, 2, -2, -2, -2);\n $this->skor_produksi->ViewCustomAttributes = \"\";\n\n // maxskor_produksi\n $this->maxskor_produksi->ViewValue = $this->maxskor_produksi->CurrentValue;\n $this->maxskor_produksi->ViewValue = FormatNumber($this->maxskor_produksi->ViewValue, 2, -2, -2, -2);\n $this->maxskor_produksi->ViewCustomAttributes = \"\";\n\n // bobot_produksi\n $this->bobot_produksi->ViewValue = $this->bobot_produksi->CurrentValue;\n $this->bobot_produksi->ViewValue = FormatNumber($this->bobot_produksi->ViewValue, 0, -2, -2, -2);\n $this->bobot_produksi->ViewCustomAttributes = \"\";\n\n // skor_pemasaran\n $this->skor_pemasaran->ViewValue = $this->skor_pemasaran->CurrentValue;\n $this->skor_pemasaran->ViewValue = FormatNumber($this->skor_pemasaran->ViewValue, 2, -2, -2, -2);\n $this->skor_pemasaran->ViewCustomAttributes = \"\";\n\n // maxskor_pemasaran\n $this->maxskor_pemasaran->ViewValue = $this->maxskor_pemasaran->CurrentValue;\n $this->maxskor_pemasaran->ViewValue = FormatNumber($this->maxskor_pemasaran->ViewValue, 2, -2, -2, -2);\n $this->maxskor_pemasaran->ViewCustomAttributes = \"\";\n\n // bobot_pemasaran\n $this->bobot_pemasaran->ViewValue = $this->bobot_pemasaran->CurrentValue;\n $this->bobot_pemasaran->ViewValue = FormatNumber($this->bobot_pemasaran->ViewValue, 0, -2, -2, -2);\n $this->bobot_pemasaran->ViewCustomAttributes = \"\";\n\n // skor_pemasaranonline\n $this->skor_pemasaranonline->ViewValue = $this->skor_pemasaranonline->CurrentValue;\n $this->skor_pemasaranonline->ViewValue = FormatNumber($this->skor_pemasaranonline->ViewValue, 2, -2, -2, -2);\n $this->skor_pemasaranonline->ViewCustomAttributes = \"\";\n\n // maxskor_pemasaranonline\n $this->maxskor_pemasaranonline->ViewValue = $this->maxskor_pemasaranonline->CurrentValue;\n $this->maxskor_pemasaranonline->ViewValue = FormatNumber($this->maxskor_pemasaranonline->ViewValue, 2, -2, -2, -2);\n $this->maxskor_pemasaranonline->ViewCustomAttributes = \"\";\n\n // bobot_pemasaranonline\n $this->bobot_pemasaranonline->ViewValue = $this->bobot_pemasaranonline->CurrentValue;\n $this->bobot_pemasaranonline->ViewValue = FormatNumber($this->bobot_pemasaranonline->ViewValue, 0, -2, -2, -2);\n $this->bobot_pemasaranonline->ViewCustomAttributes = \"\";\n\n // skor_kelembagaan\n $this->skor_kelembagaan->ViewValue = $this->skor_kelembagaan->CurrentValue;\n $this->skor_kelembagaan->ViewValue = FormatNumber($this->skor_kelembagaan->ViewValue, 2, -2, -2, -2);\n $this->skor_kelembagaan->ViewCustomAttributes = \"\";\n\n // maxskor_kelembagaan\n $this->maxskor_kelembagaan->ViewValue = $this->maxskor_kelembagaan->CurrentValue;\n $this->maxskor_kelembagaan->ViewValue = FormatNumber($this->maxskor_kelembagaan->ViewValue, 2, -2, -2, -2);\n $this->maxskor_kelembagaan->ViewCustomAttributes = \"\";\n\n // bobot_kelembagaan\n $this->bobot_kelembagaan->ViewValue = $this->bobot_kelembagaan->CurrentValue;\n $this->bobot_kelembagaan->ViewValue = FormatNumber($this->bobot_kelembagaan->ViewValue, 0, -2, -2, -2);\n $this->bobot_kelembagaan->ViewCustomAttributes = \"\";\n\n // skor_keuangan\n $this->skor_keuangan->ViewValue = $this->skor_keuangan->CurrentValue;\n $this->skor_keuangan->ViewValue = FormatNumber($this->skor_keuangan->ViewValue, 2, -2, -2, -2);\n $this->skor_keuangan->ViewCustomAttributes = \"\";\n\n // maxskor_keuangan\n $this->maxskor_keuangan->ViewValue = $this->maxskor_keuangan->CurrentValue;\n $this->maxskor_keuangan->ViewValue = FormatNumber($this->maxskor_keuangan->ViewValue, 2, -2, -2, -2);\n $this->maxskor_keuangan->ViewCustomAttributes = \"\";\n\n // bobot_keuangan\n $this->bobot_keuangan->ViewValue = $this->bobot_keuangan->CurrentValue;\n $this->bobot_keuangan->ViewValue = FormatNumber($this->bobot_keuangan->ViewValue, 0, -2, -2, -2);\n $this->bobot_keuangan->ViewCustomAttributes = \"\";\n\n // skor_sdm\n $this->skor_sdm->ViewValue = $this->skor_sdm->CurrentValue;\n $this->skor_sdm->ViewValue = FormatNumber($this->skor_sdm->ViewValue, 2, -2, -2, -2);\n $this->skor_sdm->ViewCustomAttributes = \"\";\n\n // maxskor_sdm\n $this->maxskor_sdm->ViewValue = $this->maxskor_sdm->CurrentValue;\n $this->maxskor_sdm->ViewValue = FormatNumber($this->maxskor_sdm->ViewValue, 2, -2, -2, -2);\n $this->maxskor_sdm->ViewCustomAttributes = \"\";\n\n // bobot_sdm\n $this->bobot_sdm->ViewValue = $this->bobot_sdm->CurrentValue;\n $this->bobot_sdm->ViewValue = FormatNumber($this->bobot_sdm->ViewValue, 0, -2, -2, -2);\n $this->bobot_sdm->ViewCustomAttributes = \"\";\n\n // skor_kelas\n $this->skor_kelas->ViewValue = $this->skor_kelas->CurrentValue;\n $this->skor_kelas->ViewValue = FormatNumber($this->skor_kelas->ViewValue, 2, -2, -2, -2);\n $this->skor_kelas->ViewCustomAttributes = \"\";\n\n // maxskor_kelas\n $this->maxskor_kelas->ViewValue = $this->maxskor_kelas->CurrentValue;\n $this->maxskor_kelas->ViewValue = FormatNumber($this->maxskor_kelas->ViewValue, 2, -2, -2, -2);\n $this->maxskor_kelas->ViewCustomAttributes = \"\";\n\n // kelas_umkm\n $this->kelas_umkm->ViewValue = $this->kelas_umkm->CurrentValue;\n $this->kelas_umkm->ViewCustomAttributes = \"\";\n\n // NIK\n $this->NIK->LinkCustomAttributes = \"\";\n $this->NIK->HrefValue = \"\";\n $this->NIK->TooltipValue = \"\";\n\n // NAMA_PEMILIK\n $this->NAMA_PEMILIK->LinkCustomAttributes = \"\";\n $this->NAMA_PEMILIK->HrefValue = \"\";\n $this->NAMA_PEMILIK->TooltipValue = \"\";\n\n // NO_HP\n $this->NO_HP->LinkCustomAttributes = \"\";\n $this->NO_HP->HrefValue = \"\";\n $this->NO_HP->TooltipValue = \"\";\n\n // NAMA_USAHA\n $this->NAMA_USAHA->LinkCustomAttributes = \"\";\n $this->NAMA_USAHA->HrefValue = \"\";\n $this->NAMA_USAHA->TooltipValue = \"\";\n\n // KALURAHAN\n $this->KALURAHAN->LinkCustomAttributes = \"\";\n $this->KALURAHAN->HrefValue = \"\";\n $this->KALURAHAN->TooltipValue = \"\";\n\n // KAPANEWON\n $this->KAPANEWON->LinkCustomAttributes = \"\";\n $this->KAPANEWON->HrefValue = \"\";\n $this->KAPANEWON->TooltipValue = \"\";\n\n // skor_produksi\n $this->skor_produksi->LinkCustomAttributes = \"\";\n $this->skor_produksi->HrefValue = \"\";\n $this->skor_produksi->TooltipValue = \"\";\n\n // maxskor_produksi\n $this->maxskor_produksi->LinkCustomAttributes = \"\";\n $this->maxskor_produksi->HrefValue = \"\";\n $this->maxskor_produksi->TooltipValue = \"\";\n\n // bobot_produksi\n $this->bobot_produksi->LinkCustomAttributes = \"\";\n $this->bobot_produksi->HrefValue = \"\";\n $this->bobot_produksi->TooltipValue = \"\";\n\n // skor_pemasaran\n $this->skor_pemasaran->LinkCustomAttributes = \"\";\n $this->skor_pemasaran->HrefValue = \"\";\n $this->skor_pemasaran->TooltipValue = \"\";\n\n // maxskor_pemasaran\n $this->maxskor_pemasaran->LinkCustomAttributes = \"\";\n $this->maxskor_pemasaran->HrefValue = \"\";\n $this->maxskor_pemasaran->TooltipValue = \"\";\n\n // bobot_pemasaran\n $this->bobot_pemasaran->LinkCustomAttributes = \"\";\n $this->bobot_pemasaran->HrefValue = \"\";\n $this->bobot_pemasaran->TooltipValue = \"\";\n\n // skor_pemasaranonline\n $this->skor_pemasaranonline->LinkCustomAttributes = \"\";\n $this->skor_pemasaranonline->HrefValue = \"\";\n $this->skor_pemasaranonline->TooltipValue = \"\";\n\n // maxskor_pemasaranonline\n $this->maxskor_pemasaranonline->LinkCustomAttributes = \"\";\n $this->maxskor_pemasaranonline->HrefValue = \"\";\n $this->maxskor_pemasaranonline->TooltipValue = \"\";\n\n // bobot_pemasaranonline\n $this->bobot_pemasaranonline->LinkCustomAttributes = \"\";\n $this->bobot_pemasaranonline->HrefValue = \"\";\n $this->bobot_pemasaranonline->TooltipValue = \"\";\n\n // skor_kelembagaan\n $this->skor_kelembagaan->LinkCustomAttributes = \"\";\n $this->skor_kelembagaan->HrefValue = \"\";\n $this->skor_kelembagaan->TooltipValue = \"\";\n\n // maxskor_kelembagaan\n $this->maxskor_kelembagaan->LinkCustomAttributes = \"\";\n $this->maxskor_kelembagaan->HrefValue = \"\";\n $this->maxskor_kelembagaan->TooltipValue = \"\";\n\n // bobot_kelembagaan\n $this->bobot_kelembagaan->LinkCustomAttributes = \"\";\n $this->bobot_kelembagaan->HrefValue = \"\";\n $this->bobot_kelembagaan->TooltipValue = \"\";\n\n // skor_keuangan\n $this->skor_keuangan->LinkCustomAttributes = \"\";\n $this->skor_keuangan->HrefValue = \"\";\n $this->skor_keuangan->TooltipValue = \"\";\n\n // maxskor_keuangan\n $this->maxskor_keuangan->LinkCustomAttributes = \"\";\n $this->maxskor_keuangan->HrefValue = \"\";\n $this->maxskor_keuangan->TooltipValue = \"\";\n\n // bobot_keuangan\n $this->bobot_keuangan->LinkCustomAttributes = \"\";\n $this->bobot_keuangan->HrefValue = \"\";\n $this->bobot_keuangan->TooltipValue = \"\";\n\n // skor_sdm\n $this->skor_sdm->LinkCustomAttributes = \"\";\n $this->skor_sdm->HrefValue = \"\";\n $this->skor_sdm->TooltipValue = \"\";\n\n // maxskor_sdm\n $this->maxskor_sdm->LinkCustomAttributes = \"\";\n $this->maxskor_sdm->HrefValue = \"\";\n $this->maxskor_sdm->TooltipValue = \"\";\n\n // bobot_sdm\n $this->bobot_sdm->LinkCustomAttributes = \"\";\n $this->bobot_sdm->HrefValue = \"\";\n $this->bobot_sdm->TooltipValue = \"\";\n\n // skor_kelas\n $this->skor_kelas->LinkCustomAttributes = \"\";\n $this->skor_kelas->HrefValue = \"\";\n $this->skor_kelas->TooltipValue = \"\";\n\n // maxskor_kelas\n $this->maxskor_kelas->LinkCustomAttributes = \"\";\n $this->maxskor_kelas->HrefValue = \"\";\n $this->maxskor_kelas->TooltipValue = \"\";\n\n // kelas_umkm\n $this->kelas_umkm->LinkCustomAttributes = \"\";\n $this->kelas_umkm->HrefValue = \"\";\n $this->kelas_umkm->TooltipValue = \"\";\n\n // Call Row Rendered event\n $this->rowRendered();\n\n // Save data for Custom Template\n $this->Rows[] = $this->customTemplateFieldValues();\n }", "function RenderListRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n // Common render codes\n\t\t// origen_dem\n\t\t// tipo_cliente_dem\n\t\t// fecha_llamada\n\t\t// cod_dem\n\t\t// poliza_dem\n\t\t// usuario_captura\n\t\t// campana_demanda\n\t\t// chip_natural\n\t\t// estado_predio\n\t\t// tipo_predio\n\t\t// uso\n\t\t// mecado\n\t\t// nombre_cliente\n\t\t// num_doc\n\t\t// direccion\n\t\t// municipio\n\t\t// telefono\n\t\t// cod_trabajo_original\n\t\t// fecha_trab_dem\n\t\t// cod_ult_visit\n\t\t// res_ult_vis\n\t\t// fecha_ult_visita\n\t\t// usu_asig_primer_trab\n\t\t// fecha_prim_visit\n\t\t// respuesta_pv\n\t\t// fecha_cap_primera_visita\n\t\t// cod_contratista\n\t\t// nom_cont\n\t\t// distrito\n\t\t// malla\n\t\t// sector\n\t\t// descr_estado_dem\n\t\t// estrato\n\t\t// clase_dem\n\t\t// origen_dem\n\n\t\t$this->origen_dem->ViewValue = $this->origen_dem->CurrentValue;\n\t\t$this->origen_dem->ViewCustomAttributes = \"\";\n\n\t\t// tipo_cliente_dem\n\t\t$this->tipo_cliente_dem->ViewValue = $this->tipo_cliente_dem->CurrentValue;\n\t\t$this->tipo_cliente_dem->ViewCustomAttributes = \"\";\n\n\t\t// fecha_llamada\n\t\t$this->fecha_llamada->ViewValue = $this->fecha_llamada->CurrentValue;\n\t\t$this->fecha_llamada->ViewValue = ew_FormatDateTime($this->fecha_llamada->ViewValue, 0);\n\t\t$this->fecha_llamada->ViewCustomAttributes = \"\";\n\n\t\t// cod_dem\n\t\t$this->cod_dem->ViewValue = $this->cod_dem->CurrentValue;\n\t\t$this->cod_dem->ViewCustomAttributes = \"\";\n\n\t\t// poliza_dem\n\t\t$this->poliza_dem->ViewValue = $this->poliza_dem->CurrentValue;\n\t\t$this->poliza_dem->ViewCustomAttributes = \"\";\n\n\t\t// usuario_captura\n\t\t$this->usuario_captura->ViewValue = $this->usuario_captura->CurrentValue;\n\t\t$this->usuario_captura->ViewCustomAttributes = \"\";\n\n\t\t// campana_demanda\n\t\t$this->campana_demanda->ViewValue = $this->campana_demanda->CurrentValue;\n\t\t$this->campana_demanda->ViewCustomAttributes = \"\";\n\n\t\t// chip_natural\n\t\t$this->chip_natural->ViewValue = $this->chip_natural->CurrentValue;\n\t\t$this->chip_natural->ViewCustomAttributes = \"\";\n\n\t\t// estado_predio\n\t\t$this->estado_predio->ViewValue = $this->estado_predio->CurrentValue;\n\t\t$this->estado_predio->ViewCustomAttributes = \"\";\n\n\t\t// tipo_predio\n\t\t$this->tipo_predio->ViewValue = $this->tipo_predio->CurrentValue;\n\t\t$this->tipo_predio->ViewCustomAttributes = \"\";\n\n\t\t// uso\n\t\t$this->uso->ViewValue = $this->uso->CurrentValue;\n\t\t$this->uso->ViewCustomAttributes = \"\";\n\n\t\t// mecado\n\t\t$this->mecado->ViewValue = $this->mecado->CurrentValue;\n\t\t$this->mecado->ViewCustomAttributes = \"\";\n\n\t\t// nombre_cliente\n\t\t$this->nombre_cliente->ViewValue = $this->nombre_cliente->CurrentValue;\n\t\t$this->nombre_cliente->ViewCustomAttributes = \"\";\n\n\t\t// num_doc\n\t\t$this->num_doc->ViewValue = $this->num_doc->CurrentValue;\n\t\t$this->num_doc->ViewCustomAttributes = \"\";\n\n\t\t// direccion\n\t\t$this->direccion->ViewValue = $this->direccion->CurrentValue;\n\t\t$this->direccion->ViewCustomAttributes = \"\";\n\n\t\t// municipio\n\t\t$this->municipio->ViewValue = $this->municipio->CurrentValue;\n\t\t$this->municipio->ViewCustomAttributes = \"\";\n\n\t\t// telefono\n\t\t$this->telefono->ViewValue = $this->telefono->CurrentValue;\n\t\t$this->telefono->ViewCustomAttributes = \"\";\n\n\t\t// cod_trabajo_original\n\t\t$this->cod_trabajo_original->ViewValue = $this->cod_trabajo_original->CurrentValue;\n\t\t$this->cod_trabajo_original->ViewCustomAttributes = \"\";\n\n\t\t// fecha_trab_dem\n\t\t$this->fecha_trab_dem->ViewValue = $this->fecha_trab_dem->CurrentValue;\n\t\t$this->fecha_trab_dem->ViewValue = ew_FormatDateTime($this->fecha_trab_dem->ViewValue, 0);\n\t\t$this->fecha_trab_dem->ViewCustomAttributes = \"\";\n\n\t\t// cod_ult_visit\n\t\t$this->cod_ult_visit->ViewValue = $this->cod_ult_visit->CurrentValue;\n\t\t$this->cod_ult_visit->ViewCustomAttributes = \"\";\n\n\t\t// res_ult_vis\n\t\t$this->res_ult_vis->ViewValue = $this->res_ult_vis->CurrentValue;\n\t\t$this->res_ult_vis->ViewCustomAttributes = \"\";\n\n\t\t// fecha_ult_visita\n\t\t$this->fecha_ult_visita->ViewValue = $this->fecha_ult_visita->CurrentValue;\n\t\t$this->fecha_ult_visita->ViewValue = ew_FormatDateTime($this->fecha_ult_visita->ViewValue, 0);\n\t\t$this->fecha_ult_visita->ViewCustomAttributes = \"\";\n\n\t\t// usu_asig_primer_trab\n\t\t$this->usu_asig_primer_trab->ViewValue = $this->usu_asig_primer_trab->CurrentValue;\n\t\t$this->usu_asig_primer_trab->ViewCustomAttributes = \"\";\n\n\t\t// fecha_prim_visit\n\t\t$this->fecha_prim_visit->ViewValue = $this->fecha_prim_visit->CurrentValue;\n\t\t$this->fecha_prim_visit->ViewValue = ew_FormatDateTime($this->fecha_prim_visit->ViewValue, 0);\n\t\t$this->fecha_prim_visit->ViewCustomAttributes = \"\";\n\n\t\t// respuesta_pv\n\t\t$this->respuesta_pv->ViewValue = $this->respuesta_pv->CurrentValue;\n\t\t$this->respuesta_pv->ViewCustomAttributes = \"\";\n\n\t\t// fecha_cap_primera_visita\n\t\t$this->fecha_cap_primera_visita->ViewValue = $this->fecha_cap_primera_visita->CurrentValue;\n\t\t$this->fecha_cap_primera_visita->ViewValue = ew_FormatDateTime($this->fecha_cap_primera_visita->ViewValue, 0);\n\t\t$this->fecha_cap_primera_visita->ViewCustomAttributes = \"\";\n\n\t\t// cod_contratista\n\t\t$this->cod_contratista->ViewValue = $this->cod_contratista->CurrentValue;\n\t\t$this->cod_contratista->ViewCustomAttributes = \"\";\n\n\t\t// nom_cont\n\t\t$this->nom_cont->ViewValue = $this->nom_cont->CurrentValue;\n\t\t$this->nom_cont->ViewCustomAttributes = \"\";\n\n\t\t// distrito\n\t\t$this->distrito->ViewValue = $this->distrito->CurrentValue;\n\t\t$this->distrito->ViewCustomAttributes = \"\";\n\n\t\t// malla\n\t\t$this->malla->ViewValue = $this->malla->CurrentValue;\n\t\t$this->malla->ViewCustomAttributes = \"\";\n\n\t\t// sector\n\t\t$this->sector->ViewValue = $this->sector->CurrentValue;\n\t\t$this->sector->ViewCustomAttributes = \"\";\n\n\t\t// descr_estado_dem\n\t\t$this->descr_estado_dem->ViewValue = $this->descr_estado_dem->CurrentValue;\n\t\t$this->descr_estado_dem->ViewCustomAttributes = \"\";\n\n\t\t// estrato\n\t\t$this->estrato->ViewValue = $this->estrato->CurrentValue;\n\t\t$this->estrato->ViewCustomAttributes = \"\";\n\n\t\t// clase_dem\n\t\t$this->clase_dem->ViewValue = $this->clase_dem->CurrentValue;\n\t\t$this->clase_dem->ViewCustomAttributes = \"\";\n\n\t\t// origen_dem\n\t\t$this->origen_dem->LinkCustomAttributes = \"\";\n\t\t$this->origen_dem->HrefValue = \"\";\n\t\t$this->origen_dem->TooltipValue = \"\";\n\n\t\t// tipo_cliente_dem\n\t\t$this->tipo_cliente_dem->LinkCustomAttributes = \"\";\n\t\t$this->tipo_cliente_dem->HrefValue = \"\";\n\t\t$this->tipo_cliente_dem->TooltipValue = \"\";\n\n\t\t// fecha_llamada\n\t\t$this->fecha_llamada->LinkCustomAttributes = \"\";\n\t\t$this->fecha_llamada->HrefValue = \"\";\n\t\t$this->fecha_llamada->TooltipValue = \"\";\n\n\t\t// cod_dem\n\t\t$this->cod_dem->LinkCustomAttributes = \"\";\n\t\t$this->cod_dem->HrefValue = \"\";\n\t\t$this->cod_dem->TooltipValue = \"\";\n\n\t\t// poliza_dem\n\t\t$this->poliza_dem->LinkCustomAttributes = \"\";\n\t\t$this->poliza_dem->HrefValue = \"\";\n\t\t$this->poliza_dem->TooltipValue = \"\";\n\n\t\t// usuario_captura\n\t\t$this->usuario_captura->LinkCustomAttributes = \"\";\n\t\t$this->usuario_captura->HrefValue = \"\";\n\t\t$this->usuario_captura->TooltipValue = \"\";\n\n\t\t// campana_demanda\n\t\t$this->campana_demanda->LinkCustomAttributes = \"\";\n\t\t$this->campana_demanda->HrefValue = \"\";\n\t\t$this->campana_demanda->TooltipValue = \"\";\n\n\t\t// chip_natural\n\t\t$this->chip_natural->LinkCustomAttributes = \"\";\n\t\t$this->chip_natural->HrefValue = \"\";\n\t\t$this->chip_natural->TooltipValue = \"\";\n\n\t\t// estado_predio\n\t\t$this->estado_predio->LinkCustomAttributes = \"\";\n\t\t$this->estado_predio->HrefValue = \"\";\n\t\t$this->estado_predio->TooltipValue = \"\";\n\n\t\t// tipo_predio\n\t\t$this->tipo_predio->LinkCustomAttributes = \"\";\n\t\t$this->tipo_predio->HrefValue = \"\";\n\t\t$this->tipo_predio->TooltipValue = \"\";\n\n\t\t// uso\n\t\t$this->uso->LinkCustomAttributes = \"\";\n\t\t$this->uso->HrefValue = \"\";\n\t\t$this->uso->TooltipValue = \"\";\n\n\t\t// mecado\n\t\t$this->mecado->LinkCustomAttributes = \"\";\n\t\t$this->mecado->HrefValue = \"\";\n\t\t$this->mecado->TooltipValue = \"\";\n\n\t\t// nombre_cliente\n\t\t$this->nombre_cliente->LinkCustomAttributes = \"\";\n\t\t$this->nombre_cliente->HrefValue = \"\";\n\t\t$this->nombre_cliente->TooltipValue = \"\";\n\n\t\t// num_doc\n\t\t$this->num_doc->LinkCustomAttributes = \"\";\n\t\t$this->num_doc->HrefValue = \"\";\n\t\t$this->num_doc->TooltipValue = \"\";\n\n\t\t// direccion\n\t\t$this->direccion->LinkCustomAttributes = \"\";\n\t\t$this->direccion->HrefValue = \"\";\n\t\t$this->direccion->TooltipValue = \"\";\n\n\t\t// municipio\n\t\t$this->municipio->LinkCustomAttributes = \"\";\n\t\t$this->municipio->HrefValue = \"\";\n\t\t$this->municipio->TooltipValue = \"\";\n\n\t\t// telefono\n\t\t$this->telefono->LinkCustomAttributes = \"\";\n\t\t$this->telefono->HrefValue = \"\";\n\t\t$this->telefono->TooltipValue = \"\";\n\n\t\t// cod_trabajo_original\n\t\t$this->cod_trabajo_original->LinkCustomAttributes = \"\";\n\t\t$this->cod_trabajo_original->HrefValue = \"\";\n\t\t$this->cod_trabajo_original->TooltipValue = \"\";\n\n\t\t// fecha_trab_dem\n\t\t$this->fecha_trab_dem->LinkCustomAttributes = \"\";\n\t\t$this->fecha_trab_dem->HrefValue = \"\";\n\t\t$this->fecha_trab_dem->TooltipValue = \"\";\n\n\t\t// cod_ult_visit\n\t\t$this->cod_ult_visit->LinkCustomAttributes = \"\";\n\t\t$this->cod_ult_visit->HrefValue = \"\";\n\t\t$this->cod_ult_visit->TooltipValue = \"\";\n\n\t\t// res_ult_vis\n\t\t$this->res_ult_vis->LinkCustomAttributes = \"\";\n\t\t$this->res_ult_vis->HrefValue = \"\";\n\t\t$this->res_ult_vis->TooltipValue = \"\";\n\n\t\t// fecha_ult_visita\n\t\t$this->fecha_ult_visita->LinkCustomAttributes = \"\";\n\t\t$this->fecha_ult_visita->HrefValue = \"\";\n\t\t$this->fecha_ult_visita->TooltipValue = \"\";\n\n\t\t// usu_asig_primer_trab\n\t\t$this->usu_asig_primer_trab->LinkCustomAttributes = \"\";\n\t\t$this->usu_asig_primer_trab->HrefValue = \"\";\n\t\t$this->usu_asig_primer_trab->TooltipValue = \"\";\n\n\t\t// fecha_prim_visit\n\t\t$this->fecha_prim_visit->LinkCustomAttributes = \"\";\n\t\t$this->fecha_prim_visit->HrefValue = \"\";\n\t\t$this->fecha_prim_visit->TooltipValue = \"\";\n\n\t\t// respuesta_pv\n\t\t$this->respuesta_pv->LinkCustomAttributes = \"\";\n\t\t$this->respuesta_pv->HrefValue = \"\";\n\t\t$this->respuesta_pv->TooltipValue = \"\";\n\n\t\t// fecha_cap_primera_visita\n\t\t$this->fecha_cap_primera_visita->LinkCustomAttributes = \"\";\n\t\t$this->fecha_cap_primera_visita->HrefValue = \"\";\n\t\t$this->fecha_cap_primera_visita->TooltipValue = \"\";\n\n\t\t// cod_contratista\n\t\t$this->cod_contratista->LinkCustomAttributes = \"\";\n\t\t$this->cod_contratista->HrefValue = \"\";\n\t\t$this->cod_contratista->TooltipValue = \"\";\n\n\t\t// nom_cont\n\t\t$this->nom_cont->LinkCustomAttributes = \"\";\n\t\t$this->nom_cont->HrefValue = \"\";\n\t\t$this->nom_cont->TooltipValue = \"\";\n\n\t\t// distrito\n\t\t$this->distrito->LinkCustomAttributes = \"\";\n\t\t$this->distrito->HrefValue = \"\";\n\t\t$this->distrito->TooltipValue = \"\";\n\n\t\t// malla\n\t\t$this->malla->LinkCustomAttributes = \"\";\n\t\t$this->malla->HrefValue = \"\";\n\t\t$this->malla->TooltipValue = \"\";\n\n\t\t// sector\n\t\t$this->sector->LinkCustomAttributes = \"\";\n\t\t$this->sector->HrefValue = \"\";\n\t\t$this->sector->TooltipValue = \"\";\n\n\t\t// descr_estado_dem\n\t\t$this->descr_estado_dem->LinkCustomAttributes = \"\";\n\t\t$this->descr_estado_dem->HrefValue = \"\";\n\t\t$this->descr_estado_dem->TooltipValue = \"\";\n\n\t\t// estrato\n\t\t$this->estrato->LinkCustomAttributes = \"\";\n\t\t$this->estrato->HrefValue = \"\";\n\t\t$this->estrato->TooltipValue = \"\";\n\n\t\t// clase_dem\n\t\t$this->clase_dem->LinkCustomAttributes = \"\";\n\t\t$this->clase_dem->HrefValue = \"\";\n\t\t$this->clase_dem->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function display_rows() {\n \n //Get the records registered in the prepare_items method\n $records = $this->items;\n \n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n \n //Loop for each record\n if(!empty($records)){foreach($records as $rec){\n \n //Open the line\n echo \"<tr id=\\\"record_\".$rec->paramID.\"\\\">\\n\";\n foreach ( $columns as $column_name => $column_display_name ) {\n \n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n \n // Create output in cell\n switch ( $column_name ) {\n case \"col_paramID\": echo \"<td \".$attributes.\">\".stripslashes($rec->paramID).\"</td>\\n\"; break;\n case \"col_paramName\": echo \"<td \".$attributes.\">\".$this->add_actions($rec).\"</td>\\n\"; break;\n case \"col_EN\": echo \"<td \".$attributes.\">\".$this->show_desc($rec,'EN').\"</td>\\n\"; break;\n case \"col_DE\": echo \"<td \".$attributes.\">\".$this->show_desc($rec,'DE').\"</td>\\n\"; break;\n case \"col_valformat\": echo \"<td \".$attributes.\">\".stripslashes($rec->valformat).\"</td>\\n\"; break;\n case \"col_vallength\": echo \"<td \".$attributes.\">\".$rec->vallength.\"</td>\\n\"; break;\n case \"col_valrange\": echo \"<td \".$attributes.\">\".($rec->valmin/10.).\" to \".($rec->valmax/10.).\"</td>\\n\"; break;\n case \"col_decimals\": echo \"<td \".$attributes.\">\".$rec->decimals.\"</td>\\n\"; break;\n case \"col_unit\": echo \"<td \".$attributes.\">\".$rec->unit.\"</td>\\n\"; break;\n }\n }\n \n //Close the line\n echo \"</tr>\\n\";\n }}\n }", "function RenderListRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t// Common render codes\n\t\t// unid\n\t\t// u_id\n\t\t// acl_id\n\t\t// Name\n\t\t// Basics\n\t\t// HP\n\t\t// MP\n\t\t// AD\n\t\t// AP\n\t\t// Defense\n\t\t// Hit\n\t\t// Dodge\n\t\t// Crit\n\t\t// AbsorbHP\n\t\t// ADPTV\n\t\t// ADPTR\n\t\t// APPTR\n\t\t// APPTV\n\t\t// ImmuneDamage\n\t\t// Intro\n\t\t// ExclusiveSkills\n\t\t// TransferDemand\n\t\t// TransferLevel\n\t\t// FormerOccupation\n\t\t// Belong\n\t\t// AttackEffect\n\t\t// AttackTips\n\t\t// MagicResistance\n\t\t// IgnoreShield\n\t\t// DATETIME\n\t\t// unid\n\n\t\t$this->unid->ViewValue = $this->unid->CurrentValue;\n\t\t$this->unid->ViewCustomAttributes = \"\";\n\n\t\t// u_id\n\t\t$this->u_id->ViewValue = $this->u_id->CurrentValue;\n\t\t$this->u_id->ViewCustomAttributes = \"\";\n\n\t\t// acl_id\n\t\t$this->acl_id->ViewValue = $this->acl_id->CurrentValue;\n\t\t$this->acl_id->ViewCustomAttributes = \"\";\n\n\t\t// Name\n\t\t$this->Name->ViewValue = $this->Name->CurrentValue;\n\t\t$this->Name->ViewCustomAttributes = \"\";\n\n\t\t// Basics\n\t\t$this->Basics->ViewValue = $this->Basics->CurrentValue;\n\t\t$this->Basics->ViewCustomAttributes = \"\";\n\n\t\t// HP\n\t\t$this->HP->ViewValue = $this->HP->CurrentValue;\n\t\t$this->HP->ViewCustomAttributes = \"\";\n\n\t\t// MP\n\t\t$this->MP->ViewValue = $this->MP->CurrentValue;\n\t\t$this->MP->ViewCustomAttributes = \"\";\n\n\t\t// AD\n\t\t$this->AD->ViewValue = $this->AD->CurrentValue;\n\t\t$this->AD->ViewCustomAttributes = \"\";\n\n\t\t// AP\n\t\t$this->AP->ViewValue = $this->AP->CurrentValue;\n\t\t$this->AP->ViewCustomAttributes = \"\";\n\n\t\t// Defense\n\t\t$this->Defense->ViewValue = $this->Defense->CurrentValue;\n\t\t$this->Defense->ViewCustomAttributes = \"\";\n\n\t\t// Hit\n\t\t$this->Hit->ViewValue = $this->Hit->CurrentValue;\n\t\t$this->Hit->ViewCustomAttributes = \"\";\n\n\t\t// Dodge\n\t\t$this->Dodge->ViewValue = $this->Dodge->CurrentValue;\n\t\t$this->Dodge->ViewCustomAttributes = \"\";\n\n\t\t// Crit\n\t\t$this->Crit->ViewValue = $this->Crit->CurrentValue;\n\t\t$this->Crit->ViewCustomAttributes = \"\";\n\n\t\t// AbsorbHP\n\t\t$this->AbsorbHP->ViewValue = $this->AbsorbHP->CurrentValue;\n\t\t$this->AbsorbHP->ViewCustomAttributes = \"\";\n\n\t\t// ADPTV\n\t\t$this->ADPTV->ViewValue = $this->ADPTV->CurrentValue;\n\t\t$this->ADPTV->ViewCustomAttributes = \"\";\n\n\t\t// ADPTR\n\t\t$this->ADPTR->ViewValue = $this->ADPTR->CurrentValue;\n\t\t$this->ADPTR->ViewCustomAttributes = \"\";\n\n\t\t// APPTR\n\t\t$this->APPTR->ViewValue = $this->APPTR->CurrentValue;\n\t\t$this->APPTR->ViewCustomAttributes = \"\";\n\n\t\t// APPTV\n\t\t$this->APPTV->ViewValue = $this->APPTV->CurrentValue;\n\t\t$this->APPTV->ViewCustomAttributes = \"\";\n\n\t\t// ImmuneDamage\n\t\t$this->ImmuneDamage->ViewValue = $this->ImmuneDamage->CurrentValue;\n\t\t$this->ImmuneDamage->ViewCustomAttributes = \"\";\n\n\t\t// Intro\n\t\t$this->Intro->ViewValue = $this->Intro->CurrentValue;\n\t\t$this->Intro->ViewCustomAttributes = \"\";\n\n\t\t// ExclusiveSkills\n\t\t$this->ExclusiveSkills->ViewValue = $this->ExclusiveSkills->CurrentValue;\n\t\t$this->ExclusiveSkills->ViewCustomAttributes = \"\";\n\n\t\t// TransferDemand\n\t\t$this->TransferDemand->ViewValue = $this->TransferDemand->CurrentValue;\n\t\t$this->TransferDemand->ViewCustomAttributes = \"\";\n\n\t\t// TransferLevel\n\t\t$this->TransferLevel->ViewValue = $this->TransferLevel->CurrentValue;\n\t\t$this->TransferLevel->ViewCustomAttributes = \"\";\n\n\t\t// FormerOccupation\n\t\t$this->FormerOccupation->ViewValue = $this->FormerOccupation->CurrentValue;\n\t\t$this->FormerOccupation->ViewCustomAttributes = \"\";\n\n\t\t// Belong\n\t\t$this->Belong->ViewValue = $this->Belong->CurrentValue;\n\t\t$this->Belong->ViewCustomAttributes = \"\";\n\n\t\t// AttackEffect\n\t\t$this->AttackEffect->ViewValue = $this->AttackEffect->CurrentValue;\n\t\t$this->AttackEffect->ViewCustomAttributes = \"\";\n\n\t\t// AttackTips\n\t\t$this->AttackTips->ViewValue = $this->AttackTips->CurrentValue;\n\t\t$this->AttackTips->ViewCustomAttributes = \"\";\n\n\t\t// MagicResistance\n\t\t$this->MagicResistance->ViewValue = $this->MagicResistance->CurrentValue;\n\t\t$this->MagicResistance->ViewCustomAttributes = \"\";\n\n\t\t// IgnoreShield\n\t\t$this->IgnoreShield->ViewValue = $this->IgnoreShield->CurrentValue;\n\t\t$this->IgnoreShield->ViewCustomAttributes = \"\";\n\n\t\t// DATETIME\n\t\t$this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;\n\t\t$this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 0);\n\t\t$this->DATETIME->ViewCustomAttributes = \"\";\n\n\t\t// unid\n\t\t$this->unid->LinkCustomAttributes = \"\";\n\t\t$this->unid->HrefValue = \"\";\n\t\t$this->unid->TooltipValue = \"\";\n\n\t\t// u_id\n\t\t$this->u_id->LinkCustomAttributes = \"\";\n\t\t$this->u_id->HrefValue = \"\";\n\t\t$this->u_id->TooltipValue = \"\";\n\n\t\t// acl_id\n\t\t$this->acl_id->LinkCustomAttributes = \"\";\n\t\t$this->acl_id->HrefValue = \"\";\n\t\t$this->acl_id->TooltipValue = \"\";\n\n\t\t// Name\n\t\t$this->Name->LinkCustomAttributes = \"\";\n\t\t$this->Name->HrefValue = \"\";\n\t\t$this->Name->TooltipValue = \"\";\n\n\t\t// Basics\n\t\t$this->Basics->LinkCustomAttributes = \"\";\n\t\t$this->Basics->HrefValue = \"\";\n\t\t$this->Basics->TooltipValue = \"\";\n\n\t\t// HP\n\t\t$this->HP->LinkCustomAttributes = \"\";\n\t\t$this->HP->HrefValue = \"\";\n\t\t$this->HP->TooltipValue = \"\";\n\n\t\t// MP\n\t\t$this->MP->LinkCustomAttributes = \"\";\n\t\t$this->MP->HrefValue = \"\";\n\t\t$this->MP->TooltipValue = \"\";\n\n\t\t// AD\n\t\t$this->AD->LinkCustomAttributes = \"\";\n\t\t$this->AD->HrefValue = \"\";\n\t\t$this->AD->TooltipValue = \"\";\n\n\t\t// AP\n\t\t$this->AP->LinkCustomAttributes = \"\";\n\t\t$this->AP->HrefValue = \"\";\n\t\t$this->AP->TooltipValue = \"\";\n\n\t\t// Defense\n\t\t$this->Defense->LinkCustomAttributes = \"\";\n\t\t$this->Defense->HrefValue = \"\";\n\t\t$this->Defense->TooltipValue = \"\";\n\n\t\t// Hit\n\t\t$this->Hit->LinkCustomAttributes = \"\";\n\t\t$this->Hit->HrefValue = \"\";\n\t\t$this->Hit->TooltipValue = \"\";\n\n\t\t// Dodge\n\t\t$this->Dodge->LinkCustomAttributes = \"\";\n\t\t$this->Dodge->HrefValue = \"\";\n\t\t$this->Dodge->TooltipValue = \"\";\n\n\t\t// Crit\n\t\t$this->Crit->LinkCustomAttributes = \"\";\n\t\t$this->Crit->HrefValue = \"\";\n\t\t$this->Crit->TooltipValue = \"\";\n\n\t\t// AbsorbHP\n\t\t$this->AbsorbHP->LinkCustomAttributes = \"\";\n\t\t$this->AbsorbHP->HrefValue = \"\";\n\t\t$this->AbsorbHP->TooltipValue = \"\";\n\n\t\t// ADPTV\n\t\t$this->ADPTV->LinkCustomAttributes = \"\";\n\t\t$this->ADPTV->HrefValue = \"\";\n\t\t$this->ADPTV->TooltipValue = \"\";\n\n\t\t// ADPTR\n\t\t$this->ADPTR->LinkCustomAttributes = \"\";\n\t\t$this->ADPTR->HrefValue = \"\";\n\t\t$this->ADPTR->TooltipValue = \"\";\n\n\t\t// APPTR\n\t\t$this->APPTR->LinkCustomAttributes = \"\";\n\t\t$this->APPTR->HrefValue = \"\";\n\t\t$this->APPTR->TooltipValue = \"\";\n\n\t\t// APPTV\n\t\t$this->APPTV->LinkCustomAttributes = \"\";\n\t\t$this->APPTV->HrefValue = \"\";\n\t\t$this->APPTV->TooltipValue = \"\";\n\n\t\t// ImmuneDamage\n\t\t$this->ImmuneDamage->LinkCustomAttributes = \"\";\n\t\t$this->ImmuneDamage->HrefValue = \"\";\n\t\t$this->ImmuneDamage->TooltipValue = \"\";\n\n\t\t// Intro\n\t\t$this->Intro->LinkCustomAttributes = \"\";\n\t\t$this->Intro->HrefValue = \"\";\n\t\t$this->Intro->TooltipValue = \"\";\n\n\t\t// ExclusiveSkills\n\t\t$this->ExclusiveSkills->LinkCustomAttributes = \"\";\n\t\t$this->ExclusiveSkills->HrefValue = \"\";\n\t\t$this->ExclusiveSkills->TooltipValue = \"\";\n\n\t\t// TransferDemand\n\t\t$this->TransferDemand->LinkCustomAttributes = \"\";\n\t\t$this->TransferDemand->HrefValue = \"\";\n\t\t$this->TransferDemand->TooltipValue = \"\";\n\n\t\t// TransferLevel\n\t\t$this->TransferLevel->LinkCustomAttributes = \"\";\n\t\t$this->TransferLevel->HrefValue = \"\";\n\t\t$this->TransferLevel->TooltipValue = \"\";\n\n\t\t// FormerOccupation\n\t\t$this->FormerOccupation->LinkCustomAttributes = \"\";\n\t\t$this->FormerOccupation->HrefValue = \"\";\n\t\t$this->FormerOccupation->TooltipValue = \"\";\n\n\t\t// Belong\n\t\t$this->Belong->LinkCustomAttributes = \"\";\n\t\t$this->Belong->HrefValue = \"\";\n\t\t$this->Belong->TooltipValue = \"\";\n\n\t\t// AttackEffect\n\t\t$this->AttackEffect->LinkCustomAttributes = \"\";\n\t\t$this->AttackEffect->HrefValue = \"\";\n\t\t$this->AttackEffect->TooltipValue = \"\";\n\n\t\t// AttackTips\n\t\t$this->AttackTips->LinkCustomAttributes = \"\";\n\t\t$this->AttackTips->HrefValue = \"\";\n\t\t$this->AttackTips->TooltipValue = \"\";\n\n\t\t// MagicResistance\n\t\t$this->MagicResistance->LinkCustomAttributes = \"\";\n\t\t$this->MagicResistance->HrefValue = \"\";\n\t\t$this->MagicResistance->TooltipValue = \"\";\n\n\t\t// IgnoreShield\n\t\t$this->IgnoreShield->LinkCustomAttributes = \"\";\n\t\t$this->IgnoreShield->HrefValue = \"\";\n\t\t$this->IgnoreShield->TooltipValue = \"\";\n\n\t\t// DATETIME\n\t\t$this->DATETIME->LinkCustomAttributes = \"\";\n\t\t$this->DATETIME->HrefValue = \"\";\n\t\t$this->DATETIME->TooltipValue = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\n\t\t// Save data for Custom Template\n\t\t$this->Rows[] = $this->CustomTemplateFieldValues();\n\t}", "abstract function render_row( $form_field, $form_data, $errors );", "function RenderEditRow() {\n\t\tglobal $Security, $gsLanguage, $Language;\n\n\t\t// Call Row Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// id\n\t\t$this->id->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->id->EditCustomAttributes = \"\";\n\t\t$this->id->EditValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// NOMR\n\t\t$this->NOMR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOMR->EditCustomAttributes = \"\";\n\t\t$this->NOMR->EditValue = $this->NOMR->CurrentValue;\n\t\t$this->NOMR->PlaceHolder = ew_RemoveHtml($this->NOMR->FldCaption());\n\n\t\t// TITLE\n\t\t$this->TITLE->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TITLE->EditCustomAttributes = \"\";\n\n\t\t// NAMA\n\t\t$this->NAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAMA->EditCustomAttributes = \"\";\n\t\t$this->NAMA->EditValue = $this->NAMA->CurrentValue;\n\t\t$this->NAMA->PlaceHolder = ew_RemoveHtml($this->NAMA->FldCaption());\n\n\t\t// IBUKANDUNG\n\t\t$this->IBUKANDUNG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IBUKANDUNG->EditCustomAttributes = \"\";\n\t\t$this->IBUKANDUNG->EditValue = $this->IBUKANDUNG->CurrentValue;\n\t\t$this->IBUKANDUNG->PlaceHolder = ew_RemoveHtml($this->IBUKANDUNG->FldCaption());\n\n\t\t// TEMPAT\n\t\t$this->TEMPAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TEMPAT->EditCustomAttributes = \"\";\n\t\t$this->TEMPAT->EditValue = $this->TEMPAT->CurrentValue;\n\t\t$this->TEMPAT->PlaceHolder = ew_RemoveHtml($this->TEMPAT->FldCaption());\n\n\t\t// TGLLAHIR\n\t\t$this->TGLLAHIR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TGLLAHIR->EditCustomAttributes = \"\";\n\t\t$this->TGLLAHIR->EditValue = ew_FormatDateTime($this->TGLLAHIR->CurrentValue, 7);\n\t\t$this->TGLLAHIR->PlaceHolder = ew_RemoveHtml($this->TGLLAHIR->FldCaption());\n\n\t\t// JENISKELAMIN\n\t\t$this->JENISKELAMIN->EditCustomAttributes = \"\";\n\n\t\t// ALAMAT\n\t\t$this->ALAMAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALAMAT->EditCustomAttributes = \"\";\n\t\t$this->ALAMAT->EditValue = $this->ALAMAT->CurrentValue;\n\t\t$this->ALAMAT->PlaceHolder = ew_RemoveHtml($this->ALAMAT->FldCaption());\n\n\t\t// KDPROVINSI\n\t\t$this->KDPROVINSI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDPROVINSI->EditCustomAttributes = \"\";\n\n\t\t// KOTA\n\t\t$this->KOTA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KOTA->EditCustomAttributes = \"\";\n\n\t\t// KDKECAMATAN\n\t\t$this->KDKECAMATAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDKECAMATAN->EditCustomAttributes = \"\";\n\n\t\t// KELURAHAN\n\t\t$this->KELURAHAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KELURAHAN->EditCustomAttributes = \"\";\n\n\t\t// NOTELP\n\t\t$this->NOTELP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOTELP->EditCustomAttributes = \"\";\n\t\t$this->NOTELP->EditValue = $this->NOTELP->CurrentValue;\n\t\t$this->NOTELP->PlaceHolder = ew_RemoveHtml($this->NOTELP->FldCaption());\n\n\t\t// NOKTP\n\t\t$this->NOKTP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOKTP->EditCustomAttributes = \"\";\n\t\t$this->NOKTP->EditValue = $this->NOKTP->CurrentValue;\n\t\t$this->NOKTP->PlaceHolder = ew_RemoveHtml($this->NOKTP->FldCaption());\n\n\t\t// SUAMI_ORTU\n\t\t$this->SUAMI_ORTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SUAMI_ORTU->EditCustomAttributes = \"\";\n\t\t$this->SUAMI_ORTU->EditValue = $this->SUAMI_ORTU->CurrentValue;\n\t\t$this->SUAMI_ORTU->PlaceHolder = ew_RemoveHtml($this->SUAMI_ORTU->FldCaption());\n\n\t\t// PEKERJAAN\n\t\t$this->PEKERJAAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PEKERJAAN->EditCustomAttributes = \"\";\n\t\t$this->PEKERJAAN->EditValue = $this->PEKERJAAN->CurrentValue;\n\t\t$this->PEKERJAAN->PlaceHolder = ew_RemoveHtml($this->PEKERJAAN->FldCaption());\n\n\t\t// STATUS\n\t\t$this->STATUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->STATUS->EditCustomAttributes = \"\";\n\n\t\t// AGAMA\n\t\t$this->AGAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->AGAMA->EditCustomAttributes = \"\";\n\n\t\t// PENDIDIKAN\n\t\t$this->PENDIDIKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENDIDIKAN->EditCustomAttributes = \"\";\n\n\t\t// KDCARABAYAR\n\t\t$this->KDCARABAYAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KDCARABAYAR->EditCustomAttributes = \"\";\n\n\t\t// NIP\n\t\t$this->NIP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NIP->EditCustomAttributes = \"\";\n\t\t$this->NIP->EditValue = $this->NIP->CurrentValue;\n\t\t$this->NIP->PlaceHolder = ew_RemoveHtml($this->NIP->FldCaption());\n\n\t\t// TGLDAFTAR\n\t\t$this->TGLDAFTAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TGLDAFTAR->EditCustomAttributes = \"\";\n\t\t$this->TGLDAFTAR->EditValue = ew_FormatDateTime($this->TGLDAFTAR->CurrentValue, 7);\n\t\t$this->TGLDAFTAR->PlaceHolder = ew_RemoveHtml($this->TGLDAFTAR->FldCaption());\n\n\t\t// ALAMAT_KTP\n\t\t$this->ALAMAT_KTP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALAMAT_KTP->EditCustomAttributes = \"\";\n\t\t$this->ALAMAT_KTP->EditValue = $this->ALAMAT_KTP->CurrentValue;\n\t\t$this->ALAMAT_KTP->PlaceHolder = ew_RemoveHtml($this->ALAMAT_KTP->FldCaption());\n\n\t\t// PARENT_NOMR\n\t\t$this->PARENT_NOMR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PARENT_NOMR->EditCustomAttributes = \"\";\n\t\t$this->PARENT_NOMR->EditValue = $this->PARENT_NOMR->CurrentValue;\n\t\t$this->PARENT_NOMR->PlaceHolder = ew_RemoveHtml($this->PARENT_NOMR->FldCaption());\n\n\t\t// NAMA_OBAT\n\t\t$this->NAMA_OBAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAMA_OBAT->EditCustomAttributes = \"\";\n\t\t$this->NAMA_OBAT->EditValue = $this->NAMA_OBAT->CurrentValue;\n\t\t$this->NAMA_OBAT->PlaceHolder = ew_RemoveHtml($this->NAMA_OBAT->FldCaption());\n\n\t\t// DOSIS\n\t\t$this->DOSIS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DOSIS->EditCustomAttributes = \"\";\n\t\t$this->DOSIS->EditValue = $this->DOSIS->CurrentValue;\n\t\t$this->DOSIS->PlaceHolder = ew_RemoveHtml($this->DOSIS->FldCaption());\n\n\t\t// CARA_PEMBERIAN\n\t\t$this->CARA_PEMBERIAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->CARA_PEMBERIAN->EditCustomAttributes = \"\";\n\t\t$this->CARA_PEMBERIAN->EditValue = $this->CARA_PEMBERIAN->CurrentValue;\n\t\t$this->CARA_PEMBERIAN->PlaceHolder = ew_RemoveHtml($this->CARA_PEMBERIAN->FldCaption());\n\n\t\t// FREKUENSI\n\t\t$this->FREKUENSI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FREKUENSI->EditCustomAttributes = \"\";\n\t\t$this->FREKUENSI->EditValue = $this->FREKUENSI->CurrentValue;\n\t\t$this->FREKUENSI->PlaceHolder = ew_RemoveHtml($this->FREKUENSI->FldCaption());\n\n\t\t// WAKTU_TGL\n\t\t$this->WAKTU_TGL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->WAKTU_TGL->EditCustomAttributes = \"\";\n\t\t$this->WAKTU_TGL->EditValue = $this->WAKTU_TGL->CurrentValue;\n\t\t$this->WAKTU_TGL->PlaceHolder = ew_RemoveHtml($this->WAKTU_TGL->FldCaption());\n\n\t\t// LAMA_WAKTU\n\t\t$this->LAMA_WAKTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LAMA_WAKTU->EditCustomAttributes = \"\";\n\t\t$this->LAMA_WAKTU->EditValue = $this->LAMA_WAKTU->CurrentValue;\n\t\t$this->LAMA_WAKTU->PlaceHolder = ew_RemoveHtml($this->LAMA_WAKTU->FldCaption());\n\n\t\t// ALERGI_OBAT\n\t\t$this->ALERGI_OBAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALERGI_OBAT->EditCustomAttributes = \"\";\n\t\t$this->ALERGI_OBAT->EditValue = $this->ALERGI_OBAT->CurrentValue;\n\t\t$this->ALERGI_OBAT->PlaceHolder = ew_RemoveHtml($this->ALERGI_OBAT->FldCaption());\n\n\t\t// REAKSI_ALERGI\n\t\t$this->REAKSI_ALERGI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->REAKSI_ALERGI->EditCustomAttributes = \"\";\n\t\t$this->REAKSI_ALERGI->EditValue = $this->REAKSI_ALERGI->CurrentValue;\n\t\t$this->REAKSI_ALERGI->PlaceHolder = ew_RemoveHtml($this->REAKSI_ALERGI->FldCaption());\n\n\t\t// RIWAYAT_KES\n\t\t$this->RIWAYAT_KES->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->RIWAYAT_KES->EditCustomAttributes = \"\";\n\t\t$this->RIWAYAT_KES->EditValue = $this->RIWAYAT_KES->CurrentValue;\n\t\t$this->RIWAYAT_KES->PlaceHolder = ew_RemoveHtml($this->RIWAYAT_KES->FldCaption());\n\n\t\t// BB_LAHIR\n\t\t$this->BB_LAHIR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BB_LAHIR->EditCustomAttributes = \"\";\n\t\t$this->BB_LAHIR->EditValue = $this->BB_LAHIR->CurrentValue;\n\t\t$this->BB_LAHIR->PlaceHolder = ew_RemoveHtml($this->BB_LAHIR->FldCaption());\n\n\t\t// BB_SEKARANG\n\t\t$this->BB_SEKARANG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BB_SEKARANG->EditCustomAttributes = \"\";\n\t\t$this->BB_SEKARANG->EditValue = $this->BB_SEKARANG->CurrentValue;\n\t\t$this->BB_SEKARANG->PlaceHolder = ew_RemoveHtml($this->BB_SEKARANG->FldCaption());\n\n\t\t// FISIK_FONTANEL\n\t\t$this->FISIK_FONTANEL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FISIK_FONTANEL->EditCustomAttributes = \"\";\n\t\t$this->FISIK_FONTANEL->EditValue = $this->FISIK_FONTANEL->CurrentValue;\n\t\t$this->FISIK_FONTANEL->PlaceHolder = ew_RemoveHtml($this->FISIK_FONTANEL->FldCaption());\n\n\t\t// FISIK_REFLEKS\n\t\t$this->FISIK_REFLEKS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FISIK_REFLEKS->EditCustomAttributes = \"\";\n\t\t$this->FISIK_REFLEKS->EditValue = $this->FISIK_REFLEKS->CurrentValue;\n\t\t$this->FISIK_REFLEKS->PlaceHolder = ew_RemoveHtml($this->FISIK_REFLEKS->FldCaption());\n\n\t\t// FISIK_SENSASI\n\t\t$this->FISIK_SENSASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FISIK_SENSASI->EditCustomAttributes = \"\";\n\t\t$this->FISIK_SENSASI->EditValue = $this->FISIK_SENSASI->CurrentValue;\n\t\t$this->FISIK_SENSASI->PlaceHolder = ew_RemoveHtml($this->FISIK_SENSASI->FldCaption());\n\n\t\t// MOTORIK_KASAR\n\t\t$this->MOTORIK_KASAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MOTORIK_KASAR->EditCustomAttributes = \"\";\n\t\t$this->MOTORIK_KASAR->EditValue = $this->MOTORIK_KASAR->CurrentValue;\n\t\t$this->MOTORIK_KASAR->PlaceHolder = ew_RemoveHtml($this->MOTORIK_KASAR->FldCaption());\n\n\t\t// MOTORIK_HALUS\n\t\t$this->MOTORIK_HALUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MOTORIK_HALUS->EditCustomAttributes = \"\";\n\t\t$this->MOTORIK_HALUS->EditValue = $this->MOTORIK_HALUS->CurrentValue;\n\t\t$this->MOTORIK_HALUS->PlaceHolder = ew_RemoveHtml($this->MOTORIK_HALUS->FldCaption());\n\n\t\t// MAMPU_BICARA\n\t\t$this->MAMPU_BICARA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MAMPU_BICARA->EditCustomAttributes = \"\";\n\t\t$this->MAMPU_BICARA->EditValue = $this->MAMPU_BICARA->CurrentValue;\n\t\t$this->MAMPU_BICARA->PlaceHolder = ew_RemoveHtml($this->MAMPU_BICARA->FldCaption());\n\n\t\t// MAMPU_SOSIALISASI\n\t\t$this->MAMPU_SOSIALISASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MAMPU_SOSIALISASI->EditCustomAttributes = \"\";\n\t\t$this->MAMPU_SOSIALISASI->EditValue = $this->MAMPU_SOSIALISASI->CurrentValue;\n\t\t$this->MAMPU_SOSIALISASI->PlaceHolder = ew_RemoveHtml($this->MAMPU_SOSIALISASI->FldCaption());\n\n\t\t// BCG\n\t\t$this->BCG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BCG->EditCustomAttributes = \"\";\n\t\t$this->BCG->EditValue = $this->BCG->CurrentValue;\n\t\t$this->BCG->PlaceHolder = ew_RemoveHtml($this->BCG->FldCaption());\n\n\t\t// POLIO\n\t\t$this->POLIO->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->POLIO->EditCustomAttributes = \"\";\n\t\t$this->POLIO->EditValue = $this->POLIO->CurrentValue;\n\t\t$this->POLIO->PlaceHolder = ew_RemoveHtml($this->POLIO->FldCaption());\n\n\t\t// DPT\n\t\t$this->DPT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DPT->EditCustomAttributes = \"\";\n\t\t$this->DPT->EditValue = $this->DPT->CurrentValue;\n\t\t$this->DPT->PlaceHolder = ew_RemoveHtml($this->DPT->FldCaption());\n\n\t\t// CAMPAK\n\t\t$this->CAMPAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->CAMPAK->EditCustomAttributes = \"\";\n\t\t$this->CAMPAK->EditValue = $this->CAMPAK->CurrentValue;\n\t\t$this->CAMPAK->PlaceHolder = ew_RemoveHtml($this->CAMPAK->FldCaption());\n\n\t\t// HEPATITIS_B\n\t\t$this->HEPATITIS_B->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->HEPATITIS_B->EditCustomAttributes = \"\";\n\t\t$this->HEPATITIS_B->EditValue = $this->HEPATITIS_B->CurrentValue;\n\t\t$this->HEPATITIS_B->PlaceHolder = ew_RemoveHtml($this->HEPATITIS_B->FldCaption());\n\n\t\t// TD\n\t\t$this->TD->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TD->EditCustomAttributes = \"\";\n\t\t$this->TD->EditValue = $this->TD->CurrentValue;\n\t\t$this->TD->PlaceHolder = ew_RemoveHtml($this->TD->FldCaption());\n\n\t\t// SUHU\n\t\t$this->SUHU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SUHU->EditCustomAttributes = \"\";\n\t\t$this->SUHU->EditValue = $this->SUHU->CurrentValue;\n\t\t$this->SUHU->PlaceHolder = ew_RemoveHtml($this->SUHU->FldCaption());\n\n\t\t// RR\n\t\t$this->RR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->RR->EditCustomAttributes = \"\";\n\t\t$this->RR->EditValue = $this->RR->CurrentValue;\n\t\t$this->RR->PlaceHolder = ew_RemoveHtml($this->RR->FldCaption());\n\n\t\t// NADI\n\t\t$this->NADI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NADI->EditCustomAttributes = \"\";\n\t\t$this->NADI->EditValue = $this->NADI->CurrentValue;\n\t\t$this->NADI->PlaceHolder = ew_RemoveHtml($this->NADI->FldCaption());\n\n\t\t// BB\n\t\t$this->BB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BB->EditCustomAttributes = \"\";\n\t\t$this->BB->EditValue = $this->BB->CurrentValue;\n\t\t$this->BB->PlaceHolder = ew_RemoveHtml($this->BB->FldCaption());\n\n\t\t// TB\n\t\t$this->TB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TB->EditCustomAttributes = \"\";\n\t\t$this->TB->EditValue = $this->TB->CurrentValue;\n\t\t$this->TB->PlaceHolder = ew_RemoveHtml($this->TB->FldCaption());\n\n\t\t// EYE\n\t\t$this->EYE->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->EYE->EditCustomAttributes = \"\";\n\t\t$this->EYE->EditValue = $this->EYE->CurrentValue;\n\t\t$this->EYE->PlaceHolder = ew_RemoveHtml($this->EYE->FldCaption());\n\n\t\t// MOTORIK\n\t\t$this->MOTORIK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MOTORIK->EditCustomAttributes = \"\";\n\t\t$this->MOTORIK->EditValue = $this->MOTORIK->CurrentValue;\n\t\t$this->MOTORIK->PlaceHolder = ew_RemoveHtml($this->MOTORIK->FldCaption());\n\n\t\t// VERBAL\n\t\t$this->VERBAL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->VERBAL->EditCustomAttributes = \"\";\n\t\t$this->VERBAL->EditValue = $this->VERBAL->CurrentValue;\n\t\t$this->VERBAL->PlaceHolder = ew_RemoveHtml($this->VERBAL->FldCaption());\n\n\t\t// TOTAL_GCS\n\t\t$this->TOTAL_GCS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TOTAL_GCS->EditCustomAttributes = \"\";\n\t\t$this->TOTAL_GCS->EditValue = $this->TOTAL_GCS->CurrentValue;\n\t\t$this->TOTAL_GCS->PlaceHolder = ew_RemoveHtml($this->TOTAL_GCS->FldCaption());\n\n\t\t// REAKSI_PUPIL\n\t\t$this->REAKSI_PUPIL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->REAKSI_PUPIL->EditCustomAttributes = \"\";\n\t\t$this->REAKSI_PUPIL->EditValue = $this->REAKSI_PUPIL->CurrentValue;\n\t\t$this->REAKSI_PUPIL->PlaceHolder = ew_RemoveHtml($this->REAKSI_PUPIL->FldCaption());\n\n\t\t// KESADARAN\n\t\t$this->KESADARAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KESADARAN->EditCustomAttributes = \"\";\n\t\t$this->KESADARAN->EditValue = $this->KESADARAN->CurrentValue;\n\t\t$this->KESADARAN->PlaceHolder = ew_RemoveHtml($this->KESADARAN->FldCaption());\n\n\t\t// KEPALA\n\t\t$this->KEPALA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEPALA->EditCustomAttributes = \"\";\n\t\t$this->KEPALA->EditValue = $this->KEPALA->CurrentValue;\n\t\t$this->KEPALA->PlaceHolder = ew_RemoveHtml($this->KEPALA->FldCaption());\n\n\t\t// RAMBUT\n\t\t$this->RAMBUT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->RAMBUT->EditCustomAttributes = \"\";\n\t\t$this->RAMBUT->EditValue = $this->RAMBUT->CurrentValue;\n\t\t$this->RAMBUT->PlaceHolder = ew_RemoveHtml($this->RAMBUT->FldCaption());\n\n\t\t// MUKA\n\t\t$this->MUKA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MUKA->EditCustomAttributes = \"\";\n\t\t$this->MUKA->EditValue = $this->MUKA->CurrentValue;\n\t\t$this->MUKA->PlaceHolder = ew_RemoveHtml($this->MUKA->FldCaption());\n\n\t\t// MATA\n\t\t$this->MATA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MATA->EditCustomAttributes = \"\";\n\t\t$this->MATA->EditValue = $this->MATA->CurrentValue;\n\t\t$this->MATA->PlaceHolder = ew_RemoveHtml($this->MATA->FldCaption());\n\n\t\t// GANG_LIHAT\n\t\t$this->GANG_LIHAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GANG_LIHAT->EditCustomAttributes = \"\";\n\t\t$this->GANG_LIHAT->EditValue = $this->GANG_LIHAT->CurrentValue;\n\t\t$this->GANG_LIHAT->PlaceHolder = ew_RemoveHtml($this->GANG_LIHAT->FldCaption());\n\n\t\t// ALATBANTU_LIHAT\n\t\t$this->ALATBANTU_LIHAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALATBANTU_LIHAT->EditCustomAttributes = \"\";\n\t\t$this->ALATBANTU_LIHAT->EditValue = $this->ALATBANTU_LIHAT->CurrentValue;\n\t\t$this->ALATBANTU_LIHAT->PlaceHolder = ew_RemoveHtml($this->ALATBANTU_LIHAT->FldCaption());\n\n\t\t// BENTUK\n\t\t$this->BENTUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK->EditCustomAttributes = \"\";\n\t\t$this->BENTUK->EditValue = $this->BENTUK->CurrentValue;\n\t\t$this->BENTUK->PlaceHolder = ew_RemoveHtml($this->BENTUK->FldCaption());\n\n\t\t// PENDENGARAN\n\t\t$this->PENDENGARAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENDENGARAN->EditCustomAttributes = \"\";\n\t\t$this->PENDENGARAN->EditValue = $this->PENDENGARAN->CurrentValue;\n\t\t$this->PENDENGARAN->PlaceHolder = ew_RemoveHtml($this->PENDENGARAN->FldCaption());\n\n\t\t// LUB_TELINGA\n\t\t$this->LUB_TELINGA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LUB_TELINGA->EditCustomAttributes = \"\";\n\t\t$this->LUB_TELINGA->EditValue = $this->LUB_TELINGA->CurrentValue;\n\t\t$this->LUB_TELINGA->PlaceHolder = ew_RemoveHtml($this->LUB_TELINGA->FldCaption());\n\n\t\t// BENTUK_HIDUNG\n\t\t$this->BENTUK_HIDUNG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_HIDUNG->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_HIDUNG->EditValue = $this->BENTUK_HIDUNG->CurrentValue;\n\t\t$this->BENTUK_HIDUNG->PlaceHolder = ew_RemoveHtml($this->BENTUK_HIDUNG->FldCaption());\n\n\t\t// MEMBRAN_MUK\n\t\t$this->MEMBRAN_MUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MEMBRAN_MUK->EditCustomAttributes = \"\";\n\t\t$this->MEMBRAN_MUK->EditValue = $this->MEMBRAN_MUK->CurrentValue;\n\t\t$this->MEMBRAN_MUK->PlaceHolder = ew_RemoveHtml($this->MEMBRAN_MUK->FldCaption());\n\n\t\t// MAMPU_HIDU\n\t\t$this->MAMPU_HIDU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MAMPU_HIDU->EditCustomAttributes = \"\";\n\t\t$this->MAMPU_HIDU->EditValue = $this->MAMPU_HIDU->CurrentValue;\n\t\t$this->MAMPU_HIDU->PlaceHolder = ew_RemoveHtml($this->MAMPU_HIDU->FldCaption());\n\n\t\t// ALAT_HIDUNG\n\t\t$this->ALAT_HIDUNG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALAT_HIDUNG->EditCustomAttributes = \"\";\n\t\t$this->ALAT_HIDUNG->EditValue = $this->ALAT_HIDUNG->CurrentValue;\n\t\t$this->ALAT_HIDUNG->PlaceHolder = ew_RemoveHtml($this->ALAT_HIDUNG->FldCaption());\n\n\t\t// RONGGA_MULUT\n\t\t$this->RONGGA_MULUT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->RONGGA_MULUT->EditCustomAttributes = \"\";\n\t\t$this->RONGGA_MULUT->EditValue = $this->RONGGA_MULUT->CurrentValue;\n\t\t$this->RONGGA_MULUT->PlaceHolder = ew_RemoveHtml($this->RONGGA_MULUT->FldCaption());\n\n\t\t// WARNA_MEMBRAN\n\t\t$this->WARNA_MEMBRAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->WARNA_MEMBRAN->EditCustomAttributes = \"\";\n\t\t$this->WARNA_MEMBRAN->EditValue = $this->WARNA_MEMBRAN->CurrentValue;\n\t\t$this->WARNA_MEMBRAN->PlaceHolder = ew_RemoveHtml($this->WARNA_MEMBRAN->FldCaption());\n\n\t\t// LEMBAB\n\t\t$this->LEMBAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LEMBAB->EditCustomAttributes = \"\";\n\t\t$this->LEMBAB->EditValue = $this->LEMBAB->CurrentValue;\n\t\t$this->LEMBAB->PlaceHolder = ew_RemoveHtml($this->LEMBAB->FldCaption());\n\n\t\t// STOMATITIS\n\t\t$this->STOMATITIS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->STOMATITIS->EditCustomAttributes = \"\";\n\t\t$this->STOMATITIS->EditValue = $this->STOMATITIS->CurrentValue;\n\t\t$this->STOMATITIS->PlaceHolder = ew_RemoveHtml($this->STOMATITIS->FldCaption());\n\n\t\t// LIDAH\n\t\t$this->LIDAH->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LIDAH->EditCustomAttributes = \"\";\n\t\t$this->LIDAH->EditValue = $this->LIDAH->CurrentValue;\n\t\t$this->LIDAH->PlaceHolder = ew_RemoveHtml($this->LIDAH->FldCaption());\n\n\t\t// GIGI\n\t\t$this->GIGI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GIGI->EditCustomAttributes = \"\";\n\t\t$this->GIGI->EditValue = $this->GIGI->CurrentValue;\n\t\t$this->GIGI->PlaceHolder = ew_RemoveHtml($this->GIGI->FldCaption());\n\n\t\t// TONSIL\n\t\t$this->TONSIL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TONSIL->EditCustomAttributes = \"\";\n\t\t$this->TONSIL->EditValue = $this->TONSIL->CurrentValue;\n\t\t$this->TONSIL->PlaceHolder = ew_RemoveHtml($this->TONSIL->FldCaption());\n\n\t\t// KELAINAN\n\t\t$this->KELAINAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KELAINAN->EditCustomAttributes = \"\";\n\t\t$this->KELAINAN->EditValue = $this->KELAINAN->CurrentValue;\n\t\t$this->KELAINAN->PlaceHolder = ew_RemoveHtml($this->KELAINAN->FldCaption());\n\n\t\t// PERGERAKAN\n\t\t$this->PERGERAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PERGERAKAN->EditCustomAttributes = \"\";\n\t\t$this->PERGERAKAN->EditValue = $this->PERGERAKAN->CurrentValue;\n\t\t$this->PERGERAKAN->PlaceHolder = ew_RemoveHtml($this->PERGERAKAN->FldCaption());\n\n\t\t// KEL_TIROID\n\t\t$this->KEL_TIROID->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEL_TIROID->EditCustomAttributes = \"\";\n\t\t$this->KEL_TIROID->EditValue = $this->KEL_TIROID->CurrentValue;\n\t\t$this->KEL_TIROID->PlaceHolder = ew_RemoveHtml($this->KEL_TIROID->FldCaption());\n\n\t\t// KEL_GETAH\n\t\t$this->KEL_GETAH->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEL_GETAH->EditCustomAttributes = \"\";\n\t\t$this->KEL_GETAH->EditValue = $this->KEL_GETAH->CurrentValue;\n\t\t$this->KEL_GETAH->PlaceHolder = ew_RemoveHtml($this->KEL_GETAH->FldCaption());\n\n\t\t// TEKANAN_VENA\n\t\t$this->TEKANAN_VENA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TEKANAN_VENA->EditCustomAttributes = \"\";\n\t\t$this->TEKANAN_VENA->EditValue = $this->TEKANAN_VENA->CurrentValue;\n\t\t$this->TEKANAN_VENA->PlaceHolder = ew_RemoveHtml($this->TEKANAN_VENA->FldCaption());\n\n\t\t// REF_MENELAN\n\t\t$this->REF_MENELAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->REF_MENELAN->EditCustomAttributes = \"\";\n\t\t$this->REF_MENELAN->EditValue = $this->REF_MENELAN->CurrentValue;\n\t\t$this->REF_MENELAN->PlaceHolder = ew_RemoveHtml($this->REF_MENELAN->FldCaption());\n\n\t\t// NYERI\n\t\t$this->NYERI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NYERI->EditCustomAttributes = \"\";\n\t\t$this->NYERI->EditValue = $this->NYERI->CurrentValue;\n\t\t$this->NYERI->PlaceHolder = ew_RemoveHtml($this->NYERI->FldCaption());\n\n\t\t// KREPITASI\n\t\t$this->KREPITASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KREPITASI->EditCustomAttributes = \"\";\n\t\t$this->KREPITASI->EditValue = $this->KREPITASI->CurrentValue;\n\t\t$this->KREPITASI->PlaceHolder = ew_RemoveHtml($this->KREPITASI->FldCaption());\n\n\t\t// KEL_LAIN\n\t\t$this->KEL_LAIN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEL_LAIN->EditCustomAttributes = \"\";\n\t\t$this->KEL_LAIN->EditValue = $this->KEL_LAIN->CurrentValue;\n\t\t$this->KEL_LAIN->PlaceHolder = ew_RemoveHtml($this->KEL_LAIN->FldCaption());\n\n\t\t// BENTUK_DADA\n\t\t$this->BENTUK_DADA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_DADA->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_DADA->EditValue = $this->BENTUK_DADA->CurrentValue;\n\t\t$this->BENTUK_DADA->PlaceHolder = ew_RemoveHtml($this->BENTUK_DADA->FldCaption());\n\n\t\t// POLA_NAPAS\n\t\t$this->POLA_NAPAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->POLA_NAPAS->EditCustomAttributes = \"\";\n\t\t$this->POLA_NAPAS->EditValue = $this->POLA_NAPAS->CurrentValue;\n\t\t$this->POLA_NAPAS->PlaceHolder = ew_RemoveHtml($this->POLA_NAPAS->FldCaption());\n\n\t\t// BENTUK_THORAKS\n\t\t$this->BENTUK_THORAKS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_THORAKS->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_THORAKS->EditValue = $this->BENTUK_THORAKS->CurrentValue;\n\t\t$this->BENTUK_THORAKS->PlaceHolder = ew_RemoveHtml($this->BENTUK_THORAKS->FldCaption());\n\n\t\t// PAL_KREP\n\t\t$this->PAL_KREP->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAL_KREP->EditCustomAttributes = \"\";\n\t\t$this->PAL_KREP->EditValue = $this->PAL_KREP->CurrentValue;\n\t\t$this->PAL_KREP->PlaceHolder = ew_RemoveHtml($this->PAL_KREP->FldCaption());\n\n\t\t// BENJOLAN\n\t\t$this->BENJOLAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENJOLAN->EditCustomAttributes = \"\";\n\t\t$this->BENJOLAN->EditValue = $this->BENJOLAN->CurrentValue;\n\t\t$this->BENJOLAN->PlaceHolder = ew_RemoveHtml($this->BENJOLAN->FldCaption());\n\n\t\t// PAL_NYERI\n\t\t$this->PAL_NYERI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAL_NYERI->EditCustomAttributes = \"\";\n\t\t$this->PAL_NYERI->EditValue = $this->PAL_NYERI->CurrentValue;\n\t\t$this->PAL_NYERI->PlaceHolder = ew_RemoveHtml($this->PAL_NYERI->FldCaption());\n\n\t\t// PERKUSI\n\t\t$this->PERKUSI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PERKUSI->EditCustomAttributes = \"\";\n\t\t$this->PERKUSI->EditValue = $this->PERKUSI->CurrentValue;\n\t\t$this->PERKUSI->PlaceHolder = ew_RemoveHtml($this->PERKUSI->FldCaption());\n\n\t\t// PARU\n\t\t$this->PARU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PARU->EditCustomAttributes = \"\";\n\t\t$this->PARU->EditValue = $this->PARU->CurrentValue;\n\t\t$this->PARU->PlaceHolder = ew_RemoveHtml($this->PARU->FldCaption());\n\n\t\t// JANTUNG\n\t\t$this->JANTUNG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JANTUNG->EditCustomAttributes = \"\";\n\t\t$this->JANTUNG->EditValue = $this->JANTUNG->CurrentValue;\n\t\t$this->JANTUNG->PlaceHolder = ew_RemoveHtml($this->JANTUNG->FldCaption());\n\n\t\t// SUARA_JANTUNG\n\t\t$this->SUARA_JANTUNG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SUARA_JANTUNG->EditCustomAttributes = \"\";\n\t\t$this->SUARA_JANTUNG->EditValue = $this->SUARA_JANTUNG->CurrentValue;\n\t\t$this->SUARA_JANTUNG->PlaceHolder = ew_RemoveHtml($this->SUARA_JANTUNG->FldCaption());\n\n\t\t// ALATBANTU_JAN\n\t\t$this->ALATBANTU_JAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALATBANTU_JAN->EditCustomAttributes = \"\";\n\t\t$this->ALATBANTU_JAN->EditValue = $this->ALATBANTU_JAN->CurrentValue;\n\t\t$this->ALATBANTU_JAN->PlaceHolder = ew_RemoveHtml($this->ALATBANTU_JAN->FldCaption());\n\n\t\t// BENTUK_ABDOMEN\n\t\t$this->BENTUK_ABDOMEN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_ABDOMEN->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_ABDOMEN->EditValue = $this->BENTUK_ABDOMEN->CurrentValue;\n\t\t$this->BENTUK_ABDOMEN->PlaceHolder = ew_RemoveHtml($this->BENTUK_ABDOMEN->FldCaption());\n\n\t\t// AUSKULTASI\n\t\t$this->AUSKULTASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->AUSKULTASI->EditCustomAttributes = \"\";\n\t\t$this->AUSKULTASI->EditValue = $this->AUSKULTASI->CurrentValue;\n\t\t$this->AUSKULTASI->PlaceHolder = ew_RemoveHtml($this->AUSKULTASI->FldCaption());\n\n\t\t// NYERI_PASI\n\t\t$this->NYERI_PASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NYERI_PASI->EditCustomAttributes = \"\";\n\t\t$this->NYERI_PASI->EditValue = $this->NYERI_PASI->CurrentValue;\n\t\t$this->NYERI_PASI->PlaceHolder = ew_RemoveHtml($this->NYERI_PASI->FldCaption());\n\n\t\t// PEM_KELENJAR\n\t\t$this->PEM_KELENJAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PEM_KELENJAR->EditCustomAttributes = \"\";\n\t\t$this->PEM_KELENJAR->EditValue = $this->PEM_KELENJAR->CurrentValue;\n\t\t$this->PEM_KELENJAR->PlaceHolder = ew_RemoveHtml($this->PEM_KELENJAR->FldCaption());\n\n\t\t// PERKUSI_AUS\n\t\t$this->PERKUSI_AUS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PERKUSI_AUS->EditCustomAttributes = \"\";\n\t\t$this->PERKUSI_AUS->EditValue = $this->PERKUSI_AUS->CurrentValue;\n\t\t$this->PERKUSI_AUS->PlaceHolder = ew_RemoveHtml($this->PERKUSI_AUS->FldCaption());\n\n\t\t// VAGINA\n\t\t$this->VAGINA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->VAGINA->EditCustomAttributes = \"\";\n\t\t$this->VAGINA->EditValue = $this->VAGINA->CurrentValue;\n\t\t$this->VAGINA->PlaceHolder = ew_RemoveHtml($this->VAGINA->FldCaption());\n\n\t\t// MENSTRUASI\n\t\t$this->MENSTRUASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MENSTRUASI->EditCustomAttributes = \"\";\n\t\t$this->MENSTRUASI->EditValue = $this->MENSTRUASI->CurrentValue;\n\t\t$this->MENSTRUASI->PlaceHolder = ew_RemoveHtml($this->MENSTRUASI->FldCaption());\n\n\t\t// KATETER\n\t\t$this->KATETER->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KATETER->EditCustomAttributes = \"\";\n\t\t$this->KATETER->EditValue = $this->KATETER->CurrentValue;\n\t\t$this->KATETER->PlaceHolder = ew_RemoveHtml($this->KATETER->FldCaption());\n\n\t\t// LABIA_PROM\n\t\t$this->LABIA_PROM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LABIA_PROM->EditCustomAttributes = \"\";\n\t\t$this->LABIA_PROM->EditValue = $this->LABIA_PROM->CurrentValue;\n\t\t$this->LABIA_PROM->PlaceHolder = ew_RemoveHtml($this->LABIA_PROM->FldCaption());\n\n\t\t// HAMIL\n\t\t$this->HAMIL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->HAMIL->EditCustomAttributes = \"\";\n\t\t$this->HAMIL->EditValue = $this->HAMIL->CurrentValue;\n\t\t$this->HAMIL->PlaceHolder = ew_RemoveHtml($this->HAMIL->FldCaption());\n\n\t\t// TGL_HAID\n\t\t$this->TGL_HAID->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TGL_HAID->EditCustomAttributes = \"\";\n\t\t$this->TGL_HAID->EditValue = ew_FormatDateTime($this->TGL_HAID->CurrentValue, 8);\n\t\t$this->TGL_HAID->PlaceHolder = ew_RemoveHtml($this->TGL_HAID->FldCaption());\n\n\t\t// PERIKSA_CERVIX\n\t\t$this->PERIKSA_CERVIX->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PERIKSA_CERVIX->EditCustomAttributes = \"\";\n\t\t$this->PERIKSA_CERVIX->EditValue = $this->PERIKSA_CERVIX->CurrentValue;\n\t\t$this->PERIKSA_CERVIX->PlaceHolder = ew_RemoveHtml($this->PERIKSA_CERVIX->FldCaption());\n\n\t\t// BENTUK_PAYUDARA\n\t\t$this->BENTUK_PAYUDARA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_PAYUDARA->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_PAYUDARA->EditValue = $this->BENTUK_PAYUDARA->CurrentValue;\n\t\t$this->BENTUK_PAYUDARA->PlaceHolder = ew_RemoveHtml($this->BENTUK_PAYUDARA->FldCaption());\n\n\t\t// KENYAL\n\t\t$this->KENYAL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KENYAL->EditCustomAttributes = \"\";\n\t\t$this->KENYAL->EditValue = $this->KENYAL->CurrentValue;\n\t\t$this->KENYAL->PlaceHolder = ew_RemoveHtml($this->KENYAL->FldCaption());\n\n\t\t// MASSA\n\t\t$this->MASSA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASSA->EditCustomAttributes = \"\";\n\t\t$this->MASSA->EditValue = $this->MASSA->CurrentValue;\n\t\t$this->MASSA->PlaceHolder = ew_RemoveHtml($this->MASSA->FldCaption());\n\n\t\t// NYERI_RABA\n\t\t$this->NYERI_RABA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NYERI_RABA->EditCustomAttributes = \"\";\n\t\t$this->NYERI_RABA->EditValue = $this->NYERI_RABA->CurrentValue;\n\t\t$this->NYERI_RABA->PlaceHolder = ew_RemoveHtml($this->NYERI_RABA->FldCaption());\n\n\t\t// BENTUK_PUTING\n\t\t$this->BENTUK_PUTING->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_PUTING->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_PUTING->EditValue = $this->BENTUK_PUTING->CurrentValue;\n\t\t$this->BENTUK_PUTING->PlaceHolder = ew_RemoveHtml($this->BENTUK_PUTING->FldCaption());\n\n\t\t// MAMMO\n\t\t$this->MAMMO->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MAMMO->EditCustomAttributes = \"\";\n\t\t$this->MAMMO->EditValue = $this->MAMMO->CurrentValue;\n\t\t$this->MAMMO->PlaceHolder = ew_RemoveHtml($this->MAMMO->FldCaption());\n\n\t\t// ALAT_KONTRASEPSI\n\t\t$this->ALAT_KONTRASEPSI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALAT_KONTRASEPSI->EditCustomAttributes = \"\";\n\t\t$this->ALAT_KONTRASEPSI->EditValue = $this->ALAT_KONTRASEPSI->CurrentValue;\n\t\t$this->ALAT_KONTRASEPSI->PlaceHolder = ew_RemoveHtml($this->ALAT_KONTRASEPSI->FldCaption());\n\n\t\t// MASALAH_SEKS\n\t\t$this->MASALAH_SEKS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASALAH_SEKS->EditCustomAttributes = \"\";\n\t\t$this->MASALAH_SEKS->EditValue = $this->MASALAH_SEKS->CurrentValue;\n\t\t$this->MASALAH_SEKS->PlaceHolder = ew_RemoveHtml($this->MASALAH_SEKS->FldCaption());\n\n\t\t// PREPUTIUM\n\t\t$this->PREPUTIUM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PREPUTIUM->EditCustomAttributes = \"\";\n\t\t$this->PREPUTIUM->EditValue = $this->PREPUTIUM->CurrentValue;\n\t\t$this->PREPUTIUM->PlaceHolder = ew_RemoveHtml($this->PREPUTIUM->FldCaption());\n\n\t\t// MASALAH_PROSTAT\n\t\t$this->MASALAH_PROSTAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASALAH_PROSTAT->EditCustomAttributes = \"\";\n\t\t$this->MASALAH_PROSTAT->EditValue = $this->MASALAH_PROSTAT->CurrentValue;\n\t\t$this->MASALAH_PROSTAT->PlaceHolder = ew_RemoveHtml($this->MASALAH_PROSTAT->FldCaption());\n\n\t\t// BENTUK_SKROTUM\n\t\t$this->BENTUK_SKROTUM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BENTUK_SKROTUM->EditCustomAttributes = \"\";\n\t\t$this->BENTUK_SKROTUM->EditValue = $this->BENTUK_SKROTUM->CurrentValue;\n\t\t$this->BENTUK_SKROTUM->PlaceHolder = ew_RemoveHtml($this->BENTUK_SKROTUM->FldCaption());\n\n\t\t// TESTIS\n\t\t$this->TESTIS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TESTIS->EditCustomAttributes = \"\";\n\t\t$this->TESTIS->EditValue = $this->TESTIS->CurrentValue;\n\t\t$this->TESTIS->PlaceHolder = ew_RemoveHtml($this->TESTIS->FldCaption());\n\n\t\t// MASSA_BEN\n\t\t$this->MASSA_BEN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASSA_BEN->EditCustomAttributes = \"\";\n\t\t$this->MASSA_BEN->EditValue = $this->MASSA_BEN->CurrentValue;\n\t\t$this->MASSA_BEN->PlaceHolder = ew_RemoveHtml($this->MASSA_BEN->FldCaption());\n\n\t\t// HERNIASI\n\t\t$this->HERNIASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->HERNIASI->EditCustomAttributes = \"\";\n\t\t$this->HERNIASI->EditValue = $this->HERNIASI->CurrentValue;\n\t\t$this->HERNIASI->PlaceHolder = ew_RemoveHtml($this->HERNIASI->FldCaption());\n\n\t\t// LAIN2\n\t\t$this->LAIN2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->LAIN2->EditCustomAttributes = \"\";\n\t\t$this->LAIN2->EditValue = $this->LAIN2->CurrentValue;\n\t\t$this->LAIN2->PlaceHolder = ew_RemoveHtml($this->LAIN2->FldCaption());\n\n\t\t// ALAT_KONTRA\n\t\t$this->ALAT_KONTRA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALAT_KONTRA->EditCustomAttributes = \"\";\n\t\t$this->ALAT_KONTRA->EditValue = $this->ALAT_KONTRA->CurrentValue;\n\t\t$this->ALAT_KONTRA->PlaceHolder = ew_RemoveHtml($this->ALAT_KONTRA->FldCaption());\n\n\t\t// MASALAH_REPRO\n\t\t$this->MASALAH_REPRO->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MASALAH_REPRO->EditCustomAttributes = \"\";\n\t\t$this->MASALAH_REPRO->EditValue = $this->MASALAH_REPRO->CurrentValue;\n\t\t$this->MASALAH_REPRO->PlaceHolder = ew_RemoveHtml($this->MASALAH_REPRO->FldCaption());\n\n\t\t// EKSTREMITAS_ATAS\n\t\t$this->EKSTREMITAS_ATAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->EKSTREMITAS_ATAS->EditCustomAttributes = \"\";\n\t\t$this->EKSTREMITAS_ATAS->EditValue = $this->EKSTREMITAS_ATAS->CurrentValue;\n\t\t$this->EKSTREMITAS_ATAS->PlaceHolder = ew_RemoveHtml($this->EKSTREMITAS_ATAS->FldCaption());\n\n\t\t// EKSTREMITAS_BAWAH\n\t\t$this->EKSTREMITAS_BAWAH->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->EKSTREMITAS_BAWAH->EditCustomAttributes = \"\";\n\t\t$this->EKSTREMITAS_BAWAH->EditValue = $this->EKSTREMITAS_BAWAH->CurrentValue;\n\t\t$this->EKSTREMITAS_BAWAH->PlaceHolder = ew_RemoveHtml($this->EKSTREMITAS_BAWAH->FldCaption());\n\n\t\t// AKTIVITAS\n\t\t$this->AKTIVITAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->AKTIVITAS->EditCustomAttributes = \"\";\n\t\t$this->AKTIVITAS->EditValue = $this->AKTIVITAS->CurrentValue;\n\t\t$this->AKTIVITAS->PlaceHolder = ew_RemoveHtml($this->AKTIVITAS->FldCaption());\n\n\t\t// BERJALAN\n\t\t$this->BERJALAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BERJALAN->EditCustomAttributes = \"\";\n\t\t$this->BERJALAN->EditValue = $this->BERJALAN->CurrentValue;\n\t\t$this->BERJALAN->PlaceHolder = ew_RemoveHtml($this->BERJALAN->FldCaption());\n\n\t\t// SISTEM_INTE\n\t\t$this->SISTEM_INTE->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SISTEM_INTE->EditCustomAttributes = \"\";\n\t\t$this->SISTEM_INTE->EditValue = $this->SISTEM_INTE->CurrentValue;\n\t\t$this->SISTEM_INTE->PlaceHolder = ew_RemoveHtml($this->SISTEM_INTE->FldCaption());\n\n\t\t// KENYAMANAN\n\t\t$this->KENYAMANAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KENYAMANAN->EditCustomAttributes = \"\";\n\t\t$this->KENYAMANAN->EditValue = $this->KENYAMANAN->CurrentValue;\n\t\t$this->KENYAMANAN->PlaceHolder = ew_RemoveHtml($this->KENYAMANAN->FldCaption());\n\n\t\t// KES_DIRI\n\t\t$this->KES_DIRI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KES_DIRI->EditCustomAttributes = \"\";\n\t\t$this->KES_DIRI->EditValue = $this->KES_DIRI->CurrentValue;\n\t\t$this->KES_DIRI->PlaceHolder = ew_RemoveHtml($this->KES_DIRI->FldCaption());\n\n\t\t// SOS_SUPORT\n\t\t$this->SOS_SUPORT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SOS_SUPORT->EditCustomAttributes = \"\";\n\t\t$this->SOS_SUPORT->EditValue = $this->SOS_SUPORT->CurrentValue;\n\t\t$this->SOS_SUPORT->PlaceHolder = ew_RemoveHtml($this->SOS_SUPORT->FldCaption());\n\n\t\t// ANSIETAS\n\t\t$this->ANSIETAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ANSIETAS->EditCustomAttributes = \"\";\n\t\t$this->ANSIETAS->EditValue = $this->ANSIETAS->CurrentValue;\n\t\t$this->ANSIETAS->PlaceHolder = ew_RemoveHtml($this->ANSIETAS->FldCaption());\n\n\t\t// KEHILANGAN\n\t\t$this->KEHILANGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEHILANGAN->EditCustomAttributes = \"\";\n\t\t$this->KEHILANGAN->EditValue = $this->KEHILANGAN->CurrentValue;\n\t\t$this->KEHILANGAN->PlaceHolder = ew_RemoveHtml($this->KEHILANGAN->FldCaption());\n\n\t\t// STATUS_EMOSI\n\t\t$this->STATUS_EMOSI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->STATUS_EMOSI->EditCustomAttributes = \"\";\n\t\t$this->STATUS_EMOSI->EditValue = $this->STATUS_EMOSI->CurrentValue;\n\t\t$this->STATUS_EMOSI->PlaceHolder = ew_RemoveHtml($this->STATUS_EMOSI->FldCaption());\n\n\t\t// KONSEP_DIRI\n\t\t$this->KONSEP_DIRI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KONSEP_DIRI->EditCustomAttributes = \"\";\n\t\t$this->KONSEP_DIRI->EditValue = $this->KONSEP_DIRI->CurrentValue;\n\t\t$this->KONSEP_DIRI->PlaceHolder = ew_RemoveHtml($this->KONSEP_DIRI->FldCaption());\n\n\t\t// RESPON_HILANG\n\t\t$this->RESPON_HILANG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->RESPON_HILANG->EditCustomAttributes = \"\";\n\t\t$this->RESPON_HILANG->EditValue = $this->RESPON_HILANG->CurrentValue;\n\t\t$this->RESPON_HILANG->PlaceHolder = ew_RemoveHtml($this->RESPON_HILANG->FldCaption());\n\n\t\t// SUMBER_STRESS\n\t\t$this->SUMBER_STRESS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SUMBER_STRESS->EditCustomAttributes = \"\";\n\t\t$this->SUMBER_STRESS->EditValue = $this->SUMBER_STRESS->CurrentValue;\n\t\t$this->SUMBER_STRESS->PlaceHolder = ew_RemoveHtml($this->SUMBER_STRESS->FldCaption());\n\n\t\t// BERARTI\n\t\t$this->BERARTI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BERARTI->EditCustomAttributes = \"\";\n\t\t$this->BERARTI->EditValue = $this->BERARTI->CurrentValue;\n\t\t$this->BERARTI->PlaceHolder = ew_RemoveHtml($this->BERARTI->FldCaption());\n\n\t\t// TERLIBAT\n\t\t$this->TERLIBAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->TERLIBAT->EditCustomAttributes = \"\";\n\t\t$this->TERLIBAT->EditValue = $this->TERLIBAT->CurrentValue;\n\t\t$this->TERLIBAT->PlaceHolder = ew_RemoveHtml($this->TERLIBAT->FldCaption());\n\n\t\t// HUBUNGAN\n\t\t$this->HUBUNGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->HUBUNGAN->EditCustomAttributes = \"\";\n\t\t$this->HUBUNGAN->EditValue = $this->HUBUNGAN->CurrentValue;\n\t\t$this->HUBUNGAN->PlaceHolder = ew_RemoveHtml($this->HUBUNGAN->FldCaption());\n\n\t\t// KOMUNIKASI\n\t\t$this->KOMUNIKASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KOMUNIKASI->EditCustomAttributes = \"\";\n\t\t$this->KOMUNIKASI->EditValue = $this->KOMUNIKASI->CurrentValue;\n\t\t$this->KOMUNIKASI->PlaceHolder = ew_RemoveHtml($this->KOMUNIKASI->FldCaption());\n\n\t\t// KEPUTUSAN\n\t\t$this->KEPUTUSAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEPUTUSAN->EditCustomAttributes = \"\";\n\t\t$this->KEPUTUSAN->EditValue = $this->KEPUTUSAN->CurrentValue;\n\t\t$this->KEPUTUSAN->PlaceHolder = ew_RemoveHtml($this->KEPUTUSAN->FldCaption());\n\n\t\t// MENGASUH\n\t\t$this->MENGASUH->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MENGASUH->EditCustomAttributes = \"\";\n\t\t$this->MENGASUH->EditValue = $this->MENGASUH->CurrentValue;\n\t\t$this->MENGASUH->PlaceHolder = ew_RemoveHtml($this->MENGASUH->FldCaption());\n\n\t\t// DUKUNGAN\n\t\t$this->DUKUNGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DUKUNGAN->EditCustomAttributes = \"\";\n\t\t$this->DUKUNGAN->EditValue = $this->DUKUNGAN->CurrentValue;\n\t\t$this->DUKUNGAN->PlaceHolder = ew_RemoveHtml($this->DUKUNGAN->FldCaption());\n\n\t\t// REAKSI\n\t\t$this->REAKSI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->REAKSI->EditCustomAttributes = \"\";\n\t\t$this->REAKSI->EditValue = $this->REAKSI->CurrentValue;\n\t\t$this->REAKSI->PlaceHolder = ew_RemoveHtml($this->REAKSI->FldCaption());\n\n\t\t// BUDAYA\n\t\t$this->BUDAYA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BUDAYA->EditCustomAttributes = \"\";\n\t\t$this->BUDAYA->EditValue = $this->BUDAYA->CurrentValue;\n\t\t$this->BUDAYA->PlaceHolder = ew_RemoveHtml($this->BUDAYA->FldCaption());\n\n\t\t// POLA_AKTIVITAS\n\t\t$this->POLA_AKTIVITAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->POLA_AKTIVITAS->EditCustomAttributes = \"\";\n\t\t$this->POLA_AKTIVITAS->EditValue = $this->POLA_AKTIVITAS->CurrentValue;\n\t\t$this->POLA_AKTIVITAS->PlaceHolder = ew_RemoveHtml($this->POLA_AKTIVITAS->FldCaption());\n\n\t\t// POLA_ISTIRAHAT\n\t\t$this->POLA_ISTIRAHAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->POLA_ISTIRAHAT->EditCustomAttributes = \"\";\n\t\t$this->POLA_ISTIRAHAT->EditValue = $this->POLA_ISTIRAHAT->CurrentValue;\n\t\t$this->POLA_ISTIRAHAT->PlaceHolder = ew_RemoveHtml($this->POLA_ISTIRAHAT->FldCaption());\n\n\t\t// POLA_MAKAN\n\t\t$this->POLA_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->POLA_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->POLA_MAKAN->EditValue = $this->POLA_MAKAN->CurrentValue;\n\t\t$this->POLA_MAKAN->PlaceHolder = ew_RemoveHtml($this->POLA_MAKAN->FldCaption());\n\n\t\t// PANTANGAN\n\t\t$this->PANTANGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PANTANGAN->EditCustomAttributes = \"\";\n\t\t$this->PANTANGAN->EditValue = $this->PANTANGAN->CurrentValue;\n\t\t$this->PANTANGAN->PlaceHolder = ew_RemoveHtml($this->PANTANGAN->FldCaption());\n\n\t\t// KEPERCAYAAN\n\t\t$this->KEPERCAYAAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEPERCAYAAN->EditCustomAttributes = \"\";\n\t\t$this->KEPERCAYAAN->EditValue = $this->KEPERCAYAAN->CurrentValue;\n\t\t$this->KEPERCAYAAN->PlaceHolder = ew_RemoveHtml($this->KEPERCAYAAN->FldCaption());\n\n\t\t// PANTANGAN_HARI\n\t\t$this->PANTANGAN_HARI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PANTANGAN_HARI->EditCustomAttributes = \"\";\n\t\t$this->PANTANGAN_HARI->EditValue = $this->PANTANGAN_HARI->CurrentValue;\n\t\t$this->PANTANGAN_HARI->PlaceHolder = ew_RemoveHtml($this->PANTANGAN_HARI->FldCaption());\n\n\t\t// PANTANGAN_LAIN\n\t\t$this->PANTANGAN_LAIN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PANTANGAN_LAIN->EditCustomAttributes = \"\";\n\t\t$this->PANTANGAN_LAIN->EditValue = $this->PANTANGAN_LAIN->CurrentValue;\n\t\t$this->PANTANGAN_LAIN->PlaceHolder = ew_RemoveHtml($this->PANTANGAN_LAIN->FldCaption());\n\n\t\t// ANJURAN\n\t\t$this->ANJURAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ANJURAN->EditCustomAttributes = \"\";\n\t\t$this->ANJURAN->EditValue = $this->ANJURAN->CurrentValue;\n\t\t$this->ANJURAN->PlaceHolder = ew_RemoveHtml($this->ANJURAN->FldCaption());\n\n\t\t// NILAI_KEYAKINAN\n\t\t$this->NILAI_KEYAKINAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NILAI_KEYAKINAN->EditCustomAttributes = \"\";\n\t\t$this->NILAI_KEYAKINAN->EditValue = $this->NILAI_KEYAKINAN->CurrentValue;\n\t\t$this->NILAI_KEYAKINAN->PlaceHolder = ew_RemoveHtml($this->NILAI_KEYAKINAN->FldCaption());\n\n\t\t// KEGIATAN_IBADAH\n\t\t$this->KEGIATAN_IBADAH->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEGIATAN_IBADAH->EditCustomAttributes = \"\";\n\t\t$this->KEGIATAN_IBADAH->EditValue = $this->KEGIATAN_IBADAH->CurrentValue;\n\t\t$this->KEGIATAN_IBADAH->PlaceHolder = ew_RemoveHtml($this->KEGIATAN_IBADAH->FldCaption());\n\n\t\t// PENG_AGAMA\n\t\t$this->PENG_AGAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENG_AGAMA->EditCustomAttributes = \"\";\n\t\t$this->PENG_AGAMA->EditValue = $this->PENG_AGAMA->CurrentValue;\n\t\t$this->PENG_AGAMA->PlaceHolder = ew_RemoveHtml($this->PENG_AGAMA->FldCaption());\n\n\t\t// SPIRIT\n\t\t$this->SPIRIT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SPIRIT->EditCustomAttributes = \"\";\n\t\t$this->SPIRIT->EditValue = $this->SPIRIT->CurrentValue;\n\t\t$this->SPIRIT->PlaceHolder = ew_RemoveHtml($this->SPIRIT->FldCaption());\n\n\t\t// BANTUAN\n\t\t$this->BANTUAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BANTUAN->EditCustomAttributes = \"\";\n\t\t$this->BANTUAN->EditValue = $this->BANTUAN->CurrentValue;\n\t\t$this->BANTUAN->PlaceHolder = ew_RemoveHtml($this->BANTUAN->FldCaption());\n\n\t\t// PAHAM_PENYAKIT\n\t\t$this->PAHAM_PENYAKIT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAHAM_PENYAKIT->EditCustomAttributes = \"\";\n\t\t$this->PAHAM_PENYAKIT->EditValue = $this->PAHAM_PENYAKIT->CurrentValue;\n\t\t$this->PAHAM_PENYAKIT->PlaceHolder = ew_RemoveHtml($this->PAHAM_PENYAKIT->FldCaption());\n\n\t\t// PAHAM_OBAT\n\t\t$this->PAHAM_OBAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAHAM_OBAT->EditCustomAttributes = \"\";\n\t\t$this->PAHAM_OBAT->EditValue = $this->PAHAM_OBAT->CurrentValue;\n\t\t$this->PAHAM_OBAT->PlaceHolder = ew_RemoveHtml($this->PAHAM_OBAT->FldCaption());\n\n\t\t// PAHAM_NUTRISI\n\t\t$this->PAHAM_NUTRISI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAHAM_NUTRISI->EditCustomAttributes = \"\";\n\t\t$this->PAHAM_NUTRISI->EditValue = $this->PAHAM_NUTRISI->CurrentValue;\n\t\t$this->PAHAM_NUTRISI->PlaceHolder = ew_RemoveHtml($this->PAHAM_NUTRISI->FldCaption());\n\n\t\t// PAHAM_RAWAT\n\t\t$this->PAHAM_RAWAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAHAM_RAWAT->EditCustomAttributes = \"\";\n\t\t$this->PAHAM_RAWAT->EditValue = $this->PAHAM_RAWAT->CurrentValue;\n\t\t$this->PAHAM_RAWAT->PlaceHolder = ew_RemoveHtml($this->PAHAM_RAWAT->FldCaption());\n\n\t\t// HAMBATAN_EDUKASI\n\t\t$this->HAMBATAN_EDUKASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->HAMBATAN_EDUKASI->EditCustomAttributes = \"\";\n\t\t$this->HAMBATAN_EDUKASI->EditValue = $this->HAMBATAN_EDUKASI->CurrentValue;\n\t\t$this->HAMBATAN_EDUKASI->PlaceHolder = ew_RemoveHtml($this->HAMBATAN_EDUKASI->FldCaption());\n\n\t\t// FREK_MAKAN\n\t\t$this->FREK_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FREK_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->FREK_MAKAN->EditValue = $this->FREK_MAKAN->CurrentValue;\n\t\t$this->FREK_MAKAN->PlaceHolder = ew_RemoveHtml($this->FREK_MAKAN->FldCaption());\n\n\t\t// JUM_MAKAN\n\t\t$this->JUM_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JUM_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->JUM_MAKAN->EditValue = $this->JUM_MAKAN->CurrentValue;\n\t\t$this->JUM_MAKAN->PlaceHolder = ew_RemoveHtml($this->JUM_MAKAN->FldCaption());\n\n\t\t// JEN_MAKAN\n\t\t$this->JEN_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JEN_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->JEN_MAKAN->EditValue = $this->JEN_MAKAN->CurrentValue;\n\t\t$this->JEN_MAKAN->PlaceHolder = ew_RemoveHtml($this->JEN_MAKAN->FldCaption());\n\n\t\t// KOM_MAKAN\n\t\t$this->KOM_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KOM_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->KOM_MAKAN->EditValue = $this->KOM_MAKAN->CurrentValue;\n\t\t$this->KOM_MAKAN->PlaceHolder = ew_RemoveHtml($this->KOM_MAKAN->FldCaption());\n\n\t\t// DIET\n\t\t$this->DIET->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DIET->EditCustomAttributes = \"\";\n\t\t$this->DIET->EditValue = $this->DIET->CurrentValue;\n\t\t$this->DIET->PlaceHolder = ew_RemoveHtml($this->DIET->FldCaption());\n\n\t\t// CARA_MAKAN\n\t\t$this->CARA_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->CARA_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->CARA_MAKAN->EditValue = $this->CARA_MAKAN->CurrentValue;\n\t\t$this->CARA_MAKAN->PlaceHolder = ew_RemoveHtml($this->CARA_MAKAN->FldCaption());\n\n\t\t// GANGGUAN\n\t\t$this->GANGGUAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GANGGUAN->EditCustomAttributes = \"\";\n\t\t$this->GANGGUAN->EditValue = $this->GANGGUAN->CurrentValue;\n\t\t$this->GANGGUAN->PlaceHolder = ew_RemoveHtml($this->GANGGUAN->FldCaption());\n\n\t\t// FREK_MINUM\n\t\t$this->FREK_MINUM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FREK_MINUM->EditCustomAttributes = \"\";\n\t\t$this->FREK_MINUM->EditValue = $this->FREK_MINUM->CurrentValue;\n\t\t$this->FREK_MINUM->PlaceHolder = ew_RemoveHtml($this->FREK_MINUM->FldCaption());\n\n\t\t// JUM_MINUM\n\t\t$this->JUM_MINUM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JUM_MINUM->EditCustomAttributes = \"\";\n\t\t$this->JUM_MINUM->EditValue = $this->JUM_MINUM->CurrentValue;\n\t\t$this->JUM_MINUM->PlaceHolder = ew_RemoveHtml($this->JUM_MINUM->FldCaption());\n\n\t\t// JEN_MINUM\n\t\t$this->JEN_MINUM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JEN_MINUM->EditCustomAttributes = \"\";\n\t\t$this->JEN_MINUM->EditValue = $this->JEN_MINUM->CurrentValue;\n\t\t$this->JEN_MINUM->PlaceHolder = ew_RemoveHtml($this->JEN_MINUM->FldCaption());\n\n\t\t// GANG_MINUM\n\t\t$this->GANG_MINUM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GANG_MINUM->EditCustomAttributes = \"\";\n\t\t$this->GANG_MINUM->EditValue = $this->GANG_MINUM->CurrentValue;\n\t\t$this->GANG_MINUM->PlaceHolder = ew_RemoveHtml($this->GANG_MINUM->FldCaption());\n\n\t\t// FREK_BAK\n\t\t$this->FREK_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FREK_BAK->EditCustomAttributes = \"\";\n\t\t$this->FREK_BAK->EditValue = $this->FREK_BAK->CurrentValue;\n\t\t$this->FREK_BAK->PlaceHolder = ew_RemoveHtml($this->FREK_BAK->FldCaption());\n\n\t\t// WARNA_BAK\n\t\t$this->WARNA_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->WARNA_BAK->EditCustomAttributes = \"\";\n\t\t$this->WARNA_BAK->EditValue = $this->WARNA_BAK->CurrentValue;\n\t\t$this->WARNA_BAK->PlaceHolder = ew_RemoveHtml($this->WARNA_BAK->FldCaption());\n\n\t\t// JMLH_BAK\n\t\t$this->JMLH_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JMLH_BAK->EditCustomAttributes = \"\";\n\t\t$this->JMLH_BAK->EditValue = $this->JMLH_BAK->CurrentValue;\n\t\t$this->JMLH_BAK->PlaceHolder = ew_RemoveHtml($this->JMLH_BAK->FldCaption());\n\n\t\t// PENG_KAT_BAK\n\t\t$this->PENG_KAT_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENG_KAT_BAK->EditCustomAttributes = \"\";\n\t\t$this->PENG_KAT_BAK->EditValue = $this->PENG_KAT_BAK->CurrentValue;\n\t\t$this->PENG_KAT_BAK->PlaceHolder = ew_RemoveHtml($this->PENG_KAT_BAK->FldCaption());\n\n\t\t// KEM_HAN_BAK\n\t\t$this->KEM_HAN_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEM_HAN_BAK->EditCustomAttributes = \"\";\n\t\t$this->KEM_HAN_BAK->EditValue = $this->KEM_HAN_BAK->CurrentValue;\n\t\t$this->KEM_HAN_BAK->PlaceHolder = ew_RemoveHtml($this->KEM_HAN_BAK->FldCaption());\n\n\t\t// INKONT_BAK\n\t\t$this->INKONT_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->INKONT_BAK->EditCustomAttributes = \"\";\n\t\t$this->INKONT_BAK->EditValue = $this->INKONT_BAK->CurrentValue;\n\t\t$this->INKONT_BAK->PlaceHolder = ew_RemoveHtml($this->INKONT_BAK->FldCaption());\n\n\t\t// DIURESIS_BAK\n\t\t$this->DIURESIS_BAK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DIURESIS_BAK->EditCustomAttributes = \"\";\n\t\t$this->DIURESIS_BAK->EditValue = $this->DIURESIS_BAK->CurrentValue;\n\t\t$this->DIURESIS_BAK->PlaceHolder = ew_RemoveHtml($this->DIURESIS_BAK->FldCaption());\n\n\t\t// FREK_BAB\n\t\t$this->FREK_BAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FREK_BAB->EditCustomAttributes = \"\";\n\t\t$this->FREK_BAB->EditValue = $this->FREK_BAB->CurrentValue;\n\t\t$this->FREK_BAB->PlaceHolder = ew_RemoveHtml($this->FREK_BAB->FldCaption());\n\n\t\t// WARNA_BAB\n\t\t$this->WARNA_BAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->WARNA_BAB->EditCustomAttributes = \"\";\n\t\t$this->WARNA_BAB->EditValue = $this->WARNA_BAB->CurrentValue;\n\t\t$this->WARNA_BAB->PlaceHolder = ew_RemoveHtml($this->WARNA_BAB->FldCaption());\n\n\t\t// KONSIST_BAB\n\t\t$this->KONSIST_BAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KONSIST_BAB->EditCustomAttributes = \"\";\n\t\t$this->KONSIST_BAB->EditValue = $this->KONSIST_BAB->CurrentValue;\n\t\t$this->KONSIST_BAB->PlaceHolder = ew_RemoveHtml($this->KONSIST_BAB->FldCaption());\n\n\t\t// GANG_BAB\n\t\t$this->GANG_BAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GANG_BAB->EditCustomAttributes = \"\";\n\t\t$this->GANG_BAB->EditValue = $this->GANG_BAB->CurrentValue;\n\t\t$this->GANG_BAB->PlaceHolder = ew_RemoveHtml($this->GANG_BAB->FldCaption());\n\n\t\t// STOMA_BAB\n\t\t$this->STOMA_BAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->STOMA_BAB->EditCustomAttributes = \"\";\n\t\t$this->STOMA_BAB->EditValue = $this->STOMA_BAB->CurrentValue;\n\t\t$this->STOMA_BAB->PlaceHolder = ew_RemoveHtml($this->STOMA_BAB->FldCaption());\n\n\t\t// PENG_OBAT_BAB\n\t\t$this->PENG_OBAT_BAB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENG_OBAT_BAB->EditCustomAttributes = \"\";\n\t\t$this->PENG_OBAT_BAB->EditValue = $this->PENG_OBAT_BAB->CurrentValue;\n\t\t$this->PENG_OBAT_BAB->PlaceHolder = ew_RemoveHtml($this->PENG_OBAT_BAB->FldCaption());\n\n\t\t// IST_SIANG\n\t\t$this->IST_SIANG->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IST_SIANG->EditCustomAttributes = \"\";\n\t\t$this->IST_SIANG->EditValue = $this->IST_SIANG->CurrentValue;\n\t\t$this->IST_SIANG->PlaceHolder = ew_RemoveHtml($this->IST_SIANG->FldCaption());\n\n\t\t// IST_MALAM\n\t\t$this->IST_MALAM->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IST_MALAM->EditCustomAttributes = \"\";\n\t\t$this->IST_MALAM->EditValue = $this->IST_MALAM->CurrentValue;\n\t\t$this->IST_MALAM->PlaceHolder = ew_RemoveHtml($this->IST_MALAM->FldCaption());\n\n\t\t// IST_CAHAYA\n\t\t$this->IST_CAHAYA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IST_CAHAYA->EditCustomAttributes = \"\";\n\t\t$this->IST_CAHAYA->EditValue = $this->IST_CAHAYA->CurrentValue;\n\t\t$this->IST_CAHAYA->PlaceHolder = ew_RemoveHtml($this->IST_CAHAYA->FldCaption());\n\n\t\t// IST_POSISI\n\t\t$this->IST_POSISI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IST_POSISI->EditCustomAttributes = \"\";\n\t\t$this->IST_POSISI->EditValue = $this->IST_POSISI->CurrentValue;\n\t\t$this->IST_POSISI->PlaceHolder = ew_RemoveHtml($this->IST_POSISI->FldCaption());\n\n\t\t// IST_LING\n\t\t$this->IST_LING->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IST_LING->EditCustomAttributes = \"\";\n\t\t$this->IST_LING->EditValue = $this->IST_LING->CurrentValue;\n\t\t$this->IST_LING->PlaceHolder = ew_RemoveHtml($this->IST_LING->FldCaption());\n\n\t\t// IST_GANG_TIDUR\n\t\t$this->IST_GANG_TIDUR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->IST_GANG_TIDUR->EditCustomAttributes = \"\";\n\t\t$this->IST_GANG_TIDUR->EditValue = $this->IST_GANG_TIDUR->CurrentValue;\n\t\t$this->IST_GANG_TIDUR->PlaceHolder = ew_RemoveHtml($this->IST_GANG_TIDUR->FldCaption());\n\n\t\t// PENG_OBAT_IST\n\t\t$this->PENG_OBAT_IST->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENG_OBAT_IST->EditCustomAttributes = \"\";\n\t\t$this->PENG_OBAT_IST->EditValue = $this->PENG_OBAT_IST->CurrentValue;\n\t\t$this->PENG_OBAT_IST->PlaceHolder = ew_RemoveHtml($this->PENG_OBAT_IST->FldCaption());\n\n\t\t// FREK_MAND\n\t\t$this->FREK_MAND->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->FREK_MAND->EditCustomAttributes = \"\";\n\t\t$this->FREK_MAND->EditValue = $this->FREK_MAND->CurrentValue;\n\t\t$this->FREK_MAND->PlaceHolder = ew_RemoveHtml($this->FREK_MAND->FldCaption());\n\n\t\t// CUC_RAMB_MAND\n\t\t$this->CUC_RAMB_MAND->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->CUC_RAMB_MAND->EditCustomAttributes = \"\";\n\t\t$this->CUC_RAMB_MAND->EditValue = $this->CUC_RAMB_MAND->CurrentValue;\n\t\t$this->CUC_RAMB_MAND->PlaceHolder = ew_RemoveHtml($this->CUC_RAMB_MAND->FldCaption());\n\n\t\t// SIH_GIGI_MAND\n\t\t$this->SIH_GIGI_MAND->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SIH_GIGI_MAND->EditCustomAttributes = \"\";\n\t\t$this->SIH_GIGI_MAND->EditValue = $this->SIH_GIGI_MAND->CurrentValue;\n\t\t$this->SIH_GIGI_MAND->PlaceHolder = ew_RemoveHtml($this->SIH_GIGI_MAND->FldCaption());\n\n\t\t// BANT_MAND\n\t\t$this->BANT_MAND->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BANT_MAND->EditCustomAttributes = \"\";\n\t\t$this->BANT_MAND->EditValue = $this->BANT_MAND->CurrentValue;\n\t\t$this->BANT_MAND->PlaceHolder = ew_RemoveHtml($this->BANT_MAND->FldCaption());\n\n\t\t// GANT_PAKAI\n\t\t$this->GANT_PAKAI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GANT_PAKAI->EditCustomAttributes = \"\";\n\t\t$this->GANT_PAKAI->EditValue = $this->GANT_PAKAI->CurrentValue;\n\t\t$this->GANT_PAKAI->PlaceHolder = ew_RemoveHtml($this->GANT_PAKAI->FldCaption());\n\n\t\t// PAK_CUCI\n\t\t$this->PAK_CUCI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAK_CUCI->EditCustomAttributes = \"\";\n\t\t$this->PAK_CUCI->EditValue = $this->PAK_CUCI->CurrentValue;\n\t\t$this->PAK_CUCI->PlaceHolder = ew_RemoveHtml($this->PAK_CUCI->FldCaption());\n\n\t\t// PAK_BANT\n\t\t$this->PAK_BANT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PAK_BANT->EditCustomAttributes = \"\";\n\t\t$this->PAK_BANT->EditValue = $this->PAK_BANT->CurrentValue;\n\t\t$this->PAK_BANT->PlaceHolder = ew_RemoveHtml($this->PAK_BANT->FldCaption());\n\n\t\t// ALT_BANT\n\t\t$this->ALT_BANT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALT_BANT->EditCustomAttributes = \"\";\n\t\t$this->ALT_BANT->EditValue = $this->ALT_BANT->CurrentValue;\n\t\t$this->ALT_BANT->PlaceHolder = ew_RemoveHtml($this->ALT_BANT->FldCaption());\n\n\t\t// KEMP_MUND\n\t\t$this->KEMP_MUND->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KEMP_MUND->EditCustomAttributes = \"\";\n\t\t$this->KEMP_MUND->EditValue = $this->KEMP_MUND->CurrentValue;\n\t\t$this->KEMP_MUND->PlaceHolder = ew_RemoveHtml($this->KEMP_MUND->FldCaption());\n\n\t\t// BIL_PUT\n\t\t$this->BIL_PUT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->BIL_PUT->EditCustomAttributes = \"\";\n\t\t$this->BIL_PUT->EditValue = $this->BIL_PUT->CurrentValue;\n\t\t$this->BIL_PUT->PlaceHolder = ew_RemoveHtml($this->BIL_PUT->FldCaption());\n\n\t\t// ADAPTIF\n\t\t$this->ADAPTIF->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ADAPTIF->EditCustomAttributes = \"\";\n\t\t$this->ADAPTIF->EditValue = $this->ADAPTIF->CurrentValue;\n\t\t$this->ADAPTIF->PlaceHolder = ew_RemoveHtml($this->ADAPTIF->FldCaption());\n\n\t\t// MALADAPTIF\n\t\t$this->MALADAPTIF->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MALADAPTIF->EditCustomAttributes = \"\";\n\t\t$this->MALADAPTIF->EditValue = $this->MALADAPTIF->CurrentValue;\n\t\t$this->MALADAPTIF->PlaceHolder = ew_RemoveHtml($this->MALADAPTIF->FldCaption());\n\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_NAMA->EditValue = $this->PENANGGUNGJAWAB_NAMA->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_NAMA->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_NAMA->FldCaption());\n\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditValue = $this->PENANGGUNGJAWAB_HUBUNGAN->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_HUBUNGAN->FldCaption());\n\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditValue = $this->PENANGGUNGJAWAB_ALAMAT->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_ALAMAT->FldCaption());\n\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditCustomAttributes = \"\";\n\t\t$this->PENANGGUNGJAWAB_PHONE->EditValue = $this->PENANGGUNGJAWAB_PHONE->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_PHONE->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_PHONE->FldCaption());\n\n\t\t// obat2\n\t\t$this->obat2->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->obat2->EditCustomAttributes = \"\";\n\t\t$this->obat2->EditValue = $this->obat2->CurrentValue;\n\t\t$this->obat2->PlaceHolder = ew_RemoveHtml($this->obat2->FldCaption());\n\n\t\t// PERBANDINGAN_BB\n\t\t$this->PERBANDINGAN_BB->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->PERBANDINGAN_BB->EditCustomAttributes = \"\";\n\t\t$this->PERBANDINGAN_BB->EditValue = $this->PERBANDINGAN_BB->CurrentValue;\n\t\t$this->PERBANDINGAN_BB->PlaceHolder = ew_RemoveHtml($this->PERBANDINGAN_BB->FldCaption());\n\n\t\t// KONTINENSIA\n\t\t$this->KONTINENSIA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KONTINENSIA->EditCustomAttributes = \"\";\n\t\t$this->KONTINENSIA->EditValue = $this->KONTINENSIA->CurrentValue;\n\t\t$this->KONTINENSIA->PlaceHolder = ew_RemoveHtml($this->KONTINENSIA->FldCaption());\n\n\t\t// JENIS_KULIT1\n\t\t$this->JENIS_KULIT1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JENIS_KULIT1->EditCustomAttributes = \"\";\n\t\t$this->JENIS_KULIT1->EditValue = $this->JENIS_KULIT1->CurrentValue;\n\t\t$this->JENIS_KULIT1->PlaceHolder = ew_RemoveHtml($this->JENIS_KULIT1->FldCaption());\n\n\t\t// MOBILITAS\n\t\t$this->MOBILITAS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MOBILITAS->EditCustomAttributes = \"\";\n\t\t$this->MOBILITAS->EditValue = $this->MOBILITAS->CurrentValue;\n\t\t$this->MOBILITAS->PlaceHolder = ew_RemoveHtml($this->MOBILITAS->FldCaption());\n\n\t\t// JK\n\t\t$this->JK->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JK->EditCustomAttributes = \"\";\n\t\t$this->JK->EditValue = $this->JK->CurrentValue;\n\t\t$this->JK->PlaceHolder = ew_RemoveHtml($this->JK->FldCaption());\n\n\t\t// UMUR\n\t\t$this->UMUR->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->UMUR->EditCustomAttributes = \"\";\n\t\t$this->UMUR->EditValue = $this->UMUR->CurrentValue;\n\t\t$this->UMUR->PlaceHolder = ew_RemoveHtml($this->UMUR->FldCaption());\n\n\t\t// NAFSU_MAKAN\n\t\t$this->NAFSU_MAKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NAFSU_MAKAN->EditCustomAttributes = \"\";\n\t\t$this->NAFSU_MAKAN->EditValue = $this->NAFSU_MAKAN->CurrentValue;\n\t\t$this->NAFSU_MAKAN->PlaceHolder = ew_RemoveHtml($this->NAFSU_MAKAN->FldCaption());\n\n\t\t// OBAT1\n\t\t$this->OBAT1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->OBAT1->EditCustomAttributes = \"\";\n\t\t$this->OBAT1->EditValue = $this->OBAT1->CurrentValue;\n\t\t$this->OBAT1->PlaceHolder = ew_RemoveHtml($this->OBAT1->FldCaption());\n\n\t\t// MALNUTRISI\n\t\t$this->MALNUTRISI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MALNUTRISI->EditCustomAttributes = \"\";\n\t\t$this->MALNUTRISI->EditValue = $this->MALNUTRISI->CurrentValue;\n\t\t$this->MALNUTRISI->PlaceHolder = ew_RemoveHtml($this->MALNUTRISI->FldCaption());\n\n\t\t// MOTORIK1\n\t\t$this->MOTORIK1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MOTORIK1->EditCustomAttributes = \"\";\n\t\t$this->MOTORIK1->EditValue = $this->MOTORIK1->CurrentValue;\n\t\t$this->MOTORIK1->PlaceHolder = ew_RemoveHtml($this->MOTORIK1->FldCaption());\n\n\t\t// SPINAL\n\t\t$this->SPINAL->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->SPINAL->EditCustomAttributes = \"\";\n\t\t$this->SPINAL->EditValue = $this->SPINAL->CurrentValue;\n\t\t$this->SPINAL->PlaceHolder = ew_RemoveHtml($this->SPINAL->FldCaption());\n\n\t\t// MEJA_OPERASI\n\t\t$this->MEJA_OPERASI->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->MEJA_OPERASI->EditCustomAttributes = \"\";\n\t\t$this->MEJA_OPERASI->EditValue = $this->MEJA_OPERASI->CurrentValue;\n\t\t$this->MEJA_OPERASI->PlaceHolder = ew_RemoveHtml($this->MEJA_OPERASI->FldCaption());\n\n\t\t// RIWAYAT_JATUH\n\t\t$this->RIWAYAT_JATUH->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->RIWAYAT_JATUH->EditCustomAttributes = \"\";\n\t\t$this->RIWAYAT_JATUH->EditValue = $this->RIWAYAT_JATUH->CurrentValue;\n\t\t$this->RIWAYAT_JATUH->PlaceHolder = ew_RemoveHtml($this->RIWAYAT_JATUH->FldCaption());\n\n\t\t// DIAGNOSIS_SEKUNDER\n\t\t$this->DIAGNOSIS_SEKUNDER->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->DIAGNOSIS_SEKUNDER->EditCustomAttributes = \"\";\n\t\t$this->DIAGNOSIS_SEKUNDER->EditValue = $this->DIAGNOSIS_SEKUNDER->CurrentValue;\n\t\t$this->DIAGNOSIS_SEKUNDER->PlaceHolder = ew_RemoveHtml($this->DIAGNOSIS_SEKUNDER->FldCaption());\n\n\t\t// ALAT_BANTU\n\t\t$this->ALAT_BANTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->ALAT_BANTU->EditCustomAttributes = \"\";\n\t\t$this->ALAT_BANTU->EditValue = $this->ALAT_BANTU->CurrentValue;\n\t\t$this->ALAT_BANTU->PlaceHolder = ew_RemoveHtml($this->ALAT_BANTU->FldCaption());\n\n\t\t// HEPARIN\n\t\t$this->HEPARIN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->HEPARIN->EditCustomAttributes = \"\";\n\t\t$this->HEPARIN->EditValue = $this->HEPARIN->CurrentValue;\n\t\t$this->HEPARIN->PlaceHolder = ew_RemoveHtml($this->HEPARIN->FldCaption());\n\n\t\t// GAYA_BERJALAN\n\t\t$this->GAYA_BERJALAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->GAYA_BERJALAN->EditCustomAttributes = \"\";\n\t\t$this->GAYA_BERJALAN->EditValue = $this->GAYA_BERJALAN->CurrentValue;\n\t\t$this->GAYA_BERJALAN->PlaceHolder = ew_RemoveHtml($this->GAYA_BERJALAN->FldCaption());\n\n\t\t// KESADARAN1\n\t\t$this->KESADARAN1->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KESADARAN1->EditCustomAttributes = \"\";\n\t\t$this->KESADARAN1->EditValue = $this->KESADARAN1->CurrentValue;\n\t\t$this->KESADARAN1->PlaceHolder = ew_RemoveHtml($this->KESADARAN1->FldCaption());\n\n\t\t// NOMR_LAMA\n\t\t$this->NOMR_LAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NOMR_LAMA->EditCustomAttributes = \"\";\n\t\t$this->NOMR_LAMA->EditValue = $this->NOMR_LAMA->CurrentValue;\n\t\t$this->NOMR_LAMA->PlaceHolder = ew_RemoveHtml($this->NOMR_LAMA->FldCaption());\n\n\t\t// NO_KARTU\n\t\t$this->NO_KARTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->NO_KARTU->EditCustomAttributes = \"\";\n\t\t$this->NO_KARTU->EditValue = $this->NO_KARTU->CurrentValue;\n\t\t$this->NO_KARTU->PlaceHolder = ew_RemoveHtml($this->NO_KARTU->FldCaption());\n\n\t\t// JNS_PASIEN\n\t\t$this->JNS_PASIEN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->JNS_PASIEN->EditCustomAttributes = \"\";\n\n\t\t// nama_ayah\n\t\t$this->nama_ayah->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nama_ayah->EditCustomAttributes = \"\";\n\t\t$this->nama_ayah->EditValue = $this->nama_ayah->CurrentValue;\n\t\t$this->nama_ayah->PlaceHolder = ew_RemoveHtml($this->nama_ayah->FldCaption());\n\n\t\t// nama_ibu\n\t\t$this->nama_ibu->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nama_ibu->EditCustomAttributes = \"\";\n\t\t$this->nama_ibu->EditValue = $this->nama_ibu->CurrentValue;\n\t\t$this->nama_ibu->PlaceHolder = ew_RemoveHtml($this->nama_ibu->FldCaption());\n\n\t\t// nama_suami\n\t\t$this->nama_suami->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nama_suami->EditCustomAttributes = \"\";\n\t\t$this->nama_suami->EditValue = $this->nama_suami->CurrentValue;\n\t\t$this->nama_suami->PlaceHolder = ew_RemoveHtml($this->nama_suami->FldCaption());\n\n\t\t// nama_istri\n\t\t$this->nama_istri->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->nama_istri->EditCustomAttributes = \"\";\n\t\t$this->nama_istri->EditValue = $this->nama_istri->CurrentValue;\n\t\t$this->nama_istri->PlaceHolder = ew_RemoveHtml($this->nama_istri->FldCaption());\n\n\t\t// KD_ETNIS\n\t\t$this->KD_ETNIS->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KD_ETNIS->EditCustomAttributes = \"\";\n\n\t\t// KD_BHS_HARIAN\n\t\t$this->KD_BHS_HARIAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t$this->KD_BHS_HARIAN->EditCustomAttributes = \"\";\n\n\t\t// Call Row Rendered event\n\t\t$this->Row_Rendered();\n\t}", "function RenderListRow() {\r\n\t\tglobal $Security, $gsLanguage, $Language;\r\n\r\n\t\t// Call Row Rendering event\r\n\t\t$this->Row_Rendering();\r\n\r\n\t// Common render codes\r\n\t\t// kd_jbt\r\n\t\t// ket\r\n\t\t// tjb\r\n\t\t// koef\r\n\t\t// created_by\r\n\t\t// created_date\r\n\t\t// last_update_by\r\n\t\t// last_update_date\r\n\t\t// kd_jbt_old\r\n\t\t// ket_old\r\n\t\t// jbt_type\r\n\t\t// org_id\r\n\t\t// parent_kd_jbt\r\n\t\t// eselon_num\r\n\t\t// jns_jbt\r\n\t\t// status\r\n\t\t// kd_jbt\r\n\r\n\t\t$this->kd_jbt->ViewValue = $this->kd_jbt->CurrentValue;\r\n\t\t$this->kd_jbt->ViewCustomAttributes = \"\";\r\n\r\n\t\t// ket\r\n\t\t$this->ket->ViewValue = $this->ket->CurrentValue;\r\n\t\t$this->ket->ViewCustomAttributes = \"\";\r\n\r\n\t\t// tjb\r\n\t\t$this->tjb->ViewValue = $this->tjb->CurrentValue;\r\n\t\t$this->tjb->ViewCustomAttributes = \"\";\r\n\r\n\t\t// koef\r\n\t\t$this->koef->ViewValue = $this->koef->CurrentValue;\r\n\t\t$this->koef->ViewCustomAttributes = \"\";\r\n\r\n\t\t// created_by\r\n\t\t$this->created_by->ViewValue = $this->created_by->CurrentValue;\r\n\t\t$this->created_by->ViewCustomAttributes = \"\";\r\n\r\n\t\t// created_date\r\n\t\t$this->created_date->ViewValue = $this->created_date->CurrentValue;\r\n\t\t$this->created_date->ViewValue = ew_FormatDateTime($this->created_date->ViewValue, 0);\r\n\t\t$this->created_date->ViewCustomAttributes = \"\";\r\n\r\n\t\t// last_update_by\r\n\t\t$this->last_update_by->ViewValue = $this->last_update_by->CurrentValue;\r\n\t\t$this->last_update_by->ViewCustomAttributes = \"\";\r\n\r\n\t\t// last_update_date\r\n\t\t$this->last_update_date->ViewValue = $this->last_update_date->CurrentValue;\r\n\t\t$this->last_update_date->ViewValue = ew_FormatDateTime($this->last_update_date->ViewValue, 0);\r\n\t\t$this->last_update_date->ViewCustomAttributes = \"\";\r\n\r\n\t\t// kd_jbt_old\r\n\t\t$this->kd_jbt_old->ViewValue = $this->kd_jbt_old->CurrentValue;\r\n\t\t$this->kd_jbt_old->ViewCustomAttributes = \"\";\r\n\r\n\t\t// ket_old\r\n\t\t$this->ket_old->ViewValue = $this->ket_old->CurrentValue;\r\n\t\t$this->ket_old->ViewCustomAttributes = \"\";\r\n\r\n\t\t// jbt_type\r\n\t\t$this->jbt_type->ViewValue = $this->jbt_type->CurrentValue;\r\n\t\t$this->jbt_type->ViewCustomAttributes = \"\";\r\n\r\n\t\t// org_id\r\n\t\t$this->org_id->ViewValue = $this->org_id->CurrentValue;\r\n\t\t$this->org_id->ViewCustomAttributes = \"\";\r\n\r\n\t\t// parent_kd_jbt\r\n\t\t$this->parent_kd_jbt->ViewValue = $this->parent_kd_jbt->CurrentValue;\r\n\t\t$this->parent_kd_jbt->ViewCustomAttributes = \"\";\r\n\r\n\t\t// eselon_num\r\n\t\t$this->eselon_num->ViewValue = $this->eselon_num->CurrentValue;\r\n\t\t$this->eselon_num->ViewCustomAttributes = \"\";\r\n\r\n\t\t// jns_jbt\r\n\t\t$this->jns_jbt->ViewValue = $this->jns_jbt->CurrentValue;\r\n\t\t$this->jns_jbt->ViewCustomAttributes = \"\";\r\n\r\n\t\t// status\r\n\t\t$this->status->ViewValue = $this->status->CurrentValue;\r\n\t\t$this->status->ViewCustomAttributes = \"\";\r\n\r\n\t\t// kd_jbt\r\n\t\t$this->kd_jbt->LinkCustomAttributes = \"\";\r\n\t\t$this->kd_jbt->HrefValue = \"\";\r\n\t\t$this->kd_jbt->TooltipValue = \"\";\r\n\r\n\t\t// ket\r\n\t\t$this->ket->LinkCustomAttributes = \"\";\r\n\t\t$this->ket->HrefValue = \"\";\r\n\t\t$this->ket->TooltipValue = \"\";\r\n\r\n\t\t// tjb\r\n\t\t$this->tjb->LinkCustomAttributes = \"\";\r\n\t\t$this->tjb->HrefValue = \"\";\r\n\t\t$this->tjb->TooltipValue = \"\";\r\n\r\n\t\t// koef\r\n\t\t$this->koef->LinkCustomAttributes = \"\";\r\n\t\t$this->koef->HrefValue = \"\";\r\n\t\t$this->koef->TooltipValue = \"\";\r\n\r\n\t\t// created_by\r\n\t\t$this->created_by->LinkCustomAttributes = \"\";\r\n\t\t$this->created_by->HrefValue = \"\";\r\n\t\t$this->created_by->TooltipValue = \"\";\r\n\r\n\t\t// created_date\r\n\t\t$this->created_date->LinkCustomAttributes = \"\";\r\n\t\t$this->created_date->HrefValue = \"\";\r\n\t\t$this->created_date->TooltipValue = \"\";\r\n\r\n\t\t// last_update_by\r\n\t\t$this->last_update_by->LinkCustomAttributes = \"\";\r\n\t\t$this->last_update_by->HrefValue = \"\";\r\n\t\t$this->last_update_by->TooltipValue = \"\";\r\n\r\n\t\t// last_update_date\r\n\t\t$this->last_update_date->LinkCustomAttributes = \"\";\r\n\t\t$this->last_update_date->HrefValue = \"\";\r\n\t\t$this->last_update_date->TooltipValue = \"\";\r\n\r\n\t\t// kd_jbt_old\r\n\t\t$this->kd_jbt_old->LinkCustomAttributes = \"\";\r\n\t\t$this->kd_jbt_old->HrefValue = \"\";\r\n\t\t$this->kd_jbt_old->TooltipValue = \"\";\r\n\r\n\t\t// ket_old\r\n\t\t$this->ket_old->LinkCustomAttributes = \"\";\r\n\t\t$this->ket_old->HrefValue = \"\";\r\n\t\t$this->ket_old->TooltipValue = \"\";\r\n\r\n\t\t// jbt_type\r\n\t\t$this->jbt_type->LinkCustomAttributes = \"\";\r\n\t\t$this->jbt_type->HrefValue = \"\";\r\n\t\t$this->jbt_type->TooltipValue = \"\";\r\n\r\n\t\t// org_id\r\n\t\t$this->org_id->LinkCustomAttributes = \"\";\r\n\t\t$this->org_id->HrefValue = \"\";\r\n\t\t$this->org_id->TooltipValue = \"\";\r\n\r\n\t\t// parent_kd_jbt\r\n\t\t$this->parent_kd_jbt->LinkCustomAttributes = \"\";\r\n\t\t$this->parent_kd_jbt->HrefValue = \"\";\r\n\t\t$this->parent_kd_jbt->TooltipValue = \"\";\r\n\r\n\t\t// eselon_num\r\n\t\t$this->eselon_num->LinkCustomAttributes = \"\";\r\n\t\t$this->eselon_num->HrefValue = \"\";\r\n\t\t$this->eselon_num->TooltipValue = \"\";\r\n\r\n\t\t// jns_jbt\r\n\t\t$this->jns_jbt->LinkCustomAttributes = \"\";\r\n\t\t$this->jns_jbt->HrefValue = \"\";\r\n\t\t$this->jns_jbt->TooltipValue = \"\";\r\n\r\n\t\t// status\r\n\t\t$this->status->LinkCustomAttributes = \"\";\r\n\t\t$this->status->HrefValue = \"\";\r\n\t\t$this->status->TooltipValue = \"\";\r\n\r\n\t\t// Call Row Rendered event\r\n\t\t$this->Row_Rendered();\r\n\r\n\t\t// Save data for Custom Template\r\n\t\t$this->Rows[] = $this->CustomTemplateFieldValues();\r\n\t}", "function display_rows() {\n\n\t\t//Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t//Loop for each record\n\t\tif( $records ) {\n\t\t\tforeach( $records as $i => $rec ) {\n\n\t\t\t\t//Open the line\n\t\t\t\techo '<tr id=\"record_'.$rec->ID.'\">';\n\t\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t\t//Style attributes for each col\n\t\t\t\t\t$class = sprintf( 'class=\"$column_name column-%1$s %2$s\"',\n\t\t\t\t\t\t'column-'.$column_name,\n\t\t\t\t\t\t( $i & 1 ? '' : 'alternate' )\n\t\t\t\t\t);\n\t\t\t\t\t$style = \"\";\n\t\t\t\t\tif ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n\t\t\t\t\t$attributes = $class.$style;\n\n\t\t\t\t\t// Format Levels\n\t\t\t\t\tforeach( get_available_levels() as $level ) {\n\t\t\t\t\t\tif( $level->slug === $rec->level ) $rec->level = $level->name;\n\t\t\t\t\t}\n\t\t\t\t\tforeach( la_get_available_languages() as $language ) {\n\t\t\t\t\t\tif( $language->slug === $rec->language ) $rec->language = $language->name;\n\t\t\t\t\t}\n\n\t\t\t\t\t$time = date('j. M Y', strtotime($rec->time));\n\n\t\t\t\t\t//Display the cell\n\t\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\t\tcase 'name': echo '<td '.$attributes.'><strong>'.stripslashes($rec->name).'</strong></td>'; break;\n\t\t\t\t\t\tcase 'email': echo '<td '.$attributes.'><a href=\"mailto:'.stripslashes($rec->email).'\">'.stripslashes($rec->email).'</a></td>'; break;\n\t\t\t\t\t\tcase 'language': echo '<td '.$attributes.'>'.stripslashes($rec->language).'</td>'; break;\n\t\t\t\t\t\tcase 'level': echo '<td '.$attributes.'>'.$rec->level.'</td>'; break;\n\t\t\t\t\t\tcase 'request': echo '<td '.$attributes.'>'.$rec->value.'</td>'; break;\n\t\t\t\t\t\tcase 'date': echo '<td '.$attributes.'>'.$time.'</td>'; break;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//Close the line\n\t\t\t\techo'</tr>';\n\t\t\t}\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CHECKED. Gets the required css column properties. Gets the names of the required column properties that were requested by the Lnrd_Css_Section object to which this Lnrd_Css_Mulit_Column object is associated with.
public function get_required_column_properties() { return $this->required_column_properties; }
[ "private function get_column_properties(){\n\t\t$sql_columns = $this->table_config[\"columns\"];\n\t\t$sql_columns =drk_subval_sort($sql_columns,\"order\",\"forward\"); // sort the columns by the sort order provided\n\t\tforeach($sql_columns as $col){\n\t\t\t$colname = $wpdb->escape($col[\"column_name\"]);\n\t\t\tif($col[\"is_open\"]){ // include only columns that are allowed to be made open\n\t\t\t\t$this->select_cols[] = $colname;\n\t\t\t\tif($col[\"is_search\"]){ // if a column can be searched then include in search columns\n\t\t\t\t\t$this->search_cols[$colname] = $colname;\n\t\t\t\t}\n\t\t\t\tif($col[\"filter_type\"]==\"multiple\"){ // if a column can be filtered then include in filter columns\n\t\t\t\t\t$this->filter_cols[\"multiple\"][$colname] = $colname;\n\t\t\t\t}\n\t\t\t\tif($col[\"filter_type\"]==\"single\"){ // if a column can be filtered then include in filter columns\n\t\t\t\t\t$this->filter_cols[\"single\"][$colname] = $colname;\n\t\t\t\t}\n\t\t\t\tif($col[\"filter_type\"]==\"search\"){ // if a column can be filtered then include in filter columns\n\t\t\t\t\t$this->filter_cols[\"single\"][$colname] = $colname;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function addColumns()\r\n {\r\n $content = '';\r\n\r\n foreach( $this->model->getProperties() as $field => $type ) {\r\n\r\n if(!$this->tableHasColumn($field)) {\r\n $this->columnsChanged = true;\r\n $rule = \"\\t\\t\\t\";\r\n\r\n // Primary key check\r\n if ( $field === 'id' and $type === 'integer' )\r\n $rule .= $this->increment();\r\n else {\r\n $rule .= $this->setColumn($this->model->validTypes[$type], $field);\r\n\r\n if ( !empty($setting) )\r\n $rule .= $this->addColumnOption($setting);\r\n }\r\n\r\n array_push($this->columnsAdded, $field);\r\n\r\n $content .= $rule . \";\\n\";\r\n }\r\n }\r\n\r\n return $content;\r\n }", "public function getProps($editable=TRUE) {\n $props = $this->table_columns;\n unset($props['id']);\n\n foreach ($props as $key => $val) {\n if (array_key_exists('binary', $val)) {\n $props[$key]['type'] = 'boolean';\n }\n }\n\n if (property_exists($this, 'csv_valued')) {\n foreach ($this->csv_valued as $csv) {\n $vals = $csv.\"_vals\";\n $props[$csv]['type'] = 'csv';\n $props[$csv]['ext'] = $this->$vals;\n }\n }\n \n if (property_exists($this, 'lov_valued')) {\n foreach ($this->lov_valued as $lov) {\n $vals = $lov.'_vals';\n $props[$lov]['type'] = 'lov';\n $props[$lov]['ext'] = $this->$vals;\n \n $vals_prefix = $vals.'_prefix';\n if (property_exists($this, $vals_prefix)) {\n \t$props[$lov]['prefix'] = $this->$vals_prefix;\n } else if (is_array($props[$lov]['ext']) \n \t&& in_array($props[$lov]['ext'][0], array('0', '1')) ) {\n \t$props[$lov]['prefix'] = $lov.'_';\n }\n }\n } \n\n if (property_exists($this, 'boolean_valued')) {\n foreach ($this->boolean_valued as $val) {\n $props[$val]['type'] = 'boolean';\n }\n }\n \n if (property_exists($this, 'date_valued')) {\n foreach ($this->date_valued as $val) {\n $props[$val]['type'] = 'date';\n }\n } \n\n if (property_exists($this, 'foreign_valued')) {\n foreach ($this->foreign_valued as $key => $val) {\n $props[$key]['type'] = 'foreign';\n $props[$key]['foreign'] = $val;\n }\n }\n\n if (property_exists($this, 'html_valued')) {\n foreach ($this->html_valued as $val) {\n $props[$val]['type'] = 'html';\n }\n }\n\n if (property_exists($this, 'image_valued')) {\n foreach ($this->image_valued as $val) {\n $props[$val]['type'] = 'image';\n }\n }\n \n if (property_exists($this, 'password_valued')) {\n foreach ($this->password_valued as $val) {\n $props[$val]['type'] = 'password';\n }\n } \n \n if (property_exists($this, 'edit_override')) {\n foreach ($this->edit_override as $key => $val) {\n $props[$key]['edit_override'] = $val;\n }\n }\n \n if ($editable && property_exists($this, 'readonly_valued')) {\n foreach ($this->readonly_valued as $readonly_key) {\n unset($props[$readonly_key]);\n }\n } \n\n return $props;\n }", "public function get_columns() {\n\t $columns = array(\n\t \t'cb' => '<input type=\"checkbox\" />',\n \t\t 'user_name' => __( 'Customer Name', 'woocommerce-ac' ),\n\t 'user_email_id' => __( 'Email Address', 'woocommerce-ac' ),\n\t\t\t'created_on' => __( 'Cart Abandoned Date', 'woocommerce-ac' ),\n\t\t\t'email_sent' \t => __( 'Email Sent?', 'woocommerce-ac' ),\n 'recovered_date' => __( 'Cart Recovered Date' , 'woocommerce-ac'),\n 'order_total' => __( 'Order Total', 'woocommerce-ac' )\n\t\t);\n\t\treturn apply_filters( 'wcap_recovered_orders_columns', $columns );\n\t}", "function get_columns(){\n\t\t$columns = array(\n\t\t\t'cb'\t\t\t=> '<input type=\"checkbox\" />', //Render a checkbox instead of text\n\t\t\t'title'\t\t\t=> 'Title',\n\t\t\t'subrole'\t\t=> 'Sub-Role',\n\t\t\t'description'\t=> 'Description',\n\t\t\t'ranking'\t\t=> 'Seniority',\n\t\t);\n\t\treturn $columns;\n\t}", "function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'cb'\t\t=> '<input type=\"checkbox\" />', //Render a checkbox instead of text\n\t\t\t'title'\t\t=> 'Title',\n\t\t\t'rating'\t=> 'Rating',\n\t\t\t'director'\t=> 'Director'\n\t\t);\n\t}", "function getCols(){\r\n\t\treturn $this->cols;\r\n\t}", "protected function fetchColumns()\n\t{\n\t\t// Fetches Column Names\n\t\t$columnsFetch = \"SHOW COLUMNS FROM \" . $this->_table;\n\t\t$columnsFetch = $this->_connection->query($columnsFetch);\n\t\t$columnsFetch = $columnsFetch->fetchAll();\n\t\tforeach ($columnsFetch as $column) {\n\t\t\tif($column['Key'] === \"PRI\"){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tforeach ($column as $field => $property) {\n\t\t\t\tif($field === \"Field\"){\n\t\t\t\t\t$this->_columnNames[] = $property;\n\t\t\t\t\t$this->{$property} = '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function tt_property_columns( $property_columns ) {\n $property_columns = array(\n 'cb' \t\t\t\t=> '<input type=\\'checkbox\\' />',\n 'thumbnail'\t=> __( 'Thumbnail','tt' ),\n 'title' \t\t=> __( 'Property Name','tt' ),\n 'featured' \t=> __( 'Featured','tt' ),\n 'address' \t=> __( 'Address','tt' ),\n 'location' \t=> __( 'Location','tt' ),\n 'status' \t\t=> __( 'Status','tt' ),\n 'type' \t\t\t=> __( 'Type','tt' ),\n 'features' \t=> __( 'Features','tt' ),\n 'price' \t\t=> __( 'Price','tt' ), \n 'author' \t\t=> __( 'Owner','tt' ), \n 'date' \t\t\t=> __( 'Published','tt' )\n );\n return $property_columns;\n}", "public function initialize_columns()\n {\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_OFFICIAL_CODE));\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_USERNAME));\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_LASTNAME));\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_FIRSTNAME));\n\n $showEmail = Configuration::getInstance()->get_setting(array('Chamilo\\Core\\User', 'show_email_addresses'));\n\n if($showEmail)\n {\n $this->add_column(new DataClassPropertyTableColumn(User::class_name(), User::PROPERTY_EMAIL));\n }\n\n $this->add_column(\n new DataClassPropertyTableColumn(\n CourseGroupUserRelation::class_name(), \n CourseGroupUserRelation::PROPERTY_SUBSCRIPTION_TIME));\n \n // $title = Translation :: get(self :: COURSE_GROUP_COLOMN, array(), Utilities :: COMMON_LIBRARIES);\n // // $this->add_column(\n // // new DataClassPropertyTableColumn(CourseGroup :: class_name(), CourseGroup :: PROPERTY_ID, $title, false));\n }", "private function getColumnsForSmartsheet( ) {\n\t\t$columns = array();\n\t\tforeach( $this->getFields() as $field ) {\n\n\t\t\t$type = $field->get_setting(self::TYPE);\n\n\t\t\tif( $type !== self::SUBMIT ) {\n\t\t\t\t$column = array();\n\t\t\t\t$column[self::TYPE] = $this->getFieldType($type);\n\t\t\t\t$column[self::TITLE] = $field->get_setting(self::LABEL);\n\t\t\t\tif( $field->get_setting(self::ORDER) == 1 ) {\n\t\t\t\t\t$column[self::PRIMARY] = true;\n\t\t\t\t}\n\t\t\t\t$columns[] = $column;\n\t\t\t}\n\t\t}\n\t\treturn $columns;\n\t}", "public function getColumns();", "protected function getColumns()\n {\n $column = 'A';\n $columns = array();\n if ($this->settings['compare_type'] == self::COMPARE_TYPE_BY_BOX) {\n $columns[$column] = array('title' => 'Box number', 'field' => 'boxNumber_1');\n } elseif ($this->settings['compare_type'] == self::COMPARE_TYPE_BY_TIMECODE) {\n $columns[$column] = array('title' => 'Timecode', 'field' => 'startTime_1');\n $columns[++$column] = array('title' => 'Box number (' . $this->settings['column_1'] . ')', 'field' => 'boxNumber_1');\n $columns[++$column] = array('title' => 'Box number (' . $this->settings['column_2'] . ')', 'field' => 'boxNumber_2');\n }\n \n $columns[++$column] = array('title' => 'Differences area', 'field' => 'diffAreaLabel');\n $columns[++$column] = array('title' => $this->settings['column_1'], 'field' => 'column_1');\n $columns[++$column] = array('title' => $this->settings['column_2'], 'field' => 'column_2');\n \n return $columns;\n }", "public function getColumns()\r\n\t{\r\n\t\t$columns = $this->_database->executeSQLQuery(\"SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = \".$this->_database->escapeString($this->_table));\r\n\t\tif($columns !== false)\r\n\t\t{\r\n\t\t\t$this->_columns = array();\r\n\t\t\twhile($column = $columns->fetch(\\PDO::FETCH_ASSOC, \\PDO::FETCH_ORI_NEXT))\r\n\t\t\t{\r\n\t\t\t\t// Check for primary key column\r\n\t\t\t\tif($column[\"COLUMN_KEY\"] == \"PRI\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->_primaryKey = $column[\"COLUMN_NAME\"];\r\n\t\t\t\t}\r\n\t\t\t\t$this->_columns[] = $column[\"COLUMN_NAME\"];\r\n\t\t\t}\r\n\t\t\treturn $this->_columns;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "function get_columns(){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'address' => 'Address',\n 'city' => 'City',\n 'state' => 'State',\n 'status' => 'Status'\n );\n return $columns;\n }", "protected function get_col_width_data() {\n return array('1' => __('col-1', 'mmcp'), '2' => __('col-2', 'mmcp'), '3' => __('col-3', 'mmcp'), '4' => __('col-4', 'mmcp'), '5' => __('col-5', 'mmcp'), '6' => __('col-6', 'mmcp'), '7' => __('col-7', 'mmcp'), '8' => __('col-8', 'mmcp'), '9' => __('col-9', 'mmcp'), '10' => __('col-10', 'mmcp'), '11' => __('col-11', 'mmcp'), '12' => __('col-12', 'mmcp'), 'full' => __('Full Width', 'mmcp'));\n }", "protected function _prepareColumns()\n {\n $this->addColumn(\n 'in_pages',\n [\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_pages',\n 'inline_css' => 'checkbox entities',\n 'field_name' => 'in_pages',\n 'values' => $this->getSelectedPages(),\n 'align' => 'center',\n 'index' => 'page_id',\n 'use_index' => true\n ]\n );\n\n $this->addColumn(\n 'page_id',\n [\n 'header' => __('ID'),\n 'sortable' => true,\n 'index' => 'page_id',\n 'header_css_class' => 'col-id',\n 'column_css_class' => 'col-id'\n ]\n );\n\n $this->addColumn(\n 'chooser_identifier',\n [\n 'header' => __('Identifier'),\n 'name' => 'chooser_identifier',\n 'index' => 'identifier',\n 'header_css_class' => 'col-identifier',\n 'column_css_class' => 'col-identifier'\n ]\n );\n\n $this->addColumn(\n 'chooser_title',\n [\n 'header' => __('Title'),\n 'name' => 'chooser_title',\n 'index' => 'title',\n 'header_css_class' => 'col-title',\n 'column_css_class' => 'col-title'\n ]\n );\n\n return parent::_prepareColumns();\n }", "function get_columns(){\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'name' => 'Name',\n 'job' => 'Job',\n 'text' => 'Description',\n\t\t\t'job_en' => 'Job in english',\n 'text_en' => 'Description in english',\n\t\t\t'facebook' => 'Facebook Link',\n\t\t\t'linkedin' => 'Linkedin Link',\n\t\t\t'image' => 'Photo'\n\t\t\t\n );\n return $columns;\n }", "public function get_slide_cols() {\n\t\treturn apply_filters( 'wlb_get_slide_cols', $this->params['slide_cols'] );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
input: int $comment_section_id input: int $rating (between 1 and 5) input: string $reason (max. lenght 512) return 0 > worked return 1 > not logedin return 2 > some parameters are empty return 3 > rating has to be a value between 15 return 4 > reason is to long return 5 > comment_section does not exist
function create_comment($comment_section_id, $rating, $reason) { //login check if(!logedin()) { return 1; } //empty or array ckeck if(empty($comment_section_id) || is_array($comment_section_id) || empty($rating) || !is_numeric($rating) || is_null($reason) || is_array($reason)) { return 2; } //cast rating to int $rating = intval($rating); //check if rating is between 1 and 5 if($rating < 1 || $rating > 5) { return 3; } //check if text is not to long if(strlen($reason) > 512) { return 4; } //check if comment section exists global $pdo; $sql = "SELECT id FROM comment_section WHERE id = :comment_section_id"; $sth = $pdo->prepare($sql); $sth->bindParam(":comment_section_id", $comment_section_id, PDO::PARAM_INT); $sth->execute(); if($sth->rowCount() == 0) { return 5; } //check if user has already written an comment in that comment section $sql = "SELECT id FROM comment WHERE comment_section_fk = :comment_section_id AND user_fk = :user_id"; $sth = $pdo->prepare($sql); $sth->bindParam(":comment_section_id", $comment_section_id, PDO::PARAM_INT); $sth->bindValue(":user_id", logedin(), PDO::PARAM_INT); $sth->execute(); if($sth->rowCount() == 0) { //if user has not written an comment in that section create new comment $sql = "INSERT INTO comment (comment_section_fk, rating, reason, user_fk) VALUES (:comment_section_id, :rating, :reason, :user_id)"; $sth = $pdo->prepare($sql); $sth->bindParam(":comment_section_id", $comment_section_id, PDO::PARAM_INT); $sth->bindParam(":rating", $rating, PDO::PARAM_INT); $sth->bindParam(":reason", $reason, PDO::PARAM_STR); $sth->bindValue(":user_id", logedin(), PDO::PARAM_INT); $sth->execute(); return 0; } else { //if user has written an comment in that section update old comment $sql = "UPDATE comment SET rating = :rating, reason = :reason WHERE comment_section_fk = :comment_section_id AND user_fk = :user_id"; $sth = $pdo->prepare($sql); $sth->bindParam(":comment_section_id", $comment_section_id, PDO::PARAM_INT); $sth->bindParam(":rating", $rating, PDO::PARAM_INT); $sth->bindParam(":reason", $reason, PDO::PARAM_STR); $sth->bindValue(":user_id", logedin(), PDO::PARAM_INT); $sth->execute(); return 0; } }
[ "public static function positive_feedback() {\n\t\t\t$secid = isset($_POST['secid']) ? $_POST['secid'] : '';\n\t\t\t$docid = isset($_POST['docid']) ? $_POST['docid'] : '';\n\t\t\t$responsearr = array('success'=> 0, 'msg'=>'');\n\t\t\t$l_delimiter = \"!!START!!\";\n \t\t\t$r_delimiter = \"!!END!!\";\n\t\t\tif( !empty( $docid) ) {\n\t\t\t\t$guide = new DocumentorLiteGuide( $docid );\n\t\t\t\t//get ip address of current user\n\t\t\t\t$ip = $guide->getRealIpAddr();\n\t\t\t}\n\t\t\tif( !empty( $secid ) && !empty( $docid ) ) {\n\t\t\t\tglobal $wpdb, $table_prefix;\n\t\t\t\t//check whether same user had given vote for a section\n\t\t\t\t$feedbacktbl = $table_prefix.DOCUMENTORLITE_FEEDBACK;\n\t\t\t\t$res = $wpdb->get_var( $wpdb->prepare( \"SELECT sec_id FROM $feedbacktbl WHERE sec_id = %d AND doc_id = %d AND date(date)=date(NOW()) AND ip = %s\", $secid, $docid, $ip ) );\n\t\t\t\tif( $res != NULL ) {\n\t\t\t\t\t$responsearr['msg'] = __(\"You have already given your feedback to this section. You can again give feedback for the same section after 24hrs\",\"documentor\");\n\t\t\t\t\techo $l_delimiter.json_encode( $responsearr ).$r_delimiter;\n\t\t\t\t\tdie();\n\t\t\t\t} else {\n\t\t\t\t\t//insert entry in feedback table\n\t\t\t\t\t$feedbacktbl = $table_prefix.DOCUMENTORLITE_FEEDBACK;\n\t\t\t\t\t$qfeedback = \"INSERT INTO $feedbacktbl(doc_id, sec_id, ip, vote, date) VALUES($docid, $secid, '$ip', 'yes', NOW())\";\n\t\t\t\t\t$wpdb->query( $qfeedback );\n\t\t\t\t\t\n\t\t\t\t\t//update vote count\n\t\t\t\t\t$sectbl = $table_prefix.DOCUMENTORLITE_SECTIONS;\n\t\t\t\t\t$upvote = $wpdb->get_var( $wpdb->prepare( \"SELECT upvote FROM $sectbl WHERE sec_id = %d\", $secid ) );\n\t\t\t\t\t$upvote = $upvote + 1;\n\t\t\t\t\t$wpdb->update( \n\t\t\t\t\t\t\t$sectbl, \n\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t'upvote' => $upvote\t\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\tarray( 'sec_id' => $secid ), \n\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t'%d'\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\tarray( '%d' ) \n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t//get settings to get thank you message\n\t\t\t\t\t$thankyoumsg = '';\n\t\t\t\t\t$settings = $guide->get_settings();\n\t\t\t\t\tif( isset( $settings['feedback_thankyoumsg'] ) ) $thankyoumsg = $settings['feedback_thankyoumsg'];\n\t\t\t\t\t$responsearr['success'] = 1;\n\t\t\t\t\t$responsearr['msg'] = $thankyoumsg;\n\t\t\t\t\techo $l_delimiter.json_encode( $responsearr ).$r_delimiter;\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function p4a_widget_server_get_comment_rating($id_comment){\n $rating = db_query(\"SELECT COUNT(IdComment) AS total FROM p4a_commentvaloration WHERE IdComment = :id_comment\", array('id_comment' => $id_comment))->fetchField();\n return (int)$rating;\n}", "function blk_comment_rating_require_rating( $commentdata ) {\n\tif ( ! is_admin() && ( ! isset( $_POST['rating'] ) || 0 === intval( $_POST['rating'] ) ) )\n\twp_die( __( 'Error: You did not add a rating. Hit the Back button on your Web browser and resubmit your comment with a rating.' ) );\n\treturn $commentdata;\n}", "function getRecommendationFeedbackbyID($recID){\n\n\tglobal $dclserver;\n\n\t//print \"Rec ID is \".$recID;\n\t$url=\"$dclserver/MMDataCurationRestfulService/webresources/SupportingLayer/RecommendationFeedback/$recID\";\n\t$recommendationFeedbackJson=getJsonRest($url);\n\t\n\tif(count($recommendationFeedbackJson)>0)\n\t\n\t\t\tif($recommendationFeedbackJson[0]['rate']==1)\n\t\t\t\tprint \"I liked the Recommendation. \". $recommendationFeedbackJson[0]['reason'];\n\t\t\telse if($recommendationFeedbackJson[0]['rate']==0)\n\t\t\t\tprint \"I did not like the Recommendation.\". $recommendationFeedbackJson[0]['reason'];\n\t\n\n\n}", "function meta_comment_rate($str){\n\tglobal $db;\n\t$arr = str2array($str,'|','=');\n\t$arr['rate'] =\t$arr['rate']>=0\tand 1\tor\n\t\t\t\t\t$arr['rate']<0\tand\t-1;\n\t// ex: if rate=-5 has been sent, set $arr['rate'] to -1\n\t\n\t$row = db_get_rows($db['prefix'].'comments',\"id='$arr[id]'\");\n\t$voters_arr = str2array($row[0]['voters'],',',':');\n\t\t/*\n\t\t *\tArray (\n\t\t *\t\t[25] => 1\n\t\t *\t\t[335] => -1\n\t\t *\t\t[787] => -1\n\t\t *\t\t[89] => 1\n\t\t *\t)\n\t\t */\n\tif(!array_key_exists($_SESSION['device_id'],$voters_arr)){\n\t//\tapply the given rate.\n\t\t$separator = strlen($row[0]['voters'])>0 and ',' or '';\n\t\tdb_query(\"UPDATE $db[prefix]comments SET rate=rate+$arr[rate], voters=CONCAT(voters, '$separator$_SESSION[device_id]:$arr[rate]') WHERE id='$arr[id]'\");\n\t\t\n\t}else{\n\t\tif($voters_arr[$_SESSION['device_id']]==$arr['rate']){\n\t\t//\tremove the old given rate by sending a same rate.\n\t\t\tunset($voters_arr[$_SESSION['device_id']]);\n\t\t\t$rateDiff = $arr['rate'];\n\t\t}else{\n\t\t//\tupdate the old given rate by sending a different rate.\t\n\t\t\t$voters_arr[$_SESSION['device_id']] = $arr['rate'];\n\t\t\t$rateDiff = -2*$arr['rate'];\n\t\t}\n\t\t$voters = array2str($voters_arr,',',':');\n\t\tdb_query(\"UPDATE $db[prefix]comments SET rate=rate-$rateDiff, voters='$voters' WHERE id='$arr[id]'\");\n\t}\n}", "function validateReason($reason, $comments){\n\t\t\tglobal $validForm, $reasonErr, $commentsErr, $reasonMsg; //Use the GLOBAL Version of these variables instead of making them local\n\t\t\t\n\t\t\tswitch($reason){\n\t\t\t\tcase \"default\":\n\t\t\t\t\t$reasonErr = \"*You must select an option\";\n\t\t\t\t\t$validForm = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"other\":\n\t\t\t\t\t$reasonMsg = \"Other\";\n\t\t\t\t\tif($comments == \"\"){\n\t\t\t\t\t\t$commentsErr = \"*You must enter a comments if you selected \\\"Other\\\"\";\n\t\t\t\t\t\t$validForm = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"product\":\n\t\t\t\t\t$reasonMsg = \"Product Problem\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"return\":\n\t\t\t\t\t$reasonMsg = \"Return a Product\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"billing\":\n\t\t\t\t\t$reasonMsg = \"Billing Question\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"technical\":\n\t\t\t\t\t$reasonMsg = \"Report a Website Problem\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "function rejudge($table, $id, $include_all, $full_rejudge, $reason = null, $userid = null)\n{\n global $DB;\n\n /* These are the tables that we can deal with. */\n $tablemap = array(\n 'contest' => 's.cid',\n 'judgehost' => 'j.judgehost',\n 'language' => 's.langid',\n 'problem' => 's.probid',\n 'submission' => 's.submitid',\n 'team' => 's.teamid'\n );\n\n if (!isset($tablemap[$table])) {\n error(\"unknown table in rejudging\");\n }\n\n // This can be done in one Update from MySQL 4.0.4 and up, but\n // that wouldn't allow us to call calcScoreRow() for the right\n // rows, so we'll just loop over the results one at a time.\n\n // Only rejudge submissions in active contests.\n $cids = getCurContests(false);\n\n // Do not include pending/queued or ignored submissions in rejudge.\n $restrictions = 'result IS NOT NULL AND s.valid=1 AND ';\n if ($include_all) {\n if (!$full_rejudge) {\n $restrictions = '';\n }\n } else {\n $restrictions .= 'result != \\'correct\\' AND ';\n }\n $res = $DB->q('SELECT j.judgingid, s.submitid, s.teamid, s.probid, j.cid, s.rejudgingid\n FROM judging j\n LEFT JOIN submission s USING (submitid)\n WHERE j.cid IN (%Ai) AND j.valid = 1 AND ' .\n $restrictions .\n $tablemap[$table] . ' = %s', $cids, $id);\n\n if ($res->count() == 0) {\n error(\"No judgings matched.\");\n }\n\n if ($full_rejudge) {\n $rejudgingid = $DB->q('RETURNID INSERT INTO rejudging\n (userid_start, starttime, reason) VALUES (%i, %s, %s)',\n $userid, now(), $reason);\n }\n\n while ($jud = $res->next()) {\n if (isset($jud['rejudgingid'])) {\n // already associated rejudging\n if ($table == 'submission') {\n // clean up rejudging\n if ($full_rejudge) {\n $DB->q('DELETE FROM rejudging WHERE rejudgingid=%i', $rejudgingid);\n }\n error('submission is already part of rejudging r' . specialchars($jud['rejudgingid']));\n } else {\n // silently skip that submission\n continue;\n }\n }\n\n $DB->q('START TRANSACTION');\n\n if (!$full_rejudge) {\n $DB->q('UPDATE judging SET valid = 0 WHERE judgingid = %i', $jud['judgingid']);\n }\n\n $DB->q('UPDATE submission SET judgehost = NULL' .\n ($full_rejudge ? ', rejudgingid=%i ' : '%_ ') .\n 'WHERE submitid = %i AND rejudgingid IS NULL',\n @$rejudgingid, $jud['submitid']);\n\n // Prioritize single submission rejudgings\n if ($table == 'submission') {\n $DB->q('UPDATE team SET judging_last_started = NULL\n WHERE teamid = %i', $jud['teamid']);\n }\n\n if (!$full_rejudge) {\n calcScoreRow($jud['cid'], $jud['teamid'], $jud['probid']);\n }\n $DB->q('COMMIT');\n\n if (!$full_rejudge) {\n auditlog('judging', $jud['judgingid'], 'mark invalid', '(rejudge)');\n }\n }\n\n return $full_rejudge ? $rejudgingid : null;\n}", "public function reviewBadBy($comment = null, $userId = null);", "function getCommentId(){\n $sql = \"select COMMENT_ID from COMMENT where RATING_RATING_ID = '\" . getRatingId() . \"'\";\n $results = queryDB($sql);\n if ($result = nextRow($results)){\n return $result['COMMENT_ID'];\n }\n else{\n return null;\n }\n }", "function wp_notify_moderator($comment_id) {\n global $wpdb;\n global $querystring_start, $querystring_equal, $querystring_separator;\n\n $comment = $wpdb->get_row(\"SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1\");\n $post = $wpdb->get_row(\"SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1\");\n $user = $wpdb->get_row(\"SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1\");\n\n $comment_author_domain = gethostbyaddr($comment->comment_author_IP);\n $comments_waiting = $wpdb->get_var(\"SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'\");\n\n $notify_message = \"A new comment on the post #$comment->comment_post_ID \\\"\".stripslashes($post->post_title).\"\\\" is waiting for your approval\\r\\n\\r\\n\";\n $notify_message .= \"Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\\r\\n\";\n $notify_message .= \"E-mail : $comment->comment_author_email\\r\\n\";\n $notify_message .= \"URL : $comment->comment_author_url\\r\\n\";\n $notify_message .= \"Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\\r\\n\";\n $notify_message .= \"Comment:\\r\\n\".stripslashes($comment->comment_content).\"\\r\\n\\r\\n\";\n $notify_message .= \"To approve this comment, visit: \" . get_settings('siteurl') . \"/wp-admin/post.php?action=mailapprovecomment&p=\".$comment->comment_post_ID.\"&comment=$comment_id\\r\\n\";\n $notify_message .= \"To delete this comment, visit: \" . get_settings('siteurl') . \"/wp-admin/post.php?action=confirmdeletecomment&p=\".$comment->comment_post_ID.\"&comment=$comment_id\\r\\n\";\n $notify_message .= \"Currently $comments_waiting comments are waiting for approval. Please visit the moderation panel:\\r\\n\";\n $notify_message .= get_settings('siteurl') . \"/wp-admin/moderation.php\\r\\n\";\n\n $subject = '[' . stripslashes(get_settings('blogname')) . '] Please approve: \"' .stripslashes($post->post_title).'\"';\n $admin_email = get_settings(\"admin_email\");\n $from = \"From: $admin_email\";\n\n $message_headers = \"MIME-Version: 1.0\\r\\n\"\n \t. \"$from\\r\\n\"\n \t. \"Content-Type: text/plain; charset=\\\"\" . get_settings('blog_charset') . \"\\\"\\r\\n\";\n\n @mail($admin_email, $subject, $notify_message, $message_headers);\n\n return true;\n}", "function comments ($sense_bundle_id){\r\n\r\n include ('connection.php');\r\n //BEGINING //videos //BEGINING\r\n \r\n $sql3=\"SELECT * FROM comments WHERE sense_bundle_id = '$sense_bundle_id' ORDER BY comment_id\";\r\n \r\n if($result3 = mysqli_query($link, $sql3)){\r\n \r\n if(mysqli_num_rows($result3)>0){\r\n \r\n $comment_id=\"\";\r\n \r\n while($row = mysqli_fetch_array($result3, MYSQLI_ASSOC)) {\r\n \r\n if($comment_id!=$row[\"comment_id\"]){\r\n \r\n $comment_id=$row[\"comment_id\"];\r\n \r\n $comment= $row[\"comment\"];\r\n $lang_code= $row[\"lang_code\"];\r\n \r\n // $firstChar= $_GET['letter'];\r\n \r\n ?>\r\n <div id=\"comment_<?php echo $comment_id;?>\" class=\"d-inline-flex p-0 bd-highlight comment <?php echo $lang_code ?>\">\r\n <b><?php echo \"$comment\";?></b><span><small><?php echo \"[$lang_code]\"; ?></small></span>\r\n </div>\r\n \r\n <?php\r\n }else{\r\n \r\n }\r\n \r\n \r\n \r\n \r\n \r\n \r\n // BELOW IS THE CLOSING BRACKET OF THE WHILE STATEMENT IN comments \r\n }\r\n // ABOVE IS THE CLOSING BRACKET OF THE WHILE STATEMENT IN comments \r\n \r\n \r\n \r\n //close the result set\r\n mysqli_free_result($result3);\r\n \r\n }else{\r\n // echo \"<p>Não foram encontrados resultados para a busca vid.</p>\";\r\n }\r\n \r\n }else{\r\n echo \"<p>Não foi possível executar: $sql3. \" . mysqli_error($link) .\"</p>\";\r\n }\r\n \r\n //END //comments //END\r\n}", "public function initialPartOfComment(){\n\t\t$minLimitCharacters = 15;\n\t\t$maxLimitCharacters = 40;\n\t\t//\n\t\t$commentLength = strlen($this->comment);\n\t\t\n\t\tif($commentLength == 0){\n\t\t\treturn 'Comment text is absent';\n\t\t}else if($commentLength > 0 && ($minLimitCharacters >= $commentLength)){\n\t\t\treturn $this->comment.' ...';\n\t\t}else{//Here is more characters than in $commentLength\n\t\t\t$percentage = $commentLength * 30 / 100;//30% from full length of comment. 30% = 50 characters\n\t\t\t$roundedCommentLength = round($percentage, 0, PHP_ROUND_HALF_UP);\n\t\t\t//x <= 15\n\t\t\tif($roundedCommentLength <= $minLimitCharacters){\n\t\t\t\treturn substr($this->comment, 0, $minLimitCharacters).' ...';\n\t\t\t\t//x > 15 && x <= 40\n\t\t\t}else if($roundedCommentLength > $minLimitCharacters){\n\t\t\t\t//Here more than 50 characters cut first 40\n\t\t\t\treturn substr($this->comment, 0, $maxLimitCharacters).' ...';\n\t\t\t}\n\t\t}\n\t}", "function validateComment ($comment) {\n if(notEmpty($comment)){ \n if (strlen($comment) > 3000) {\n return \"Your comment is too long.\";\n } \n } else {\n return \"Comment cannot be blank.\";\n }\n}", "public function ratings(){\n\t$comment_id = ee()->TMPL->fetch_param('comment_id');\t\n\tee()->db->select('knowledge,communication,attention,patience,fees,amount,session,anonymous');\n\tee()->db->where('comment_id',$comment_id);\n\t//ee()->db->where('parent_id',0);\n\t\n\t$query = ee()->db->get('mtt_ratings');\n\t\n\tif ($query->num_rows() > 0){\n\t\n\t$row = $query->row();\n\t\n\t$variables[] = array(\n\t\t'knowledge' => $row->knowledge,\n\t\t'communication' => $row->communication,\n\t\t'attention' => $row->attention,\n\t\t'patience' => $row->patience,\n\t\t'fees' => $row->fees,\n\t\t'amount' => $row->amount,\n\t\t'session' => $row->session,\n\t\t'anonymous' => $row->anonymous,\n\t\t'response'\t=> 'n'\n\t);\n\t\n\treturn ee()->TMPL->parse_variables(ee()->TMPL->tagdata, $variables);\n\t}\n\t\n\t}", "function validComment($comment) {\n if (strlen($comment) > MAX_COMMENT)\n return \"Comment too long.\";\n if (strlen($comment) < 1)\n return \"No empty comments allowed.\";\n return $comment;\n }", "function addComment($mysqli, $replyString, $replyStringCID, $username){\n //search for the content made with timestamp timestampCID\n $result = $mysqli->query(\"SELECT CID,PermissionType,GroupID FROM Content WHERE replyString='\".$replyStringCID.\"';\");\n $first_row = mysqli_fetch_row($result);\n if(is_bool($first_row[0])){\n return 'addComment: There is no such content which has this string as content: '.$replyStringCID;\n }\n\n //get user and see if exists\n $result2 = $mysqli->query(\"SELECT UID FROM User_ WHERE Username='\".$username.\"';\");\n $first_row_2 = mysqli_fetch_row($result2);\n if(is_bool($first_row_2[0])){\n return 'addComment: There is no such user that has this username: '.$username;\n }\n\n if($first_row[2]!=''){\n return 'addComment: Content comes from a group. Cannot comment on some content from a group.';\n }\n\n if($first_row[1]==0){\n return 'addComment: Content cannot be commented due to privilege level';\n }\n\n if($first_row[1]==1){\n //only comment is accepted. No links!\n if(strpos($replyString, \"www.\") !== false){\n return 'addComment: There is a link inside the comment; according to the privilege level, cannot be sent.';\n }\n }\n $timestamp = time();\n $mysqli->query(\"INSERT INTO Comment (CID, replyString, TimeStamp) VALUES (\".$first_row[0].\",'\".$replyString.\"',\".$timestamp.\");\");\n //find CoID of just added entity\n $result3 = $mysqli->query(\"SELECT CoID FROM Comment WHERE TimeStamp=\".$timestamp.\";\");\n $first_row_3 = mysqli_fetch_row($result3);\n $mysqli->query(\"INSERT INTO Post_Comment (CoID, UID) VALUES (\".$first_row_3[0].\",\".$first_row_2[0].\");\");\n return 'addComment: '.$mysqli->error;\n\n }", "function getCommentErrors() {\n\tglobal $_zp_comment_error;\n\tif (isset($_zp_comment_error)) {\n\t\tswitch ($_zp_comment_error) {\n\t\t\tcase 0: return false;\n\t\t\tcase -10: return gettext('You must supply the street field');\n\t\t\tcase -11: return gettext('You must supply the city field');\n\t\t\tcase -12: return gettext('You must supply the state field');\n\t\t\tcase -13: return gettext('You must supply the country field');\n\t\t\tcase -14: return gettext('You must supply the postal code field');\n\t\t\tcase -1: return gettext(\"You must supply an e-mail address.\");\n\t\t\tcase -2: return gettext(\"You must enter your name.\");\n\t\t\tcase -3: return gettext(\"You must supply a WEB page URL.\");\n\t\t\tcase -4: return gettext(\"CAPTCHA verification failed.\");\n\t\t\tcase -5: return gettext(\"You must enter something in the comment text.\");\n\t\t\tcase 2: return sprintf(gettext('Your comment has been marked for moderation by the <em>%s</em> SPAM filter.'),getOption('spam_filter'));\n\t\t\tcase\t 3: return sprintf(gettext('Your comment was rejected by the <em>%s</em> SPAM filter.'),getOption('spam_filter'));\n\t\t\tdefault: return sprintf(gettext('Comment error \"%d\" not defined.'), $_zp_comment_error);\n\t\t}\n\t}\n\treturn false;\n}", "function DisplayRating($comment) {\n $rating = get_comment_meta(get_comment_ID(), 'crfp-rating', true);\n if ($rating == '') $rating = 0;\n return $comment.'<div class=\"crfp-rating crfp-rating-'.$rating.'\"></div>'; \n }", "function weight_factor($section, $rating_rules){\r\n\t$weight_fact = 1 ;\r\n\tforeach($rating_rules as $kew=> $val){\r\n\t\tif(!empty($section) & $val['RatingRule']['section'] == $section){\r\n\t\t\t$weight_fact=$val['RatingRule']['Weight_factor'];\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\treturn ($weight_fact);\r\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
bsdiff: usage: bsdiff oldfile newfile patchfile
protected function patch(string $old, string $new, string $patchfile) { if(function_exists('bsdiff_diff')) { ini_set('memory_limit', '0'); Log::write("call bsdiff_diff", Log::DEBUG); return bsdiff_diff($old, $new, $patchfile); } $cmd = "/usr/bin/bsdiff {$old} {$new} {$patchfile}"; shell_exec($cmd); Log::write($cmd, Log::EMERG); Log::write($new, Log::EMERG); Log::write($patchfile, Log::EMERG); return is_file($patchfile); }
[ "function xdiff_file_bpatch($file, $patch, $dest)\n{\n}", "function xdiff_file_bdiff(string $old_file, string $new_file, string $dest): bool {}", "function MakePatch($progname, $v1, $v2, $paks1, $paks2)\r\n{\r\n // Available packages for prog1: print_r($paks1);\r\n // Available packages for prog2: print_r($paks2);\r\n \r\n $v1 = preg_replace('/(-----)*$/', '', $v1);\r\n $v2 = preg_replace('/(-----)*$/', '', $v2);\r\n \r\n $v1string = preg_replace('/\\.$/', '', preg_replace('|(.....)|e', '(str_replace(\"-\",\"\",\"$1\")).\".\"', $v1));\r\n $v2string = preg_replace('/\\.$/', '', preg_replace('|(.....)|e', '(str_replace(\"-\",\"\",\"$1\")).\".\"', $v2));\r\n \r\n $files1 = Array();\r\n foreach($paks1 as $ext)\r\n $files1[] = $progname . '-' . $v1string . '.' . $ext;\r\n\r\n $files2 = Array();\r\n foreach($paks2 as $ext)\r\n $files2[] = $progname . '-' . $v2string . '.' . $ext;\r\n \r\n $keeplist = array_merge($files1, $files2);\r\n $dir1 = Open($files1, $keeplist);\r\n $dir2 = Open($files2, $keeplist);\r\n \r\n $patchname = \"patch-$progname-$v1string-$v2string\";\r\n \r\n MakeDiff($dir1, $dir2, $patchname);\r\n \r\n GoTmp();\r\n \r\n $cmd = \"gzip -9 \".shellfix($patchname);\r\n print \"\\t$cmd\\n\";\r\n exec($cmd);\r\n \r\n $cmd = \"gzip -d < \".shellfix($patchname). \".gz | bzip2 -9 > \".shellfix($patchname).\".bz2\";\r\n print \"\\t$cmd\\n\";\r\n exec($cmd);\r\n \r\n $cmd = \"mv -f \".shellfix($patchname).\".{gz,bz2} ../\";\r\n print \"\\t$cmd\\n\";\r\n exec($cmd);\r\n \r\n UnGoTmp();\r\n\r\n $cmd = \"touch -r\".shellfix($files2[0]).\" \".shellfix($patchname).\".{gz,bz2}\";\r\n print \"\\t$cmd\\n\";\r\n exec($cmd);\r\n\r\n $cmd = \"chown --reference \".shellfix($files2[0]).\" \".shellfix($patchname).\".{gz,bz2}\";\r\n print \"\\t$cmd\\n\";\r\n exec($cmd);\r\n\r\n global $argv;\r\n if(!$argv[3])\r\n {\r\n $cmd = 'ln -f '.shellfix($patchname).'.{gz,bz2} /WWW/src/arch/';\r\n print \"\\t$cmd\\n\";\r\n exec($cmd);\r\n }\r\n}", "public function diff()\n {\n $this->_patchName = 'patch-' . $this->_oldDirectoryName . str_replace($this->_options['module'], '', $this->_directoryName);\n print \"Making diff between $this->_oldDirectoryName and $this->_directoryName\\n\";\n system(\"diff -uNr $this->_oldDirectoryName $this->_directoryName > $this->_patchName\");\n\n // Search for binary diffs\n $this->_binaryDiffs = array();\n $handle = fopen($this->_patchName, 'r');\n if ($handle) {\n while (!feof($handle)) {\n // GNU diff reports binary diffs as the following:\n // Binary files ./locale/de_DE/LC_MESSAGES/imp.mo and ../../horde/imp/locale/de_DE/LC_MESSAGES/imp.mo differ\n if (preg_match(\"/^Binary files (.+) and (.+) differ$/i\", rtrim(fgets($handle)), $matches)) {\n $this->_binaryDiffs[] = ltrim(str_replace($this->_oldDirectoryName . '/', '', $matches[1]));\n }\n }\n fclose($handle);\n }\n system(\"gzip -9f $this->_patchName\");\n exec($this->_options['md5'] . ' ' . $this->_patchName . '.gz', $this->_patchMD5);\n }", "function external_diff($old, $new)\n{\n if(ini_get('safe_mode'))\n\treturn diff($old, $new);\n\n $origfn = tempnam(\"/tmp\", \"kawf\");\n $newfn = tempnam(\"/tmp\", \"kawf\");\n\n $origfd = fopen($origfn, \"w+\");\n $newfd = fopen($newfn, \"w+\");\n\n if($origfd && $newfd) {\n\tfwrite($origfd, implode(\"\\n\", $old).\"\\n\");\n\tfwrite($newfd, implode(\"\\n\", $new).\"\\n\");\n\n\tfclose($origfd);\n\tfclose($newfd);\n\n\t$diff = `diff -u $origfn $newfn`;\n }\n\n unlink($origfn);\n unlink($newfn);\n\n /* The first 2 lines don't mean anything to us since it's just temporary\n * filenames */\n return preg_replace(\"/^--- [^\\n]+\\n\\+\\+\\+ [^\\n]+\\n/\", \"\", $diff);\n}", "function _bandaid_patch($patches) {\n $processed_patches = array();\n foreach ($patches as $patch) {\n // Download the patch.\n $filename = _bandaid_download_file($patch['patch']);\n $patched = FALSE;\n $output = '';\n\n // Set up string placeholders to pass to dt().\n $dt_args = array(\n '@filename' => basename($filename),\n );\n\n // Test each patch style; -p1 is the default with git. See\n // http://drupal.org/node/1054616\n $patch_levels = array(1, 0);\n foreach ($patch_levels as $patch_level) {\n $checked = Git::applyCheck($filename, $patch_level);\n if ($checked) {\n // Apply the first successful style.\n $patched = Git::apply($filename, $patch_level);\n break;\n }\n }\n\n // In some rare cases, git will fail to apply a patch, fallback to using\n // the 'patch' command.\n if (!$patched) {\n foreach ($patch_levels as $patch_level) {\n // --no-backup-if-mismatch here is a hack that fixes some\n // differences between how patch works on windows and unix.\n if ($patched = drush_shell_exec(\"patch -p%s --no-backup-if-mismatch < %s\", $patch_level, $filename)) {\n break;\n }\n }\n }\n\n if ($output = drush_shell_exec_output()) {\n // Log any command output, visible only in --verbose or --debug mode.\n drush_log(implode(\"\\n\", $output));\n }\n\n if ($patched) {\n $processed_patches[] = $patch;\n $patch_url = $patch['patch'];\n\n drush_log(dt('Patched with @filename.', $dt_args), 'ok');\n $message = \"Patched with \" . $patch['patch'];\n if (!empty($patch['reason'])) {\n drush_log(dt('(@reason)', array('@reason' => $patch['reason'])), 'ok');\n $message = \"\\n\\n\" . $patch['reason'];\n }\n Git::add('.', TRUE);\n Git::commit($message);\n drush_op('unlink', $filename);\n }\n else {\n if (drush_get_option('ignore-failing', FALSE)) {\n drush_log(dt(\"Unable to patch with @filename, skipping.\", $dt_args), 'error');\n drush_op('unlink', $filename);\n\n }\n else {\n throw new BandaidError('PATCH_ERROR', dt(\"Unable to patch with @filename.\", $dt_args));\n }\n }\n }\n return $processed_patches;\n}", "function xdiff_file_bdiff_size(string $file): int {}", "function drush_drush_release_release_patch($tag0, $tag1, $path = NULL) {\n // By default, git pages with less. The pipe to cat avoids it without touching git global core.pager property.\n if (drush_get_option('svn', FALSE)) {\n $command = 'svn diff -r %s:%s --summarize | cat';\n } else {\n $command = 'git diff -F --name-status %s %s -- | cat';\n }\n drush_shell_exec($command, $tag0, $tag1);\n $diffed_files = drush_shell_exec_output();\n\n $added = array();\n $deleted = array();\n $modified = array();\n foreach ($diffed_files as $diff_file) {\n $diff = preg_split(\"/[\\s,]+/\", $diff_file);\n switch ($diff[0]){\n case 'A':\n $added[] = $diff[1];\n break;\n case 'D':\n $deleted[] = $diff[1];\n break;\n case 'M':\n $modified[] = $diff[1];\n break;\n }\n drush_log(dt(\"File %path has been %status.\", array('%path' => $diff[1], '%status' => $diff[0] == 'A' ? 'added' : 'modified')), 'debug');\n }\n\n $drupal_path = drush_locate_root();\n $patch_path = drush_cwd() .'/'. $path;\n $files_path = explode(DIRECTORY_SEPARATOR, $drupal_path);\n if (drush_get_option('no-trunk', FALSE)) {\n $files_path = array_splice($files_path, 0, count($files_path) - 1);\n }\n $files_path = implode(DIRECTORY_SEPARATOR, $files_path) . DIRECTORY_SEPARATOR;\n drush_mkdir($patch_path);\n drush_log(dt(\"%folder created\", array('%folder' => $patch_path)), 'debug');\n chdir($drupal_path);\n\n\n\n foreach ($added as $afile) {\n $folder = $patch_path .'/'. $afile;\n drush_mkdir(dirname($folder));\n drush_log(dt(\"%folder created\", array('%folder' => dirname($folder))),'debug');\n\n if (is_file($files_path . $afile)) {\n copy($files_path . $afile, $folder);\n }\n\n drush_log(dt(\"%file copied to %dir\", array('%file'=> $afile, '%dir'=>$folder)), 'debug');\n }\n foreach ($modified as $mfile) {\n $folder = $patch_path .'/'. $mfile;\n drush_mkdir(dirname($folder));\n drush_log(dt(\"%folder created\", array('%folder' => $folder)),'debug');\n copy($files_path . $mfile, $folder);\n drush_log(dt(\"%file copied to %dir\", array('%file'=> $mfile, '%dir'=>$folder)), 'debug');\n }\n if (!empty($deleted)) {\n $bash_header = \"#!/bin/sh\\n\";\n $rmfile .= $bash_header;\n $rmdirs = array();\n foreach ($deleted as $dfile) {\n drush_log(dt(\"%file removed\", array('%file' => $dfile)), 'debug');\n $rmfile .= \"rm -rf $dfile\\n\";\n drush_log(dirname($dfile) .\" folder being deleted\", 'debug');\n if (!file_exists(dirname($dfile))) {\n if (! in_array(dirname($dfile), $rmdirs)) {\n $rmdirs[] = dirname($dfile);\n drush_log(dt(\"%folder will be deleted.\", array('%folder' => dirname($dfile))), 'debug');\n }\n }\n }\n foreach ($rmdirs as $folder) {\n $rmfile .= \"rm -rf $folder \\n\";\n }\n if (!file_exists(\"$patch_path/scripts\")) {\n drush_mkdir(\"$patch_path/scripts\");\n }\n $fh = fopen(\"$patch_path/scripts/$path.sh\", 'w');\n fwrite($fh, $rmfile);\n fclose($fh);\n }\n\n if (drush_get_option('tar', FALSE)) {\n if (empty($path)) {\n $patch_path .= date('YmdHis');\n }\n drush_shell_cd_and_exec(dirname($patch_path), \"tar -cf %s %s\", $patch_path .'.tar', basename($patch_path));\n }\n}", "function xdiff_file_merge3(string $old_file, string $new_file1, string $new_file2, string $dest) {}", "function drush_bandaid_patch($patch = NULL, $project = NULL) {\n try {\n if (!$patch) {\n throw new BandaidError('NO_PATCH', dt('What do you suppose I should patch WITH?'));\n }\n _bandaid_check_php_version();\n\n $project = _bandaid_validate_project($project);\n if (empty($project['yaml'])) {\n $project['yaml'] = array(\n 'patches' => array(),\n );\n }\n chdir($project['dir']);\n\n // @todo this was wholesomely copied and adjusted from _bandaid_patch, need\n // to refactor things together again.\n $filename = _bandaid_download_file($patch);\n $patched = FALSE;\n $output = '';\n // Test each patch style; -p1 is the default with git. See\n // http://drupal.org/node/1054616\n $patch_levels = array(1, 0);\n foreach ($patch_levels as $patch_level) {\n $checked = Git::applyCheck($filename, $patch_level);\n if ($checked) {\n // Apply the first successful style.\n $patched = Git::apply($patch_level, $filename);\n break;\n }\n }\n\n // In some rare cases, git will fail to apply a patch, fallback to using\n // the 'patch' command.\n if (!$patched) {\n foreach ($patch_levels as $patch_level) {\n // --no-backup-if-mismatch here is a hack that fixes some\n // differences between how patch works on windows and unix.\n if ($patched = drush_shell_exec(\"patch -p%s --no-backup-if-mismatch < %s\", $patch_level, $filename)) {\n break;\n }\n }\n }\n\n if ($output = drush_shell_exec_output()) {\n // Log any command output, visible only in --verbose or --debug mode.\n drush_log(implode(\"\\n\", $output));\n }\n\n if (!$patched) {\n throw new BandaidError('PATCHING_FAILED');\n }\n drush_log(dt('Successfully patched.'));\n $new_patch = array(\n 'patch' => $patch,\n );\n\n $home = drush_get_option('home', NULL);\n if (is_null($home)) {\n $home = drush_prompt(dt(\"Issue (or other web page) of patch?\"), NULL, FALSE);\n }\n if (!empty($home)) {\n $new_patch['home'] = $home;\n }\n\n $reason = drush_get_option('reason', NULL);\n if (is_null($reason)) {\n if (!drush_get_option('no-editor', FALSE)) {\n $editor = drush_get_editor();\n $reason_file_name = drush_tempnam('bandaid_');\n $reason_content = \"\n\n# Patch: $patch\" . (!empty($home) ? \"\\n# Home: \" . $home : '') . \"\n# Enter your explanation for adding this patch above.\n# Lines staring with # will be removed\";\n file_put_contents($reason_file_name, $reason_content);\n drush_shell_exec_interactive($editor, $reason_file_name);\n $reason = explode(\"\\n\", file_get_contents($reason_file_name));\n $reason = array_filter($reason, function ($line) {\n return $line[0] != '#';\n }\n );\n $reason = trim(implode(\"\\n\", $reason));\n }\n else {\n // Fall back to using drush_prompt.\n $reason = drush_prompt(dt(\"Reason for patching?\"), NULL, FALSE);\n if (!empty($reason)) {\n $new_patch['reason'] = $reason;\n }\n }\n }\n\n if (!empty($reason)) {\n $new_patch['reason'] = $reason;\n }\n\n $project['yaml']['patches'][] = $new_patch;\n // Only switch to inline format at level 4.\n file_put_contents($project['yaml_file'], Yaml::dump($project['yaml'], 4, 2));\n }\n catch (BandaidError $e) {\n return $e->drushSetError();\n }\n}", "public function diffVersions($v1, $v2)\n {\n $cacheName = 'magediff.tmp';\n if (file_exists($cacheName)) {\n echo \"READING FROM CACHE...$cacheName\\n\";\n $data = file_get_contents($cacheName);\n $output = unserialize($data);\n }\n \n if (empty($output)) {\n if (!is_readable($v1)) {\n throw new Exception('Unable to read directory: '.$v1);\n }\n if (!is_readable($v2)) {\n throw new Exception('Unable to read directory: '.$v2);\n }\n $cmd = 'diff -rq '.escapeshellarg($v1).' '.escapeshellarg($v2);\n echo \"Running Command: `{$cmd}`....\\n\";\n exec($cmd, $output);\n file_put_contents($cacheName, serialize($output));\n }\n echo \"\\ngot this many lines...\".count($output).\"\\n\";\n foreach ($output as $line) {\n $diffPattern = '#^Files (.*) and (.*) differ$#';\n if (preg_match($diffPattern, $line, $matches)) {\n //FILE UPDATED\n $relPath = str_replace($v1, '', trim($matches[1]));\n //only add those files with non-trivial changes\n if ($this->_canIgnoreFileDiffs($matches[1], $matches[2]) == false) {\n $this->addFile(mageUpgrade::FILE_UPDATED, $relPath);\n }\n } else if (strpos($line, \"Only in {$v1}\") !== false) {\n $relPath = str_replace( \"Only in {$v1}\", '', $line);\n $this->addFile(mageUpgrade::FILE_DELETED, $relPath);\n } else if (strpos($line, \"Only in {$v2}\") !== false) {\n $relPath = str_replace(\"Only in {$v2}\", '', $line);\n $this->addFile(mageUpgrade::FILE_NEW, $relPath);\n }\n }\n $this->oldPath = $v1;\n $this->newPath = $v2;\n return $this;\n }", "function xdiff_string_patch_binary(string $str, string $patch): string\n{\n error_clear_last();\n $safeResult = \\xdiff_string_patch_binary($str, $patch);\n if ($safeResult === false) {\n throw XdiffException::createFromPhpError();\n }\n return $safeResult;\n}", "public function testDiffExitcode() {\n $workdir = $this->webroot() . '/sites/all/modules';\n $this->drush('dl', array('exif_custom-1.13'), array(), NULL, $workdir);\n\n // Check that a diff on a clean download returns with an exit-code of 0.\n $this->drush('bandaid-diff', array('exif_custom'), array(), NULL, $workdir, self::EXIT_SUCCESS);\n\n // Do a quick local modification.\n $content = file_get_contents($workdir . '/exif_custom/exif_custom.module');\n $content = \"\\$var = \\\"Local modification.\\\"; \\n\" . $content;\n file_put_contents($workdir . '/exif_custom/exif_custom.module', $content);\n\n // Check that we get an exit-code of 1 (EXIT_CODE_DIFF_DETECTED) when we\n // have a diff.\n $this->drush('bandaid-diff', array('exif_custom'), array(), NULL, $workdir, self::EXIT_CODE_DIFF_DETECTED);\n }", "public function testFileDiff() {\n\t\t$diffResponse = '\ndiff --git a/app/Console/Command/XmlShell.php b/app/Console/Command/XmlShell.php\nindex 419a2ab..c0aa714 100644\n--- a/app/Console/Command/XmlShell.php\n+++ b/app/Console/Command/XmlShell.php\n@@ -27,4 +27,4 @@ class XmlShell extends AppShell {\n \tpublic function import() {\n-\t\t$this->ImportXml->execute($this->_collectParameters());\n+\t\t$this->ImportXml->execute($this->__collectParameters());\n \t}';\n\n \t\t$expectedDiff = array(\n\t\t\t'hunks' => array(\n\t\t\t\t(int) 0 => array(\n\t\t\t\t\t(int) 0 => array(\n\t\t\t\t\t\t(int) 0 => ' ',\n\t\t\t\t\t\t(int) 1 => (int) 27,\n\t\t\t\t\t\t(int) 2 => (int) 27,\n\t\t\t\t\t\t(int) 3 => '\tpublic function import() {'\n\t\t\t\t\t),\n\t\t\t\t\t(int) 1 => array(\n\t\t\t\t\t\t(int) 0 => '-',\n\t\t\t\t\t\t(int) 1 => (int) 28,\n\t\t\t\t\t\t(int) 2 => null,\n\t\t\t\t\t\t(int) 3 => '\t\t$this-&gt;ImportXml-&gt;execute($this-&gt;_collectParameters());'\n\t\t\t\t\t),\n\t\t\t\t\t(int) 2 => array(\n\t\t\t\t\t\t(int) 0 => '+',\n\t\t\t\t\t\t(int) 1 => null,\n\t\t\t\t\t\t(int) 2 => (int) 28,\n\t\t\t\t\t\t(int) 3 => '\t\t$this-&gt;ImportXml-&gt;execute($this-&gt;__collectParameters());'\n\t\t\t\t\t),\n\t\t\t\t\t(int) 3 => array(\n\t\t\t\t\t\t(int) 0 => ' ',\n\t\t\t\t\t\t(int) 1 => (int) 29,\n\t\t\t\t\t\t(int) 2 => (int) 29,\n\t\t\t\t\t\t(int) 3 => '\t}'\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t),\n\t\t\t'hunks_def' => array(\n\t\t\t\t(int) 0 => array(\n\t\t\t\t\t'-' => array(\n\t\t\t\t\t\t(int) 0 => '27',\n\t\t\t\t\t\t(int) 1 => '4'\n\t\t\t\t\t),\n\t\t\t\t\t'+' => array(\n\t\t\t\t\t\t(int) 0 => '27',\n\t\t\t\t\t\t(int) 1 => '4'\n\t\t\t\t\t),\n\t\t\t\t\t'heading' => 'class XmlShell extends AppShell {'\n\t\t\t\t)\n\t\t\t),\n\t\t\t'less' => (int) 1,\n\t\t\t'more' => (int) 1\n\t\t);\n\t\t$this->Commit->engine = $this->getMock('SourceControl', array('getDiff'));\n\t\t$this->Commit->engine->expects($this->once())\n\t\t\t->method('getDiff')\n\t\t\t->with('b1bcad6cc5be9a89df080a810a03c81970ddcfb5', '3bf28d1fcf53f5b85e55d37e86d5954a738ac36c', 'app/Console/Command/XmlShell.php')\n\t\t\t->will($this->returnValue($diffResponse));\n\n\t\t$commit = $this->Commit->diff('b1bcad6cc5be9a89df080a810a03c81970ddcfb5', '3bf28d1fcf53f5b85e55d37e86d5954a738ac36c', 'app/Console/Command/XmlShell.php');\n\n\t\t$this->assertEquals($expectedDiff, $commit);\n\t}", "function diff($diff, $mode = 'autodetect')\n {\n }", "public function testGetDiffFile()\n {\n\n $diffs = $this->gitCommands->command('diff')->getDiffFile('test');\n\n $this->assertCount(1, $diffs,'Diff count does not equal expected 17. Actual:'.count($diffs).print_r($diffs,true));\n foreach ($diffs as $diff) {\n $this->assertInstanceOf(GitDiff::class, $diff);\n }\n }", "public function testDiffInfiniteLoop() {\n $from = explode(\"\\n\", file_get_contents(__DIR__ . '/fixtures/file1.txt'));\n $to = explode(\"\\n\", file_get_contents(__DIR__ . '/fixtures/file2.txt'));\n $diff_engine = new DiffEngine();\n $diff = $diff_engine->diff($from, $to);\n $this->assertCount(4, $diff);\n $this->assertEquals($diff[0], new DiffOpDelete([' - image.style.max_650x650']));\n $this->assertEquals($diff[1], new DiffOpCopy([' - image.style.max_325x325']));\n $this->assertEquals($diff[2], new DiffOpAdd([' - image.style.max_650x650', '_core:', ' default_config_hash: 3mjM9p-kQ8syzH7N8T0L9OnCJDSPvHAZoi3q6jcXJKM']));\n $this->assertEquals($diff[3], new DiffOpCopy(['fallback_image_style: max_325x325', '']));\n }", "private function filemtime_diff( $a, $b ) {\n\t\treturn filemtime( $a ) - filemtime( $b );\n\t}", "public function mergeModifiedFiles();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ SETTINGS: SITE DESCRIPTION
function description() { return \query\main::get_option( 'sitedescription' ); }
[ "function snax_admin_settings_general_section_description() {}", "function wpseo_save_description() {\n\twpseo_save_what( 'metadesc' );\n}", "public function getDESCRIPTION()\n {\n\t\treturn $this->getValue('site_description');\n }", "public function siteDescription()\n {\n $output = get_bloginfo('description', 'display');\n\n return apply_filters('novusopress_view_site_description_output', $output);\n }", "function alienship_do_site_description() {\n\n\t// Use H2 on home, paragraph elsewhere\n\t$element = is_front_page() || is_home() ? 'h2' : 'p';\n\n\t// Put it all together\n\t$description = '<' . $element . ' id=\"site-description\" class=\"site-description\">' . esc_html( get_bloginfo( 'description' ) ) . '</' . $element . '>';\n\n\t// Echo the description\n\techo apply_filters( 'alienship_site_description_content', $description );\n}", "function shop_isle_site_description_callback() {\n\tbloginfo( 'description' );\n}", "function hybrid_site_description() {\n\n\t/* If viewing the front page of the site, use an <h2> tag. Otherwise, use a <div> tag. */\n\t$tag = ( is_front_page() ) ? 'h2' : 'div';\n\n\t/* Get the site description. If it's not empty, wrap it with the appropriate HTML. */\n\tif ( $desc = get_bloginfo( 'description' ) )\n\t\t$desc = sprintf( '<%1$s id=\"site-description\"><span>%2$s</span></%1$s>', tag_escape( $tag ), $desc );\n\n\t/* Display the site description and apply filters for developers to overwrite. */\n\techo apply_atomic( 'site_description', $desc );\n}", "static function set_site_description($description) {\n\t\tself::$site_description = $description;\n\t}", "static function seo_description() {\n\t\tglobal $post;\n\t\t\n\t\t$seo_desc = get_field( 'nrd_seo_desc' );\n\t\t\n\t\tif ( !$seo_desc ) return;\n\t\t\n\t\techo '<meta name=\"description\" content=\"' . htmlspecialchars_decode( $seo_desc, ENT_QUOTES ) . '\"/>';\t\n\t}", "function get_site_description()\n\t{\n\t\tglobal $conn;\n\t\t\n\t\t$siteDescQ = \"SELECT infoData FROM misc_info WHERE infoName='siteDescription' LIMIT 1\";\n\t\t$siteDescR = mysql_query($siteDescQ, $conn);\n\t\t$siteDescD = mysql_fetch_assoc($siteDescR);\n\t\t\n\t\treturn htmlspecialchars(array_shift($siteDescD));\n\t}", "private function retrieve_sitedesc() {\n\t\tstatic $replacement;\n\n\t\tif ( ! isset( $replacement ) ) {\n\t\t\t$description = wp_strip_all_tags( get_bloginfo( 'description' ) );\n\t\t\tif ( $description !== '' ) {\n\t\t\t\t$replacement = $description;\n\t\t\t}\n\t\t}\n\n\t\treturn $replacement;\n\t}", "function snax_admin_settings_lists_section_description() {}", "public function getDescription() {\n\t\treturn Template::getSiteMetaDescription();\n\t}", "function change_site_description_markup() {\n\t$site_description = get_bloginfo( 'description' );\n\t$description_array = explode( ', ', $site_description );\n\t$html .= '<ul class=\"site-description\" itemprop=\"description\">';\n\tforeach($description_array as $description) {\n\t\t$html .= '<li>' . $description . '</li>';\n\t}\n\t$html .= '</ul>';\n\treturn $html;\n}", "public function plugin_settings_description() {\n\t\t\n\t\t$description = '<p>';\n\t\t$description .= sprintf(\n\t\t\t__( 'CleverReach makes it easy to send email newsletters to your customers, manage your subscriber lists, and track campaign performance. Use Gravity Forms to collect customer information and automatically add it to your CleverReach group. If you don\\'t have a CleverReach account, you can %1$ssign up for one here.%2$s', 'gravityformscleverreach' ),\n\t\t\t'<a href=\"http://www.cleverreach.com/\" target=\"_blank\">', '</a>'\n\t\t);\n\t\t$description .= '</p>';\n\t\t\n\t\tif ( ! $this->initialize_api() ) {\n\t\t\t\n\t\t\t$description .= '<p>';\n\t\t\t$description .= __( 'Gravity Forms CleverReach Add-On requires an API Key, with reading and writing authorization, which can be found on the API page under the Extras menu in your account settings.', 'gravityformscleverreach' );\n\t\t\t$description .= '</p>';\n\t\t\t\n\t\t}\n\t\t\t\t\n\t\treturn $description;\n\t\t\n\t}", "public function general_settings_section_description() {\n\t\techo '<p>General settings for Koken Sync.</p>';\n\t}", "public function blogdescription()\n\t{\n\n\t\tbloginfo('description');\n\n\t}", "function wpi_postform_metadescription(){\n\t\techo '<p>'.PHP_EOL;\n\t\twpi_postmeta_label('meta_description',__('Descriptions',WPI_META));\n\t\twpi_postmeta_input('meta_description');\n\t\techo '</p>'; ?>\n\t<p><?php _e('<strong>Tips: </strong> Make it descriptive and include relevant keywords or keyphrases, 25-30 words, no more than two sentences.',WPI_META);?></p>\n<?php\t\n}", "public function plugin_settings_description() {\n\n\t\t// Prepare base description.\n\t\t$description = sprintf(\n\t\t\t'<p>%s</p>',\n\t\t\tsprintf(\n\t\t\t\tesc_html__( 'CleverReach makes it easy to send email newsletters to your customers, manage your subscriber lists, and track campaign performance. Use Gravity Forms to collect customer information and automatically add it to your CleverReach group. If you don\\'t have a CleverReach account, you can %1$ssign up for one here.%2$s', 'gravityformscleverreach' ),\n\t\t\t\t'<a href=\"http://www.cleverreach.com/\" target=\"_blank\">', '</a>'\n\t\t\t)\n\t\t);\n\n\t\t// If API is not initialized, add message to description about how to get API key.\n\t\tif ( ! $this->initialize_api() ) {\n\n\t\t\t$description .= sprintf(\n\t\t\t\t'<p>%s</p>',\n\t\t\t\tesc_html__( 'Gravity Forms CleverReach Add-On requires an API Key, with reading and writing authorization, which can be found on the API page under the Extras menu in your account settings.', 'gravityformscleverreach' )\n\t\t\t);\n\n\t\t}\n\n\t\treturn $description;\n\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Deletes an existing PerfilPlano model. If deletion is successful, the browser will be redirected to the 'index' page.
public function actionDelete($IDplano) { $this->findModel(Yii::$app->user->getId(), $IDplano)->delete(); return $this->redirect(['index']); }
[ "public function actionDelete($IDperfil, $IDaula)\n {\n $this->findModel($IDperfil, $IDaula)->delete();\n\n return $this->redirect(['index']);\n }", "public function delete (){\n if(!isset($_GET[\"delete\"])){\n $tarea=new Tarea($this->conexion);\n $tarea->delete($_GET[\"idTarea\"]);\n }\n $id=$_GET[\"idProyecto\"];\n header('Location: index.php?controller=proyecto&action=proyectoVista&idProyecto='.$id);\n }", "public function actionEliminar() {\n $this->msg = \"Deporte no eliminado.\";\n if (isset($_POST['deporte']) && Validar::num_positivo($_POST['deporte'])) {\n $model = Deporte::findOne($_POST['deporte']);\n if ($model->delete()) {\n $this->msg = \"Deporte Eliminado con exito.\";\n }\n }\n return $this->redirect(['buscar', 'msg' => $this->msg]);\n }", "public function actionDelete() {\n $session = new session();\n \n $no_register_perkara = $session->get('no_register_perkara');\n $no_akta = $session->get('no_akta');\n $no_reg_tahanan = $session->get('no_reg_tahanan');\n \n PdmP47::deleteAll(['no_register_perkara'=>$no_register_perkara, 'no_akta'=>$no_akta, 'no_reg_tahanan'=>$no_reg_tahanan]);\n\n return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n //TODO реализуйте метод удаления данных\n //$this->findModel()->delete();\n\n //return $this->redirect(['index']);\n }", "public function actionDelete()\n {\n //$this->findModel($id)->delete();\n\t\t$intId = Yii::$app->request->post('id');\n\t\t$session = Yii::$app->session;\n\t\t$model = $this->findModel($intId);\n\t\t$model->status = 'Deleted';\n\t\tif($model->save()) {\n\t\t\t$session->setFlash('success', PROPTYPE_DEL_SUCC);\n\t\t} else {\n\t\t\t$session->setFlash('error', PROPTYPE_DEL_ERR);\n\t\t\t//print_r($model->getErrors());exit;\n\t\t}\n return $this->redirect(['index']);\n }", "public function actionDelete() {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n\n //return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $model= Paciente::find()->where(['id_paciente'=>$id])->one();\n $model->estado=-1;\n $model->save(false);\n //$this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n//\t\tUtTarifinfo::deleteAll(['id_tarifplan'=>$id]);\n//\t\t$model->delete();\n// return $this->redirect(['index']);\n }", "public function deleteAction($id) {\r\n// $form = $this->createDeleteForm($id);Request $request, \r\n// $form->bind($request);\r\n//\r\n// if ($form->isValid()) {\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('GestionEmploisBundle:PlanEtude')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find PlanEtude entity.');\r\n }\r\n\r\n $em->remove($entity);\r\n $em->flush();\r\n //}\r\n\r\n return $this->redirect($this->generateUrl('planetude'));\r\n }", "public function actionDelete($id)\n {\n $model=$this->findModel($id); \n \n $success=false;\n $success= \\backend\\models\\PlanFeatures::deleteAll(['planid'=>$id]);\n if($success){\n $model->delete();\n }\n return $this->redirect(['index']);\n }", "public function suppprojetAction()\n {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $id = (int) $this->_request->getParam('id');\n if ($id > 0) {\n\n $projetM = new Application_Model_EuProjetMapper();\n $projetM->delete($id);\n }\n\n $this->_redirect('/projet/listprojet');\n }", "public function deleteAction(){\n $this->title = 'Delete privilege';\n \n $form = new DeleteForm();\n $privilegeModel = new Privilege();\n \n if($this->getRequest()->isPost()){\n if($form->isValid($this->getRequest()->getPost())){\n $privilegeModel->deleteById($form->getValue('id'));\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The privilege was successfully deleted.',\n )\n );\n \n //Regenerate Flag and Flippers\n App_FlagFlippers_Manager::save();\n \n $this->_redirect('/privileges/');\n }\n }else{\n $id = $this->_getParam('id');\n $row = $privilegeModel->findById($id);\n \n if (empty($row)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-warning' => sprintf('We cannot find privilege with id %s', $id),\n )\n );\n $this->_redirect('/privileges/');\n }\n \n $form->populate($row->toArray());\n $this->view->item = $row;\n }\n \n $this->view->form = $form;\n }", "public function delete() {\n\t\tProjects::find($this->request->id)->delete();\n\t\treturn $this->redirect(['Projects::index', 'http:method' => 'GET']);\n\t}", "public function actionDelete($id)\n {\n $model = $this->findModel($id)->delete();\n\n return $this->redirect(['peminjaman/view', 'id_pinjam' => $model->id_pinjam ]);\n }", "function delete(){\n\n\t\t$IdUnidadRenta=$_GET['id'];\n\t\tUnidadesRentaModel::delete($IdUnidadRenta);\n\t\t$this->show();\n\t}", "public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n // TbDrugsubclass::deleteAll(['DrugClassID' => $id]);\n \n return $this->redirect(['index']);\n }", "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n $model = Pengalaman::findOne($id);\n var_dump($model);die();\n return $this->redirect(['//keterangan/updatepencaker','id'=>$model->id_daftar]);\n }", "public function deleteAction(Request $request)\n {\n\t\t\t$id = $request->query->get(\"id\");\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$plancargo = $em->getRepository(\"App:PlanCargo\")->find($id);\n $em->remove($plancargo);\n $em->flush();\n \n\n return $this->redirectToRoute('plancargo_index');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
ADD new transaction to affi_history table Require user ID, old solde, new solde, type of transaction, description Return true of false.
public function add_affi_history( $user_id, $commission, $old, $new, $type, $descr ){ $pdo = $this->_db->prepare('INSERT INTO `affi_history` (`user_id`, `commission`, `old_balance`, `new_balance`, `type`, `descr`, `date` ) VALUES ( :user_id, :commission, :old_balance, :new_balance, :type, :descr, NOW() )' ); $pdo->bindParam( ':user_id', $user_id ); $pdo->bindParam( ':commission', $commission ); $pdo->bindParam( ':old_balance', $old ); $pdo->bindParam( ':new_balance', $new ); $pdo->bindParam( ':type', $type ); $pdo->bindParam( ':descr', $descr ); return $pdo->execute(); }
[ "function addFundTransferHistory($username, $amount, $donation, $fee, $type, $isExternal) {\n $conn = connectToDBEnhanced();\n\n $sql = \"INSERT INTO fundTransferHistory(username, amount, transType, fee, externalTransfer, donation,time)\n VALUES('$username', $amount, $type, $fee, $isExternal, $donation, NOW())\";\n\n executeSql($conn, $sql);\n}", "function record_transaction($record)\n {\n \n //insert record into history table\n query(\"INSERT INTO history (trx_type,symbol,quantity,price,user_id) values (?,?,?,?,?)\",$record[\"trx_type\"],$record[\"symbol\"],$record[\"quantity\"],$record[\"price\"],$_SESSION[\"id\"]);\n \n \n \n }", "function insert_into_userdata_history()\n {\n if (!$this->connect()) {\n return false;\n }\n $sql = \"insert into geodesic_userdata_history\n\t\t\t\t\t(date_of_change,id,username,email,company_name,business_type,firstname,lastname,\n\t\t\t\t\taddress,address_2,zip,city,state,country,phone,phone2,fax,url,optional_field_1,\n\t\t\t\t\toptional_field_2,optional_field_3,optional_field_4,optional_field_5,optional_field_6,optional_field_7,\n\t\t\t\t\toptional_field_8,optional_field_9,optional_field_10)\n\t\t\t\t\tvalues (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n $query_data = array(time(),\n $this->old_user_data['id'],\n $this->old_user_data['username'],\n $this->old_user_data['email'],\n $this->old_user_data['company_name'],\n $this->old_user_data['business_type'],\n $this->old_user_data['firstname'],\n $this->old_user_data['lastname'],\n $this->old_user_data['address'],\n $this->old_user_data['address_2'],\n $this->old_user_data['zip'],\n $this->old_user_data['city'],\n $this->old_user_data['state'],\n $this->old_user_data['country'],\n $this->old_user_data['phone'],\n $this->old_user_data['phone2'],\n $this->old_user_data['fax'],\n $this->old_user_data['url'],\n $this->old_user_data['optional_field_1'],\n $this->old_user_data['optional_field_2'],\n $this->old_user_data['optional_field_3'],\n $this->old_user_data['optional_field_4'],\n $this->old_user_data['optional_field_5'],\n $this->old_user_data['optional_field_6'],\n $this->old_user_data['optional_field_7'],\n $this->old_user_data['optional_field_8'],\n $this->old_user_data['optional_field_9'],\n $this->old_user_data['optional_field_10']);\n\n $history_result = $this->db->Execute($sql, $query_data);\n if (!$history_result) {\n $this->log('Error adding entry to userdata history, check bridge connections. Debug: ' . $this->db->ErrorMsg(), true);\n return false;\n }\n return true;\n }", "public function testInsertingNewTransaction()\n {\n putenv('DB_CONNECTION=sqlite_testing');\n\n $user = factory(\\App\\User::class)->make();\n\n $this->be($user);\n\n $user->save();\n\n $item = factory(\\App\\item::class)->make();\n\n $item->save();\n\n Log::shouldReceive('info');\n\n $repository = new Repositories\\TransactionRepository(new Transaction);\n $repository->insert($user->email, $item->id, '', 0);\n\n $this->assertDatabaseHas('transactions', [\n 'email' => $user->email,\n 'item_fk'=>$item->id,\n 'tokens_spent'=>0\n ]);\n }", "function addToHistory($userId, \\DateTime $date, $amount, $error = false, $details = null, $plan=\"\") {\n $chargeHistory = new ChargeHistory();\n $em = $this->container->get('doctrine')->getEntityManager();\n\n $chargeHistory->setUserId($userId);\n $chargeHistory->setDueDate($date);\n $chargeHistory->setDate(new \\DateTime(\"now\"));\n $chargeHistory->setIsError($error);\n $chargeHistory->setDetails($details);\n $chargeHistory->setAmount($amount);\n $chargeHistory->setPlan($plan);\n\n $em->persist($chargeHistory);\n $em->flush();\n\n return $chargeHistory;\n }", "public function add_transactions()\n {\n $conn = $this->_connection;\n \n $values = array();\n $uplines = $this->uplines;\n \n $query = \"INSERT INTO commissions (cutoff_id,member_id,ibo_count,amount) VALUES \";\n \n foreach ($uplines as $upline) {\n $values[] = '('.$this->cutoff_id.','.$upline.',1,'.$this->payout_rate.')';\n }\n \n if (!empty($values)) {\n $query .= implode(', ', $values);\n }\n \n $command = $conn->createCommand($query);\n $result = $command->execute(); \n return $result;\n \n }", "function createPaymentHistory($amount , $user ,$mode , $desc ){\n $query = \"INSERT into payment_user_history (payment_user_history_amount ,\n payment_user_history_mode , payment_user_history_desc , payment_user_history_user)\n VALUES('$amount' ,'{$mode}' ,'{$desc}' , '{$user}') \" ;\n $res = mysqli_query($this->connection , $query) ; \n return $res ; \n }", "private function triggerAddedUserJobHistory() {\n if(!$this->getIsNewRecord()) {\n $userJob = self::model()->findByPk($this->id);\n\n if ($userJob instanceof UserJob and $userJob->status == $this->status and $userJob->user_id == $this->user_id)\n return false;\n }\n\n $userJobHistory = new UserJobHistory();\n $userJobHistory->job_id = $this->job_id;\n $userJobHistory->user_id = $this->user_id;\n $userJobHistory->status = $this->status;\n $userJobHistory->created_at = date(\"Y-m-d H:i:s\");\n $userJobHistory->save();\n return true;\n }", "function CreateTransAuditRecord($tranid, $trandesc, $username, $trantype, $tranamt, $compid) {\r\n $conn = conn();\r\n $sql = \"INSERT INTO `transactionaudit` (`TransId`,`TranType`, `TranAmt`, `TranDesc`,`CompanyId`,`UserName`, `TranDate`) VALUES ('$tranid','$trantype','$tranamt', '$trandesc','$compid', '$username', NOW()) \";\r\n if ($conn->exec($sql)) {\r\n //echo \"New record created successfully\";\r\n } else {\r\n //echo \"New record created successfully\";\r\n }\r\n $conn = NULL;\r\n }", "function createTransaction($con, $user, $movie, $type = \"reserved\")\n{\n $u = mysqli_real_escape_string($con, trim($user));\n $m = mysqli_real_escape_string($con, trim($movie));\n $t = mysqli_real_escape_string($con, trim($type));\n\n $query = \"INSERT INTO transactions (transctionType, lastUpdate, fkMovieID, fkUserID) VALUES ('$t', NOW(), $m, $u)\";\n $result = @mysqli_query ($con, $query); // Run the query.\n //if the transaction was sussesful\n if($result)\n {\n //updates movies\n $q = \"UPDATE movies SET available = 0 WHERE pKMovieID = $m\";\n $r = @mysqli_query($con, $q);\n return true;\n }\n else{\n return false;\n }\n}", "public function contract_info_add($data){\n\t\t$this->db->insert('employee_contract', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "public function add(): bool\n\t{\n\t\t$preparedData = $this->sqlHelper->prepareInsert($this->tableName, [\n\t\t\t'DATE_CREATE' => (new DateTime()),\n\t\t\t'UUID' => $this->uuid,\n\t\t]);\n\n\t\t$this->connection->queryExecute(\n\t\t\t\"INSERT IGNORE INTO $this->tableName (\" . $preparedData[0] . \") VALUES (\" . $preparedData[1] . \");\"\n\t\t);\n\t\t$rowsAffected = $this->connection->getAffectedRowsCount();\n\n\t\treturn $rowsAffected > 0;\n\t}", "public function contract_info_add($data){\r\n\t\t$this->db->insert('xin_employee_contract', $data);\r\n\t\tif ($this->db->affected_rows() > 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}", "function addToHistory($user, $content, $col) {\r\n $columns = \"(id, user_id, \" . $col . \")\";\r\n $values = \"(\" . str(uniqid()) . \", \" . str($user) . \", \" . str($content) . \")\";\r\n $query = \"INSERT INTO history \" . $columns . \" VALUES \" . $values . \";\";\r\n query($query, false);\r\n}", "public function addTyreHistory($tyreId) {\n global $REQUEST_DATA;\n\t\t$busId = trim($REQUEST_DATA['busNo']);\n\t\t$busReading = trim($REQUEST_DATA['busReading']);\n\t\t$purchaseDate = trim($REQUEST_DATA['purchaseDate']);\n\t\t$usedAsMainTyre = trim($REQUEST_DATA['usedAsMainTyre']);\n\t\t$placementReason = trim($REQUEST_DATA['placementReason']);\n\n\t\t $query = \"\tINSERT INTO tyre_history (tyreId,busId,busReadingOnInstallation,placementDate,usedAsMainTyre,placementReason) \n\t\t\t\t\tVALUES ($tyreId,$busId,$busReading,'$purchaseDate',$usedAsMainTyre,'$placementReason')\";\n \n\t\treturn SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query,\"Query: $query\");\n }", "function db_addNewRecordInTableLzaro_kitolt($userId, $timeWindowName, $testName, $time) {\n $ret = db_getUserDataRaw($userId, null, null, null);\n if(empty($ret)) return FALSE; else $userName = $ret['felh_nev'];\n\n $tid = db_getTimeWindowIdFromName($timeWindowName);\n\n $ret = db_getTestId($testName);\n if(empty($ret)) return FALSE; else $testId = $ret;\n\n global $conn;\n $stmt = $conn->prepare(\"INSERT INTO lzaro_kitolt\n VALUES (NULL, :uname, :tid, :testId, :secs, NOW())\");\n $stmt->bindParam(':uname', $userName);\n $stmt->bindParam(':tid', $tid);\n $stmt->bindParam(':testId', $testId);\n $stmt->bindParam(':secs', $time);\n $stmt->execute();\n return $conn->lastInsertId();\n}", "function new_operation($db, $operation) {\n $query = $db->prepare(\n \"INSERT INTO Operation(operation_type, amount, registered, account_id)\n VALUES(:operation_type, :amount, NOW(), :account_id)\"\n );\n $result = $query->execute([\n \"operation_type\" => $operation[\"operation_type\"],\n \"amount\" => $operation[\"amount\"],\n \"account_id\" => $operation[\"account_id\"]\n ]);\n return $result;\n}", "function add_new (\n $connection,\n $incubation_center_user_id\n ) {\n\n // Generating incubation center ID\n $utility = new utility;\n $ic_id = $utility->generate_secure_string ( \"ic_\", 10 );\n\n // Adding new incubation center\n $query_to_add_new_incubation_center = mysqli_query ( \n $connection,\n \" INSERT INTO \n incubation_centers ( \n incubation_center_id, \n incubation_center_user_id \n ) VALUES (\n '$ic_id', \n '$incubation_center_user_id'\n ) \"\n );\n\n // Added new incubation center\n if ( $query_to_add_new_incubation_center ) {\n\n // Incubation Center Information ID\n $ic_info_id = $utility->generate_secure_string ( \"ic_info_\", 10 );\n\n // Adding new incubation center info records\n $query_to_add_new_incubation_center = mysqli_query (\n $connection,\n \" INSERT INTO incubation_centers_info (\n incubation_center_info_id, \n incubation_center_id\n ) VALUES (\n '$ic_info_id', \n '$ic_id'\n ) \"\n );\n\n // Added new incubation center info record\n if ( $query_to_add_new_incubation_center )\n return true;\n }\n\n // Could not add, for some reason\n return false;\n }", "function add_transaction($id, $supplier, $receipt, $date, $type, $dateRecorded, $remarks, $transitems){\n $query = \"\";\n $insertSuccess = false;\n if($id == null){\n $query = \"INSERT INTO `transactions`(\n `tID`,\n `spID`,\n `tNum`,\n `tDate`,\n `tType`,\n `dateRecorded`,\n `tRemarks`\n )\n VALUES(NULL, ?, ?, ?, ?, ?, ?);\";\n $insertSuccess = $this->db->query($query, \n array($supplier, $receipt, $date, $type, $dateRecorded, $remarks));\n $id = $this->db->insert_id();\n }else{\n $query = \"UPDATE transactions \n SET \n spID = ?,\n tNum = ?,\n tDate = ?,\n tType = ?,\n dateRecorded = ?,\n tRemarks = ?\n WHERE\n tID = '?;\";\n $insertSuccess = $this->db->query($query, array($supplier, $receipt, $date, $type, $dateRecorded, $remarks, $id));\n }\n if($insertSuccess){\n $indexes = [];\n $count = 0;\n foreach($transitems as $item){\n if(!$this->addEdit_transactionItem($item, $id, $type)){\n array_push($indexes,$count);\n }\n $count++;\n }\n // echo json_encode(array(\"erredQ\" =>$indexes, \"data\"=> $transitems));\n return true;\n }\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Validates room availability at a given date and checks if movie is already scheduled
private function validateRoomAndMovie($room, $movie, $date, $time) { $scheduleRepository = $this->getRepository('schedule'); try { $schedules = $scheduleRepository->loadByProperties(['time' => $time, 'date' => $date]); } catch (\Exception $ex) { $this->addErrorMessage( 'We\'re sorry, something went terribly wrong while trying to schedule movie. Please try again later.' ); return $this->showSchedule(); } foreach ($schedules as $schedule) { if ($movie == $schedule->getMovieId() && $room == $schedule->getRoomId()) { return 'Movie is already scheduled with these dates. '; } else { if ($room == $schedule->getRoomId()) { return "Room {$room} is already booked. "; } } } }
[ "public function checkRoomAvailability_post()\n\t{\n\t\t$user_id\t\t\t= $this->input->post('user_id');\n\t\t$security_code\t\t= $this->input->post('security_code');\n\t\t$language\t\t\t= $this->input->post('language');\n\t\t$hotel_id\t\t\t= $this->input->post('hotel_id');\n\t\t$animal_id\t\t\t= $this->input->post('animal_id');\n\t\t$breed_id\t\t\t= $this->input->post('breed_id');\n\t\t$from_date\t\t\t= $this->input->post('from_date');\n\t\t$to_date\t\t\t= $this->input->post('to_date');\n\t\t\n\t\t//now check the security code\n\t\t$check_code=$this->checkSecurityCode_post($user_id, $security_code);\n\t\tif($check_code['status']==1)\n\t\t{\n\t\t\t//now check the room availability\n\t\t\t$data=array(\n\t\t\t\t\t\t'hotel_id'\t\t=> $hotel_id,\n\t\t\t\t\t\t'animal_id'\t\t=> $animal_id,\n\t\t\t\t\t\t'breed_id'\t\t=> $breed_id,\n\t\t\t\t\t\t'room_count>'\t=> 0);\n\t\t\t$result=$this->user_model->getRecord('room_availability', $data);\n\t\t\tif($result==0)\n\t\t\t{\n\t\t\t\t$post['message']=$language==0?\"no room available\":\"ناجح\";\n\t\t\t\t$post['status']=5;\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t//now check the room availability for date range\n\t\t\t\t$data1=array(\n\t\t\t\t\t\t'hotel_id'\t=> $hotel_id,\n\t\t\t\t\t\t'animal_id'\t=> $animal_id,\n\t\t\t\t\t\t'breed_id'\t=> $breed_id);\n\t\t\t\t$check_animal=$this->user_model->getRecord('allowed_pets', $data1);\n\t\t\t\tif($check_animal==0)\n\t\t\t\t{\n\t\t\t\t\t$post['message']=$language==0?\"pet not allowed\":\"الحيوانات الأليفة غير مسموح بها\";\n\t\t\t\t\t$post['status']=6;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$post['message']=$language==0?\"success\":\"ناجح\";\n\t\t\t\t\t$post['status']=1;\n\t\t\t\t}\n\t\t\t\t/*$post['message']=$language==0?\"success\":\"ناجح\";\n\t\t\t\t$post['status']=1;*/\n\t\t\t}\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$post['message']= $check_code['message'];\n\t\t\t$post['status']\t= $check_code['status'];\n\t\t}\n\t\techo json_encode($post);\n\t}", "public function has_reservation($date)\n\t{\n\t\t$is_reservation = Reservation::whereRoomId($this->attributes['room_id'])->where('list_type', 'Rooms')->where('type', 'reservation')->whereRaw('status!=\"Declined\"')->whereRaw('status!=\"Expired\"')->whereRaw('status!=\"Cancelled\"')->whereRaw('(checkin = \"'.$date.'\" or (checkin < \"'.$date.'\" and checkout > \"'.$date.'\")) ')->get()->count();\n if($is_reservation > 0) {\n return false;\n }\n else {\n return true;\n }\n\t}", "private function validateDate()\n {\n if (empty($this->scheduledDate)) {\n throw new \\Exception('Scheduled date is empty.', 401);\n }\n if ($this->scheduledDate <= Carbon::now()) {\n throw new \\Exception('Schedule cannot be set in the past.', 401);\n }\n }", "public function checkRoomAvailability($roomID);", "public function noReservationsAvailableCase1()\n\t{\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$this->assertFalse($reservation->save()); \n\t}", "private function __checkAdobeConnectMeetingSlots($date)\n {\n $range1 = strtotime(date('Y-m-d'));\n\t\t$range2 = strtotime(date('Y-m-d'). '+30days');\n\n\t\t$timeT1 = strtotime(date($date));\n\t\t$timeT2 = strtotime(date($date));\n\t\t$timeArray = array();\n\t\t$timeArray[] = date('Y-m-d', $timeT1);\n\t\twhile($timeT1 > strtotime(date('Y-m-d'). '-30days')) {\n\t\t\t$timeT1 = strtotime((date('Y-m-d', $timeT1).' -14days'));\n\t\t\tif($timeT1 >= $range1){\n\t\t\t\t$timeArray[] = date('Y-m-d',$timeT1);\n\t\t\t}\n\t\t}\n\t\twhile(strtotime(date('Y-m-d'). '+30days') > $timeT2) {\n\t\t\t$timeT2 = strtotime((date('Y-m-d', $timeT2).' +14days'));\n\t\t\tif($timeT2 <= $range2){\n\t\t\t\t$timeArray[] = date('Y-m-d',$timeT2);\n\t\t\t}\n\t\t}\n\t\t$data = $this->AdobeConnectMeeting->find('all');\t\t\n\t\t$availableSlots = array();\n\t\tforeach($data as $d) {\n\t\t\t$AdobeId = $d['AdobeConnectMeeting']['nmh'] % 4;\n\t\t\tswitch ($AdobeId) {\n\t\t\t\tcase 1:\n\t\t\t\t$slots = explode(',',Configure::read('SLOT_POSITION_FIRST'));\n\t\t\t\tforeach($slots as $position) {\n\t\t\t\t\t$usedSlots = $this->AvailableSlots->find('all',array('conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.nmh'=>$d['AdobeConnectMeeting']['nmh'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.slot_id'=>$position,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.date'=>$timeArray\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\tif(empty($usedSlots)){\n\t\t\t\t\t\t$availableSlots[][$d['AdobeConnectMeeting']['nmh']] = str_replace('t', '', $position);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t$slots = explode(',',Configure::read('SLOT_POSITION_SECOND'));\n\t\t\t\tforeach($slots as $position) {\n\t\t\t\t\t$usedSlots = $this->AvailableSlots->find('all',array('conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.nmh'=>$d['AdobeConnectMeeting']['nmh'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.slot_id'=>$position,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.date'=>$timeArray\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\tif(empty($usedSlots)){\n\t\t\t\t\t\t$availableSlots[][$d['AdobeConnectMeeting']['nmh']] = str_replace('t', '', $position);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t$slots = explode(',',Configure::read('SLOT_POSITION_THIRD'));\n\t\t\t\tforeach($slots as $position) {\n\t\t\t\t\t$usedSlots = $this->AvailableSlots->find('all',array('conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.nmh'=>$d['AdobeConnectMeeting']['nmh'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.slot_id'=>$position,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.date'=>$timeArray\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\tif(empty($usedSlots)){\n\t\t\t\t\t\t$availableSlots[][$d['AdobeConnectMeeting']['nmh']] = str_replace('t', '', $position);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t$slots = explode(',',Configure::read('SLOT_POSITION_FOURTH'));\n\t\t\t\tforeach($slots as $position) {\n\t\t\t\t\t$usedSlots = $this->AvailableSlots->find('all',array('conditions'=>array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.nmh'=>$d['AdobeConnectMeeting']['nmh'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.slot_id'=>$position,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'AvailableSlots.date'=>$timeArray\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\tif(empty($usedSlots)){\n\t\t\t\t\t\t$availableSlots[][$d['AdobeConnectMeeting']['nmh']] = str_replace('t', '', $position);\n\t\t\t\t\t}\t\t \t\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$slotArray = array();\n \t$finalArray = array();\n\t\tforeach($availableSlots as $xVal) {\n\t\t\tforeach($xVal as $key => $value){\t\t\t\t\t\n\t\t\t\tif(!in_array($value,$finalArray)){\n\t\t\t\t\tarray_push($finalArray,$value);\n\t\t\t\t\t$timing = $this->Adobeconnect->getSlotTimes('t'.$value);\n\t\t\t\t\t$slotArray[$value] = $key.';'.$timing;\n\t\t\t\t}\t\t\t \t\t\n\t\t\t}\t\t\t\t\t\n\t\t}\n\t\tksort($slotArray);\n\t\t$positionArray = array();\n\t\tforeach($slotArray as $x => $x_value) {\n\t\t\t$explodeData = explode(';',$x_value);\n\t\t\t$availSlot = $this->Encryption->encode($explodeData[0].':t'.$x);\n\t \t$positionArray[][$availSlot] = $explodeData[1];\n\t\t}\n\t\tif(!empty($positionArray)){\n\t\t\treturn $positionArray;\n\t\t}\n }", "function reserveRoom($user, $roomId, $day){\n\n\t\t\t$check = $this->isAvailable($roomId, $day);\n\n\t\t\tif( $check == true ){ //if the room on that day IS available,\n\t\t\t\t$result = $this->db->exec(\"UPDATE Room SET {$day}='{$user}' WHERE id={$roomId}\");\n\t\t\t\tif( $result < 1 ){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else { //otherwise, if the room on that day is NOT available,\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function checkValidAppoitmentDate($id){\n\t\t$sql = \"SELECT start_date FROM tbl_school_booking WHERE id=\".$id;\n\t\t$query = $this->db->query($sql);\n\t\tif($query->num_rows() > 0){\n\t\t\t$records = $query->row();\n\t\t\t$start_date = $records->start_date;\n\t\t\tif(strtotime($start_date) < strtotime(date('Y-m-d H:i:s'))){\n\t\t\t\treturn \"Please delete/update an appointment only for future date/time.\";\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "public function pasDeReservation($date){\n foreach($this->getReservations() as $res){\n if (($res->getEtat()!='Annulée')&&($res->getEtat()!='Soldée')&&($date>=$res->getDateArrivee())&&($date<$res->getDateDepart())){\n return false;\n }\n } \n return true;\n }", "function verify_scheduled($date_time)\n {\n // Acquiring scheduled date as time\n $date_scheduled = strtotime($date_time);\n\n // Acquiring today's date as time\n $date_issued = strtotime(date(\"Y-m-d\"));\n\n if ($date_issued > $date_scheduled) // If the issued date is before to the scheduled date...\n {\n return false; // The scheduled date would be past the issued date --> INVALID\n }\n else\n {\n return true; // The scheduled date would be before the issued date --> VALID\n }\n }", "function is_selected_date_and_room_not_available( $roomID, $from, $booking_ID = 0 ) {\n global $wpdb;\n \n $sql = $wpdb->prepare( \"SELECT count(*) FROM \".$wpdb->prefix.\"guest_calendar a JOIN \". $wpdb->prefix .\"bookings b ON a.booking_ID = b.booking_ID WHERE b.booking_status IN ('CONFIRMED', 'ARRIVED') AND a.room_type_ID = %d AND '%s' >= a.date_in AND '%s' < a.date_out AND a.booking_ID != %d\", $roomID, $from, $from, $booking_ID );\n\n return $wpdb->get_var( $sql );\n}", "public function check_already_booked($room_id, $start_date, $end_date) {\n\n\t\t//check room staus already booked or not\n\t\t$data = $this->payment_helper->price_calculation($room_id, $start_date, $end_date, '', '', '');\n\n\t\t$data = json_decode($data, TRUE);\n\n\t\t$result = @$data['status'];\n\n\t\tif ((isset($data['status'])) && ($result == 'Not available')) {\n\n\t\t\treturn 'Aready_booked';\n\t\t} else {\n\n\t\t\treturn 'Available';\n\n\t\t}\n\n\t}", "public function monitorBookingStatus()\n {\n $mrConfig = $this->mrConfig;\n $tmpBookingHandler = jomres_getSingleton('jomres_temp_booking_handler');\n $amend_contract = $tmpBookingHandler->getBookingFieldVal('amend_contract');\n\n // Let's see if the form is ready to be booked.\n\n if (!empty($this->requestedRoom) && $this->email != '') {\n $this->email_usage_check($this->email);\n if (!$this->email_address_can_be_used) {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_EMAIL_ALREADY_IN_USE', '_JOMRES_BOOKINGFORM_MONITORING_EMAIL_ALREADY_IN_USE', false, false)));\n }\n }\n\n if (get_showtime('include_room_booking_functionality')) {\n if ($this->mininterval == 1000) { // Probably a tariff wasn't found\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_SRP_WEHAVENOVACANCIES', '_JOMRES_SRP_WEHAVENOVACANCIES', false, false)));\n $this->resetPricingOutput = true;\n }\n\n if ($this->stayDays < $this->mininterval && !$amend_contract && $this->mininterval < 1000 && empty($this->requestedRoom)) {\n $this->resetPricingOutput = true;\n if ($mrConfig[ 'wholeday_booking' ] == '1') {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT1_WHOLEDAY', '_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT1_WHOLEDAY', false, false)).' '.$this->mininterval.' '.$this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT2', '_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT2', false).' '.($this->stayDays - 1)));\n } else {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT1', '_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT1', false, false)).' '.$this->mininterval.' '.$this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT2', '_JOMRES_BOOKINGFORM_MONITORING_BOOKING_TOO_SHORT2', false).' '.$this->stayDays));\n }\n\n if ($this->jrConfig[ 'useJomresMessaging' ] == '1') {\n $this->build_tariff_to_date_map();\n if ($mrConfig[ 'tariffmode' ] == '2') {\n foreach ($this->micromanage_tarifftype_to_date_map as $dates) {\n $prices = array();\n foreach ($dates as $date) {\n $prices[ $date[ 'mindays' ] ] = $date[ 'price' ];\n }\n foreach ($prices as $key => $val) {\n if ($val > 0) {\n if ($this->cfg_perPersonPerNight == '1') {\n $pernight = jr_gettext('_JOMRES_FRONT_TARIFFS_PPPN', '_JOMRES_FRONT_TARIFFS_PPPN', false);\n } else {\n $pernight = jr_gettext('_JOMRES_FRONT_TARIFFS_PN', _JOMRES_FRONT_TARIFFS_PN, false);\n }\n //echo ';jomresJquery.jGrowl(\\'' . jr_gettext( '_JOMRES_STAYFORAMINIMUMOF', _JOMRES_STAYFORAMINIMUMOF, false ) . \" \" . $key . \" \" . jr_gettext( '_JOMRES_NIGHTSFOR', _JOMRES_NIGHTSFOR, false ) . \" \" . output_price( $val ) . $pernight . '\\', { life: 20000 });';\n }\n }\n }\n }\n\n if ($mrConfig[ 'tariffmode' ] == '1') {\n foreach ($this->simple_tariff_to_date_map as $tariff) {\n if ($this->cfg_perPersonPerNight == '1') {\n $pernight = jr_gettext('_JOMRES_FRONT_TARIFFS_PPPN', '_JOMRES_FRONT_TARIFFS_PPPN', false);\n } else {\n $pernight = jr_gettext('_JOMRES_FRONT_TARIFFS_PN', '_JOMRES_FRONT_TARIFFS_PN', false);\n }\n //echo ';jomresJquery.jGrowl(\\'' . jr_gettext( '_JOMRES_STAYFORAMINIMUMOF', _JOMRES_STAYFORAMINIMUMOF, false ) . \" \" . $tariff[ 'mindays' ] . \" \" . jr_gettext( '_JOMRES_NIGHTSFOR', _JOMRES_NIGHTSFOR, false ) . \" \" . output_price( $tariff[ 'price' ] ) . \" \" . $pernight . '\\', { life: 20000 });';\n }\n }\n }\n }\n\n if (empty($this->requestedRoom) && $this->getSingleRoomPropertyStatus()) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_SRP_WEHAVENOVACANCIES', '_JOMRES_SRP_WEHAVENOVACANCIES', false, false)));\n }\n\n if (isset($this->number_of_free_rooms)) { // $this->number_of_free_rooms might not be set, it depends on the \"field\" sent\n if ($this->number_of_free_rooms == 0 && ($this->currentField == 'arrivalDate' || $this->currentField == 'departureDate' || $this->currentField == 'guesttype')) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_SRP_WEHAVENOVACANCIES', '_JOMRES_SRP_WEHAVENOVACANCIES', false, false)));\n }\n\n }\n\n if (!$this->checkArrivalDate($this->arrivalDate)) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_ARRIVALDATE_INVALID', '_JOMRES_BOOKINGFORM_MONITORING_ARRIVALDATE_INVALID', false, false)));\n }\n\n // if (!$this->checkDepartureDate($this->departureDate) )\n // {\n // $this->resetPricingOutput=true;\n // if ($mrConfig['wholeday_booking'] == \"1\")\n // $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_DEPARTUREDATE_INVALID_WHOLEDAY',_JOMRES_BOOKINGFORM_MONITORING_DEPARTUREDATE_INVALID_WHOLEDAY,false,false)));\n // else\n // $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_DEPARTUREDATE_INVALID',_JOMRES_BOOKINGFORM_MONITORING_DEPARTUREDATE_INVALID,false,false)));\n // }\n\n $numberOfGuestTypes = $this->getVariantsOfType('guesttype');\n\n // if ($this->is_forbidded()){\n // $this->resetPricingOutput = true;\n // $this->setMonitoring('Not allowed combination of guests');\n // }\n\n /*if ($this->all_forbidded && !$this->at_least_one_allowed){\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput('Not rooms available for the selected guest types.'));\n }*/\n\n \n $requestedRoom_count = count($this->requestedRoom);\n\n foreach ($numberOfGuestTypes as $r) {\n if (!$this->checkGuestVariantIdAndQty($r[ 'id' ], $r[ 'qty' ])) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_GUEST_TYPE_INCORRECT', '_JOMRES_BOOKINGFORM_MONITORING_GUEST_TYPE_INCORRECT', false, false)));\n }\n }\n\n if (!$this->jpd_check_if_all_forbidden() ) { \n $this->resetPricingOutput = true;#\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_JDP_NO_ROOMS_FOR_SELECTED_GUEST_TYPES', '_JOMRES_JDP_NO_ROOMS_FOR_SELECTED_GUEST_TYPES', false, false)));\n }\n\n if ($this->total_in_party < 1 && !empty($numberOfGuestTypes)) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_SELECT_GUEST_NUMBERS', '_JOMRES_BOOKINGFORM_MONITORING_SELECT_GUEST_NUMBERS', false, false)));\n }\n if (!empty($numberOfGuestTypes) && !$this->tariffsCanHostTotalInParty()) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_TOO_MANY_IN_PARTY_FOR_TARIFFS', '_JOMRES_BOOKINGFORM_MONITORING_TOO_MANY_IN_PARTY_FOR_TARIFFS', false, false)));\n }\n if ($this->total_in_party < $requestedRoom_count && !empty($numberOfGuestTypes)) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_MORE_ROOMS_THAN_GUESTS', '_JOMRES_BOOKINGFORM_MONITORING_MORE_ROOMS_THAN_GUESTS', false, false)));\n }\n //if ($this->total_in_party > $this->beds_available && count($result)>0 && count($this->requestedRoom ) > 0)\n\t /*OPE test added to correct wrong message when there is a black booking, beds_available is set in custom_code/dobooking.class.php in function checkPeopleNumbers, $totalFreeBeds = -1 */\t\n if ($this->total_in_party > $this->beds_available && !empty($numberOfGuestTypes) /*OPE start*/ && $this->beds_available != -1 /*OPE end*/) {\n $this->resetPricingOutput = true;\n if ($this->cfg_singleRoomProperty != '1') {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_TOO_MANY_GUESTS_FOR_BEDS', '_JOMRES_BOOKINGFORM_MONITORING_TOO_MANY_GUESTS_FOR_BEDS', false, false)));\n } else {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_SRP_WEHAVENOVACANCIES', '_JOMRES_SRP_WEHAVENOVACANCIES', false, false)));\n }\n }\n if (!empty($numberOfGuestTypes) && $requestedRoom_count > 0 && !$this->selectedRoomsCanHostTotalInParty()) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_CHOOSE_MORE_ROOMS', '_JOMRES_BOOKINGFORM_MONITORING_CHOOSE_MORE_ROOMS', false, false)));\n }\n\t\t\n\t /*OPE added */\n if (empty($this->rooms_list_style_roomstariffs) && empty($this->requestedRoom) ) {\n $this->resetPricingOutput = true;\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_SOLEATO_NO_ROOMS_FOR_SELECTED_TARIFF_OR_DATES', '_JOMRES_SOLEATO_NO_ROOMS_FOR_SELECTED_TARIFF_OR_DATES', false, false)));\n }\n\t\t\n if (empty($this->requestedRoom)) {\n $this->resetPricingOutput = true;\n if ($this->cfg_singleRoomProperty != '1') {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_BOOKINGFORM_MONITORING_SELECT_A_ROOM', '_JOMRES_BOOKINGFORM_MONITORING_SELECT_A_ROOM', false, false)));\n } else {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_COM_MR_QUICKRES_STEP4_TITLE', '_JOMRES_COM_MR_QUICKRES_STEP4_TITLE', false, false)));\n }\n }\n }\n\n if (!get_showtime('include_room_booking_functionality')) {\n $quantity = 0;\n if (!empty($this->third_party_extras)) {\n foreach ($this->third_party_extras as $tpe) {\n if (!empty($tpe)) {\n $quantity = 1;\n } // We don't care how many extras there are, so long as at least one has been selected.\n //$this->setPopupMessage(\"jintour \".serialize($this->third_party_extras));\n }\n }\n $extrasArray = explode(',', $this->extras);\n foreach ($extrasArray as $extra) {\n if ($extra != '') {\n $quantity = $quantity + $this->extrasquantities[ $extra ];\n }\n //$this->setPopupMessage($quantity);\n }\n if ($quantity == 0) {\n $this->setMonitoring($this->sanitiseOutput(jr_gettext('_JOMRES_AJAXFORM_EXTRAS_SELECT', '_JOMRES_AJAXFORM_EXTRAS_SELECT', false, false)));\n }\n }\n\n //$this->setPopupMessage('');\n\n if ($this->getMonitoringNumberOfMessages() == 0) {\n $this->ok_to_book = true;\n }\n }", "function check_rooms_availability(){ $continue=true;\n\t\t//-----------------------------------------------------------------------------------------\n\t\t$continue=$this->check_cut_off_period();\n\t\t//-----------------------------------------------------------------------------------------\n\t\tif($continue){\n\t\t\t$room_groups=$this->combine_similar_rooms(); //we might have 1 x Double, 3 x Double = so we want to check that 1+3 = 4 Doubles are available\n\t\t\tforeach($room_groups as $line_id=>$room){\n\t\t\t\t$sql=\"\n\t\t\t\tSELECT\ta.rate_id, a.date,\n\t\t\t\t\t\tb.room_id, b.alloc, b.booked, b.avail, b.room_price, b.adult_price, b.child_price, b.daily_price, b.weekly_price, b.min_stay, b.status,\n\t\t\t\t\t\tc.room_name, c.room_desc, c.room_image, c.p_max1, c.p_max2, c.p_max3, c.p_max4, c.opt_room\n\t\t\t\tFROM \t\n\t\t\t\t\t\troom_rates_tbl a, room_data_tbl b, rooms_tbl c\n\t\t\t\tWHERE \t\n\t\t\t\t\t\ta.business_id = \".$this->id.\" AND a.date>=\".$this->date1.\" AND a.date<\".$this->date2.\"\n\t\t\t\t\t\tAND a.rate_id = b.rate_id\n\t\t\t\t\t\tAND b.room_id = c.room_id\n\t\t\t\t\t\tAND c.status = 1\n\t\t\t\t\t\tAND b.room_id = \".$room->room_id.\"\n\t\t\t\tORDER BY a.rate_id, b.adult_price\n\t\t\t\t\"; \n\t\t\t\t$s=query($sql); //pre($sql);\n\t\t\t\twhile($continue && $one=fetch_object($s)){ //pre($one);\n\t\t\t\t\tif($one->avail >= $room->room_selected){\n\t\t\t\t\t\t//pre(\"DATE:\".$one->date.\", ROOM[\".$one->room_id.\"] \".$one->room_name.\" => [\".$one->avail.\"] AVAILABLE, REQUIRED [\".$room->room_selected.\"] OK \");\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//pre(\"DATE:\".$one->date.\", ROOM[\".$one->room_id.\"] \".$one->room_name.\" => [\".$one->avail.\"] AVAILABLE, REQUIRED [\".$room->room_selected.\"] =========> ERROR !!! NOT AVAILABLE\");\n\t\t\t\t\t\t$continue=false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//-----------------------------------------------------------------------------------------\n\t\treturn $continue;\n\t}", "public function testVotingScheduleSucceedsIfVotingStartDateIsOnNominationEndDate()\n {\n $nominationStartDate = Carbon::createFromFormat('Y-m-j H:i', '2017-11-01 09:00');\n $nominationEndDate = Carbon::createFromFormat('Y-m-j H:i', '2017-12-01 09:00');\n $votingStartDate = Carbon::createFromFormat('Y-m-j H:i', '2017-12-01 09:00');\n $votingEndDate = Carbon::createFromFormat('Y-m-j H:i', '2018-01-01 09:00');\n\n $schedule = VotingSchedule::create(\n NominationDates::create($nominationStartDate, $nominationEndDate),\n VotingDates::create($votingStartDate, $votingEndDate)\n );\n\n $this->assertEquals($schedule->nominations(), NominationDates::create($nominationStartDate, $nominationEndDate));\n $this->assertEquals($schedule->voting(), VotingDates::create($votingStartDate, $votingEndDate));\n }", "public function checkAvailableDate()\n\t{\n\t\t$result=false;\n\t\t$dateAv=$this->input->post('checkdate');\n\t\tforeach($dateAv as $item)\n\t\t{\n\t\t\tif($item==$this->input->post('Date'))\n\t\t\t{\n\t\t\t\t$result=true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($result == false)\n\t\t{\n\t\t\t$this->form_validation->set_message('checkAvailableDate', \"The selected date have no events\");\t\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function allows($userId,$date,$time) {\n\t if (isset($this->user_reservation_count)) {\n\t // we can pass in user_reservation_count for optimization purposes (i.e. rendering schedule)\n\t return ($this->user_reservation_count < $this->maximum);\n\t }\n\t else {\n \t\t// look at current reservations for this user for this schedule group\n \t\t$dbDate = date('Y-m-d',$date);\n \t\t$sql = \"SELECT COUNT(DISTINCT reservations.id) as id FROM reservations, schedules_groups \".\n \t\t\t\"WHERE reservations.user_id = {$userId} \".\n \t\t\t\"AND reservations.schedule_id = schedules_groups.schedule_id \".\n \t\t\t\"AND schedules_groups.group_id = {$this->schedulegroup_id} \".\n \t\t\t\"AND YEARWEEK(reservations.date) = YEARWEEK('{$dbDate}')\";\n \t\t$reservations = new DO_Reservations();\n \t\t$reservations->query($sql);\n \t\t$reservations->fetch();\n \t\t$count = $reservations->id;\n\n \t\t// if reservation count is less than maximum, return true, else, false.\n \t\treturn ($count < $this->maximum);\n\t }\n\t}", "public function checkAvailability($date) {\n $dateTime = DateTime::createFromFormat('d/m/Y', $date)->getTimestamp();\n $startDateTime = $this->startDate->getTimestamp();\n $endDateTime = $this->endDate->getTimestamp();\n return ($dateTime >= $startDateTime && $dateTime <= $endDateTime);\n }", "public static function GetRoomAvalibilityForWeek($arr_rooms, $year, $month, $day)\n\t{\n\t\t//echo '$year, $month, $day';\n\t\t$end_date = date('Y-m-d', strtotime('+7 day', strtotime($year.'-'.$month.'-'.$day)));\n\t\t$end_date = explode('-', $end_date);\n\t\t$year_end = $end_date['0'];\n\t\t$month_end = $end_date['1'];\n\t\t$day_end = $end_date['2'];\n\t\t\n\t\t$today = date('Ymd');\n\t\t$today_month = date('Ym');\n\t\t\t\t\n\t\tfor($i=0; $i<count($arr_rooms); $i++){\n\t\t\t$arr_rooms[$i]['availability'] = array('01'=>0, '02'=>0, '03'=>0, '04'=>0, '05'=>0, '06'=>0, '07'=>0, '08'=>0, '09'=>0, '10'=>0, '11'=>0, '12'=>0, '13'=>0, '14'=>0, '15'=>0,\n\t\t\t\t\t\t\t\t\t\t '16'=>0, '17'=>0, '18'=>0, '19'=>0, '20'=>0, '21'=>0, '22'=>0, '23'=>0, '24'=>0, '25'=>0, '26'=>0, '27'=>0, '28'=>0, '29'=>0, '30'=>0, '31'=>0);\n\t\t\t// exit if we in the past\n\t\t\tif($today_month > $year.$month) continue;\n\n\t\t\t// fill array with rooms availability\n\t\t\t// ------------------------------------\n\t\t\t$sql = 'SELECT * FROM '.TABLE_ROOMS_AVAILABILITIES.' WHERE room_id = '.(int)$arr_rooms[$i]['id'].' AND m = '.(int)$month;\n\t\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\t\t\t\n\t\t\tif($result[1] > 0){\n\t\t\t\tfor($d = (int)$day; (($d <= (int)$day+7) && ($d <= 31)); $d ++){\n\t\t\t\t\t$arr_rooms[$i]['availability'][self::ConvertToDecimal($d)] = (int)$result[0]['d'.$d];\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// fill array with rooms availability\n\t\t\t// ------------------------------------\n\t\t\tif($month_end != $month){\n\t\t\t\t$sql = 'SELECT * FROM '.TABLE_ROOMS_AVAILABILITIES.' WHERE room_id = '.(int)$arr_rooms[$i]['id'].' AND m = '.(int)$month_end;\n\t\t\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\t\t\t\n\t\t\t\tif($result[1] > 0){\n\t\t\t\t\tfor($d = 1; ($d <= (int)$day_end); $d ++){\n\t\t\t\t\t\t$arr_rooms[$i]['availability'][self::ConvertToDecimal($d)] = (int)$result[0]['d'.$d];\n\t\t\t\t\t}\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t///echo '<pre>';\n\t\t///print_r($arr_rooms[0]);\n\t\t///echo '</pre>';\n\t\t\t\t\n\t\treturn $arr_rooms;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the parent page
public function getParent(){ if($this->_parent === false){ if($this->idparent > 0) $this->_parent = Page::byAuto($this->idparent); } return $this->_parent; }
[ "public function page() {\n\t\tif($this->parent()->uid() === Modules::parentUid()) {\n\t\t\treturn $this->parent()->parent();\n\t\t} else {\n\t\t\treturn $this->parent();\n\t\t}\n\t}", "protected function get_parent_page() {\n if (!isset($this->parent_page)) {\n global $CFG, $CURMAN;\n require_once elispm::file('pmclasspage.class.php');\n $id = $this->required_param('id');\n $this->parent_page = new pmclasspage(array('id' => $id,\n 'action' => 'view'));\n }\n return $this->parent_page;\n }", "function getParent() {\n global $post; // load details about this page\n if ( is_page() && $post->post_parent ) { // test to see if the page has a parent\n return $post->post_parent; // return the ID of the parent post\n }\n return null; // ... the answer to the question is false\n}", "public function parent()\n\t{\n\t\tif ($this->parent_id) {\n\t\t\tif (is_null($this->parent)) {\n\t\t\t\t$parent = \\PagesRepository::retrieve($this->parent_id);\n\t\t\t\t$this->parent = \\App::make('Monal\\Pages\\Models\\FrontendPage', $parent);\n\t\t\t}\n\t\t}\n\t\treturn $this->parent;\n\t}", "function the_page_parent_id()\r\n\t{\r\n\t\tglobal $DBH;\r\n\t\t# Set new Page object\r\n\t\t$c = new Page( $DBH );\r\n\t\treturn $c->theParentId();\r\n\t\t\r\n\t}", "public static function get_parent_page() {\n\t\tglobal $post;\n\t\tif ( $post->post_parent ) {\n\t\t\t$ancestors = get_post_ancestors( $post->ID );\n\t\t\t$root = count( $ancestors ) - 1;\n\t\t\treturn $ancestors[ $root ];\n\t\t} else {\n\t\t\treturn $post->ID;\n\t\t}\n\t}", "function getPageParentID() {\n\tglobal $_zp_current_zenpage_page;\n\tif (is_Pages()) {\n\t\treturn $_zp_current_zenpage_page->getParentid();\n\t}\n}", "public function getActiveParentPage()\n {\n if (isset($this->activeParentMenuItem->entity_id)) {\n return Page::findOne(['id' => $this->parentMenuItem->entity_id, 'active' => 1]);\n }\n }", "public function parent_static_page() {\n\t\treturn self::query()->find_by( 'id', $this->found_on_id );\n\t}", "function cu_get_parent_page()\n{\n global $cu_parent_page;\n \n if (isset($cu_parent_page))\n {\n return $cu_parent_page;\n }\n \n if ($page = cu_get_current_page())\n {\n // if a Page\n if ($page->post_type == 'page')\n {\n // if parent most page\n if ($page->post_parent === 0)\n {\n $cu_parent_page = $page;\n return $cu_parent_page;\n }\n \n // else, get parent most page\n else\n {\n $ancestors = get_post_ancestors($page->ID);\n if (count($ancestors))\n {\n $ancestors = array_reverse($ancestors);\n $cu_parent_page = get_post($ancestors[0]);\n return $cu_parent_page;\n }\n }\n }\n }\n \n return null;\n}", "function get_admin_page_parent($parent_page = '')\n {\n }", "public function get_plugin_parent_page(): string\n {\n return $this->plugin_parent_page;\n }", "public function parent(): Page|Site|null\n {\n if (isset($this->parent)) {\n return $this->parent;\n }\n\n $parentPath = FileSystem::joinPaths(dirname($this->path()), '/');\n\n if ($parentPath === $this->site()->path()) {\n return $this->parent = $this->site();\n }\n\n return $this->parent = $this->site()->retrievePage($parentPath);\n }", "public function getParent() {\n $parentNode = $this->getNode()->getParent();\n if (!$parentNode) {\n throw new PageException('Parent node not found (my page id is ' . $this->getId() . ')');\n }\n $parent = $parentNode->getPage($this->getLang());\n if (!$parent) {\n throw new PageException('Parent page not found (my page id is ' . $this->getId() . ')');\n }\n return $parent;\n }", "public function getParentName() {\n\t\t\t$parent = new Page();\n\t\t\t$parent->loadByGUID($this->parent);\n\t\t\treturn $parent->name;\n\t\t}", "public function parent() {\n if ( $this->_parent ) return $this->_parent;\n if ( $this->post->post_parent == 0 ) return null;\n\n return $this->_parent = self::get_controller($this->post->post_parent);\n }", "public function parent_url() {\n\t\t$parent_post_id = $this->parent_post_id();\n\t\treturn $parent_post_id ? get_permalink( $parent_post_id ) : '';\n\t}", "public function getAddPageParent(): Page;", "public function parent() { return $this->post->post_parent; }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
param rssUrl: string return: list of Audio
public function findAll($rssUrl) { $rssStr = \file_get_contents($rssUrl); $root = new \SimpleXMLElement($rssStr); $list = array(); foreach ($root->channel->item as $item) { $audio = new Entity\Audio(); $audio->id = (string) $item->guid; $audio->title = (string) $item->title; $audio->audioUrl = (string) $item->enclosure['url']; $audio->description = (string) $item->description; $list[] = $audio; } return $list; }
[ "function asa_get_audio_category_list($xmlrpc_url) {\n\n $rc = @xmlrpc($xmlrpc_url, 'audio.getCategoryList');\n\n if ($rc !== FALSE) { // if xmlrpc call successful...\n return $rc; // return an array with the categories\n }\n else {\n eh_error(\"XMLRPC error retrieving audio category list: \" . xmlrpc_error_msg());\n return FALSE;\n }\n}", "public static function get_rss_tracks( $url, $episode_limit ) {\n\n\t\t$rss = self::fetch_feed( $url );\n\n\t\tif( is_wp_error( $rss ) )\n\t\t\treturn array();\n\n\t\t$transient = 'spp_cachesx_' . substr( preg_replace(\"/[^a-zA-Z0-9]/\", '', self::VERSION . $url ), -32 );\n\t\t\n\t\t// See if RAW XML is already available from SimplePie. Indicates when feed new/changed too.\n\t\tif ( $rss->get_raw_data() ) {\n\t\t\t\t$data = $rss->get_raw_data();\n\t\t\t\tset_transient( $transient, $data , HOUR_IN_SECONDS );\n\t\t}\n\t\telse {\t\n\t\t\tif( false === ( $data = get_transient( $transient ) ) ) {\n\t\t\t\t$data = wp_remote_retrieve_body ( wp_remote_get( $url ) );\n\n\t\t\t\tif ( !empty ( $data ) && !is_wp_error( $data ) )\n\t\t\t\t\tset_transient( $transient, $data , 5 * MINUTE_IN_SECONDS );\n\t\t\t}\n\t\t}\n\n\t\tif ( !empty ( $data ) )\n\t\t\t$xml = simplexml_load_string( $data );\t// URL file-access is disabled? HS1438\n\n\t\tif ( empty( $xml ) || empty( $data ) )\n\t\t\t$xml = simplexml_load_file( $url ); \t// Raw xml so we can fetch other data\n\n\t\t$base = new StdClass;\n\t\t$user = new StdClass;\n\n\t\t// Many of these fields are pulled from the data that soundcloud includes in their track player\n\t\t$attr = array( 'kind', 'id', 'created_at', 'user_id', 'duration', 'user_id', 'duration', 'commentable', 'state', 'original_content_size', 'sharing', 'tag_list', 'permalink', 'streamable', 'embeddable_by', 'downloadable', 'purchase_url', 'label_id', 'purchase_title', 'genre', 'title', 'description', 'label_name', 'release', 'track_type', 'key_signature', 'isrc', 'video_url', 'bpm', 'release_year', 'release_month', 'release_day', 'original_format', 'license', 'uri', 'user', 'permalink_url', 'artwork_url', 'waveform_url', 'stream_url', 'download_url', 'download_count', 'favoritings_count', 'comment_count', 'attachments_uri', 'episode_number', 'content' );\n\n\t\t$user_attr = array( 'id', 'kind', 'permalink', 'username', 'uri', 'permalink_url', 'avatar_url' );\n\n\t\tforeach( $attr as $a ) {\n\t\t\t$base->{$a} = '';\n\t\t}\n\n\t\tforeach( $user_attr as $a ) {\n\t\t\t$user->{$a} = '';\n\t\t}\n\n\t\t$base->user = $user;\n\n\t\t$channel = $xml->channel;\n\t\t$items = $channel->item;\n\n\t\t$tracks = array();\n\n\t\t$episode_number = count( $items );\n\t\t$i = 0;\n\n\t\tif( !is_wp_error( $rss ) ) {\n\t\t\n\t\t\trequire_once( SPP_PLUGIN_BASE . 'classes/download.php' );\n\n\t\t\tforeach ( $rss->get_items() as $item) {\n\t\t\t\t\n\t\t\t\t$enclosures = $item->get_enclosures();\n\t\t\t\t$enclosure = $item->get_enclosure();\n\n\t\t\t\tforeach( $enclosures as $enc ) {\n\t\t\t\t\tif( $enc->handler == 'mp3' ) {\n\t\t\t\t\t\t$enclosure = $enc;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t \t\t\t$track = clone( $base );\n\t\t\t\t$date = new DateTime( $item->get_date() );\n\n\t\t\t\t$track->id = $i;\n\t\t\t\t$track->title = $item->get_title();\n\t\t\t\t\n\t\t\t\t// Set the show notes based on user's selected option\n\t\t\t\t$advanced_options = get_option( 'spp_player_advanced');\n\t\t\t\t$show_notes = isset( $advanced_options['show_notes'] )\n\t\t\t\t\t\t\t? $advanced_options['show_notes'] : \"description\";\n\t\t\t\tswitch ($show_notes) {\n\t\t\t\t\tcase \"description\":\n\t\t\t\t\t\t$description = $item->get_description();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"content\":\n\t\t\t\t\t\t$description = $item->get_content();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"itunes_summary\":\n\t\t\t\t\t\t$description = $item->get_item_tags(\n\t\t\t\t\t\t\t\tSIMPLEPIE_NAMESPACE_ITUNES, 'summary');\n\t\t\t\t\t\t$description = strip_shortcodes($description[0][\"data\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"itunes_subtitle\":\n\t\t\t\t\t\t$description = $item->get_item_tags(\n\t\t\t\t\t\t\t\tSIMPLEPIE_NAMESPACE_ITUNES, 'subtitle');\n\t\t\t\t\t\t$description = strip_shortcodes($description[0][\"data\"]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$description = $item->get_description();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$description = strip_tags( $description, '<p><a>' );\n\t\t\t\t$track->description = self::scrub_html( $description );\n\n\t\t\t\t$item_link = $item->get_link();\n\t\t\t\t$track->permalink_url = is_null($item_link) ? \"\" : $item_link;\n\t\t\t\t$track->uri = is_null($item_link) ? \"\" : $item_link;\n\t\t\t\t$track->stream_url = $enclosure->link;\n\t\t\t\t$track->download_url = $enclosure->link;\n\t\t\t\t$track->duration = $enclosure->duration;\n\t\t\t\t$track->created_at = $date->format( 'Y/m/d h:i:s O' );\n\t\t\t\t\n\t\t\t\t// HS4058: The string '?#' was being appended to the enclosure's link\n\t\t\t\tif( substr( $track->stream_url, -2) == \"?#\" ) {\n\t\t\t\t\t$track->stream_url = substr( $track->stream_url, 0, -2 );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$track->artwork_url = (string) $channel->image->url;\n\t\t\t\tif ( stripos( $track->artwork_url, \"http://i1.sndcdn.com\" ) !== FALSE )\n\t\t\t\t\t$track->artwork_url = str_replace( \"http://i1.sndcdn.com\", \"//i1.sndcdn.com\", $track->artwork_url );\n\t\t\t\t\n\t\t\t\tif( $track->artwork_url == '' || empty( $track->artwork_url ) ) {\n\n\t\t\t\t\tif( is_array( $enclosure->thumbnails ) && !empty( $enclosure->thumbnails[0] ) && $enclosure->thumbnails[0] != '' ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$track->artwork_url = $enclosure->thumbnails[0];\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t$itunes_image = $rss->get_channel_tags( SIMPLEPIE_NAMESPACE_ITUNES, 'image' );\n\n\t\t\t\t\t\tif( is_array( $itunes_image ) ) {\n\t\t\t\t\t\t\t$track->artwork_url = $itunes_image[0]['attribs']['']['href'];\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$track->show_name = (string) $channel->title;\n\t\t\t\t$track->episode_number = $episode_number;\n\t\t\t\t$track->download_id = SPP_Download::save_download_id($enclosure->link);\n\n\t\t\t\tif( !empty( $track->stream_url ) && $track->stream_url != '' ) {\n\t\t\t\t\t$tracks[] = $track;\t\n\t\t\t\t\t$episode_number--;\n\t\t\t\t} else {}\n\n\t\t\t\t$i++;\n\t\t\t\t\n\t\t\t\t// Limit the number of episodes\n\t\t\t\tif( $episode_limit > 0 && $i >= $episode_limit )\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn $tracks;\n\t\t\n\t}", "function soundtrack() {\n if (empty($this->soundtracks)) {\n if (empty($this->page[\"Soundtrack\"])) $this->openpage(\"Soundtrack\");\n if ($this->page[\"Soundtrack\"] == \"cannot open page\") return array(); // no such page\n if (preg_match_all(\"/<li>(.*?)<\\/b><br>(.*?)<br>(.*?)<br>.*?<\\/li>/\",str_replace(\"\\n\",\" \",$this->page[\"Soundtrack\"]),$matches)) {\n $mc = count($matches[0]);\n for ($i=0;$i<$mc;++$i) $this->soundtracks[] = array(\"soundtrack\"=>$matches[1][$i],\"credits\"=>array(\n str_replace('href=\"/','href=\"http://'.$this->imdbsite.'/',$matches[2][$i]),\n str_replace('href=\"/','href=\"http://'.$this->imdbsite.'/',$matches[3][$i])));\n }\n }\n return $this->soundtracks;\n }", "private static function getLovedSongsFeed() \n {\n $url = sprintf(\"http://ws.audioscrobbler.com/2.0/user/%s/lovedtracks.rss\", self::$username);\n\n return $url;\n }", "function list_audio($json=false)\n {\n $files=array();\n //have a wee look on the hard drive\n $it = new RecursiveDirectoryIterator(MUSIC_DIRECTORY);\n foreach(new RecursiveIteratorIterator($it) as $file)\n {\n if (end(explode( '.', $file->getFilename())) == 'mp3')\n {\n $files[]=array(\n 'name' => $file->getFilename(),\n 'path' => $file->getPathname()\n );\n\n }\n }\n\n if ($json)\n {\n return json_encode($files);\n }\n else\n {\n return $files;\n }\n }", "public function setAudio($url);", "function GetAllItems() {\n $curl = curl_init();\n // curl needs some options to work properly.\n curl_setopt_array($curl, Array(\n CURLOPT_URL => 'http://www.nu.nl/rss/Algemeen',\n CURLOPT_USERAGENT => 'spider',\n CURLOPT_TIMEOUT => 120,\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_RETURNTRANSFER => TRUE,\n CURLOPT_ENCODING => 'UTF-8'\n ));\n // get the items\n $data = curl_exec($curl);\n // we don't need a connection to stay open. close it.\n curl_close($curl);\n\n // step 2\n $items = array(); // store all items in $items\n $xml = simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA); // xml will hold an object for every xml item\n foreach ($xml->channel->item as $item) { // get one xml item\n $ri = new RssItem(\n (string) $item->title,\n (string) $item->children('dc', TRUE), // some items have a creator child element. get it.,\n (string) $item->pubDate,\n (string) $item->description,\n (string) $item->link ); // now create a new RssItem\n array_push($items, $ri); // ... and store it in the array\n }\n\n return $items;\n }", "public function parse($url) {\n $rss = call_user_func('fetch_rss',$url);\n return $rss;\n }", "function parse($url) {\n if (substr($url, 0, 7) != \"http://\") $url = \"http://$url\";\n $rss = file_get_contents($url);\n if (!$rss) return -1;\n if (strpos($rss, \"<rss\") === false) return -1;\n $rss = str_replace(\"&lt;/param&gt;</description>\", \"</description>\", $rss); //diary.ru fix\n $rss = str_replace(\"<![CDATA[\", \"\", $rss); \n $rss = str_replace(\"]]>\", \"\", $rss); \n $test = substr_count($rss, chr(208));\n if ($test > strlen($rss) / 30) { \n //it's utf-8\n } else {\n //we think it's windows-1251 encoding\n $rss = mb_convert_encoding($rss, \"UTF-8\", \"CP-1251\"); \n }\n $s = strpos($rss, \"<item\");\n $rss = substr($rss, $s, strlen($rss)-$s);\n preg_match_all(\"/<title>([^<]+)<\\/title>/\", $rss, $r[\"title\"]);\n preg_match_all(\"/<description>([^<]+)<\\/description>/\", $rss, $r[\"text\"]);\n preg_match_all(\"/<pubDate>([^<]+)<\\/pubDate>/\", $rss, $r[\"date\"]);\n preg_match_all(\"/<link>([^<]+)<\\/link>/\", $rss, $r[\"link\"]);\n $result = array();\n foreach ($r[\"title\"][1] as $i=>$e) {\n $txt = $r[\"text\"][1][$i];\n $txt = str_replace(\"&gt;\", \">\", $txt);\n $txt = str_replace(\"&lt;\", \"<\", $txt);\n $txt = str_replace('<a \"', '<a', $txt); //diary.ru fix\n $txt = str_replace(\"&amp;\", \"&\", $txt);\n $txt = str_replace('a style=\"color:#000000;font-weight:bold;\"', 'a class=\"diary_user\"', $txt); //diary.ru fix\n $item = array(\n \"title\"=>$r[\"title\"][1][$i], \n \"link\"=>$r[\"link\"][1][$i], \n \"text\"=>$txt, \n \"date\"=>strtotime($r[\"date\"][1][$i])\n );\n $result[] = $item;\n }\n return $result;\n }", "function getAudioAssets($params) {\n if (!is_array($params)) $params = array('id' => $params);\n $path_chunks = array('groups', $params['id'], 'audio-assets');\n $query_params = array();\n if (array_key_exists('limit', $params)) $query_params['max-results'] = $params['limit'];\n if (array_key_exists('offset', $params)) $query_params['start-index'] = $params['offset'] + 1;\n return $this->typepad->get($path_chunks, $query_params, 'List<Audio>');\n }", "function getSongList($dom) {\n $trackURLs = array();\n $songs = $dom->find('ul.song_list ',0);\n #print $songs; \n #print_r($songs);\n foreach($songs->find('li a') as $track) {\n #print $track->href . \"\\n\";\n $trackURLs[] = $track->href;\n #print $track->href. \"\\n\";\n }\n return $trackURLs;\n}", "public function get() {\n\n /* Get the Current Playlist */\n $list = $this->_vlc->get_tracks();\n\n if (!$list) { return array(); }\n $counterforarray = 0;\n // here we look if there are song in the playlist when media libary is used\n if ($list['node']['node'][0]['leaf'][$counterforarray]['attr']['uri']) {\n while ($list['node']['node'][0]['leaf'][$counterforarray]){\n $songs[] = htmlspecialchars_decode($list['node']['node'][0]['leaf'][$counterforarray]['attr']['uri'], ENT_NOQUOTES);\n $songid[] = $list['node']['node'][0]['leaf'][$counterforarray]['attr']['id'];\n $counterforarray++;\n }\n // if there is only one song look here,and media libary is used\n }\n elseif($list['node']['node'][0]['leaf']['attr']['uri']) {\n $songs[] = htmlspecialchars_decode($list['node']['node'][0]['leaf']['attr']['uri'], ENT_NOQUOTES);\n $songid[] = $list['node']['node'][0]['leaf']['attr']['id'];\n }\n // look for songs when media libary isn't used\n elseif ($list['node']['node']['leaf'][$counterforarray]['attr']['uri']) {\n while ($list['node']['node']['leaf'][$counterforarray]){\n $songs[] = htmlspecialchars_decode($list['node']['node']['leaf'][$counterforarray]['attr']['uri'], ENT_NOQUOTES);\n $songid[] = $list['node']['node']['leaf'][$counterforarray]['attr']['id'];\n $counterforarray++;\n }\n }\n elseif ($list['node']['node']['leaf']['attr']['uri']) {\n $songs[] = htmlspecialchars_decode($list['node']['node']['leaf']['attr']['uri'], ENT_NOQUOTES);\n $songid[] = $list['node']['node']['leaf']['attr']['id'];\n }\n\n else { return array(); }\n\n $counterforarray = 0;\n\n foreach ($songs as $key=>$entry) {\n $data = array();\n\n /* Required Elements */\n $data['id'] = $songid[$counterforarray]; // id number of the files in the vlc playlist, needed for other operations\n $data['raw'] = $entry;\n\n $url_data = $this->parse_url($entry);\n switch ($url_data['primary_key']) {\n case 'oid':\n $song = new Song($url_data['oid']);\n $song->format();\n $data['name'] = $song->f_title . ' - ' . $song->f_album . ' - ' . $song->f_artist;\n $data['link'] = $song->f_link;\n break;\n case 'demo_id':\n $democratic = new Democratic($url_data['demo_id']);\n $data['name'] = T_('Democratic') . ' - ' . $democratic->name;\n $data['link'] = '';\n break;\n case 'random':\n $data['name'] = T_('Random') . ' - ' . scrub_out(ucfirst($url_data['type']));\n $data['link'] = '';\n break;\n default:\n /* If we don't know it, look up by filename */\n $filename = Dba::escape($entry);\n $sql = \"SELECT `name` FROM `live_stream` WHERE `url`='$filename' \";\n\n $db_results = Dba::read($sql);\n if ($row = Dba::fetch_assoc($db_results)) {\n //if stream is known just send name\n $data['name'] = htmlspecialchars(substr($row['name'], 0, 50));\n\n }\n //if it's a http stream not in ampacha's database just show the url'\n elseif ( strncmp($entry, 'http', 4)== 0) {\n $data['name'] = htmlspecialchars(\"(VLC stream) \" . substr($entry, 0, 50));\n }\n //if it's a file get the last output after and show that, hard to take every output possible in account\n else {\n $getlast = explode(\"/\",$entry);\n $lastis = count($getlast) - 1;\n $data['name'] = htmlspecialchars(\"(VLC local) \" . substr($getlast[$lastis], 0, 50));\n } // end if loop\n break;\n } // end switch on primary key type\n\n $data['track'] = $key+1;\n $counterforarray++;\n $results[] = $data;\n\n } // foreach playlist items\n\n return $results;\n\n }", "static protected function __get_items($url){\n\t\tif (!array_key_exists($url, self::$feeds)){\n\t\t\tself::$feeds[$url] = self::__new_feed($url);\n\t\t}\n\t\tif (!self::$feeds[$url]['failed']){\n\t\t\treturn self::$feeds[$url]['simplepie']->get_items();\n\t\t}else{\n\t\t\treturn array();\n\t\t}\n\n\t}", "function parseaudio($itemID)\n{\n\n $rootdirectory = \"audio\";\n $rooturl = \"http://wrecked-distro.com\";\n $username = $_SESSION[\"username\"];\n\n dbConnect();\n\n $sql = \"SELECT * FROM items WHERE itemID = $itemID\";\n $result = mysql_query($sql);\n\n if ($myrow=mysql_fetch_array($result))\n {\n // create directory path\n\n $audiodirectory = strtolower($rootdirectory.\"/\".$myrow[\"folder\"]);\n\n if (is_dir($audiodirectory))\n {\n\t// open directory\n\n $d = dir($audiodirectory);\n\n\t// read through directory\n\twhile ($entry=$d->read())\n\t{\n\t // break filename into folder name and remainder\n \n\t list($folder,$remainder) = explode(\"-\",$entry);\n\n\t // break remainder of filename into the track title and the file extension\n\n\t list($trackname,$extension) = explode(\".\",$remainder); \n\n\t if ($extension == \"mp3\")\n\t {\n//\t\t$list = $list.\"<content:encoded><![CDATA[\".$myrow[\"description\"].\"<a href=\\\"$rooturl/$audiodirectory/$entry\\\">$trackname</a>]]></content:encoded>\\n\"; \n//\t\t$list = $list.\"<enclosure url='$rooturl/$audiodirectory/$entry' type='audio/mpeg'/ length='3000000'>\\n\";\n\t };\n\n };\n\techo $list;\n \t$d->close(); };\n };\n}", "protected function parse()\n\t{\n\t\t$rss = simplexml_load_file($this->feed);\n\t\tforeach ($rss->channel->item as $item) {\n\t\t $link = $item->link;\n\t\t $title = $item->title;\n\t\t $media = $item->children('http://search.yahoo.com/mrss/'); // Access the \"media:\" namespace\n\t\t $thumb = $media->thumbnail->attributes(); // Access the attributes of the \"media:thumb\" tag\n\t\t $thumbSRC = $thumb['url'];\n\t\t $width = $thumb['width'];\n\t\t $height = $thumb['height'];\n\t\t $imgSRC = str_replace('_s', '', $thumbSRC); // Creates a link to the medium-size image\n\n\t\t $photos[] = array($link, $title, $thumbSRC, $imgSRC, $width, $height);\n\t\t}\n\t\t\n\t\treturn $photos;\n\t}", "function RSS($rssURL){\n\t\tif(substr($rssURL, 0, 4) == 'http'){\n\t\t\t$feed = implode(file($rssURL));\n\t\t\t$xml = simplexml_load_string($feed);\n\t\t\t$json = json_encode($xml);\n\t\t\t// convert the string to a json object\n\t\t\t$jfo = json_decode($json);\n\t\t}\n\t\tif(substr($rssURL, 0, 4) == 'post'){\n\t\t\t$json_file = file_get_contents('posts.json');\n\t\t\t// convert the string to a json object\n\t\t\t$jfo = json_decode($json_file);\n\t\t}\n\t\treturn $jfo;\n\t}", "function parseRss($feedXml) \n {\n $data = array();\n\n $data['title'] = $feedXml->channel->title . '';\n $data['link'] = $feedXml->channel->link . '';\n $data['description'] = $feedXml->channel->description . '';\n $data['parser'] = __CLASS__;\n $data['type'] = 'rss';\n\n foreach ($feedXml->channel->item as $item) {\n $data['items'][] = array(\n 'title' => $item->title . '',\n 'link' => $item->link . '',\n 'description' => $item->description . '',\n );\n }\n \n return $data;\n }", "function getFeeds($feed_url) {\n /**\n * @access private\n * @var boolean\n */\n global $ok;\n try{\n set_time_limit(120); // set maximum execution time 120 seconds\n /**\n * @access private\n * @var SimpleXmlElement\n */\n $con= new SimpleXmlElement($feed_url,null,true); // Parse rss feed using this function \n if($con==true) { // check file is parse or not\n /**\n * @access private\n * @var DOMDocument\n */\n $doc = new DOMDocument();\n /**\n * @access private\n * @var array\n */\n $list=array();\n /**\n * @access private\n * @var array\n */\n $ns = $con->getNamespaces(true); // this function for namespace because encode use content space\n foreach($con->channel[0]->item as $item) // iterate rss feed\n {\n /**\n * @access private\n * @var string\n */ \n $title= $item->title; // get title from rss feed\n /**\n * @access private\n * @var string\n */\n $link= $item->link;\n /**\n * @access private\n * @var string\n */\n $content = $item->children($ns['content']); // get data from namespace 'content'\n /**\n * @access private\n * @var string\n */\n $cn=(string) trim($content->encoded); // parse tage name is encoded\n //echo $cn;\n /**\n * @access private\n * @var HtmlDocument\n */\n @$doc->loadHTML($cn); // load file in html \n /**\n * @access private\n * @var object\n */\n $tags = $doc->getElementsByTagName('img'); // get image url\n foreach ($tags as $tag) { // iterate images and take first\n $cur_encoding = mb_detect_encoding($title) ; \n if(($cur_encoding == \"UTF-8\" && mb_check_encoding($title,\"UTF-8\"))) {\n $title=iconv(\"UTF-8\", \"ASCII//TRANSLIT\", $title);\n // echo $title;\n }\n /**\n * @access private\n * @var string\n */ \n $img= $tag->getAttribute('src'); // take image url\n $img=str_replace(strstr($img, '?w'),\"\",$img); //remove extra character from url\n $img=str_replace(strstr($img, '?h'),\"\",$img); //remove extra character from url\n $img=str_replace(strstr($img, '?W'),\"\",$img); //remove extra character from url\n $img=str_replace(strstr($img, '?H'),\"\",$img); //remove extra character from url\n $text=$this->getSummary($doc); // get First 100 character from encoded tag\n array_push($list, array($title,$link,$img,$text)); // push array in another array\n break;\n }\n }\n return $list; // return array\n }\n else\n {\n $ok=false; // otherwise return false\n }\n }\n catch(Exception $e) {\n $ok=false; // if is there exception return false\n }\n }", "public function getTodayArticlesFrom ($url) {\n try {\n $slashdotRss = Reader::importString($this->curl($url));\n } catch (RuntimeException $e) {\n return [];\n }\n\n $items = [];\n\n foreach ($slashdotRss as $item) {\n try {\n if($item->getDateModified()->format('Y-m-d') != date(\"Y-m-d\")) {\n continue;\n }\n } catch (\\Exception $e) {\n // no date? no parsing\n continue;\n }\n\n $description = $item->getContent();\n\n // maybe it has a simple description\n if (empty($description)) {\n $description = $item->getDescription();\n }\n\n // cant do anything\n if (empty($description)) {\n continue;\n }\n $description = ltrim(explode(\"\\n\", $description)[0]);\n\n // get all text before the first link in the first line\n $pattern = '/<a[^>]+>.+/i';\n $replacement = '${1}';\n $description = preg_replace($pattern, $replacement, $description);\n $description = ltrim($description);\n $description = ltrim(substr($description, 0, -5));\n $link = $item->getLink();\n\n $entry = [\n 'title' => $item->getTitle(),\n 'url' => $link,\n 'html' => $this->getFullArticle($link, $description),\n ];\n\n // failed to grab the entire article\n if (empty($entry[\"html\"])) {\n continue;\n }\n\n $items[] = $entry;\n }\n\n return $items;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ function that loads one image from "tabObrazky" by $obrazekID, if the load fails returns null
public function nahrajObrazekByID($obrazekID){ $dotaz = "SELECT obrazekID,filepath,tabObrazky.uzivatelID,uzivatelJmeno FROM tabObrazky JOIN tabUzivatele ON tabUzivatele.uzivatelID = tabObrazky.uzivatelID WHERE obrazekID = ". $obrazekID; //echo "X ".$dotaz ." X"; $vratit = null; $vysledek = mysqli_query($this -> pripojeni,$dotaz); if($vysledek == false){ echo("During loading of data an error occured!" . mysqli_error($this->pripojeni) ); } else{ //case vysledek je mysqli_result $pole = $vysledek->fetch_all(MYSQLI_ASSOC); foreach($pole as $radek ){ $obrazekID = $radek["obrazekID"]; $filePath = $radek["filepath"]; $uzivatelID = $radek["uzivatelID"]; $jmenoUzivateleCoNahral = $radek["uzivatelJmeno"]; $obrazek = new obrazekObjekt($obrazekID, $filePath,$uzivatelID,$jmenoUzivateleCoNahral); $vratit = $obrazek; } } return $vratit; }
[ "function obtener_imagen_por_id($conexion, $id){\n\t$resultado = $conexion->query(\"SELECT * FROM galeria_img WHERE id = $id LIMIT 1\");\n\t$resultado = $resultado->fetchAll();\n\treturn ($resultado) ? $resultado : false;\n}", "function usuario_img_get($id, $tipo = 'imagem'){\n\n $conn = TConnection::open(DB);\n\n $criterio = new TCriteria;\n $criterio->add(new TFilter('id_usuario', '=', $id));\n\n\n\n $sql = new TSqlSelect;\n $sql->setEntity('usuario_imagem');\n $sql->addColumn($tipo);\n if(isset($criterio)){\n $sql->setCriteria($criterio);\n }\n\n $result = $conn->query($sql->getInstruction());\n\n if($result->rowCount()){\n\n $row = $result->fetch(PDO::FETCH_ASSOC);\n extract($row);\n\n return '<img src=\"'.$$tipo.'\">';\n\n }else{\n return false;\n }\n\n}", "function get_foto_by_id($koneksi, $id){\n\t\t$query = \"SELECT foto FROM barang WHERE id = :id\";\n\t\t\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->bindParam(':id', $id);\n\t\t$statement->execute();\n\t\t$result = $statement->fetch(PDO::FETCH_ASSOC);\n\t\ttutup_koneksi($koneksi);\n\n\t\treturn $result;\n\t}", "function zp_load_image_from_id($id){\n\t$sql = \"SELECT `albumid`, `filename` FROM \" .prefix('images') .\" WHERE `id` = \" . $id;\n\t$result = query_single_row($sql);\n\t$filename = $result['filename'];\n\t$albumid = $result['albumid'];\n\n\t$sql = \"SELECT `folder` FROM \". prefix('albums') .\" WHERE `id` = \" . $albumid;\n\t$result = query_single_row($sql);\n\t$folder = $result['folder'];\n\n\t$album = zp_load_album($folder);\n\t$currentImage = newImage($album, $filename);\n\tif (!$currentImage->exists) return false;\n\treturn $currentImage;\n}", "private function carga_imagen() {\n }", "function get_img_usrbyID($id){\n\t$result = select(\"select fotografia from usuario where id=\".$id.\"\")[0];\n\tif (!empty($result)) {\n\t\treturn array_values($result)[0];\t\t\t\n\t}else{\n\t\treturn \"usr_img\\0.png\";\n\t}\n}", "function getLogo($nr = 0){ //default reiksme\n$mano_sql_tekstas = \"SELECT * FROM logo WHERE id='$nr';\";\n//ivykdome SQL\n//global $connection;\nglobal $connection;\n//$rezultatai - objektas - gydytojo duomenys is DB\n$rezultatai = mysqli_query(getDBPrisijungimas(), $mano_sql_tekstas);\nif ($rezultatai) {\n // echo \"Gydytoja radome <br>\";\n //var_dump($rezultatai);\n //mysqli_fetch_assoc - objekta pavercia i masyva (asociatyvu)\n $array_im_rezultatai = mysqli_fetch_assoc($rezultatai);\n return $array_im_rezultatai;\n print_r($array_im_rezultatai);\n} else {\n // echo \"Gydytojas $nr nerastas!! <br>\";\n }\n}", "public function LoadById($id) {\r\n $res = $this->db->ExecuteSelectQueryAndFetchAll(self::SQL('select * by id'), array($id));\r\n if(empty($res)) {\r\n $this->AddMessage('error', \"Failed to load pictures with id '$id'.\");\r\n return false;\r\n } else {\r\n $this->data = $res[0];\r\n }\r\n return true;\r\n }", "public function get_photo(){\n\t\t$ID = $this->input->get('id');\n\n\t\t$foto = $this->db->query(\"SELECT PHOTO FROM ANGGOTA WHERE NIM='$ID'\")->result_array();\n\n\t\t$photo = $foto[0]['PHOTO'];\n\n\t\tif($photo!=null){\n\t\t\techo '<img src=\"'.base_url().'../perpusSTMIK/images/'.$photo.'\" width=\"150\" height=\"280\" class=\"img-thumbnail\" />';\n\t\t}\n\t}", "function getFotoIdPlato($idplato) {\r\n $sql = \"select * from $this->tabla where idplato= :idplato\";\r\n $parametros[\"idplato\"] = $idplato;\r\n $r = $this->bd->setConsulta($sql, $parametros);\r\n $arrayFotos = array();\r\n if ($r) {\r\n while ($fila = $this->bd->getFila()) {\r\n $foto = new Foto();\r\n $foto->set($fila);\r\n $arrayFotos[] = $foto;\r\n }\r\n return $arrayFotos;\r\n }\r\n return null;\r\n }", "function get_image($imageID) {\n global $PHOTO_KEYS;\n\n if ($imageID === NULL) {\n return NULL;\n }\n\n $lines = file_get_contents('data/slike.txt');\n foreach (explode(\"\\n\", $lines) as $line) {\n if (!empty($line)) {\n $image = my_deserialize($line, $PHOTO_KEYS);\n if ($image[\"id\"] === $imageID) {\n return $image;\n }\n }\n }\n return NULL;\n}", "function get_ultima_imagen_albumN($id)\n{\n $CI =& get_instance();\n $CI->db->select(\"imagennegocios.imagenNegocioRuta\")\n ->from('imagennegocios')\n ->where('imagennegocios.imagenNegocioAlbumId = '.$id)\n ->limit(10);\n $Q = $CI->db->get();\n if($Q->num_rows())\n {\n $img = $Q->row();\n $img = $img->imagenNegocioRuta;\n }else{\n $img = \"statics/img/default/avatar.png\";\n }\n return $img;\n}", "public function getFoto($id) {\n\t\t$sql = \"SELECT * FROM fotoid WHERE id = :id\";\n\t\t$sql = $this->pdo->prepare($sql);\n\t\t$sql->bindValue(\":id\", addslashes($id));\n\t\t$sql->execute();\n\t\tif ($sql->rowCount() == 1) {\n\t\t\t$sql = $sql->fetch();\n\n\t\t\t$this->nome = $sql['nome'];\n\t\t\t$this->imagem = $sql['foto'];\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function gesso__get_image( $id ) {\n\tif ( strlen( $id ) ) {\n\t\treturn new TimberImage( $id );\n\t} else {\n\t\treturn null;\n\t}\n}", "public function loadImage($id) {\n \n $note = SomeRow::getRow('note');\n $note->id = $id;\n $note->read();\n \n // File upload\n $file = SomeRequest::getVar('imagefile_' . $id, null, 'files');\n if (!is_null($file)) {\n if (is_uploaded_file($file['tmp_name'])) {\n\n $valid = false;\n\n // Images have a size limit of half a megabyte\n if (0 < $file['size'] && $file['size'] <= 524288) {\n\n // Only JPG, GIF and PNG -files are allowed\n $image_type = exif_imagetype($file['tmp_name']);\n if ($image_type != FALSE && $image_type < 4) {\n if (CSRF::checkToken()) {\n\n $suffix = '.gif';\n if ($image_type == 2) {\n $suffix = '.jpg';\n } else if ($image_type == 3) {\n $suffix = '.png';\n }\n\n $new_name = ''.$id.$suffix;\n $folder = './content/notemanager/images/';\n\n // Remove previous image file and thumbnail\n if (!is_null($note->image)) {\n unlink($folder.$note->image);\n unlink($folder.'thumbnails/'.$note->image);\n }\n\n\n // Update database and create thumbnail\n $note->secret = $note->secret ? 'TRUE' : 'FALSE';\n $note->image = $new_name;\n\n if ($note->update()) {\n move_uploaded_file($file['tmp_name'], $folder.$new_name);\n\n // Thumbnail creation code from http://stackoverflow.com/questions/1855996/crop-image-in-php\n $image = null;\n switch ($image_type) {\n case 1: $image = imagecreatefromgif($folder.$new_name); break;\n case 2: $image = imagecreatefromjpeg($folder.$new_name); break;\n case 3: $image = imagecreatefrompng($folder.$new_name); break;\n default: break;\n }\n\n $thumb_width = 100;\n $thumb_height = 50;\n\n $width = imagesx($image);\n $height = imagesy($image);\n\n $original_aspect = $width / $height;\n $thumb_aspect = $thumb_width / $thumb_height;\n\n if ( $original_aspect >= $thumb_aspect )\n {\n // If image is wider than thumbnail (in aspect ratio sense)\n $new_height = $thumb_height;\n $new_width = $width / ($height / $thumb_height);\n }\n else\n {\n // If the thumbnail is wider than the image\n $new_width = $thumb_width;\n $new_height = $height / ($width / $thumb_width);\n }\n\n $thumb = imagecreatetruecolor( $thumb_width, $thumb_height );\n\n // Resize and crop\n imagecopyresampled($thumb,\n $image,\n 0 - ($new_width - $thumb_width) / 2, // Center the image horizontally\n 0 - ($new_height - $thumb_height) / 2, // Center the image vertically\n 0, 0,\n $new_width, $new_height,\n $width, $height);\n\n switch ($image_type) {\n case 1: imagegif($thumb, $folder.'/thumbnails/'.$new_name); break;\n case 2: imagejpeg($thumb, $folder.'/thumbnails/'.$new_name); break;\n case 3: imagepng($thumb, $folder.'/thumbnails/'.$new_name); break;\n default: break;\n }\n\n\n\n\n $this->image_url = $new_name;\n $valid = true;\n } \n }\n }\n }\n\n\n // Invalid image file\n if (!$valid) {\n unlink($file['tmp_name']);\n $this->notification = true;\n }\n }\n }\n \n }", "function getUrl($id_img){\n $sentencia = $this->db->prepare(\"SELECT url FROM imagen WHERE id_imagen = ?\");\n $sentencia->execute(array($id_img[0]));\n return $sentencia->fetch(PDO::FETCH_ASSOC);\n }", "public function get_charterboat_first_image($boat_id, $picktitle = 0){\n\t\tglobal $db, $cm;\n\t\t\n\t\t$sql = \"select imgpath as ttl from tbl_boat_charter_photo where boat_id = :boat_id and imgpath != '' and status_id = 1 order by rank limit 0,1\";\n\t\t$pdo_param = array(\t\t\t\n\t\t\tarray(\n\t\t\t\t\"id\" => \"boat_id\",\n\t\t\t\t\"value\" => $boat_id,\n\t\t\t\t\"c\" => \"PARAM_INT\"\n\t\t\t)\t\t\t\t\n\t\t);\n\t\t$imgpath = $db->pdo_get_single_value($sql, $pdo_param);\n\t\tif ($imgpath == \"\"){ $imgpath = \"no.jpg\"; }\n\t\treturn $imgpath;\n\t}", "function getPlanePics($id) {\n $conn = dbConnection();\n $sql = \"SELECT urlPATH, alt FROM images WHERE plane_ID = :id\";\n try {\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(':id', $id, PDO::PARAM_INT);\n $stmt->execute();\n $results = $stmt->fetchAll();\n $stmt->closeCursor();\n } catch (PDOException $e) {\n header('Location: /500.php');\n exit;\n }\n\n if (!empty($results)) {\n return $results;\n } else {\n header('Location: /500.php');\n exit;\n }\n}", "public function selecionarTodasImg($id){\r\n $resultado = $this->conexao->getConnection()->query(\"SELECT * FROM imagem WHERE ID_usuario=\".$id)\r\n or die ($this->conexao->getConnection()->error);\r\n return $resultado;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retourne la liste tout les acteurs
public function getAllActeur() { $sql = 'SELECT * FROM acteur'; $stmt = $this->db->query($sql); $acteurs = []; foreach ($stmt as $acteurBdd) { $acteur = new Acteur(); $acteur->setId($acteurBdd->id); $acteur->setNom($acteurBdd->nom); $acteur->setPrenom($acteurBdd->prenom); $acteurs[] = $acteur; } return $acteurs; }
[ "public static function logActivityLists()\n {\n \treturn LogActivityModel::latest()->get();\n }", "public function getActivites();", "public function listarRecentes()\n {\n $data = [];\n\n\n $query = $this->getDb()->prepare(\"SELECT rI.url as img, r.nome as nome, cat.nome as Categora, r.dificuldade as dificuldade FROM receitas r INNER JOIN receitasImagens rI on r.id=rI.id_receita INNER JOIN categoriareceitas cat on cat.id = r.id_categoria ORDER BY r.data DESC;\");\n\n $query->execute();\n\n while ($linha = $query->fetch()) {\n $data[] = $linha;\n }\n\n return $data;\n }", "public function listarContato(){}", "public function listTurnos()\n\t{\n\t\treturn $this->turnos;\n\t}", "function getActivitiesList()\n\t\t{\n\t\t\tglobal $CFG,$objSmarty;\n\t\t\t$sqlsel = \"SELECT id,user_id,activity,addeddate FROM \".$CFG['table']['recentactivity'].\"\";\n\t\t\t$sqlres = $this->ExecuteQuery($sqlsel,'select');\t\t\t\n\t\t\t$objSmarty->assign(\"activities\", $sqlres);\n\t\t}", "public function getListItems()\n {\n return $this->getCurrentEventSessions();\n }", "function getTabActes()\n {\n\t$idPassage = $this->getNSej();\n\t$requete = \" SELECT `codeActe` FROM `ccam_cotation_actes` WHERE `numSejour` = '$idPassage' \" ;\n\t$obRequete = new clRequete(CCAM_BDD, 'ccam_cotation_actes') ;\n\t$res = $obRequete->exec_requete($requete, 'tab');\n\t$ret = array() ;\n\tforeach( $res as $ligne )\n\t{\n\t\t$ret[] = $ligne['codeActe'] ;\n\t}\n\t return $ret;\n }", "public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}", "public function itemListByActive();", "public function getLesVisiteurs()\r\n {\r\n $liste=array();\r\n $req = \"select * from visiteur\";\r\n $stmt = Dao::$monPdo->prepare($req);\r\n $res=$stmt->execute();\r\n while ($laLigne = $stmt->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)) {\r\n $id = $laLigne[0];\r\n $nom = $laLigne[1];\r\n $prenom = $laLigne[2];\r\n $login = $laLigne[3];\r\n $mdp = $laLigne[4];\r\n $adresse = $laLigne[5];\r\n $cp = $laLigne[6];\r\n $ville = $laLigne[7];\r\n $dateEmbauche = $laLigne[8];\r\n $statut = $laLigne[9];\r\n $visiteur=new Visiteur($id, $nom, $prenom, $login, $mdp, $adresse, $cp, $ville, $dateEmbauche, $statut);\r\n $visiteur->setId($id);\r\n $visiteur->setNom($nom);\r\n $liste[]=$visiteur;\r\n }\r\n return $liste;\r\n }", "public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn gestion::lister(\"Etat\");//type array\n\t}", "function wct_talks_the_talks() {\n\treturn wct()->query_loop->items();\n}", "public function getObjectList() {}", "public function listItems();", "public function listar() {\n try {\n $result = array();\n\n $stm = $this->pdo->prepare(\"SELECT id_monitor, nombre, apellidos, dni, fec_nac, telefono, email, num_titulo, cert_delitos\n FROM monitores\n INNER JOIN usuarios ON monitores.id_monitor=usuarios.id_usuario\");\n $stm->execute();\n\n return $stm->fetchAll(PDO::FETCH_CLASS, 'Monitor');\n } catch (Exception $e) {\n die($e->getMessage());\n }\n }", "public function listtravailleurAction() {\n\n $sessionmembre = new Zend_Session_Namespace('membre');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcperso');\n\n if (!isset($sessionmembre->code_membre)) {\n $this->_redirect('/');\n }\n\n $travailleur = new Application_Model_EuTravailleurMapper();\n $this->view->entries = $travailleur->fetchAllByMembre($sessionmembre->code_membre);\n\n $this->view->tabletri = 1;\n }", "public function equipementachatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"EquipementAchat\");//type array\n\t}", "public function showTramites(){\n $conexion = new Connect();\n $consulta = $conexion->prepare('SELECT * FROM '.self::TABLA.' WHERE id_tramite IS NOT NULL GROUP BY id_responsable DESC');\n $consulta->execute();\n $registros = $consulta->fetchAll();\n return $registros;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Singleton access to EbizmartsSagePaySuiteGuestFormManagementV1 controller
public function getEbizmartsSagePaySuiteGuestFormManagementV1() { return Controllers\EbizmartsSagePaySuiteGuestFormManagementV1Controller::getInstance(); }
[ "public function getEbizmartsSagePaySuiteFormManagementV1()\n {\n return Controllers\\EbizmartsSagePaySuiteFormManagementV1Controller::getInstance();\n }", "public function getEbizmartsSagePaySuiteGuestPiManagementV1()\n {\n return Controllers\\EbizmartsSagePaySuiteGuestPiManagementV1Controller::getInstance();\n }", "public function getEbizmartsSagePaySuiteGuestServerManagementV1()\n {\n return Controllers\\EbizmartsSagePaySuiteGuestServerManagementV1Controller::getInstance();\n }", "public function getEbizmartsSagePaySuiteGuestPayPalManagementV1()\n {\n return Controllers\\EbizmartsSagePaySuiteGuestPayPalManagementV1Controller::getInstance();\n }", "public function actionIndex()\n {\n $env = $this->sagepayConfig->getEnv();\n $siteFqdn = $this->sagepayConfig->getSiteFqdn();\n $encryptionPassword = $this->sagepayConfig->getFormEncryptionPassword($env);\n\n // Render front page for form payment\n $view = new HelperView('form/index');\n $view->setData(array(\n 'integrationType' => $this->integrationType,\n 'fullUrl' => url(array('form'), $siteFqdn),\n 'siteFqdn' => $siteFqdn,\n 'env' => $env,\n 'vendorName' => $this->sagepayConfig->getVendorName(),\n 'currency' => $this->sagepayConfig->getCurrency(),\n 'purchaseUrl' => $this->sagepayConfig->getPurchaseUrl('form', $env),\n 'isEncryptionPasswordOk' => (!empty($encryptionPassword) && (strlen($encryptionPassword) == 16))\n ));\n $view->render();\n }", "public function initFormController(){\n\t\t$this->formcontroller = new FormController();\n\t}", "function SmallRegisterAccountForm(){\n\t\t$class = $this->ClassName . \"_Controller\";\n $controller = new $class($this);\n return $controller->SmallRegisterAccountForm();\n\t}", "public function getEbizmartsSagePaySuiteServerManagementV1()\n {\n return Controllers\\EbizmartsSagePaySuiteServerManagementV1Controller::getInstance();\n }", "public function getEbizmartsSagePaySuitePayPalManagementV1()\n {\n return Controllers\\EbizmartsSagePaySuitePayPalManagementV1Controller::getInstance();\n }", "protected function getFrontendController() {}", "public function initFormController() {\r\n\t\t$this->formcontroller = new FormController();\r\n\t}", "public static function getInstance()\n\t{\n\t\t// verificando singleton\n\t\tif (self::$_singleton == null){\n\t\t\t// instanciando pela primeira vez\n\t\t\tself::$_singleton = new Basico_OPController_GeradorFormularioOPController();\n\t\t}\n\t\t// retornando instancia\n\t\treturn self::$_singleton;\n\t}", "function getInstance(){\n\treturn MVC_controller::getInstance();\n}", "public function getCheckoutGuestPaymentInformationManagementV1()\n {\n return Controllers\\CheckoutGuestPaymentInformationManagementV1Controller::getInstance();\n }", "protected function getFormManagerControllerService()\n {\n $instance = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Form\\Controller\\FormManagerController::class);\n\n $instance->injectDatabaseService(($this->privates['TYPO3\\\\CMS\\\\Form\\\\Service\\\\DatabaseService'] ?? ($this->privates['TYPO3\\\\CMS\\\\Form\\\\Service\\\\DatabaseService'] = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstanceForDi(\\TYPO3\\CMS\\Form\\Service\\DatabaseService::class))));\n $instance->injectFormPersistenceManager(($this->privates['TYPO3\\\\CMS\\\\Form\\\\Mvc\\\\Persistence\\\\FormPersistenceManager'] ?? $this->getFormPersistenceManagerService()));\n $instance->injectConfigurationManager(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Configuration\\\\ConfigurationManager'] ?? $this->getConfigurationManagerService()));\n $instance->injectObjectManager(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Object\\\\ObjectManager'] ?? $this->getObjectManagerService()));\n $instance->injectSignalSlotDispatcher(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\SignalSlot\\\\Dispatcher'] ?? $this->getDispatcher2Service()));\n $instance->injectValidatorResolver(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Validation\\\\ValidatorResolver'] ?? $this->getValidatorResolverService()));\n $instance->injectViewResolver(($this->privates['TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\View\\\\GenericViewResolver'] ?? $this->getGenericViewResolverService()));\n $instance->injectReflectionService(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Reflection\\\\ReflectionService'] ?? $this->getReflectionServiceService()));\n $instance->injectCacheService(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Service\\\\CacheService'] ?? $this->getCacheServiceService()));\n $instance->injectHashService(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Security\\\\Cryptography\\\\HashService'] ?? $this->getHashServiceService()));\n $instance->injectMvcPropertyMappingConfigurationService(($this->services['TYPO3\\\\CMS\\\\Extbase\\\\Mvc\\\\Controller\\\\MvcPropertyMappingConfigurationService'] ?? $this->getMvcPropertyMappingConfigurationServiceService()));\n $instance->injectEventDispatcher(($this->services['Psr\\\\EventDispatcher\\\\EventDispatcherInterface_decorated_1'] ?? $this->getEventDispatcherInterfaceDecorated1Service()));\n $instance->initializeObject();\n\n return $instance;\n }", "function getInstance() {\n return XP_Controller::get_instance();\n}", "public function getAdminGatewayForm()\n {\n return new Payment_Form_Admin_Gateway_Testing();\n }", "private function router(){\n $params = $this->params;\n\n if($params->action == \"logout\"){\n $this->partial = (new Logout($this->sessionStatus))->getPartial();\n\n } else if($this->sessionStatus->isLoggedIn()){\n $this->partial = new Logoutform();\n\n } else if($params->action == \"login\"){\n $this->partial = (new Login($params->username, $params->password, $this->sessionStatus))->getPartial();\n\n } else if($params->action == \"register\"){\n $this->partial = (new Register($params->username, $params->password, $params->passwordrepeat))->getPartial();\n\n } else if($params->action == \"showRegistrationform\"){\n $this->partial = new Registrationform();\n\n } else {\n $this->partial = new Loginform();\n }\n }", "protected function _initAdmin()\n {\n return new Vulnero_Form_Admin_Default();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update the group stack with the given attributes.
protected function updateGroupStack(array $attributes) { if (! empty($this->groupStack)) { $attributes = RouteGroup::merge($attributes, end($this->groupStack)); } $this->groupStack[] = $attributes; }
[ "protected function updateGroupStack(array $attributes = array()) {\n\t\tif (count ( $this->groupStack ) > 0) {\n\t\t\t$attributes = $this->mergeWithLastGroup ( $attributes );\n\t\t}\n\t\t\n\t\t$this->groupStack [] = $attributes;\n\t}", "protected function updateGroupStack(array $attributes)\n\t{\n\t\tif (! empty($this->groupStack)) {\n\t\t\t$attributes = $this->mergeGroup($attributes, end($this->groupStack));\n\t\t}\n\n\t\t$this->groupStack[] = $attributes;\n\t}", "protected function updateGroupStack(array $attributes)\n {\n if (! empty($this->groupStack)) {\n $attributes = $this->mergeGroup($attributes, end($this->groupStack));\n }\n\n $this->groupStack[] = $attributes;\n }", "protected function updateGroupStack(array $attributes = [])\n {\n if (count($this->groupStack) > 0) {\n $attributes = $this->mergeWithLastGroup($attributes);\n }\n $this->groupStack[] = $attributes;\n }", "public function testUpdateGroup()\n {\n }", "public function testUpdateGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function modificagroupAction()\n {\n $data = explode(\"|\",$this->_getParam('data'));\n $group = new Application_Model_DbTable_Groups();\n $group->updateGroup($data[0],$data[1]);\n\n }", "public function updateGroup(Group $group);", "public function vUpdateGroup(){\n\t\t$oDB = self::oDB(self::$sDBName);\n\t\t$oCurrentUser = self::$session->get('oCurrentUser');\n\n\t\t$aValues = array(\t'group_name'=>$this->sName, \n\t\t\t\t\t\t\t'group_desc'=>$this->sDesc,\n\t\t\t\t\t\t\t'group_color'=>$this->sColor,\n\t\t\t\t\t\t\t'system_name'=>$this->sSystemName,\n\t\t\t\t\t\t\t'group_status'=>$this->bStatus\n\t\t\t\t\t\t\t);\n\t\ttry{\n\t\t\t$oDB->vBegin();\n\t\t\t$oDB->sUpdate(\"`galaxy_group`\", array_keys($aValues), array_values($aValues), \"`group_no` = {$this->iGroupNo}\");\n\t\t\t//$this->vUpdateGroupUser();\t//update users\n\t\t\t$this->vUpdateGroupRule();\t//update rules\n\t\t\t$oDB->vCommit();\n\t\t}catch (Exception $e){\n\t\t\t$oDB->vRollback();\n\t\t\tthrow new Exception(\"CGroup->vUpdateGroup: \".$e->getMessage());\n\t\t}\n\t}", "public function testUpdateGroup()\n {\n $group = $this->_backend->updateGroup($this->objects['updatedGroup']);\n \n $this->assertEquals($this->objects['updatedGroup']->name, $group->name);\n $this->assertEquals($this->objects['updatedGroup']->description, $group->description);\n }", "public function testUpdateStoreGroup()\n {\n }", "function update()\n\t{\n\t\tlog_write(\"debug\", \"ldap_auth_manage_group\", \"Executing update()\");\n\n\t\t// create group if they don't already exist\n\t\tif (!$this->id)\n\t\t{\n\t\t\tif (!$this->create())\n\t\t\t{\n\t\t\t\tlog_write(\"error\", \"ldap_auth_manage_group\", \"An error occuring whilst attempting to add a new group record to LDAP\");\n\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\t// if radius is enabled, add the radius profile schema\n\t\tif ($GLOBALS[\"config\"][\"FEATURE_RADIUS\"] != \"disabled\")\n\t\t{\n\t\t\t// add object class\n\t\t\t$this->data[\"objectclass\"]\t= NULL;\n\t\t\t$this->data[\"objectclass\"][]\t= \"top\";\n\t\t\t$this->data[\"objectclass\"][]\t= \"posixGroup\";\n\t\t\t$this->data[\"objectclass\"][]\t= \"radiusprofile\";\n\n\t\t\t// vendor specific: mikrotik\n\t\t\tif ($GLOBALS[\"config\"][\"FEATURE_RADIUS_MIKROTIK\"] == \"enabled\")\n\t\t\t{\n\t\t\t\t$this->data[\"objectclass\"][]\t= \"radiusMikrotik\";\n\t\t\t}\n\n\t\t}\n\n\n\t\t// set the record to manipulate\n\t\t$this->obj_ldap->record_dn\t= \"cn=\". $this->data[\"cn\"] .\"\";\n\n\t\t// update attributes\n\t\t$this->obj_ldap->data = $this->data;\n\n\t\tif ($this->obj_ldap->record_update())\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\n\t\t// failure\n\t\treturn 0;\n\n\t}", "public function testModifierGroupsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function updateGroup(Group $group)\n {\n // NO-OP\n }", "public function updateViaRequest()\n {\n return groups()->update($this);\n }", "public function refreshGroups()\n {\n $this->sortedAttributeGroups = AttributeGroup::whereAttributableType($this->typeClass)\n ->orderBy('position')->get();\n\n $this->showGroupCreate = false;\n }", "function ac_update_group($args){\n\tglobal $wpdb;\n\t$id = (!empty($args['id'])) ? $args['id'] : 0;\n\t$group_name = (!empty($args['group_name'])) ? $args['group_name'] : \"\";\n\t$table = $wpdb->prefix.\"wpsp_transactions_group\";\n\treturn ($wpdb->query(\"UPDATE $table SET group_name='$group_name' WHERE group_id='$id'\")) ? true : $wpdb->print_error();\n}", "public static function syncWithFacebookAttributes($attributes) {\n\n\t\t$group = Group::model()->findByAttributes(array(\n\t\t\t'facebookId' => $attributes['id'],\n\t\t));\n\n\t\tif(is_null($group)) {\n\t\t\t$group = new Group();\n\t\t}\n\n\t\t$group->attributes = array(\n\t\t\t'name' => $attributes['name'],\n\t\t\t'facebookId' => $attributes['id'],\n\t\t);\n\t\tif($group->save()) {\n\t\t\treturn $group;\n\t\t}\n\n\t\tthrow new ModelValidationException(\"Group could not be synchronized: \", $group);\n\t}", "public function set_group() {\n\t\t$this->group = new CT_Ultimate_GDPR_Model_Group;\n\t\t$this->group->add_levels( $this->get_group_levels() );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Google Cloud Storage bucket that can be used by this application to store content. &64;OutputOnly string default_bucket = 12;
public function getDefaultBucket() { return $this->default_bucket; }
[ "public function getDefaultBucket()\n {\n return $this->defaultBucket;\n }", "public function getDefaultBucket()\n {\n if(!$this->defaultBucket) {\n $config = $this->getServiceLocator()->get('config');\n $this->defaultBucket = $config['config_ica467']['default_bucket']; \n }\n return $this->defaultBucket;\n }", "public function setDefaultBucket($var)\n {\n GPBUtil::checkString($var, True);\n $this->default_bucket = $var;\n }", "public function getGoogleCloudStorageBucket() {\n return $this->attributes['google_cloud_storage_bucket'];\n }", "private static function getStorageBucket()\n {\n return self::$config['storage_bucket'];\n }", "public function getBucket()\n {\n return Mage::getStoreConfig('thai_s3/general/bucket');\n }", "public function getBucket()\n {\n \treturn $this->configuration['bucket'];\n }", "public static function getS3Bucket(){\n if (self::$_s3Bucket === null){\n self::$_s3Bucket = Setting::getValue('global', 0, 's3-bucket');\n }\n return self::$_s3Bucket;\n }", "public function getBucket()\n {\n return $this->params['Bucket'];\n }", "protected function getBucketName(): string {\n $key = 'storage.s3.bucket';\n $bucket = PhabricatorEnv::getEnvConfig($key);\n\n if (!$bucket) {\n throw new PhabricatorFileStorageConfigurationException(\n pht(\n \"No '%s' specified!\",\n $key));\n }\n\n return $bucket;\n }", "public function getBucket()\n {\n $bucket = 'pantheon-backups';\n if (strpos($this->getConfig()->get('host') ?? '', 'onebox') !== false) {\n $bucket = \"onebox-$bucket\";\n }\n return $bucket;\n }", "public function getGcsBucket()\n {\n return $this->gcs_bucket;\n }", "public function getBucket()\n {\n return $this->bucket;\n }", "public function getBucketName()\n {\n return $this->data['bucket'];\n }", "public function getBucketName()\n {\n return $this->bucket;\n }", "private function get_bucket_name() {\n\n\t\t$s3_bucket_name = get_option( 'amazon_polly_s3_bucket' );\n\t\t$s3_bucket_name = apply_filters( 'amazon_polly_s3_bucket_name', $s3_bucket_name );\n\n\t\treturn $s3_bucket_name;\n\t}", "public function getBucketId()\n {\n return $this->getEntityValue('bucket_id', '');\n }", "public function setBucket($var)\n {\n GPBUtil::checkString($var, True);\n $this->bucket = $var;\n }", "public function getS3Bucket();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks if the object or class has a property defined by $_property_name.
public function propertyExists($_property_name) { return property_exists(get_called_class(), $_property_name); }
[ "private function __property_exist($property_name) {\n if ($this->get_property($property_name)) {\n return true;\n } else {\n return false;\n }\n }", "abstract protected function propertyExists($name);", "public function property_exists($property){\n return property_exists( get_class($this) , $property);\n }", "public function has_property($property) {\n return property_exists(__CLASS__, $property);\n }", "public function hasProperty($name)\n\t{\n\t\treturn method_exists($this,'get'.$name) || method_exists($this,'set'.$name);\n\t}", "public function schemaPropertyExists($property_name)\n {\n return !empty($this->schema->properties->$property_name);\n }", "private function _exists($property) {\n\t\treturn property_exists($this, $property);\n\t}", "public function hasProperty($name)\n {\n return isset($this->properties[$name]);\n }", "public function hasProperty($name)\n {\n return \\array_key_exists($name, $this->properties);\n }", "public function hasProperty($name);", "function property_exists ($class, $property) {}", "protected function hasProperty(stdClass $data, string $name): bool\n {\n return property_exists($data, $name);\n }", "public function user_property_exists($class,$property)\n\t{\n\t\tif (!isset($this->classes[strtolower($class)])) return false;\n\t\t$this->stash_ob();\n\t\treturn isset($this->classes[strtolower($class)]->properties[$property]); //this is case sensitive\n\t}", "protected function isPropertyNeedProcess($property) {\n $method = $this->getPropertyFunction($property);\n\n return method_exists($this, $method);\n }", "public function hasProperty($name, $checkVars = true): bool;", "function property_exists($context, $property) {\n $vars = is_object($context) ? \n get_object_vars($context) : \n get_class_vars($context);\n return array_key_exists($property, $vars);\n }", "public function __isset($name)\n {\n return isset($this->properties[$name]);\n }", "public function __isset($property)\n\t{\n\t\t// check the loaded data first\n\t\tif ( isset($this->_data[0]) and array_key_exists($property, $this->_data[0]) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// if not present, is it a table column?\n\t\telseif ( array_key_exists($property, static::properties()) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// if not, perhaps it's a relation\n\t\telseif ( static::relations($property) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// nope, don't know this one...\n\t\treturn false;\n\t}", "public function __isset($property) {\r\n return (array_key_exists($property, $this->relationships) || $this->orm->__isset($property) || method_exists($this, $method = 'get_'.$property) || method_exists($this, $method = 'missing_'.$property));\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that valid URLs are not modified
function test_valid_urls( $url ) { $this->assertEquals( $url, yourls_sanitize_url( $url ) ); }
[ "public function test_valid_http_url() {\n $url1 = \"http://www.google.com\";\n $url2 = \"http://www.google.com/\";\n $url3 = \"http://www.google.com/foo/bar\";\n $url4 = \"http://www.google.com/?foo=bar\";\n\n $this->assertEquals(\n $url1,\n sanitize_url($url1)\n );\n\n $this->assertEquals(\n $url2,\n sanitize_url($url2)\n );\n\n $this->assertEquals(\n $url3,\n sanitize_url($url3)\n );\n\n $this->assertEquals(\n $url4,\n sanitize_url($url4)\n );\n }", "public function testWebserviceUrlsAreValid()\n {\n foreach ($this->getAllRequestObjects() as $requestObject) {\n $this->assertNotFalse(filter_var($requestObject::PRODUCTION_URL, FILTER_VALIDATE_URL));\n $this->assertNotFalse(filter_var($requestObject::TESTING_URL, FILTER_VALIDATE_URL));\n\n// $this->validateUrlExists($requestObject::PRODUCTION_URL);\n// $this->validateUrlExists($requestObject::TESTING_URL);\n }\n }", "public function testIsValidUrl(): void\n {\n $test = FL\\StringHelper::getInstance(\"http://gmail.com\");\n $this->assertEquals($test->isValidURL(), true);\n \n $test = FL\\StringHelper::getInstance(\"blabla:/whatever.com\");\n $this->assertEquals($test->isValidURL(), false);\n }", "function testCheckURLsInvalid3()\n {\n $strictness = Services_Trackback::STRICTNESS_HIGH;\n\n $url1 = \"http://www.example.com/trackback/index.php\";\n $url2 = \"http://www.example.com/trackback/index.htm\";\n\n try {\n $this->trackback->checkURLs($url1, $url2, $strictness);\n \n $this->fail(\"Expected exception\");\n } catch (Services_Trackback_Exception $ste) {}\n }", "public function testInvalidUrl()\n {\n $request = $this->defaultRequest;\n $request[AddStore::PARAM_URL] = 'not a url';\n $this->mockRegions(true);\n\n $isValid = $this->subject->isValid($request);\n\n $errors = $this->subject->getErrors();\n\n self::assertEquals(false, $isValid);\n self::assertEquals(['Invalid URL'], $errors);\n }", "public function testInvalidUrlBadScheme()\n {\n $request = $this->defaultRequest;\n $request[AddStore::PARAM_URL] = 'httpr://www.example.com';\n $this->mockRegions(true);\n\n $isValid = $this->subject->isValid($request);\n\n $errors = $this->subject->getErrors();\n\n self::assertEquals(false, $isValid);\n self::assertEquals(['Invalid URL'], $errors);\n }", "public function testInvalidUrl()\n {\n new ObjectUrl('invalid://');\n }", "function test_get_url_returns_valid_url(){\n\n\t\t$valid_url = filter_var($this->standard_post->get_url(), FILTER_VALIDATE_URL);\n\n\t\t$this->assertNotEquals(false, $valid_url);\n\n\t}", "public function isValidUrlInvalidRessourceDataProvider() {}", "public function testCorrectUrlValidation()\n {\n $this->validateTwitterUrl('https://twitter.com/nutrition_facts/status/1078327187202367490');\n\n $this->assertTrue(true);\n }", "public function testUrlNoHttp()\n {\n $sampleUrl = 'www.example.com';\n\n $url = new Url;\n $cleanUrl = $url->clean($sampleUrl);\n $this->assertSame('http://www.example.com/', $cleanUrl);\n }", "public function testBadUri()\n {\n $this->assertFalse($this->checker->isValid('/callback.php?valid=true&trans_id=001'));\n }", "public function testThatItThrowsAMalformedUrlExceptionCorrectly()\n {\n $url = 'www.badurl.com';\n $this->checker->check($url);\n }", "public function testRejectAutomatchUrlUsingGET()\n {\n }", "public function testTestValidAndInvalidTestSuites(){\r\n \r\n $valid_urls = file_get_contents( __DIR__ . '/test_data/url_valid.txt' );\r\n $valid_urls = explode(\"\\n\", $valid_urls);\r\n \r\n foreach( $valid_urls as $valid_url ){\r\n try{\r\n //shouldn't throw\r\n $url = new \\Altumo\\String\\Url($valid_url);\r\n $this->assertTrue( true );\r\n }catch( \\Exception $e ){\r\n $this->assertTrue( false, $valid_url );\r\n }\r\n }\r\n\r\n\r\n $invalid_urls = file_get_contents( __DIR__ . '/test_data/url_invalid.txt' );\r\n $invalid_urls = explode(\"\\n\", $invalid_urls);\r\n \r\n foreach( $invalid_urls as $invalid_url ){\r\n try{\r\n //bad url: should throw exception\r\n $url = new \\Altumo\\String\\Url($invalid_url);\r\n $this->assertTrue( false, $invalid_url );\r\n }catch( \\Exception $e ){\r\n $this->assertTrue( true );\r\n }\r\n }\r\n \r\n }", "function test_url_with_protocols() {\n\t\t$this->assertEquals( 'http://example.com', yourls_sanitize_url( 'http://example.com' ) );\n\t\t$this->assertEquals( 'example.php', yourls_sanitize_url( 'example.php' ) );\n\t\t$this->assertEquals( '', yourls_sanitize_url( 'htttp://example.com' ) );\n\t\t$this->assertEquals( 'mailto:ozh@ozh.org', yourls_sanitize_url( 'mailto:ozh@ozh.org' ) );\n // play with allowed protocols\n\t\t$this->assertEquals( '', yourls_sanitize_url( 'nasty://example.com/' ) );\n\t\t$this->assertEquals( 'nasty://example.com/', yourls_sanitize_url( 'nasty://example.com/', array('nasty://') ) );\n global $yourls_allowedprotocols;\n $yourls_allowedprotocols[] = 'evil://';\n $this->assertEquals( 'evil://example.com', yourls_sanitize_url( 'evil://example.com' ) );\n $yourls_allowedprotocols = yourls_kses_allowed_protocols();\n\t}", "public function testRuleIsUrl(): void {\r\n\r\n //Require http urls\r\n require_once('./test/assets'. DIRECTORY_SEPARATOR .'http-urls.php');\r\n\r\n //Should pass\r\n foreach($urls as $data) {\r\n\r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isUrl();\r\n $this -> assertTrue($validator -> passes());\r\n $this -> assertFalse($validator -> fails());\r\n }\r\n\r\n //Should pass\r\n foreach($urls as $data) {\r\n\r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isUrl(true);\r\n $this -> assertTrue($validator -> passes());\r\n $this -> assertFalse($validator -> fails());\r\n }\r\n\r\n\r\n //Require non http urls\r\n require_once('./test/assets'. DIRECTORY_SEPARATOR .'urls.php');\r\n\r\n //Should pass\r\n foreach($urls as $data) {\r\n\r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isUrl();\r\n $this -> assertTrue($validator -> passes());\r\n $this -> assertFalse($validator -> fails());\r\n }\r\n\r\n //Should fail\r\n foreach($urls as $data) {\r\n\r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isUrl(true);\r\n $this -> assertFalse($validator -> passes());\r\n }\r\n\r\n //Should fail\r\n foreach([null, (object) [], [], 0, false, 1] as $data) {\r\n \r\n $validator = new Validator(['field' => $data]);\r\n $validator -> field('field') -> isUrl();\r\n $this -> assertFalse($validator -> passes());\r\n }\r\n\r\n //Should fail\r\n $validator = new Validator();\r\n $validator -> field('field') -> isUrl();\r\n $this -> assertFalse($validator -> passes());\r\n }", "public function testURLMustBeValid()\n {\n $this->actingAs(factory(User::class)->create());\n $calendar = factory(Calendar::class)->create();\n\n $response = $this->put('/calendars/'.$calendar->id, [\n 'name' => $calendar->name,\n 'start_date' => $calendar->start_date,\n 'end_date' => $calendar->end_date,\n 'type' => 'ical',\n 'url' => 'not-a-valid-url',\n ]);\n\n $response->assertRedirect();\n $this->assertDatabaseHas('calendars', [\n 'url' => $calendar->url,\n ]);\n }", "public function test_valid_url()\n\t{\n\t\t$name = 'test';\n\t\t$label = 'Test field';\n\t\t$params = array('label' => $label);\n\n\t\tself::$inst\n\t\t\t-> add($name, $label)\n\t\t\t-> add_rule('valid_url');\n\n\t\t$this->assertFalse( self::$inst->run(array($name => 'xxxxx')) );\n\n\t\t$expected = array( $name => \\Lang::get('validation.valid_url', $params, null, 'ja') );\n\t\t$actual = array_map(function($v){ return (string)$v; }, self::$inst->error());\n\t\t$this->assertEquals($expected, $actual);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets up an instance of Whoops. Didya uses Whoops internally to capture errors and analyze them.
protected function setupWhoops() { $this->whoops = new \Whoops\Run; $this->whoops->pushHandler($this->setupHandler()); // Do not allow this instance of whoops to quit execution, // in case there's additional error handling setup. $this->whoops->allowQuit(false); $this->whoops->sendHttpCode(false); return $this->whoops->register(); }
[ "public function errorHandling()\n {\n $whoops = new \\Whoops\\Run;\n $whoops->pushHandler(new \\Whoops\\Handler\\PrettyPageHandler);\n\n if ($_ENV['DEBUG'] === 'true') {\n $whoops->register();\n } else {\n $whoops->unregister();\n }\n }", "protected function registerWhoops()\n {\n $this->registerWhoopsHandler();\n $this->app['whoops'] = $this->app->share(function ($app) {\n // We will instruct Whoops to not exit after it displays the exception as it\n // will otherwise run out before we can do anything else. We just want to\n // let the framework go ahead and finish a request on this end instead.\n with($whoops = new \\Whoops\\Run())->allowQuit(false);\n return $whoops->pushHandler($app['whoops.handler']);\n });\n }", "protected function registerWhoops()\n {\n $this->registerWhoopsHandler();\n $this->registerPrettyWhoopsHandlerInfo();\n\n $this->app['whoops'] = function ($app) {\n // We will instruct Whoops to not exit after it displays the exception as it\n // will otherwise run out before we can do anything else. We just want to\n // let the framework go ahead and finish a request on this end instead.\n Arr::with($whoops = new Run)->allowQuit(false);\n\n $whoops->writeToOutput(true);\n $whoops->pushHandler($app['whoops.plain.handler']);\n $whoops->pushHandler($app['whoops.handler']);\n $whoops->pushHandler($app['whoops.handler.info']);\n\n return $whoops;\n };\n }", "public function setup() {\n // Creates a needle and a haystack.\n $this->message = 'message';\n $this->needle = new stdClass();\n $this->haystack = new stdClass();\n $this->exception = new ht2\\couple\\TypedCoupleException(\n $this->message,\n $this->needle,\n $this->haystack\n );\n\n // Calls parent setup.\n parent::setUp();\n }", "protected static function initializeBasicErrorReporting() {}", "public function setup() {\r\n\t\t$this->_settings();\r\n\t\t\r\n\t\tif($this->settings === false) {\r\n\t\t\t$this->_default_settings();\r\n\t\t}\r\n\t\t\r\n\t\t$this->happyfox_url = 'https://' . $this->settings['account'] . '.happyfox.com';\r\n\t\t$this->api_key = $this->settings['api_key'];\r\n\t\t$this->api_auth = $this->settings['api_auth'];\r\n\t\t$this->api = new HappyFox_API($this->happyfox_url, $this->api_key, $this->api_auth);\r\n\t}", "public static function init()\n {\n if (self::$isInit === false) {\n self::$prettyPageHandler = new PrettyPageHandler();\n self::$prettyPageHandler->setPageTitle('I just broke a string... - strayFw');\n $whoops = new Run();\n $whoops->pushHandler(new JsonResponseHandler());\n $whoops->pushHandler(self::$prettyPageHandler);\n $whoops->register();\n self::$isInit = true;\n }\n }", "static public function init()\n {\n set_error_handler(array('ErrorExceptionProxy', 'handler')); \n }", "public function __construct() {\n\t\tset_error_handler(array($this, 'handleError'));\n\t}", "public function __construct()\n {\n set_error_handler([$this, 'handleError']);\n }", "protected function setup() {\n\n // make sure the logroot exists\n if(!is_writable(dirname($this->logfile))) {\n throw new Exception(l('users.form.error.permissions.title'));\n }\n\n // create the logfile if not there yet\n touch($this->logfile);\n\n // make sure the logroot exists\n if(!is_writable($this->logfile)) {\n throw new Exception(l('login.log.error.permissions'));\n }\n\n }", "public function __construct() {\n $this->_ci = &get_instance();\n \n # Load up the CI configuration information & validate it\n $this->_conf = $this->_ci->config->item(\"watchtower\");\n $this->_validateConfig();\n \n # Build the log dirs and log files if they don't exist\n $this->_buildFileStructure();\n }", "public function setExceptionHandler()\n {\n $handler = ($this->getContainer()->resolve('request')->isAjax())\n ? 'Whoops\\Handler\\JsonResponseHandler'\n : 'Whoops\\Handler\\PrettyPageHandler';\n\n $this->getContainer()->register('exception_handler', $handler);\n\n $this->getContainer()->register('whoops', 'Whoops\\Run')\n ->withMethodCall('pushHandler', ['exception_handler'])\n ->withMethodCall('register');\n\n $this->getContainer()->resolve('whoops');\n }", "public static function setup() {\n\t\t// TODO: Own System Daemon\n\n\t\t// Make it possible to test in source directory\n\t\t//ini_set('include_path', ini_get('include_path').':..');\n\n\t\t// Include Class\n\t\terror_reporting(E_ALL);\n\t\timport(\"Daemon\");\n\n\t\t// Bare minimum setup\n\t\t$options = array(\n\t\t\t'appName' => 'greenmochi',\n\t\t\t'appDir' => BASE_PATH,\n\t\t\t'appDescription' => 'greenMochi!! Anime Downloader',\n\t\t\t'authorName' => 'Tonny Buse',\n\t\t\t'authorEmail' => 'tonnyb@casema.nl',\n\t\t\t'sysMaxExecutionTime' => '0',\n\t\t\t'sysMaxInputTime' => '0',\n\t\t\t'sysMemoryLimit' => '256M',\n\t\t\t'appRunAsGID' => 1001,\n\t\t\t'appRunAsUID' => 1001,\n\t\t\t'logLocation' => BASE_VAR . 'greenmochi.log',\n\t\t\t'appPidLocation' => BASE_VAR . '/greenmochi/greenmochi.pid',\n\t\t);\n\t\tSystem_Daemon::setOptions($options);\n\n\t\tSystem_Daemon::setSigHandler(SIGTERM, 'signalHandler');\n\t}", "public function __construct()\n {\n register_shutdown_function(array($this, \"handleFatalError\"));\n }", "final public function __construct()\n {\n $this->setup();\n }", "protected function whoopsHandler()\n\t{\n\t\treturn ( new WhoopsHandler )->forDebug();\n\t}", "protected function __construct()\n {\n self::$Profiler = Profiler::instance();\n\n if (function_exists('get_magic_quotes_gpc')) {\n if (get_magic_quotes_gpc()) {\n General::cleanArray($_SERVER);\n General::cleanArray($_COOKIE);\n General::cleanArray($_GET);\n General::cleanArray($_POST);\n General::cleanArray($_REQUEST);\n }\n }\n // Initialize language management\n Lang::initialize();\n Lang::set(self::$Configuration->get('lang', 'symphony'));\n\n // Initialize session support\n static::initialiseSessionHandler();\n static::initialiseCookie();\n\n // If the user is not a logged in Author, turn off the verbose error messages.\n ExceptionHandler::$enabled = static::isLoggedIn() && static::Author();\n\n // Engine is ready.\n static::Profiler()->sample('Engine Initialisation');\n }", "protected function whoopsHandler()\n {\n return (new WhoopsHandler)->forDebug();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ This example searches within the authorized user's videos for videos that match the keyword fun. The forMine parameter indicates that the response should only search within the authorized user's videos. Also, since this request uses the forMine parameter, it must also set the type parameter value to video. If you have not uploaded any videos associated with that term, you will not see any items in the API response list.
function searchListMine($youtube, $part, $maxResults, $forMine, $q, $type) { $response = $youtube->search->listSearch( $part, array( 'maxResults' => $maxResults, 'forMine' => $forMine, 'q' => $q, 'type' => $type ) ); printResults($response); }
[ "function searchForVideo($word)\r\n {\r\n return youtubeRequest('video', $word);\r\n \r\n }", "function searchVideos($searchType, $searchTerm, $startIndex, $maxResults)\n{\n // create an unauthenticated service object\n $youTubeService = new Zend_Gdata_YouTube();\n $query = $youTubeService->newVideoQuery();\n $query->setQuery($searchTerm);\n $query->setStartIndex($startIndex);\n $query->setMaxResults($maxResults);\n\n switch ($searchType) {\n case 'most_viewed':\n $query->setFeedType('most viewed');\n $query->setTime('this_week');\n $feed = $youTubeService->getVideoFeed($query);\n break;\n case 'most_recent':\n $query->setFeedType('most recent');\n $query->setTime('this_week');\n $feed = $youTubeService->getVideoFeed($query);\n break;\n case 'recently_featured':\n $query->setFeedType('recently featured');\n $feed = $youTubeService->getVideoFeed($query);\n break;\n case 'top_rated':\n $query->setFeedType('top rated');\n $query->setTime('this_week');\n $feed = $youTubeService->getVideoFeed($query);\n break;\n case 'username':\n if(trim($searchTerm)==''){\n\t\t echo '<div style=\"text-align:center; font-weight:bold;\">No Record Found</div>';\n\t\t exit();\n\t\t\t}else{\n\t\t $feed = $youTubeService->getUserUploads($searchTerm);\n }\n\t\t break;\n\t\t \n\t\t\n case 'all':\n $feed = $youTubeService->getVideoFeed($query);\n break;\n case 'owner':\n $httpClient = getAuthSubHttpClient();\n \n\t\t $youTubeService = new Zend_Gdata_YouTube($httpClient);\n try {\n $feed = $youTubeService->getUserUploads('default');\n if (loggingEnabled()) {\n logMessage($httpClient->getLastRequest(), 'request');\n logMessage($httpClient->getLastResponse()->getBody(),\n 'response');\n }\n } catch (Zend_Gdata_App_HttpException $httpException) {\n print 'ERROR ' . $httpException->getMessage()\n . ' HTTP details<br /><textarea cols=\"70\" rows=\"20\">'\n . $httpException->getRawResponseBody()\n . '</textarea><br />'\n . '<br />';\n return;\n } catch (Zend_Gdata_App_Exception $e) {\n print 'ERROR - Could not retrieve users video feed: '\n . $e->getMessage() . '<br />';\n return;\n }\n echoVideoList($feed, true);\n return;\n \n\t default:\n echo 'ERROR - Unknown search type - \\'' . $searchType . '\\'';\n return;\n }\n\n if (loggingEnabled()) {\n $httpClient = $youTubeService->getHttpClient();\n\t\t\n logMessage($httpClient->getLastRequest(), 'request');\n logMessage($httpClient->getLastResponse()->getBody(), 'response');\n }\n echoVideoList($feed);\n}", "public function searchvideo($term)\n\t{\n\t\t$video_res = null;\n\n\t\t$videos = Video::search($video_res['ids'], $term)\n\t\t\t->paginate( 20, ['id', 'name', 'download', 'views', 'artist']);\n\n\t\t$videos = $this->prepare('video', $videos);\n\n\t\tif ($this->request->ajax() ) {\n\t\t\treturn $videos;\n\t\t}\n\n\t\t$data = [\n\t\t\t'videos' => $videos,\n\t\t\t'query' => $term,\n\t\t\t'title' => $term\n\t\t];\n\n\t\treturn view('search.video', $data);\n\t}", "public function search($term) {\n $videos = $this->videoModel->queryVideos($term);\n\n //pass the queried videos based on term\n $data = [\n 'title' => 'YuTube',\n 'videos' => $videos\n ];\n \n $this->loadView('pages/index', $data);\n \n }", "public static function getsearchvideo()\n\t{\n\t}", "function video_search()\r\n\t{\r\n\t\t$SERVICE_URL = \"http://www.searchmash.com/results/video:\";\r\n\t\t\r\n\t\t//elaborar el url adecuado para este servicio\r\n\t\t\r\n\t\t$peticion_url = $this->elaborar_url($SERVICE_URL);\r\n\t\t\r\n\t\t//conectarse y obtener la respuesta en formato nativo\r\n\t\t\r\n\t\t$this->respuesta_raw = $this->buscar($peticion_url);\t\t//TODO: validar una respuesta exitosa\r\n\t\t\r\n\t\t//transformar la respuesta raw a finjira\r\n\t\t\r\n\t\t$this->respuesta_findjira = $this->video_parse();\t\t\t\t//web_parse utiliza respuesta_raw para transformarla\r\n\t\t\r\n\t}", "public function searchVideos()\n {\n }", "function amve_search_videos( $params = '' ) {\n\t$ajax_call = '' === $params;\n\n\tif ( $ajax_call ) {\n\t\tcheck_ajax_referer( 'ajax-nonce', 'nonce' );\n\t\t$params = $_POST;\n\t}\n\n\t$search_videos = new AMVE_search_videos( $params );\n\t$errors = array();\n\n\tif ( $search_videos->has_errors() ) {\n\t\t$errors = $search_videos->get_errors();\n\t}\n\n\t$videos = $search_videos->get_videos();\n\n\tif ( ! $ajax_call ) {\n\t\treturn $videos;\n\t}\n\n\t$searched_data = $search_videos->get_searched_data();\n\n\twp_send_json(\n\t\tarray(\n\t\t\t'videos' => $videos,\n\t\t\t'searched_data' => $searched_data,\n\t\t\t'errors' => $errors,\n\t\t)\n\t);\n\n\twp_die();\n}", "public function sidebarVideoSearchResult (Request $request) {\n $query = $request->keyword;\n if( !empty($query)) {\n $getSearchResults = DB::table('videos')\n ->join('users','users.id','=','videos.user_id')\n ->select('videos.*','users.id as user_id','videos.id as vid','users.name as name')\n ->where(\"users.name\",\"LIKE\",\"%{$query}%\")\n ->orWhere(\"videos.title\",\"LIKE\",\"%{$query}%\")\n //->where('users.name','LIKE','%'. $query.'%')\n //->orWhere('videos.title','LIKE','%'.$query.'%')\n ->whereNull('deleted_at')\n ->orderBy('created_at','DESC')\n ->paginate(9);\n if(count($getSearchResults )> 0) {\n $content = \\View::make('vdopedia.render.sidebar_search_page',compact('getSearchResults'));\n $content = $content->render();\n return response()->json(['status'=>true,'html'=>$content],200);\n } else {\n return response()->json(['status'=>true,'html'=>'<p>No Result Found.</p>'],200);\n }\n \n }else {\n return response()->json(['status'=>true,'html'=>'<p>No Result Found.</p>'],200);\n }\n \n }", "function searchYoutubeVideo($search,$region,$maximumResult,$debug,$pageToken)\n\t{\n\t\t$search = urlencode($search);\n\t\t$url = \"https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=$maximumResult&order=relevance&q=$search&regionCode=$region&type=video&pageToken=$pageToken&key=\".$this->youtube_key_developper;\n\t\t$reponse = file_get_contents($url);\n\t\t$json = json_decode($reponse);\t\t\n\t\t\n\t\t$totalResults = $json->pageInfo->totalResults;\n\t\t$resultparPage = $json->pageInfo->resultsPerPage;\n\t\t$nextPageToken = $json->nextPageToken;\n\t\t$prevPageToken = $json->prevPageToken;\n\t\t$item = $json->items;\n\t\t\n\t\t$array['nextPageToken'] = $nextPageToken;\n\t\t$array['prevPageToken'] = $prevPageToken;\n\t\t$array['totalResult'] = $totalResults;\n\t\t\n\t\tif($debug)\n\t\t{\n\t\t\techo \"** DEBUG MODE ** [Url] : \".$url.\"<br>\";\n\t\t\techo \"** DEBUG MODE ** [Set Max Result] : \".$maximumResult.\"<br>\";\n\t\t\techo \"** DEBUG MODE ** [Next Page Token] : \".$nextPageToken.\"<br>\";\n\t\t\techo \"** DEBUG MODE ** [Prev Page Token] : \".$prevPageToken.\"<br>\";\n\t\t\techo \"** DEBUG MODE ** [Youtube_Key] : \".$this->youtube_key_developper.\"<br>\";\n\t\t\techo \"** DEBUG MODE ** [Nombre de résultat] : $totalResults<br>\";\n\t\t\techo \"** DEBUG MODE ** [Resultat par page] : $resultparPage<br>\";\n\t\t\techo \"** DEBUG MODE ** [Recherche] : $search<br>\";\n\t\t\techo \"** DEBUG MODE ** [Array Reponse] : <br>\";\n\t\t\tvar_dump($json);\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tfor($x=0;$x<count($item);$x++)\n\t\t{\n\t\t\t$youtube_video = $item[$x];\n\t\t\t$array[$i]['videoId'] = $youtube_video->id->videoId;\n\t\t\t$array[$i]['publishDate'] = $youtube_video->snippet->publishedAt;\n\t\t\t$array[$i]['channelId'] = $youtube_video->snippet->channelId;\n\t\t\t$array[$i]['channelTitle'] = $youtube_video->channelTitle;\n\t\t\t$array[$i]['title'] = $youtube_video->snippet->title;\n\t\t\t$array[$i]['description'] = $youtube_video->snippet->description;\n\t\t\t$array[$i]['thumbnail_default'] = $youtube_video->snippet->thumbnails->default->url;\n\t\t\t$array[$i]['thumbnail_medium'] = $youtube_video->snippet->thumbnails->medium->url;\n\t\t\t$array[$i]['thumbnail_high'] = $youtube_video->snippet->thumbnails->high->url;\n\t\t\t$array[$i]['liveBroadcastContent'] = $youtube_video->liveBroadcastContent;\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\treturn $array;\n\t}", "function searchListLiveEvents($youtube, $part, $eventType, $maxResults, $q, $type) {\n $response = $youtube->search->listSearch(\n $part,\n array(\n 'eventType' => $eventType,\n 'maxResults' => $maxResults,\n 'q' => $q,\n 'type' => $type\n )\n );\n\n printResults($response);\n}", "public function get_sample_videoList( $flag = NULL, $fields = array( 'id', 'title', 'embed_url', 'thumbnail_url', 'private', 'type' ), $status, $page_no = 1, $per_page = 10, $search_title )\n {\n switch ( $flag ) {\n case 'all':\n try {\n if ( !empty( $search_title ) ) {\n $result = $this->sample->get( '/videos?sort=relevance', array(\n 'fields' => $fields,\n 'country' => $this->visitorCountry(),\n 'search' => $search_title,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page )\n ) );\n } else {\n $result = $this->sample->get( '/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'country' => $this->visitorCountry(),\n 'page' => ( $page_no ),\n 'limit' => ( $per_page )\n ) );\n }\n if ( isset( $result['list'] ) && !empty( $result['list'] ) ) {\n foreach ( $result['list'] as $key => $media ) {\n $this->returndata['videos'][$key]['id'] = !empty( $media['id'] ) ? $media['id'] : null;\n $this->returndata['videos'][$key]['title'] = !empty( $media['title'] ) ? $media['title'] : null;\n $this->returndata['videos'][$key]['embed_url'] = !empty( $media['embed_url'] ) ? $media['embed_url'] : null;\n $this->returndata['videos'][$key]['thumbnail_url'] = !empty( $media['thumbnail_url'] ) ? $media['thumbnail_url'] : null;\n $this->returndata['videos'][$key]['description'] = !empty( $media['description'] ) ? $media['description'] : null;\n $this->returndata['videos'][$key]['views_total'] = !empty( $media['views_total'] ) ? $media['views_total'] : 0;\n $this->returndata['videos'][$key]['tags'] = !empty( $media['tags'] ) ? $media['tags'] : null;\n $this->returndata['videos'][$key]['channel.name'] = !empty( $media['channel.name'] ) ? $media['channel.name'] : null;\n $this->returndata['videos'][$key]['created_time'] = !empty( $media['created_time'] ) ? $media['created_time'] : null;\n $this->returndata['videos'][$key]['duration'] = !empty( $media['duration'] ) ? $media['duration'] : null;\n $this->returndata['videos'][$key]['owner.screenname'] = !empty( $media['owner.screenname'] ) ? $media['owner.screenname'] : null;\n $this->returndata['videos'][$key]['private'] = !empty( $media['private'] ) ? $media['private'] : null;\n }\n $this->returndata['total_record'] = !empty( $result['total'] ) ? $result['total'] : null;\n $this->returndata['has_more'] = !empty( $result['has_more'] ) ? $result['has_more'] : null;\n }\n return ( $this->returndata );\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.sample.php function name get_sample_videoList all video', 'phparray', $e->getLine(), $e->getFile() );\n }\n break;\n case 'me':\n try {\n if ( !empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'search' => $search_title,\n 'private' => $status,\n ) );\n } else if( !empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'search' => $search_title,\n 'limit' => ( $per_page )\n ) );\n } else if(empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page )\n ) );\n } else if ( empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'private' => $status\n ) );\n }\n //print '<pre>'; print_r($result); print '</pre>';\n if ( isset( $result['list'] ) && !empty( $result['list'] ) ) {\n foreach ( $result['list'] as $key => $media ) {\n $this->returndata['videos'][$key]['id'] = !empty( $media['id'] ) ? $media['id'] : null;\n $this->returndata['videos'][$key]['title'] = !empty( $media['title'] ) ? $media['title'] : null;\n $this->returndata['videos'][$key]['embed_url'] = !empty( $media['embed_url'] ) ? $media['embed_url'] : null;\n $this->returndata['videos'][$key]['thumbnail_url'] = !empty( $media['thumbnail_url'] ) ? $media['thumbnail_url'] : null;\n $this->returndata['videos'][$key]['description'] = !empty( $media['description'] ) ? $media['description'] : null;\n $this->returndata['videos'][$key]['views_total'] = !empty( $media['views_total'] ) ? $media['views_total'] : 0;\n $this->returndata['videos'][$key]['tags'] = !empty( $media['tags'] ) ? $media['tags'] : null;\n $this->returndata['videos'][$key]['channel.name'] = !empty( $media['channel.name'] ) ? $media['channel.name'] : null;\n $this->returndata['videos'][$key]['created_time'] = !empty( $media['created_time'] ) ? $media['created_time'] : null;\n $this->returndata['videos'][$key]['duration'] = !empty( $media['duration'] ) ? $media['duration'] : null;\n $this->returndata['videos'][$key]['owner.screenname'] = !empty( $media['owner.screenname'] ) ? $media['owner.screenname'] : null;\n $this->returndata['videos'][$key]['private'] = !empty( $media['private'] ) ? $media['private'] : null;\n $this->returndata['videos'][$key]['published'] = !empty( $media['published'] ) ? $media['published'] : null;\n }\n //$this->returndata['total_record'] = $result['total'];\n $this->returndata['has_more'] = $result['has_more'];\n }\n return ( $this->returndata );\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.sample.php function name get_sample_videoList me video', 'phparray', $e->getLine(), $e->getFile() );\n }\n break;\n case 'commented':\n try {\n if ( !empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'search' => $search_title,\n 'sort' => 'commented',\n 'private' => $status,\n ) );\n } else if( !empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'search' => $search_title,\n 'limit' => ( $per_page ),\n 'sort' => 'commented'\n ) );\n } else if(empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'sort' => 'commented'\n ) );\n } else if ( empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'private' => $status,\n 'sort' => 'commented'\n ) );\n }\n if ( isset( $result['list'] ) && !empty( $result['list'] ) ) {\n foreach ( $result['list'] as $key => $media ) {\n $this->returndata['videos'][$key]['id'] = !empty( $media['id'] ) ? $media['id'] : null;\n $this->returndata['videos'][$key]['title'] = !empty( $media['title'] ) ? $media['title'] : null;\n $this->returndata['videos'][$key]['embed_url'] = !empty( $media['embed_url'] ) ? $media['embed_url'] : null;\n $this->returndata['videos'][$key]['thumbnail_url'] = !empty( $media['thumbnail_url'] ) ? $media['thumbnail_url'] : null;\n $this->returndata['videos'][$key]['description'] = !empty( $media['description'] ) ? $media['description'] : null;\n $this->returndata['videos'][$key]['views_total'] = !empty( $media['views_total'] ) ? $media['views_total'] : 0;\n $this->returndata['videos'][$key]['tags'] = !empty( $media['tags'] ) ? $media['tags'] : null;\n $this->returndata['videos'][$key]['channel.name'] = !empty( $media['channel.name'] ) ? $media['channel.name'] : null;\n $this->returndata['videos'][$key]['created_time'] = !empty( $media['created_time'] ) ? $media['created_time'] : null;\n $this->returndata['videos'][$key]['duration'] = !empty( $media['duration'] ) ? $media['duration'] : null;\n $this->returndata['videos'][$key]['owner.screenname'] = !empty( $media['owner.screenname'] ) ? $media['owner.screenname'] : null;\n $this->returndata['videos'][$key]['private'] = !empty( $media['private'] ) ? $media['private'] : null;\n $this->returndata['videos'][$key]['published'] = !empty( $media['published'] ) ? $media['published'] : null;\n }\n //$this->returndata['total_record'] = $result['total'];\n $this->returndata['has_more'] = $result['has_more'];\n }\n return ( $this->returndata );\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.sample.php function name get_sample_videoList comented video', 'phparray', $e->getLine(), $e->getFile() );\n }\n break;\n case 'rated':\n try {\n if ( !empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'search' => $search_title,\n 'sort' => 'rated',\n 'private' => $status,\n ) );\n } else if( !empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'search' => $search_title,\n 'limit' => ( $per_page ),\n 'sort' => 'rated'\n ) );\n } else if(empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'sort' => 'rated'\n ) );\n } else if ( empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'private' => $status,\n 'sort' => 'rated'\n ) );\n }\n if ( isset( $result['list'] ) && !empty( $result['list'] ) ) {\n foreach ( $result['list'] as $key => $media ) {\n $this->returndata['videos'][$key]['id'] = !empty( $media['id'] ) ? $media['id'] : null;\n $this->returndata['videos'][$key]['title'] = !empty( $media['title'] ) ? $media['title'] : null;\n $this->returndata['videos'][$key]['embed_url'] = !empty( $media['embed_url'] ) ? $media['embed_url'] : null;\n $this->returndata['videos'][$key]['thumbnail_url'] = !empty( $media['thumbnail_url'] ) ? $media['thumbnail_url'] : null;\n $this->returndata['videos'][$key]['description'] = !empty( $media['description'] ) ? $media['description'] : null;\n $this->returndata['videos'][$key]['views_total'] = !empty( $media['views_total'] ) ? $media['views_total'] : 0;\n $this->returndata['videos'][$key]['tags'] = !empty( $media['tags'] ) ? $media['tags'] : null;\n $this->returndata['videos'][$key]['channel.name'] = !empty( $media['channel.name'] ) ? $media['channel.name'] : null;\n $this->returndata['videos'][$key]['created_time'] = !empty( $media['created_time'] ) ? $media['created_time'] : null;\n $this->returndata['videos'][$key]['duration'] = !empty( $media['duration'] ) ? $media['duration'] : null;\n $this->returndata['videos'][$key]['owner.screenname'] = !empty( $media['owner.screenname'] ) ? $media['owner.screenname'] : null;\n $this->returndata['videos'][$key]['private'] = !empty( $media['private'] ) ? $media['private'] : null;\n $this->returndata['videos'][$key]['published'] = !empty( $media['published'] ) ? $media['published'] : null;\n }\n //$this->returndata['total_record'] = $result['total'];\n $this->returndata['has_more'] = $result['has_more'];\n }\n return ( $this->returndata );\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.sample.php function name get_sample_videoList rated video', 'phparray', $e->getLine(), $e->getFile() );\n }\n break;\n case 'visited':\n try {\n if ( !empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'search' => $search_title,\n 'sort' => 'visited',\n 'private' => $status,\n ) );\n } else if( !empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?sort=relevance', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'search' => $search_title,\n 'limit' => ( $per_page ),\n 'sort' => 'visited'\n ) );\n } else if(empty( $search_title ) && $status == 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'sort' => 'visited'\n ) );\n } else if ( empty( $search_title ) && $status != 'all') {\n $result = $this->sample->get( '/me/videos?filters=creative-official', array(\n 'fields' => $fields,\n 'page' => ( $page_no ),\n 'limit' => ( $per_page ),\n 'private' => $status,\n 'sort' => 'visited'\n ) );\n }\n if ( isset( $result['list'] ) && !empty( $result['list'] ) ) {\n foreach ( $result['list'] as $key => $media ) {\n $this->returndata['videos'][$key]['id'] = !empty( $media['id'] ) ? $media['id'] : null;\n $this->returndata['videos'][$key]['title'] = !empty( $media['title'] ) ? $media['title'] : null;\n $this->returndata['videos'][$key]['embed_url'] = !empty( $media['embed_url'] ) ? $media['embed_url'] : null;\n $this->returndata['videos'][$key]['thumbnail_url'] = !empty( $media['thumbnail_url'] ) ? $media['thumbnail_url'] : null;\n $this->returndata['videos'][$key]['description'] = !empty( $media['description'] ) ? $media['description'] : null;\n $this->returndata['videos'][$key]['views_total'] = !empty( $media['views_total'] ) ? $media['views_total'] : 0;\n $this->returndata['videos'][$key]['tags'] = !empty( $media['tags'] ) ? $media['tags'] : null;\n $this->returndata['videos'][$key]['channel.name'] = !empty( $media['channel.name'] ) ? $media['channel.name'] : null;\n $this->returndata['videos'][$key]['created_time'] = !empty( $media['created_time'] ) ? $media['created_time'] : null;\n $this->returndata['videos'][$key]['duration'] = !empty( $media['duration'] ) ? $media['duration'] : null;\n $this->returndata['videos'][$key]['owner.screenname'] = !empty( $media['owner.screenname'] ) ? $media['owner.screenname'] : null;\n $this->returndata['videos'][$key]['private'] = !empty( $media['private'] ) ? $media['private'] : null;\n $this->returndata['videos'][$key]['published'] = !empty( $media['published'] ) ? $media['published'] : null;\n }\n //$this->returndata['total_record'] = $result['total'];\n $this->returndata['has_more'] = $result['has_more'];\n }\n return ( $this->returndata );\n }\n catch ( Exception $e ) {\n $this->log_error( $e->getMessage() . ' in class.sample.php function name get_sample_videoList visited video', 'phparray', $e->getLine(), $e->getFile() );\n }\n break;\n }\n }", "public function searchMovies()\n {\n }", "public function getMoviesByFullTextSearch(){\n\t\ttry {\n\t\t\t//sanitize the form data\n\t\t\t$args = array(\n\t\t\t\t'movieSearch'\t\t\t=> FILTER_SANITIZE_STRING,\n\t\t\t\t'movieTitleFilter'\t\t=> FILTER_SANITIZE_STRING,\n\t\t\t\t'movieSagaFilter'\t\t=> FILTER_SANITIZE_STRING,\n\t\t\t\t'movieArtistFilter'\t\t=> FILTER_SANITIZE_STRING,\n\t\t\t\t'movieLoanFilter'\t\t=> FILTER_SANITIZE_STRING,\n\t\t\t\t'movieStorageFilter'\t=> FILTER_SANITIZE_NUMBER_INT,\n\t\t\t\t'movieSortType'\t\t\t=> FILTER_SANITIZE_NUMBER_INT,\n\t\t\t);\n\t\t\t$filters = filter_var_array($_POST, $args);\n\n\t\t\t$filters['movieStorageFilter'] = filter_var($filters['movieStorageFilter'], FILTER_VALIDATE_INT, array('min_range' => 1));\n\t\t\t$filters['movieSortType'] = filter_var($filters['movieSortType'], FILTER_VALIDATE_INT, array('min_range' => 0, 'max-range' => 4));\n\t\t\tif( $filters['movieSortType'] === false ) $filters['movieSortType'] = 0;\n\n\t\t\t//construct the query\n\t\t\t$sql = \" SELECT *\";\n\n\t\t\t$sqlSelect = array();\n\t\t\t$sqlWhere = array();\n\t\t\t$sqlOrder = 'score DESC, ';\n\t\t\t$params = array();\n\t\t\tif( !empty($filters['movieSearch']) ){\n\t\t\t\t$sqlSelect = array(\n\t\t\t\t\t\"MATCH(movieTitle) AGAINST (:searchS)\",\n\t\t\t\t\t\"MATCH(sagaTitle) AGAINST (:searchS)\",\n\t\t\t\t\t\"MATCH(artistFullName) AGAINST (:searchS)\",\n\t\t\t\t\t\"MATCH(loanHolder) AGAINST (:searchS)\",\n\t\t\t\t);\n\t\t\t\t$sqlWhere = array(\n\t\t\t\t\t\"MATCH(movieTitle) AGAINST (:searchW)\",\n\t\t\t\t\t\"MATCH(sagaTitle) AGAINST (:searchW)\",\n\t\t\t\t\t\"MATCH(artistFullName) AGAINST (:searchW)\",\n\t\t\t\t\t\"MATCH(loanHolder) AGAINST (:searchW)\",\n\t\t\t\t);\n\t\t\t\t$params[':searchS'] = $this->prepareForFullTextQuery($filters['movieSearch']);\n\t\t\t\t$params[':searchW'] = $params[':searchS'];\n\t\t\t}\n\t\t\tif( !empty($filters['movieTitleFilter']) ){\n\t\t\t\t$sqlSelect[] = \"MATCH(movieTitle) AGAINST (:movieTitleS)\";\n\t\t\t\t$sqlWhere[] = \"MATCH(movieTitle) AGAINST (:movieTitleW)\";\n\t\t\t\t$params[':movieTitleS'] = $this->prepareForFullTextQuery($filters['movieTitleFilter']);\n\t\t\t\t$params[':movieTitleW'] = $params[':movieTitleS'];\n\t\t\t}\n\t\t\tif( !empty($filters['movieSagaFilter']) ){\n\t\t\t\t$sqlSelect[] = \"MATCH(sagaTitle) AGAINST (:sagaTitleS)\";\n\t\t\t\t$sqlWhere[] = \"MATCH(sagaTitle) AGAINST (:sagaTitleW)\";\n\t\t\t\t$params[':sagaTitleS'] = $this->prepareForFullTextQuery($filters['movieSagaFilter']);\n\t\t\t\t$params[':sagaTitleW'] = $params[':sagaTitleS'];\n\t\t\t}\n\t\t\tif( !empty($filters['movieArtistFilter']) ){\n\t\t\t\t$sqlSelect[] = \"MATCH(artistFullName) AGAINST (:artistS)\";\n\t\t\t\t$sqlWhere[] = \"MATCH(artistFullName) AGAINST (:artistW)\";\n\t\t\t\t$params[':artistS'] = $this->prepareForFullTextQuery($filters['movieArtistFilter']);\n\t\t\t\t$params[':artistW'] = $params[':artistS'];\n\t\t\t}\n\t\t\tif( !empty($filters['movieLoanFilter']) ){\n\t\t\t\t$sqlSelect[] = \"MATCH(loanHolder) AGAINST (:loanS)\";\n\t\t\t\t$sqlWhere[] = \"MATCH(loanHolder) AGAINST (:loanW)\";\n\t\t\t\t$params[':loanS'] = $this->prepareForFullTextQuery($filters['movieLoanFilter']);\n\t\t\t\t$params[':loanW'] = $params[':loanS'];\n\t\t\t}\n\t\t\tif( !empty($filters['movieStorageFilter']) ){\n\t\t\t\t$sqlWhere[] = \"storageID = :storageID\";\n\t\t\t\t$params[':storageID'] = $filters['storageID'];\n\t\t\t}\n\n\t\t\t$sql = \" SELECT mft.*, ma.*\"\n\t\t\t\t .( !empty($sqlSelect) ? ', '.implode(' + ', $sqlSelect).' AS score' : '')\n\t\t\t\t .\" FROM movies_view_ft mft\"\n\t\t\t\t .\" INNER JOIN movie_artists_view_ft maft ON movieID = maft.movieFK \"\n\t\t\t\t .\" LEFT JOIN movie_artists_view ma ON movieID = ma.movieFK \"\n\t\t\t\t .\" WHERE 1 \"\n\t\t\t\t .( !empty($sqlWhere) ? ' AND '.implode(' AND ', $sqlWhere) : '')\n\t\t\t\t .\" ORDER BY \"\n\t\t\t\t .( !empty($sqlSelect) ? $sqlOrder : '')\n\t\t\t\t .$this->_sortTypes[$filters['movieSortType']];\n\n\t\t\t//stash cache init\n\t\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t\tStashBox::setHandler($stashFileSystem);\n\n\t\t\tStashManager::setHandler(get_class( $this ), $stashFileSystem);\n\t\t\tif( empty($params) ) $stash = StashBox::getCache(get_class( $this ), __FUNCTION__, $sql);\n\t\t\telse $stash = StashBox::getCache(get_class( $this ), __FUNCTION__, $sql, serialize($params));\n\t\t\t$results = $stash->get();\n\t\t\tif( $stash->isMiss() ){ //cache not found, retrieve values from database and stash them\n\n\t\t\t\t//drop the temporary table if it exists\n\t\t\t\t$destroyTmpTable = $this->db->prepare(\"DROP TEMPORARY TABLE IF EXISTS movies_view_ft\");\n\t\t\t\t$destroyTmpTable->execute();\n\t\t\t\t$destroyTmpTable = $this->db->prepare(\"DROP TEMPORARY TABLE IF EXISTS movie_artists_view_ft\");\n\t\t\t\t$destroyTmpTable->execute();\n\n\t\t\t\t//create the temporary table\n\t\t\t\t$tmpTable = $this->db->prepare(\"\n\t\t\t\t\tCREATE TEMPORARY TABLE movies_view_ft AS\n\t\t\t\t\tSELECT movieID, movieTitle, movieGenre, movieMediaType, movieLength, movieDate,\n\t\t\t\t\t\t\tsagaID, sagaTitle, movieSagaPosition, movieSagaSize, sagaSearchURL,\n\t\t\t\t\t\t\tstorageID, storageRoom, storageType, storageColumn, storageLine,\n\t\t\t\t\t\t\tloanID, loanHolder, loanDate\n\t\t\t\t\tFROM movies_view\n\t\t\t\t\");\n\t\t\t\t$tmpTable->execute();\n\n\t\t\t\t//add the fulltext index\n\t\t\t\t$indexTmpTable = $this->db->prepare(\"\n\t\t\t\t\tALTER TABLE movies_view_ft ENGINE = MyISAM,\n\t\t\t\t\tADD FULLTEXT INDEX movieFT (movieTitle),\n\t\t\t\t\tADD FULLTEXT INDEX sagaFT (sagaTitle),\n\t\t\t\t\tADD FULLTEXT INDEX loanFT (loanHolder),\n\t\t\t\t\tADD INDEX storageID (storageID),\n\t\t\t\t\tADD INDEX movieID (movieID)\n\t\t\t\t\");\n\t\t\t\t$indexTmpTable->execute();\n\n\t\t\t\t//create the temporary table\n\t\t\t\t$tmpTable = $this->db->prepare(\"\n\t\t\t\t\tCREATE TEMPORARY TABLE movie_artists_view_ft AS\n\t\t\t\t\tSELECT movieFK, artistID, CONCAT(artistFirstName, ' ', artistLastName) AS artistFullName\n\t\t\t\t\tFROM movie_artists_view\n\t\t\t\t\");\n\t\t\t\t$tmpTable->execute();\n\n\t\t\t\t//add the fulltext index\n\t\t\t\t$indexTmpTable = $this->db->prepare(\"\n\t\t\t\t\tALTER TABLE movie_artists_view_ft ENGINE = MyISAM,\n\t\t\t\t\tADD FULLTEXT INDEX artistFT (artistFullName),\n\t\t\t\t\tADD INDEX movieFK (movieFK)\n\t\t\t\t\");\n\t\t\t\t$indexTmpTable->execute();\n\n\n\t\t\t\t$getMovies = $this->db->prepare($sql);\n\n\t\t\t\t$getMovies->execute( $params );\n\n\t\t\t\t$results = $this->_merge($getMovies->fetchAll());\n\n\t\t\t\tif( !empty($results) ) $stash->store($results, STASH_EXPIRE);\n\t\t\t}\n\n\t\t\treturn $results;\n\n\t\t} catch ( PDOException $e ){\n\t\t\terreur_pdo( $e, get_class( $this ), __FUNCTION__ );\n\t\t}\n\t}", "public function movieSearch(Request $request) {\n $search = $request->input('search');\n\n $requestURL = \"http://www.myapifilms.com/imdb?title=\".urlencode($search).\"&limit=5&token=fc9e6951-2b3b-4785-9553-bfb78754c740\";\n\n $movies = json_decode(file_get_contents($requestURL), true);\n\n $movies = $this->changeToValidPosterUrl($movies);\n\n return $movies;\n }", "public function admin_samplevideos() {\n\t\tif (isset($this->request->data['Folder']['search'])) {\n\t\t\t$keyword = $this->request->data['Folder']['search'];\n\t\t\t//pr($keyword);die();\n\t\t} else {\n\t\t\t$keyword = '';\n\t\t}\n\t\t$this->loadModel('Samplevideo');\n\t\t$this->paginate = array(\n\t\t\t'limit' => 6,\n\t\t\t'recursive' => 0,\n\t\t\t'order' => array('main_video' => 'desc'),\n\t\t\t'conditions' => array(\n\t\t\t\t'OR' => array('video_name LIKE' => '%' . $keyword . '%'),\n\t\t\t),\n\t\t);\n\t\t$sample_video = $this->paginate('Samplevideo');\n\n\t\t$this->set('Samplevideo', $sample_video);\n\t}", "function get_url_video_search($url) {\n//-- the system to search for videos on YouTube does not use the API, it only uses the plugin --> simple_html_dom.inc.php\t\t\n\t\t$count = preg_match_all('/v=([^&]+)/',$url,$matches);\n\t\tif ($count > 0) {\n\t\t\tfor($i = 0; $i < $count; $i++) {\n\t\t\t\t$meta = get_tags('https://www.youtube.com/watch?v='.$matches[1][$i]);\t\n\t\t\t\t$output = '\t\t\n\t\t\t\t\t<div class=\"video_info_content\">\n\t\t\t\t\t<img class=\"img_thumbnails\" src=\"'.$meta['image'].'\" alt=\"\"></img>\n\t\t\t\t\t\t<div class=\"video_description\">\n\t\t\t\t\t\t\t<p class=\"text_video_titule_search\">'.utf8_decode($meta['title']).'</p>\n\t\t\t\t\t\t\t<p class=\"text_video_description\">'.utf8_decode($meta['description']).'</p>\n\t\t\t\t\t\t\t<a class=\"button_video_more\" data-toggle=\"modal\" data-target=\"#view-modal-media\" data-id=\"'.$matches[1][$i].'\" id=\"getMedia\" href=\"#\">Download</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>';\t\n\t\t\t\treturn $output;\t\n\t\t\t}\n\t\t} else {\n\t\t\t//return 'There was a problem loading this information';\n\t\t}\n\t}", "public function search_video( $name, $order_by = \"title\" )\r\n\t\t{\r\n\t\t\t// initialize variables\r\n\t\t\t$result = false;\r\n\t\t\t$fields = array();\r\n\t\t\t\r\n\t\t\t// determine field info to include\r\n\t\t\t$fields[] = \"associated_images\";\r\n\t\t\t$fields[] = \"mediafiles\";\r\n\t\t\t$fields[] = \"captions\";\r\n\t\t\t\r\n\t\t\t// get results\r\n\t\t\t$code = $this->make_request( self::ENDPOINT . \"?filter_title=\" . $name . \"&fields=\" . implode( \",\", $fields ) . \"&filter_availability_status=Available&order_by={$order_by}\" );\r\n\t\t\tif ( $code )\r\n\t\t\t\t$result = json_decode( $code );\r\n\t\t\t\r\n\t\t\treturn $result;\r\n\t\t}", "public function searchForSubtitleByMovieName($moviename){\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
drop Drop an object into the trashcan (store then delete)
public function drop($object) { echo '<pre>drop into trashcan ' . print_r($object, true) . '</pre>'; }
[ "public function drop()\n\t{\n\t}", "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "function delete()\n\t{\n\t\tglobal $rbacadmin, $log, $ilDB;\n\n\t\t$remove = false;\n\n\t\t// delete object_data entry\n\t\tif ((!$this->referenced) || ($this->countReferences() == 1))\n\t\t{\n\t\t\t// check type match\n\t\t\t$db_type = ilObject::_lookupType($this->getId());\n\t\t\tif ($this->type != $db_type)\n\t\t\t{\n\t\t\t\t$message = \"ilObject::delete(): Type mismatch. Object with obj_id: \".$this->id.\" \".\n\t\t\t\t\t\"was instantiated by type '\".$this->type.\"'. DB type is: \".$db_type;\n\t\t\t\t\t\n\t\t\t\t// write log entry\n\t\t\t\t$log->write($message);\n\t\t\t\t\t\n\t\t\t\t// raise error\n\t\t\t\t$this->ilias->raiseError(\"ilObject::delete(): Type mismatch. (\".$this->type.\"/\".$this->id.\")\",$this->ilias->error_obj->WARNING);\n\t\t\t}\n\t\t\t\n\t\t\t// delete entry in object_data\n\t\t\t$q = \"DELETE FROM object_data \".\n\t\t\t\t\"WHERE obj_id = \".$ilDB->quote($this->getId(), \"integer\");\n\t\t\t$ilDB->manipulate($q);\n\n\t\t\t// delete long description\n\t\t\t$query = \"DELETE FROM object_description WHERE obj_id = \".\n\t\t\t\t$ilDB->quote($this->getId(), \"integer\");\n\t\t\t$ilDB->manipulate($query);\n\n\t\t\t// write log entry\n\t\t\t$log->write(\"ilObject::delete(), deleted object, obj_id: \".$this->getId().\", type: \".\n\t\t\t\t$this->getType().\", title: \".$this->getTitle());\n\t\t\t\n\t\t\t// remove news\n\t\t\tinclude_once(\"./Services/News/classes/class.ilNewsItem.php\");\n\t\t\t$news_item = new ilNewsItem();\n\t\t\t$news_item->deleteNewsOfContext($this->getId(), $this->getType());\n\t\t\tinclude_once(\"./Services/Block/classes/class.ilBlockSetting.php\");\n\t\t\tilBlockSetting::_deleteSettingsOfBlock($this->getId(), \"news\");\n\n\t\t\tinclude_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';\n\t\t\tilDidacticTemplateObjSettings::deleteByObjId($this->getId());\n\n\t\t\t/* remove notes (see infoscreen gui)\n\t\t\t as they can be seen as personal data we are keeping them for now\n\t\t\tinclude_once(\"Services/Notes/classes/class.ilNote.php\");\n\t\t\tforeach(array(IL_NOTE_PRIVATE, IL_NOTE_PUBLIC) as $note_type)\n\t\t\t{\n\t\t\t\tforeach(ilNote::_getNotesOfObject($this->id, 0, $this->type, $note_type) as $note)\n\t\t\t\t{\n\t\t\t\t\t$note->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t */\n\t\t\t\t\t\t\n\t\t\t// BEGIN WebDAV: Delete WebDAV properties\n\t\t\t$query = \"DELETE FROM dav_property \".\n\t\t\t\t\"WHERE obj_id = \".$ilDB->quote($this->getId(),'integer');\n\t\t\t$res = $ilDB->manipulate($query);\n\t\t\t// END WebDAV: Delete WebDAV properties\n\n\t\t\tinclude_once './Services/WebServices/ECS/classes/class.ilECSImport.php';\n\t\t\tilECSImport::_deleteByObjId($this->getId());\n\t\t\t\n\t\t\tinclude_once(\"Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php\");\n\t\t\tilAdvancedMDValues::_deleteByObjId($this->getId());\n\n\t\t\t$remove = true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// write log entry\n\t\t\t$log->write(\"ilObject::delete(), object not deleted, number of references: \".\n\t\t\t\t$this->countReferences().\", obj_id: \".$this->getId().\", type: \".\n\t\t\t\t$this->getType().\", title: \".$this->getTitle());\n\t\t}\n\n\t\t// delete object_reference entry\n\t\tif ($this->referenced)\n\t\t{\t\t\t\n\t\t\tinclude_once \"Services/Object/classes/class.ilObjectActivation.php\";\n\t\t\tilObjectActivation::deleteAllEntries($this->getRefId());\n\t\t\t\n\t\t\t// delete entry in object_reference\n\t\t\t$query = \"DELETE FROM object_reference \".\n\t\t\t\t\"WHERE ref_id = \".$ilDB->quote($this->getRefId(),'integer');\n\t\t\t$res = $ilDB->manipulate($query);\n\t\t\t\n\t\t\t// write log entry\n\t\t\t$log->write(\"ilObject::delete(), reference deleted, ref_id: \".$this->getRefId().\n\t\t\t\t\", obj_id: \".$this->getId().\", type: \".\n\t\t\t\t$this->getType().\", title: \".$this->getTitle());\n\n\t\t\t// DELETE PERMISSION ENTRIES IN RBAC_PA\n\t\t\t// DONE: method overwritten in ilObjRole & ilObjUser.\n\t\t\t// this call only applies for objects in rbac (not usr,role,rolt)\n\t\t\t// TODO: Do this for role templates too\n\t\t\t$rbacadmin->revokePermission($this->getRefId(),0,false);\n\n\t\t\tinclude_once \"Services/AccessControl/classes/class.ilRbacLog.php\";\n\t\t\tilRbacLog::delete($this->getRefId());\n\n\t\t\t// Remove applied didactic template setting\n\t\t\tinclude_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateObjSettings.php';\n\t\t\tilDidacticTemplateObjSettings::deleteByRefId($this->getRefId());\n\n\t\t\t// Remove desktop items\n\t\t\tilUtil::removeItemFromDesktops($this->getRefId());\n\t\t}\n\n\t\t// remove conditions\n\t\tif ($this->referenced)\n\t\t{\n\t\t\t$ch =& new ilConditionHandler();\n\t\t\t$ch->delete($this->getRefId());\n\t\t\tunset($ch);\n\t\t}\n\n\t\treturn $remove;\n\t}", "public function admin_drop() {\n\t\t$this->Move->dropItem();\n\t}", "public function hr_drop() {\n\t\t$this->Move->dropItem();\n\t}", "public function deleteOne($object);", "function _delete_from_trash()\n{\n\t// DELETE FROM entry_trash WHERE id='{$id}'\n}", "function deleteOne($object);", "function trash() {\n\t\twp_trash_post( $this->post->ID );\n\t}", "public function remove($object);", "public function delete()\n\t{\n\t\t$this->folder = \"trash\";\n\t\t$this->save();\n\n\t\t//notify any listening bundles that an email has been moved to the\n\t\t//trash bin\n\t\t$event = new MailEvent($this);\n\t\t$dispatcher = MasterContainer::get(\"event_dispatcher\");\n\t\t$dispatcher->dispatch(MailEvents::onEmailMessageTrash, $event);\n\t}", "public function removeObjectReallyRemovesTheObjectFromStorage() {\n\t\t$originalObject = new \\F3\\FLOW3\\Fixture\\DummyClass();\n\t\t$this->objectRegistry->putObject('DummyObject', $originalObject);\n\t\t$this->objectRegistry->removeObject('DummyObject');\n\t\t$this->assertFalse($this->objectRegistry->objectExists('DummyObject'), 'removeObject() did not really remove the object.');\n\t}", "public function delete($object);", "public function removeObject()\n {\n $sql = 'DELETE FROM {sql:tableName} WHERE {sql:primaryKey} = {primaryValue}';\n $this->db->query(Strings::prepareSql($sql, array(\n 'tableName' => $this->table,\n 'primaryKey' => $this->primaryKey[0],\n 'primaryValue' => $this->id\n )));\n\n $this->resetCache();\n }", "public function unpersist($object) {\n $this->removeObject($object);\n }", "public function dropStudent(Student $student){\n\n }", "public function drop()\r\n\t{\r\n\t\t// Drop the table\r\n\t\tDB::drop('table', $this->name)\r\n\t\t\t->execute($this->database);\r\n\t\t\t\r\n\t\t// The table unloads when it is dropped.\r\n\t\t$this->_loaded = FALSE;\r\n\t}", "public function unpersist($object)\n {\n $this->removeObject($object);\n }", "public function action_trash()\n\t{\n\t\t$project = ORM::factory('project', $this->request->param('id'));\n\t\t$project->trash();\n\t\tMsg::instance()->set( Msg::NOTICE, \"You've just send a project to the trash bin. You can still restore it.\");\n\t\t$this->request->redirect('project');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get due from config
protected function getDue() { $day = (int)$this->scopeConfig->getValue("payment/moipboleto/expiration"); if($day > 1) { return nl2br(__('Expiration in %1 days', $day)); } else { return nl2br(__('Expiration in %1 day', $day));; } }
[ "protected function getDue()\n {\n $day = (int)$this->scopeConfig->getValue('payment/genpay_billet/expiration', \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE);\n if ($day > 1) {\n return nl2br(sprintf(__('Expiration in %s days'), $day));\n } else {\n return nl2br(sprintf(__('Expiration in %s day'), $day));\n }\n }", "function getDueOn() {\n return $this->getFieldValue('due_on');\n }", "function getDuePeriod() {\n\t\treturn $this->data_array['due_period'];\n\t}", "public function getDue()\n {\n $configurations = $this->getConfigurations();\n $due = new ArrayCollection();\n foreach ($configurations as $configuration) {\n if ($configuration->isDue()) {\n $due->add($configuration);\n }\n }\n\n return $due;\n }", "function getDateDue() {\n\t\treturn $this->getData('dateDue');\n\t}", "public function getDueDate();", "public function get_dueDate() { return $this->_dueDate; }", "public function get_due_day( $context = 'view' ) {\n\t\treturn $this->get_prop( 'due_day', $context ) ;\n\t}", "public function getServiceDueDate();", "public function getDueDate(){\n return $this->getParameter('due_date');\n }", "public function getdue($st_id) {\n\t\n\t\t$settest = DB::getInstance()->get('tbl_settest', array('st_id', '=', $st_id));\n\t\t\n\t\tif(!$settest->count()) {\n\t\t\t$due = 'No set test found';\n\t\t} else {\n\t\t\tforeach($settest->results() as $settest) {\n\t\t\t\t$due = $settest->due;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $due;\n\t\n\t}", "public function get_due_days() {\n\t\treturn $this->due_days;\n\t}", "private function calculateDueDate() {\n // 14 days; 24 hours; 60 mins; 60secs\n $dueDate = time() + ($this->config()->loan_period * 24 * 60 * 60);\n return date(\"Y-m-d\", $dueDate);\n }", "public function getDueDate()\r\n {\r\n return $this->dueDate;\r\n }", "public function getDueDate()\n {\n return $this->dueDate;\n }", "public function getDueDate() {\n\t\treturn $this->dueDate;\n\t}", "public static function calcMinCommentPeriod($nowDate = null, $dueOn, $pri) {\n /* @var $nowDate DateTime */\n /* @var $dueOn DateTime */\n global $mcpConfig;\n if (count($mcpConfig) > 0) {\n return self::calcMinCommentPeriodFromConfig($nowDate, $dueOn, $pri);\n }\n wdebug(\"AvcPodioTask.calcMinCommentPeriod\", \"WARNING! mcpConfig does not exist. Check GetConfig.\");\n \n $mcp = 24*5; // Default is 5 days\n if ($nowDate == null) {\n $nowDate = new DateTime();\n }\n \n // Overdue or Not overdue?\n if ($dueOn < $nowDate) {\n // Overdue\n switch ($pri) {\n case 1:\n $mcp = 24 * 3; // default is 1 status every 3 days\n break;\n case 2:\n $mcp = 24 * 1; // 1 days\n break;\n case 3:\n $mcp = 6; // Since we only poll from 8am - 5pm, this is effectively 3x/day\n break;\n case 4:\n $mcp = 3; // Since we only poll from 8am - 5pm, this is effectively 3x/day\n break;\n case 5:\n $mcp = 3; // Since we only poll from 8am - 5pm, this is effectively 3x/day\n default:\n break;\n }\n } else {\n // Not overdue\n $interval = $dueOn->diff($nowDate);\n $hrsTilDue = getTotalInterval($interval, \"hours\");\n switch ($pri) {\n case 1:\n $mcp = 24 * 14; // default is 1 status every 14 days\n break;\n case 2:\n $mcp = 24 * 3; // 3 days\n break;\n case 3:\n $mcp = 24 * 2; // 2 days\n break;\n case 4:\n $mcp = 24 * 1; // 1 day\n break;\n case 5:\n $mcp = 3; // Since we only poll from 8am - 5pm, this is effectively 3x/day\n default:\n break;\n }\n // If $hrsTilDue < 7 Days (24*7)\n \n \n // if $hrsTilDue < 3 Days (24*3)\n \n \n }\n return $mcp; \n }", "public function getPaymentDueToDate();", "public function getDueDate(){\r\n $this->initDb();\r\n if($this->id != \"\"){\r\n $this->due_date = (getValue(\"SELECT subject_due_date FROM tbl_subjects WHERE subject_id = \" . $this->id));\r\n }\r\n return $this->due_date;\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get cryptography details for a person (identified by personal key)
public function getCryptographyFor(PersonalKey $person): CryptographicDetails { if ( ! $this->hasPerson($person)) { throw new CryptoCouldNotBeFoundForPerson($person->toString()); } $crypto = $this->db->readFirst( "select * from {$this->table} where personal_key = :personal_key", [ 'personal_key' => $person->toString(), ] ); if (empty($crypto->cryptographic_details)) { throw new CanNotRetrieveCryptoForARemovedPerson; } $details = (array) json_decode($crypto->cryptographic_details); return CryptographicDetails::deserialize($details); }
[ "function getCryptographyFor(PersonalKey $person): CryptographicDetails;", "function generateCryptographicDetails(): CryptographicDetails;", "abstract public function privateKeyInfo();", "public function getCryptKey(): string;", "public function getPrivateKey(): string;", "abstract public function getProviderInformation($key);", "protected function key()\n {\n return (string)$this->client->getCredential();\n }", "public function getPrivateKey() {}", "public function getKey() {\n\t\t$key = $this->getPrivateKey();\n\t\t$key .= $this->getCertificate();\n\t\treturn $key;\n\t}", "function openssl_pkey_get_public($certificate)\n{\n}", "abstract function get_provider_information();", "public function getCryptKey ()\n {\n return $this->getVendorPassword();\n }", "public function security_credential()\n {\n //$publicKey = file_get_contents(__DIR__ . '\\cert.cert');\n //openssl_public_encrypt($this->initiator_pass, $encrypted, $publicKey, OPENSSL_PKCS1_PADDING);\n // return if(!is_null($this->security_credential))? $this->security_credential : base64_encode($encrypted);\n return $this->security_credential;\n }", "function getPersonalDetails();", "public function getUserInfoEncryptionAlg()\n {\n return $this->userInfoEncryptionAlg;\n }", "public function getKeyInfo()\n\t{\n\t\t$keyID = $this->getGPGID(true);\n\t\n\t\tif (!is_null($keyID))\n\t\t\treturn($this->gpgKeyList[$keyID]);\n\t\telse\n\t\t\treturn('');\n\t}", "public function getSignerCertStorePassword() {\r\n return ipworksencrypt_rsa_get($this->handle, 34 );\r\n }", "public function fetchPublicKey();", "public function get_certificate() {\n return self::extract_key($this->get_certificate_file());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
End of fillDropdowns createNewFrames Creates test iframes based on display options. Displays iframes based on COMMON_WIDTHS array on initial window load or display by width is selected. Displays iframes based on device widths stored in json files otherwise.
function createNewFrames($source, $url){ global $COMMON_WIDTHS; if($source == "width"){ $_SESSION['frameData'] = $COMMON_WIDTHS; }else{ // Restart with a new array $_SESSION['frameData'] = array(); // Apple Devices $fileContents = file_get_contents("assets/data/apple_devices.json"); $appleData = json_decode($fileContents, true); // Android devices $fileContents = file_get_contents("assets/data/android_devices.json"); $androidData = json_decode($fileContents, true); // All Devices - Only display one's with a true "selected" value $data = array_merge($appleData, $androidData); foreach ($data as $curr) { // Adding all data to frameData $newKey = $curr['device']; $_SESSION['frameData'][(string)$newKey] = $curr; } // Sort by increasing width uasort($_SESSION['frameData'], function($first, $second){ return (int)$first['width'] > (int)$second['width']; }); } foreach($_SESSION['frameData'] as $curr){ if($source == "width" || $curr['selected'] == "true"){ // Place each iframe and it's width title together in one div echo "<div class='frame-holder'>"; // For display by width, just use curr var; otherwise, insert device // name and its dimensions $output = ($source == "width") ? $curr : ($curr['device']." (".$curr["width"]."x".$curr["height"].")"); echo "<span>".$output."</span>"; echo "<iframe src='".$url."' "; // For display by width, just use curr var; otherwise, need to // dereference multidim array $width = ($source == "width") ? $curr : $curr['width']; echo "width='".$width."' height='500'>"; echo "</iframe>"; echo "</div>\n\t\t\t\t"; } } //echo "<pre>".print_r($_SESSION['frameData'])."</pre>"; }
[ "function frames() {\r\n extract($GLOBALS);\r\n $_SESSION[\"BodyWidth\"] = \"620\";\r\n\r\n ShowHTML('<html>');\r\n ShowHTML('<head>');\r\n ShowHTML(' <title>Controle Central</title>');\r\n ShowHTML('</head>');\r\n\r\n ShowHTML('<frameset cols=\"200,*\">');\r\n ShowHTML(' <frame name=\"menu\" src=\"controle.php?par=menu\" scrolling=\"auto\" marginheight=\"0\" marginwidth=\"0\">');\r\n ShowHTML(' <frame name=\"content\" src=\"controle.php?par=escolas\" scrolling=\"auto\" marginheight=\"0\" marginwidth=\"0\">');\r\n ShowHTML('</frameset>');\r\n ShowHTML('</html>');\r\n }", "function do_frameset_mobile_js($audio=null)\n{\n\n ?> \n <script type=\"text/javascript\" src=\"js/jquery.js\" charset=\"utf-8\"></script>\n \n <script type=\"text/javascript\">\n //<![CDATA[\n function rsizeIframes() {\n const h_height = <?php \n if (isset($audio)) {\n getSettingWithDefault('set-text-h-frameheight-with-audio');\n } else {\n getSettingWithDefault('set-text-h-frameheight-no-audio');\n } ?> + 10;\n const lr_perc = <?php echo getSettingWithDefault('set-text-l-framewidth-percent'); ?>;\n const r_perc = <?php echo getSettingWithDefault('set-text-r-frameheight-percent'); ?>;\n const w = $(window).width();\n const h = $(window).height();\n const l_width = w * lr_perc / 100;\n const r_width = w - l_width;\n const l_height = h - h_height;\n const ro_height = h * r_perc / 100;\n const ru_height = h - ro_height;\n $('#frame-h').width(l_width-5).height(h_height-5)\n .css('top',0).css('left',0);\n $('#frame-h-2').width('100%').height('100%')\n .css('top',0).css('left',0);\n $('#frame-l').width(l_width-5).height(l_height-5)\n .css('top',h_height).css('left',0);\n $('#frame-l-2').width('100%').height('100%')\n .css('top',0).css('left',0);\n $('#frame-ro').width(r_width-5).height(ro_height-5)\n .css('top',0).css('left',l_width);\n $('#frame-ro-2').width('100%').height('100%')\n .css('top',0).css('left',0);\n $('#frame-ru').width(r_width-5).height(ru_height-5)\n .css('top',ro_height).css('left',l_width);\n $('#frame-ru-2').width('100%').height('100%')\n .css('top',0).css('left',0);\n }\n \n function init() {\n rsizeIframes();\n $(window).resize(rsizeIframes);\n }\n \n $(document).ready(init);\n //]]>\n </script>\n \n <?php\n \n}", "public function frameSet()\n { \n $this->getDocumentTemplate()->JScode = $this->getDocumentTemplate()->wrapScriptTags('\n if (!window.opener) {\n alert(\"ERROR: Sorry, no link to main window... Closing\");\n close();\n }\n ');\n $this->getDocumentTemplate()->startPage($this->getLanguageService()->getLL('geoselector_title'));\n\n // URL for the inner main frame:\n $url = BackendUtility::getModuleUrl(\n 'wizard_GooglePicker',\n [\n 'showPicker' => 1,\n 'currentValue' => $this->wizardParameters['currentValue'],\n 'fieldName' => $this->wizardParameters['itemName'],\n 'formName' => $this->wizardParameters['formName'],\n 'exampleImg' => $this->wizardParameters['exampleImg'],\n 'md5ID' => $this->wizardParameters['md5ID'],\n 'fieldChangeFunc' => serialize($this->wizardParameters['fieldChangeFunc']),\n 'fieldChangeFuncHash' => $this->wizardParameters['fieldChangeFuncHash'],\n ]\n );\n $this->content = $this->getPageRenderer()->render(PageRenderer::PART_HEADER) . '\n\t\t\t<frameset rows=\"*,1\" framespacing=\"0\" frameborder=\"0\" border=\"0\">\n\t\t\t\t<frame name=\"content\" src=\"' . htmlspecialchars($url) . '\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"auto\" noresize=\"noresize\" />\n\t\t\t</frameset>\n\t\t';\n }", "public function createFrames()\n {\n $this->boundingBox = imagettfbbox($this->fontSettings['size'], 0, $this->fontSettings['path'], '00:00:00:00');\n $this->characterDimensions = imagettfbbox($this->fontSettings['size'], 0, $this->fontSettings['path'], '0');\n $this->characterWidth = $this->characterDimensions[2];\n $this->characterHeight = abs($this->characterDimensions[1] + $this->characterDimensions[7]);\n\n $this->base = $this->applyTextToImage($this->base, $this->fontSettings, $this->date);\n\n // create each frame\n for ($i = 0; $i <= $this->seconds; $i++) {\n $layer = imagecreatetruecolor($this->width, $this->height);\n $this->createFilledBox($layer);\n\n $layer = $this->applyTextToImage($layer, $this->fontSettings, $this->date);\n }\n\n $this->showImage();\n }", "function do_test_mobile_page($property=null) \n{\n $language = get_l2_language_name();\n ?>\n<div style=\"width: 95%; height: 100%;\">\n <div id=\"frame-h\">\n <?php\n start_test_header_page($language);\n ?>\n </div>\n <hr />\n <div id=\"frame-l\">\n <?php\n if (getreq('type') == 'table') {\n do_test_table();\n } else {\n $test_sql = do_test_get_test_sql(\n $_REQUEST['selection'] ?? null, $_SESSION['testsql'] ?? null, \n $_REQUEST['lang'] ?? null, $_REQUEST['text'] ?? null\n );\n do_test_test_content_ajax($test_sql);\n }\n ?>\n </div>\n</div>\n<div id=\"frames-r\" \nstyle=\"position: fixed; top: 0; right: -100%; width: 100%; height: 100%;\" \nonclick=\"hideRightFrames();\">\n <!-- iFrames wrapper for events -->\n <div style=\"margin-left: 50%; height: 99%;\">\n <iframe src=\"empty.html\" scrolling=\"auto\" name=\"ro\" style=\"height: 50%; width: 100%;\">\n Your browser doesn't support iFrames, update it!\n </iframe>\n <iframe src=\"empty.html\" scrolling=\"auto\" name=\"ru\" style=\"height: 50%; width: 100%;\">\n Your browser doesn't support iFrames, update it!\n </iframe>\n </div>\n</div>\n<audio id=\"success_sound\">\n <source src=\"<?php print_file_path(\"sounds/success.mp3\") ?>\" type=\"audio/mpeg\" />\n Your browser does not support audio element!\n</audio>\n<audio id=\"failure_sound\">\n <source src=\"<?php print_file_path(\"sounds/failure.mp3\") ?>\" type=\"audio/mpeg\" />\n Your browser does not support audio element!\n</audio>\n <?php\n}", "function iframe_defaults() {\r\n $auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : 'AUTH_KEY_MISSING';\r\n $iframeAdminOptions = array(\r\n 'securitykey' => '',\r\n 'src' => '//www.tinywebgallery.com', 'width' => '100%',\r\n 'height' => '600', 'scrolling' => 'none', 'marginwidth' => '0', 'marginheight' => '0',\r\n 'frameborder' => '0', 'transparency' => 'true', 'content_id' => '', 'content_styles' => '',\r\n 'hide_elements' => '', 'class' => '', 'shortcode_attributes' => 'true', 'url_forward_parameter' => '',\r\n 'id' => 'advanced_iframe', 'name' => '',\r\n 'onload' => '', 'onload_resize' => 'false', 'onload_scroll_top' => 'false',\r\n 'additional_js' => '', 'additional_css' => '', 'store_height_in_cookie' => 'false',\r\n 'additional_height' => '0', 'iframe_content_id' => '', 'iframe_content_styles' => '',\r\n 'iframe_hide_elements' => '', 'version_counter' => '1', 'onload_show_element_only' => '',\r\n 'include_url' => '', 'include_content' => '', 'include_height' => '', 'include_fade' => '',\r\n 'include_hide_page_until_loaded' => 'false', 'donation_bottom' => 'false',\r\n 'onload_resize_width' => 'false', 'resize_on_ajax' => '', 'resize_on_ajax_jquery' => 'true',\r\n 'resize_on_click' => '', 'resize_on_click_elements' => 'a', 'hide_page_until_loaded' => 'false',\r\n 'show_part_of_iframe' => 'false', 'show_part_of_iframe_x' => '100', 'show_part_of_iframe_y' => '100',\r\n 'show_part_of_iframe_width' => '400', 'show_part_of_iframe_height' => '300',\r\n 'show_part_of_iframe_new_window' => '', 'show_part_of_iframe_new_url' => '',\r\n 'show_part_of_iframe_next_viewports_hide' => 'false', 'show_part_of_iframe_next_viewports' => '',\r\n 'show_part_of_iframe_next_viewports_loop' => 'false', 'style' => '',\r\n 'use_shortcode_attributes_only' => 'false', 'enable_external_height_workaround' => 'external',\r\n 'keep_overflow_hidden' => 'false', 'hide_page_until_loaded_external' => 'false',\r\n 'onload_resize_delay' => '', 'expert_mode' => 'false',\r\n 'show_part_of_iframe_allow_scrollbar_vertical' => 'false',\r\n 'show_part_of_iframe_allow_scrollbar_horizontal' => 'false',\r\n 'hide_part_of_iframe' => '', 'change_parent_links_target' => '',\r\n 'change_iframe_links' => '', 'change_iframe_links_target' => '',\r\n 'browser' => '', 'show_part_of_iframe_style' => '',\r\n 'map_parameter_to_url' => '', 'iframe_zoom' => '',\r\n 'accordeon_menu' => 'no',\r\n 'show_iframe_loader' => 'false',\r\n 'tab_visible' => '', 'tab_hidden' => '',\r\n 'enable_responsive_iframe' => 'false',\r\n 'allowfullscreen' => 'false', 'iframe_height_ratio' => '',\r\n 'enable_lazy_load' => 'false', 'enable_lazy_load_threshold' => '3000',\r\n 'enable_lazy_load_fadetime' => '0', 'enable_lazy_load_manual' => 'false',\r\n 'pass_id_by_url' => '', 'include_scripts_in_footer' => 'true',\r\n 'write_css_directly' => 'false', 'resize_on_element_resize' => '',\r\n 'resize_on_element_resize_delay' => '250', 'add_css_class_parent' => 'false',\r\n 'auto_zoom' => 'false', 'auto_zoom_by_ratio' => '',\r\n 'single_save_button' => 'true', 'enable_lazy_load_manual_element' => '',\r\n 'alternative_shortcode' => '', 'show_menu_link' => 'true',\r\n 'iframe_redirect_url' => '', 'install_date' => 0,\r\n 'show_part_of_iframe_last_viewport_remove' => 'false',\r\n 'load_jquery' => 'true', 'show_iframe_as_layer' => 'false',\r\n 'add_iframe_url_as_param' => 'false', 'add_iframe_url_as_param_prefix' => '',\r\n 'reload_interval' => '', 'iframe_content_css' => '',\r\n 'additional_js_file_iframe' => '', 'additional_css_file_iframe' => '',\r\n 'add_css_class_iframe' => 'false', 'editorbutton' => 'src,width,height',\r\n 'iframe_zoom_ie8' => 'false', 'enable_lazy_load_reserve_space' => 'true',\r\n 'hide_content_until_iframe_color' => '', 'use_zoom_absolute_fix' => 'false',\r\n 'include_html' => '', 'enable_ios_mobile_scolling' => 'false',\r\n 'sandbox' => '', 'show_iframe_as_layer_header_file' => '',\r\n 'show_iframe_as_layer_header_height' => '100', 'show_iframe_as_layer_header_position' => 'top',\r\n 'resize_min_height' => '1', 'show_iframe_as_layer_full' => 'false',\r\n 'demo' => 'false', 'show_part_of_iframe_zoom' => 'false',\r\n 'external_height_workaround_delay' => '0',\r\n 'add_document_domain' => 'false', 'document_domain' => '',\r\n 'multi_domain_enabled' => 'false', 'check_shortcode' => 'false',\r\n 'use_post_message' => 'false', 'element_to_measure_offset' => '0',\r\n 'data_post_message' => '', 'element_to_measure' => 'default',\r\n 'show_iframe_as_layer_keep_content' => 'true','roles' => 'none',\r\n 'parent_content_css' => '',\r\n 'include_scripts_in_content' => 'false', 'debug_js' => 'false',\r\n 'check_iframe_cronjob' => 'false', 'check_iframe_cronjob_email' => '',\r\n 'enable_content_filter' => 'false', 'add_ai_external_local' => 'false',\r\n 'title' => '', 'check_iframes_when_save' => 'error',\r\n 'admin_was_loaded' => 'true', 'check_iframe_url_when_load' => 'true'\r\n );\r\n return $iframeAdminOptions;\r\n }", "function edit_frame($tpl = null) {\n\n $shellob =& VWP::getShell();\n \n // setup tabs\n \n $current_widget = 'framemgr';\n $shellob->setVar('current_widget',$current_widget);\n \n $tabs = $this->getWidget(\"tabs\");\n \n if (!VWP::isWarning($tabs)) {\n $tabs = $tabs->build(); \n }\n \n $tabs_foot = $this->getWidget(\"tabs\");\n \n if (!VWP::isWarning($tabs_foot)) {\n $tabs_foot = $tabs_foot->build('foot'); \n }\n \n if (VWP::isWarning($tabs)) {\n $tabs->ethrow();\n $tabs = null;\n }\n\n if (VWP::isWarning($tabs_foot)) {\n $tabs_foot->ethrow();\n $tabs_foot = null;\n } \n\n $this->assignRef('tabs',$tabs);\n $this->assignRef('tabs_foot',$tabs_foot);\n \n // Setup Widget\n\n $frames = $this->getModel('frames');\n $selected = $shellob->getChecked('ck'); \n $frame_list = $shellob->getVar('frame_list'); \n if ((count($selected) < 1) || (!isset($frame_list[$selected[0]]))) {\n VWP::raiseWarning('No frame selected',get_class($this));\n return $this->display($tpl); \n } \n $frameId = $frame_list[$selected[0]][\"id\"]; \n \n $frame_item_list = $frames->getAllItems($frameId);\n \n $frame_info = $frames->getFrameProperties($frameId);\n if (VWP::isWarning($frame_info)) {\n $frame_info->ethrow();\n $frame_info = array();\n }\n \n $this->assignRef('frame_item_list',$frame_item_list);\n $this->assignRef('frame_info',$frame_info);\n $this->assignRef('frameId',$frameId);\n\n // Display layout\n \n $this->setLayout('edit_frame'); \n parent::display($tpl);\n }", "protected function getPreviewFrameWidths() {}", "protected function _prepareFrames()\n {\n if (count($this->getStoreCategories())) {\n foreach ($this->getStoreCategories() as $category) {\n $this->_frames[] = $this->_getFrame($category);\n }\n }\n Mage::register(self::NAVIGATION_FRAMES, $this->_frames);\n }", "function oe_media_iframe_post_update_00007(): void {\n $entity_type_manager = \\Drupal::entityTypeManager();\n $media_type_storage = $entity_type_manager->getStorage('media_type');\n $iframe_types = $media_type_storage->loadByProperties(['source' => 'oe_media_iframe']);\n\n $fields = \\Drupal::service('entity_field.manager')->getFieldStorageDefinitions('media');\n if (!isset($fields['oe_media_iframe_title'])) {\n $storage = $entity_type_manager\n ->getStorage('field_storage_config')\n ->create([\n 'entity_type' => 'media',\n 'field_name' => 'oe_media_iframe_title',\n 'type' => 'string',\n ]);\n $storage->save();\n }\n else {\n $storage = $fields['oe_media_iframe_title'];\n }\n\n foreach ($iframe_types as $type) {\n $id = $type->id();\n $field_config = FieldConfig::load(\"media.$id.oe_media_iframe_title\");\n if ($field_config) {\n // If the current media type already has the field, we skip it.\n continue;\n }\n $field = $entity_type_manager\n ->getStorage('field_config')\n ->create([\n 'field_storage' => $storage,\n 'bundle' => $type->id(),\n 'label' => 'Iframe title',\n 'description' => 'Providing an Iframe title value will replace the title value in the iframe html.',\n 'required' => FALSE,\n 'translatable' => FALSE,\n ]);\n $field->save();\n\n // Update default form display to include the iframe title after name.\n $form_display = $entity_type_manager->getStorage('entity_form_display')->load('media.' . $type->id() . '.default');\n $name_component = $form_display->getComponent('name');\n $title_field_weight = ($name_component && isset($name_component['weight'])) ? $name_component['weight'] + 1 : -40;\n $form_display->setComponent('oe_media_iframe_title', [\n 'weight' => $title_field_weight,\n ])->save();\n }\n\n // Allow title attribute for oe_media_iframe filter.\n $format = FilterFormat::load('oe_media_iframe');\n $filters = $format->get('filters');\n if (!isset($filters['filter_html']) || str_contains($filters['filter_html']['settings']['allowed_html'], 'title')) {\n return;\n }\n $filters['filter_html']['settings']['allowed_html'] = str_replace('>', ' title>', $filters['filter_html']['settings']['allowed_html']);\n $format->set('filters', $filters);\n $format->save();\n}", "function aerospace_data_display_iframe( $data_url, $width, $height, $fallback_img = null, $iframe_resize_disabled = false, $align = null ) {\n\tif ( empty( $width ) ) {\n\t\t$width = '100%';\n\t}\n\tif ( $height ) {\n\t\t$height_value = 'height=\"' . $height . '\"';\n\t}\n\tif ( $fallback_img ) {\n\t\t$fallback_img = '<div class=\"data-fallbackImg\">' . $fallback_img . '<p>For best experience, please view on a desktop computer.</p></div>';\n\t}\n\tif ( ! $iframe_resize_disabled ) {\n\t\t$enabled_class = ' js-iframeResizeEnabled';\n\t}\n\n\treturn $fallback_img . '<iframe class=\"data-iframe' . $enabled_class . ' ' . $align . '\" width=\"' . $width . '\" ' . $height_value . ' scrolling=\"no\" frameborder=\"no\" src=\"' . $data_url . '\"></iframe>';\n}", "function printFrameset()\n {\n if (t3lib_div::_GP('show')=='both') {\n return '\n <html>\n <head>\n <title>Preview and compare workspace version with live version</title>\n </head>\n <frameset cols=\"*\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frameset rows=\"22,60%,20,40%\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frame name=\"frame_drafth\" src=\"'.htmlspecialchars($this->URL['draftHeader']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"no\">\n <frame name=\"frame_draft\" src=\"'.htmlspecialchars($this->URL['draft']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"auto\">\n <frame name=\"frame_liveh\" src=\"'.htmlspecialchars($this->URL['liveHeader']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"no\">\n <frame name=\"frame_live\" src=\"'.htmlspecialchars($this->URL['live']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"auto\">\n </frameset>\n </frameset>\n </html>';\n } else {\n return '\n <html>\n <head>\n <title>Preview workspace version</title>\n </head>\n <frameset cols=\"*\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frameset rows=\"22,*\" framespacing=\"3\" frameborder=\"3\" border=\"3\">\n <frame name=\"frame_drafth\" src=\"'.htmlspecialchars($this->URL['draftHeader']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"no\">\n <frame name=\"frame_draft\" src=\"'.htmlspecialchars($this->URL['draft']).'\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"1\" scrolling=\"auto\">\n </frameset>\n </frameset>\n </html>';\n }\n }", "function theme_pse_widget_view_container($type, $widget_urls, $options) {\n //generate view widget container and iframe\n $output = '<div class=\"widget-upper\">';\n $output .= '<iframe class=\"tn-pse-widget-view-widget\" src=\"' . $widget_urls['view'] . '\" frameborder=\"0\" style=\"width: 100%; height: ' . $options['height'] . 'px; border: none; overflow: hidden;\"></iframe>';\n $output .= '</div>';\n\n return $output;\n}", "private static function get_valid_iframe_html() {\n $iframedomains = get_records_menu('iframe_source_icon', '', '', 'name');\n if (empty($iframedomains)) {\n return '';\n }\n\n $data = array();\n foreach ($iframedomains as $name => $host) {\n $data[$name] = array(\n 'name' => $name,\n 'url' => 'http://' . $host,\n 'icon' => favicon_display_url($host),\n );\n }\n\n $smarty = smarty_core();\n $smarty->assign('data', $data);\n return $smarty->fetch('blocktype:externalvideo:sitelist.tpl');\n }", "function draw_page($frameurl)\n{\n\n do_page_start(array(\"page_title\" => _('Help with Nagios XI')), false);\n?>\n\n <div id=\"leftnav\">\n <?php print_menu(MENU_HELP); ?>\n </div>\n\n <div id=\"maincontent\">\n <iframe src=\"<?php echo get_window_frame_url($frameurl); ?>\" width=\"100%\" frameborder=\"0\" id=\"maincontentframe\" name=\"maincontentframe\" allowfullscreen>\n [<?php echo _('Your user agent does not support frames or is currently configured not to display frames.'); ?>]\n </iframe>\n </div>\n\n <?php\n do_page_end(false);\n}", "function karma_shadow_frame($atts, $content = null) {\n extract(shortcode_atts(array(\n 'size' => 'shadow_',\n 'image_path' => '',\n 'description' => '',\n 'link_to_page' => '',\n 'target' => '',\n ), $atts));\n \n \n /* fullsize banner */ \n if ($size == 'shadow_banner_full' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='banner_full']\");\n\t }\n\n\t \nelseif ($size == 'shadow_banner_full' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='banner_full']\");\n\t }\n\t\t \n\t \n /* regular banner */ \n if ($size == 'shadow_banner_regular' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='banner_regular']\");\n\t}\n\t \n\t\nelseif ($size == 'shadow_banner_regular' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='banner_regular']\");\n\t}\n\t\t\n\n\t\t \n /* half banner */ \n if ($size == 'shadow_banner_small' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='banner_small']\");\n\t}\n\n\t\nelseif ($size == 'shadow_banner_small' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='banner_small']\");\n\t}\t \n\n\n\t\t \n /* two_col_large */ \nelseif ($size == 'shadow_two_col_large' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='two_col_large']\");\n\t}\n\n\t\nelseif ($size == 'shadow_two_col_large' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='two_col_large']\");\n\t}\n\n\n \n/* two_col_small */ \nelseif ($size == 'shadow_two_col_small' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='two_col_small']\");\n\t}\n\n\nelseif ($size == 'shadow_two_col_small' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='two_col_small']\");\n\t}\n\n\n/* three_col_large */ \nelseif ($size == 'shadow_three_col_large' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='three_col_large']\");\n\t}\n\n\t\nelseif ($size == 'shadow_three_col_large' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='three_col_large']\");\n\t}\n\t \n \n/* three_col_small */ \nelseif ($size == 'shadow_three_col_small' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='three_col_small']\");\n\t}\n\n\t\nelseif ($size == 'shadow_three_col_small' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='three_col_small']\");\n\t}\n\n/* four_col_large */\nelseif ($size == 'shadow_four_col_large' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='four_col_large']\");\n\t}\n\n\t\nelseif ($size == 'shadow_four_col_large' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='four_col_large']\");\n\t}\n\t\n\n \n/* four_col_small */\nelseif ($size == 'shadow_four_col_small' && $link_to_page != ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' link_to_page='$link_to_page' target='$target' description='$description' size='four_col_small']\");\n\t}\n\n\t\nelseif ($size == 'shadow_four_col_small' && $link_to_page == ''){\n\t$output = do_shortcode(\"[frame style='shadow' image_path='$image_path' target='$target' description='$description' size='four_col_small']\");\n\t}\n\t\t \t\t \n\n return $output;\n}", "function HtmlStartFrameSet($rows, $cols) {\n if ( $rows ) echo \"<frameset rows='$rows'>\\n\";\n if ( $cols ) echo \"<frameset cols='$cols'>\\n\";\n }", "function wpvideocoach_show_videos_eight()\r\n{\r\n\t$video46 = WPVIDEOCOACH_VIDEO_TITLE_046;\r\n\t$video47 = WPVIDEOCOACH_VIDEO_TITLE_047;\r\n\t$video48 = WPVIDEOCOACH_VIDEO_TITLE_048;\r\n\t$video49 = WPVIDEOCOACH_VIDEO_TITLE_049;\r\n\t$video50 = WPVIDEOCOACH_VIDEO_TITLE_050;\r\n\t$video_title[$video46] = \"046\";\r\n\t$video_title[$video47] = \"047\";\r\n\t$video_title[$video48] = \"048\";\r\n\t$video_title[$video49] = \"049\";\r\n\t$video_title[$video50] = \"050\";\r\n\tglobal $wpvideocoach_thumbnails;\r\n\tif(empty($wpvideocoach_thumbnails)){\r\n\t\t$wpvideocoach_thumbnails = \"0\";\r\n\t}\r\n\tglobal $wpvideocoach_language;\r\n\tif(empty($wpvideocoach_language)){\r\n\t\t$wpvideocoach_language = \"english\";\r\n\t}\r\n\tforeach ($video_title as $key => $value) {\r\n\t\t$visible = get_option('wpvideocoach_visibility_video'.$value);\r\n\t\tif(!empty($visible)) {\r\n \t\t// do nothing\r\n\t\t}\r\n\t\telse {\r\n\t\t\techo \"<div class=\\\"video-item\\\"><a onclick=\\\"TINY.box.show({iframe:'\" . WPVIDEOCOACH_URL .\"wp-video-\" . $wpvideocoach_language . \"-\" . $value . \"/by-login-pass?_key=\" . WPVIDEOCOACH_API_KEY . \"&login=\" . wpvideocoach_client_id() .\"&pass=\" . wpvideocoach_client_password() .\"',boxid:'frameless',width:800,height:450,fixed:true,maskopacity:10})\\\"><img src=\\\"\" . plugins_url() .\"/wp-video-coach/thumbnails/\" . $wpvideocoach_thumbnails . \"/\" . $value . \".jpg\\\" /></a>\r\n\t\t\t<p><a onclick=\\\"TINY.box.show({iframe:'\" . WPVIDEOCOACH_URL .\"wp-video-\" . $wpvideocoach_language . \"-\" . $value . \"/by-login-pass?_key=\" . WPVIDEOCOACH_API_KEY . \"&login=\" . wpvideocoach_client_id() .\"&pass=\" . wpvideocoach_client_password() .\"',boxid:'frameless',width:800,height:450,fixed:true,maskopacity:10})\\\">\" . $key . \"</a></p></div><!--videoitem-->\";\r\n\t\t}\r\n\t}\r\n}", "function dumpContents()\r\n {\r\n if (($this->ControlState & csDesigning)==csDesigning)\r\n {\r\n $msg=$this->Name;\r\n $msg=\"$this->Name<br>place Frames inside this Frameset\";\r\n\r\n $bstyle=\" style=\\\"border: 1px dotted #000000;font-size:10px; font-family:verdana,tahoma,arial\\\" \";\r\n echo \"<table border=\\\"0\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" width=\\\"$this->width\\\" height=\\\"$this->height\\\"><tr><td $bstyle align=\\\"center\\\">$msg</td></tr></table>\";\r\n }\r\n else\r\n {\r\n reset($this->controls->items);\r\n $vframes=array();\r\n $hframes=array();\r\n while (list($k,$v)=each($this->controls->items))\r\n {\r\n if (($v->inheritsFrom('Frame')) || ($v->inheritsFrom('Frameset')))\r\n {\r\n if (($v->Align==alTop) || ($v->Align==alBottom))\r\n {\r\n $vframes[$v->Top]=$v;\r\n }\r\n if (($v->Align==alLeft) || ($v->Align==alRight))\r\n {\r\n $hframes[$v->Left]=$v;\r\n }\r\n }\r\n }\r\n\r\n ksort($vframes,SORT_NUMERIC);\r\n ksort($hframes,SORT_NUMERIC);\r\n\r\n //Dump rows\r\n if (count($vframes)!=0)\r\n {\r\n reset($vframes);\r\n $topheights=\"\";\r\n $bottomheights=\"\";\r\n while(list($key, $val)=each($vframes))\r\n {\r\n if ($val->Align==alTop) $topheights.=$val->Height.\",\";\r\n if ($val->Align==alBottom) $bottomheights.=\",\".$val->Height;\r\n }\r\n\r\n $events = $this->readFramesetJSEvents();\r\n\r\n echo \"<frameset rows=\\\"$topheights*$bottomheights\\\" cols=\\\"*\\\" frameborder=\\\"$this->FrameBorder\\\" border=\\\"$this->BorderWidth\\\" framespacing=\\\"$this->FrameSpacing\\\" $events>\\n\";\r\n reset($vframes);\r\n while(list($key, $val)=each($vframes))\r\n {\r\n if ($val->Align==alTop) $val->show();\r\n }\r\n //Dump here the horizontal frameset\r\n //**********************************\r\n $this->dumpHorizontalFrames($hframes, false);\r\n //**********************************\r\n reset($vframes);\r\n while(list($key, $val)=each($vframes))\r\n {\r\n if ($val->Align==alBottom) $val->show();\r\n }\r\n echo \"</frameset>\\n\";\r\n }\r\n else\r\n {\r\n $this->dumpHorizontalFrames($hframes, true);\r\n }\r\n }\r\n\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Checks, that element with specified CSS doesn't contain specified text Example: Then I should not see "Bruce Wayne" in the "heroes_alter_egos" element Example: And I should not see "Bruce Wayne" in the "heroes_alter_egos" element
public function assertElementNotContainsText($element, $text) { $this->assertSession()->elementTextNotContains('css', $element, $this->fixStepArgument($text)); }
[ "protected function assertUpdateTableElementNotContains($text) {\n $this->assertSession()\n ->elementNotContains('css', $this->updateTableLocator, $text);\n }", "public function assertElementNotContains($element, $value)\n {\n $this->assertSession()->elementNotContains('css', $element, $this->fixStepArgument($value));\n }", "public function assertDontSee( $text ) {\n\t\treturn $this->assertDontSeeIn( '', $text );\n\t}", "public function mustNotHaveText($text) {\r\n\t\t$url= $this->_http->getURL();\r\n\t\t$this->assertNotContains($text, $this->_http->getBody(), \"Should not have text: '$text' found on url '$url'\");\r\n\t}", "public function assertElementNotOnPage($element)\n {\n $this->assertSession()->elementNotExists('css', $element);\n }", "public function iShouldNotSeeInsideTheDropdownNav($text) {\n $this->assertSession()->elementTextNotContains('css', $this->dropdownSelector, $this->fixStepArgument($text));\n }", "public function assertNotRegionElementText($text, $tag, $region) {\n\n $regionObj = $this->getRegion($region);\n $results = $regionObj->findAll('css', $tag);\n\n if (!empty($results)) {\n foreach ($results as $result) {\n if ($result->getText() == $text) {\n throw new Exception(sprintf('The text \"%s\" was found in the \"%s\" element in the \"%s\" region on the page %s', $text, $tag, $region, $this->getSession()->getCurrentUrl()));\n }\n }\n }\n }", "private function assertHighlightNotExists(): void {\n $this->markTestSkipped(\"Skipped temporarily for random fails.\");\n $assert_session = $this->assertSession();\n\n $assert_session->assertNoElementAfterWait('css', '#drupal-off-canvas');\n $assert_session->assertNoElementAfterWait('css', '.is-layout-builder-highlighted');\n }", "public function testElementAttributeNotContains(): void\n {\n $webAssert = $this->createMock(WebAssert::class);\n $webAssert->expects($this->once())->method('elementAttributeNotContains')->with($this->equalTo('css'), $this->equalTo('foo'), $this->equalTo('bar'), $this->equalTo('value'));\n\n $trait = $this->getExtraWebAssertMock();\n $trait->expects($this->once())->method('assertSession')->willReturn($webAssert);\n\n $trait->elementAttributeNotContains('foo', 'bar', 'value'); // @phpstan-ignore-line\n }", "public function iShouldNotSeePageTitleHavingPartialTextAs($text)\n {\n $this->assertSession()->elementTextNotContains('xpath', '/head/title', $text);\n }", "public function assertPageNotContainsText($text)\n {\n $this->waitForThePageToBeLoaded();\n $this->iWaitUntilTheLoadingIsCompleted();\n parent::assertPageNotContainsText($text);\n }", "public function assertElementNotContains($contents, $selector = '', $markup = '', $message = '')\n {\n $method = method_exists($this, 'assertStringNotContainsString')\n ? 'assertStringNotContainsString'\n : 'assertNotContains';\n\n $this->$method(\n $contents,\n $this->getInnerHtmlOfMatchedElements($markup, $selector),\n $message\n );\n }", "public function testNotContainsSucceedsIfBodyDoesNotContainTheGivenString()\n {\n $this->assertSuccess();\n $this->assertions->notContains('universe');\n }", "public function iMayShouldNotSee(string $text) : void\n {\n // replace uservar in param\n $text = $this->replaceUserVar($text);\n\n // check if text exist in the page\n if( $this->textExistInPage($text) ){\n // Erreur non bloquante\n $this->setNotBlockingErrorOccured(sprintf('Found the text \"%s\" in the page but should not', $text));\n }\n }", "protected function dontSee($text)\n {\n return $this->assertPageContains(\n $text,\n \"Failed asserting that the current page source does NOT contain: $text\",\n true\n );\n }", "public function test_value_not_like_substring() {\n\t\t$field = FrmField::getOne( 'text-field' );\n\n\t\t$field_value = 'Jamie';\n\t\t$compare_type = 'not_like';\n\t\t$compare_to = 'J';\n\n\t\t$opening_tag = '[if ' . $field->id . ' ' . $compare_type . '=\"' . $compare_to . '\"]';\n\t\t$content = 'Before ' . $opening_tag . 'Hide me[/if ' . $field->id . '] After';\n\n\t\t$atts = $this->package_atts_for_jamie_entry( $compare_type, $compare_to, $opening_tag );\n\t\t$tag = $field->id;\n\t\t$args = array( 'field' => $field );\n\n\t\tFrmProContent::check_conditional_shortcode( $content, $field_value, $atts, $tag, 'if', $args );\n\n\t\t$this->assert_conditional_is_false( $content );\n\t}", "public function dontSee($text, $selector = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Assertion('dontSee', func_get_args()));\n }", "public function theElementShouldNotBeVisible($element)\n {\n $displayedNode = $this->getSession()->getPage()->find('css', $element);\n if($displayedNode === null)\n {\n throw new \\Exception(sprintf('The element \"%s\" was not found anywhere in the page', $element));\n }\n\n assertFalse($displayedNode->isVisible(), sprintf('The element \"%s\" is not visible', $element));\n }", "public function assertDontSee($text)\n {\n $this->assertStringNotContainsString(\n clean_file($text),\n clean_file($this->content())\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the default properties of this document.
function get_default_properties() { return $this->defaultProperties; }
[ "public function get_default_properties()\n {\n return $this->defaultProperties;\n }", "public function getDefaultProperties(){}", "public function getDefaultProperties() {\n $properties = get_object_vars($this);\n $default_properties = [];\n foreach ($properties as $property => $value) {\n if (strpos($property, 'default_') !== FALSE) {\n $default_properties[$property] = $value;\n }\n }\n return $default_properties;\n }", "public function getDefaultProperties() {\n return $this->forwardCallToReflectionSource( __FUNCTION__ );\n }", "abstract protected function _defaultProperties();", "protected function getDefaultBaseProperties() {\n return [\n // Administration.\n 'admin_title' => '',\n 'prepopulate' => FALSE,\n 'private' => FALSE,\n // Flexbox.\n 'flex' => 1,\n // Conditional logic.\n 'states' => [],\n 'states_clear' => TRUE,\n // Element access.\n 'access_create_roles' => ['anonymous', 'authenticated'],\n 'access_create_users' => [],\n 'access_create_permissions' => [],\n 'access_update_roles' => ['anonymous', 'authenticated'],\n 'access_update_users' => [],\n 'access_update_permissions' => [],\n 'access_view_roles' => ['anonymous', 'authenticated'],\n 'access_view_users' => [],\n 'access_view_permissions' => [],\n ];\n }", "public static function get_default_property_names()\n {\n return parent::get_default_property_names(\n array(self::PROPERTY_USER_ID, self::PROPERTY_DOCUMENT_ID, self::PROPERTY_ACCESS_DATE, self::PROPERTY_TIME));\n }", "public function getDocumentProperties()\n {\n return $this->getDocInfo();\n }", "static function get_default_property_names()\r\n {\r\n return array(self :: PROPERTY_ID, self :: PROPERTY_USER_ID, self :: PROPERTY_DATE);\r\n }", "public function getDefaultSet() {\r\n $default = array();\r\n $this->elementId = $this->getProperty($this->elementKey);\r\n $elementType = $this->getProperty($this->element_class);\r\n if (!empty($this->elementId) && !empty($elementType)) {\r\n /** @var modElement $element */\r\n $element = $this->modx->getObject($elementType, $this->elementId);\r\n if ($element) {\r\n $default = $element->get('properties');\r\n if (!is_array($default)) $default = array();\r\n }\r\n }\r\n return $default;\r\n }", "public function getDefaultProperties()\n {\n $defaultValues = [];\n $properties = $this->getProperties();\n $staticOrder = [true, false];\n foreach ($staticOrder as $shouldBeStatic) {\n foreach ($properties as $property) {\n $isStaticProperty = $property->isStatic();\n if ($shouldBeStatic !== $isStaticProperty) {\n continue;\n }\n $propertyName = $property->getName();\n $isInternalReflection = get_class($property) === \\ReflectionProperty::class;\n\n if (!$isInternalReflection || $isStaticProperty) {\n $defaultValues[$propertyName] = $property->getValue();\n } elseif (!$isStaticProperty) {\n // Internal reflection and dynamic property\n $classProperties = $property->getDeclaringClass()\n ->getDefaultProperties()\n ;\n\n $defaultValues[$propertyName] = $classProperties[$propertyName];\n }\n }\n }\n\n return $defaultValues;\n }", "public function getDefaultAttributes()\n {\n return $this->defaultAttributes;\n }", "static function get_default_property_names()\r\n {\r\n return parent :: get_default_property_names(array(self :: PROPERTY_RIGHT_ID, self :: PROPERTY_USER_ID, self :: PROPERTY_LOCATION_ID));\r\n }", "protected function get_default_item_props() {\n\t\treturn (object) array(\n\t\t\t'object' => null,\n\t\t\t'tax_class' => '',\n\t\t\t'taxable' => false,\n\t\t\t'quantity' => 0,\n\t\t\t'product' => false,\n\t\t\t'price_includes_tax' => false,\n\t\t\t'subtotal' => 0,\n\t\t\t'subtotal_tax' => 0,\n\t\t\t'total' => 0,\n\t\t\t'total_tax' => 0,\n\t\t\t'taxes' => array(),\n\t\t);\n\t}", "protected function defaults()\n\t{\n\t\t$defaults = array();\n\t\t$data = $this->data();\n\t\tforeach($data as $property=>$value) {\n\t\t\t$defaults[$property] = isset($value['default']) ? $value['default'] : '';\n\t\t}\n\t\treturn array( 0 => $defaults, 'auto_id' => 1 );\n\t}", "public static function get_default_property_names()\n {\n return parent::get_default_property_names(\n array(\n self::PROPERTY_USER_ID, \n self::PROPERTY_COURSE_ID, \n self::PROPERTY_TOOL_ID, \n self::PROPERTY_CATEGORY_ID, \n self::PROPERTY_PUBLICATION_ID, \n self::PROPERTY_ACCESS_DATE));\n }", "public function getPropertiesDefault()\n {\n return $this->select(\"SELECT * FROM properties WHERE father_property = 2 AND activated = 1 ORDER BY name_property ASC;\");\n }", "public function get_default_settings();", "public function getDefaultValues() {\r\n\t\treturn ($this->aPropertyInformation['DefaultValues']);\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines whether a token means "name".
public static function name($type, $content) { return $type === TokenType::KEYWORD_SYMBOL_OR_IDENTIFIER && strtolower($content) === 'name'; }
[ "public function tokenIsPresent();", "function _isToken($token, $symbolic)\n {\n if (is_array($token)) {\n $t = token_name($token[0]);\n } else {\n $t = $token;\n }\n return ($t == $symbolic);\n }", "public function isTokenIsPartOfUse($token): bool\n {\n if (!is_array($token)) {\n return false;\n }\n\n return $token[0] === T_STRING\n || $token[0] === T_NS_SEPARATOR\n || (defined('T_NAME_QUALIFIED') && $token[0] === T_NAME_QUALIFIED)\n || (defined('T_NAME_FULLY_QUALIFIED') && $token[0] === T_NAME_FULLY_QUALIFIED)\n || (defined('T_NAME_RELATIVE') && $token[0] === T_NAME_RELATIVE);\n }", "public function is_token($token) {\n\t\treturn $this->token === $token;\n\t}", "public function isTokenValueRegistered($tokenName);", "public function hasName();", "public function hasToken();", "protected function isName($text){\n\n return 1 === preg_match(self::REG_T_FIELD, $text);\n }", "public function isIdentifier(string $name): bool\n {\n return (bool)preg_match('/^\\s*' . $this->dialect::REGEX_FULL_IDENTIFIER . '\\s*$/', $name);\n }", "public static function isMethodName($token) {\n\t\t\treturn is_string($token) && preg_match('/^[a-z_][a-z0-9_]*$/i', $token);\n\t\t}", "public static function isIdentifier($name) {\n\t\treturn strpos($name, \"\\\\\") === FALSE;\n\t}", "private function isToken($to)\n {\n return (preg_match('/^[a-z0-9-_]+$/i', $to) === 1);\n }", "public function getTokenName($tokenized);", "public function verifyTagName(string $name): bool\n {\n return preg_match('/^[-a-zA-Z0-9_]{1,32}$/', $name);\n }", "public function isWord(): bool\n {\n return ($this->token_type == self::WORD);\n }", "function _j_token_is_word( array $token ){\r\n\t$Lex = JLex::singleton();\r\n\treturn is_array($token) && $Lex->is_word($token[1]);\r\n}", "private static function isKeyword() {\n\n foreach (Lexical::$keywords as $keyword) {\n if(strcasecmp(Lexical::$temp_lex, $keyword) == 0) { #case insensitive comp\n\n $token = new Token($keyword, $keyword);\n _Global::$instruction_counter++;\n return $token;\n }\n }\n\n return false;\n }", "public function tokenIsValid();", "public function isToken()\n {\n return !empty($this->_value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ `ticket` table method Creating new ticket and generates RSA signature of hashed ticket data
public function generateTicket($email, $trainDesignation, $validation, $origin, $destination, $departureTime, $arrivalTime, $price) { $uuid4 = Uuid::uuid4(); $userID = $this->getUserByEmail($email); if($userID==NULL){ return -1; } $stmt = $this->conn->prepare("INSERT INTO ticket(id,userID,trainDesignation,validation,origin,destination,departureTime,arrivalTime,price) VALUES(?,?,?,?,?,?,?,?,?)"); $stmt->bind_param("sisissssd", $uuid4, $userID, $trainDesignation, $validation, $origin, $destination, $departureTime, $arrivalTime, $price); $result = $stmt->execute(); $stmt->close(); $i=0; $hash = hash('sha256',$uuid4); for($i=0;$i<998;$i++){ $hash=hash('sha256',$hash); } $encrypted_signature = null; if ($result) { $sql = "SELECT private FROM `encryption_keys`;"; $result = $this->conn->query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); $key=$row['private']; $key = wordwrap($key, 65, "\n", true); $key = <<<EOF -----BEGIN RSA PRIVATE KEY----- $key -----END RSA PRIVATE KEY----- EOF; openssl_private_encrypt($hash, $encrypted_signature, openssl_pkey_get_private($key)); } else { $response["error"] = true; $response["message"] = "Oops! An error occurred while purchasing ticket! Database may be down"; return $response; } $signature=base64_encode($encrypted_signature); $response = array( 'id' => $uuid4, 'userID' => $userID, 'trainDesignation' => $trainDesignation, 'validation' => $validation, 'origin' => $origin, 'destination' => $destination, 'departureTime' => $departureTime, 'arrivalTime' => $arrivalTime, 'price' => $price, 'signature' => $hash ); $response["error"] = 0; return $response; } else { $response["error"] = -1; $response["message"] = "Oops! An error occurred while purchasing ticket"; return $response; } }
[ "public function generate($ticket);", "function createTicket()\n {\n include '../config/Database.php';\n define('ENVIADO', '1');//Defecto num 1: Activo por Estado de TICKET\n\n $sql_insert = \"INSERT INTO 'ticket'\n ('descrip_incidencia',\n 'archivo_evidencia',\n 'cod_categoria',\n 'cod_estado_ticket',\n 'cod_usuario',\n 'cod_equipo')\n VALUES\n ('\".$this->getDescrip_incidencia().\"',\n '\".$this->getArchivo_evidencia().\"',\n '\".$this->getCod_categoria().\"',\n '\".$this->getCod_estado_ticket().\"',\n '\".$this->getCod_usuario().\"',\n '\".$this->get_Cod_equipo().\"',\n '\".ENVIADO.\"');\";\n\n $insertadoTicketDb = $db->query($sql_insert)or die (infoErrorCreatedTicket($db));\n $db->close();\n return ($insertadoTicketDb) ? true : false;\n }", "protected function build_ticket()\n\t{\n\t\t$ticket=serialize($this->data).\"|@@!@@|\".(time()+20);\n\n\t\t$encrypter=new Encrypt();\n\t\t\n\t\t// encrypt the auth ticket and store it\n\t\t$ticket=$encrypter->encode($ticket);\n\t\t\n\t\t// auth ticket is good for 20 minutes to prevent spoofing.\n\t\tset_cookie(self::$_config->auth_ticket_cookie,$ticket,self::$_config->auth_ticket_duration,self::$_config->auth_cookie_domain);\n\t}", "public function creating(Ticket $ticket)\n {\n if (Auth::check() && empty($ticket->user_id)) {\n $ticket->user_id = Auth::id();\n }\n }", "public function generateTicket()\n {\n $this->serviceName = 'NBRStorageService';\n $this->constructBody('getStorageAccessTicket', ['siteId ' => $this->siteId, 'username' => $this->adminUsername, 'password' => $this->adminPassword]);\n $response = $this->sendRequest();\n $dom = new \\DOMDocument();\n $dom->loadXML($response);\n $this->ticket = $dom->getElementsByTagName('getStorageAccessTicketReturn')->item(0)->nodeValue;\n }", "public function whmcs_create_ticket($params = array()) {\n\t\t$params['action'] = 'OpenTicket';\n\t\t// return Whmcs_base::send_request($params);\n $load = new Whmcs_base();\n return $load->send_request($params);\n\t}", "function create_ticket_from_message($input) {\n // process the input data and return results\n $success = true;\n global $zen;\n global $egate_user;\n global $egate_default_options;\n global $egate_create_fields;\n global $egate_create_overrides;\n\n // decode the data\n $params = decode_contents($input);\n \n // validate the data\n if( !validate_params($params) ) { egate_log_write(); return false; }\n\n // create the body elements\n $body = $egate_default_options;\n $body[\"title\"] = $params->headers[\"subject\"];\n $body[\"details\"] = trim($params->body);\n $body[\"creator_id\"] = $egate_user[\"user_id\"];\n\n // add in overrides, if the user has specified any by putting\n // 'field:value' entries at the top of the message body\n if( $egate_create_overrides == 1 && count($egate_create_fields) > 0 ) {\n $i=0;\n $match = '/^ *('.join('|',$egate_create_fields).') *: *(.+)/i';\n while( preg_match( $match, $body['details'], $matches) && $i < 1000 ) {\n\t$body[\"{$matches[1]}\"] = trim($matches[2]);\n\t$body['details'] = trim(preg_replace($match, '', $body['details']));\n\t$i++;\n }\n }\n\n // determine who sent the email and make sure it has\n // a return address\n list($name,$email) = get_name_and_email($params);\n $user_id = find_user_id($name,$email);\n\n // don't process tickets with no return address\n if( !$email ) {\n egate_log(\"No return email address\",2);\n $success = false;\n } \n \n // create the ticket\n if( $success ) { \n $id = create_new_ticket($user_id,$name,$email,$body);\n }\n\n // todo: send a reply email\n $rec = array(array(\"name\"=>$name,\"email\"=>$email));\n $rep = send_reply_mail( $rec, $id, $success, \"new ticket\" );\n if( !$rep ) {\n egate_log(\"reply email failed to $name <$email>\",2);\n }\n\n // close up shop\n egate_log_write();\n return $success;\n }", "private static function GenerateTicket() {\n $ticket = md5(uniqid());\n if(DB::WoW()->selectCell(\"SELECT 1 FROM `DBPREFIX_users` WHERE `pass_reset_ticket` = '%s' LIMIT 1\", $ticket)) {\n self::GenerateTicket();\n }\n else {\n return $ticket;\n }\n }", "public function createTicket()\n {\n Zendesk::tickets()->create([\n 'subject' => 'Subject',\n 'comment' => [\n 'body' => 'Ticket content.'\n ],\n 'priority' => 'normal'\n ]);\n return \"success\";\n }", "public function createNewTicket() {\r\n\r\n //grab the user and the ticket data from the JSON\r\n $user = $this->jsonRequest[\"user\"];\r\n $ticket = $this->jsonRequest[\"ticket\"];\r\n\r\n //if the user or the ticket data is not set, return false\r\n if( !isset($user) || !isset($ticket) ) return false;\r\n //check to see if the user is already in the databaseName\r\n $userId = parent::getUserIdByEmail($user['email']);\r\n if(!isset($userId)) {\r\n //if the user does not exist, create the user\r\n $couldCreateUser = parent::createUserDB($user[\"firstName\"], $user[\"lastName\"], $user[\"email\"]);\r\n //if we could not create the user, return false\r\n if(!$couldCreateUser) return false;\r\n\r\n //grab the userID\r\n $userId = parent::getUserIdByEmail($user['email']);\r\n\r\n //if we still cannot get the user ID, return false\r\n if(!isset($userId)) return false;\r\n }\r\n\r\n //create the ticket\r\n $aditionalNotes = isset($ticket['additionalNotes']) ? $ticket['additionalNotes'] : \"\";\r\n $couldCreateTicket = parent::createTicket($userId,\r\n $ticket['subject'],\r\n $ticket['osType'],\r\n $ticket['primaryIssue'],\r\n $aditionalNotes);\r\n\r\n return $couldCreateTicket;\r\n }", "public function created(Ticket $ticket)\n {\n $authUser = null;\n if (Auth::check())\n $authUser = Auth::user();\n\n $notificationField = [\n 'notified_by' => (!empty($authUser)) ? $authUser->id : null,\n 'owner_id' => $ticket->user_id->id,\n 'seen' => 0,\n 'status' => 1,\n 'type' => 'ticket_created',\n 'extera' => \"ticket with subject: `\" . $ticket->subject . \"` created by `\" . $ticket->user_id->full_name . \"`\",\n 'description' => \"dear `\" . $ticket->user_id->full_name . \"` your ticket created successfully, You will be contacted by supporters soon.\",\n 'link' => url('/')\n ];\n Notification::create($notificationField);\n unset($authUser, $notificationField, $user);\n }", "function _generateTicket()\r\n\t{\r\n\t\tif ($this->currentRequestTicket == '')\r\n\t\t{\r\n\t\t\t// generate new ticket (only one ticket will be generated per page request)\r\n\t\t\t// and store in database\r\n\t\t\tglobal $member;\r\n\t\t\t// get remote IP (here stored as $memberid)\r\n\t\t\t$ipparts = explode('.', serverVar(\"REMOTE_ADDR\"));\r\n\t\t\t$iptot = 1;\r\n\t\t\tforeach ($ipparts as $value) {\r\n\t\t\t\tif (intval($value) != 0) $iptot = $iptot * intval($value);\r\n\t\t\t}\r\n\t\t\tif ($iptot < 100000) $iptot += 100000;\r\n\t\t\t$memberId = $iptot;\r\n\r\n\t\t\t$ok = false;\r\n\t\t\twhile (!$ok)\r\n\t\t\t{\r\n\t\t\t\t// generate a random token\r\n\t\t\t\tsrand((double)microtime()*1000000);\r\n\t\t\t\t$ticket = md5(uniqid(rand(), true));\r\n\r\n\t\t\t\t// add in database as non-active\r\n\t\t\t\t$query = 'INSERT INTO ' . sql_table('tickets') . ' (ticket, member, ctime) ';\r\n\t\t\t\t$query .= 'VALUES (\\'' . addslashes($ticket). '\\', \\'' . intval($memberId). '\\', \\'' . date('Y-m-d H:i:s',time()) . '\\')';\r\n\t\t\t\tif (sql_query($query))\r\n\t\t\t\t\t$ok = true;\r\n\t\t\t}\r\n\r\n\t\t\t$this->currentRequestTicket = $ticket;\r\n\t\t}\r\n\t\treturn $this->currentRequestTicket;\r\n\t}", "public function InsertHash_Auth(){\n\t\t$sequence = rand(1, 1000);\n\t\t$tstamp = date(\"m\").\"/\".date(\"d\").\"/\".date(\"Y\").\" \".date(\"h:i:s a\"); \n\t\t$msg = $sequence.\"^\".$this->LoginID.\"^\".$tstamp.\"^\".$this->amount.\"^\".$this->currency.\"^\".$this->OrderNumber.\"^\".$this->action;\n\t\t$stringRSA=$this->GCEncode(strval($msg));\n\t\t$cheie = strval($this->KeyEnc).strval($this->KeyMod);\n\t\t$sEncoded= $this->POEncode($cheie, $stringRSA);\n\t\t$ret='';\n\t\t$ret.= \"<input type = hidden name = \\\"f_message\\\" value=\\\"\".$msg.\"\\\">\";\n\t\t$ret.= \"<input type = hidden name = \\\"f_crypt_message\\\" value=\\\"\".$sEncoded.\"\\\">\";\n\t\t$ret.= \"<input type = hidden name = \\\"f_action\\\" value = \\\"\".$this->action.\"\\\" >\";\n\t\treturn $ret;\n\t}", "public function generateHash() {\n $this->hash = md5(\n ($this->dateOperation ? $this->dateOperation->format('YmdHis') : ''). self::HASH_DELIMITER .\n ($this->datePosting ? $this->datePosting->format('YmdHis') : ''). self::HASH_DELIMITER .\n $this->description . self::HASH_DELIMITER .\n $this->title . self::HASH_DELIMITER .\n $this->senderReceiver . self::HASH_DELIMITER .\n $this->accountNumber . self::HASH_DELIMITER .\n $this->amount . self::HASH_DELIMITER .\n $this->balance . self::HASH_DELIMITER\n );\n }", "public function InsertHash_Credit(){\n\t\t$sequence = rand(1, 1000);\n\t\t$tstamp = date(\"m\").\"/\".date(\"d\").\"/\".date(\"Y\").\" \".date(\"h:i:s a\"); \n\t\t$msg = $sequence.\"^\".$this->LoginID.\"^\".$tstamp.\"^\".$this->TransID.\"^\".$this->OrderNumber.\"^\".$this->amount.\"^\".$this->action;\n\t\t$stringRSA=$this->GCEncode(strval($msg));\n\t\t$cheie = strval($this->KeyEnc).strval($this->KeyMod);\n\t\t$sEncoded= $this->POEncode($cheie, $stringRSA);\n\t\t$ret='';\n\t\t$ret.= \"<input type = hidden name = \\\"f_message\\\" value=\\\"\".$msg.\"\\\">\";\n\t\t$ret.= \"<input type = hidden name = \\\"f_crypt_message\\\" value=\\\"\".$sEncoded.\"\\\">\";\n\t//\t$ret.= \"<input type = hidden name = \\\"f_test_request\\\" value=\\\"1\\\">\";\n\t\t$ret.= \"<input type = hidden name = \\\"f_action\\\" value = \\\"\".$this->action.\"\\\" >\";\n\t\treturn $ret;\n\t}", "public static function addKey(){\r\n $ra = (time())*(rand());\r\n @ $conn = new mysqli(MYSQL_HOST,MYSQL_USER,MYSQL_PASSWORD,MYSQL_DATABASE_NAME); //Conn to database\r\n $query = \"insert into ke values (NULL,sha1(\".$ra.\"))\";\r\n $result = $conn->query($query);\r\n $conn->close();//close database conn\r\n }", "function gen_key($name,$date){\n\tDebug(__LINE__,\"gen_key($name,$date)\");\n\t$r= mt_rand ().mt_rand ().mt_rand ().mt_rand ().mt_rand ();\n\t$m = $name.$date;\n\tDebug(__LINE__,$r);\n\tDebug(__LINE__,$m);\n\n\t$a = hash_hmac('sha256', $m,$r , true);\n\tDebug(__LINE__,$a);\n\t$key = base64_encode($a);\n\tDebug(__LINE__,$key);\n\treturn $key;\n}", "function createTicket($db) {\n $dropOffDriver = getDropOffDriver($db);\n $parkingSpot = getParkingSpot($db);\n $customerId = createCustomer($db);\n $pickUpDriver = NULL; \n $now = new DateTime();\n $now = $now->format('Y-m-d H:i:s');\n \n $sql = \"INSERT INTO `ticket`( `customer_id`, `drop_off_driver`, `pick_up_driver`, `parking_spot_id`, `time`) \n VALUES ($customerId, $dropOffDriver, NULL, $parkingSpot, NOW())\";\n $stmt = $db -> prepare ($sql);\n $stmt -> execute ();\n \n $sql = \"SELECT LAST_INSERT_ID()\";\n $stmt = $db -> prepare ($sql);\n $stmt -> execute ();\n \n global $ticketID;\n while ($row = $stmt -> fetch()) {\n $ticketID = $row['LAST_INSERT_ID()'];\n }\n updateParkingSpot($parkingSpot, $ticketID, $db);\n }", "public function generateSecureKey(){\n\t $_order = $this->getCurrentOrder();\n\t\t//$orderIncId = $this->getOrderIncId($_order);\n\t\t$userName = $this->getUserName($_order);\n\t\t$privateSalt = $this->getPrivateSalt();\n\t\t$orderAmt = $this->getGrandTotal($_order);\n\t\t$userEmail = $this->getUserEmail($_order); \n\t\t$userPhone = $this->getUserPhone($_order);\n\t\t//$message = $orderAmt.'|'.$userEmail.'|'.$orderIncId.'|'.$userName.'|'.$userPhone;\n\t\t$message = $orderAmt.'|'.$userEmail.'|'.$userName.'|'.$userPhone;\n\t\t$signature = hash_hmac('sha1', $message, $privateSalt);\n\t\treturn $signature;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted. The returned value should be a number. For example, getIndexToIns([1,2,3,4], 1.5) should return 1 because it is greater than 1 (index 0), but less than 2 (index 1). Likewise, getIndexToIns([20,3,5], 19) should return 2 because once the array has been sorted it will look like [3,5,20] and 19 is less than 20 (index 2) and greater than 5 (index 1).
function getIndexToIns($arr, $num) { /* Count the number fo arr elements that are less than num. That's the index where num would fit in an array sorted small to large. */ $ct = 0; foreach($arr as $v) { if($v < $num) $ct++; } return $ct; }
[ "function find_smallest(array $arr) : int {\n $smallest = $arr[0];\n $smallest_idx = 0;\n foreach ($arr as $idx => $val) {\n \tif ($val < $smallest) {\n \t\t$smallest = $val;\n \t\t$smallest_idx = $idx;\n \t}\n }\n return $smallest_idx;\n}", "function findLowest($arr = array()) {\n $lowest = $arr[0];\n $lowestIndex = 0;\n $i = 0;\n $len = count($arr);\n\n while (++$i < $len) {\n if ($arr[$i] < $lowest) {\n $lowest = $arr[$i];\n $lowestIndex = $i;\n }\n }\n\n return $lowestIndex;\n}", "function findIndex(array $arr, int $target)\n{\n if (!in_array($target, $arr)) {\n $arr[] = $target;\n sort($arr);\n }\n\n return array_search($target, $arr);\n}", "function binary_search(array $a, $first, $last, $key, $compare) {\n $lo = $first;\n $hi = $last - 1;\n\n while ($lo <= $hi) {\n $mid = (int)(($hi - $lo) / 2) + $lo;\n $cmp = call_user_func($compare, $a[$mid], $key);\n\n if ($cmp < 0) {\n $lo = $mid + 1;\n } elseif ($cmp > 0) {\n $hi = $mid - 1;\n } else {\n return $mid;\n }\n }\n return -($lo + 1);\n}", "function kmin (array $array)\n{\n return array_search(\n min($array),\n $array\n );\n}", "function findSmallest(array $list) {\n $smallTmpIndex = 0;\n $smallTmp = $list[0];\n\n // find smallest\n $count = count($list);\n for($i=1; $i<$count; $i++) {\n if($smallTmp > $list[$i]) {\n $smallTmpIndex = $i;\n $smallTmp = $list[$i];\n }\n }\n\n return $smallTmpIndex;\n}", "function binarySearch($arr, $lowerBound, $upperBound, $searchedValue)\n{\n\t$c = 0;\n\twhile($lowerBound <= $upperBound)\n\t{\n\t\t$midPoint = floor(($lowerBound + $upperBound) / 2);\n\t\t\n\t\tif ($searchedValue == $arr[$midPoint]) {\n\t\t\t$c++;\n\t\t\techo \"Counter : {$c}\";\n\t\t\treturn $midPoint;\n\t\t}\n\t\t\n\t\tif ($searchedValue < $arr[$midPoint]) {\n\t\t\t$c++;\n\t\t\t$upperBound = $midPoint - 1;\n\t\t}\n\t\telse {\n\t\t\t$c++;\n\t\t\t$lowerBound = $midPoint + 1;\n\t\t}\n\t}\n\t\n\treturn -1;\n}", "public function findIndex($lookFor)\r\n\t{\r\n\t\t$indexLow = 0;\r\n\t\t$indexHigh = count($this->myArray) - 1;\r\n\t\t\r\n\t\twhile($indexLow <= $indexHigh)\r\n\t\t{\r\n\t\t\t$indexMid = ceil(($indexLow + $indexHigh) / 2);\r\n\t\t\r\n\t\t\tif($this->myArray[$indexMid] > $lookFor)\r\n\t\t\t\t$indexHigh = $indexMid - 1;\r\n\t\t\telse if($this->myArray[$indexMid] < $lookFor)\r\n\t\t\t\t$indexLow = $indexMid + 1;\r\n\t\t\telse \r\n\t\t\t\treturn $indexMid;\r\n\t\t}\r\n\t\t\r\n\t\treturn -1;\r\n\t}", "function binary_search(array $a, $first, $last, $key, $compare) {\n $lo = $first;\n $hi = $last - 1;\n\n while ($lo <= $hi) {\n $mid = (int)(($hi - $lo) / 2) + $lo;\n $cmp = call_user_func($compare, $a[$mid], $key);\n\n if ($cmp < 0) {\n $lo = $mid + 1;\n } elseif ($cmp > 0) {\n $hi = $mid - 1;\n } else {\n return $mid;\n }\n }\n return -($lo + 1);\n }", "function binarySearch($a, $item, $low, $high) { \n \n if ($high <= $low) \n return ($item > $a[$low]) ? \n ($low + 1) : $low; \n \n $mid = (int)(($low + $high) / 2); \n \n if($item == $a[$mid]) \n return $mid + 1; \n \n if($item > $a[$mid]) \n return binarySearch($a, $item, \n $mid + 1, $high); \n \n return binarySearch($a, $item, $low, \n $mid - 1); \n}", "protected static function getMinInArr($arr)\n {\n $minIndex = 0;\n $min = $arr[0];\n foreach ($arr as $k => $v) {\n if($v->nb_sales < $min->nb_sales) {\n $minIndex = $k;\n $min = $v;\n }\n }\n return $minIndex;\n }", "function array_dichotomic_search($ar, $value, $compareFunc) {\n $value = trim($value);\n if (!$ar || !$value || !$compareFunc) return (null);\n $len = count($ar);\n\n $l = 0;\n $r = $len-1;\n\n do {\n $i = floor(($l+$r)/2);\n if ($compareFunc($ar[$i], $value)<0)\n $l = $i+1;\n else\n $r = $i-1;\n } while ($compareFunc($ar[$i], $value)!=0 && $l<=$r);\n\n if ($compareFunc($ar[$i], $value)==0)\n return $i;\n else\n return -1;\n}", "function linear_search(array $list, $toFind) {\n foreach ($list as $index => $item) {\n if ($item === $toFind) {\n return $index;\n }\n }\n\n return -1;\n}", "function search($arr, $x)\n{\n $n = sizeof($arr);\n for($i = 0; $i < $n; $i++)\n {\n if($arr[$i] == $x)\n return $i;\n }\n return -1;\n}", "function linear_search($array, $key)\r\n{\r\n if (count($array) == 0) {\r\n return -1;\r\n }\r\n\r\n for ($i = 0; $i < count($array); $i++) {\r\n if ($array[$i] == $key) {\r\n return $i;\r\n }\r\n }\r\n\r\n return -1;\r\n}", "public function getSmallestPeakIndex()\n {\n $PeaksNoIdx = array_values($this->arrayPeaks);\n if (!empty($PeaksNoIdx)) {\n $LfltSmallestY = $PeaksNoIdx[0];\n $lReturnIdx = 0;\n for ($i = 1; $i < $this->ListLength; $i++) {\n if ($PeaksNoIdx[$i] < $LfltSmallestY) {\n $LfltSmallestY < $PeaksNoIdx[$i];\n $lReturnIdx = $i;\n }\n }\n return $lReturnIdx;\n }\n \n }", "function bisect_left($sorted_array, $value, $left = null, $right = null)\n{\n if (is_null($left)) {\n reset($sorted_array);\n $left = key($sorted_array);\n }\n\n if (is_null($right)) {\n end($sorted_array);\n $right = key($sorted_array);\n reset($sorted_array);\n }\n\n if ($value < $sorted_array[$left]) {\n return 0;\n } elseif ($value >= $sorted_array[$right]) {\n return count($sorted_array);\n }\n\n // this section only works for keys that are within the range and exclusive of the last element\n\n // converging upon compact range L,R where R-L = 1, where R can potentially equal the key\n while ($right - $left > 1) {\n // the middle when converted to an integer is biased to the left\n $middle = intval(($left + $right) / 2);\n echo \"$middle <= MIDDLE\\n\";\n // the right can potentially equal the key's position\n if ($value <= $sorted_array[$middle]) {\n $right = $middle;\n } else {\n $left = $middle;\n }\n }\n\n // left will always be to the left of the leftmost key (which is the right), left + 1 = right, as left and right has converged\n // therefore right is the number of elements less than the key\n return $right;\n}", "function array_ref_search(&$value, &$array) {\r\n\tif (! is_array ( $value ))\r\n\t\treturn array_search ( $value, $array, true );\r\n\t$temp = $value;\r\n\tforeach ( $array as $i => &$ref ) {\r\n\t\tif (($ref === ($value = 1)) && ($ref === ($value = 0))) {\r\n\t\t\t$value = $temp;\r\n\t\t\treturn $i;\r\n\t\t}\r\n\t}\r\n\t$value = $temp;\r\n\treturn false;\r\n}", "function linearSearch(array $array, $searchingElement)\n{\n foreach ($array as $key => $value) {\n if ($value == $searchingElement) {\n return $key;\n }\n }\n\n return -1;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find all messages starting at a specific message
public static function findAllStartingAtMessage(Message $start): array { $messages = Message::all(); $out = []; $adder = function($message, $key) use (&$out, &$messages) { $out[] = $message; unset($messages[$key]); return true; }; do { $add = false; foreach ($messages as $key => $message) { if ($message->getId() === $start->getId()) { $add = $adder($message, $key); } if (!$message->hasParentMessage()) { continue; } foreach ($out as $msg) { if ($message->getParentMessageId() == $msg->getId()) { $add = $adder($message, $key); } } } } while ($add); return $out; }
[ "private function findNextMessage()\n {\n do\n {\n $data = fgets( $this->fh );\n } while ( !feof( $this->fh ) && substr( $data, 0, 5 ) !== \"From \" );\n\n if ( feof( $this->fh ) )\n {\n return false;\n }\n return ftell( $this->fh );\n }", "public function seeLogMessageStartsWith(string $message_to_test, int $index = 0)\n {\n ['row' => $row, 'context' => $context] = $this->getHistory($index);\n\n $interpolated_message = self::interpolate(\n $row['message'],\n $context,\n );\n\n $this->assertStringStartsWith($message_to_test, $interpolated_message);\n }", "function retrieveMessages($fromEmail,$startIndex)\n{\n\t//<TODO>\n}", "public function search_queue(string $to_email = '', string $from_email = '', string $subject = '', string $message = '')\n{\n\n // Go through queue\n $results = array();\n foreach ($this->queue as $msg) { \n\n // Search\n if ($to_email != '' && $msg->get_to_email() != $to_email) { continue; }\n if ($from_email != '' && $msg->get_from_email() != $from_email) { continue; }\n if ($subject != '' && !preg_match(\"/$subject/i\", $msg->get_subject())) { continue; }\n if ($message != '' && !preg_match(\"/$message/i\", $msg->get_message())) { continue; }\n\n // Add to results\n $results[] = $msg;\n }\n\n // Return\n return $results;\n\n}", "function getFilteredMessages($filter, $num_messages=10, $start_from=0){\n \n $where = ['1=1'];\n foreach ($filter as $f => $v){\n $where[] = \"$f=$v\";\n }\n\n $sql_where = implode(\" AND \", $where);\n \n $sql = \"select r.id, r.description, i.name \" .\n \"from request r join document_meta d on r.id=d.request_id \" .\n \"join inststution i on r.institution_id=i.id \" .\n $sql_where .\n \" order by d.own.date desc limit $num_messages\"; \n $res = $DB->execute($sql);\n\n while (!$res->EOF) {\n $r_id = $res->FetchField(1);\n $r_descr = $res->FetchField(2);\n $i_name = $res->FetchField(3);\n \n $rs->MoveNext();\n } \n}", "public function findByText($message);", "public function search($query = \"ALL\")\n\t{\n\t\t$ids = imap_search($this->stream(), $query);\n\t\t$messages = [];\n\t\t$factory = new MessageFactory($this);\n\t\t\n\t\tif ($ids) {\n\t\t\tforeach ($ids as $id) {\n\t\t\t\t$messages[] = $factory->create($id);\n\t\t\t}\n\t\t}\n\t\t\n\t\tusort($messages, [$this, \"sort\"]);\n\t\t\n\t\treturn $messages;\n\t}", "public function getMessages ()\n\t{\n\t\t$file_contents = $this->getContents();\n\t\t$result = array();\n\t\t\n\t\t$position = 0;\n\t\t$prev_position = 0;\n\t\twhile (false !== ($position = strpos($file_contents, 'msgid', $position))) {\n\t\t\t$futur_msgid = strpos($file_contents, 'msgid', $position+1);\n\t\t\t$msgstr_position = strpos($file_contents, 'msgstr', $position);\n\t\n\t\t\t$bracket_position = $position;\n\t\t\t$i = 0;\n\t\t\t$msgid = '';\n\t\t\twhile (false !== ($bracket_position = strpos($file_contents, '\"', $bracket_position))) {\n\t\t\t\tif ($msgstr_position != false && $bracket_position > $msgstr_position) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif ($i%2) {\n\t\t\t\t\tif (isset($last_bracket_position)) {\n\t\t\t\t\t\t$msgid .= substr($file_contents, $last_bracket_position+1, $bracket_position-$last_bracket_position-1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($file_contents[$bracket_position-1] != '\\\\') {\n\t\t\t\t\t$i++;\n\t\t\t\t} else {\n\t\t\t\t\t$msgid = substr($msgid, 0, -1); // remove \"\\\"\n\t\t\t\t\t$msgid .= substr($file_contents, $bracket_position, 1); // add \"\"\"\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$last_bracket_position = $bracket_position;\n\t\t\t\t$bracket_position++;\n\t\t\t}\n\t\t\t\n\t\t\tif (!empty($msgid)) {\n\t\t\t\t\n\t\t\t\t$result[$msgid] = array(\n\t\t\t\t\t'msgstr' => null,\n\t\t\t\t\t'references' => array(),\n\t\t\t\t\t'fuzzy' => false,\n\t\t\t\t\t'comments' => ''\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$comments_part = substr($file_contents, $prev_position, $position-$prev_position);\n\t\t\t\t\n\t\t\t\t$dieze_position = 0;\n\t\t\t\twhile (false !== ($dieze_position = strpos($comments_part, \"\\n\".'#', $dieze_position))) {\n\t\t\t\t\t$dieze_position++;\n\t\t\t\t\t$end = strpos($comments_part, \"\\n\", $dieze_position);\n\t\t\t\t\t$line = substr($comments_part, $dieze_position, $end-$dieze_position);\n\t\t\t\t\t\n\t\t\t\t\tswitch (substr($line, 0, 2)) {\n\t\t\t\t\t\tcase '#:':\n\t\t\t\t\t\t\t$result[$msgid]['references'][] = trim(substr($line, 2));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '#,':\n\t\t\t\t\t\t\tif (strpos($line, 'fuzzy')) {\n\t\t\t\t\t\t\t\t$result[$msgid]['fuzzy'] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$result[$msgid]['comments'] .= trim(substr($line, 1)).\"\\n\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$bracket_position = $msgstr_position;\n\t\t\t\t$string = '';\n\t\t\t\t$i = 0;\n\t\t\t\t\n\t\t\t\twhile (false !== ($bracket_position = strpos($file_contents, '\"', $bracket_position))) {\n\t\t\t\t\tif ($futur_msgid != false && $bracket_position > $futur_msgid) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($i%2) {\n\t\t\t\t\t\tif (isset($last_bracket_position)) {\n\t\t\t\t\t\t\t$string .= substr($file_contents, $last_bracket_position+1, $bracket_position-$last_bracket_position-1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($file_contents[$bracket_position-1] != '\\\\') {\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$string = substr($string, 0, -1); // remove \"\\\"\n\t\t\t\t\t\t$string .= substr($file_contents, $bracket_position, 1); // add \"\"\"\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$last_bracket_position = $bracket_position;\n\t\t\t\t\t$bracket_position++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$result[$msgid]['msgstr'] = $string;\n\t\t\t\tif (!empty($result[$msgid]['comments'])) {\n\t\t\t\t\t$result[$msgid]['comments'] = substr($result[$msgid]['comments'], 0, -1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$prev_position = $position;\n\t\t\t$position++;\n\t\t\tunset($last_bracket_position);\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "public function SearchMessages($keyword){\n $messages = $this->getMessages(\"WHERE `title` LIKE '%$keyword%' OR `message` LIKE '%$keyword%'\");\n return $messages;\n }", "public function searchMessages(array $params)\n {\n $search = '';\n while (count($params)) {\n $search .= trim(array_shift($params)).' ';\n }\n $result = $this->talk('UID SEARCH', array((string) $search));\n if (empty($result) || !isset($result[0][1])) {\n return array();\n }\n array_shift($result[0]);\n return $result[0];\n }", "function match_in_message_dialog($message_data_item,$keyword)\n\t {\n\t if(count($message_data_item))\n\t\t {\n\t\t foreach($message_data_item as $data)\n\t\t\t{\n\t\t\t $index = strpos(strtolower($data['message_content']),$keyword);\n\t\t\t //echo $data['message_content'].\"---\".$keyword.\"--->\".$index.\"----<br/>\";\n\t\t if( $index > -1)\n\t\t\t {\n\t\t\t return TRUE;\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t return FALSE;\n\t }", "function RAS_getMsg($msg)\n{\n\t$lines = explode(\"\\n\",$msg);\n\t$msg = '';\n\t$start = false;\n\n\tforeach ($lines as $line)\n\t{\n\t\tif ($start && strpos($line,\"####### m23 remote administration service - Account information end #######\") !== false)\n\t\t\treturn($msg);\n\n\t\tif ($start)\n\t\t\t$msg .= $line;\n\n\t\tif (!$start && strpos($line,\"####### m23 remote administration service - Account information begin #####\") !== false)\n\t\t\t$start = true;\n\t}\n\n\treturn($msg);\n}", "private function _fetchMessages(){\n\t\t// only send one message per user... oldest message first\n\t\t$sql = \"SELECT\n\t\t\t\t`apns_messages`.`pid`,\n\t\t\t\t`apns_messages`.`message`,\n\t\t\t\t`apns_devices`.`devicetoken`,\n\t\t\t\t`apns_devices`.`development`\n\t\t\tFROM `apns_messages`\n\t\t\tLEFT JOIN `apns_devices` ON (`apns_devices`.`pid` = `apns_messages`.`fk_device` AND `apns_devices`.`clientid` = `apns_messages`.`clientid`)\n\t\t\tWHERE `apns_messages`.`status`='queued'\n\t\t\t\tAND `apns_messages`.`delivery` <= NOW()\n\t\t\t\tAND `apns_devices`.`status`='active'\n\t\t\tGROUP BY `apns_messages`.`fk_device`\n\t\t\tORDER BY `apns_messages`.`created` ASC\n\t\t\tLIMIT 100;\";\n\n\t\t$this->_iterateMessages($sql);\n\t}", "function getMessagesByMessage($a_sMessage)\n {\n $oMessageSelector = getMessageSelector();\n $oMessageSelector->setMessage($a_sMessage);\n $oMessageCollection = $this->read($oMessageSelector);\n return $oMessageCollection;\n\n }", "public function getMessagesBefore($date, $sortBy = SORTDATE, $reverse = true, $peek = true) {\n\t\t$date = $this->getCarbonDate($date);\n\t\t$criteria = ['before' => $date];\n\n\t\treturn $this->searchMessages($criteria, $sortBy, $reverse, $this->doPeek($peek));\n\t}", "function extract_at($message)\n{\n $split = preg_split(\"/ +/\", $message);\n\n $send_to = array();\n\n foreach($split as $word)\n if($word[0] == '@')\n array_push($send_to, substr($word, 1));\n\n return $send_to;\n}", "public function peek ()\n {\n if ( empty($this->_message_ids) && $this->message_count > 0 ) {\n // Application forgot to call search() first, that's okay. Just\n // return all messages in the mailbox.\n $this->_message_ids = $this->_imap_connection->get_message_uids($this->_mailbox_path);\n }\n if ( $this->_message_id_idx >= count($this->_message_ids) ) {\n return false;\n }\n return new \\Asinius\\Email\\Message($this->_imap_connection, ['path' => $this->_mailbox_path, 'uid' => $this->_message_ids[$this->_message_id_idx]]);\n }", "public function messagesNewestFirst() {\n return $this->messages()->orderBy('created_at', 'desc')->get();\n }", "function messagesGetByParent($msg_id) {\n\t\t$msg_id = intval ( $msg_id );\n\t\t\n\t\tif ($msg_id == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t//$messages = array ();\n\t\t$table = TABLE_PREFIX . 'messages';\n\t\t\n\t\t$q = \"SELECT * from $table where parent_id={$msg_id} and deleted_from_receiver='n' and deleted_from_sender='n' \";\n\t\t$cache_group = 'users/messages/' . $msg_id;\n\t\t$cache_group_id = __FUNCTION__ . md5 ( $q );\n\t\t$resutlt = CI::model('core')->dbQuery ( $q, $cache_group_id, $cache_group );\n\t\t$return = array ();\n\t\tif (empty ( $resutlt )) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tforeach ( $resutlt as $item ) {\n\t\t\t\t$return [] = $item;\n\t\t\t\t$more = $this->messagesGetByParent ( $item ['id'] );\n\t\t\t\tif (! empty ( $more )) {\n\t\t\t\t\tforeach ( $more as $item1 ) {\n\t\t\t\t\t\tif ($item ['id'] != $item1 ['id']) {\n\t\t\t\t\t\t\t$return [] = $item1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//$return = array_unique ( $return );\n\t\treturn $return;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Take test result, turn into "next check" timestamp
function resultToTime($result) { if ($result === false) { // Temporary failure -- couldn't run at least one destination and one source task $next = 7200; // 2 hours } elseif ($result === 0) { // Test finished, subnet not reachable $next = 86400 * 7; // a week } else { // Test finished, reachable $next = 86400 * 30; // a month } return time() + round($next * mt_rand(90, 133) / 100); }
[ "public function test() {\r\n\t\treturn Configuration::updateValue('cron_lasttest', time());\r\n\t}", "function ProcessIncrementalResult() {\n global $testPath;\n global $done;\n global $testInfo;\n global $testInfo_dirty;\n global $runNumber;\n global $cacheWarmed;\n global $location;\n\n if ($done) {\n // mark this test as done\n $testInfo['test_runs'][$runNumber]['done'] = true;\n $testInfo_dirty = true;\n \n // make sure all of the sharded tests are done\n for ($run = 1; $run <= $testInfo['runs'] && $done; $run++) {\n if (!$testInfo['test_runs'][$run]['done'])\n $done = false;\n }\n \n if (!$done &&\n array_key_exists('discarded', $testInfo['test_runs'][$runNumber]) &&\n $testInfo['test_runs'][$runNumber]['discarded']) {\n if (is_file(\"$testPath/test.job\")) {\n if (copy(\"$testPath/test.job\", $testInfo['job_file'])) {\n AddJobFileHead($location, $testInfo['workdir'], $testInfo['job'], $testInfo['priority'], true);\n }\n }\n }\n }\n}", "public function testStoreResult() {\n foreach ($this->testChecks as $check) {\n // Run the check and store its result.\n $result = $check->run();\n $check->storeResult($result);\n\n // Compare lastResult() with $result.\n $last_result = $check->lastResult(TRUE);\n $this->assertEquals($result->result(), $last_result->result(), 'Result stored.');\n $this->assertEquals($result->time(), $last_result->time(), 'Time stored.');\n if ($check->storesFindings()) {\n // If storesFindings() is set to FALSE, then these could differ.\n $this->assertEquals($result->findings(), $last_result->findings(), 'Findings stored.');\n }\n }\n }", "public function testWalkNextV1() {\n // Arrange\n $snmp = new SnmpRestHandler();\n\n // Act\n // \n $command = \"walk\";\n $host = \"127.0.0.1\";\n $community = \"public\";\n $oid = \"system.sysUpTime.0\";\n $version = \"1\";\n\n $response = $snmp->command($command,$version,$host,$oid,$community);\n\n // Assert\n\n $this->assertContains(\"Timeticks: \",$response);\n\n }", "public function getTimestamp()\n {\n $time = 1464053940;\n $token = new Token('not under test', 'not under test', 'not under test', $time);\n $this->assertSame(1464053940, $token->getTimestamp());\n }", "function testGetNowAsInt() {\n \terror_log(\"starting get now as int test\");\n $actual = $this->hour_adapter->getNowAsInt();\n $expected = time();\n $this->assertEquals($expected, $actual);\n }", "public function testSubmitCheckAndPollForResult()\n {\n\n $logger = AcrolinxLogger::getInstance('./logs/acrolinx.log', Logger::INFO);\n\n $token = $this->acrolinxAuthToken;\n $checkScore = null;\n\n $loop = Factory::create();\n\n $acrolinxEndPoint = new AcrolinxEndpoint($this->getProps(), $loop);\n\n $checkOptions = new CheckOptions();\n $checkOptions->batchId = BatchCheckIdGenerator::getId('testPHPSDK');\n $checkOptions->checkType = CheckType::BASELINE;\n $checkOptions->contentFormat = 'html';\n $checkOptions->disableCustomFieldValidation = false;\n $checkOptions->reportTypes = array(ReportType::TERMHARVESTING, ReportType::SCORECARD);\n $checkOptions->languageId = 'en';\n\n $checkRequest = new CheckRequest('<x>This is test</x>');\n $checkRequest->checkOptions = $checkOptions;\n $checkRequest->document = new DocumentDescriptorRequest('abc.html');\n $checkRequest->contentEncoding = ContentEncoding::NONE;\n\n $acrolinxEndPoint->check($token, $checkRequest)->then(function (CheckResponse $response)\n use ($acrolinxEndPoint, $token, $logger, &$loop, &$checkScore) {\n\n $resultUrl = $response->getPollingUrl();\n\n $acrolinxEndPoint->pollforCheckResult($resultUrl, $token)->\n then(function (CheckResult $response) use (&$checkScore, $logger) {\n\n $logger->info('Check result received');\n\n $checkScore = $response->getQuality()->getScore();\n }, function (Exception $reason) {\n fwrite(STDERR, print_r(PHP_EOL . $reason->getMessage() .\n ' | StatusCode: ' . PHP_EOL));\n });\n }, function (Exception $reason) {\n fwrite(STDERR, print_r(PHP_EOL . $reason->getMessage() .\n ' | StatusCode: ' . PHP_EOL));\n });\n\n $loop->run();\n $this->assertEquals(true, isset($checkScore));\n }", "public function NextRoundStartedCheck() {\n\t\t\n\t}", "public function testCalculationNextDay() :void\r\n {\r\n $log = new Log;\r\n $dt = new DateCalculator($log);\r\n $format = 'Y-m-d H:i:s';\r\n $submittime = DateTime::createFromFormat($format, '2021-03-18 15:34:25');\r\n $turnaround = 8;\r\n $result = $dt->calculateDueDate($submittime, $turnaround);\r\n $this->assertStringContainsString('2021-03-19 15:34', $result);\r\n }", "public function testTimestampGetTsa()\n {\n }", "public function testCalculationNextSeveralDay() :void\r\n {\r\n $log = new Log;\r\n $dt = new DateCalculator($log);\r\n $format = 'Y-m-d H:i:s';\r\n $submittime = DateTime::createFromFormat($format, '2021-03-18 15:34:25');\r\n $turnaround = 22;\r\n $result = $dt->calculateDueDate($submittime, $turnaround);\r\n $this->assertStringContainsString('2021-03-23 13:34', $result);\r\n }", "public function set_last_run_timestamp() {\n\t\t$raw = $this->get_result();\n\t\t$timestamp = ! empty( $raw['end'] ) ? (int) $raw['end'] : 0;\n\t\tif ( empty( $timestamp ) && ! empty( $raw['issues']['previous']['timestamp'] ) ) {\n\t\t\t$timestamp = (int) $raw['issues']['previous']['timestamp'];\n\t\t}\n\n\t\tif ( empty( $timestamp ) ) {\n\t\t\t$timestamp = time();\n\t\t}\n\n\t\treturn ! ! update_option( $this->get_filter( 'seo-service-last_runtime' ), $timestamp );\n\t}", "public function testGetJobLastBuild()\n {\n }", "public function testItShouldBeAbleToTrackExecutionTime()\r\n {\r\n $query = new Query();\r\n\r\n $result = $query->from($this->mockSourceCSV)\r\n ->select(['email'])\r\n ->where('name')\r\n ->condition('contains')\r\n ->value('matt')\r\n ->timer()\r\n ->execute();\r\n $this->assertArrayHasKey('data', $result);\r\n $this->assertArrayHasKey('timer', $result);\r\n $this->assertTrue(is_integer($result['timer']['elapsed']));\r\n }", "public function run_one(string $test_name) : TestResult\n\t{\n\t\t$this->active_result = new TestResult($this, $test_name);\n\n\t\t$this->active_test = $test_name;\n\t\ttry {\n\t\t\t$this->active_test = $test_name;\n\t\t\t$start_time = microtime(true);\n\t\t\t$this->before_each();\n\t\t\t$this->setUp();\n\t\t\t$this->$test_name();\n\t\t} catch (\\Exception $exception) {\n\t\t\t// $this->store_exception($exception);\n\t\t\tthrow $exception;\n\t\t}\n\n\t\t$this->after_each();\n\t\t$this->active_test = null;\n\t\t$this->tearDown();\n\t\t$result_time = microtime(true) - $start_time;\n\t\t$this->active_result->set_running_time($result_time);\n\t\treturn $this->active_result;\n\t}", "public function getNextResult() : Result\n {\n }", "function test_getAleatoryTimeForCollectiveTraining()\n\t {\n\t \ttry\n\t \t{\n\t \t\t//On regarde s'il y a des entrainements en base\n\t \t\t$requete_prepare = $this->_dao->getConnexion()->prepare(\"SELECT COUNT(*) as COUNT FROM t_entrainement WHERE type = 'collectif'\");\n\t \t\t$requete_prepare->execute();\n\t \t\t$count = $requete_prepare->fetch(PDO::FETCH_OBJ)->COUNT;\n\t \t\tif($count == 0)\n\t \t\t{\n\t\t \t\t//On créé 2 entrainements collectifs en base\n\t\t \t\t$dateDebut1 = mktime(11, 0, 0, date(\"n\"), date(\"j\"), date(\"Y\")); //Aujourd'hui à 11h\n\t\t \t\t$this->addTraining('ETEST0014', 360, 500, $dateDebut1, 'collectif', 'O1');\n\t\t \t\t\n\t\t \t\t$dateDebut2 = mktime(18, 0, 0, date(\"n\"), date(\"j\"), date(\"Y\")); //Aujourd'hui à 18h\n\t\t \t\t$this->addTraining('ETEST0042', 360, 500, $dateDebut2, 'collectif', 'O2');\n\t\t \t\t\n\t\t \t\t$ajd_9h = mktime(9, 0, 0, date(\"n\"), date(\"j\"), date(\"Y\"));\n\t\t \t\t$ajd_13h = mktime(13, 0, 0, date(\"n\"), date(\"j\"), date(\"Y\"));\n\t\t \t\t$ajd_16h = mktime(16, 0, 0, date(\"n\"), date(\"j\"), date(\"Y\"));\n\t\t \t\t$ajd_20h = mktime(20, 0, 0, date(\"n\"), date(\"j\"), date(\"Y\"));\n\t\t \t\t//On teste 10 fois la méthode\n\t\t \t\tfor($i=0 ; $i < 10 ; $i++)\n\t\t \t\t{\n\t\t \t\t\t$dateReceived = $this->_mdlEntrainement->getAleatoryTimeForCollectiveTraining();\n\t\t \t\t\tif(time() > DATE_MAX) //S'il est plus de 22h -> Exception\n\t\t \t\t\t{\n\t\t \t\t\t\t$this->assertEqual($dateReceived, -1);\n\t\t \t\t\t}\n\t\t \t\t\telse \n\t\t \t\t\t{\n\t\t\t \t\t\t$this->assertFalse($dateReceived < DATE_MIN); //Ne doit pas etre avant 8h\n\t\t\t \t\t\t$this->assertFalse($dateReceived > DATE_MAX); //Ne doit pas etre apres 22h\n\t\t\t \t\t\t$this->assertTrue($dateReceived >= time()); //Doit etre superieure a la date actuelle \n\t\t\t \t\t\t$this->assertFalse($dateReceived > $ajd_9h && $dateReceived < $ajd_13h); //Ne doit pas etre entre 9h et 13h\n\t\t\t \t\t\t$this->assertFalse($dateReceived > $ajd_16h && $dateReceived < $ajd_20h); //Ne doit pas etre entre 16h et 20h\n\t\t \t\t\t}\n\t\t \t\t}\n\t \t\t}\n\t \t\n \t\t}\n \t\tcatch(Exception $e)\n \t\t{\n \t\t\techo 'Exception reçue : '.$e->getMessage().'<br/>';\n \t\t\techo 'Trace : <pre>'.$e->getTraceAsString().'</pre><br/>';\n \t\t}\n \t\t\n \t\t//Suppressions\n \t\t$this->deleteTraining('ETEST0014');\n \t\t$this->deleteTraining('ETEST0042');\n\t }", "public function doTimestamp() {\r\n\t\t// Set default timezone.\r\n\t\tdate_default_timezone_set('Europe/Berlin');\r\n\t\t\r\n\t\t// Get current time.\r\n\t\t$time = date('H:i');\r\n\t\t\r\n\t\t// Action as expected by the TimeTool API.\r\n\t\t$this->action = 'addregi';\r\n\t\t\r\n\t\t// Check for custom tolerance settings.\r\n\t\tif (TOLERANCE === true) {\r\n\t\t\tif (is_numeric(minTolerance)) {\r\n\t\t\t\t$this->minTolerance = MINTOLERANCE;\r\n\t\t\t}\r\n\t\t\tif (is_numeric(maxTolerance)) {\r\n\t\t\t\t$this->maxTolerance = MAXTOLERANCE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Only use tolerance if it's greater than zero.\r\n\t\t\tif (!empty($this->minTolerance) && !empty($this->maxTolerance)) {\r\n\t\t\t\t$time = date('H:i', strtotime('-' . rand($this->minTolerance, $this->maxTolerance) . ' minutes'));\r\n\t\t\t}\r\n\t\t}\t\t\r\n\r\n\t\t// Prepare parameters which will be posted to the TimeTool API.\r\n\t\t$params = array(\r\n\t\t\t\t'cmd' => $this->action,\r\n\t\t\t\t'badnum' => $this->result['badnum'],\r\n\t\t\t\t'login' => $this->result['login'],\r\n\t\t\t\t'tc_chef' => $this->result['login'],\r\n\t\t\t\t'ucat' => 0,\r\n\t\t\t\t'klkunit' => 'absent',\r\n\t\t\t\t'session' => $this->result['session'],\r\n\t\t\t\t'tc_session' => $this->result['session'],\r\n\t\t\t\t'date' => date('Ymd'),\r\n\t\t\t\t'time' => $time\r\n\t\t);\r\n\t\t\r\n\t\t// Do the actual POST.\r\n\t\t$this->result = json_decode($this->_doCurlRequest($params), true);\r\n\t\t\r\n\t\t// Return the set timestamp to the user.\r\n\t\treturn $time;\r\n\t}", "public function testStreamGetRecordedAtTimes()\r\n {\r\n\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculates a table checksum.
public static function calculateTableChecksum($data) {}
[ "protected abstract function _calculateChecksum();", "function checksumTables()\n\t{\n\t\tforeach ($this->tables as $t) {\n\t\t\tif ($t['length'] > 0 && $t['length'] < $this->maxStrLenRead) { // 1.02\n\t\t\t\t$table = $this->get_chunk($t['offset'], $t['length']);\n\t\t\t\t$checksum = $this->calcChecksum($table);\n\t\t\t\tif ($t['tag'] == 'head') {\n\t\t\t\t\t$up = unpack('n*', substr($table, 8, 4));\n\t\t\t\t\t$adjustment[0] = $up[1];\n\t\t\t\t\t$adjustment[1] = $up[2];\n\t\t\t\t\t$checksum = $this->sub32($checksum, $adjustment);\n\t\t\t\t}\n\t\t\t\t$xchecksum = $t['checksum'];\n\t\t\t\tif ($xchecksum != $checksum) {\n\t\t\t\t\tthrow new \\Mpdf\\Exception\\FontException(sprintf('TTF file \"%s\": invalid checksum %s table: %s (expected %s)', $this->filename, dechex($checksum[0]) . dechex($checksum[1]), $t['tag'], dechex($xchecksum[0]) . dechex($xchecksum[1])));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getChecksum();", "public function getTableContentChecksum($table)\n {\n try {\n $result = $this->app['db']->fetchAll(\"SELECT * FROM `$table`\");\n $checksum = false;\n $content = '';\n if (is_array($result)) {\n foreach ($result as $row) {\n $content .= md5(str_ireplace(CMS_URL, '{{ SyncData:CMS_URL }}', implode(',', $row)));\n }\n $checksum = md5($content);\n }\n return $checksum;\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw $e;\n }\n }", "public function checksums(): array;", "private function generateChecksum() {\n\t}", "public function getCacheChecksum();", "private function getChecksum($command) {\n $sum = 0;\n for ($i = 0; $i < strlen($command); $i++) {\n $sum += ord($command[$i]);\n }\n $sum = $sum % 256;\n return $sum;\n }", "public function getDistSha1Checksum();", "function calc_checksum($cmd,$data){\n $xor_value = 0;\n $xor_value = $xor_value ^ $cmd;\n foreach($data as $byte) {\n $xor_value = $xor_value ^ $byte;\n }\n /*\n If value is less than 0x20 then add 0x20\n Eg If xor of CMD and DATA results in 0x0A then CHECKSUM = 0x2A\n */\n if ($xor_value < CHECKSUM_OFFSET) {\n $xor_value = $xor_value + CHECKSUM_OFFSET;\n }\n return $xor_value;\n}", "public function db_checksum() {\n\n\t\t\tglobal $wpdb;\n\n\t\t\tself::db_check_id();\n\n\t\t\t// Get form data\n\t\t\t$form_object = self::db_read(true, true, true);\n\n\t\t\t// Remove any variables that change each time checksum calculated or don't affect the public form\n\t\t\tunset($form_object->checksum);\n\t\t\tunset($form_object->published_checksum);\n\t\t\tunset($form_object->meta->tab_index);\n\t\t\tunset($form_object->meta->breakpoint);\n\n\t\t\t// Serialize\n\t\t\t$form_serialized = serialize($form_object);\n\n\t\t\t// MD5\n\t\t\t$this->checksum = md5($form_serialized);\n\n\t\t\t// SQL escape\n\t\t\t$this->checksum = str_replace(\"'\", \"''\", $this->checksum);\n\n\t\t\t// Update form record\n\t\t\t$sql = sprintf(\"UPDATE %s SET checksum = '%s' WHERE id = %u LIMIT 1;\", $this->table_name, esc_sql($this->checksum), $this->id);\n\t\t\tif($wpdb->query($sql) === false) { parent::db_throw_error(__('Error setting checksum', 'ws-form')); }\n\n\t\t\treturn $this->checksum;\n\t\t}", "public static function computeChecksum($file) {\n return md5_file($file);\n }", "private function sumTable( $table )\n\t{\n\t\tforeach($table->getRows() as $row)\n\t\t{\n\t\t\t$this->sumRow($row);\n\t\t}\n\t}", "function calc_checksum($ar, $type) {\n do_action('dbnavt', NAVT_INIT, sprintf(\"%s::%s type: %s\\n\",__CLASS__, __FUNCTION__, $type));\n\n $crc = 0;\n\n if( is_array($ar) && count($ar) > 0 ) {\n if( $type == 'group' ) {\n do_action('dbnavt', NAVT_INIT, sprintf(\"%s::%s group array\\n\",__CLASS__, __FUNCTION__), $ar);\n }\n\n else if( $type == 'item' ) {\n do_action('dbnavt', NAVT_INIT, sprintf(\"%s::%s item array\\n\",__CLASS__, __FUNCTION__), $ar);\n $s = '';\n foreach( $ar as $group_ar ) {\n foreach( $group_ar as $member_id => $item ) {\n $s .= implode('@@', $item);\n }\n }\n do_action('dbnavt', NAVT_INIT, sprintf(\"%s::%s \\texploded: %s\\n\",__CLASS__, __FUNCTION__, $s));\n $crc = crc32($s);\n do_action('dbnavt', NAVT_INIT, sprintf(\"%s::%s \\tcrc: %u\\n\",__CLASS__, __FUNCTION__, $crc));\n }\n }\n\n return($crc);\n }", "public function getChecksum() {\n $data = $this->con->getData(0);\n $string = \"Mode=\" . $data['serviceCharacteristicsByType']['TargetHeatingCoolingState']['value'] . \";\";\n $string .= \"Target=\". round($this->CtoF($data['serviceCharacteristicsByType']['TargetTemperature']['value'])) . \"F;\";\n $this->log->addDebug(\"Thermostat change checksum string: \" . $string);\n return md5($string);\n }", "protected function calculaChecksum($input) {\n \n \n $dec = str_split($input, 2);\n foreach ($dec as $k => $val) {\n $dec[$k] = hexdec($val);\n }\n \n $cs = array_sum($dec);\n\n if ($cs > 255) {\n $cs = dechex($cs);\n $cs = substr($cs, -2);\n } else {\n $cs = dechex($cs);\n }\n\n return $input . str_pad($cs, 2, '0', STR_PAD_LEFT);\n }", "public function createChecksum(Transaction $transaction)\n {\n return md5($transaction->getUid() . $transaction->getAmountAsInt() . $transaction->getText() . $transaction->getDescription());\n }", "function checksum($id){\n\n\t\t$position = 10 - strlen($id) + 1;\n\t\t\n\t\t$sum2 = 0;\n\t\t$sum3 = 0;\n\n\t\tfor( $loop = 0; $loop < strlen($id); $loop++ ) {\n\t\t\n\t\t\t$sum2 = $sum2 + pow(intval(substr($id,$loop,$loop + 1)) + $position,2);\n\t\t\t\n\t\t\t$sum3 = $sum3 + pow(intval(substr($id,$loop,$loop + 1)) + $position,3);\n\t\t\t\n\t\t\t$position++;\n\t\t\t\n\t\t}\n\t\t\n\t\t$chk1 = ($sum3 - $sum2) % 10;\n\n\t\t$chk2 = chr(($sum3 % 26) + 65);\n\t\t\n\t\treturn $chk1.$chk2;\n\t\t\n\t}", "public static function checksum($data) { // Computes the EAN-13 Checksum digit\n\t\t\t$ncode = '0' . $data;\n\t\t\t$even = 0;\n\t\t\t$odd = 0;\n\t\t\tfor ($x = 0; $x < 12; $x++) {\n\t\t\t\tif ($x % 2) {\n\t\t\t\t\t$odd += $ncode[$x];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$even += $ncode[$x];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$checksum = (10 - (($odd * 3 + $even) % 10)) % 10;\n\t\t\treturn $checksum;\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation crceOnlinePaymentUpdateBundleSubscription updates the payment method for the given bundle
public function crceOnlinePaymentUpdateBundleSubscription($subscription_id, $bundle_code, $payment, $correlation_id = null, $pin = null, $transaction_id = null, $user = null) { list($response) = $this->crceOnlinePaymentUpdateBundleSubscriptionWithHttpInfo($subscription_id, $bundle_code, $payment, $correlation_id, $pin, $transaction_id, $user); return $response; }
[ "public function updated(Subscription $subscription)\n {\n //\n }", "public function testUpdateSubscription()\n {\n }", "function maybe_update_all_subscriptions_payment_method( $update, $new_payment_method, $subscription ) {\n\t\tif ( $this->id == $new_payment_method ) {\n\t\t\t$update = false;\n\t\t}\n\n\t\treturn $update;\n\t}", "public function updateSubscription($request);", "public function updateSubscriptionAction()\n {\n $user = $this->_sessionHelper->getCurrentUser();\n $roleId = $user->getRoleId();\n $currentUserId = $user->getId();\n if (Tools_Security_Acl::ROLE_GUEST !== $roleId && $this->_request->isPost()) {\n $tokenToValidate = $this->_request->getParam(Tools_System_Tools::CSRF_SECURE_TOKEN, false);\n $valid = Tools_System_Tools::validateToken($tokenToValidate, self::SHOPPING_SECURE_TOKEN);\n if (!$valid) {\n exit;\n }\n $cartId = filter_var($this->_request->getParam('cartId'), FILTER_SANITIZE_NUMBER_INT);\n $changeSubscription = filter_var($this->_request->getParam('changeSubscription'), FILTER_SANITIZE_STRING);\n $nextBillingDate = filter_var($this->_request->getParam('nextBillingDate'), FILTER_SANITIZE_STRING);\n if ($nextBillingDate) {\n $changeSubscription = 'update';\n }\n $cart = Models_Mapper_CartSessionMapper::getInstance()->find($cartId);\n $cartUserId = intval($cart->getUserId());\n $recurringPaymentParams = $this->_request->getParams();\n $allowedUserStatuses = array(\n Store_Model_RecurringPayments::ACTIVE_RECURRING_PAYMENT,\n Store_Model_RecurringPayments::SUSPENDED_RECURRING_PAYMENT,\n Store_Model_RecurringPayments::CANCELED_RECURRING_PAYMENT,\n 'update'\n );\n if ($cart instanceof Models_Model_CartSession && ($cartUserId === $currentUserId || Tools_Security_Acl::isAllowed(Shopping::RESOURCE_STORE_MANAGEMENT))) {\n if (!Tools_Security_Acl::isAllowed(Shopping::RESOURCE_STORE_MANAGEMENT) && !in_array($changeSubscription,\n $allowedUserStatuses)\n ) {\n $this->_responseHelper->fail($this->_translator->translate('Recurring status not allowed'));\n }\n $result = Tools_RecurringPaymentTools::updateSubscription($cartId, $changeSubscription,\n $recurringPaymentParams);\n $responseMessage = $this->_translator->translate($result['message']);\n if ($result['error']) {\n $this->_responseHelper->fail($responseMessage);\n } else {\n $recurrentMapper = Store_Mapper_RecurringPaymentsMapper::getInstance();\n if ($changeSubscription !== 'update') {\n $recurrentMapper->updateRecurringStatus($cartId, $changeSubscription);\n } else {\n $date = date('Y-m-d', strtotime($nextBillingDate));\n $recurrentMapper->updateRecurringDate($cartId, $date);\n }\n $this->_responseHelper->success($responseMessage);\n }\n } else {\n $this->_responseHelper->fail($this->_translator->translate('Cart id not provided'));\n }\n\n }\n $this->_responseHelper->fail('');\n }", "public function crceOnlinePaymentUpdateBundleSubscriptionWithHttpInfo($subscription_id, $bundle_code, $payment, $correlation_id = null, $pin = null, $transaction_id = null, $user = null)\n {\n // verify the required parameter 'subscription_id' is set\n if ($subscription_id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $subscription_id when calling crceOnlinePaymentUpdateBundleSubscription');\n }\n // verify the required parameter 'bundle_code' is set\n if ($bundle_code === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $bundle_code when calling crceOnlinePaymentUpdateBundleSubscription');\n }\n // verify the required parameter 'payment' is set\n if ($payment === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $payment when calling crceOnlinePaymentUpdateBundleSubscription');\n }\n // parse inputs\n $resourcePath = \"/subscriptions/{subscriptionId}/activeBundles/{bundleCode}\";\n $httpBody = '';\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']);\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json']);\n\n // header params\n if ($correlation_id !== null) {\n $headerParams['correlationId'] = $this->apiClient->getSerializer()->toHeaderValue($correlation_id);\n }\n // header params\n if ($pin !== null) {\n $headerParams['pin'] = $this->apiClient->getSerializer()->toHeaderValue($pin);\n }\n // header params\n if ($transaction_id !== null) {\n $headerParams['transactionId'] = $this->apiClient->getSerializer()->toHeaderValue($transaction_id);\n }\n // header params\n if ($user !== null) {\n $headerParams['user'] = $this->apiClient->getSerializer()->toHeaderValue($user);\n }\n // path params\n if ($subscription_id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"subscriptionId\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($subscription_id),\n $resourcePath\n );\n }\n // path params\n if ($bundle_code !== null) {\n $resourcePath = str_replace(\n \"{\" . \"bundleCode\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($bundle_code),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($payment)) {\n $_tempBody = $payment;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('accessKey');\n if (strlen($apiKey) !== 0) {\n $headerParams['accessKey'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\iNew\\Rest6_1\\Model\\UpdateBundleResponse',\n '/subscriptions/{subscriptionId}/activeBundles/{bundleCode}'\n );\n\n return [$this->apiClient->getSerializer()->deserialize($response, '\\iNew\\Rest6_1\\Model\\UpdateBundleResponse', $httpHeader), $statusCode, $httpHeader];\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\UpdateBundleResponse', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 400:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\RestError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n case 500:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\iNew\\Rest6_1\\Model\\RestError', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public static function update_payment_method( $subscription, $new_payment_method ) {\n\n\t\t$old_payment_method = $subscription->get_payment_method();\n\t\t$old_payment_method_title = $subscription->get_payment_method_title();\n\t\t$available_gateways = WC()->payment_gateways->get_available_payment_gateways(); // Also inits all payment gateways to make sure that hooks are attached correctly\n\n\t\tdo_action( 'woocommerce_subscriptions_pre_update_payment_method', $subscription, $new_payment_method, $old_payment_method );\n\n\t\t// Make sure the subscription is cancelled with the current gateway\n\t\tWC_Subscriptions_Payment_Gateways::trigger_gateway_status_updated_hook( $subscription, 'cancelled' );\n\n\t\t// Update meta\n\t\tupdate_post_meta( $subscription->get_id(), '_old_payment_method', $old_payment_method );\n\t\tupdate_post_meta( $subscription->get_id(), '_payment_method', $new_payment_method );\n\n\t\tif ( isset( $available_gateways[ $new_payment_method ] ) ) {\n\t\t\t$new_payment_method_title = $available_gateways[ $new_payment_method ]->get_title();\n\t\t} else {\n\t\t\t$new_payment_method_title = '';\n\t\t}\n\n\t\tupdate_post_meta( $subscription->get_id(), '_old_payment_method_title', $old_payment_method_title );\n\t\tupdate_post_meta( $subscription->get_id(), '_payment_method_title', $new_payment_method_title );\n\n\t\tif ( empty( $old_payment_method_title ) ) {\n\t\t\t$old_payment_method_title = $old_payment_method;\n\t\t}\n\n\t\tif ( empty( $new_payment_method_title ) ) {\n\t\t\t$new_payment_method_title = $new_payment_method;\n\t\t}\n\n\t\t// Log change on order\n\t\t$subscription->add_order_note( sprintf( _x( 'Payment method changed from \"%1$s\" to \"%2$s\" by the subscriber from their account page.', '%1$s: old payment title, %2$s: new payment title', 'woocommerce-subscriptions' ), $old_payment_method_title, $new_payment_method_title ) );\n\n\t\tdo_action( 'woocommerce_subscription_payment_method_updated', $subscription, $new_payment_method, $old_payment_method );\n\t\tdo_action( 'woocommerce_subscription_payment_method_updated_to_' . $new_payment_method, $subscription, $old_payment_method );\n\t\tdo_action( 'woocommerce_subscription_payment_method_updated_from_' . $old_payment_method, $subscription, $new_payment_method );\n\t}", "public function update_subscription( $subscription_code, $plan_id );", "public static function add_subscription_updated_callback( $subscription ) {\n\t\tdo_action( 'wcs_webhook_subscription_updated', $subscription->get_id() );\n\t}", "public function onPaymentSubscriptionUpdateAfter($event)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$subs = $event -> getPayload();\r\n\t\t\tif (!($subs instanceof Payment_Model_Subscription))\r\n\t\t\t{\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tif ($subs -> status == 'active')\r\n\t\t\t{\r\n\t\t\t\t$gateway_id = $subs -> gateway_profile_id;\r\n\t\t\t\t$Orders = new Payment_Model_DbTable_Orders;\r\n\t\t\t\t$select = $Orders -> select() -> where(\"gateway_order_id = ?\", $gateway_id) -> where(\"user_id = ?\", $subs -> user_id);\r\n\t\t\t\t$result = $Orders -> fetchRow($select);\r\n\t\t\t\tif (($result) && $result -> state == 'complete')\r\n\t\t\t\t{\r\n\t\t\t\t\t$new_user_id = $subs -> user_id;\r\n\t\t\t\t\t$user = Engine_Api::_() -> ynaffiliate() -> getAssocId($new_user_id);\r\n\t\t\t\t\tif ($user)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$user = Engine_Api::_() -> getItem('user', $user -> user_id);\r\n\t\t\t\t\t\t$new_user = Engine_Api::_() -> getItem('user', $new_user_id);\r\n\t\t\t\t\t\tEngine_Api::_()->yncredit()-> hookCustomEarnCredits($user, $subs->getTitle(), 'ynaffiliate_subscription', $new_user);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception $e)\r\n\t\t{\r\n\t\t}\r\n\t}", "public function testCrceOnlinePaymentUpdateBundleSubscription()\n {\n\n }", "public function process_update_subscription($subscription_id)\n {\n }", "public function updatePaymentInfo($subscription, array $data)\n {\n $customerId = $this->customerSession->getCustomerId();\n\n if ($data['worldpay_subscription_payment'] == -2) {\n $subscription->setPaypageRegistrationId($data['paypage_registration_id']);\n } elseif ($data['worldpay_subscription_payment'] >= 0) {\n /** @var \\Magento\\Vault\\Model\\PaymentToken $token */\n $token = $this->tokenFactory->create()->load($data['worldpay_subscription_payment']);\n\n $details = json_decode($token->getTokenDetails());\n\n if ($token->getCustomerId() == $customerId) {\n $subscription->setToken($token->getGatewayToken());\n $subscription->setPaymentMethod($token->getPaymentMethodCode());\n $subscription->setPaymentCcExpMonth($details->ccExpMonth);\n $subscription->setPaymentCcExpYear($details->ccExpYear);\n $subscription->setPaymentCcLast4($details->ccLast4);\n }\n }\n\n return $this;\n }", "public function subscription_update_status( Pronamic_Pay_Subscription $subscription ) {\n\t\t$lead_id = $subscription->get_source_id();\n\n\t\t$lead = RGFormsModel::get_lead( $lead_id );\n\n\t\tif ( ! $lead ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$feed = get_pronamic_gf_pay_feed_by_entry_id( $lead_id );\n\n\t\tif ( ! $feed ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$action = array(\n\t\t\t'id' => $subscription->get_id(),\n\t\t\t'transaction_id' => $subscription->get_transaction_id(),\n\t\t\t'subscription_id' => $subscription->get_id(),\n\t\t\t'amount' => $subscription->get_amount(),\n\t\t\t'entry_id' => $lead['id'],\n\t\t);\n\n\t\tswitch ( $subscription->status ) {\n\t\t\tcase Pronamic_WP_Pay_Statuses::CANCELLED :\n\t\t\t\t$this->payment_action( 'cancel_subscription', $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::CANCELLED );\n\n\t\t\t\tbreak;\n\t\t\tcase Pronamic_WP_Pay_Statuses::COMPLETED :\n\t\t\t\t// @todo are we sure an 'expired subscription' is the same as the Pronamic_WP_Pay_Statuses::COMPLETED status?\n\t\t\t\t$this->payment_action( 'expire_subscription', $lead, $action, Pronamic_WP_Pay_Extensions_GravityForms_PaymentStatuses::EXPIRED );\n\n\t\t\t\tbreak;\n\t\t}\n\t}", "function update_subscription($subscriptionId,$array){\n $return = Braintree_Subscription::update($subscriptionId,$array);\n /* echo \"<pre>\";\n print_r($return);\n exit;*/\n return $return;\n }", "public function updateAction(): void\n {\n $bundle = $this->getBundleAPI()->update((int) $this->Request()->getParam('id'), ['active' => random_int(0, 1)]);\n\n echo $bundle->getActive() ? 'aktiv' : 'inaktiv';\n }", "private function upsertSubscriptionPlan(Entity\\Subscription $subscription, $method)\n {\n if (empty($subscription->id) || empty($subscription->name) || empty($subscription->description) || floatval($subscription->amount) <= 0)\n throw new \\InvalidArgumentException('Subscription info missing');\n if ($subscription->interval_days == 0 && $subscription->interval_months == 0 && $subscription->interval_years == 0)\n throw new \\InvalidArgumentException('Subscription interval missing');\n \n $data = array(\n 'subscription_plan[id]' => $subscription->id,\n 'subscription_plan[amount]' => intval(floatval($subscription->amount)*100),\n 'subscription_plan[name]' => $subscription->name,\n 'subscription_plan[description]' => $subscription->description,\n 'subscription_plan[interval_days]' => intval($subscription->interval_days),\n 'subscription_plan[interval_months]' => intval($subscription->interval_months),\n 'subscription_plan[interval_years]' => intval($subscription->interval_years),\n 'subscription_plan[trial_days]' => intval($subscription->trial_days)\n );\n return $this->request($method, '/subscription/plan', $data);\n }", "public function crceOnlinePaymentUpdatePlanSubscription($subscription_id, $tariff_plan_id, $payment, $correlation_id = null, $pin = null, $transaction_id = null, $user = null)\n {\n list($response) = $this->crceOnlinePaymentUpdatePlanSubscriptionWithHttpInfo($subscription_id, $tariff_plan_id, $payment, $correlation_id, $pin, $transaction_id, $user);\n return $response;\n }", "public function add_subscription_payment_method($payment_method_to_display, $subscription ) {\n if ( $this->id === $subscription->get_payment_method() ) {\n $order_id = $subscription->get_parent_id();\n $order = wc_get_order( $order_id );\n $token_id = $order->get_meta( '_trxservices_token_id', true );\n if ($token_id) {\n $token = WC_Payment_Tokens::get( $token_id );\n $payment_method_to_display = sprintf( __( 'Via %1$s ending in %2$s', 'woocommerce-trxservices' ), $token->get_card_type(), $token->get_last4() );\n }\n }\n return $payment_method_to_display;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the device IP address.
public function get_ip_addr() { return $this->ip; }
[ "function device_ip() {\n\t\t$ipaddress = '';\n\t\tif ($_SERVER['HTTP_CLIENT_IP'])\n\t\t\t$ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n\t\telse if ($_SERVER['HTTP_X_FORWARDED_FOR'])\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t\telse if ($_SERVER['HTTP_X_FORWARDED'])\n\t\t\t$ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n\t\telse if ($_SERVER['HTTP_FORWARDED_FOR'])\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n\t\telse if ($_SERVER['HTTP_FORWARDED'])\n\t\t\t$ipaddress = $_SERVER['HTTP_FORWARDED'];\n\t\telse\n\t\t\t$ipaddress = $_SERVER['REMOTE_ADDR'];\n\n\t\t// In case of error default value = 0.0.0.0\n\t\tif (strlen($ipaddress) < 7)\n\t\t\t$ipaddress = \"0.0.0.0\";\n\n\t\treturn $ipaddress;\n\t}", "public function getIp()\n {\n return $localIP = exec(\n \"/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'\"\n );\n }", "protected function getIp()\n {\n return $this->handler->getIp();\n }", "public function get_ip_address() {\n\t\treturn $this->order->get_ip_address();\n\t}", "public function getIpAddress(): string\n {\n return $this->request->ip();\n }", "final protected function ipAddress()\n {\n return $this->container->make('request')->ip();\n }", "public function getIp() {\n return $this->ip;\n }", "public function ip_address_get(){\n\t\treturn $this->fb->exec('lan.ip_address_get');\n\t}", "public function getIp()\n {\n $value = $this->get(self::IP);\n return $value === null ? (string)$value : $value;\n }", "public function getIp()\n {\n if (!$this->hasIp() && $this->hasDefaultIp()) {\n $this->setIp($this->getDefaultIp());\n }\n return $this->ip;\n }", "public function getIpAddress()\n {\n return $this->ip_address;\n }", "public function getIp()\r\n\t{\r\n\t\r\n\t\treturn $this->ip;\r\n\t\r\n\t}", "function get_ip( ) {\n // returns the value of ip\n return $this->ip;\n }", "protected function GetIpAddress()\n\t\t{\n\t\t\t$order = current($this->orderData['orders']);\n\t\t\treturn $order['ordipaddress'];\n\t\t}", "protected function get_ip()\n\t{\n\t\t$forwarded_for = $this->headers['X-Forwarded-For'];\n\n\t\tif ($forwarded_for)\n\t\t{\n\t\t\tlist($ip) = explode(',', $forwarded_for);\n\n\t\t\treturn $ip;\n\t\t}\n\n\t\treturn (isset($this->env['REMOTE_ADDR']) ? $this->env['REMOTE_ADDR'] : null) ?: '::1';\n\t}", "static function getIP()\r\n {\r\n return self::getRemoteIP();\r\n }", "public function getIP()\n {\n return isset($this->IP) ? $this->IP : null;\n }", "public function getCurrentIPAddress() {\n $ip_address = $_SERVER['REMOTE_ADDR'];\n return $ip_address;\n }", "public function getIpAddress() \n {\n return $this->_fields['IpAddress']['FieldValue'];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method should return the classname of OrderItem class.
abstract public function getOrderItemClass();
[ "public function getOrderItemClass()\n {\n return $this->orderItemClass;\n }", "public function get_item_class() {\n\n\t\t\treturn $this->item_class;\n\n\t\t}", "public function get_item_class( $item ) {\n\t\treturn str_replace( '-', '_', basename( $item ) );\n\t}", "protected function itemClass()\n {\n if (preg_match('/([\\w]+)Repository$/', get_class($this), $matches)) {\n return $matches[1];\n }\n\n throw new \\LogicException('Cannot get class name');\n }", "abstract protected function getItemClassName();", "public static function getItemClass(): string;", "protected function getItemBagClassName(): string\n {\n return ItemBag::class;\n }", "abstract public function getOrderClass();", "public function getItemClass() {\n return $this->itemClass;\n }", "public function getOrderClass()\n {\n return $this->orderClass;\n }", "function getCartClassName() ;", "private function getProductClass(LineItemInterface $item)\n {\n return $item->getProductClass() ?: '';\n }", "public function getOrderItemTypeId();", "public function getOrderItemMapperClass()\n {\n return $this->orderItemMapperClass;\n }", "public function getFileItemClass()\n {\n return $this->file()->getClass();\n }", "public function Classes()\n {\n $class = get_class($this);\n $classes = array();\n $classes[] = strtolower($class);\n while (get_parent_class($class) != 'DataObject' && $class = get_parent_class($class)) {\n $classes[] = strtolower($class);\n }\n if (is_a($this, Object::getCustomClass('OrderItem'))) {\n $classes[] = strtolower($this->BuyableClassName);\n }\n\n return implode(' ', $classes);\n }", "abstract public function getItemClass();", "protected function buildOrderListClassName() {}", "private static function get_class_name_for_order_id($order_id)\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Ensure we can get the profile attribute from our model [ChromeExtensions].
public function testGetProfile(): void { $model = ChromeExtensions::load([ "profile" => "profile", ], $this->container); $this->assertSame("profile", $model->getProfile()); }
[ "function loadProfile() {\n $response = $this->client->get(\n sprintf(\"http://%s/v1/user/%s/profile\",\n SOCIAL_WS_HOSTNAME,\n urlencode($this->guid)));\n if(is_null($response) || $response[\"code\"] != 200) {\n return NULL;\n }\n\n $profile = json_decode($response[\"responseBody\"]);\n return $profile->profile;\n }", "public function getProfile()\n {\n }", "public function getProfile();", "private function get_profile() {\n\t\treturn monsterinsights_get_option( 'analytics_profile', false );\n\t}", "public function getProfile()\n {\n return $this->_profile;\n }", "public function getProfile()\n {\n return isset($this->profile) ? $this->profile : null;\n }", "public function getUserProfile();", "protected function loadProfile()\n {\n }", "public function getUserProfile()\n {\n }", "public function getProfile()\r\n\t{\r\n\t\treturn $this->profile;\r\n\t}", "public function getProfile()\n {\n return $this->getValue(self::PROFILE);\n }", "protected function getInstallProfile() {\n $config = $this->getConfigStorage()->read('core.extension');\n if (!empty($config['profile'])) {\n $install_profile = $config['profile'];\n }\n // @todo https://www.drupal.org/node/2831065 remove the BC layer.\n else {\n // If system_update_8300() has not yet run fallback to using settings.\n $install_profile = Settings::get('install_profile');\n }\n\n // Normalize an empty string to a NULL value.\n return empty($install_profile) ? NULL : $install_profile;\n }", "public function getImage_profile()\n {\n return $this->image_profile;\n }", "function phorum_mod_user_tagging_profile($profile)\n{\n global $PHORUM;\n\n if (empty($PHORUM['mod_user_tagging']['rules']) ||\n empty($profile['mod_user_tagging'])) return $profile;\n\n foreach ($PHORUM['mod_user_tagging']['rules'] as $rule)\n {\n if (empty($rule['enable_profile'])) continue;\n\n $value = user_tagging_process_rule($rule, $profile);\n\n if ($value !== NULL) {\n $profile[$rule['tpl_var']] = $value;\n }\n }\n\n return $profile;\n}", "public function getProfileMode();", "public function testSetProfileAttributes()\n {\n }", "function readProfileTest() {\n\t\t$user = lcUser::getUserByUsername('mark');\n\t\t$profile = $user->profile;\n\t\t$common = $profile->common_attribs;\n\t\t$ret = (in_array('firstname',$common));\n\t\t$ret &= (in_array('lastname',$common));\n\t\t$ret &= (is_object($profile));\n\t\treturn $ret;\n\t}", "public function hasProfilePreLoaded()\n {\n return property_exists($this, 'profile') && ! is_null($this->profile);\n }", "function getProfile_pic()\r\n\t{\r\n\t\treturn $this->profile_pic;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This function sorts the whitelist alphabetically, and sets the current user's domain as the first element in the array of allowed domains. Mostly, this is for the JavaScript on the invite pagein the case of multiple allowed domains, it's nicer if the user's own domain is the first option, and this seemed like a good way to do it.
function sortWhitelist($whitelist) { $whitelist = array_unique($whitelist); natcasesort($whitelist); $user = common_current_user(); if (!empty($user) && !empty($user->email)) { $userDomain = $this->domainFromEmail($user->email); $orderedWhitelist = array_values( array_filter( $whitelist, array($this, "userDomainFilter") ) ); if (in_array($userDomain, $whitelist)) { array_unshift($orderedWhitelist, $userDomain); } return $orderedWhitelist; } return $whitelist; }
[ "function local_domains( $domains ) {\n\t\t// Example allows local URLs to be matched when site accessed as any of the 3 examples.\n\t\t$domains[] = 'example.com';\n\t\t$domains[] = 'example-pro.com';\n\t\t$domains[] = 'example-deluxe.com';\n\n\t\t// Example makes sure that the current multisite's canonical domain is included\n\t\t// in match check even if domain mapping etc. has changed the URL of site.\n\t\tif ( is_multisite() ) {\n\t\t\t$blog_details = get_blog_details();\n\n\t\t\tif ( false !== $blog_details && ! in_array( $blog_details->domain, $domains ) ) {\n\t\t\t\t$domains[] = $blog_details->domain;\n\t\t\t}\n\t\t}\n\n\t\treturn $domains;\n\t}", "private function generate_global_whitelist() {\n\t\t$this->generate_site_whitelist( 'default' );\n\n\t\t$sites = array_unique(\n\t\t\tarray_column(\n\t\t\t\tWhitelist::all( array( 'site_url' ) ),\n\t\t\t\t'site_url'\n\t\t\t)\n\t\t);\n\t\tif ( ( $key = array_search( 'default', $sites ) ) !== false ) {\n\t\t\tunset( $sites[ $key ] );\n\t\t}\n\n\t\tforeach ( $sites as $site ) {\n\t\t\t$this->generate_site_whitelist( $site );\n\t\t}\n\n\t}", "private function domainBasedMenu(){\n $this->user_domain_menu = array_get(config('menu.nav.main'), strtolower($this->user_domain));\n\n\n }", "function panthro_whitelist_domain_form () {\n\t$nonce = yourls_create_nonce( 'whitelist_domain' ) ;\n\t$domain_list = yourls_get_option ('panthro_whitelist_domain_list','Enter domain addresses here, one per line');\n\tif ($domain_list != 'Enter domain addresses here, one per line' ){\n\t\t$domain_list_display = unserialize ( $domain_list );\n\t}else{\n\t\t$domain_list_display = $domain_list;\n\t}\n\techo <<<HTML\n\t\t<h2> WhiteList domains</h2>\n\t\t<form method=\"post\">\n\t\t\n\t\t<input type=\"hidden\" name=\"action\" value=\"whitelist_domain\" />\n\t\t<input type=\"hidden\" name=\"nonce\" value=\"$nonce\" />\n\t\t\n\t\t<p>Whitelist following domains\n\t\t<textarea cols=\"30\" rows=\"5\" name=\"whitelist_form\">$domain_list_display</textarea>\n\t\t</p>\n\t\t\n\t\t<p><input type=\"submit\" value=\"Save\" /></p>\n\t\t</form>\nHTML;\n}", "private function saveDomain()\n {\n $domain = rtrim((string) Url::to(''), DISPATCHER_FILENAME);\n $domain = rtrim($domain, \"/\");\n\n $domainsFromConfig = $this->config->get('centry.domains', []);\n $domains = array_merge($domainsFromConfig, [$domain]);\n $domains = array_filter($domains);\n $domains = array_unique($domains);\n\n if ($domainsFromConfig != $domains) {\n $this->config->save('centry.domains', $domains);\n }\n }", "public function get_user_domain();", "public function getDomainNames () {\n\t\t\t$psl = Mage::helper (\"cloudflare/publicSuffixList\");\n\t\t\t$selection = $this->getDomainName ();\n\t\t\t$domains = array ();\n\t\t\t$pslData = $this->refreshPSL ();\n\t\t\tforeach ( Mage::app ()->getWebsites () as $website ) {\n\t\t\t\tforeach ( $website->getGroups () as $group ) {\n\t\t\t\t\t$stores = $group->getStores ();\n\t\t\t\t\tforeach ( $stores as $store ) {\n\t\t\t\t\t\t$domain = $psl->extract ( $store->getBaseUrl (), $pslData ) [\"root_domain\"];\n\t\t\t\t\t\tarray_push ( $domains, $domain );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$domains = array_unique ( $domains );\n\t\t\tsort ( $domains );\n\t\t\t$domains = array_map ( function ( $domain ) use ( $selection ) {\n\t\t\t\treturn array (\n\t\t\t\t\t\"name\" => $domain,\n\t\t\t\t\t\"active\" => $domain == $selection,\n\t\t\t\t\t\"action\" => Mage::helper (\"adminhtml\")->getUrl (\n\t\t\t\t\t\t\"*/*/domain\",\n\t\t\t\t\t\tarray ( \"name\" => $domain )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}, $domains );\n\t\t\treturn $domains;\n\t\t}", "protected function _processWhitelist() {\n\t\t$whitelist = $this->getModel()->whitelist;\n\t\t$fieldList = $this->getOptions('fieldList');\n\n\t\tif (!empty($fieldList)) {\n\t\t\tif (!empty($fieldList[$this->getModel()->alias]) && is_array($fieldList[$this->getModel()->alias])) {\n\t\t\t\t$whitelist = $fieldList[$this->getModel()->alias];\n\t\t\t} else {\n\t\t\t\t$whitelist = $fieldList;\n\t\t\t}\n\t\t}\n\t\tunset($fieldList);\n\n\t\tif (!empty($whitelist)) {\n\t\t\t$this->validationErrors = array();\n\t\t\t$validate = array();\n\t\t\tforeach ((array)$whitelist as $f) {\n\t\t\t\tif (!empty($this->_validate[$f])) {\n\t\t\t\t\t$validate[$f] = $this->_validate[$f];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_validate = $validate;\n\t\t}\n\t}", "function figure_out_main_domain( $domains ) {\n\t$valid = array_filter( $domains, function ( $domain ) {\n\t\treturn false === strpos( $domain, '*.' );\n\t} );\n\t// reset() trick to get first item\n\treturn reset( $valid );\n}", "public static function allowedDomains() {\n return [\n '*', // star allows all domains\n 'http://test1.example.com',\n 'http://test2.example.com',\n ];\n}", "public function userDomainsList()\n {\n }", "public static function allowedDomains() {\n return [\n '*', // star allows all domains\n // 'http://test1.example.com',\n // 'http://test2.example.com',\n ];\n }", "public function sync_domains() {\n\t\tglobal $wpdb;\n\t\t$suppress = $wpdb->suppress_errors();\n\t\t$mappings = $wpdb->get_col( 'SELECT DISTINCT domain FROM ' . $wpdb->dmtable );\n\t\t$wpdb->suppress_errors( $suppress );\n\n\t\tif ( ! $mappings ) {\n\t\t\tWP_CLI::error( 'No mappings found on the network.' );\n\t\t}\n\n\t\t$domains = get_domains_from_cloudfront();\n\t\t$new_domains = array();\n\t\tforeach ( $mappings as $mapping ) {\n\t\t\t$new_domains = array_merge( $new_domains, get_domain_with_alternatives( $mapping ) );\n\t\t}\n\n\t\tupdate_domains_on_cloudfront( array_merge( $domains, $new_domains ) );\n\n\t\tWP_CLI::success( 'Completed domain sync. Added the follwing domains: ' );\n\t\tprint_r( array_diff( $new_domains, $domains ) );\n\t}", "function domainbox($domain=null, $type='local')\n{\n\tif ($type == 'local') {\n\t\tglobal $domains;\n\t $tmp = '';\n\n\t if (count($domains) > 0) {\n\t ksort($domains);\n\t }\n\n\t foreach ( array_keys($domains) as $k )\n\t {\n\t \tif ($domain && $k == $domain)\n\t \t$tmp .= \"<option value='$k' selected>$k</option>\\n\";\n\t else\n\t \t$tmp .= \"<option value='$k'>$k</option>\\n\";\n\t }\n\n\t return $tmp;\n\n\t} else {\n\n\t\tglobal $pref;\n\n\t\t$list = '';\n\n\t\t$doms = explode(',', $pref['allowed_domains']);\n\t\tsort($doms);\n\t\tforeach ($doms as $dom) {\n\t\t\t$dom = trim($dom);\n\n\t\t\tif (empty($dom)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$list .= \"<option value='$dom'>$dom</option>\\n\";\n\t\t}\n\n\t\treturn $list;\n\t}\n}", "function smartqueue_domain_views_pre_view(&$view) {\n $filters = $view->display_handler->get_option('filters');\n if (isset($filters['in_domian'])) {\n $filters['in_domain'] = $filters['in_domian'];\n $filters['in_domain']['id'] = 'in_domain';\n $filters['in_domain']['field'] = 'in_domain';\n unset($filters['in_domian']);\n $view->display_handler->set_option('filters', $filters);\n }\n}", "public static function allowedDomains()\n {\n return [\n '*', // star allows all domains\n // 'http://test1.example.com',\n // 'http://test2.example.com',\n ];\n }", "function af_domaintolower( $fields ){\n\t\n\tforeach($fields as $index => $url){\n\t\t\t\n\t\tif( stripos($url, 'http://') === false and stripos($url, 'https://') === false ){\n\t\t\t$url = 'http://' . $url;\n\t\t\t$edited = true; // if http or https was added in code - remove it in the end\n\t\t}\n\t\t\t\t\n\t\t$domain = parse_url( $url, PHP_URL_HOST );\n\t\t$domain_lower = str_ireplace($domain, strtolower($domain), $url);\n\t\t$fields[$index] = $domain_lower;\n\t\t\n\t\tif( isset($edited) ){\n\t\t\t$fields[$index] = str_ireplace( array('http://', 'https://'), '', $fields[$index] );\t\n\t\t\tunset($edited);\n\t\t}\t\n\t}\n\treturn $fields;\n}", "public static function allowedDomains()\n\t{\n\t\treturn Yii::$app->params['allowedDomains'];\n//\t\t[\n//\t\t\t// '*', // star allows all domains\n//\t\t\t'http://fxwatch',\n//\t\t\t'http://fx-chart.foshan.tours',\n//\t\t\t'http://vladbat.ru',\n//\t\t\t'http://widget.fxwatch.ru',\n//\t\t\t'http://fxwatch.ru'\n//\t\t];\n\t}", "public function toWhitelist($senderName, $senderDomain,$src,$rcpt) {\n $queryWhitelist\t= \"SELECT COUNT(*) AS nr FROM from_awl\".\n \" WHERE sender_name = '\".self::$db->quote($senderName).\"'\".\n \" AND sender_domain = '\".self::$db->quote($senderDomain).\"'\".\n \" AND src = '\".self::$db->quote($src).\"'\";\n\n $isAlreadyInWhitelist = self::$db->queryArray($queryWhitelist)[0][\"nr\"];\n if($isAlreadyInWhitelist == 0) {\n $queryGreylist = \"SELECT * FROM connect\".\n \" WHERE sender_name='\".self::$db->quote($senderName).\"'\".\n \" AND sender_domain='\".self::$db->quote($senderDomain).\"'\".\n \" AND src='\".self::$db->quote($src).\"'\".\n \" AND rcpt='\".self::$db->quote($rcpt).\"'\".\n \" ORDER BY first_seen DESC\";\n\n $entry = self::$db->queryArray($queryGreylist)[0];\n if(isset($entry)) {\n $insertWhitelist = \"INSERT INTO from_awl(sender_name, sender_domain, src, first_seen, last_seen)\".\n \" Values('\".$entry[\"sender_name\"].\"','\".$entry[\"sender_domain\"].\"','\".$entry[\"src\"].\"','\".$entry[\"first_seen\"].\"','\".$entry[\"first_seen\"].\"')\";\n self::$db->query($insertWhitelist);\n }\n // delete the entry in the greylist\n $this->delete($senderName,$senderDomain,$src,$rcpt);\n }\n return new AjaxResult(true, \"Data have been moved to whitelist!\");\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a new recipientID Recipient's eBay user ID. For AddMemberMessagesAAQToBidder, it must be the seller of an item, that item's bidder, or a user who has made an offer on that item using Best Offer. Note: maxOccurs is a shared schema element and needs to be unbounded for AddMemberMessagesAAQToBidder. For AddMemberMessageRTQ, this field is mandatory if ItemID is not in the request. For all other uses, there can only be one RecipientID.
public function setRecipientID(array $recipientID) { $this->recipientID = $recipientID; return $this; }
[ "function setRecipientId($value) {\n return $this->setFieldValue('recipient_id', $value);\n }", "public function setRecipient($id)\n {\n $this->to = $id;\n }", "public function setRecipientUserId(?string $value): void {\n $this->getBackingStore()->set('recipientUserId', $value);\n }", "public function setRecipientUserID($recipientUserID)\n {\n $this->recipientUserID = $recipientUserID;\n return $this;\n }", "public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}", "public function setRecipientTokenId($value) \n {\n $this->_fields['RecipientTokenId']['FieldValue'] = $value;\n return $this;\n }", "public function setRecipient($recipient);", "public function setRecipient($recipient = '') {\n\t\t\t$this->recipient = $recipient;\n\t\t}", "function setRecipient($recipient)\n\t{\n\t\t$this->recipient = $recipient;\n\t}", "public function testGetSetRecipient()\n {\n $request = TextMessageRequest::create();\n $recipient = Recipient::create();\n\n $this->assertNull($request->getRecipient());\n $this->assertSame($request, $request->setRecipient($recipient));\n $this->assertSame($recipient, $request->getRecipient());\n }", "public function getRecipientUserID()\n {\n return $this->recipientUserID;\n }", "public function setRecipient(\\DirectMailTeam\\DirectMail\\Domain\\Model\\Interfaces\\Recipient $recipient) {\n\t\tswitch (get_class($recipient)) {\n\t\t\tcase 'DirectMailTeam\\DirectMail\\Domain\\Model\\Address':\n\t\t\tcase 'DirectMailTeam\\DirectMail\\Domain\\Model\\FrontendUser':\n\t\t\t\t$this->setRecipientTable($recipient->getType());\n\t\t\t\t$this->setRecipientUid($recipient->getUid());\n\t\t\tbreak;\n\n\t\t\tcase 'DirectMailTeam\\DirectMail\\Domain\\Model\\CustomRecipient':\n\t\t\t\tif ($recipient->getType() === 'plain') {\n\t\t\t\t\t// For plain recipients (from CSV, plain list) the recipient data is stored\n\t\t\t\t\t// as json_encoded value in the \"recipientData\" property.\n\t\t\t\t\t$this->setRecipientData(json_encode($recipient->toArray()));\n\t\t\t\t} else {\n\t\t\t\t\t// For \"userTable\" type records the recipient table is stored in the \"type\" property.\n\t\t\t\t\t$this->setRecipientTable($recipient->getType());\n\t\t\t\t\t$this->setRecipientUid($recipient->getUid());\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tif (!$recipient instanceof \\DirectMailTeam\\DirectMail\\Domain\\Model\\Interfaces\\Recipient) {\n\t\t\t\t\tthrow new \\Exception('A recipient must implement the \"Recipient\" interface');\n\t\t\t\t}\n\t\t\t\t$this->setRecipientTable($recipient->getType());\n\t\t\t\t$this->setRecipientUid($recipient->getUid());\n\t\t\tbreak;\n\t\t}\n\t}", "protected function setRecipient( $value ){\n\t\t$this -> recipient = $value;\n\t}", "public function testSetRecipient()\n {\n $Message = new App\\Message;\n $Message->setRecipient('kenken@ken.com');\n $this->assertEquals($Message->getRecipient(),'kenken@ken.com');\n }", "public function setRecipient(?FulfillmentRecipient $recipient): void\n {\n $this->recipient = $recipient;\n }", "public function setNameOfRecipient($nameOfRecipient){\r\n\t\t$this->nameOfRecipient = $nameOfRecipient;\r\n\t}", "public function getRecipientId();", "public function setRecipient($recipient) {\n\t\t$this->recipient = (is_array($recipient) ? implode(',', $recipient) : $recipient);\n\t}", "public function setNameOfRecipient($nameOfRecipient) {\r\n\t\t$this->nameOfRecipient = $nameOfRecipient;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation getAggregationAccountHoldingAllUsingGetWithHttpInfo List all aggregation account holdings
public function getAggregationAccountHoldingAllUsingGetWithHttpInfo($ascending = 'false', $currency_conversion = null, $filter = null, $order_by = 'update_date', $page = '0', $size = '25') { $returnType = '\com\hydrogen\nucleus\Model\PageAggregationAccountHolding_'; $request = $this->getAggregationAccountHoldingAllUsingGetRequest($ascending, $currency_conversion, $filter, $order_by, $page, $size); try { $options = $this->createHttpClientOption(); try { $response = $this->client->send($request, $options); } catch (RequestException $e) { throw new ApiException( "[{$e->getCode()}] {$e->getMessage()}", $e->getCode(), $e->getResponse() ? $e->getResponse()->getHeaders() : null, $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null ); } $statusCode = $response->getStatusCode(); if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( sprintf( '[%d] Error connecting to the API (%s)', $statusCode, $request->getUri() ), $statusCode, $response->getHeaders(), $response->getBody() ); } $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = $responseBody->getContents(); if ($returnType !== 'string') { $content = json_decode($content); } } return [ ObjectSerializer::deserialize($content, $returnType, []), $response->getStatusCode(), $response->getHeaders() ]; } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\com\hydrogen\nucleus\Model\PageAggregationAccountHolding_', $e->getResponseHeaders() ); $e->setResponseObject($data); break; } throw $e; } }
[ "public function getAllUserHoldingsWithHttpInfo($user_id, $user_secret, $brokerage_authorizations = null, string $contentType = self::contentTypes['getAllUserHoldings'][0], \\SnapTrade\\RequestOptions $requestOptions = new \\SnapTrade\\RequestOptions())\n {\n [\"request\" => $request, \"serializedBody\" => $serializedBody] = $this->getAllUserHoldingsRequest($user_id, $user_secret, $brokerage_authorizations, $contentType);\n\n // Customization hook\n $this->beforeSendHook($request, $requestOptions, $this->config);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n if (\n ($e->getCode() == 401 || $e->getCode() == 403) &&\n !empty($this->getConfig()->getAccessToken()) &&\n $requestOptions->shouldRetryOAuth()\n ) {\n return $this->getAllUserHoldingsWithHttpInfo(\n $user_id,\n $user_secret,\n $brokerage_authorizations,\n $contentType,\n $requestOptions->setRetryOAuth(false)\n );\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\SnapTrade\\Model\\AccountHoldings[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\SnapTrade\\Model\\AccountHoldings[]' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\SnapTrade\\Model\\AccountHoldings[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 400:\n if ('\\SnapTrade\\Model\\Model400FailedRequestResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\SnapTrade\\Model\\Model400FailedRequestResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\SnapTrade\\Model\\Model400FailedRequestResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n case 403:\n if ('\\SnapTrade\\Model\\Model403FailedRequestResponse' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\SnapTrade\\Model\\Model403FailedRequestResponse' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\SnapTrade\\Model\\Model403FailedRequestResponse', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\SnapTrade\\Model\\AccountHoldings[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\SnapTrade\\Model\\AccountHoldings[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\SnapTrade\\Model\\Model400FailedRequestResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\SnapTrade\\Model\\Model403FailedRequestResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getAggregationAccountHoldingAllUsingGetAsync($ascending = 'false', $currency_conversion = null, $filter = null, $order_by = 'update_date', $page = '0', $size = '25')\n {\n return $this->getAggregationAccountHoldingAllUsingGetAsyncWithHttpInfo($ascending, $currency_conversion, $filter, $order_by, $page, $size)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getAllocationAllHoldingAllUsingGet($allocation_id, $end_date = null, $start_date = null)\n {\n list($response) = $this->getAllocationAllHoldingAllUsingGetWithHttpInfo($allocation_id, $end_date, $start_date);\n return $response;\n }", "public function getBookings()\n {\n\n $from = Util::getLatestRequestTime('booking');\n $to = Util::getNowTime();\n\n $client = new Client([\n 'base_uri' => $this->baseUrl,\n 'timeout' => $this->timeout\n ]);\n\n $url = $this->apiURL . 'bookings?from=' . $from . '&to=' . $to . '&with_items=true';\n\n $response = $client->request('GET', $url, [\n 'headers' => [\n 'Authorization' => $this->apiKey\n ]\n ]);\n\n $this->saveRequestTime($this->apiKey, 'booking');\n \n Booking::saveNewBookings($response->getBody());\n BookingItem::saveItems($response->getBody());\n }", "protected function getAggregationAccountHoldingAllUsingGetRequest($aggregation_account_id_list)\n {\n // verify the required parameter 'aggregation_account_id_list' is set\n if ($aggregation_account_id_list === null || (is_array($aggregation_account_id_list) && count($aggregation_account_id_list) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $aggregation_account_id_list when calling getAggregationAccountHoldingAllUsingGet'\n );\n }\n\n $resourcePath = '/aggregation/holding';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if (is_array($aggregation_account_id_list)) {\n $queryParams['aggregation_account_id_list'] = $aggregation_account_id_list;\n } else\n if ($aggregation_account_id_list !== null) {\n $queryParams['aggregation_account_id_list'] = ObjectSerializer::toQueryValue($aggregation_account_id_list);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getPortfolioHoldingAggAllUsingGetWithHttpInfo($account_id, $ascending = 'false', $currency_conversion = null, $end_date = null, $filter = null, $get_latest = null, $order_by = 'date', $page = '0', $size = '25', $start_date = null)\n {\n $returnType = '\\com\\hydrogen\\nucleus\\Model\\PagePortfolioHoldingAgg_';\n $request = $this->getPortfolioHoldingAggAllUsingGetRequest($account_id, $ascending, $currency_conversion, $end_date, $filter, $get_latest, $order_by, $page, $size, $start_date);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\com\\hydrogen\\nucleus\\Model\\PagePortfolioHoldingAgg_',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function getPortfolioHoldingAllUsingGetAsyncWithHttpInfo($ascending = 'false', $currency_conversion = null, $filter = null, $order_by = 'update_date', $page = '0', $size = '25')\n {\n $returnType = '\\com\\hydrogen\\nucleus\\Model\\PagePortfolioHoldingLog_';\n $request = $this->getPortfolioHoldingAllUsingGetRequest($ascending, $currency_conversion, $filter, $order_by, $page, $size);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getAggregationAccountHoldingUsingGetWithHttpInfo($aggregation_account_holding_id, $currency_conversion = null)\n {\n $returnType = '\\com\\hydrogen\\nucleus\\Model\\AggregationAccountHolding';\n $request = $this->getAggregationAccountHoldingUsingGetRequest($aggregation_account_holding_id, $currency_conversion);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\com\\hydrogen\\nucleus\\Model\\AggregationAccountHolding',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "protected function getAggregationAccountHoldingAllUsingGetRequest($ascending = 'false', $currency_conversion = null, $filter = null, $order_by = 'update_date', $page = '0', $size = '25')\n {\n\n $resourcePath = '/nucleus/v1/aggregation_account_holding';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($ascending !== null) {\n $queryParams['ascending'] = ObjectSerializer::toQueryValue($ascending);\n }\n // query params\n if ($currency_conversion !== null) {\n $queryParams['currency_conversion'] = ObjectSerializer::toQueryValue($currency_conversion);\n }\n // query params\n if ($filter !== null) {\n $queryParams['filter'] = ObjectSerializer::toQueryValue($filter);\n }\n // query params\n if ($order_by !== null) {\n $queryParams['order_by'] = ObjectSerializer::toQueryValue($order_by);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($size !== null) {\n $queryParams['size'] = ObjectSerializer::toQueryValue($size);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getAllocationAllHoldingAllUsingGetAsyncWithHttpInfo($allocation_id, $end_date = null, $start_date = null)\n {\n $returnType = '\\com\\hydrogen\\nucleus\\Model\\ModelHoldingVO[]';\n $request = $this->getAllocationAllHoldingAllUsingGetRequest($allocation_id, $end_date, $start_date);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function getAccountsWithHttpInfo()\n {\n $request = $this->getAccountsRequest();\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n switch($statusCode) {\n case 200:\n if ('\\com.blockchain.exchange.rest\\com.blockchain.exchange.rest.model\\BalanceMap' === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\com.blockchain.exchange.rest\\com.blockchain.exchange.rest.model\\BalanceMap', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\com.blockchain.exchange.rest\\com.blockchain.exchange.rest.model\\BalanceMap';\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = (string) $responseBody;\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\com.blockchain.exchange.rest\\com.blockchain.exchange.rest.model\\BalanceMap',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function listOptionHoldingsWithHttpInfo($user_id, $user_secret, $account_id, string $contentType = self::contentTypes['listOptionHoldings'][0], \\SnapTrade\\RequestOptions $requestOptions = new \\SnapTrade\\RequestOptions())\n {\n [\"request\" => $request, \"serializedBody\" => $serializedBody] = $this->listOptionHoldingsRequest($user_id, $user_secret, $account_id, $contentType);\n\n // Customization hook\n $this->beforeSendHook($request, $requestOptions, $this->config);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n if (\n ($e->getCode() == 401 || $e->getCode() == 403) &&\n !empty($this->getConfig()->getAccessToken()) &&\n $requestOptions->shouldRetryOAuth()\n ) {\n return $this->listOptionHoldingsWithHttpInfo(\n $user_id,\n $user_secret,\n $account_id,\n $contentType,\n $requestOptions->setRetryOAuth(false)\n );\n }\n\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? (string) $e->getResponse()->getBody() : null\n );\n } catch (ConnectException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n (int) $e->getCode(),\n null,\n null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n (string) $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n (string) $response->getBody()\n );\n }\n\n switch($statusCode) {\n case 200:\n if ('\\SnapTrade\\Model\\OptionsPosition[]' === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ('\\SnapTrade\\Model\\OptionsPosition[]' !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, '\\SnapTrade\\Model\\OptionsPosition[]', []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n }\n\n $returnType = '\\SnapTrade\\Model\\OptionsPosition[]';\n if ($returnType === '\\SplFileObject') {\n $content = $response->getBody(); //stream goes to serializer\n } else {\n $content = (string) $response->getBody();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\SnapTrade\\Model\\OptionsPosition[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function billingsReportUsingGETWithHttpInfo($authorization, $period = null)\n {\n $returnType = '\\mx\\wire4\\client\\model\\Billing[]';\n $request = $this->billingsReportUsingGETRequest($authorization, $period);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if (!in_array($returnType, ['string','integer','bool'])) {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\mx\\wire4\\client\\model\\Billing[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\mx\\wire4\\client\\model\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\mx\\wire4\\client\\model\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\mx\\wire4\\client\\model\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\mx\\wire4\\client\\model\\ErrorResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function holdings() {\n\t\treturn $this->_get(\"portfolio.holdings\");\n\t}", "public function getHoldings(): array;", "public function getGoalHoldingAllUsingGetAsyncWithHttpInfo($client_id, $goal_id, $ascending = 'false', $currency_conversion = null, $end_date = null, $filter = null, $order_by = 'date', $page = '0', $portfolio_goal = 'false', $size = '25', $start_date = null)\n {\n $returnType = '\\com\\hydrogen\\nucleus\\Model\\PagePortfolioHoldingAgg_';\n $request = $this->getGoalHoldingAllUsingGetRequest($client_id, $goal_id, $ascending, $currency_conversion, $end_date, $filter, $order_by, $page, $portfolio_goal, $size, $start_date);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function all()\n {\n $accounts = $this->walletAccounts()->get()\n ->tap(function ($accounts) use (&$totalAvailablePrice) {\n $totalAvailablePrice = $accounts->sum('available_price');\n })\n ->each(function ($account) use ($totalAvailablePrice) {\n $divisor = $totalAvailablePrice > 0 ? $totalAvailablePrice : 1;\n $quota = ceil(($account->available_price * 100) / $divisor);\n $account->setAttribute('available_price_quota', $quota);\n });\n\n return WalletAccountResource::collection($accounts);\n }", "public function getGoalHoldingAllUsingGet($client_id, $goal_id, $ascending = 'false', $currency_conversion = null, $end_date = null, $filter = null, $order_by = 'date', $page = '0', $portfolio_goal = 'false', $size = '25', $start_date = null)\n {\n list($response) = $this->getGoalHoldingAllUsingGetWithHttpInfo($client_id, $goal_id, $ascending, $currency_conversion, $end_date, $filter, $order_by, $page, $portfolio_goal, $size, $start_date);\n return $response;\n }", "public function getAggregationAccountHoldingUsingGetAsyncWithHttpInfo($nucleus_aggregation_account_id)\n {\n $returnType = '\\com\\hydrogen\\integration\\Model\\AggregationAccountHoldingResponseVO';\n $request = $this->getAggregationAccountHoldingUsingGetRequest($nucleus_aggregation_account_id);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get next floor number from a queue
public function getNextFloor(int $currentFloor, bool $isMoveUp): int;
[ "public function getDownNextFloor(int $currentFloor): int;", "public function get_next_puzzle_in_queue(){\r\n $next_puzzle_id = array_shift($current_queue);\r\n //Returns puzzle id right now, must be changed if need be\r\n return $next_puzzle_id\r\n }", "public function getNextQueueItem() {\n $select = db_select($this->og_controller->queue_table, 'queue');\n $select->condition('queue.processed', 0);\n $select->fields('queue', array('entity_type', 'entity_id'));\n $select->range(0, 1);\n\n if ($item = $select->execute()->fetchObject()) {\n return new Dumper_Data_QueueItem($this->og_controller->og_node->nid, $item->entity_type, $item->entity_id);\n }\n\n return FALSE;\n }", "function _hosting_queue_next_run($queue) {\n if (!is_array($queue)) {\n $queues = hosting_get_queues();\n $queue = $queues[$queue];\n }\n $freq = $queue['frequency'];\n $last = $queue['last_run'];\n $now = REQUEST_TIME;\n return max($last + $freq,\n ( $now - ( ($now - $last) % $freq ) ) + $freq );\n}", "public function findNextNumber() {\n $query = $this->retrieve(true)\n ->select('b.number + 1 as number')\n ->setMaxResults(1);\n\n $next = $this->dispatch($query, false, true);\n return isset($next['number']) ? $next['number'] : 1;\n }", "function nextNumber() {\n\tglobal $twilioNumbers;\n\tglobal $twilioIterator;\n\t\n\t// get the current number\n\t$numberToReturn = $twilioNumbers[$twilioIterator];\n\t\n\t// increase the iterator and loop if necessary\n\t$twilioIterator++;\n\tif($twilioIterator >= count($twilioNumbers)) {\n\t\t$twilioIterator = 0;\n\t}\n\t\n\treturn $numberToReturn;\n}", "function get_first_from_queue()\n\t{\n\t\treturn array_shift($this->packet_queue);\n\t}", "public function getCurrentFloor(): int;", "public function get_next_algorithm_in_queue(){\n\t\t$next_algorithm_id = array_shift($current_queue);\n\t\t//Returns algorithm id right now, must be changed if need be\n\t\treturn $next_algorithm_id\n\t}", "public function get_next_algorithm_in_queue(){\n\t\t$next_algorithm_id = array_shift($current_queue);\n\t\t//Returns algorithm id right now, must be changed if need be\n\t\treturn $next_algorithm_id;\n\t}", "function def_fetchNextTarget($num)\n{\n\tif ($num < 100) return '100';\n\t\n\t// for numbers under 1000, we'll do milestone at 100\n\tif ($num < 1000)\n\t{\n\t\t$newNum = strval($num + 100);\n\t\t$newNum = substr($newNum, 0, -2); // chop off the ones and tens\n\t\t$newNum = $newNum . \"00\"; // reset the ones and tens\n\t\treturn $newNum;\n\t}\n\t// else milestone will be at 1000\n\telse\n\t{\n\t\t$newNum = strval($num + 1000);\n\t\t$newNum = substr($newNum, 0, -3); // chop off the ones, tens, hundreds\n\t\t$newNum = $newNum . \"000\"; // reset the ones and tens\n\t\treturn $newNum;\n\t}\n}", "public function floor() : int{\n\t\treturn $this->floor;\n\t}", "protected function fetchNextQueue()\n {\n $this->queues->next();\n return $this->queues->current();\n }", "function queue_peek(&$queue) { \n // Return a copy of the value found in front of queue \n // (at the beginning of the array) \n return $queue[0]; \n}", "public function getNext() {\n\t\t$event = $this->highPriorityQueue->hasMore() ? $this->highPriorityQueue->dequeue() :\n\t\t\t\t ($this->normalPriorityQueue->hasMore() ? $this->normalPriorityQueue->dequeue() :\n\t\t\t\t ($this->lowPriorityQueue->hasMore() ? $this->lowPriorityQueue->dequeue() : null));\n\t\treturn $event;\n\t}", "public function getNextQueuedPage()\n {\n $queue = new Queued(array('scans_id'=>$this->id));\n\n if (!$queue->count()) {\n return false;\n }\n\n $queue->rewind();\n return $queue->current();\n }", "function thebrig_get_next_jailnumber() {\n\tglobal $config;\n\n\t// Set starting jail number\n\t$jailno = 1;\n\n\t$a_jails = $config['thebrig']['content'];\n\tif (false !== array_search_ex(strval($jailno), $a_jails, \"jailno\")) {\n\t\tdo {\n\t\t\t$jailno += 1; // Increase jail number until a unused one is found.\n\t\t} while (false !== array_search_ex(strval($jailno), $a_jails, \"jailno\"));\n\t}\n\treturn $jailno;\n}", "public function nextPositionNumber()\n\t{\n\t\t$tmp = 1;\n\t\tforeach ($this->db as $key=>$fields) {\n\t\t\tif ($fields['position']>$tmp) {\n\t\t\t\t$tmp = $fields['position'];\n\t\t\t}\n\t\t}\n\t\treturn ++$tmp;\n\t}", "function getNextAutoNumberedRecordId($pid){\r\n $results = $this->query(\"\r\n select record from redcap_data\r\n where project_id = $pid\r\n group by record\r\n order by cast(record as unsigned integer) desc limit 1\r\n \");\r\n $row = $results->fetch_assoc();\r\n if(empty($row)){\r\n return 1;\r\n }\r\n else{\r\n return $row['record']+1;\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to set the value of field pis_qBCProd
public function setPisQBCProd($pis_qBCProd) { $this->pis_qBCProd = $pis_qBCProd; return $this; }
[ "public function getCofinsQBCProd()\n {\n return $this->cofins_qBCProd;\n }", "public function setCofinsQBCProd($cofins_qBCProd)\n {\n $this->cofins_qBCProd = $cofins_qBCProd;\n\n return $this;\n }", "public function getPisVAliqProd()\n {\n return $this->pis_vAliqProd;\n }", "public function setDocumentProductPiscst(string $value)\n {\n $this->content->put('document_product_pis_cst', (string) $value);\n }", "public function setProductIsFree($productIsFree){\n $this->productIsFree = $productIsFree;\n}", "public function testSetBtq() {\n\n $obj = new Prospects();\n\n $obj->setBtq(\"btq\");\n $this->assertEquals(\"btq\", $obj->getBtq());\n }", "public function setQty($qty);", "public function testSetNiveauConfidentialiteQp() {\n\n $obj = new Collaborateurs();\n\n $obj->setNiveauConfidentialiteQp(\"niveauConfidentialiteQp\");\n $this->assertEquals(\"niveauConfidentialiteQp\", $obj->getNiveauConfidentialiteQp());\n }", "public function testSetActiveConfMenusQb() {\n\n $obj = new Confidentialite();\n\n $obj->setActiveConfMenusQb(true);\n $this->assertEquals(true, $obj->getActiveConfMenusQb());\n }", "public function setQuantite($q)\n {\n \t$this->getCommandeClients()->decrNombreItems($this->quantite);\n \t$this->quantite = $q; \t\n \t$this->getCommandeClients()->setNombreItems($q);\n }", "function setSyncProdWeight()\n {\n }", "public function testSetNbJourCpPris() {\n\n $obj = new Bulletins();\n\n $obj->setNbJourCpPris(10.092018);\n $this->assertEquals(10.092018, $obj->getNbJourCpPris());\n }", "private function setIsQRPlatba($isQRPlatba)\r\n {\r\n if ($isQRPlatba) {\r\n $this->QRText = 'QR Platba+F';\r\n $this->isQRPlatba = true;\r\n }\r\n else {\r\n $this->QRText = 'QR Faktura';\r\n $this->isQRPlatba = false;\r\n }\r\n }", "protected function setQty($value)\n\t{\n\t\t$this->qty = strToNumeric($value);\n\t}", "public function setQuantidade($iQuantidade){\n \t$this->iQuantidade = $iQuantidade;\n }", "public function testSetQteStockMini() {\n\n $obj = new ArtVarDepot();\n\n $obj->setQteStockMini(10.092018);\n $this->assertEquals(10.092018, $obj->getQteStockMini());\n }", "public function setProductCode($value);", "public function testSetNbJourCpAcquis() {\n\n $obj = new Bulletins();\n\n $obj->setNbJourCpAcquis(10.092018);\n $this->assertEquals(10.092018, $obj->getNbJourCpAcquis());\n }", "public function testSetActiveConfMenusQp() {\n\n $obj = new Confidentialite();\n\n $obj->setActiveConfMenusQp(true);\n $this->assertEquals(true, $obj->getActiveConfMenusQp());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method translates given name of group based on associative array 'groupMapping' in SP metadata.
protected function mapGroupName($request, $groupName) { if (isset($request["SPMetadata"]["groupMapping"]) && isset($request["SPMetadata"]["groupMapping"][$groupName])) { Logger::debug( "Mapping $groupName to " . $request["SPMetadata"]["groupMapping"][$groupName] . " for SP " . $request["SPMetadata"]["entityid"] ); return $request["SPMetadata"]["groupMapping"][$groupName]; } elseif (isset($request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR])) { Logger::debug( "GroupNamePrefix overridden by a SP " . $request["SPMetadata"]["entityid"] . " to " . $request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR] ); return $request["SPMetadata"][self::GROUPNAMEPREFIX_ATTR] . $groupName; } else { # No mapping defined, so just put groupNamePrefix in front of the group Logger::debug( "No mapping found for group $groupName for SP " . $request["SPMetadata"]["entityid"] ); return $this->groupNamePrefix . $groupName; } }
[ "function RenameGroup($oldName, $newName){}", "public function lookup_mla_group_id( $group_name ) {\n\n\t\t$managed_group_names = get_transient( 'mla_managed_group_names' );\n\n\t\tif ( ! $managed_group_names ) {\n\n\t\t\t$bp = buddypress();\n\t\t\tglobal $wpdb;\n\t\t\t$managed_group_names = array();\n\t\t\t$all_groups = $wpdb->get_results( 'SELECT * FROM ' . $bp->table_prefix . 'bp_groups' );\n\t\t\tforeach ( $all_groups as $group ) {\n\n\t\t\t\t$society_id = bp_groups_get_group_type( $group->id, true );\n\t\t\t\tif ( 'mla' === $society_id ) {\n\t\t\t\t\t$oid = groups_get_groupmeta( $group->id, 'mla_oid' );\n\t\t\t\t\tif ( ! empty( $oid ) && in_array( substr( $oid, 0, 1 ), array( 'D', 'G', 'M' ) ) ) {\n\t\t\t\t\t\t$managed_group_names[strip_tags( stripslashes( $group->name ) )] = $group->id;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tset_transient( 'mla_managed_group_names', $managed_group_names, 24 * HOUR_IN_SECONDS );\n\t\t}\n\t\treturn $managed_group_names[$group_name];\n\n\t}", "function phpbb_convert_group_name($group_name)\r\n{\r\n\t$default_groups = array(\r\n\t\t'GUESTS',\r\n\t\t'REGISTERED',\r\n\t\t'REGISTERED_COPPA',\r\n\t\t'GLOBAL_MODERATORS',\r\n\t\t'ADMINISTRATORS',\r\n\t\t'BOTS',\r\n\t);\r\n\r\n\tif (in_array(strtoupper($group_name), $default_groups))\r\n\t{\r\n\t\treturn 'phpBB2 - ' . $group_name;\r\n\t}\r\n\r\n\treturn $group_name;\r\n}", "public function setGroupName($name);", "private function getGroupYamlName($group)\n {\n return str_replace('/', '.', $group);\n }", "public function findByName($group_name);", "function SQLObject_Group($name)\n {\n $this->name = $name;\n }", "public function setDefaultGroupName(?string $group): void;", "public function createGroup($name);", "function api_phrasegroupname($phrasegroup = '')\r\n {\r\n global $ilance, $myapi;\r\n \r\n $sql = $ilance->db->query(\"\r\n SELECT description\r\n FROM \" . DB_PREFIX . \"language_phrasegroups\r\n WHERE groupname = '\" . $ilance->db->escape_string($phrasegroup) . \"'\r\n \");\r\n while ($res = $ilance->db->fetch_array($sql))\r\n {\r\n $html = stripslashes($res['description']);\r\n }\r\n \r\n return $html;\r\n }", "function update_group_name($id, $newname){\n\t$ret = GalleryEmbed::updateGroup($id, array('groupname' => $newname));\n\t\treturn $ret;\n}", "public function translateStepgroupLabel($stepgroupLabel = '%current%')\n\t{\n\t\treturn $this->getContext()->getApi('stepgroup')->translateLabel($stepgroupLabel);\n\t}", "private function translate_to_name($user, $group)\n {\n return 'x_'.$user->get_id().'_'.$group->get_id(); \n }", "function change_identity_group_name($telegram_id, $group_name = NULL) {\n $group_name_db = is_null($group_name) ? 'NULL' : \"'\" . db_escape($group_name) . \"'\";\n\n return db_perform_action(\"UPDATE `identity` SET `group_name` = {$group_name_db} WHERE `identity`.`telegram_id` = {$telegram_id}\");\n}", "private function getFilterGroupIdByName($group_name) {\n\t\t$result = $this->db->query('SELECT filter_group_id FROM `' . DB_PREFIX . 'filter_group_description` WHERE LOWER(name) = LOWER(\\'' . $this->db->escape(trim($group_name)) . '\\') AND language_id = \\'' . (int)$this->LanguageID . '\\' LIMIT 1');\n\t\tif ($result->num_rows > 0) {\n\t\t\treturn $result->row['filter_group_id'];\n\t\t} else {\n\t\t\treturn $this->addFilterGroup($group_name);\n\t\t}\n\t}", "function mapByResGroupHTML() {\n\t\t$tmp = getUserResources(array($this->restype . \"Admin\"),\n\t\t array(\"manageMapping\"), 1);\n\t\t$groups = $tmp[$this->restype];\n\t\tuasort($groups, \"sortKeepIndex\");\n\t\t$tmp = getUserResources(array($this->maptype . \"Admin\"),\n\t\t array(\"manageMapping\"), 1);\n\t\t$mapgroups = $tmp[$this->maptype];\n\t\tuasort($mapgroups, \"sortKeepIndex\");\n\t\t$h = '';\n\n\t\tif(! count($groups) || ! count($mapgroups)) {\n\t\t\t$h .= i(\"You don't have access to manage any mappings for this resource type.\");\n\t\t\treturn $h;\n\t\t}\n\n\t\t$h .= \"<div id=\\\"mapbyresgroupdiv\\\" dojoType=\\\"dijit.layout.ContentPane\\\" \";\n\t\t$h .= \"title=\\\"\" . i(\"Map By {$this->restypename} Group\") . \"\\\">\\n\";\n\t\t$h .= \"<div style=\\\"width: 390px;\\\">\\n\";\n\t\t$h .= i(\"Select an item from the drop-down box and click \\\"Get {$this->maptypename} Groups\\\" to see all of the groups it maps to. Then, select a group it does not map to and click the Add button to map it to that group, or select a group it maps to and click the Remove button to unmap it from that group.\");\n\t\t$h .= \"</div><br>\\n\";\n\t\t$h .= i(\"{$this->restypename} Group:\") . \"<select id=\\\"groups\\\">\\n\";\n\t\tforeach($groups as $id => $group)\n\t\t\t$h .= \"<option value=$id>$group</option>\\n\";\n\t\t$h .= \"</select>\\n\";\n\t\t$h .= dijitButton('', i(\"Get {$this->maptypename} Groups\"),\n\t\t \"populateLists('groups', 'inmapgroups', 'inmapgroupname', 'outmapgroupname', 'mapbyresgroupcont');\");\n\t\t$h .= \"<table><tbody><tr>\\n\";\n\t\t# select for groups mapped to\n\t\t$h .= \"<td valign=top>\\n\";\n\t\t$h .= sprintf(i(\"{$this->maptypename} Groups %s maps to:\"), \"<span style=\\\"font-weight: bold;\\\" id=\\\"inmapgroupname\\\"></span>\");\n\t\t$h .= \"<br>\\n\";\n\t\t$h .= \"<table dojoType=\\\"dojox.grid.DataGrid\\\" jsId=\\\"inmapgroups\\\" \";\n\t\t$h .= \"store=\\\"mapbyresgroupstore\\\" style=\\\"width: 240px; height: 250px;\\\" query=\\\"{inout: 1}\\\" \";\n\t\t$h .= \"selectionMode=\\\"extended\\\">\\n\";\n\t\t$h .= \"<thead>\\n\";\n\t\t$h .= \"<tr>\\n\";\n\t\t$h .= \"<th field=\\\"name\\\" width=\\\"160px\\\"></th>\\n\";\n\t\t$h .= \"</tr>\\n\";\n\t\t$h .= \"</thead>\\n\";\n\t\t$h .= \"</table>\\n\";\n\t\t$h .= \"</td>\\n\";\n\t\t# transfer buttons\n\t\t$h .= \"<td style=\\\"vertical-align: middle;\\\">\\n\";\n\t\t$h .= dijitButton('', \"<div style=\\\"width: 60px;\\\">&lt;-\" . i(\"Add\") . \"</div>\",\n\t\t \"resource.addRemItem('addmapgrpcont', 'groups', 'outmapgroups');\");\n\t\t$cdata = $this->basecdata;\n\t\t$cdata['mode'] = 'add';\n\t\t$cont = addContinuationsEntry('AJaddRemMapToGroup', $cdata);\n\t\t$h .= \"<input type=\\\"hidden\\\" id=\\\"addmapgrpcont\\\" value=\\\"$cont\\\">\\n\";\n\t\t$h .= \"<br>\\n\";\n\t\t$h .= \"<br>\\n\";\n\t\t$h .= \"<br>\\n\";\n\t\t$h .= dijitButton('', \"<div style=\\\"width: 60px;\\\">\" . i(\"Remove\") . \"-&gt;</div>\",\n\t\t \"resource.addRemItem('remmapgrpcont', 'groups', 'inmapgroups');\");\n\t\t$cdata['mode'] = 'remove';\n\t\t$cont = addContinuationsEntry('AJaddRemMapToGroup', $cdata);\n\t\t$h .= \"<input type=\\\"hidden\\\" id=\\\"remmapgrpcont\\\" value=\\\"$cont\\\">\\n\";\n\t\t$h .= \"</td>\\n\";\n\t\t# select for groups resource is not in\n\t\t$h .= \"<td valign=top>\\n\";\n\t\t$h .= sprintf(i(\"{$this->maptypename} Groups %s does not map to:\"), \"<span style=\\\"font-weight: bold;\\\" id=\\\"outmapgroupname\\\"></span>\");\n\t\t$h .= \"<br>\\n\";\n\t\t$h .= \"<table dojoType=\\\"dojox.grid.DataGrid\\\" jsId=\\\"outmapgroups\\\" \";\n\t\t$h .= \"store=\\\"mapbyresgroupstore\\\" style=\\\"width: 240px; height: 250px;\\\" query=\\\"{inout: 1}\\\" \";\n\t\t$h .= \"selectionMode=\\\"extended\\\">\\n\";\n\t\t$h .= \"<thead>\\n\";\n\t\t$h .= \"<tr>\\n\";\n\t\t$h .= \"<th field=\\\"name\\\" width=\\\"160px\\\"></th>\\n\";\n\t\t$h .= \"</tr>\\n\";\n\t\t$h .= \"</thead>\\n\";\n\t\t$h .= \"</table>\\n\";\n\t\t$h .= \"</td>\\n\";\n\t\t$h .= \"</tr></tbody></table>\\n\";\n\t\t$cdata = $this->basecdata;\n\t\t$cdata['store'] = 'mapbyresgroupstore';\n\t\t$cdata['intitle'] = 'inmapgroups';\n\t\t$cdata['outtitle'] = 'outmapgroups';\n\t\t$cont = addContinuationsEntry('jsonResourceMappingMapToGroups', $cdata);\n\t\t$h .= \"<input type=hidden id=\\\"mapbyresgroupcont\\\" value=\\\"$cont\\\">\\n\";\n\t\t$h .= \"</div>\\n\";\n\t\treturn $h;\n\t}", "public function addToGroup($groupName);", "public function updatedGroupName()\n {\n $this->validateOnly('group.name');\n $this->group->handle = Str::slug($this->group->name);\n $this->group->save();\n $this->notify(__('adminhub::notifications.collection-groups.updated'));\n }", "private function createOrUpdateGroup($sinchGroupId, $groupName)\n {\n $fullGroupName = $groupName . self::GROUP_SUFFIX;\n $this->customerGroupCount += 1;\n $magentoGroupId = $this->getConnection()->fetchOne(\n \"SELECT magento_id FROM {$this->mappingTable} WHERE sinch_id = :sinch_id\",\n [\":sinch_id\" => $sinchGroupId]\n );\n if (!empty($magentoGroupId)) {\n $group = $this->groupRepository->getById($magentoGroupId);\n if ($group->getCode() != $fullGroupName && $groupName != \"NOT LOGGED IN\") {\n $group->setCode($fullGroupName);\n $this->groupRepository->save($group);\n }\n return;\n }\n \n //Special case, map a group named \"NOT LOGGED IN\" to the default Magento group with the same name\n if ($groupName == \"NOT LOGGED IN\") {\n $this->insertMapping($sinchGroupId, 0); //0 is the Magento ID for \"NOT LOGGED IN\"\n return;\n }\n\n //Group doesn't exist, create it\n $group = $this->groupFactory->create();\n $group->setCode($fullGroupName)\n ->setTaxClassId(3); //\"Retail Customer\" magic number (set to 3 on all default customer groups)\n try {\n $group = $this->groupRepository->save($group);\n $this->insertMapping($sinchGroupId, $group->getId());\n } catch (\\Magento\\Framework\\Exception\\State\\InvalidTransitionException $e) {\n $this->log(\"Group unexpectedly exists, trying to remap it: {$groupName} ({$sinchGroupId})\");\n $criteria = $this->searchCriteriaBuilder\n ->addFilter('code', $fullGroupName, 'eq')\n ->create();\n $matchingGroups = $this->groupRepository->getList($criteria)->getItems();\n if (count($matchingGroups) > 0) {\n $this->insertMapping($sinchGroupId, $matchingGroups[0]->getId());\n return;\n }\n $this->log(\"FATAL: Unable to determine why we got InvalidTransitionException, rethrowing\");\n throw $e;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generate defined plugin files.
protected function generateFiles() { $mode = $this->option('extended') ? 'extended' : 'default'; $pluginFiles = $this->pluginFiles[$mode]; foreach ($pluginFiles as $key => $file) { $file = $this->formatContent($file); $this->files->put($this->getDestinationFile($file), $this->getStubContent($key, $mode)); } // Generate the Language files $slug = $this->data['slug']; $pluginPath = $this->getPluginPath($slug); $content ='<?php return array ( );'; $languageFolders = $this->getLanguagePaths($slug); foreach ($languageFolders as $folder) { $path = $pluginPath .$folder .DS .'messages.php'; $this->files->put($path, $content); } }
[ "public function generateFiles(): void;", "public function generateLanguageFiles();", "public function generateLanguageFiles() {}", "public function generate()\n {\n $this->createFolders();\n $this->copyFiles();\n $this->renderTemplates();\n }", "public function generate()\n {\n $config = Config::current();\n $registry = $config->registry;\n $pearDir = explode(PATH_SEPARATOR, $config->my_pear_path);\n $pearDir = $pearDir[0];\n\n $extrafiles = array();\n foreach ($this->packages as $channel => $channelInfo) {\n foreach ($channelInfo as $package => $roles) {\n foreach ($registry->toPackage($package, $channel)\n ->installcontents as $file => $info) {\n if (('php' === $info->role)\n && ($roles & static::ROLE_PHP)\n ) {\n if (strpos($file, 'php/') === 0) {\n $file = substr($file, 4);\n }\n $extrafiles['src/' . $file] = realpath(\n $pearDir . DIRECTORY_SEPARATOR .\n 'php' . DIRECTORY_SEPARATOR .$file\n );\n } elseif (defined(\n $roleConstant = get_called_class() . '\\\\' .\n 'ROLE_' . strtoupper($info->role)\n )\n && ($roles & constant($roleConstant))\n ) {\n $extrafiles[$file] = realpath(\n $pearDir . DIRECTORY_SEPARATOR . $file\n );\n }\n }\n }\n }\n\n return $extrafiles;\n }", "public static function generateLanguageFiles()\n\t{\n\t\t$phpLanguageGenerator = self::$phpFactory->create();\n\t\ttry {\n\t\t\t$phpLanguageGenerator->generateFile();\n\t\t} catch (GenerateFileException $e) {\n\t\t\techo \"An error was occurred: \" . $e->getMessage();\n\t\t}\n\n\t}", "function testGenerateWithPlugins() {\n\t\tApp::build(array(\n\t\t\t'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)\n\t\t));\n\t\t$this->Shell->params = array(\n\t\t\t'plugin' => 'TestPlugin',\n\t\t\t'connection' => 'test_suite'\n\t\t);\n\t\t$this->Shell->startup();\n\t\t$this->Shell->Schema->path = TMP . 'tests' . DS;\n\n\t\t$this->Shell->generate();\n\t\t$file = new File(TMP . 'tests' . DS . 'schema.php');\n\t\t$contents = $file->read();\n\n\t\t$this->assertPattern('/class TestPluginSchema/', $contents);\n\t\t$this->assertPattern('/var \\$posts/', $contents);\n\t\t$this->assertPattern('/var \\$auth_users/', $contents);\n\t\t$this->assertPattern('/var \\$authors/', $contents);\n\t\t$this->assertPattern('/var \\$test_plugin_comments/', $contents);\n\t\t$this->assertNoPattern('/var \\$users/', $contents);\n\t\t$this->assertNoPattern('/var \\$articles/', $contents);\n\n\t\t$file->delete();\n\t\tApp::build();\n\t}", "public function generate() {\r\n\r\n\t\t// Require necessities\r\n\t\trequire 'includes/defaults.php';\r\n\t\trequire 'includes/fields.php';\r\n\t\trequire 'includes/setup.php';\r\n\r\n\t\t// Set variables\r\n\t\t$shortcodes = Setup::shortcodes();\r\n\r\n\t\t// Generate the html\r\n\t\trequire 'generate.php';\r\n\r\n\t}", "public function generate()\n {\n $originalContent = file_get_contents($this->sourceFile);\n\n // Remove all the c-files, mentioned in config - we have only phalcon.c to compile\n $generatedContent = preg_replace(\n '/phalcon_sources=.*PHP_NEW_EXTENSION\\(phalcon,.*?\\n/s',\n \"PHP_NEW_EXTENSION(phalcon, phalcon.c, \\$ext_shared)\\n\",\n $originalContent\n );\n\n file_put_contents($this->outputFile, $generatedContent);\n }", "public function build()\n {\n\t\t$this->manifest = null;\n\n\t\t$this->write(collect(File::directories(plugin_path()))->flatMap(function($directory) {\n\t\t\t$path = $directory.'/plugin.json';\n\t\t\tif(File::exists($path)) {\n\t\t\t\t$content = json_decode(File::get($path), true);\n\t\t\t\t$content['directory'] = $directory;\n\t\t\t\treturn [$content];\n\t\t\t}\n\t\t})->filter()->all());\n\n\t\t$this->getManifest();\n }", "public function generate() {\n $this->writeMigrationInfo();\n $this->registerMigration();\n $this->writeMigrationFile();\n }", "public function generateXmlFiles()\n\t{\n\t\t// Sitemaps\n\t\t$this->generateSitemap();\n\n\t\t// HOOK: add custom jobs\n\t\tif (isset($GLOBALS['TL_HOOKS']['generateXmlFiles']) && is_array($GLOBALS['TL_HOOKS']['generateXmlFiles']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['generateXmlFiles'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->$callback[0]->$callback[1]();\n\t\t\t}\n\t\t}\n\n\t\t// Also empty the page cache so there are no links to deleted files\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Regenerated the XML files', 'Automator generateXmlFiles()', TL_CRON);\n\t}", "public function exec()\n {\n foreach(self::$generated as $generator)\n {\n $generator->generate();\n }\n }", "function generatePluginListing() {\n\n $html = $this->generateHeader('Plugins');\n\n $html .= \"<section><h1>Plugins</h1>\";\n $html .= \"<table class=\\\"propTable\\\">\";\n foreach ($this->server->getPlugins() as $plugin) {\n $info = $plugin->getPluginInfo();\n $html .= '<tr><th>' . $info['name'] . '</th>';\n $html .= '<td>' . $info['description'] . '</td>';\n $html .= '<td>';\n if (isset($info['link']) && $info['link']) {\n $html .= '<a href=\"' . $this->escapeHTML($info['link']) . '\"><span class=\"oi\" data-glyph=\"book\"></span></a>';\n }\n $html .= '</td></tr>';\n }\n $html .= \"</table>\";\n $html .= \"</section>\";\n\n /* Start of generating actions */\n\n $html .= $this->generateFooter();\n\n return $html;\n\n }", "public function generate() {\n\t\t$retour = true;\n\t\t$filePathList = array(\n\t\t\t_DIR_MODULES_BASES_.$this->_moduleName.'/index.php',\n\t\t\t_DIR_MODULES_BASES_.$this->_moduleName.'/'.strtolower($this->_moduleName).'.php',\n\t\t\t_DIR_MODULES_BASES_.$this->_moduleName.'/config/config.mod.php',\n\t\t\t_DIR_MODULES_BASES_.$this->_moduleName.'/includes/fonctions.inc.php',\n\t\t\t_DIR_MODULES_BASES_.$this->_moduleName.'/javascript/javascript_'.strtolower($this->_moduleName).'.js',\n\t\t\t_DIR_MODULES_BASES_.$this->_moduleName.'/templates/'.strtolower($this->_moduleName).'.tpl'\n\t\t);\n\t\tif ($this->generateFolders()) {\n\t\t\tforeach ($filePathList AS $filePath) {\n\t\t\t\t$retour = $this->generateFiles($filePath);\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn $retour;\n\t}", "private function _toFiles()\n {\n system(\"mkdir -p modules/\" . $this->_name);\n write_array_to_file(\"dictionary['\" . $this->_name . \"']\", $this->_vardefs, 'modules/' . $this->_name . '/vardefs.php');\n echo \"wrote modules/$this->_name/vardefs.php \\n\";\n \n file_put_contents(\"modules/\" . $this->_name . \"/\" . $this->_name . \".php\", $this->_classDef);\n echo \"wrote modules/\" . $this->_name . \"/\" . $this->_name . \".php \\n\";\n \n $this->_copyMetadataFiles();\n echo \"wrote modules/\" . $this->_name . \"/metadata directory \\n\";\n \n $this->_copyDashletFiles();\n echo \"wrote modules/\" . $this->_name . \"/Dashlets directory \\n\";\n \n system(\"cp -a include/SugarObjects/templates/\" . $this->_template_type . \"/language modules/\" . $this->_name);\n echo \"wrote modules/\" . $this->_name . \"/language directory \\n\";\n \n system(\"mkdir -p custom/Extension/application/Ext/Include/\");\n file_put_contents(\"custom/Extension/application/Ext/Include/\" . $this->_name . \".php\", $this->_includeModules);\n echo \"wrote modules/\" . $this->_name . \"/\" . $this->_name . \".php \\n\";\n \n system(\"mkdir -p custom/Extension/application/Ext/Language/\");\n foreach ($this->_includeLanguage as $lang => $contents) {\n file_put_contents(\"custom/Extension/application/Ext/Language/\" . $lang . \".\" . $this->_name . \".php\", \"<?php \\n \" . $contents);\n echo \"wrote custom/Extension/application/Ext/Language/\" . $lang . \".\" . $this->_name . \".php \\n\";\n }\n \n file_put_contents(\"modules/{$this->_name}/Menu.php\", $this->_menu);\n echo \"wrote modules/{$this->_name}/Menu.php \\n\";\n\n system(\"touch modules/\" . $this->_name . \"/Forms.php\");\n echo \"touched modules/\" . $this->_name . \"/Forms.php \\n\";\n \n echo \"you need to create custom/themes/default/images/Create\" . strtolower($this->_name) . \".gif, commander \\n\";\n echo \"you need to create custom/themes/default/images/\" . strtolower($this->_name) . \".gif, commander \\n\";\n echo \"you need to create custom/themes/default/images/icon_\" . $this->_name . \"_32.png, commander \\n\";\n echo \"you need to create custom/themes/default/images/icon_\" . strtolower($this->_name) . \"_bar_32.png, commander \\n\";\n file_put_contents(\"modules/{$this->_name}/manual_labels.txt\", var_export($this->_manual_labels, true));\n echo \"you need to insert the labels in modules/{$this->_name}/manual_labels.txt manually, commander. \\n\";\n \n }", "public function generate( $args, $assoc_args ) {\n\t\tif ( isset( $assoc_args['load-admin'] ) && ( ! defined( 'WP_ADMIN' ) || false === WP_ADMIN ) ) {\n\t\t\t$path = WP_CONTENT_DIR . '/' . basename( mergebot_schema_generator()->file_path, '.php' );\n\t\t\t\\WP_CLI::error( sprintf( 'This command must be run from inside %s', $path ) );\n\t\t}\n\n\t\tif ( isset( $assoc_args['skip'] ) ) {\n\t\t\tself::$skip = true;\n\t\t}\n\n\t\tif ( isset( $assoc_args['headless'] ) ) {\n\t\t\tself::$headless = true;\n\t\t}\n\n\t\tmergebot_schema_generator()->set_wp_data();\n\n\t\tif ( isset( $assoc_args['plugin'] ) && 'all' === $assoc_args['plugin'] ) {\n\t\t\t// Regenerate all plugin existing schemas.\n\t\t\treturn $this->generate_all( true, $assoc_args['exclude'] );\n\t\t}\n\n\t\tif ( ! isset( $assoc_args['plugin'] ) && isset( $assoc_args['all'] ) ) {\n\t\t\t// Regenerate all existing core schemas.\n\t\t\treturn $this->generate_all( false );\n\t\t}\n\n\t\t$this->generate_one( $assoc_args );\n\n\t\t// Rebuild the Plugin API JSON file\n\t\t$this->rebuild_api();\n\t}", "abstract public function generate(array $files);", "protected function setFiles($name) \n {\n // Lets start by creating the needed arrays\n // Files will contain all the files that need generating and their information\n $files = array();\n // Dir will contain all directory paths\n $dir = array('models' => app_path() . '/models');\n \n // Check to see if we are generating an entity\n if (!$this->option('no-entity'))\n {\n // Details for our entitiy\n $files[] = array(\n 'template' => 'entity.php', \n 'type' => 'entities',\n 'name' => $name . '.php',\n ); \n // And where this should be stored\n $dir['entities'] = $this->getDir('entities', Config::get('service-generator::entitiesPath', $dir['models'] . '/entities'));\n }\n \n // Check to see if we are generating a repository\n if (!$this->option('no-repo'))\n {\n // A few files to generate for our repository\n $files[] = array(\n 'template' => 'repository.php',\n 'type' => 'repos',\n 'name' => $name . 'Repository.php',\n ); \n $files[] = array(\n 'template' => 'repositoryInterface.php',\n 'type' => 'repos',\n 'name' => $name . 'Interface.php',\n ); \n $files[] = array(\n 'template' => 'repositoryServiceProvider.php',\n 'type' => 'repos',\n 'name' => $name . 'RepositoryServiceProvider.php',\n ); \n // And what directory these should go in\n $dir['repos'] = $this->getDir('repos', Config::get('service-generator::reposPath', $dir['models'] . '/repositories'));\n }\n // Check to see if we are generating a service\n if (!$this->option('no-service'))\n {\n // Another set of files just for our service\n $files[] = array(\n 'template' => 'service.php',\n 'type' => 'services',\n 'name' => $name . 'Service.php'\n ); \n $files[] = array(\n 'template' => 'serviceFacade.php',\n 'type' => 'services',\n 'name' => $name . 'Facade.php',\n ); \n $files[] = array(\n 'template' => 'serviceServiceProvider.php',\n 'type' => 'services',\n 'name' => $name . 'ServiceServiceProvider.php',\n );\n \n // And what directory these should go in\n $dir['services'] = $this->getDir('services', Config::get('service-generator::servicesPath', $dir['models'] . '/services'));\n }\n \n // Lets make these arrays available in the class\n $this->dir = $dir;\n $this->files = $files;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
buscar producto por nombre
public function buscarProductoNombre($name){ $productosNombre = Db::getInstance()->executeS("SELECT p.id_product as id, name FROM ps_product p INNER JOIN ps_product_lang pl ON p.id_product=pl.id_product where pl.id_lang=3 AND name LIKE '%$name%'"); $objs = Db::getInstance()->executeS("SELECT * FROM ps_objetivos"); //id y nombre de productos foreach ($productosNombre as $producto) { echo "<tr class='ocultarBloqueObjetivos'><td class='centrar'>".$producto['id'] ."</td><td>".$producto['name'] ."</td></tr>"; echo "<tr class='esconder'><td colspan='2'>"; echo "<ul>"; //lista de objetivos foreach($objs as $obj){ //comprobar que estan check los objetivo $produ=$producto['id']; $objeid=$obj['id_objetivo']; $checks = Db::getInstance()->executeS("SELECT * FROM ps_objetivo_producto where id_subobjetivo = 0 AND id_product= '$produ' AND id_objetivo = '$objeid'" ); $checkobjetivo=""; foreach($checks as $check){ $checkobjetivo="checked"; }; echo "<li id='".$producto['id'] ."'>".$obj['nombre_objetivo'] ."</li>"; echo "<ul>" ; //lista de subobjetivos $objs2 = Db::getInstance()->executeS("SELECT * FROM ps_subobjetivos WHERE id_objetivo='".$obj['id_objetivo'] ."'"); foreach($objs2 as $obj2){ //comprobar que estan check los objetivo $subobjeid=$obj2['id_subobjetivo']; $subchecks = Db::getInstance()->executeS("SELECT * FROM ps_objetivo_producto where id_subobjetivo ='$subobjeid' AND id_product= '$produ' AND id_objetivo = '$objeid'" ); $checksubobjetivo=""; foreach($subchecks as $subcheck){ $checksubobjetivo="checked"; }; echo "<li id='".$producto['id'] ."'><input id='".$obj2['id_subobjetivo'] ."' class='checkobjetivo' type='checkbox' name='subobjetivo' ".$checksubobjetivo." /><label for='checkbox-1'></label>".$obj2['nombre_subobjetivo'] ."</li>"; }; echo"</ul>"; }; echo"</ul>"; echo "</tr></td>"; }; }
[ "public function getProductosFiltroNombre($nombre){\n $pdo=self::getConexion();\n $sql=\"SELECT * FROM Productos WHERE nombre LIKE ? ORDER BY categoria\";\n $consulta=$pdo->prepare($sql);\n $consulta->execute([$nombre]);\n $resultado=$consulta->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n }", "public function buscar_producto1($nom_producto)\n\t\t{\n\t\t$sql = \"SELECT * FROM producto WHERE nom_producto LIKE '%$nom_producto%';\";\n\t\t$res = $this->db->query($sql);\n\t\treturn $res->result();\n\t\t}", "function buscar_productos($objeto) {\n\t// Si el objeto viene vacio(llamado desde el index) se le asigna el $_REQUEST que manda el Index\n\t// Si no conserva su valor normal\n\t\t$objeto = (empty($objeto)) ? $_REQUEST : $objeto;\n\n\t// Consulta los datos de la mesa en la DB\n\t\t$productos = $this -> comandasModel -> buscar_productos($objeto);\n\t\t\n\t\t// echo $productos;\n\n\t// Calcula el dia en numero 0-6 Domingo-Sabado\n\t\t$fecha = date('Y-m-d');\n\t\t$dia = date('w', strtotime($fecha));\n\n\t// Obtiene la hora actual\n\t\t$hora = strtotime(date('H:i'));\n\n\t// Recorre los resgitros para ordenarlos\n\t\tforeach ($productos['rows'] as $key => $value) {\n\t\t/* Impuestos del producto\n\t\t============================================================================= */\n\n\t\t\t$objeto['id'] = $value['idProducto'];\n\t\t\t$impuestos = $this -> comandasModel -> listar_impuestos($objeto);\n\t\t\tif ($impuestos['total'] > 0) {\n\t\t\t\t$impuestos_comanda = 0;\n\t\t\t\tforeach ($impuestos['rows'] as $k => $v) {\n\t\t\t\t\tif ($v[\"clave\"] == 'IEPS') {\n\t\t\t\t\t\t$producto_impuesto = $ieps = (($value['precioventa']) * $v[\"valor\"] / 100);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($ieps != 0) {\n\t\t\t\t\t\t\t$producto_impuesto = ((($value['precioventa'] + $ieps)) * $v[\"valor\"] / 100);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$producto_impuesto = (($value['precioventa']) * $v[\"valor\"] / 100);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t// Precio actualizado\n\t\t\t\t\t$productos['rows'][$key]['precioventa'] += $producto_impuesto;\n\t\t\t\t\t$productos['rows'][$key]['precioventa'] = round($productos['rows'][$key]['precioventa'], 2);\n\t\t\t\t}\n\t\t\t}\n\n\t\t/* FIN Impuestos del producto\n\t\t============================================================================= */\n\n\t\t// Valida que exista la imagen\n\t\t\tif (!empty($value['imagen'])) {\n\t\t\t\t$src = '../pos/' . $value['imagen'];\n\t\t\t\t$productos['rows'][$key]['imagen'] = (file_exists($src)) ? $src : '';\n\t\t\t} else {\n\t\t\t\t$productos['rows'][$key]['imagen'] = '';\n\t\t\t}\n\n\t\t// Consulta si se encuentra el platillo actual en el dis\n\t\t\t$busca = strpos($value['dias'], $dia);\n\n\t\t\tif (!empty($busca)) {\n\t\t\t\t$h_ini = strtotime($value['inicio']);\n\t\t\t\t$h_fin = strtotime($value['fin']);\n\n\t\t\t// Si el platillo se encuentra en el horario lo inserta al principio del array\n\t\t\t\tif ($hora >= $h_ini && $hora <= $h_fin) {\n\t\t\t\t\t$elemento = $value;\n\t\t\t\t\t$elemento['especial'] = 1;\n\t\t\t\t\tunset($productos['rows'][$key]);\n\t\t\t\t\tarray_unshift($productos['rows'], $elemento);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t// Si no existe una vista carga una por default\n\t\t$vista = (!empty($objeto['vista'])) ? $objeto['vista'] : 'vista_productos' ;\n\t\t\n\t\trequire ('views/comandas/'.$vista.'.php');\n\t}", "public function Busca_productos_de_la_nota()\n\t{\n\t\t$id_nota_de_ingreso_productos = $this -> input ->post('id_nota_de_ingreso_productos');\n\t\t$id_laboratorio = $this -> input ->post('id_laboratorio');\n\t\t\n\t\t//->cuenta los registros\n\t\t$this->db->like('id_nota_de_ingreso_productos', $id_nota_de_ingreso_productos);\n\t\t$this->db->from('nota_de_ingresos_productos');\n\t\t$data['total_productos_encontrados'] = $this->db->count_all_results(); // Produces an integer, like 17\n\t\t//->fincuenta los registros\n\t\t\n\t\t$data['cantidad_de_productos'] \t\t\t= $this -> input ->post('cantidad_de_productos');\n\t\t$data['id_nota_de_ingreso_productos'] \t= $this -> input ->post('id_nota_de_ingreso_productos');\n\t\t$data['id_laboratorio'] \t\t\t\t= $this -> input ->post('id_laboratorio');\n\t\t$data['titulo'] \t\t\t\t\t\t= \"PRODUCTOS DE LA NOTA\";\n\t\t$data['busca_productos_de_la_nota'] \t= $this -> Modelo_ingreso_productos -> Busca_productos_de_la_nota($id_nota_de_ingreso_productos);\n\t\t$data['busca_productos_del_laboratorio'] = $this -> Modelo_ingreso_productos -> Busca_productos_del_laboratorio($id_laboratorio);\n\t\t$this -> load -> view('nota_ingreso/producto/lista_productos',$data);\n\t}", "function listar_productos($objeto) {\n\t\t$sql = \"SELECT\n\t\t\t\t\tid, nombre\n\t\t\t\tFROM\n\t\t\t\t\tapp_productos\";\n\t\t// return $sql;\n\t\t$result = $this -> queryArray($sql);\n\t\t\n\t\treturn $result;\n\t}", "public function getNombreProducto()\n {\n return $this->nombreProducto;\n }", "public function getProductos(){\n $pdo=self::getConexion();\n $sql=\"SELECT * FROM Productos ORDER BY nombre\";\n $consulta=$pdo->query($sql);\n $productos=$consulta->fetchAll(PDO::FETCH_ASSOC);\n return $productos;\n }", "public function getNombreProducto()\r\n {\r\n return $this->nombreProducto;\r\n }", "public function getNombreProducto()\n {\n return $this->nombreProducto;\n }", "function get_productNames(){\n\t\tglobal $pdo;\n\n\t\t$sql = \"SELECT id, nombre, precio from producto\";\n\n\t\t$statement = $pdo->prepare($sql);\n\n\t\t$statement->execute();\n\t\t$results=$statement->fetchAll();\n\n\t\treturn $results;\n\t}", "public static function getNombresProductos(){\n $nombres = DB::table('producto')->select('nombre')->get();\n \n return $nombres;\n }", "public function ctlBuscaProductosNuez($prod){\n\n\t\t$respuesta = Datos::mdlProductosNuez(\"productos\");\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\tif ($item[\"codProducto\"] == $prod ){\n\t\t\t\techo '<option value=\"'.$item[\"codProducto\"].'\" selected>'.$item[\"nombre\"].'</option>';\n\t\t\t}\n\t\t\telse{\n\t\t\t\techo '<option value=\"'.$item[\"codProducto\"].'\">'.$item[\"nombre\"].'</option>';\n\t\t\t}\n\t\t}\n\t}", "public function SearchProducto($name)\n\t{\n\t\t$encontrar=Producto::where('nombre', 'like', '%'. $name.'%');\n\n\t\treturn array('r'=>$name);\n\n\t}", "public function cargar_productos() {\r\n\t\t\t$productos = $this->sql->cargar_filas_tabla ('productos', 'id_producto');\r\n\t\t\tforeach($productos as $producto) {\r\n\t\t\t\t$p = new Producto(\r\n\t\t\t\t\tintval($producto['id_producto']),\r\n\t\t\t\t\t$producto['nombre'],\r\n\t\t\t\t\tfloatval($producto['precio_actual']),\r\n\t\t\t\t\tintval($producto['stock']),\r\n\t\t\t\t\t$producto['imagen'],\r\n\t\t\t\t\t$producto['descripcion']\r\n\t\t\t\t);\r\n\t\t\t\tarray_push(self::$productos, $p);\r\n\t\t\t}\r\n }", "function list_cartes($name_entite = '') {\n $lst_item_set = [];\n $query_items_set = [\n 'item_set_id'=>$this->default_collection, // Entite relation\n ];\n $items_set = $this->api->search('items',$query_items_set,['limit'=>0])->getContent();\n \n if (count($items_set) > 0) {\n foreach ($items_set as $i_s) {\n if ( ! empty($name_entite)) {\n $result_carte = $this->getCarteInfo1($i_s);\n \n // check exist name of entite\n foreach ($result_carte['nodes'] as $arr) {\n $pos = strpos($arr['label'], $result_carte['title']);\n if ($pos !== false) { // was found\n // couper chaine\n $str_cut = substr($arr['label'], strlen($result_carte['title'])+1, strlen($arr['label'])); \n if ($str_cut == \"$name_entite\") {\n // couper nom si long\n $str_nom = $i_s->title();\n if (strlen($str_nom) > 30) {\n $str_nom = substr($str_nom, 0, 30) . '...';\n }\n $lst_item_set[$i_s->id()] = $str_nom;\n $this->default_carte = $i_s->id();\n\n break;\n }\n }\n }\n } else {\n // couper nom si long\n $str_nom = $i_s->title();\n if (strlen($str_nom) > 30) {\n $str_nom = substr($str_nom, 0, 30) . '...';\n }\n $lst_item_set[$i_s->id()] = $str_nom;\n $this->default_carte = $i_s->id();\n }\n }\n asort($lst_item_set);\n }\n return $lst_item_set;\n }", "public function listar_productos_carrito() {\n \n try {\n $sql = \"\n select \n p.descripcion,\n i.cantidad,\n i.precio_venta,\n e.importe_total,\n p.id_producto\n from \n al_producto p inner join al_inventario i\n on\n p.id_producto = i.id_producto inner join pedido e\n on\n i.id_pedido = e.id_pedido \n where\n e.id_cliente = '$_SESSION[cliente_id]' and e.estado is null; \n \";\n $sentencia = $this->dblink->prepare($sql);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll(PDO::FETCH_ASSOC);\n return $resultado;\n } catch (Exception $exc) {\n throw $exc;\n }\n }", "public function getProductos() {\r\n //obtenemos la informacion de la bdd:\r\n $pdo = Database::connect();\r\n $sql = \"select * from producto order by nombre\";\r\n $resultado = $pdo->query($sql);\r\n //transformamos los registros en objetos:\r\n $listado = array();\r\n foreach ($resultado as $res) {\r\n $producto = new Producto($res['id_producto'], $res['nombre'], $res['precio'], $res['porcentaje_iva']);\r\n array_push($listado, $producto);\r\n }\r\n Database::disconnect();\r\n //retornamos el listado resultante:\r\n return $listado;\r\n }", "function productoModeloByName($nombre) {\n\t\ttry {\n\t\t\tif (!$this->PermisosComponent->puedeAcceder('productos', 'productoModelo'))\n\t\t\t\tthrow new ForbiddenException('No tiene permiso para acceder a esta página'); \n\n\t\t\t$res = $this->Productos->getProductoModeloPorNombre($nombre); \n\t\t\tif($res['success']) \n\t\t\t\techo $this->json('', $res['producto']);\n\t\t\telse \n\t\t\t\tthrow new BadRequestException($res['msg']); \n\t\t} catch (Exception $e) {\t\n\t\t\t\techo $this->json( $e->getMsg(), $e->getData(), $e->getSatusCode() );\n\t\t}\t\n\t}", "public function produtoCaract(){\n\n $caracteristica = Caracteristica::find(1);\n $produtos = $caracteristica->produtos;\n\n echo \"Caracteristia: $caracteristica->nome<br>\";\n foreach ($produtos as $produto){\n echo \"$produto->nome , \";\n }\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make mass update of nodes, changing all nodes in the $nodes array to update them with the field values in $updates. IMPORTANT NOTE: This function is intended to work when called from a form submit handler. Calling it outside of the form submission process may not work correctly.
function node_mass_update($nodes, $updates) { // We use batch processing to prevent timeout when updating a large number // of nodes. if (count($nodes) > 10) { $batch = array( 'operations' => array( array('_node_mass_update_batch_process', array($nodes, $updates)) ), 'finished' => '_node_mass_update_batch_finished', 'title' => t('Processing'), // We use a single multi-pass operation, so the default // 'Remaining x of y operations' message will be confusing here. 'progress_message' => '', 'error_message' => t('The update has encountered an error.'), // The operations do not live in the .module file, so we need to // tell the batch engine which file to load before calling them. 'file' => drupal_get_path('module', 'node') .'/node.admin.inc', ); batch_set($batch); } else { foreach ($nodes as $nid) { _node_mass_update_helper($nid, $updates); } drupal_set_message(t('The update has been performed.')); } }
[ "function _node_mass_update_helper($nid, $updates) {\n $node = node_load($nid, NULL, TRUE);\n foreach ($updates as $name => $value) {\n $node->$name = $value;\n }\n node_save($node);\n return $node;\n}", "function _node_mass_update_batch_process($nodes, $updates, &$context) {\n if (!isset($context['sandbox']['progress'])) {\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['max'] = count($nodes);\n $context['sandbox']['nodes'] = $nodes;\n }\n\n // Process nodes by groups of 5.\n $count = min(5, count($context['sandbox']['nodes']));\n for ($i = 1; $i <= $count; $i++) {\n // For each nid, load the node, reset the values, and save it.\n $nid = array_shift($context['sandbox']['nodes']);\n $node = _node_mass_update_helper($nid, $updates);\n\n // Store result for post-processing in the finished callback.\n $context['results'][] = l($node->title, 'node/'. $node->nid);\n\n // Update our progress information.\n $context['sandbox']['progress']++;\n }\n\n // Inform the batch engine that we are not finished,\n // and provide an estimation of the completion level we reached.\n if ($context['sandbox']['progress'] != $context['sandbox']['max']) {\n $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];\n }\n}", "function _node_mass_update_batch_process(array $nodes, array $updates, $langcode, $load, $revisions, &$context) {\n if (!isset($context['sandbox']['progress'])) {\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['max'] = count($nodes);\n $context['sandbox']['nodes'] = $nodes;\n }\n\n // Process nodes by groups of 5.\n $storage = \\Drupal::entityTypeManager()->getStorage('node');\n $count = min(5, count($context['sandbox']['nodes']));\n for ($i = 1; $i <= $count; $i++) {\n // For each nid, load the node, reset the values, and save it.\n $node = array_shift($context['sandbox']['nodes']);\n if ($load) {\n $node = $revisions ?\n $storage->loadRevision($node) : $storage->load($node);\n }\n $node = _node_mass_update_helper($node, $updates, $langcode);\n\n // Store result for post-processing in the finished callback.\n $context['results'][] = Link::fromTextAndUrl($node->label(), $node->toUrl())->toString();\n\n // Update our progress information.\n $context['sandbox']['progress']++;\n }\n\n // Inform the batch engine that we are not finished,\n // and provide an estimation of the completion level we reached.\n if ($context['sandbox']['progress'] != $context['sandbox']['max']) {\n $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];\n }\n}", "public function update()\n {\n $this->updateNodeData();\n\n // execute the main action of this controller\n $this->perform();\n }", "abstract protected function update(Node $node);", "public function updateReferencesNode() {\n // counts references in the mm table for all ips and then updates the field 'node'.\n // this should be called every time ips are manipulated from the node object.\n // this is ugly, but i didn't find another way. If you happen to know one: please tell me!\n\n $ips = $this->findAll();\n\n foreach ($ips as $key => $ip) {\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n 'uid',\n 'tx_nodedb_node_ipnode_mm',\n 'uid_foreign=' . $ip->getUid()\n );\n $rowsCount = $result->num_rows;\n\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n 'tx_nodedb_domain_model_ip4',\n 'uid=' . $ip->getUid(),\n array('node' => $rowsCount)\n );\n\n }\n }", "function notifications_manage_subscriptions_mass_update($subscriptions, $updates) {\n foreach ($subscriptions as $id) {\n _notifications_subscriptions_mass_update_helper($id, $updates);\n }\n drupal_set_message(t('The update has been performed.'));\n}", "function wikicompare_update_cache_users($nodes) {\n\n $parent_ids = array();\n $nids = array();\n foreach ($nodes as $node) {\n if (isset($node['parent_id'])) {\n $parent_ids[$node['parent_id']] = $node['parent_id'];\n }\n $nids[$node['nid']] = $node['nid'];\n }\n\n //Users from parent field are only filled by this function, so we flush it before rebuild it.\n db_delete('field_data_wikicompare_user_from_parent_ids')\n ->condition('entity_id', $nids, 'in')\n ->execute();\n db_delete('field_revision_wikicompare_user_from_parent_ids')\n ->condition('entity_id', $nids, 'in')\n ->execute();\n\n //We can only get users from parent node if there is a parent node.\n if (!empty($parent_ids)) {\n //Get the users of the parent node.\n $users = wikicompare_test_access_node('get_users', $parent_ids);\n\n //The table we want to update is a Drupal table, so we need to give his required fields.\n $to_insert = array();\n foreach ($nodes as $node) {\n if (isset($node['parent_id'])) {\n if (isset($users[$node['parent_id']])) {\n foreach ($users[$node['parent_id']] as $user) {\n $field = $user;\n $field['entity_id'] = $node['nid'];\n $field['revision_id'] = $node['vid'];\n $to_insert[] = $field;\n }\n }\n }\n }\n\n if (!empty($to_insert)) {\n //Insert the users from parents in the tables.\n $query = db_insert('field_data_wikicompare_user_from_parent_ids')->fields(array('entity_type', 'bundle', 'deleted', 'entity_id', 'revision_id', 'language', 'delta', 'wikicompare_user_from_parent_ids_target_id'));\n foreach ($to_insert as $insert) {\n $query->values($insert);\n }\n $query->execute();\n $query = db_insert('field_revision_wikicompare_user_from_parent_ids')->fields(array('entity_type', 'bundle', 'deleted', 'entity_id', 'revision_id', 'language', 'delta', 'wikicompare_user_from_parent_ids_target_id'));\n foreach ($to_insert as $insert) {\n $query->values($insert);\n }\n $query->execute();\n }\n }\n\n //Find all children of the updated node, and launch the recursive function to update them.\n $children = array();\n $query = db_select('node', 'n');\n $query->addField('n', 'nid', 'nid');\n $query->addField('n', 'vid', 'vid');\n $query->addField('f', 'wikicompare_parent_id_target_id', 'parent_id');\n $query->leftjoin('field_revision_wikicompare_parent_id', 'f', 'n.vid = f.revision_id');\n $query->condition('f.wikicompare_parent_id_target_id', $nids, 'in');\n $result = $query->execute();\n foreach ($result as $record) {\n $children[$record->nid]['nid'] = $record->nid;\n $children[$record->nid]['vid'] = $record->vid;\n $children[$record->nid]['parent_id'] = $record->parent_id;\n }\n\n if (!empty($children)) {\n //Launch the recursive function.\n wikicompare_update_cache_users($children);\n }\n\n}", "public function update_post_nodes($post_id)\r\n\t{\r\n\t\t$selected_nodes = $this->input->post('prev_nodes', TRUE);\r\n\t $selected_nodes = json_decode($selected_nodes, true);\r\n\t $schedule_post = $this->input->post('schedule_post');\r\n\r\n\t $current_server_time = date('Y-m-d H:i:s');\r\n\t $server_timezone = date_default_timezone_get();\r\n\t date_default_timezone_set($this->session->userdata('time_zone'));\r\n\t $server_zone = new DateTimeZone($server_timezone);\t \r\n\t $master_time = new DateTime($this->input->post('schedule_time', TRUE));\r\n\t $master_time->setTimezone($server_zone);\r\n\t $master_time = $master_time->format('Y-m-d H:i:s');\r\n\r\n\t foreach ($selected_nodes as $key => $page)\r\n\t {\r\n\t \tif($page['schedule'])\r\n\t \t{\r\n\t \t\tif($page['time'])\r\n\t \t\t{\r\n\t \t\t\t$schedule_time = new DateTime($page['time']);\r\n\t\t\t \t$schedule_time->setTimezone($server_zone);\r\n\t\t\t \t$schedule_time = $schedule_time->format('Y-m-d H:i:s');\r\n\t \t\t}else\r\n\t \t\t\t$schedule_time = $master_time;\r\n\t \t}else\r\n\t \t\t$schedule_time = $current_server_time;\r\n\t\t\t$record = array(\r\n\t\t\t'post_datetime' => $schedule_time,\r\n\t\t\t'post_schedule' => $page['schedule']\r\n\t\t\t);\r\n\t\t\t$this->db->where('post_to_nodes_id', $page['post_to_nodes_id']);\r\n\t\t\t$this->db->update('post_to_nodes', $record);\r\n\t }\r\n\r\n\t date_default_timezone_set($server_timezone);\r\n\t}", "function fusion_apply_ui_mass_update($skins, $updates) {\n // We use batch processing to prevent timeout when updating a large number\n // of skins.\n if (count($skins) > 10) {\n $batch = array(\n 'operations' => array(\n array('_fusion_apply_ui_mass_update_batch_process', array($skins, $updates))\n ),\n 'finished' => '_fusion_apply_ui_mass_update_batch_finished',\n 'title' => t('Processing'),\n // We use a single multi-pass operation, so the default\n // 'Remaining x of y operations' message will be confusing here.\n 'progress_message' => '',\n 'error_message' => t('The update has encountered an error.'),\n // The operations do not live in the .module file, so we need to\n // tell the batch engine which file to load before calling them.\n 'file' => drupal_get_path('module', 'fusion_apply_ui') . '/fusion_apply_ui.admin.inc',\n );\n batch_set($batch);\n }\n else {\n foreach ($skins as $sid) {\n _fusion_apply_ui_mass_update_helper($sid, $updates);\n }\n drupal_set_message(t('The update has been performed.'));\n }\n}", "function apachesolr_index_nodeapi_mass_delete(array $nodes, $table = NULL) {\n if (empty($nodes)) {\n return TRUE;\n }\n if (empty($table)) {\n $table = apachesolr_get_indexer_table('node');\n }\n\n if (apachesolr_environment_variable_get(apachesolr_default_environment(), 'apachesolr_read_only', APACHESOLR_READ_WRITE) == APACHESOLR_READ_ONLY) {\n watchdog('Apache Solr', 'Trying to update the Solr index while the environment %env_id is read-only in function %function', array('%function' => __FUNCTION__, '%env_id' => apachesolr_default_environment()), WATCHDOG_WARNING);\n return FALSE;\n }\n\n $ids = array();\n $nids = array();\n foreach ($nodes as $node) {\n $ids[] = apachesolr_document_id($node->nid);\n $nids[] = $node->nid;\n }\n try {\n $env_id = apachesolr_default_environment();\n $solr = apachesolr_get_solr($env_id);\n $solr->deleteByMultipleIds($ids);\n apachesolr_set_last_index_updated($env_id, REQUEST_TIME);\n // There was no exception, so update the table.\n db_delete($table)\n ->condition('entity_id', $nids, 'IN')\n ->execute();\n return TRUE;\n }\n catch (Exception $e) {\n watchdog('Apache Solr', nl2br(check_plain($e->getMessage())), NULL, WATCHDOG_ERROR);\n return FALSE;\n }\n}", "public function update_node($update_data = null, $node_id = null)\n\t{\n\t\tif ($node_id != null AND $update_data != null)\n\t\t{\n\t\t\t$the_node = Mango::factory('Mango_Node', array('_id' => (string) $node_id))->load();//load the single node\n\t\t\tforeach ($update_data as $update_key => $update_data)//make sure both $scenario_id and $update_data are set\n\t\t\t{\n\t\t\t\t$the_node->$update_key = $update_data;//set the node's data to the updated data\n\t\t\t}\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$the_node->check(); // check that the node conforms to the mango model\n\t\t\t}\n\t\t\tcatch (Mango_Validation_Exception $e)\n\t\t\t{\n\t\t\t\t$this->errors = $e->array->errors('node'); // return errors if it does not conform to the mango model\n\t\t\t\treturn $this;//return the scenario object\n\t\t\t}\n\t\t\t$the_node->update();//update the node in the db\n\t\t\t$this->data = $the_node->as_array(false);//set the data var with the updated node array\n\t\t\treturn $this;//return the scenario object\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$this->errors = array('bad_data' => 'The provided data is no good.');//set the error messages\n\t\t\treturn $this;//return the scenario object\n\t\t}\n\t}", "function node_admin_nodes_submit($form, &$form_state) {\n $operations = module_invoke_all('node_operations');\n $operation = $operations[$form_state['values']['operation']];\n // Filter out unchecked nodes\n $nodes = array_filter($form_state['values']['nodes']);\n if ($function = $operation['callback']) {\n // Add in callback arguments if present.\n if (isset($operation['callback arguments'])) {\n $args = array_merge(array($nodes), $operation['callback arguments']);\n }\n else {\n $args = array($nodes);\n }\n call_user_func_array($function, $args);\n\n cache_clear_all();\n }\n else {\n // We need to rebuild the form to go to a second step. For example, to\n // show the confirmation form for the deletion of nodes.\n $form_state['rebuild'] = TRUE;\n }\n}", "public function update()\n {\n if($this->controllerVar['use_translation'] == 1)\n {\n $get_trans_reference = $this->httpRequest->getParameter('chose_translation_node', 'post', 'digits');\n if(false !== $get_trans_reference)\n {\n $this->model->session->set('id_node_translate', $this->current_id_node);\n $this->router->redirect($this->viewVar['adminWebController'].'/mod/navigation');\n }\n }\n\n $this->updateNodeData();\n\n // execute the main action of this controller\n $this->perform();\n }", "function taxonomy_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('taxonomy_term_data', 'td');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('taxonomy/term/', td.tid) = ua.source\");\n $query->addField('td', 'tid');\n $query->isNull('ua.source');\n $query->condition('td.tid', $context['sandbox']['current'], '>');\n // Exclude the forums terms.\n if ($forum_vid = 'forums') {\n $query->condition('td.vid', $forum_vid, '<>');\n }\n $query->orderBy('td.tid');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'taxonomy_term');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $tids = $query->execute()->fetchCol();\n\n pathauto_taxonomy_term_update_alias_multiple($tids, 'bulkupdate');\n $context['sandbox']['count'] += count($tids);\n $context['sandbox']['current'] = max($tids);\n $context['message'] = t('Updated alias for term @tid.', array('@tid' => end($tids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "function _kolab_lead_mass_update_batch_process($leads, $updates, &$context) {\n if (!isset($context['sandbox']['progress'])) {\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['max'] = count($leads);\n $context['sandbox']['leads'] = $leads;\n }\n\n // Process leads by groups of 5.\n $count = min(5, count($context['sandbox']['leads']));\n for ($i = 1; $i <= $count; $i++) {\n // For each nid, load the lead, reset the values, and save it.\n $lid = array_shift($context['sandbox']['leads']);\n $lead = _kolab_lead_mass_update_helper($lid, $updates);\n\n // Store result for post-processing in the finished callback.\n $context['results'][] = l($lead->first_name . ' ' . $lead->surname . '\\'s lead', 'lead/' . $lead->lid);\n\n // Update our progress information.\n $context['sandbox']['progress']++;\n }\n\n // Inform the batch engine that we are not finished,\n // and provide an estimation of the completion level we reached.\n if ($context['sandbox']['progress'] != $context['sandbox']['max']) {\n $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];\n }\n}", "public function search_update_children() {\n if (!mod_forumng::search_installed()) {\n return;\n }\n // If the in-memory post object isn't already part of a full\n // discussion...\n if (!is_array($this->children)) {\n // ...then get one\n $discussion = mod_forumng_discussion::get_from_id(\n $this->discussion->get_id(),\n $this->get_forum()->get_course_module_id());\n $post = $discussion->get_root_post()->find_child($this->get_id());\n // Do this update on the new discussion\n $post->search_update_children();\n return;\n }\n\n // Loop through all children\n foreach ($this->children as $child) {\n // Update its search fields\n $child->search_update();\n\n // Recurse\n $child->search_update_children();\n }\n }", "public function update()\n {\n if (!Mage::getSingleton('admin/session')->isLoggedIn()) {\n return;\n }\n\n /** @var Mage_Core_Model_Config_Element $feeds */\n $feeds = Mage::getConfig()->getNode('global/evozon/adminnotification/feeds');\n\n foreach ($feeds->children() as $child) {\n\n /** @var Evozon_Base_Model_AdminNotification_Feed $feed */\n $feed = Mage::getModel('evozon_base/adminNotification_feed', $child->asArray());\n\n /** @var Evozon_Base_Model_AdminNotification_Feed_Parse $parse */\n $parse = Mage::getModel('evozon_base/adminNotification_feed_parse', $feed);\n $parse->update();\n }\n }", "public function update(array $updates)\n {\n $this->_data = array_merge($this->_data, $updates);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the live mode. Defined as true if live keys were used in the request. Defined as false if test keys were used in the request.
private function setLiveMode($liveMode) { $this->liveMode = $liveMode; }
[ "public function isLive()\n {\n return config('przelewy24.mode', 'sandbox') === 'live';\n }", "public function isLiveMode()\n {\n return $this->getConfigFlag('live_mode');\n }", "public function getLiveMode() {\n return $this->liveMode;\n }", "public function isLive()\n {\n return 'live' == $this->getMode();\n }", "public function checkLiveTestMode() {\n\t\tif(!ZAMP_LIVE_TEST_MODE)\n\t\t\treturn;\n\t\t\n\t\t$block_test_mode_access = true;\n\t\t\n\t\tif($accessKey = $this->_request->get('zamp_live_test_mode_access_key')) {\n\t\t\t$host = preg_replace('/^www\\./i', '', $this->_request->server('HTTP_HOST'));\n\t\t\t\n\t\t\t$cookieInfo = session_get_cookie_params();\n\t\t\t\n\t\t\tif($accessKey == ZAMP_LIVE_TEST_MODE_ACCESS_KEY) {\n\t\t\t\tsetcookie('zamp_live_test_mode_key', ZAMP_LIVE_TEST_MODE_ACCESS_KEY, time() + 86400, '/', '.'.$host, $cookieInfo['secure'], $cookieInfo['httponly']);\n\t\t\t\t\n\t\t\t\t$block_test_mode_access = false;\n\t\t\t}\n\t\t\telseif($accessKey == 'stop') {\n\t\t\t\tsetcookie('zamp_live_test_mode_key', '', time() - 86400, '/', '.'.$host, $cookieInfo['secure'], $cookieInfo['httponly']);\n\t\t\t\t$block_test_mode_access = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$liveTestModeKey = $this->_request->cookie('zamp_live_test_mode_key');\n\t\t\n\t\tif(\n\t\t\t(\n\t\t\t\tempty($liveTestModeKey)\n\t\t\t\t\t||\n\t\t\t\t($liveTestModeKey != ZAMP_LIVE_TEST_MODE_ACCESS_KEY)\n\t\t\t)\n\t\t\t\t&&\n\t\t\t$block_test_mode_access\n\t\t) {\n\t\t\tZamp_General::setHeader(503);\n\t\t\theader('Retry-After: 3600');\n\t\t\t\n\t\t\tif(SET_ZAMP_HEADER)\n\t\t\t\theader(\"X-Powered-By: Zamp PHP/\".ZAMP_VERSION);\n\t\t\t\n\t\t\tif(isset($this->_view)) {\n\t\t\t\t$errorFile = 'zamp_live_test_mode'.$this->_view->_view_template_extension;\n\t\t\t\tif(file_exists($errorFilePath = _APPLICATION_CORE_.'view/'.$this->_config['viewTemplate']['template_name'].'/'.$errorFile) or file_exists($errorFilePath = _APPLICATION_CORE_.'view/default/'.$errorFile)) {\n\t\t\t\t\t$errorFilePath = 'file:'.preg_replace('@(\\\\\\|/{2,})@', '/', realpath($errorFilePath));\n\t\t\t\t\t$this->_view->display($errorFilePath);\n\t\t\t\t\tcleanExit();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$fileName = _PROJECT_PATH_.\"Zamp/Exception/template/zamp_live_test_mode.html.php\";\n\t\t\trequire_once $fileName;\n\t\t\tcleanExit();\n\t\t}\n\t}", "protected function isLiveStripeKey()\n {\n return substr($this->stripeClient->getApiKey(), 3, 4) === 'live';\n }", "public function isLive() : bool\n {\n return $this->live;\n }", "public function isLive()\n {\n return $this->live;\n }", "function isLive() {\n \treturn $this->getStatusID() == LIVE;\n }", "function isLive(){ return $_ENV['CURRENT_ENVIRONMENT'] == ENVIRONMENT_LIVE; }", "function isLive() {\r\n\t\tif(preg_match('/experiments.dev|localhost/', $_SERVER['SERVER_NAME'])) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "function switchToLive(){ $_ENV['CURRENT_ENVIRONMENT'] = ENVIRONMENT_LIVE; }", "public function isLive() {\r\n\t\treturn $this->_life === self::STATE_LIVE;\r\n\t}", "public function setAllowPrivateLiveFlag($value)\n {\n return $this->set(self::ALLOWPRIVATELIVEFLAG_, $value);\n }", "public function live()\n {\n return env('PAYPAL_MODE') == 'live';\n }", "public function isLiveRequest()\n {\n if (! isset($this->_isLiveRequest)) {\n $request = Yii::$app->request;\n $this->_isLiveRequest = $request instanceof Request && $request->isLiveUsed();\n }\n\n return $this->_isLiveRequest;\n }", "protected function isFromSyncToLive(): bool\n {\n $bool = $this->option('live');\n\n return ! empty($bool) ? true : false;\n }", "public function getIsLive(): bool\n {\n /** @var WebApplication|ConsoleApplication $this */\n if (is_bool($on = $this->getConfig()->getGeneral()->isSystemLive)) {\n return $on;\n }\n\n return (bool)$this->getProjectConfig()->get('system.live');\n }", "public function isLivePreview()\n\t{\n\t\treturn craft()->request->isLivePreview();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Bind the current texture
public function bind() { glBindTexture(GL_TEXTURE_2D, $this->id); }
[ "function BeginTextureMode(\\raylib\\RenderTexture $target): void { }", "function SetTextureWrap(\\raylib\\Texture $texture, int $wrap): void { }", "function DrawTextureEx(\\raylib\\Texture $texture, \\raylib\\Vector2 $position, float $rotation, float $scale, \\raylib\\Color $tint): void { }", "public function textureImage (Imagick $texture_wand) {}", "function DrawTextureV(\\raylib\\Texture $texture, \\raylib\\Vector2 $position, \\raylib\\Color $tint): void { }", "function glBindBufferBase(int $target, int $index, int $buffer) : void {}", "function DrawTexturePro(\\raylib\\Texture $texture, \\raylib\\Rectangle $source, \\raylib\\Rectangle $dest, \\raylib\\Vector2 $origin, float $rotation, \\raylib\\Color $tint): void { }", "public function texture($value)\n {\n return $this->addLightroomFilter(LightroomEffect::TEXTURE, $value, EffectRange::DEFAULT_RANGE);\n }", "function EndTextureMode(): void { }", "function glFramebufferRenderbuffer(int $target, int $attachment, int $renderbuffertarget, int $renderbuffer) : void {}", "public function bind()\n {\n $this->binding = true;\n }", "function glCopyTexSubImage2D(int $target, int $level, int $xoffset, int $yoffset, int $x, int $y, int $width, int $height) : void {}", "function BeginBlendMode(int $mode): void { }", "function glCopyTexImage2D(int $target, int $level, int $internalformat, int $x, int $y, int $width, int $height, int $border) : void {}", "function glUniformBlockBinding(int $program, int $uniformBlockIndex, int $uniformBlockBinding) : void {}", "public function createTexture($model, $name, $textureSrcPath) {\n try {\n $stmt = $this->db->prepare('INSERT INTO texture \n (model, name, texture_src_path)\n VALUES (:model, :name, :textureSrcPath)');\n $stmt->execute([\n 'model' => $model,\n 'name' => $name,\n 'textureSrcPath' => $textureSrcPath\n ]);\n } catch(PDOException $e) {\n print new Exception($e->getMessage());\n }\n }", "public static function glTexParameterf(int $target, int $pname, float $param)\n {\n\n }", "public static function glGenRenderbuffer()\n {\n\n }", "function IsTextureReady(\\raylib\\Texture $texture): bool { return false; }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return a list of tinyMCE config files in this system.
public function getConfigFiles() { $arrConfigs = array(); $arrFiles = scan(TL_ROOT . '/system/config/'); foreach ($arrFiles as $file) { if (substr($file, 0, 4) == 'tiny') { $arrConfigs[] = basename($file, '.php'); } } return $arrConfigs; }
[ "public function getConfigFiles()\n {\n return Finder::create()\n ->files()\n ->in(ASSELY_FRAMEWORK_DIR.'config')\n ->name('*.php');\n }", "public function getList()\n {\n\n $this->finder = new ConfigFinder;\n $locator = $this->grav['locator'];\n $this->configLookup = $locator->findResources('config://');\n $this->blueprintLookup = $locator->findResources('blueprints://config');\n $this->pluginLookup = $locator->findResources('plugins://');\n\n $config = $this->finder->locateConfigFiles($this->configLookup, $this->pluginLookup);\n return $config;\n }", "protected function _getAllConfigFiles()\n {\n return array(\n ENGINEBLOCK_FOLDER_APPLICATION . self::CONFIG_FILE_DEFAULT,\n self::CONFIG_FILE_ENVIORNMENT,\n );\n }", "public function luminaryConfigs() :array\n {\n return $this->getConfigFiles(\n base_path('config')\n );\n }", "public function getConfigs()\n {\n $configs = [];\n\n foreach ($this->getConfigFiles() as $file) {\n $name = basename($file->getFilename(), '.php');\n\n $values = require $file->getRealPath();\n\n $configs[$name] = $values;\n }\n\n return $configs;\n }", "public static function configLists()\n\t{\n\t\treturn array(\n\t\t\t'contentsCss',\n\t\t\t'templates_files'\n\t\t);\n\t}", "protected function getConfigurationFiles(): array\n {\n $configPath = $this->rootPath . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR;\n\n $files = [];\n foreach (scandir($configPath) as $file) {\n if (fnmatch('*.php', $file)) {\n $files[basename($file, '.php')] = $configPath . $file;\n }\n }\n\n return $files;\n }", "protected function getConfigurationFiles()\n\t{\n\t\t$files = [];\n\t\t\n\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t$configPath = realpath($this->app->configPath());\n\t\t\n\t\tforeach (Finder::create()->files()->name('*.php')->in($configPath) as $file) {\n\t\t\t$nesting = $this->getConfigurationNesting($file, $configPath);\n\t\t\t\n\t\t\t$files[ $nesting . basename($file->getRealPath(), '.php') ] = $file->getRealPath();\n\t\t}\n\t\t\n\t\treturn $files;\n\t}", "public static function getList()\n {\n $list = array('pi' => __('Pi Default Editor'));\n $iterator = new \\DirectoryIterator(Pi::path('usr') . '/editor');\n foreach ($iterator as $fileinfo) {\n if (!$fileinfo->isDir() || $fileinfo->isDot()) {\n continue;\n }\n $name = $fileinfo->getFilename();\n if (preg_match('/[^a-z0-9_]/i', $name)) {\n continue;\n }\n $configFile = $fileinfo->getPathname() . '/config.php';\n if (!file_exists($configFile)) {\n $list[$name] = $name;\n continue;\n }\n $info = include $configFile;\n if (!empty($info['disable'])) continue;\n if (!empty($info['name'])) {\n $list[$name] = $info['name'];\n }\n }\n\n return $list;\n }", "protected function getConfigurationFiles()\n {\n $files = [];\n $path = $this->laravel->configPath();\n $found = Finder::create()->files()->name('*.php')->depth('== 0')->in($path);\n\n foreach ($found as $file) {\n $files[] = basename($file->getRealPath(), '.php');\n }\n\n return $files;\n }", "public function configFiles()\n {\n return $this->morphMany(ConfigFile::class, 'targetable');\n }", "public static function getTranslationFiles()\n {\n return array_keys(static::config());\n }", "public function getConfigTemplates(){\n\n $dir = DIR_CONFIG.'d_visual_designer_template/';\n if(is_dir($dir)){\n $files = scandir($dir);\n }\n else{\n $files = array();\n }\n\n $template_data = array();\n\n foreach($files as $file){\n if(strlen($file) > 1 && strpos( $file, '.php')){\n $_ = array();\n\n $results = array();\n\n require($dir.$file);\n\n $results = array_merge($results, $_);\n\n $templates = $results['d_visual_designer_templates'];\n foreach ($templates as $template) {\n $template_data[] = array(\n 'template_id' => $template['template_id'],\n 'content' => $template['content'],\n 'config' => substr($file, 0, -4),\n 'image' => $template['image'],\n 'category' => $template['category'],\n 'sort_order' => $template['sort_order'],\n 'name' => $template['name']\n );\n }\n }\n }\n return $template_data;\n }", "public function getConfigs() : array\n {\n return $this->configs;\n }", "public function getPathsToConfigFiles()\n {\n return $this->_attributes['pathsToConfigFiles'];\n }", "public function getSettingFiles() {\n $aOut = array();\n foreach ($this->getBasePaths('setting') as $aPaths) {\n foreach ($aPaths as $aInfo) {\n $aOut[] = $aInfo['path'];\n }\n }\n return $aOut;\n }", "public function collectConfigFiles()\n {\n $files = [];\n\n // Load config.yaml.dist as latest - this way the fallback config options are defined\n $files[] = $this->pathProvider->getCliToolPath() . '/config.yaml.dist';\n\n $extensionPath = $this->pathProvider->getExtensionPath();\n $files = \\array_merge($files, $this->iterateVendors($extensionPath));\n $files = \\array_merge($files, $this->iterateVendors(__DIR__ . '/Extensions'));\n\n // Load user file first. Its config values cannot be overwritten\n $userConfig = $this->pathProvider->getConfigPath() . '/config.yaml';\n if (\\file_exists($userConfig)) {\n $files[] = $userConfig;\n }\n\n return $files;\n }", "public function collectConfigFiles()\n {\n $files = [];\n\n // Load config.yaml.dist as latest - this way the fallback config options are defined\n $files[] = $this->pathProvider->getCliToolPath() . '/config.yaml.dist';\n\n $extensionPath = $this->pathProvider->getExtensionPath();\n $files = array_merge($files, $this->iterateVendors($extensionPath));\n $files = array_merge($files, $this->iterateVendors(__DIR__ . '/Extensions'));\n\n // Load user file first. Its config values cannot be overwritten\n $userConfig = $this->pathProvider->getConfigPath() . '/config.yaml';\n if (file_exists($userConfig)) {\n $files[] = $userConfig;\n }\n\n return $files;\n }", "public static function getConfigurations(){\n\t\t\t$configurations_array = parse_ini_file(\"s_configs.ini.php\", true);\n\t\t\treturn $configurations_array;\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get product_code Product Code
public function getProduct_code () { $preValue = $this->preGetValue("product_code"); if($preValue !== null && !\Pimcore::inAdmin()) { return $preValue; } $data = $this->product_code; return $data; }
[ "public function getProductCode();", "public function getProductCode() \n {\n return $this->_fields['ProductCode']['FieldValue'];\n }", "public function getProductCode()\n {\n return $this->product_code;\n }", "public function getProductCode()\n {\n return $this->productCode;\n }", "public function getProductCode()\n {\n return $this->productCode;\n \n }", "public function getProductCode()\n {\n if (array_key_exists(\"productCode\", $this->_propDict)) {\n return $this->_propDict[\"productCode\"];\n } else {\n return null;\n }\n }", "public function getProductCode() {\n return $this->productCode;\n }", "function getProductCode()\n {\n return $this->productCode;\n }", "public function getCode()\n {\n return $this->getOriginalInstance()->ProductCode;\n }", "public function getCode()\n\t{\n\t\treturn $this->getProductCode();\n\t}", "public function getCode() : string\n {\n return $this->get( 'product.code', '' );\n }", "public function getProductCode()\n {\n $pl = 0;\n $n = count($this->getVariants());\n $l = strlen($this->getVariants()->first()->getProductCode());\n while ($pl < $l) {\n $c = $this->getVariants()->first()->getProductCode()[$pl];\n for ($i=1; $i<$n; $i++) {\n if ($this->getVariants()[$i] && $this->getVariants()[$i]->getProductCode()[$pl] !== $c) break 2;\n }\n $pl++;\n }\n $productCode = substr($this->getVariants()->first()->getProductCode(), 0, $pl);\n\n if($productCode === '')\n {\n return $this->getVariants()->first()->getProductCode();\n } else {\n return $productCode;\n }\n }", "public function getProductByCode($ProductCode);", "function admin_getProductCodeById($id=Null){\n\t\t\n\t\tApp::import('Model', 'Product');\n\t\t$this->Product = new Product;\n\t\t$prodArr = $this->Product->find('first' , array(\n\t\t'conditions' => array('Product.id' => $id ),\n\t\t'fields' => array('Product.quick_code')\n\t\t));\n\t\treturn $prodArr['Product']['quick_code'];\n\t}", "public function getPlannableProductCode()\n {\n return isset($this->plannable_product_code) ? $this->plannable_product_code : '';\n }", "public function getLocalProductCode(): ?string\n {\n return $this->localProductCode;\n }", "public function setProductCode($value);", "public function testProductCodeGetter(): void\n {\n $this->assertSame('R01', $this->product->getProductCode());\n }", "public function getProductCodes()\n {\n $codes = array();\n\n foreach ($this->_products as $code => $count) {\n $codes = array_merge($codes, array_fill(0, $count, $code));\n }\n\n return implode(', ', $codes);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get recently done orders
public static function getRecentDoneOrders() { return Order::fullActive() ->where('state', '=', '3') ->orderBy('date', 'desc') ->take(10) ->get(); }
[ "public function getHistoricOrders() {\n $orders = $this\n ->owner\n ->Orders()\n ->filter(array(\n \"Status\" => array(\"dispatched\",\"canceled\")\n ));\n\n return $orders;\n }", "public static function get_dispatched_orders(){\n\t$query=Doctrine_Query::create()->select(\"*\")->from(\"ordertbl\")->where(\"orderStatus='dispatched'\")->OrderBy('id desc');\n\t$order=$query->execute();\n\treturn $order;\t\n\t}", "function getOrders() {\n\t\t$orders = Mage::getModel ( 'sales/order' )->getCollection ()->addAttributeToSelect ( \"*\" )->addAttributeToFilter ( 'status', array ('complete') );\n\t\t$orders_data = $this->preapreOrdersTosend ( $orders );\n\t\treturn $orders_data;\n\t}", "public function getTodayOrders()\n {\n if (! $this->query) {\n $this->getQueryOrders();\n }\n\n $currentDate = date('Y-m-d 00:00:01');\n\n return $orders = $this->query\n ->where(['>', 'date_orders', $currentDate])\n ->all();\n }", "public function ordersDone()\n {\n return $this->hasMany('App\\Model\\Sell\\Order')->onlyTrashed();\n }", "public function getRecentOrdersProperty()\n {\n return Order::withCount(['lines'])\n ->orderBy('placed_at', 'desc')\n ->take(6)\n ->get();\n }", "public function getRecurringOrders();", "function getTodaysPendingOrder($storeId = null) {\n if (!$storeId) {\n $storeId = $_SESSION['admin_store_id'];\n }\n if ($storeId) {\n App::import('Model', 'Order');\n $this->Order = new Order();\n $current_date = date(\"Y-m-d\", (strtotime($this->storeTimeZone('', date('Y-m-d H:i:s')))));\n $totalorders = $this->Order->getTodaysPendingOrder($storeId, $current_date);\n return $totalorders;\n }\n }", "public function getLastOrder();", "private function getLatestOrders()\n {\n return Order::select([\n 'id',\n 'customer_first_name',\n 'customer_last_name',\n 'total',\n 'status',\n 'created_at',\n ])\n ->latest()\n ->take(5)\n ->get();\n }", "public function getOrders()\n {\n return $this->orders;\n }", "public static function get_pending_orders(){\n\t\t$query=Doctrine_Query::create()->select(\"*\")->from(\"ordertbl\")->where(\"orderStatus='pending'\")->OrderBy(\"id desc\");\n\t\t$order=$query->execute();\n\t\treturn $order;\t\n\t}", "public function getOrder();", "public function fetchToday()\n {\n return $this->order\n ->where(DB::raw('DATE(updated_at)'), '>=', Carbon::now()->startOfDay())\n ->get();\n }", "public static function getThisMonthOrders()\n {\n return Order::whereMonth('created_at', '=', date('m'))->get();\n }", "public static function completedOrdersProvider(){\n //TODO: this doesn't seem to work - maybe we should be mocking these?\n //the tests themselves pass when passed a correct order object.\n $orders = Order::find()->isCompleted(1)->orderBy('dateOrdered')->limit(3);\n return array(\n array(1),\n array(3),\n array(5)\n );\n return [\n [$orders[0]],\n [$orders[1]],\n [$orders[2]],\n ];\n }", "public function getMentorPendingOrders()\n\t{\n\t\t$resourceid = $this->_dbConnection->selectFromTableDesc(\"OrdersTable\", \"Status\", \"MentorPending\", \"NumericDateSubmitted\");\n\t\t$orders = $this->_dbConnection->formatQuery($resourceid);\n\t\t//return json_encode($orders);\n\t\treturn $orders;\n\t}", "static function getLastOrder();", "public function get_last_order()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Renders the page content for a certain page ID.
function render_content($pageId) { echo t('content') . " $pageId"; }
[ "abstract protected function render_page_content(): void;", "private function renderById(){\n if(!isset($this->id)) {\n return abort(404);\n }\n\n Entity::setPage(Page::find($this->id));\n Entity::Menu()->setCurrentPage(Entity::Page());\n\n return $this->renderPage(Entity::Page());\n }", "public function render() {\n\t\t$this->render_page_content();\n\t}", "abstract function render_page();", "function page($id) {\n\t$app = Dingo::instance();\n\t$app->output_set('Current page id is ' . $id);\n}", "function showPageContent() {}", "public function render_content() \n {\n\n echo '<div class=\"mbpro-page-content\">';\n\n if( ! empty($this->tabs) ) \n {\n $active = $this->active_tab();\n\n $this->render_tab_content( $active );\n }\n else\n {\n $this->render_page_content();\n }\n\n echo '</div>';\n\n\n }", "public function render($id);", "abstract protected function RenderContent();", "function page()\r\n\t{\r\n\t\t//Load dynamic page content\r\n\t\t$content =& model::create('content');\r\n\t\tif(ctype_digit($this->params['url_params']))\r\n\t\t\t$content->find($this->params['url_params']);\r\n\t\telse\r\n\t\t\t$content->find_by_field('url_name',$this->params['url_params']);\r\n\t\t\r\n\t\tif($content->id == null)\r\n\t\t\t$content->find(ERROR_404_CONTENT_ID);\r\n\t\t\t\r\n\t\t$this->template_data['content'] = $content->fields_as_associative_array();\t\r\n\t\r\n\t\t$this->breadcrumb[] = array('page/'.$content->url_name => $content->title);\r\n\t}", "public function web_page_by_id(){\n\t\t$postData = $this->request->input('json_decode',true);\n\t\t$this->WebPage->tablePrefix = $postData['tablePrefix'];\n\t\t$this->WebPage->WebPageDetail->tablePrefix = $postData['tablePrefix'];\n\t\t$data = $this->WebPage->find('first',array(\n\t\t\t'conditions'=>array(\n\t\t\t\t'slug' => $postData['slug']\n\t\t\t)\n\t\t));\n\t\t$this->set(\n\t\t\t\tarray(\n\t\t\t\t\t'_serialize',\n\t\t\t\t\t'data' => array('singlePage'=>$data),\n\t\t\t\t\t'_jsonp' => true\n\t\t\t\t)\n\t\t);\n\t\t$this->render('data_layout');\n\t}", "public function render_page(){\n $p_a_k = self::$page_action_key;\n $e_p_k = self::$edit_page_action;\n $i_k = self::$ids_key;\n if(!empty($_GET[$p_a_k]) && $_GET[$p_a_k] === $e_p_k && !empty($_GET[$i_k])){\n return $this->edit_item_page->render();\n }\n $this->main_inventory_page->render();\n self::render_admin_notices();\n }", "public function renderPageId() {\n if($this->wire('adminTheme')->modestaPageId == 1 && $this->wire('user')->isSuperuser()) {\n if($this->wire('input')->get->id == \"\") {\n $id = $this->wire('page')->id;\n } else {\n $id = $this->wire('input')->get->id;\n }\n $out = \"<div class='id'>ID: <span>\" . $id .\"</span></div>\";\n return $out;\n }\n\t}", "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BMGBookToolBundle:Page')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Page entity.');\n }\n\n\n\n return $this->render('BMGBookToolBundle:Page:show.html.twig', array(\n 'entity' => $entity,\n\n ));\n }", "abstract public function renderChild(Page $page);", "public function renderPageByURL() {\n\n\t}", "public function buildContent(Context $context, Page $page);", "private function mainContent(){\r\n if ($this->model->showPage){\r\n $this-> beginMainContent();\r\n $this-> middleMainContent();\r\n $this-> endMainContent();\r\n }\r\n else {\r\n $this->htmlElement('p', 'Page['.$this->model->page.'] not found', 'text-center lead text-danger');\r\n }\r\n }", "public static function pageContent()\n\t{ \n\t\t$posts = TimelinePost::all();\n\t\trequire_once( 'templates/admin_timeline.php' );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets subscription plan variations field.
public function unsetSubscriptionPlanVariations(): self { $this->instance->unsetSubscriptionPlanVariations(); return $this; }
[ "public function unsetSubscriptionPlanVariations(): void\n {\n $this->subscriptionPlanVariations = [];\n }", "public function unsetSubscriptionPlanId(): void\n {\n $this->subscriptionPlanId = [];\n }", "public function clearLocalizationVariants()\n {\n $this->collLocalizationVariants = null; // important to set this to NULL since that means it is uninitialized\n }", "public function unsetServiceVariationId(): void\n {\n $this->serviceVariationId = [];\n }", "public function unsetSku(): void\n {\n $this->sku = [];\n }", "public function unsubscribe()\n {\n echo \"<br>\";\n echo \"Action: Cancelling Subscription !\";\n unset($this->plan);\n unset($this->server);\n unset($this->serverList);\n\n }", "public function removeVariations()\n {\n if (isset($_POST['variation_ids'])) {\n $IDS = (array) $_POST['variation_ids'];\n\n foreach ($IDS as $ID) {\n Variation::deleteRelatedVariation($ID);\n }\n }\n }", "private function resetSkus()\n {\n foreach ($this->options as $op=>$junk) {\n if (preg_match('#SellerSKUList#', $op)) {\n unset($this->options[$op]);\n }\n }\n }", "public function clearPeriodicPlans()\n {\n $this->collPeriodicPlans = null; // important to set this to NULL since that means it is uninitialized\n }", "function unsubscribe()\n {\n echo \"Success: '\" . $this->plan->getPlanName() . \"' subscription removed\\n\";\n $this->plan = null;\n }", "public static function remove_variations() {\n\n\t\tif ( isset( $_POST['variation_id'] ) ) { // removing single variation\n\n\t\t\tcheck_ajax_referer( 'delete-variation', 'security' );\n\t\t\t$variation_ids = array( $_POST['variation_id'] );\n\n\t\t} else { // removing multiple variations\n\n\t\t\tcheck_ajax_referer( 'delete-variations', 'security' );\n\t\t\t$variation_ids = (array) $_POST['variation_ids'];\n\n\t\t}\n\n\t\tforeach ( $variation_ids as $index => $variation_id ) {\n\n\t\t\t$variation_post = get_post( $variation_id );\n\n\t\t\tif ( $variation_post && $variation_post->post_type == 'product_variation' ) {\n\n\t\t\t\t$variation_product = wc_get_product( $variation_id );\n\n\t\t\t\tif ( $variation_product && $variation_product->is_type( 'subscription_variation' ) ) {\n\n\t\t\t\t\twp_trash_post( $variation_id );\n\n\t\t\t\t\t// Prevent WooCommerce deleting the variation\n\t\t\t\t\tif ( isset( $_POST['variation_id'] ) ) {\n\t\t\t\t\t\tdie();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tunset( $_POST['variation_ids'][ $index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function unsetSubscriptionPlanId(): self\n {\n $this->instance->unsetSubscriptionPlanId();\n return $this;\n }", "public function clearProductovariantes()\n {\n $this->collProductovariantes = null; // important to set this to null since that means it is uninitialized\n $this->collProductovariantesPartial = null;\n\n return $this;\n }", "public function unsetSublocality(): void\n {\n $this->sublocality = [];\n }", "public function unsetQuantityDenominator(): void\n {\n $this->quantityDenominator = [];\n }", "public function unsetNewPlanVariationId(): self\n {\n $this->instance->unsetNewPlanVariationId();\n return $this;\n }", "public function clearChoicesFromSession(){\r\n\t\t$_SESSION['order']['customizations'] = null;\r\n\t}", "public function clear_part_payment_plans_cache() {\n\t\t/**\n\t\t * List all available countries for Svea and clear cache\n\t\t * for all of them\n\t\t */\n\t\t$available_countries = array( \"SE\", \"DK\", \"NO\", \"FI\", \"DE\", \"NL\" );\n\n\t\tforeach( $available_countries as $country ) {\n\t\t\t/**\n\t\t\t * Delete the transient to clear out the cache\n\t\t\t */\n\t\t\tdelete_transient( sprintf( self::PART_PAYMENT_TRANSIENT_FORMAT, $country ) );\n\t\t}\n\t}", "public function unsubscribe($plan)\n {\n $subscriptions = $this->subscriptions()\n ->wherePlan($plan)\n ->whereNotNull('ends_at')\n ->orderBy('ends_at', 'desc')\n ->get();\n foreach ($subscriptions as $subscription) {\n if (!$subscription->isActive()) {\n continue;\n }\n $processor = $this->getProcessor();\n $processor->cancelOrder($subscription->order_id);\n $subscription->status = 'cancelled';\n $subscription->save();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the setTelPerso() method.
public function testSetTelPerso() { $obj = new Collaborateurs(); $obj->setTelPerso("telPerso"); $this->assertEquals("telPerso", $obj->getTelPerso()); }
[ "public function testSetTelPoste() {\n\n $obj = new Collaborateurs();\n\n $obj->setTelPoste(\"telPoste\");\n $this->assertEquals(\"telPoste\", $obj->getTelPoste());\n }", "public function setTelefono($Tel){\r\n\t $this->tel = $Tel;\r\n\t}", "public function testSetPortablePerso() {\n\n $obj = new Collaborateurs();\n\n $obj->setPortablePerso(\"portablePerso\");\n $this->assertEquals(\"portablePerso\", $obj->getPortablePerso());\n }", "public function testSetTelepaiement() {\n\n $obj = new Organismes();\n\n $obj->setTelepaiement(true);\n $this->assertEquals(true, $obj->getTelepaiement());\n }", "public function testSetFlagTel() {\n\n $obj = new RepertoireCol();\n\n $obj->setFlagTel(\"flagTel\");\n $this->assertEquals(\"flagTel\", $obj->getFlagTel());\n }", "public function testSetEtblTel() {\n\n $obj = new AttestationExtras();\n\n $obj->setEtblTel(\"etblTel\");\n $this->assertEquals(\"etblTel\", $obj->getEtblTel());\n }", "function setMemberTel($memberTel){\n $this->memberTel = $memberTel; \n }", "function setTelefono($Telefono) {\r\n $this->Telefono = $Telefono;\r\n }", "public function testSetTel1() {\n\n $obj = new VisiteMedicaleEntete();\n\n $obj->setTel1(\"tel1\");\n $this->assertEquals(\"tel1\", $obj->getTel1());\n }", "function setTelefono($telefono) {\n $this->telefono = $telefono;\n }", "public function testSetTel1() {\n\n $obj = new Intervenants();\n\n $obj->setTel1(\"tel1\");\n $this->assertEquals(\"tel1\", $obj->getTel1());\n }", "public function testSetTel3() {\n\n $obj = new RepertoireCol();\n\n $obj->setTel3(\"tel3\");\n $this->assertEquals(\"tel3\", $obj->getTel3());\n }", "public function setTel($tel)\r\n {\r\n $this->tel = $tel;\r\n }", "public function setTelefono($telefono){\n \t$this->telefono = $telefono;\n\t}", "public function testSetEtblTel() {\n\n $obj = new AttestationAt();\n\n $obj->setEtblTel(\"etblTel\");\n $this->assertEquals(\"etblTel\", $obj->getEtblTel());\n }", "public function setTelefono($telefono) {\n \t$this->telefono = $telefono;\n }", "public function testSetLieuTel() {\n\n $obj = new ActionsCoManif();\n\n $obj->setLieuTel(\"lieuTel\");\n $this->assertEquals(\"lieuTel\", $obj->getLieuTel());\n }", "public function testSetEtblTel() {\n\n $obj = new AttestationCacm();\n\n $obj->setEtblTel(\"etblTel\");\n $this->assertEquals(\"etblTel\", $obj->getEtblTel());\n }", "public function setEmpresa_p_tel($empresa_p_tel){\n $this->Empresa_p_tel = $empresa_p_tel;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Perform a Websocket Handshake $user the user object associated with this request. $headers array of the headers sent by the user for purposes of performing the handshake
function dohandshake(WsUser $user,$headers);
[ "function dohandshake(WsUser $user,$headers) {\n\t\t// Get the key sent from the client\n\t\t$strkey1 = $headers['Sec-WebSocket-Key'];\n\t\t// Append the Magic ID\n\t\t$keyPlusMagic = $strkey1 . \"258EAFA5-E914-47DA-95CA-C5AB0DC85B11\";\n\n\t\t// Get the raw sha1 then encode it\n\t\t$shaAcceptKey = sha1($keyPlusMagic, true);\n\t\t$socketAccept = base64_encode($shaAcceptKey);\n\n\t\t// Grab the rest of the headers needed\n\t\tif(isset($headers['Origin']))\n\t\t\t$origin = $headers['Origin'];\n\t\tif(isset($headers[\"Sec-WebSocket-Origin\"]))\n\t\t\t$origin = $headers[\"Sec-WebSocket-Origin\"];\n\t\t$host = $headers['Host'];\n\t\t$status = $headers['status'];\n\t\t$statusFields = explode(' ', $status);\n\t\t$resource = $statusFields[1];\n\t\tif(isset($headers['Sec-WebSocket-Protocol'])) {\n\t\t\t$app = $headers['Sec-WebSocket-Protocol'];\n\t\t\tif(is_array($app)) {\n\t\t\t\t// @TODO - should find the first matching APP\n\t\t\t\t// Just use the first specified for now\n\t\t\t\t$app = $app[0];\n\t\t\t}\n\t\t} else\n\t\t\t$app = getAppID($resource);\n\t\t$user->setAppID($app);\n\n\t\tif(isset($headers['Sec-WebSocket-Extensions'])) {\n\t\t\t$exts = explode(',', $headers['Sec-WebSocket-Extensions']);\n\t\t}\n\n\n\n\t\t// Now create the upgrade response\n\t\t$upgrade = \"HTTP/1.1 101 Switching Protocols\\r\\n\" .\n\t \"Upgrade: WebSocket\\r\\n\" .\n\t \"Connection: Upgrade\\r\\n\" .\n\t \"Sec-WebSocket-Version: 8\\r\\n\";\n\t\tif(isset($origin)) {\n\t\t\t$upgrade .= \"Sec-WebSocket-Origin: \" . $origin . \"\\r\\n\";\n\t\t}\n if(isset($headers['Sec-WebSocket-Protocol'])) {\n \t$upgrade = $upgrade.\"Sec-WebSocket-Protocol: \". $app . \"\\r\\n\";\n }\n\n\n\t\tif(isset($headers['Sec-WebSocket-Extensions'])) {\n\t\t\t//@TODO - need to process the Extensions and figure out what is supported\n\t\t\t//$upgrade = $upgrade.\"Sec-WebSocket-Extensions: \". $exts[0] . \"\\r\\n\";\n\t\t}\n\t $upgrade = $upgrade.\"Sec-WebSocket-Accept: \" . $socketAccept . \"\\r\\n\" .\n\t \"\\r\\n\";\n\n\n\t\t//socket_write($user->socket(),$upgrade.chr(0),strlen($upgrade.chr(0)));\n\t\tsocket_write($user->socket(),$upgrade,strlen($upgrade));\n\t\t$user->setHandshakeDone();\n\t\t$user->setProtocol(new ProtocolHyBi());\n\t\treturn;\n\t}", "function handshake($request,$conn){\n\t\t\t\n\t\t\tpreg_match('/(?<=GET \\/\\?ouser_id=)([0-9]*)/',$request,$matches);\n\n\t\t\t// 1.\tExtract the ouser from the connection request\n\t\t\t$ouser = new stdClass();\n\t\t\tif( !empty($matches) ){\n\t\t\t\t$ouser_id = $matches[0];\n\t\t\t\t$ouser = $this->route('/obray/OUsers/get/?ouser_id='.$ouser_id)->getFirst();\n\t\t\t\t$ouser->subscriptions = array( \"all\" => 1 );\n\t\t\t\t$ouser->connection = new stdClass();\n\t\t\t}\n\n\t\t\t// 2.\tExtract header information from request\n\t\t\t$lines = explode(\"\\r\\n\",$request);\n\t\t\t$headers = array();\n\t\t\tforeach($lines as $line){\n\t\t\t\t$line = chop($line);\n\t\t\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', $line, $matches)){ \n\t\t\t\t\t$headers[$matches[1]] = $matches[2]; \n\t\t\t\t\t$ouser->connection->{$matches[1]} = $matches[2];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 3.\tPrepare/send response\t\t\t\n\t\t\t$secKey = $headers['Sec-WebSocket-Key'];\n\t\t\t$secAccept = base64_encode(pack('H*', sha1($secKey . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11')));\n\t\t\t//hand shaking header\n\t\t\t$upgrade = \"HTTP/1.1 101 Web Socket Protocol Handshake\\r\\n\" .\n\t\t\t\"Upgrade: websocket\\r\\n\" .\n\t\t\t\"Connection: Upgrade\\r\\n\" .\n\t\t\t\"WebSocket-Origin: $this->host\\r\\n\" .\n\t\t\t\"WebSocket-Location: ws://$this->host:$this->port/demo/shout.php\\r\\n\".\n\t\t\t\"Sec-WebSocket-Accept:$secAccept\\r\\n\\r\\n\";\n\t\t\tsocket_write($conn,$upgrade,strlen($upgrade));\n\n\t\t\treturn $ouser;\n\n\t\t}", "protected function send($user, $message)\n\t{\n\t\tif ( $user->handshake ) \n\t\t{\n\t\t\t$message = $this->frame($message,$user);\n\t\t\t$result = @socket_write($user->socket, $message, strlen($message));\n\t\t}\n\t\telse \n\t\t{\n\t\t// User has not yet performed their handshake.Store for sending later.\n\n\t\t\t$holdingMessage = array('user' => $user, 'message' => $message);\n\t\t\t$this->heldMessages[] = $holdingMessage;\n\t\t}\n\t}", "public function userWebsocket($params)\n {\n $this->_makeWebsocketRequest('USER', $params);\n }", "function doHandshake($received_header,$client_socket_resource, $host_name, $port)\r\n\t{\r\n\t\t$headers = array();\r\n\t\t$lines = preg_split(\"/\\r\\n/\", $received_header);\r\n\t\tforeach($lines as $line)\r\n\t\t{\r\n\t\t\t$line = chop($line);\r\n\t\t\tif(preg_match('/\\A(\\S+): (.*)\\z/', $line, $matches))\r\n\t\t\t{\r\n\t\t\t\t$headers[$matches[1]] = $matches[2];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$secKey = $headers['Sec-WebSocket-Key'];\r\n\t\t$secAccept = base64_encode(pack('H*', sha1($secKey . '258EAFA5-E914-47DA-95CA-C5AB0DC85B11')));\r\n\t\t$buffer = \"HTTP/1.1 101 Web Socket Protocol Handshake\\r\\n\" .\r\n\t\t\"Upgrade: websocket\\r\\n\" .\r\n\t\t\"Connection: Upgrade\\r\\n\" .\r\n\t\t\"WebSocket-Origin: $host_name\\r\\n\" .\r\n\t\t\"WebSocket-Location: ws://$host_name:$port/SpiceServer\\r\\n\".\r\n\t\t\"Sec-WebSocket-Accept:$secAccept\\r\\n\\r\\n\";\r\n\t\tsocket_write($client_socket_resource,$buffer,strlen($buffer));\r\n\t}", "public function onConnect(WebSocketTransportInterface $user){\n foreach($this->getConnections() as $client){\n $client->sendString(\"User {$user->getId()} joined the chat: \");\n }\n }", "protected function _sendHandshake($connectionId, $headers) \n {\n\t$this->console(\"Getting client WebSocket version...\");\n\tif(preg_match(\"/Sec-WebSocket-Version: (.*)\\r\\n/\", $headers, $match)) $version = $match[1];\n\telse \n\t{\n\t $this->console(\"The client doesn't support WebSocket\");\n\t return false;\n\t}\n\t\t\n\t$this->console(\"Client WebSocket version is {$version}, (required: 13)\");\n\tif($version == 13) \n\t{\n\t // Extract header variables\n\t if(preg_match(\"/GET (.*) HTTP/\", $headers, $match))\t $root = $match[1];\n\t if(preg_match(\"/Host: (.*)\\r\\n/\", $headers, $match)) $host = $match[1];\n\t if(preg_match(\"/Origin: (.*)\\r\\n/\", $headers, $match)) $origin = $match[1];\n\t \n\t if(preg_match(\"/Sec-WebSocket-Key: (.*)\\r\\n/\", $headers, $match)) $key = $match[1];\n\t\t\t\n\t $this->console(\"Client headers are:\");\n\t $this->console(\"\\t- Root: \".$root);\n\t $this->console(\"\\t- Host: \".$host);\n\t $this->console(\"\\t- Origin: \".$origin);\n\t $this->console(\"\\t- Sec-WebSocket-Key: \".$key);\n\t\t\t\n\t //$this->console(\"Generating Sec-WebSocket-Accept key...\");\n\t $acceptKey = base64_encode(pack('H*', sha1($key. '258EAFA5-E914-47DA-95CA-C5AB0DC85B11')));\n\t \n\t // setting up new response headers\n\t \n\t $upgrade = array(\n\t\t'HTTP/1.1 101 WebSocket Protocol Handshake',\n\t\t'Upgrade: websocket',\n\t\t'Connection: Upgrade',\n\t\t'WebSocket-Origin: '.$origin,\n\t\t'WebSocket-Location: ws://'.$host.$root,\n\t\t'Sec-WebSocket-Accept: '.$acceptKey\n\t );\n\t $upgrade = implode(\"\\r\\n\", $upgrade).\"\\r\\n\\r\\n\";\n\n\t //$this->console(\"Sending this response to the client {$connectionId}:\\r\\n\".$upgrade);\n\t if(false === socket_write($connectionId, $upgrade, strlen($upgrade))) // use ====, because might be 0 bytes returned\n\t {\n\t\t$this->console(\"Error [\".socket_last_error().\"]: \".socket_strerror(socket_last_error()));\n\t\t// die() or callback from console\n\t }\n\t else $this->console(\"Handshake is successfully done!\");\n\t return true;\n\t}\n\telse \n\t{\n\t $this->console(\"WebSocket version 13 required (the client supports version {$version})\");\n\t return false;\n\t}\n }", "public static function handshakePacket( httpHeaderQuery $header ){\r\n\treturn self::rawHeaderResponse( \r\n\t\t\tself::mountResponse(\r\n\t\t\t\tST_SWITCH_PROTOCOL,\"WebSocket Protocol Handshake\",\r\n\t\t\t\tarray( \r\n\t\t\t\t\t\"Connection\" \t\t\t=> \"Upgrade\",\r\n\t\t\t\t\t\"Sec-WebSocket-Accept\" => base64_encode( sha1( $header->options[\"Sec-WebSocket-Key\"].\"258EAFA5-E914-47DA-95CA-C5AB0DC85B11\", true ) ),\r\n\t\t\t\t\t\"Sec-WebSocket-Location\" => \"ws://\".$header->options[\"Host\"],\r\n\t\t\t\t\t\"Sec-WebSocket-Origin\" => \"http://\".$header->options[\"Host\"],\r\n\t\t\t\t\t\"Upgrade\" \t\t\t\t=> \"WebSocket\",\r\n\t\t\t\t)\r\n\t\t ) );\r\n\t}", "private function performAsUser(&$headers) {\n if (!array_key_exists('As-User', $headers) && !empty($this->as_user)) {\n $headers['As-User'] = $this->as_user;\n }\n }", "public function connect(UserInterface $user, UserResponseInterface $response)\n {\n }", "public function set_handshake($user_id) { \n\t\n\t\t$scrobbler = new scrobbler($this->username,$this->password); \n\t\t$data = $scrobbler->handshake(); \n\n\t\tif (!$data) { \n\t\t\tdebug_event('LastFM','Handshake Failed: ' . $scrobbler->error_msg,'3'); \n\t\t\treturn false; \n\t\t} \n\n\t\t$this->hostname = $data['submit_host']; \n\t\t$this->port = $data['submit_port']; \n\t\t$this->path = $data['submit_url']; \n\t\t$this->challenge = $data['challenge']; \n\n // Update the preferences\n Preference::update('lastfm_port',$user_id,$data['submit_port']);\n Preference::update('lastfm_host',$user_id,$data['submit_host']);\n Preference::update('lastfm_url',$user_id,$data['submit_url']);\n Preference::update('lastfm_challenge',$user_id,$data['challenge']);\n\n\t\treturn true; \n\n\t}", "protected function addConnectionToUriHandler(WebSocketConnection $user, $uri) {\n $url = parse_url($uri);\n\n if (isset($url['query']))\n parse_str($url['query'], $query);\n else\n $query = array();\n\n if (isset($url['path']) == false)\n $url['path'] = '/';\n\n $pathSplit = preg_split(\"/\\//\", $url['path'], 0, PREG_SPLIT_NO_EMPTY);\n $resource = array_pop($pathSplit);\n\n $user->parameters = $query;\n\n\n if (array_key_exists($resource, $this->uriHandlers)) {\n $this->uriHandlers[$resource]->addConnection($user);\n $this->_connections[$user] = $resource;\n\n $this->say(\"User has been added to $resource\");\n }\n }", "public function onSecuritySwitchUser(SwitchUserEvent $event) {\n $this->dispatcher->addListener(KernelEvents::RESPONSE, array($this, 'onSwitchUserResponse'));\n }", "public function handshake() {\n $extra_headers = '';\n foreach ($this->headers as $k => $line) {\n if ($k !== 'STATUS') {\n $extra_headers .= $line . \"\\r\\n\";\n }\n }\n\n if (!$this->send_handshake_reply($extra_headers)) {\n error_log(get_class($this) . '::' . __METHOD__ . ' : Handshake protocol failure for client \"\"'); // $this->addr\n $this->close();\n return false;\n }\n\n $this->handshaked = true;\n $this->headers_sent = true;\n $this->state = static::STATE_HANDSHAKED;\n return true;\n }", "public function sendDataToUser($user_id,$action,$data){\n\t\tforeach($this->connections as $connection_id=>$user_id_l){\n\t\t\tif($user_id_l==$user_id){\n\t\t\t\t$this->sendDataToConnection($connection_id,$action,$data);\n\t\t\t}\n\t\t}\n\t}", "function sendResponseHeaders($clientNew)\n{\n global $secWebsocketOrigin;\n\n $reqHeaders = socket_read($clientNew, 2048) or die(showError());\n $reqHeaders = preg_split(\"/\\r\\n/\", $reqHeaders);\n $reqHeaderSecWebSocket = null;\n\n foreach($reqHeaders as $reqHeader){\n $reqHeader = explode(': ', $reqHeader);\n\n if($reqHeader[0] == 'Sec-WebSocket-Key'){\n $reqHeaderSecWebSocket = $reqHeader[1];\n }\n }\n\n $accept = sha1(\"{$reqHeaderSecWebSocket}258EAFA5-E914-47DA-95CA-C5AB0DC85B11\", true);\n $accept = base64_encode($accept);\n $response = \"HTTP/1.1 101 Switching Protocols\\r\\nUpgrade: WebSocket\\r\\nSec-WebSocket-Accept: $accept\\r\\nConnection: Upgrade\\r\\nSec-WebSocket-Origin: $secWebsocketOrigin\\r\\n\\r\\n\";\n\n if(! socket_write($clientNew, $response, strlen($response))){\n die(showError());\n }\n}", "protected function webhooksIdUserGetRequest($id_user)\n {\n // verify the required parameter 'id_user' is set\n if ($id_user === null || (is_array($id_user) && count($id_user) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id_user when calling webhooksIdUserGet'\n );\n }\n\n $resourcePath = '/webhooks/{idUser}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id_user !== null) {\n $resourcePath = str_replace(\n '{' . 'idUser' . '}',\n ObjectSerializer::toPathValue($id_user),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function sendHeaders();", "public function sendDataToUser($user_id,$action,$data){\n\t\tforeach($this->connections as $connection_id=>$user_id_l){\n\t\t\techo \"C\".$connection_id;\n\t\t\tif($user_id_l==$user_id){\n\t\t\t\t$this->sendDataToConnection($connection_id,$action,$data);\n\t\t\t}\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/>with(array('class'=>$class,'routine'=>$routine)) Store a newly created resource in storage.
public function store(Request $request) { $validator = Validator::make($request->all(), [ 'type' => 'required', 'class' => 'required', 'details' => 'required', ]); if ($validator->fails()) { return Redirect::route('routine_create')->withErrors($validator); } $routine=new routine (); $routine->type=$request->type?$request->type:false; $routine->classes_id=$request->class; $routine->details=$request->details; $routine->created_by=Sentinel::getUser()->id; $routine->updated_by=Sentinel::getUser()->id; $routine->save(); //return $routine; if($routine){ return Redirect::route('routine')->with('message','successfully store'); }else{ return Redirect::back()->with('message','store failed'); } }
[ "public function store()\n {\n return $this->storeResource();\n }", "public function store()\n\t{\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\t\t//$input = Input::only(array_keys($this->resource->getFillableLabels())); //More safe, less convenient\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "public function store()\n {\n /* Check if logged user is authorized to create resources */\n $this->authorize('create', [$this->model]);\n\n $this->request->validate($this->storeValidations());\n\n DB::transaction(function () {\n\n /** Create a new resource */\n $resource = Model::create([\n 'user' => Input::get('user'),\n 'name' => Input::get('name'),\n 'email' => Input::get('email'),\n 'status' => Input::get('status'),\n 'password' => bcrypt(config('user.default_password', 'secret')),\n ]);\n\n /* Check if permissions are being set */\n if (Input::get('roles') != null) {\n /** Synchronize both tables through pivot table */\n $resource->roles()->sync(Input::get('roles'));\n }\n }, 5);\n\n /* Redirect to resource index page */\n return redirect()\n ->route($this->name . '.index')\n ->with('success', $this->name . '.resource-created');\n }", "public function store()\n {\n // store the object itself\n parent::store();\n }", "public function store()\n {\n // store the object itself\n parent::store();\n \n }", "public function store() {\n $fileService = $this->getFileService();\n $filename = $this->getCacheDirectory() . $this->generateCacheablefilename();\n $fileService->saveFile($filename, $this->resource->getContent());\n }", "function store(){\r\n\t\t//store to file\r\n\t}", "public function storeResource(Request $request)\n {\n \n $resource = new Resource;\n $resource->type = $request->type;\n $resource->subtype = $request->subtype;\n $resource->description = $request->description;\n $resource->save();\n\n $message = \"Resource added\"; \n return view('message', compact('message'));\n \n }", "public function store()\n\t{\n\t\t$input = array_add(Input::get(), 'userId', Auth::id());\n\t\t$input = array_add($input, 'condoId', json_decode(Session::get('app.condo')[0])->id);\n\t\t$input = array_add($input, 'batchId', Str::random(20));\n\t\t$this->ticketRegistrationValidation->validate( Input::all() );\n\t\t$lastTicketId = $this->execute(TicketRegisterCommand::class, $input);\n\t\tApp::make('HelperController')->uploadFileFinalize($lastTicketId);\n\t\treturn $this->sendJsonMessage('success',200);\n\t}", "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "public function store(ResourceCreateRequest $request)\n {\n if($resource = Resource::create($request->all()))\n {\n if ($request->hasFile('document')) {\n $file = $request->document;\n $path = Storage::putFile('files/resources', $file);\n $resource->file = $path;\n $resource->save();\n }\n SweetAlert::success('Resource created successfully', 'Resource Created');\n }\n else\n {\n SweetAlert::error('Resource was not created. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/resources');\n }", "public function store()\n\t{\n\t\t$command_name = Input::get(\"command_name\");\n\t\t$command_line = Input::get(\"command_line\");\n\t\t$uuid = UUID::v4();\n\n\t\tObject::create(array(\n\t\t\t\"uuid\" => $uuid,\n\t\t\t\"object_type\" => \"12\",\n\t\t\t\"first_name\" => $command_name,\n\t\t\t\"second_name\" => \"\",\n\t\t\t\"is_active\" => \"1\"\n\t\t));\n\n\t\tCommand::create(array(\n\t\t\t\"object_uuid\" => $uuid,\n\t\t\t\"command_line\" => $command_line\n\t\t));\n\n\t\t$this->writeConfig();\n\n\t\treturn Response::json(array(\"success\" => true));\n\t}", "abstract public function createStorage($class_name);", "public function save() {\n $this->loadFields();\n $this->saveObject(__CLASS__);\n }", "public function save($resource) {\n $stmt = $this->db->prepare(\"INSERT INTO resource (id, name, description, quantity, type)\n values (0,?,?,?,?)\");\n $stmt->execute(array($resource->getName(),$resource->getDescription(),$resource->getQuantity(),\n $resource->getType()));\n }", "public function store()\n\t{\n\t\t$carrier = new $this->repo;\n\n\t\tif ($carrier->save()) {\n\t\t\treturn $this->rest->response(201, $carrier);\n\t\t}\n\n\t\treturn $this->response->errorBadRequest($carrier->errors());\n\t}", "public function store() {\n if ($this->allowRun() && ($data = $this->_collector->disable())) {\n $this->_storage->saveRun($data, $this->_type);\n }\n }", "public function save($resource);", "function storeObj(){\n\t\t$this->superStore();\n\t\t$strSQL = \"\" .\n\t\t\t\t\"INSERT INTO images \" .\n\t\t\t\t\"(id, width, height, align, alt) \" .\n\t\t\t\t\"VALUES (\" .\n\t\t\t\t\t\"\".$this->getId().\", \" .\n\t\t\t\t\t\"\".$this->getWidth().\", \" .\n\t\t\t\t\t\"\".$this->getHeight().\", \" .\n\t\t\t\t\t\"'\".$this->getAlign().\"',\" .\n\t\t\t\t\t\"'\".$this->getAlt().\"')\";\n\t\t$this->id = $this->DB->exe(\"MyImage :: function storeObj()\",$strSQL);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets list of containers from the location with $location_id for admin area, or top, header and footer containers from the default location and center container from location with $location_id for customer area.
public static function getListByArea($location_id, $area = AREA, $positions = array(), $dynamic_object = array(), $dynamic_object_scheme = array()) { $location_containers_params = array( 'location_id' => $location_id, 'position' => $positions, ); $default_containers_params = array( 'default_location' => $location_id, 'position' => $positions, ); $containers = self::_overrideByDefault( self::getList($location_containers_params), self::getList($default_containers_params), $area ); if ($location_containers_params['company_id'] = fn_get_blocks_owner()) { $containers = self::overrideByVendor($containers, $location_containers_params); } $containers = self::addBlockManagerProperties($containers, $dynamic_object, $dynamic_object_scheme); return $containers; }
[ "public function getContainers();", "function get_declared_containers()\n\t{\n\t\t// Array to override default containers from function get_skin_default_containers():\n\t\t// - Key is widget container code;\n\t\t// - Value: array( 0 - container name, 1 - container order ),\n\t\t// NULL - means don't use the container, WARNING: it(only empty/without widgets) will be deleted from DB on changing of collection skin or on reload container definitions.\n\t\treturn array();\n\t}", "protected function setMarkersDivLocations()\n {\n $locations = $this->setMarkersStatusArray();\n $locations_arr = $locations['locations'];\n\n $grouped_locations = $this->setMarkersGrouped();\n $grouped_arr = $grouped_locations['arr'];\n\n $locs = array();\n foreach ($locations_arr as $key)\n {\n // Return locations if path appears in $path_arr and group name does not appears in grouped array\n if (in_array($key['path'], $this->path_arr) && !array_key_exists($key['group'], $grouped_arr))\n {\n\n switch ($key['path'])\n {\n case 0:\n $conn_status = '<i class=\"fa fa-circle text-danger\"></i> ' . $this->getPathStatusTranslation(0);\n break;\n case 1:\n $conn_status = '<i class=\"fa fa-circle text-navy\"></i> ' . $this->getPathStatusTranslation(1);\n break;\n case 2:\n $conn_status = '<i class=\"fa fa-circle text-warning\"></i> ' . $this->getPathStatusTranslation(2);\n break;\n case 3:\n $conn_status = '<i class=\"fa fa-circle text-warning\"></i> ' . $this->getPathStatusTranslation(3);\n break;\n\t\t\t\t\tcase 4:\n $conn_status = '<i class=\"fa fa-circle text-default\"></i> ' . $this->getPathStatusTranslation(4);\n break;\n default:\n $conn_status = '';\n break;\n }\n\n $locs[] = array(\n 'loc_conn' => $conn_status,\n 'loc_group' => $key['group'],\n 'loc_id' => $key['id']\n );\n\n }\n\n }\n\n return $locs;\n }", "private function _getContainersForMovingToShowcase() {\n return DB::connection('mysql-backoffice')->table((new Container)->getTable().' AS t1')\n ->select([\n 't1.*',\n 't2.name AS container_type_name',\n 't3.name AS container_form_name',\n 't2.classname AS container_type_classname',\n 't3.classname AS container_form_classname',\n ])\n ->join((new ContainerType)->getTable().' AS t2', 't2.id', '=', 't1.container_type_id')\n ->join((new ContainerForm)->getTable().' AS t3', 't3.id', '=', 't1.container_form_id')\n ->get();\n }", "function pixelgrade_get_posts_container_id( $location = array() ) {\n\t\treturn apply_filters( 'pixelgrade_posts_container_id', 'posts-container', $location );\n\t}", "public function getLocations();", "public function getBannersAreasLocations();", "function get_divinity_locations()\n{\n\t$locations = [get_template_directory() . '/templates'];\n\n\treturn apply_filters('divnity_locations', $locations);\n}", "public function getListings($location, $refid = NULL) {\r\n\r\n $stmt = NULL;\r\n $row = NULL;\r\n\r\n switch ($location) {\r\n\r\n case 'grid':\r\n\r\n $sql = \"SELECT t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity,\r\n c.name AS name, u.url AS short_url, t.template_secure AS secure, c.slug AS slug, t.template_filename AS filename,\r\n c.id AS canonical, c.page_title AS title, c.meta_description AS meta_description, c.meta_keywords AS meta_keywords,\r\n c.page_heading AS heading, t.allow_target AS allow_target, t.requires_login AS requires_login, t.disallow_guests AS disallow_guests,\r\n c.xml_show AS visibility, c.sitemap_page_priority AS priority, c.sitemap_page_change_frequency AS change_frequency, c.*\r\n FROM bs_groupings c JOIN bs_pagetypes t\r\n LEFT JOIN bs_page_urls u ON (u.id = c.canonical_page_url AND u.pagetype = t.pagetype AND u.pageid = c.id)\r\n LEFT JOIN bs_categories cat ON (cat.id = c.category_id)\r\n LEFT JOIN bs_page_nicknames n ON (t.pagetype = n.pagetype AND c.id = n.pageid)\r\n WHERE cat.active = TRUE AND c.active = TRUE AND cat.id = ? AND t.pagetype = 'grouping'\r\n GROUP BY c.id ORDER BY c.position ASC, c.name ASC\";\r\n\r\n $stmt = Connection::getHandle()->prepare($sql);\r\n\r\n break;\r\n\r\n case 'sidebar':\r\n\r\n $sql = \"SELECT\r\n t.pagetype AS type, c.id AS id, n.nickname AS nickname, IF(COUNT(c.id) > 0, TRUE, FALSE) AS validity,\r\n c.name AS name, u.url AS short_url, t.template_secure AS secure, c.slug AS slug, t.template_filename AS filename,\r\n c.id AS canonical, c.page_title AS title, c.meta_description AS meta_description, c.meta_keywords AS meta_keywords,\r\n c.page_heading AS heading, t.allow_target AS allow_target, t.requires_login AS requires_login, t.disallow_guests AS disallow_guests,\r\n c.xml_show AS visibility, c.xml_page_priority AS priority,c.sitemap_page_change_frequency AS change_frequency, c.accessory AS accessory\r\n FROM bs_groupings c JOIN bs_pagetypes t\r\n LEFT JOIN bs_page_urls u ON (u.id = c.canonical_page_url AND u.pagetype = t.pagetype AND u.pageid = c.id)\r\n LEFT JOIN bs_categories cat ON (cat.id = c.category_id)\r\n LEFT JOIN bs_page_nicknames n ON (t.pagetype = n.pagetype AND c.id = n.pageid)\r\n WHERE cat.active = TRUE AND c.active = TRUE AND cat.id = ? AND t.pagetype = 'grouping' GROUP BY c.id ORDER BY c.accessory ASC,\r\n c.name ASC\";\r\n\r\n $stmt = Connection::getHandle()->prepare($sql);\r\n\r\n break;\r\n }\r\n\r\n if( $stmt->execute(array($this->id)) ) {\r\n\r\n while( $results = $stmt->fetch(PDO::FETCH_ASSOC) ) {\r\n\r\n $row[] = $results;\r\n }\r\n }\r\n\r\n return $row;\r\n }", "private static function getLocations() {\n\t\treturn self::get(\t'locations',\n\t\t\t\t\t\t\t\"SELECT location FROM data WHERE (state<>\" . STATE_DELETED . \")GROUP BY location ORDER BY location ASC;\",\n\t\t\t\t\t\t\ttrue );\n\t}", "public function getContainerList()\n {\n return $this->loadContainerList();\n }", "public function loadContainerList()\n {\n // prevent a query made on incorrect data\n if( is_null($this->pathId) || !is_numeric($this->pathId) )\n {\n return array();\n }\n \n $sql = \"SELECT\n `id`,\n `path_id`,\n `type`,\n `title`,\n `description`,\n `visibility`,\n `rank`,\n `identifier`,\n `sys_path`,\n `parent_id`,\n `previous_id`,\n `next_id`,\n `launch_data`\n FROM `\".$this->tblItem.\"`\n WHERE `type` = 'container'\n AND `path_id` = \".(int) $this->pathId.\"\n ORDER BY `rank` ASC\";\n\n if ( false === ( $data = claro_sql_query_fetch_all_rows($sql) ) )\n {\n return array();\n }\n else\n {\n return $data;\n }\n }", "public function getContainers()\n {\n return $this->containers;\n }", "public function listLocations();", "protected function getSpacesAbovePlacedSolidsAsContainers()\n {\n $spaces = [];\n foreach($this->packedSolids as $solid ){\n $openHeight = $this->getContentsMaxHeight() - $solid->getHeight();\n if( $openHeight > 0 ){\n $spaces[] = new Container(\n $solid->getWidth(),\n $solid->getLength(),\n $openHeight\n );\n }\n }\n return $spaces;\n }", "public function containers()\n {\n return $this->containers;\n }", "public static function getAllEntertainerLocations(){\n\t\t$locations = DB::table('entertainers')->get();\n\n\t\t//Get the images\n\t\t$locations = images::getAllImages($locations);\n\n\t\treturn $locations;\n\t}", "function pixelgrade_posts_container_id( $location = array() ) {\n\t\t$posts_container_id = pixelgrade_get_posts_container_id( $location );\n\t\tif ( ! empty( $posts_container_id ) ) {\n\t\t\techo 'id=\"' . esc_attr( $posts_container_id ) . '\"';\n\t\t}\n\t}", "function list_containers_info($limit=0, $marker=NULL)\n {\n list($status, $reason, $container_info) = \n $this->cfs_http->list_containers_info($limit, $marker);\n #if ($status == 401 && $this->_re_auth()) {\n # return $this->list_containers_info($limit, $marker);\n #}\n if ($status < 200 || $status > 299) {\n throw new InvalidResponseException(\n \"Invalid response (\".$status.\"): \".$this->cfs_http->get_error());\n }\n return $container_info;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the configuration array for CiviCRM api request from the environment
private function getConfig(): array { return [ 'base_url' => \getenv('CIVICRM_REST_URL', true) ?: \getenv('CIVICRM_REST_URL'), 'site_key' => \getenv('CIVICRM_SITE_KEY', true) ?: \getenv('CIVICRM_SITE_KEY'), 'api_key' => \getenv('CIVICRM_API_KEY', true) ?: \getenv('CIVICRM_API_KEY') ]; }
[ "public function getApiConfigFor(Request $request): ?array;", "public function getConfig() {\n return array(\n 'proxy' => $this->getProxy(),\n 'api_key' => $this->getApiKey(),\n 'curl' => $this->getCurl(),\n );\n }", "public function getConfigurationList()\n {\n return Functions::apiClient(API_CONFIG_DOMAIN . \"/ciam/appInfo\", '', array('authentication' => 'key'));\n }", "public function getMainConfiguration() : array {}", "protected function get_config(){\t\t\n\t\t\t$this->check_code();\n\t\t\t\n\t\t\t$tableau = array('status' => 'OK' );\n\t\t\t$tableau[\"API_VERSION\"] = $this->cfg->API_VERSION;\n\t\t\t$tableau[\"POSTERS_DIRECTORY\"] = $this->cfg->POSTERS_DIRECTORY;\n\t\t\t$tableau[\"DB_TABLE\"] = $this->cfg->DB_TABLE;\n\t\t\t$tableau[\"PHP_VERSION\"] = PHP_VERSION;\n\t\t\t$this->response($this->json($tableau),200);\n\t\t}", "public function getBuildConfig(): array;", "private function getConfigFormSerivice() {\n // Array data contains the keys field of the \n // be_healthy_api_admin_settings form.\n $data = ['app_version', 'community', 'email', 'password', \n 'success_message_authenticate', 'success_message_account',\n 'success_message_elegibility', 'community_id'\n ];\n $response = [];\n\n foreach($data as $item) {\n $response[$item] = NULL !== $this->config->get($item) ? \n $this->config->get($item) : '';\n }\n\n return $response;\n }", "public function getHostSettings()\n {\n return [\n [\n \"url\" => \"https://api.corbado.com\",\n \"description\" => \"No description provided\",\n ]\n ];\n }", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "public function getGlobalConfig();", "private function _getConfigArray()\n {\n $credentials = $this->_getCredentials();\n\n return self::buildConfigArray($credentials['keyId'], $credentials['secret'], $credentials['region']);\n }", "function config_v1()\n {\n return [\n 'enabled' => true,\n 'venture_config_id' => '123456789',\n 'username' => 'username',\n 'password' => 'password',\n 'version' => '1.0.0',\n 'culture' => 'en_GB',\n 'endpoint' => 'https://bus.staging.ritdu.tech/v1/',\n ];\n }", "public function getCurlConfiguration() : array\n {\n return [\"curl\" => $this->curlConfig];\n }", "private function getDefaultConfigs(): array\n {\n return [\n 'default_middleware_groups' => null,\n 'middleware_groups' => ['web'],\n 'default_environment' => 'local',\n 'use_environmental_proxy' => env('ADAPTERS_ENV_ENABLED', false),\n 'environment' => mb_strtolower(env('ADAPTERS_ENV', env('APP_ENV', 'local'))),\n 'proxy' => [\n 'schema' => env('ADAPTERS_DEFAULT_SCHEMA', 'https'),\n 'uri' => env('ADAPTERS_DEFAULT_URI', 'httpbin.org'),\n ],\n 'client' => [\n 'headers' => [],\n 'verify' => false,\n ],\n 'environments' => [\n 'local' => [\n 'proxy' => [\n 'schema' => 'https',\n 'uri' => 'httpbin.org',\n ],\n 'client' => [\n 'headers' => [\n 'content-type' => 'application/json',\n 'accept' => 'application/json'\n ],\n 'verify' => false,\n ],\n ]\n ]\n ];\n }", "protected function get_environment_for_request() {\n\t\treturn array();\n\t}", "public function getAppConfiguration(): array\n {\n return [\n 'client_name' => $this->getClientName(),\n 'redirect_uris' => $this->getRedirectUris(),\n 'scopes' => $this->getScopes(),\n 'website' => $this->getWebsite(),\n ];\n }", "function &getConfigArray()\n {\n $configArray = array();\n \n // Allow the user to show debug output.\n $configArray['debug'] = array('short' => 'db',\n 'max' => 0,\n 'desc' => 'Show debug output.'\n );\n // Make the program chatty.\n $configArray['verbose'] = array('short' => 'v',\n 'min' => 0,\n 'max' => 1,\n 'desc' => 'Set the verbose level.',\n 'default' => 2\n );\n // How many lines should be shown.\n $configArray['showlines'] = array('short' => 's',\n 'min' => 1,\n 'max' => 1,\n 'desc' => 'How many lines of the file should be shown.',\n );\n // What file should be used.\n $configArray[CONSOLE_GETARGS_PARAMS] = array('min' => 1,\n 'max' => 1,\n 'desc' => 'The file to count lines from.',\n 'default' => basename(__FILE__)\n );\n // Show the help message. \n // (Not really needed unless you want help to show up in the \n // list of options in the help menu.)\n $configArray['help'] = array('short' => 'h',\n 'max' => 0,\n 'desc' => 'Show this help.'\n );\n // Search for and highlight a word.\n $configArray['find|highlight'] = array('short' => 'f|hi',\n 'max' => -1,\n 'min' => 0,\n 'desc' => 'Find words within the lines displayed. Words found will be changed from \"word\" to \"*word*\".'\n );\n return $configArray;\n }", "public function getApiConfig()\n {\n return $this->getNamedConfig('api', 'API', 'url');\n }", "public function projectsSettings()\n {\n $data = $this->makeRequest(__FUNCTION__);\n return $data;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
flattenStructureCheckGrid is a wrapper for flattenStructureGridInput
private function flattenStructureCheckGrid(&$out, $key, &$hasGrid, &$columns) { foreach(array_keys($out[$key]['s1']) as $tkey) { $gridCols = $this->flattenStructureGridInput($out, $key, $tkey); if($gridCols !== false) { $hasGrid = true; $columns = $gridCols; } } }
[ "private function flattenStructureGridInput(&$out, $key, $gridKey)\n {\n $isGrid = strpos($gridKey, '_gridInput') !== false ? true : false;\n $table = isset($_GET['table']) ? $_GET['table'] : '';\n if($table == '' || $table != $gridKey) {\n if($isGrid) {\n $out[$key][$gridKey] = \"Append &table={$gridKey} to URL\";\n }\n return false;\n }\n\n $columns = ['recordID', $gridKey . '_id'];\n $gridIndex = array_flip($out[$key][$gridKey]['columns']);\n\n $gridFormatIndex = [];\n foreach($out[$key][$gridKey]['format'] as $gridFormat) {\n $columns[] = $gridFormat['name'];\n $gridFormatIndex[$gridIndex[$gridFormat['id']]] = $gridFormat['name'];\n }\n\n foreach($out[$key][$gridKey]['cells'] as $cKey => $row) {\n $newKey = $key . '.' . $cKey;\n $out[$newKey] = $out[$key];\n $out[$newKey][$gridKey . '_id'] = $newKey;\n foreach($row as $rKey => $item) {\n $out[$newKey][$gridFormatIndex[$rKey]] = $item;\n }\n }\n unset($out[$key]);\n\n return $columns;\n }", "public function testFlatten()\n {\n }", "function FlattenInnerArray () {\n $this->useInnerArray = false;\n }", "public function adapt(Grid &$grid)\n {\n $this->grid = $grid;\n $customfields = app('customfields')->get();\n if (empty($customfields)) {\n return;\n }\n foreach ($customfields as $classname => $customfield) {\n\n if (is_array($grid->row)) {\n continue;\n }\n if (get_class($grid->row) !== $classname) {\n continue;\n }\n if (!is_array($customfield)) {\n $customfield = [$customfield];\n }\n\n foreach ($customfield as $instance) {\n if (!is_object($instance)) {\n continue;\n }\n\n $this->addToForm($instance);\n }\n }\n\n\n\n if (extension_active('customfields')) {\n $map = config('antares/customfields::map', []);\n $types = [];\n foreach ($map as $type => $classnames) {\n foreach ($classnames as $classname) {\n\n if (is_array($this->grid->row)) {\n continue;\n }\n if (get_class($this->grid->row) !== $classname) {\n continue;\n }\n array_push($types, $type);\n }\n }\n if (!empty($types)) {\n $this->getFields($types);\n }\n }\n }", "public function prepareGrid();", "public function testExpandFlattenedDataWithNoFlattened() {\n\t\t\n\t\t// expandFlattenedData is private function called by withData, so test that\n\t\t\n\t\t$test_data = array(\n\t\t\t$this->test_model => array(\n\t\t\t\t'field1' => 'value1',\n\t\t\t\t'field2' => 'value2',\n\t\t\t\t'field3' => 'value3'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->ApiResource->forModel($this->test_model);\n\t\t\n\t\t$results = $this->ApiResource->withData($test_data);\n\t\t\n\t\t$this->assertEquals($test_data, $this->ApiResource->_data);\n\t\n\t}", "function flatten_nested_array(array $in, $glue = '_'){\n $out = array();\n flatten_nested_array_recursive($out, '', $in, $glue);\n return $out;\n}", "private function flatten()\n {\n /**\n * @see http://pecl.php.net/bugs/bug.php?id=22435\n */\n if (method_exists($this->gmagick, 'flattenImages')) {\n try {\n $this->gmagick = $this->gmagick->flattenImages();\n } catch (\\GmagickException $e) {\n throw new RuntimeException(\n 'Flatten operation failed', $e->getCode(), $e\n );\n }\n }\n }", "public function flatten(){\r\n $this->_imageCheck();\r\n $this->image->flatten();\r\n return $this;\r\n }", "public function testExpandFlattenedDataMixed() {\n\t\t\n\t\t// expandFlattenedData is private function called by withData, so test that\n\t\t\n\t\t$test_data = array(\n\t\t\t$this->test_model . '.field1' => 'value1',\n\t\t\t$this->test_model . '.field2' => 'value2',\n\t\t\t$this->test_model . '.field3' => 'value3',\n\t\t\t$this->test_model => array(\n\t\t\t\t'field4' => 'value4',\n\t\t\t\t'field5' => 'value5',\n\t\t\t\t'field6' => 'value6'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$expected = array(\n\t\t\t$this->test_model => array(\n\t\t\t\t'field1' => 'value1',\n\t\t\t\t'field2' => 'value2',\n\t\t\t\t'field3' => 'value3',\n\t\t\t\t'field4' => 'value4',\n\t\t\t\t'field5' => 'value5',\n\t\t\t\t'field6' => 'value6'\n\t\t\t)\n\t\t);\n\t\t\n\t\t$this->ApiResource->forModel($this->test_model);\n\t\t\n\t\t$results = $this->ApiResource->withData($test_data);\n\t\t\n\t\t$this->assertEquals($expected, $this->ApiResource->_data);\n\t\n\t}", "public function testCanGenerateAThreeByTwoGrid()\n {\n $this->assertSame(\n array(\n array(false, false, false),\n array(false, false, false),\n ),\n $this->_gridGenerator->setSize(3, 2)->generate()\n );\n }", "abstract protected function prepareAndGetGridConfig();", "public function dataForTestFlattenReturnsArrayProvider() {\n $tests = array();\n\n $tests[] = array(\n [\n 'declare -a config_keys=(\"options\")',\n 'declare -a config_keys___options=(\"dry-run\")',\n 'declare -a config_keys___options___dry_run=(\"help\")',\n 'config___options___dry_run___help=\"bla bla\"',\n ],\n [\n 'options' => [\n 'dry-run' => [\n 'help' => 'bla bla',\n ],\n ],\n ],\n );\n\n $tests[] = array(\n [\n 'declare -a config_keys=(\"images\")',\n 'declare -a config_keys___images=(\"types\")',\n 'declare -a config_keys___images___types=(\"bitmap\")',\n 'declare -a config___images___types___bitmap=(\"jpg\" \"png\" \"gif\")',\n 'declare -a config_keys___images___types___bitmap=(\"0\" \"1\" \"2\")',\n 'config___images___types___bitmap___0=\"jpg\"',\n 'config___images___types___bitmap___1=\"png\"',\n 'config___images___types___bitmap___2=\"gif\"',\n ],\n [\n 'images' => [\n 'types' => [\n 'bitmap' => [\n \"jpg\",\n \"png\",\n \"gif\",\n ],\n ],\n ],\n ],\n );\n\n $tests[] = array(\n [\n 'declare -a config_keys=(\"version\")',\n 'config___version=\"1.0\"',\n ],\n ['version' => \"1.0\"],\n );\n\n $tests[] = array(\n [\n 'declare -a config_keys=(\"title\")',\n 'config___title=\"Lorem Ipsum\"',\n ],\n ['title' => \"Lorem Ipsum\"],\n );\n $tests[] = array(\n [\n 'declare -a config_keys=(\"list\")',\n 'declare -a config_keys___list=(\"alpha\" \"bravo\" \"charlie\" \"delta\" \"foxtrot\")',\n 'config___list___alpha=true',\n 'config___list___bravo=false',\n 'config___list___charlie=null',\n 'config___list___delta=\"echo\"',\n 'config___list___foxtrot=17',\n ],\n [\n 'list' => [\n 'alpha' => TRUE,\n 'bravo' => FALSE,\n 'charlie' => NULL,\n 'delta' => 'echo',\n 'foxtrot' => 17,\n ],\n ],\n );\n $tests[] = array(\n [\n 'declare -a config_keys=(\"list\")',\n 'declare -a config___list=(\"7\" \"10\" \"12\")',\n 'declare -a config_keys___list=(\"0\" \"1\" \"2\")',\n 'config___list___0=7',\n 'config___list___1=10',\n 'config___list___2=12',\n ],\n ['list' => [7, 10, 12]],\n );\n\n return $tests;\n }", "function mkd_burst_visual_composer_grid_elements() {\n\n\t\tif(!mkd_burst_vc_grid_elements_enabled()){\n\n\t\t\tremove_action( 'init', 'vc_grid_item_editor_create_post_type' );\n\n\t\t}\n\t}", "function get_flat_program_tree() {\n // Retrieve the program tree from the api\n $ohjelma_json = get_field( 'ohjelma-json', 'option' );\n $program = \\POF\\Api::get( $ohjelma_json, true );\n $tree = $program['program'][0];\n\n $flattened = [];\n /**\n * Recursively add api item to flattened array\n *\n * @param array $item Item to add.\n * @param array $flattened Array to gather items to.\n * @param string $parent Parent guid.\n */\n function add_to_flattened( $item, &$flattened, $parent = null ) {\n $item['parent'] = $parent;\n $items_to_search = [\n 'taskgroups',\n 'tasks',\n 'agegroups',\n ];\n foreach ( $items_to_search as $key ) {\n if ( array_key_exists( $key, $item ) ) {\n foreach ( $item[ $key ] as $new_item ) {\n add_to_flattened( $new_item, $flattened, $item['guid'] );\n }\n\n // Collapse sub items to just their guid's\n $item[ $key ] = array_map(function( $item ) {\n return $item['guid'];\n }, $item[ $key ]);\n }\n }\n $flattened[ $item['guid'] ] = $item;\n }\n add_to_flattened( $tree, $flattened );\n\n return $flattened;\n}", "public function testFlatten() {\n\t\t$this->object->flatten();\n\n\t\t$this->assertEquals([\n\t\t\t'integer' => 12345,\n\t\t\t'number' => '67890',\n\t\t\t'string' => 'Foobar',\n\t\t\t'boolean' => true,\n\t\t\t'null' => null,\n\t\t\t'zero' => 0,\n\t\t\t'empty' => '',\n\t\t\t'map.foo' => 'bar',\n\t\t\t'array.0' => 'foo',\n\t\t\t'array.1' => 'bar'\n\t\t], $this->object->value());\n\t}", "private function structureTransformationHelper($object, $structure, $original)\n {\n if (empty($structure) || empty($object)) {\n return [];\n }\n\n $out = [];\n\n foreach ($structure as $key => $value) {\n if ($key === '__all' || $value === '__all') {\n return $object;\n }\n\n // a child transformer.\n if ($value instanceof SceneTransformer) {\n $subObj = $this->getValue($key, $object, $original, true);\n\n // call transform with the original data\n $out[$key] = $value->transform($subObj);\n continue;\n }\n\n // simple value transformation\n if ($value instanceof ValueTransformation) {\n $subObj = $this->getValue($key, $object, $original);\n\n if (Helpers::isSequentialArray($subObj)) {\n $out[$key] = collect($subObj)\n ->transform(function ($o) use ($value) {\n return $value->transform($o);\n })\n ->toArray();\n } else {\n $out[$key] = $value->transform($subObj);\n }\n\n continue;\n }\n\n if (is_array($value)) {\n\n if (array_key_exists('__flat', $value)) {\n // for flat structures all key references are made with respect to base\n // object instead of nested\n unset($value['__flat']);\n $out[$key] = $this->structureTransformationHelper($object, $value, $original);\n\n } else if (count($value) == 2 && $value[1] instanceof Transformer) {\n // if the value is a two item array ['key', $transformer] then we lookup by the\n // key and transform using the transformer\n $out[$key] = $value[1]->transform($this->getValue($value[0], $object, $original));\n\n } else {\n\n $newObject = $this->getValue($key, $object, $original);\n $out[$key] = $this->structureTransformationHelper($newObject, $value, $original);\n }\n\n\n } else {\n // single value transformation\n\n // only the name given. This is both the source and dest key\n if (is_integer($key)) {\n $key = $value;\n }\n\n $out[$key] = $this->getValue($value, $object, $original);\n }\n }\n\n return $out;\n }", "function data_array_flatten() {\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\tarray(1, 2, 3, 4),\n\t\t\t\tarray(1, 2, 3, 4),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t1,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t2,\n\t\t\t\t\t\tarray(3, 4),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(1, 2, 3, 4),\n\t\t\t),\n\t\t);\n\t}", "public static function wrap_species_checklist_with_subsamples($arr, $include_if_any_data = FALSE,\n $zeroAttrs = TRUE, $zeroValues=['0','none','absent','not seen'], $gridsToExclude = []) {\n if (array_key_exists('website_id', $arr)) {\n $website_id = $arr['website_id'];\n }\n else {\n throw new Exception('Cannot find website id in POST array!');\n }\n $fieldDefaults = self::speciesChecklistGetFieldDefaults($arr);\n // Set the default method of looking for rows to include - either using data, or the checkbox (which could be hidden)\n $include_if_any_data = $include_if_any_data || (isset($arr['rowInclusionCheck']) && $arr['rowInclusionCheck']=='hasData');\n // Species checklist entries take the following format.\n // sc:<subSampleIndex>:[<sample_id>]:sample:deleted\n // sc:<subSampleIndex>:[<sample_id>]:sample:geom\n // sc:<subSampleIndex>:[<sample_id>]:sample:entered_sref\n // sc:<subSampleIndex>:[<sample_id>]:smpAttr:[<sample_attribute_id>]\n // sc:<rowIndex>:[<occurrence_id>]:occurrence:sampleIDX (val set to subSample index)\n // sc:<rowIndex>:[<occurrence_id>]:present (checkbox with val set to ttl_id\n // sc:<rowIndex>:[<occurrence_id>]:occAttr:<occurrence_attribute_id>[:<occurrence_attribute_value_id>]\n // sc:<rowIndex>:[<occurrence_id>]:occurrence:comment\n // sc:<rowIndex>:[<occurrence_id>]:occurrence_medium:fieldname:uniqueImageId\n $occurrenceRecords = [];\n $sampleRecords = [];\n $subModels = [];\n foreach ($arr as $key=>$value) {\n $gridExcluded = FALSE;\n foreach ($gridsToExclude as $gridToExclude) {\n if (substr($key, 0, strlen($gridToExclude)+3)== 'sc:' . $gridToExclude) {\n $gridExcluded=TRUE;\n }\n }\n if ($gridExcluded === FALSE && substr($key, 0, 3)=='sc:' && substr($key, 2, 7)!=':-idx-:' && substr($key, 2, 3)!=':n:') { //discard the hidden cloneable rows\n // Don't explode the last element for occurrence attributes\n $a = explode(':', $key, 4);\n $b = explode(':', $a[3], 2);\n if($b[0] == \"sample\" || $b[0] == \"smpAttr\") {\n $sampleRecords[$a[1]][$a[3]] = $value;\n if($a[2]) $sampleRecords[$a[1]]['id'] = $a[2];\n }\n else {\n $occurrenceRecords[$a[1]][$a[3]] = $value;\n if($a[2]) $occurrenceRecords[$a[1]]['id'] = $a[2];\n }\n }\n }\n foreach ($sampleRecords as $id => $sampleRecord) {\n $sampleRecords[$id]['occurrences'] = [];\n }\n foreach ($occurrenceRecords as $id => $record) {\n $sampleIDX = $record['occurrence:sampleIDX'];\n unset($record['occurrence:sampleIDX']);\n $present = self::wrap_species_checklist_record_present($record, $include_if_any_data,\n $zeroAttrs, $zeroValues, []);\n // $record[present] holds taxa taxon list ID so will always be available\n // for genuine rows. All existing rows, plus any that are present in the\n // list, must be handled.\n if (!empty($record['present']) && (array_key_exists('id', $record) || $present !== NULL)) {\n if ($present === NULL)\n // checkboxes do not appear if not checked. If uncheck, delete record.\n $record['deleted'] = 't';\n else\n $record['zero_abundance']=$present ? 'f' : 't';\n $record['taxa_taxon_list_id'] = $record['present'];\n $record['website_id'] = $website_id;\n self::speciesChecklistApplyFieldDefaults($fieldDefaults, $record, $arr);\n $occ = submission_builder::wrap($record, 'occurrence');\n self::attachOccurrenceMediaToModel($occ, $record);\n $sampleRecords[$sampleIDX]['occurrences'][] = array('fkId' => 'sample_id','model' => $occ);\n }\n }\n foreach ($sampleRecords as $id => $sampleRecord) {\n $occs = $sampleRecord['occurrences'];\n unset($sampleRecord['occurrences']);\n $sampleRecord['website_id'] = $website_id;\n // copy essentials down to each subSample\n if (!empty($arr['survey_id']))\n $sampleRecord['survey_id'] = $arr['survey_id'];\n if (!empty($arr['sample:date']))\n $sampleRecord['date'] = $arr['sample:date'];\n if (!empty($arr['sample:entered_sref_system']))\n $sampleRecord['entered_sref_system'] = $arr['sample:entered_sref_system'];\n if (!empty($arr['sample:location_name']) && empty($sampleRecord['location_name']))\n $sampleRecord['location_name'] = $arr['sample:location_name'];\n if (!empty($arr['sample:input_form']))\n $sampleRecord['input_form'] = $arr['sample:input_form'];\n $subSample = submission_builder::wrap($sampleRecord, 'sample');\n // Add the subSample/soccurrences in as subModels without overwriting others such as a sample image\n if (array_key_exists('subModels', $subSample)) {\n $subSample['subModels'] = array_merge($subSample['subModels'], $occs);\n }\n else {\n $subSample['subModels'] = $occs;\n }\n $subModel = array('fkId' => 'parent_id', 'model' => $subSample);\n $copyFields = [];\n if(!isset($sampleRecord['date'])) $copyFields = array('date_start' => 'date_start','date_end' => 'date_end','date_type' => 'date_type');\n if(!isset($sampleRecord['survey_id'])) $copyFields['survey_id'] = 'survey_id';\n if(count($copyFields)>0) $subModel['copyFields'] = $copyFields; // from parent->to child\n $subModels[] = $subModel;\n }\n return $subModels;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Initialize sales application using the salesperson email address.
function v2_initSalesApp() { $action = new InitSalesAppAction(); $action->execute(); }
[ "protected function _initSalesrep()\n {\n $salesrepId = (int) $this->getRequest()->getParam('id');\n $salesrep = Mage::getModel('fvets_salesrep/salesrep');\n if ($salesrepId) {\n $salesrep->load($salesrepId);\n }\n Mage::register('fvets_salesrep', $salesrep);\n return $salesrep;\n }", "public function __smartestApplicationInit(){\n\t\t\n\t}", "public static function initialize(){\n\t\t$email = '';\n\t\t$doc = realpath($_SERVER['DOCUMENT_ROOT']);\n\t\tif(hasFile(\".env\", $doc)){\n\t\t\tself::$env = new \\Dotenv\\Dotenv($doc);\n\t\t\tself::$env->load();\n\t\t\tself::$configs = array(\n\t\t\t\t'mailer' => getenv('MAILER'),\n\t\t\t\t'mail_protocol' => getenv('MAIL_PROTOCOL'),\n\t\t\t\t'mail_port' => getenv('MAIL_PORT'),\n\t\t\t\t'bearer' => getenv('MAIL_API_KEY'),\n\t\t\t\t'from' => getenv('MAIL_FROM'),\n\t\t\t\t'fromName' => getenv('MAIL_FROM_NAME') ? getenv('MAIL_FROM_NAME') : getenv('MAIL_FROM') ,\n\t\t\t\t'username' => getenv('USERNAME'),\n\t\t\t\t'password' => getenv('PASSWORD'),\n\t\t\t\t'subject' => getenv('MAIL_SUBJECT'),\n\t\t\t);\n\t\t\t$email = ucfirst(strtolower(getenv('MAILER')));\n\t\t}else{\n\t\t\t$environment = require_once((realpath(__DIR__ . '/../config/environment.php')));\n\t\t\tself::$configs = array(\n\t\t\t\t'mailer' => $environment['mailer'],\n\t\t\t\t'mail_protocol' => $environment['mail_protocol'],\n\t\t\t\t'bearer' => $environment['bearer'],\n\t\t\t\t'from' => $environment['from'],\n\t\t\t\t'fromName' => $environment['fromName'] ? $environment['fromName'] : $environment['from'],\n\t\t\t\t'username' => $environment['username'],\n\t\t\t\t'password' => $environment['password'],\n\t\t\t\t'subject' => $environment['subject'],\n\t\t\t);\n\t\t\t$email = ucfirst(strtolower($environment['mailer']));\n\t\t}\n\n\t\t$logger = new Logger('sendgrid');\n\n\t\t$class = EmailFactory::make(__NAMESPACE__ . '\\MailService\\\\' . $email . '\\\\Email', self::$configs, $logger);\n\t\treturn $class;\n\t\t//return self::$instance = new $class(self::$configs, $logger);\n\n\t}", "public function __construct($config = null)\n {\n $this->email = Services::email($config);\n }", "public function create()\n {\n $this->sesClient->verifyEmailIdentity(\n [\n 'EmailAddress' => $this->identity->getIdentity(),\n ]\n );\n }", "protected function initApplication()\n\t{\n\t\tPrado::trace('Initializing application','System.TApplication');\n\n\t\tif($this->_configFile!==null)\n\t\t{\n\t\t\tif($this->_cacheFile===null || @filemtime($this->_cacheFile)<filemtime($this->_configFile))\n\t\t\t{\n\t\t\t\t$config=new TApplicationConfiguration;\n\t\t\t\t$config->loadFromFile($this->_configFile);\n\t\t\t\tif($this->_cacheFile!==null)\n\t\t\t\t\tfile_put_contents($this->_cacheFile,serialize($config),LOCK_EX);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$config=unserialize(file_get_contents($this->_cacheFile));\n\n\t\t\t$this->applyConfiguration($config,false);\n\t\t}\n\n\t\tif(($serviceID=$this->getRequest()->resolveRequest(array_keys($this->_services)))===null)\n\t\t\t$serviceID=$this->getPageServiceID();\n\n\t\t$this->startService($serviceID);\n\t}", "public static function init()\n {\n User_Auth_Service::register('system', __('system_user_service_name'), array(\n 'login_view' => 'frontend/user/login/system',\n ));\n }", "public function initSaless()\n\t{\n\t\t$this->collSaless = array();\n\t}", "function __construct($ps_email = \"\") {\n $this->ConnectToDatabase();\n if($ps_email != \"\"){\n $this->load($ps_email);\n }\n }", "public function __construct($email = null)\n {\n $this->setEmail($email);\n }", "public function __construct()\n {\n $this->_helper = Mage::helper('checkout');\n $this->_customerEmailExistsMessage = $this->_helper->__('There is already a customer registered using this email address. Please login using this email address or enter a different email address to register your account.');\n $this->_checkoutSession = Mage::getSingleton('checkout/session');\n $this->_customerSession = Mage::getSingleton('customer/session');\n }", "public function twilio_init() {\n Log::twilio('twilio_init() from model '.get_class($this).' with account_sid '.Config::get('application.twilio.account_sid'));\n Bundle::start('twilio');\n $this->twilio = new Services_Twilio(Config::get('application.twilio.account_sid'),Config::get('application.twilio.account_token'));\n }", "public function __construct(SystemEmail $systemEmail)\n {\n $this->model = $systemEmail;\n }", "public function initializeShopContext();", "protected function loginAsEmailManager()\n {\n $user = factory(User::class)->create();\n// $user->assignRole('email-manager');\n $this->actingAs($user);\n View::share('user', $user);\n }", "public function init()\n {\n $oSdk = $this->getSdk();\n\n // Create new credentials token\n $oToken = $oSdk->newTokenCredential();\n\n try {\n $oToken->getAccessToken($oSdk->getSdkConfig());\n } catch (Exception $oException) {\n // Fail silently - because not yet sure if user would user PayPal method.\n }\n\n // Create new API context\n $oApiContext = $oSdk->newApiContext($oToken);\n\n // Save the API Context to session\n $this->setApiContext($oApiContext);\n }", "public function __construct()\n\t\t{\n\t\t\t$this->setActionBy('ACTION_BY_CUSTOMER');\n\t\t\t$this->setApiKey('35e06b58-e443-44e4-a407-4bf706482af8');\n\t\t\t$this->setApiPath('https://api.constantcontact.com');\n\t\t\t$this->setLogin('bsoder');\n\t\t\t$this->setPassword('E$ngage12');\n\t\t\t$this->setRequestLogin($this->getApiKey() . \"%\" . $this->getLogin() . \":\" . $this->getPassword());\n }", "protected function init(){\n $this->setAuth(new SugarOAuthController());\n $this->setEndpointProvider(new SugarEndpointProvider());\n $Auth = $this->getAuth();\n $Auth->setActionEndpoint('authenticate',$this->EndpointProvider->getEndpoint('oauth2Token'));\n $Auth->setActionEndpoint('refresh',$this->EndpointProvider->getEndpoint('oauth2Refresh'));\n $Auth->setActionEndpoint('logout',$this->EndpointProvider->getEndpoint('oauth2Logout'));\n $Auth->setActionEndpoint('sudo',$this->EndpointProvider->getEndpoint('oauth2Sudo'));\n $Auth->setStorageController(new SugarStaticStorage());\n }", "public function __construct($email)\n {\n \t$this->email = $email;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Appends the given hash to the url or replaces it if there is already one
private static function appendHash($url = '', $hash = '') { if (empty($hash)) { return $url; } if (strpos($url, '#') !== false) { $url = substr($url, 0, strpos($url, '#')); } return $url . '#' . $hash; }
[ "function UrlAddHash($url, $hash) {\n\treturn UrlAddQuery($url, \"hash=\" . $hash);\n}", "protected function _appendHashToUrl($url, $hash)\n {\n if ($this->method == self::METHOD_QUERY) {\n return $hash ? sprintf('%s?%s', $url, $hash) : $url;\n } else {\n $matches = array();\n preg_match('/^(?<uri>.*)(?<ext>\\.[\\d\\w]{2,5})(?<query>$|\\?.*)$/i', $url, $matches);\n return $matches['uri'] . '.' . $hash . $matches['ext'] . $matches['query'];\n }\n }", "public function getUrlByHash($hash);", "public function updateURLHash(string $url): void;", "private function appendHash($path)\r\n {\r\n return stripos($path, '?') !== false\r\n ? $path . '&' . $this->hash\r\n : $path . '?' . $this->hash;\r\n }", "public function expandUrlByHash($hash) {\n\t\t$expanded_url = \"\";\n\t\t$bitly_url = \"http://api.bit.ly/expand?\" . \n\t\t\t\t\"version=\" . $this->api_version . \n\t\t\t\t\"&format=\" . $this->format . \n\t\t\t\t\"&hash=\" . $hash . \n\t\t\t\t\"&login=\" . $this->login . \n\t\t\t\t\"&apiKey=\" . $this->apikey;\n \n\t\t$content = file_get_contents($bitly_url);\n \n\t\ttry {\n\t\t\t$expanded_url = $this->parseContent($content, $hash);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\techo \"Caught exception: \" . \n\t\t\t\t$e->getMessage() . $this->break;\n\t\t\texit;\n\t\t}\n \n\t\treturn $expanded_url;\n\t}", "private function _addUniqueUrl($urlHash)\n {\n $this->urlHashes[$urlHash] = true; // \"true\" value is means nothing\n }", "public function expandUrlByHash($hash) \n {\n $expanded_url = NULL;\n $bitly_url = \"http://api.bit.ly/expand?\" . \n \"version=\" . $this->api_version . \n \"&format=\" . $this->format . \n \"&hash=\" . $hash . \n \"&login=\" . $this->login . \n \"&apiKey=\" . $this->api_key;\n \n $content = file_get_contents($bitly_url);\n \n try \n {\n $expanded_url = $this->shorten->parseContent($content, $hash);\n }\n catch (Exception $e) \n {\n echo \"Caught exception: \" . \n $e->getMessage();\n exit;\n }\n \n return $expanded_url;\n }", "private static function getUrlHash() {\n $queryStr = self::getUrlQueryString();\n return strRightFrom($queryStr, '#', 1, true);\n }", "private function getHash($url){\r\n return $url;\r\n }", "public function expandUrlByHash($hash) {\n $expanded_url = NULL;\n $bitly_url = \"http://api.bit.ly/expand?\" . \"version=\" . $this->api_version . \"&format=\" . $this->format . \"&hash=\" . $hash . \"&login=\" . $this->login . \"&apiKey=\" . $this->api_key;\n\n $content = file_get_contents($bitly_url);\n\n try {\n $expanded_url = $this->shorten->parseContent($content, $hash);\n } catch ( Exception $e ) {\n return \"Caught exception: \" . $e->getMessage();\n }\n\n return $expanded_url;\n }", "public function addUrlToIndex($url, $hash)\n\t{\n\t\t// the link doesnt exist in the db, insert now\n\t\t$sql = sprintf('INSERT IGNORE INTO crawl_index SET\n\t\t\t\t\t client_id = %d,\n\t\t\t\t\t link = \"%s\",\n\t\t\t\t\t `count` = 1,\n\t\t\t\t\t contenthash = \"%s\"',\n\t\t\t\t\t $this->client_id,\n\t\t\t\t\t mysql_real_escape_string($url),\n\t\t\t\t\t mysql_real_escape_string($hash));\n\n\t\tmysql_query($sql, $this->db);\n\t\treturn mysql_insert_id();\n\t}", "protected function setHash(string $value): void\n {\n $this->reinitialiseUrl();\n\n if ($this->url === null) {\n return;\n }\n\n if ($value === '') {\n $this->url->fragment = null;\n } else {\n $input = $value;\n\n if (mb_substr($value, 0, 1) === '#') {\n $input = mb_substr($value, 1);\n }\n\n $this->url->fragment = '';\n BasicURLParser::parseBasicUrl(\n $input,\n null,\n null,\n $this->url,\n BasicURLParser::FRAGMENT_STATE\n );\n }\n\n $this->attributeList->setAttrValue(\n 'href',\n $this->url->serializeURL()\n );\n }", "function fetch_hash_from_url($url)\n {\n $query = $this->db->get_where('urls', array('long_url' => $url), 1, 0);\n if ($query->num_rows() > 0)\n {\n $row = $query->row();\n return array\n (\n 'status' => 'Hash points to Existing URL',\n 'hash' => $row->hash \n );\n \n }\n else \n {\n // No hash for URL - generate a new one\n $hash = $this->generate_hash($url);\n return array\n (\n 'status' => 'No hash associated with URL, generating a new one',\n 'hash' => $hash\n ); \n }\n }", "public function writeHashOfLastUpdate($hash);", "public function setHash($hash)\n {\n }", "public function addHashInCache($full_hash,$lists,$meta,$cache_seconds);", "public function setDefaultHash($hash){ }", "public function byHash($hash);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Converts a date in AD to BS Returns false if the date is invalid or out of range The input and output date are in the format yyyymmdd
public function ad2bs($ad_date) { try { $ad_date = $this->dashDateToSlashDate($ad_date); $days_count=$this->countAdDays($this->ad_date_eq,$ad_date); if ($days_count === false) { die('invalid date'); return false; } return $this->addBsDays($this->bs_date_eq,$days_count); } catch(Exception $e) { die('invalid date'); return false; } }
[ "public static function check_makeDBDate($in)\n\t{\n\t\t$out = false;\n\t\t$in = trim($in);\n\t\t\n\t\t$split_char = null;\n\t\tif(strpos($in, '.') !== false) {\n\t\t\t$split_char = '.';\n\t\t} elseif(strpos($in, '-') !== false) {\n\t\t\t$split_char = '-';\n\t\t} elseif(strpos($in, '/') !== false) {\n\t\t\t$split_char = '/';\n\t\t} else {\n\t\t\t$split_char = false;\n\t\t}\n\t\t\n\t\tif($split_char) {\n\t\t\t$a1=explode(\" \",$in);\n\t\t\t$date = explode($split_char,$a1[0]);\n\t\t\tif (count($date)==3) {\n\t\t\t\t//check numeric values \n\t\t\t\tif(is_numeric($date[0])===false\n\t\t\t\t\t|| is_numeric($date[1])===false\n\t\t\t\t\t|| is_numeric($date[2])===false\n\t\t\t\t) {\n\t\t\t\t\t$out = false;\n\t\t\t\t} else {\n\t\t\t\t\t//check if isdate, else return false: checkdate(m,d,y)\n\t\t\t\t\tswitch ($split_char) {\n\t\t\t\t\t\tcase '.': //d.m.Y H:i:s\n\t\t\t\t\t\t\t$mon=$date[1];\n\t\t\t\t\t\t\t$day=$date[0];\n\t\t\t\t\t\t\t$year=$date[2];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '-': //Y-m-d H:i:s\n\t\t\t\t\t\t\t$mon=$date[1];\n\t\t\t\t\t\t\t$day=$date[2];\n\t\t\t\t\t\t\t$year=$date[0];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase '/': //Y/m/d H:i:s or d/m/Y H:i:s \n\t\t\t\t\t\t\t$mon=$date[1];\n\t\t\t\t\t\t\t$day=$date[2];\n\t\t\t\t\t\t\t$year=$date[0];\n\t\t\t\t\t\t\tif(checkdate($mon,$day,$year)===false) {\n\t\t\t\t\t\t\t\t$mon=$date[1];\n\t\t\t\t\t\t\t\t$day=$date[0];\n\t\t\t\t\t\t\t\t$year=$date[2];\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$out = false;\n\t\t\t\t\t\t\tbreak;\t\n\t\t\t\t\t}//switch\n\t\t\t\t\tif(strlen($year)!=4 || strlen($mon)!=2 || strlen($day)!=2) {\n\t\t\t\t\t\t$out = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif(checkdate($mon,$day,$year)===false) {\n\t\t\t\t\t\t\t$out = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$out = date('Y-m-d H:i:s',strtotime($in));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//count 3\n\t\t}//split_char\n\t\treturn $out;\n\t}", "private function checkduedate() {\r\n\t\tif($this->CheckDate($this->duedate)) {\r\n\t\t\t$this->setAddResultRecord(\"Invalid date format.<br>\");\r\n\t\t\t$this->validated = 0;\r\n\t\t}\r\n\t}", "public function date_validation($input){\n\t\t$test_date = explode('-', $input);\n\t\tif (!@checkdate($test_date[1], $test_date[2], $test_date[0])) {\n\t\t\t$this->form_validation->set_message('date_validation', 'This %s field must be in YYYY-MM-DD fromat.');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "private function checkbirthday() {\r\n\t\tif($this->CheckDate($this->birthday)) {\r\n\t\t\t$this->setAddResultRecord(\"Invalid birthday date format.<br>\");\r\n\t\t\t$this->validated = 0;\r\n\t\t}\r\n\t}", "function ajax_check_dob()\r\n {\r\n try\r\n {\r\n $i_dob=convert_date_mdy_format($this->input->post(\"s_dob\")); ////////This function written in helper.php \r\n if($i_dob > strtotime('-18 years'))\r\n {\r\n echo 'error'; \r\n } \r\n unset($i_dob); \r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n }\r\n }", "function validRangeDate($strDateFrom,$strDateTo){\r\n\t//if ()\r\n}", "function date2db($Datum) {\n if ( empty($Datum) ) return date(\"Y-m-d\");\n $repl = array (\"/\",\"-\",\",\",\" \");\n $date = str_replace($repl,\".\",$Datum);\n $t = explode(\".\",$date);\n if ( checkdate($t[1],$t[0],$t[2]) ) {\n if ( $t[2] <= date('y') + 20 ) {\n $Datum = sprintf('20%02d-%02d-%02d',$t[2],$t[1],$t[0]);\n } else if ( $t[2] > 100 ) {\n $Datum = sprintf('%04d-%02d-%02d',$t[2],$t[1],$t[0]);\n } else {\n $Datum = sprintf('19%02d-%02d-%02d',$t[2],$t[1],$t[0]);\n }\n }\n return $Datum;\n}", "function valid_date_mm_dd_yyyy($date=NULL){\n\tif(preg_match(\"~^\\d{1,2}([/.-])\\d{1,2}\\\\1\\d{4}$~\", $date)==1){\n\t\tlist($m,$d,$y)=explode(\"/\",$date);\n\t\treturn checkdate($m,$d,$y);\n\t}\n\treturn FALSE;\n}", "function tools_convert_date_from_br2($date) {\n\t$pieces = explode('-', $date);\n\treturn $pieces[2] . '/' . $pieces[1] . '/' . $pieces[0];\n}", "function validaDataSimplesBR($data) {\n $dataex = explode(\"-\", $data);\n $dDia = $dataex[0];\n $dMes = $dataex[1];\n $dAno = $dataex[2];\n\n //echo $dataex[0]\n\n if (checkdate($dMes, $dDia, $dAno) == \"1\") {\n return true;\n } else {\n return false;\n }\n}", "function verify_date($sql_date)\n{\n $thn = substr($sql_date, 0, 4);\n $bln = substr($sql_date, 5, 2);\n $tgl = substr($sql_date, 8, 2);\n $bener = checkdate($bln, $tgl, $thn);\n return $bener;\n}", "function verify_date ($sql_date)\n{\n\t$thn = substr($sql_date, 0, 4);\n\t$bln = substr($sql_date, 5, 2);\n\t$tgl = substr($sql_date, 8, 2);\n\t$bener = checkdate($bln, $tgl, $thn);\n\treturn $bener;\n}", "function full_booked_date ( $str, $val )\n\t{\n\t\treturn FALSE;\n\t}", "public function dateValidation() {\n $dobs = $this->request->getPost('AdobOne');\n $adut = $this->request->getPost('ddlAdult', 'int');\n $flag = false;\n for ($i = 0; $i < $adut; $i++) {\n if (!isset($dobs[$i]) || $dobs[$i] == '')\n $flag = true;\n }\n if ($flag == false)\n return false; // field is valid\n return 'Please Enter Date of Birth'; // field is not valid\n }", "function redate($date_str, $format = 'F d, Y', $invalid_str = 'n/a', $accept_1969 = false) {\n\t$ts = is_blank($date_str) ? false : strtotime($date_str);\n\treturn ($ts && ($ts!=-64800 || $accept_1969)) ? date($format, $ts) : $invalid_str;\n}", "public static function sanitize_date($input) {\n return self::sanitize_datetime($input, 'Y-m-d');\n }", "function convertDateToYYYYMMDD($date)\r\n{\t\r\n\treturn date(\"Y/m/d\", mktime(0, 0, 0,\r\n\t\t (int)substr($date,4,2),\r\n\t\t (int)substr($date,6,2),\r\n\t\t (int)substr($date,0,4)));\r\n}", "function validDate($date){\n\t$d = DateTime::createFromFormat('m/d/Y', $date);\n\treturn $d && $d->format('m/d/Y') === $date;\n}", "function inDateRange(&$request){\n global $dateFields;\n foreach ($dateFields as $dateField){\n $fromYearField = \"{$dateField}FromYear\";\n $toYearField = \"{$dateField}ToYear\";\n if (!($_REQUEST[$fromYearField] || $_REQUEST[$toYearField]))\n continue;\n else{\n $fromYear = \"0000\"; // YYYY as string\n $fromMonth = \"00\"; // MM as string\n $fromDay = \"00\"; // DD as string\n if ($_REQUEST[$fromYearField]){\n $fromYear = str_pad((int) $_REQUEST[$fromYearField],4,\"0\",STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}FromMonth\"])\n $fromMonth = str_pad((int) $_REQUEST[\"{$dateField}FromMonth\"],2,\"0\",STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}FromDay\"])\n $fromDay = str_pad((int) $_REQUEST[\"{$dateField}FromDay\"],2,\"0\",STR_PAD_LEFT);\n }\n $toYear = \"9999\"; // YYYY as string\n $toMonth = \"99\"; // MM as string\n $toDay = \"99\"; // DD as string\n if ($_REQUEST[$toYearField]){\n $toYear = str_pad(((int) $_REQUEST[$toYearField]?$_REQUEST[$toYearField]:\"9999\"),4,\"0\",STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}ToMonth\"])\n $toMonth = str_pad(((int) $_REQUEST[\"{$dateField}ToMonth\"]?$_REQUEST[\"{$dateField}ToMonth\"]:\"99\"),\n 2,\n \"0\",\n STR_PAD_LEFT);\n if ($_REQUEST[\"{$dateField}ToDay\"])\n $toDay = str_pad(((int) $_REQUEST[\"{$dateField}ToDay\"]?$_REQUEST[\"{$dateField}ToDay\"]:\"99\"),\n 2,\n \"0\",\n STR_PAD_LEFT);\n }\n $xmlField = str_replace('_','-',$dateField);\n if (!((string) $request->$xmlField >= \"$fromYear.$fromMonth.$fromDay\" &&\n (string) $request->$xmlField <= \"$toYear.$toMonth.$toDay\"))\n return false;\n }\n }\n return true;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
saveLocal Saves its attachment data to timestamped file in the same directory
public function saveLocal($file_path) { $now = new \DateTime(); $now = $now->format('m-d-Y'); $file_uri = $file_path . "/{$now}-{$this->name}"; file_put_contents($file_uri, base64_decode($this->contentBytes)); return $file_uri; }
[ "public function saveLocal() {\n\t\t$meta_handle = @fopen( Utils\\get_snapshot_directory() . $this->id . '/meta.json', 'x' ); // Create file and fail if it exists.\n\n\t\tif ( ! $meta_handle ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn fwrite( $meta_handle, json_encode( $this->meta, JSON_PRETTY_PRINT ) );\n\t}", "public function custom_save() {\n $path = storage_path('app/attachments');\n $filename = $this->token();\n $path = substr($path, -1) == DIRECTORY_SEPARATOR ? $path : $path.DIRECTORY_SEPARATOR;\n\n $file = File::put($path.$filename, $this->getContent()) !== false;\n\n $emailAttachment = new EmailAttachment();\n\n $emailAttachment->uid = $this->getMessage()->getUid();\n $emailAttachment->attachmentid = $this->id;\n $emailAttachment->filename = $filename = $this->token();\n $emailAttachment->original = $this->name;\n $emailAttachment->mime = \\Storage::disk('attachments')->mimeType($filename);\n\n $emailAttachment->save();\n }", "function mci_file_write_local( $p_diskfile, $p_content ) {\n\t$t_handle = fopen( $p_diskfile, \"w\" );\n\tfwrite( $t_handle, $p_content );\n\tfclose( $t_handle );\n}", "public function packLocalFileData(): string\n {\n return pack(\n 'VvvPPP',\n 0,\n self::TIME_ATTR_TAG,\n self::TIME_ATTR_SIZE,\n $this->modifyNtfsTime,\n $this->accessNtfsTime,\n $this->createNtfsTime\n );\n }", "public function packLocalFileData();", "public function storage_append_by_filename($local_filename, $group_name, $appender_filename, $tracker_server=array(), $storage_server=array()){}", "function write_local_key($local_key, $path) {\n\t\t@fopen( $path, 'w' );\n\t\t$fp = ;\n\n\t\tif (!$fp) {\n\t\t\treturn $this->errors = $this->status_messages['could_not_save_local_key'];\n\t\t}\n\n\t\t@fwrite( $fp, $local_key );\n\t\t@fclose( $fp );\n\t\treturn true;\n\t}", "private function saveFile()\n\t{\n\t\tfile_put_contents($this->filename, serialize($this->persistenceArray));\n\t}", "public function storage_append_by_filename1($local_filename, $appender_file_id, $tracker_server=array(), $storage_server=array()){}", "function write_local_key($local_key, $path)\n\t\t{\n\t\t$fp=@fopen($path, 'w');\n\t\tif (!$fp) { return $this -> errors=$this->status_messages['could_not_save_local_key']; }\n\t\t@fwrite($fp, $local_key);\n\t\t@fclose($fp);\n\n\t\treturn true;\n\t\t}", "public function upload_local_file()\n\t{\n if ($this->local_file) {\n \t$s3 = AWS::createClient('s3');\n $s3->putObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location,\n 'SourceFile' => $this->local_file,\n 'ContentType' => $this->mime,\n 'StorageClass' => $this->storage,\n 'ServerSideEncryption' => $this->encryption\n )\n );\n }\n\t}", "public function save()\n\t{\n\t\tset_time_limit(0);\n\t\tTwitchHelper::log(TwitchHelper::LOG_INFO, \"Save {$this->basename}\");\n\n\t\tforeach ($this->associatedFiles as $file) {\n\t\t\tif (file_exists($this->directory . DIRECTORY_SEPARATOR . $file)) {\n\t\t\t\tTwitchHelper::log(TwitchHelper::LOG_DEBUG, \"Save {$file}\");\n\t\t\t\trename($this->directory . DIRECTORY_SEPARATOR . $file, TwitchHelper::$public_folder . DIRECTORY_SEPARATOR . \"saved_vods\" . DIRECTORY_SEPARATOR . $file);\n\t\t\t}\n\t\t}\n\t}", "function savefile($lob) {}", "public function persist()\n {\n $filename = $this->getCacheFilename();\n $data = json_encode($this->attendees);\n\n file_put_contents($filename, $data);\n }", "public static function upload(/*$localFile, $name, $attributes = array()*/)\n {\n $args = func_get_args();\n $argsCnt = func_num_args();\n if($argsCnt == 3 && is_uploaded_file($args[0]))\n {\n $localFile = $args[0];\n $name = $args[1];\n $attributes = $args[2];\n }\n elseif($argsCnt == 2)\n {\n $localFile = tempnam(getConfig()->get('server')->tempDir, 'opme');\n $name = basename($localFile).'.jpg';\n $attributes = $args[1];\n file_put_contents($localFile, base64_decode($args[0]));\n }\n else\n {\n return false;\n }\n\n $fs = getFs();\n $db = getDb();\n $id = User::getNextPhotoId();\n // TODO: add a log message\n if($id === false)\n return false;\n $paths = Photo::generatePaths($name);\n // resize the base image before uploading\n $localFileCopy = \"{$localFile}-copy}\";\n copy($localFile, $localFileCopy);\n\n $exiftran = getConfig()->get('modules')->exiftran;\n if(is_executable($exiftran))\n exec($cmd = sprintf('%s -ai %s', getConfig()->get('modules')->exiftran, escapeshellarg($localFileCopy)));\n\n $baseImage = getImage($localFileCopy);\n $baseImage->scale(getConfig()->get('photos')->baseSize, getConfig()->get('photos')->baseSize);\n $baseImage->write($localFileCopy);\n $uploaded = $fs->putPhotos(\n array(\n array($localFile => $paths['pathOriginal']),\n array($localFileCopy => $paths['pathBase'])\n )\n );\n if($uploaded)\n {\n $exif = self::readExif($localFile);\n $defaults = array('title', 'description', 'tags', 'latitude', 'longitude');\n foreach($defaults as $default)\n {\n if(!isset($attributes[$default]))\n $attributes[$default] = null;\n }\n $dateUploaded = time();\n $dateTaken = @$exif['dateTaken'];\n $attributes = array_merge(\n $attributes, \n self::getDefaultAttributes(),\n array(\n 'hash' => sha1_file($localFile),\n 'size' => intval(filesize($localFile)/1024),\n 'exifCameraMake' => @$exif['cameraMake'],\n 'exifCameraModel' => @$exif['cameraModel'],\n 'width' => @$exif['width'],\n 'height' => @$exif['height'],\n 'dateTaken' => $dateTaken,\n 'dateTakenDay' => date('d', $dateTaken),\n 'dateTakenMonth' => date('m', $dateTaken),\n 'dateTakenYear' => date('Y', $dateTaken),\n 'dateUploaded' => $dateUploaded,\n 'dateUploadedDay' => date('d', $dateUploaded),\n 'dateUploadedMonth' => date('m', $dateUploaded),\n 'dateUploadedYear' => date('Y', $dateUploaded),\n 'pathOriginal' => $paths['pathOriginal'], \n 'pathBase' => $paths['pathBase']\n )\n );\n $stored = $db->putPhoto($id, $attributes);\n unlink($localFile);\n unlink($localFileCopy);\n if($stored)\n return $id;\n }\n return false;\n }", "private function save()\n\t{\n\t\t$this->data['date'] = date('Y-m-d');\n\t\t$this->data['timestamp'] = $this->timestamp;\n\t\t// If the file exists, it must be writable. If it doesn't exist, the directory must be writable.\n\t\tif (is_writable($this->fileName) || (!file_exists($this->fileName) && is_writable(dirname($this->fileName)))) {\n\t\t\tfile_put_contents($this->fileName, json_encode($this->data));\n\t\t}\n\t}", "protected function saveToTempFile()\n {\n // Convert uploaded file to an array\n $aFiles = [];\n foreach($this->aUserFiles as $sVarName => $aUserFiles)\n {\n $aFiles[$sVarName] = [];\n foreach($aUserFiles as $aUserFile)\n {\n $aFiles[$sVarName][] = $aUserFile->toTempData();\n }\n }\n // Save upload data in a temp file\n $sUploadDir = $this->getUploadTempDir();\n $this->sTempFile = uniqid();\n file_put_contents($sUploadDir . $this->sTempFile . '.json', json_encode($aFiles));\n }", "function fastdfs_storage_append_by_filename(string $local_filename,\r\n string $group_name, $appender_filename,\r\n array $tracker_server = [], array $storage_server = []): bool\r\n{\r\n}", "private function saveFile(Request $request)\n {\n $filename = 'fleetstat-' . Carbon::now()->format('YmdHis') . '-' . $request->notice . '.txt';\n $time = Carbon::now()->addHours(8)->format('Y-m-d H:i:s');\n $username = auth()->user()->main_character->name;\n\n $text = <<<TEXT\nTime: $time\nFC: $username\nPoint: $request->point\nNotice: $request->notice\nMember:\n$request->text\nTEXT;\n\n Storage::disk('local')->put(\"fleetstat/$filename\", $text);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Firewall 2: Check File Mime Type name: checkMime
public function checkMime() { // Get the file mime type using the browser $mime = mime_content_type($this->getTempName()); // Check if the file mime type is whitelisted if (in_array($mime, $this->mime_array)) { // Check if the browser mime type equals the server mime type if ($mime == $this->getMime()) { return true; // Return true if the mime type is not blacklisted } else { $this->add_log(null, ['filename' => $this->getName(), "message" => 1]); // Show an error message } } }
[ "public function mimeCheck($val, $type){\n\t\t\n\t}", "public abstract function isMime();", "function mime_content_type($filename){}", "function mime_content_type ($filename) {}", "public function isMime() : bool;", "public function allowedMimeTypes();", "function mime_content_type($filename): string|false {}", "function check_upload_mimes($mimes)\n {\n }", "abstract public function testHasAcceptedMimeTypes();", "public function checkImage(){\n $mime_list = new \\CanaryPHPFile\\FileMimeTypes();\n return in_array($this->_MIME,$mime_list->image());\n}", "function filetype_whitelisted() {\n $whitelist = ecu_get_whitelist();\n return preg_match('/^[^\\\\.]+\\\\.(' . implode('|', $whitelist)\n . ')$/i', $_FILES['file']['name']);\n }", "public function isMimeSupported($mimeType = '*');", "function ft_check_filetype($file) {\n $type = strtolower(ft_get_ext($file));\n // Check if we are using a whitelist.\n if (FILETYPEWHITELIST != \"\") {\n // User wants a whitelist\n $whitelist = explode(\" \", FILETYPEWHITELIST);\n if (in_array($type, $whitelist)) {\n return TRUE;\n } else {\n return FALSE;\n } \n } else {\n // Check against file blacklist.\n if (FILETYPEBLACKLIST != \"\") {\n $blacklist = explode(\" \", FILETYPEBLACKLIST);\n if (in_array($type, $blacklist)) {\n return FALSE;\n } else {\n return TRUE;\n }\n } else {\n return TRUE;\n }\n }\n}", "function mime($x)\n {\n if(!isText($x,1)){return;}; $x=trim($x); if(!$x){return;};\n if(isPath($x)){$x=path::type($x);}elseif(isin($x,'.')){$x=rstub($x,'.')[2]; $x=trim($x); if(!$x){return;}};\n $r=conf('Proc/mimeType')->$x; return $r;\n }", "public function supportedMimeTypes();", "function remote_mime_type($url){\n\n //collect the file from the remote location\n $buffer = file_get_contents($url);\n\n if($buffer){\n\n $file_info = new finfo(FILEINFO_MIME_TYPE);\n\n //if file_info could not be loaded, trigger error.\n if(! $file_info){\n trigger_error('File Info could not be instantiated, magic could most likely not be loaded.', E_USER_ERROR);\n return false;\n }\n\n return $file_info->buffer($buffer);\n }else{\n return false;\n }\n }", "function sanitize_mime_type($mime_type)\n{\n}", "function sanitize_mime_type($mime_type)\n {\n }", "function checkMimeType($file) {\n\t\t$tipos = array (\n\t\t\t\"application/x-gzip-compressed\" => 1,\n\t\t\t\"application/x-zip-compressed\" => 1,\n\t\t\t\"application/x-tar\" => 1,\n\t\t\t\"text/plain\" => 2,\n\t\t\t\"text/html\" => 3,\n\t\t\t\"image/bmp\" => 4,\n\t\t\t\"image/gif\" => 4,\n\t\t\t\"image/jpeg\" => 4,\n\t\t\t\"image/pjpeg\" => 4,\n\t\t\t\"application/pdf\" => 7,\n\t\t\t\"application/msword\" => 8,\n\t\t\t\"application/csv\" => 9,\n\t\t\t\"application/x-msexcel\" => 9,\n\t\t\t\"application/x-mspowerpoint\" => 10\n\t\t);\n\n\t\tforeach ($tipos as $tipo => $valor) {\n\t\t\tif ($tipo == $file['type'])\n\t\t\t\treturn $valor;\n\t\t}\n\t\treturn 0;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Unsets taxes to disable field.
public function unsetTaxesToDisable(): self { $this->instance->unsetTaxesToDisable(); return $this; }
[ "public function unsetTaxes(): void\n {\n $this->taxes = [];\n }", "public function unsetTaxable(): void\n {\n $this->taxable = [];\n }", "public function unsetTaxIds(): void\n {\n $this->taxIds = [];\n }", "public function unsetUpdateItemTaxesMaxTaxesToEnable(): void\n {\n $this->updateItemTaxesMaxTaxesToEnable = [];\n }", "public function unsetAutoApplyTaxes(): void\n {\n $this->autoApplyTaxes = [];\n }", "public function unsetRefundedInclusiveTax(): void\n {\n $this->refundedInclusiveTax = [];\n }", "public final function setSalesTaxToZero(){\n $this->salesTax = 0;\n }", "public function removeTaxAdjustments();", "public function unsetTax($index)\n {\n unset($this->tax[$index]);\n }", "public function unsetTaxRateDescription(): void\n {\n $this->taxRateDescription = [];\n }", "public function unsetTaxUid(): self\n {\n $this->instance->unsetTaxUid();\n return $this;\n }", "public static function remove_order_tax()\n {\n }", "public function unsetTaxIds(): self\n {\n $this->instance->unsetTaxIds();\n return $this;\n }", "public function unsetTaxPercentage(): self\n {\n $this->instance->unsetTaxPercentage();\n return $this;\n }", "public function unsetTaxTotal($index)\n {\n unset($this->taxTotal[$index]);\n }", "private function setTax()\n {\n if($this->taxIncluded){\n $this->tax = $this->calculateTaxIncluded();\n $this->setTotalBeforeTax();\n }else{\n $this->tax = $this->calculateTaxAddOn();\n } \n }", "function setTaxes()\n {\n $this->taxes = round($this->subtotal*TAX_RATE/100, 2);\n }", "public function setTaxExempt(bool $tax_exempt): void\n {\n $this->_tax_exempt = $tax_exempt;\n }", "public function unsetAmount(): void\n {\n $this->amount = [];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns an ANSI92 compliant SQL state.
public function getSQLState() { return $this->sqlState; }
[ "function supportsANSI92IntermediateSQL(){\r\n\t\tdie('Not implemented');\r\n\t}", "public function getSQLState();", "public function getSQLState()\r\n\t{\r\n\t\treturn NULL;\r\n\t}", "public function getSQLState() {\n\t\treturn $this->getMessage();\n\t}", "public function getSQLState() {\n\t\treturn $this->sqlState;\n\t}", "public function sqlState(){\n return $this->pdoStatement->errorCode();\n }", "public function getSQLState()\n {\n return $this->driverException->getSQLState();\n }", "public function getLastErrorSqlState()\n {\n return $this->driver->getLastErrorSqlState();\n }", "public function isAnsi()\n {\n return $this->isAnsi;\n }", "protected function getStateQuery()\n\t{\n\t\t$sql = $this->db->getQuery(true);\n\t\t$sql->select($this->db->quoteName('b.book_id'));\n\t\t$sql->select($this->db->quoteName('b.published') . ' AS book_state');\n\t\t$sql->from($this->db->quoteName('#__lendr_books') . ' AS b');\n\n\t\treturn $sql;\n\t}", "public function getState()\n\t{\n\t\t$column = self::COL_STATE;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getStatementFormat()\n {\n return $this->statementFormat;\n }", "protected static function getSQLState(\\Exception $e) {\n // The PDOException code is not always reliable, try to see whether the\n // message has something usable.\n if (preg_match('/^SQLSTATE\\[(\\w{5})\\]/', $e->getMessage(), $matches)) {\n return $matches[1];\n }\n else {\n return $e->getCode();\n }\n }", "public function getStagedQuoteState();", "protected function getMeaningOfSQLSTATE( $SQLSTATE )\n\t{\n\t\t$class1\t= substr( $SQLSTATE, 0, 2 );\n\t\t$class2\t= substr( $SQLSTATE, 2, 3 );\n\n\t\t$words\t\t= $this->env->getLanguage()->getWords( 'server/log/exception/sqlstate' );\n\t\tif( isset( $words[$class1][$class2] ) )\n\t\t\treturn $words[$class1][$class2];\n\t\treturn 'unknown';\n\t}", "public function getSqlMode();", "public function getOldStagedQuoteState();", "function &sqlHighlight( $string )\r\n {\r\n\r\n // some special characters\r\n $string = preg_replace ( \"/([(){},+-;]|=|\\[|\\])/\", \"<font color=\\\"green\\\">\\\\1</font>\", $string );\r\n\r\n $string = preg_replace ( \"#('.*?')#\", \"<font color=\\\"red\\\">\\\\1</font>\", $string );\r\n\r\n $string = preg_replace( \"/(\\([0-9]+\\))/\", \"<font color=\\\"green\\\">\\\\1</font>\", $string );\r\n $string = preg_replace( \"/('[0-9]+')/\", \"<font color=\\\"red\\\">\\\\1</font>\", $string );\r\n\r\n $reservedWords = array( \"/(DROP )/i\",\r\n \"/(CREATE )/i\",\r\n \"/(TABLE )/i\",\r\n \"/(DELETE )/i\",\r\n \"/(DROP )/i\",\r\n \"/(IF )/i\",\r\n \"/(EXISTS )/i\",\r\n \"/(DEFAULT )/i\",\r\n \"/(AUTO_INCREMENT)/i\",\r\n \"/(PRIMARY )/i\",\r\n \"/(KEY )/i\",\r\n \"/(NULL )/i\",\r\n \"/(NULL,)/i\",\r\n \"/(INSERT )/i\",\r\n \"/(INTO )/i\",\r\n \"/(VALUES )/i\",\r\n \"/(UNIQUE )/i\",\r\n \"/(INT )/i\",\r\n \"/(INT,)/i\",\r\n \"/(CHAR )/i\",\r\n \"/( TEXT,)/i\",\r\n \"/( TEXT )/i\",\r\n \"/(TIMESTAMP)/i\",\r\n \"/(VARCHAR)/i\",\r\n \"/( NOT )/i\",\r\n \"/( AND )/i\"\r\n );\r\n\r\n\r\n\r\n $string = preg_replace( $reservedWords, \"<font color=\\\"blue\\\">\\\\1</font>\", $string );\r\n\r\n\r\n\r\n // some special characters\r\n $string = preg_replace ( \"/([;,])/\", \"<font color=\\\"red\\\">\\\\1</font>\", $string );\r\n\r\n $string = \"<br clear=\\\"all\\\"><p><table width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"4\\\" border=\\\"0\\\"><tr><td bgcolor=\\\"#f0f0f0\\\"><pre>\" .\r\n $string . \"</pre></td></tr></table></p>\";\r\n\r\n return $string;\r\n }", "public function getState() {\n\t\treturn $this->queryBuilder->getState();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The constructor parses the incoming string, which is formatted as per RFC2445 as a propname[;param1=pval1[; ... ]]:propvalue however we allow ourselves to assume that the RFC2445 content unescaping has already happened when vComponent::ParseFrom() called vComponent::UnwrapComponent().
function ParseFrom( $propstring ) { $this->rendered = (strlen($propstring) < 73 ? $propstring : null); // Only pre-rendered if we didn't unescape it $unescaped = preg_replace( '{\\\\[nN]}', "\n", $propstring); // Split into two parts on : which is not preceded by a \ list( $start, $values) = preg_split( '{(?<!\\\\):}', $unescaped, 2); $this->content = preg_replace( "/\\\\([,;:\"\\\\])/", '$1', $values); // Split on ; which is not preceded by a \ $parameters = preg_split( '{(?<!\\\\);}', $start); $this->name = strtoupper(array_shift( $parameters )); $this->parameters = array(); foreach( $parameters AS $k => $v ) { $pos = strpos($v,'='); $name = strtoupper(substr( $v, 0, $pos)); $value = substr( $v, $pos + 1); $this->parameters[$name] = $value; } // dbg_error_log('vComponent', " vProperty::ParseFrom found '%s' = '%s' with %d parameters", $this->name, substr($this->content,0,200), count($this->parameters) ); }
[ "function parse($s)\n {\n $this->str = $s;\n $len = strlen($s);\n for ($i = 0; $i < $len; $i++)\n {\n // skip blanks\n for (; $i < $len && ($s[$i] == \" \" || $s[$i] == \"\\n\"); $i++);\n\n // find next occurance of separator\n if (($j = strpos($s, $this->valsep, $i)) === FALSE)\n $j = $len;\n\n // extract string which is the key\n $key = substr($s, $i, $j - $i);\n $i = $j;\n\n $val = \"\";\n // check of end of string\n if ($i < $len)\n {\n $i++;\n $sep = $s[$i];\n if ($sep == '\"' || $sep == \"'\")\n $i++;\n else\n $sep = $this->parsep;\n\n if (($j = strpos($s, $sep, $i)) === FALSE)\n $j = $len;\n\n $val = substr($s, $i, $j - $i);\n $i = $j + 1;\n }\n\n // add element to array\n $this->elem[$key] = $val;\n }\n }", "function parse($str) {\n\t\tpreg_match_all('/(\\w+)\\h*=\\h*(.+?)(?=,|$)/',\n\t\t\t$str,$pairs,PREG_SET_ORDER);\n\t\tforeach ($pairs as $pair)\n\t\t\t$this->hive['PARAMS'][$pair[1]]=trim($pair[2]);\n\t}", "abstract protected function setParsingParameters($string);", "protected function extractParametersFromParsedStr($params)\n\t{\n\t\t$params = ltrim($params);\n\n\t\t$params = str_replace('data-devise-<?php echo devise_tag_cid(', '', $params);\n\n\t\t$params = substr($params, 1);\n\n\t\t$params = substr($params, 0, -4);\n\n\t\t$params = str_getcsv($params);\n\n\t\tarray_walk($params, function(&$value) { $value = ltrim(rtrim($value)); });\n\n\t\t$this->id = $this->stripquotes($params[0]);\n\n\t\t$this->bindingType = $this->stripquotes($params[1]);\n\n\t\t$this->collection = $this->stripquotes($params[2]);\n\n\t\t$this->key = $this->stripquotes($params[3]);\n\n\t\t$this->type = $this->stripquotes($params[4]);\n\n\t\t$this->humanName = $this->stripquotes($params[5]);\n\n\t\t$this->collectionName = $this->stripquotes($params[6]);\n\n\t\t$this->group = $this->stripquotes($params[7]);\n\n\t\t$this->category = $this->stripquotes($params[8]);\n\n\t\t$this->alternateTarget = $this->stripquotes($params[9]);\n\n\t\t$this->defaults = $this->stripquotes($params[10]);\n\t}", "public function constructorParsesAFullBlownUriStringCorrectly() {\n\t\t$uriString = 'http://username:password@subdomain.domain.com:8080/path1/path2/index.php?argument1=value1&argument2=value2&argument3[subargument1]=subvalue1#anchor';\n\t\t$uri = new \\TYPO3\\FLOW3\\Property\\DataType\\Uri($uriString);\n\n\t\t$check = (\n\t\t\t$uri->getScheme() == 'http' &&\n\t\t\t$uri->getUsername() == 'username' &&\n\t\t\t$uri->getPassword() == 'password' &&\n\t\t\t$uri->getHost() == 'subdomain.domain.com' &&\n\t\t\t$uri->getPort() === 8080 &&\n\t\t\t$uri->getPath() == '/path1/path2/index.php' &&\n\t\t\t$uri->getQuery() == 'argument1=value1&argument2=value2&argument3[subargument1]=subvalue1' &&\n\t\t\t$uri->getArguments() == array('argument1' => 'value1', 'argument2' => 'value2', 'argument3' => array('subargument1' => 'subvalue1')) &&\n\t\t\t$uri->getFragment() == 'anchor'\n\t\t);\n\t\t$this->assertTrue($check, 'The valid and complete URI has not been correctly transformed to an URI object');\n\t}", "protected function parseParams():self\n\t{\n\t\t$params= preg_split('/(?<!\\\\\\\\)\\\\|/',$this->line->pregGet('/^-[\\w-:]+\\((.*?)\\)(?= |(\\\\{>)?$)/',1));\n\n\t\tif( ($m= count($params)) != ($n= count($this->config['params'])) ){$this->document->throw(\"Tag $this->name has $n parameters $m given.\");}\n\n\t\tarray_map(function( $key, $value ){return $this->setAttribute($key,$this->checkExpression(str_replace('\\\\|','|',$value)));},$this->config['params'],$params);\n\n\t\treturn $this;\n\t}", "abstract public function parse($string);", "function atkStringParser($string)\n {\n $this->m_string = $string;\n }", "public static function parseAttributes(string $string) {\n $result = new Properties();\n if ($string == NULL)\n return $result;\n $keyValuePairs = new StringTokenizer($string, \";\");\n $keyValuePair = NULL;//StringTokenizer\n $key = NULL;//string\n $value = NULL;//string\n while($keyValuePairs->hasMoreTokens()) {\n $keyValuePair = new StringTokenizer($keyValuePairs->nextToken(), \":\");\n if ($keyValuePair->hasMoreTokens()) {\n $key = trim($keyValuePair->nextToken());\n } else {\n continue;\n }\n if ($keyValuePair->hasMoreTokens()) {\n $value = trim($keyValuePair->nextToken());\n } else {\n continue;\n }\n if (StringHelpers::beginsWith($value, \"\\\"\")) {\n $value = substr($value, 1);\n }\n if (StringHelpers::endsWith($value, \"\\\"\")) {\n $value = substr($value, strlen($value)-1);\n }\n $result->setProperty(strtolower($key), $value);\n }\n return $result;\n }", "private function _parse () {\n if (!is_null($this->_components)) return ;\n\n foreach (explode(':', $this->_dataset) as $pair) {\n $key = '' ;\n $val = null ;\n $key_val = explode('=', $pair) ;\n switch (count($key_val)) {\n case 2: $val = $key_val[1] ;\n case 1: $key = $key_val[0] ; break ;\n default:\n throw new RegDBException (\n __METHOD__, \n \"invalid dataset specification '{$this->_dataset}'\") ;\n }\n switch ($key) {\n case 'exp':\n case 'run':\n case 'dir':\n case 'stream':\n if (is_null($val))\n throw new RegDBException (\n __METHOD__, \n \"dataset parameter '{$key}' must have a value\") ;\n break ;\n default:\n // Force others not to have any value even if the one was provided\n // in the dataset specification.\n $val = '' ;\n }\n $this->_components[$key] = $val ;\n }\n }", "function tidy_parse_string($input, $config = null, $encoding = null) {}", "private function _parseString()\n {\n parse_str( $this->_body, $_POST );\n }", "function parseString($string) {\n \n\t\t$string = trim($string);\n\t\t\n\t\tif(!strlen($string)) return;\n\t\t\n\t\t$parts = preg_split('/[\\s]+/', $string);\n\n\t\tforeach ($parts as $part) {\n\t\t\tif (strpos($part, '-') !== false) {\n\t\t\t\tlist($name, $value) = explode('-', $part, 2);\n\t\t\t\t$this->_data[$name] = $value;\n\t\t\t}\n\t\t}\n\t}", "public function parse( $param ) {\n\t\t$comment = '';\n\t\t$param = MIME_Type::stripComments( $param, $comment );\n\t\t$this->name = $this->getAttribute( $param );\n\t\t$this->value = $this->getValue( $param );\n\t\t$this->comment = $comment;\n\t}", "static function parseExtConf($str, $prefix = '', $unescape = false) {\n $result = array();\n\n $block = null;\n $value = '';\n\n foreach (explode(\"\\n\", $str) as $line) {\n if ($block === null) {\n $line = trim($line);\n\n if ($line !== '' and strpbrk($line[0], '#;') === false) {\n $parts = explode('=', $line);\n $key = array_shift($parts);\n $value = '';\n\n foreach ($parts as $i => $part) {\n if ($part === '') {\n // an empty value part: 'key ='\n if (!isset($parts[$i + 1])) { break; }\n } elseif ($i and $parts[$i - 1] === '') {\n $key .= \"=$part\";\n } else {\n $value = join('=', array_slice($parts, $i));\n break;\n }\n }\n\n $key = rtrim($key);\n $value = ltrim($value);\n\n if ($value === '{') {\n $block = $key;\n $value = '';\n } elseif (isset($value)) {\n $result[$prefix.$key] = $unescape ? stripcslashes($value) : $value;\n }\n }\n } elseif ($line === '}') {\n $result[$prefix.$block] = (string) substr($value, 0, -1);\n $block = null;\n } else {\n $value .= rtrim($line).\"\\n\";\n }\n }\n\n return $result;\n }", "public function testParseStringRepresentationIntoAValueObject()\n {\n self::assertEquals(\n new Version(1, 2, 3, ['alpha', '1'], ['20161004']),\n parse('1.2.3-alpha.1+20161004'),\n 'The value object was not created properly.'\n );\n }", "public function fromString($sURI)\n {\n if (!is_string($sURI)) {\n throw new InvalidArgumentException(\n sprintf(\n self::EX_INVALID_TYPE,\n 'URI',\n gettype($sURI)\n ),\n 1\n );\n } // if\n\n if ($this->aConfig[self::OPT_USE_PHP_PARSER]) {\n $aResult = $this->parseFromStringNative($sURI);\n } else {\n $aResult = $this->parseFromStringRegexp($sURI);\n } // if\n\n $this->fromArray($aResult);\n\n return $this;\n }", "public function parse($versionString);", "function parse(string $string) : Version\n{\n $components = parse_components($string);\n\n return new Version(\n $components['major'],\n $components['minor'],\n $components['patch'],\n $components['pre-release'],\n $components['build']\n );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Function returns mandatory field Models.
public function getMandatoryFieldModels() { $mandatoryFields = []; if ($fieldsArray = $this->getFields()) { foreach ($fieldsArray as $field) { if ($field->isActiveField() && $field->isMandatory()) { $mandatoryFields[$field->getName()] = $field; } } } return $mandatoryFields; }
[ "public function getRequiredFields(): array;", "public function zohoMandatoryFields(): array;", "public function getRequiredFields()\n {\n return array();\n }", "abstract protected function getRequiredFields();", "public function getMandatoryImportableFields()\n\t{\n\n\t\t$focus = CRMEntity::getInstance($this->moduleName);\n\t\tif (method_exists($focus, 'getMandatoryImportableFields')) {\n\t\t\t$mandatoryFields = $focus->getMandatoryImportableFields();\n\t\t} else {\n\t\t\t$moduleFields = $this->getAccessibleFields();\n\t\t\t$mandatoryFields = [];\n\t\t\tforeach ($moduleFields as $fieldName => $fieldInstance) {\n\t\t\t\tif ($fieldInstance->isMandatory() && $fieldInstance->getFieldDataType() != 'owner' && $this->isEditableField($fieldInstance)) {\n\t\t\t\t\t$mandatoryFields[$fieldName] = $fieldInstance->getFieldLabelKey();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $mandatoryFields;\n\t}", "public function getRequiredFields()\n {\n return [\n ];\n }", "public function getMandatoryFields()\n {\n if ($this->_mandatoryFields === null) {\n $this->_mandatoryFields = [];\n $mandatoryFields = $this->_config->get('dataprocessing/mandatory/fields');\n\n if (is_array($mandatoryFields)) {\n foreach ($mandatoryFields as $fieldName => $empty) {\n $this->_mandatoryFields[] = $fieldName;\n }\n }\n }\n\n return $this->_mandatoryFields;\n }", "protected function getRequiredFields()\n {\n $required = [];\n foreach($this->schema as $field => $fieldSchema) {\n if(isset($fieldSchema['options']['required']) && $fieldSchema['options']['required']) {\n $required[] = $field;\n }\n }\n return $required;\n }", "public function getConditionalRequiredFields()\n {\n return [\n ];\n }", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'support' => 'string',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "public function getRequiredFields(): array\n {\n $this->getModel()->getRequiredFields();\n }", "public function getFrontEndRequiredFields();", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'title' => 'string',\n\t\t\t'description' => 'string',\n\t\t\t'price' => 'float',\n\t\t\t'devise' => 'string',\n\t\t\t'console_idConsole' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "public function getObjectTypeResolverMandatoryFields() : array;", "public static function requiredModels()\n {\n $required = [\n 'log',\n 'user'\n ];\n return $required;\n }", "public function getRequiredFields()\n {\n return $this->schema->required;\n }", "protected function __getFieldsModel()\n {\n }", "public static function getRequiredFields()\n\t{\n\t\t$requiredFields = [\n\t\t\t'name' => 'string',\n\t\t\t'content' => 'string',\n\t\t\t'console_idConsole' => 'int',\n\t\t];\n\n\t\treturn $requiredFields;\n\t}", "protected function getModelFields()\n {\n\n $md = $this->getModel();\n $model = null;\n\n if($md !== null)\n {\n $model = new $md();\n return $model->getFillable();\n }\n\n return [];\n\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
TODO: Implement saveDB() method.
public function saveDB() { }
[ "public function saveToDB()\n {\n }", "public function saveToDb()\n\t{\n\t\t$this->saveQuestionSequence();\n\t\t$this->saveNewlyCheckedQuestion();\n\t}", "function saveToDatabase()\r\n\t{\r\n\t\t$moDAO = new MoDao(new MySQL());\r\n\t\treturn $moDAO->save($this);\r\n\t}", "public function saveToDb()\n\t{\n\t\tDB::transaction(function ()\n\t\t{\n\t\t\tDB::table(self::DB_NAME)->insert(\n\t\t\t\t[\n\t\t\t\t\t'file_name' => $this->file_name,\n\t\t\t\t\t'full_path' => $this->full_path,\n\t\t\t\t\t'data' => $this->getFileContents(),\n\t\t\t\t\t'finished_at' => Carbon::now()->toDateTimeString()\n\t\t\t\t]\n\t\t\t);\n\t\t});\n\t}", "public function save_to_db(): void {\n global $DB;\n\n $new = $this->convert_to_db_object();\n if (empty($this->record->id)) {\n // New record.\n if (empty($new->timecreated)) {\n $this->record->timecreated = time();\n $new->timecreated = $this->record->timecreated;\n }\n $id = $DB->insert_record(static::TABLE, $new);\n $this->record->id = $id;\n } else {\n // Existing record.\n $DB->update_record(static::TABLE, $new);\n }\n }", "public function save() {\n // Get db fields for this object\n $vars = $this->getDbFields();\n\n // Prepare save query\n\t\t$save_query = \"UPDATE \" . static::$tableName . \" SET \";\n\t\tforeach ($vars as $key => $value) {\n\t\t\t$save_query .= $key . \"='$value', \";\n\t\t}\n $save_query = substr($save_query, 0, strlen($save_query) - 2)\n . \" \" . $this->genPrimaryKeyWhereClause(); \n \n // Execute save query\n self::$database->query($save_query);\n }", "abstract public function &db();", "public function save()\n {\n $this->dbh->update(Kernel::REGISTRY_COLLECTION, $this->store);\n }", "public function toDatabase()\n {\n\n if($this->i_PinkieID > 0)\n {\n $this->update();\n }\n else\n {\n $this->addNew();\n }\n }", "public function saveToDB(){\n\t\t\tforeach($this->formFields_ as $formField)\n\t\t\t\t$formField->saveToDB($this->formID(), $this->moduleID());\n\t\t}", "public function testSave()\n {\n $db = new \\Filebase\\Database([\n 'dir' => __DIR__.'/databases',\n 'cache' => false\n ]);\n\n $db->flush(true);\n\n // save data\n $doc = $db->get('test_save')->save(['key'=>'value']);\n\n // get saved data (put into array)\n $val = $db->get('test_save');\n\n // should equal...\n $this->assertEquals('value', $val->key);\n\n $db->flush(true);\n }", "public function save()\n\t{\n\t\t$db = $this->connection->connect();\n\t\tprint $db.'Saved to database.';\n\t}", "public function saveData();", "public function save()\n {\n\n // generate all column's sql query\n $column_names = '';\n $column_values = '';\n foreach ($this->columns as $field_name => $column_obj)\n {\n if ($column_obj->columnName === null) {\n $column_names .= $field_name.', ';\n } else {\n $column_names .= $column_obj->columnName.', ';\n }\n $column_values .= $column_obj->generateValueForSQL().', ';\n }\n $column_names = substr($column_names, 0, -1);\n $column_values = substr($column_values, 0, -1);\n $this_table_name = $this->table_name;\n $this_id = $this->id;\n\n if ($this->id === 0) {\n // This object is not saved yet.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values);';\n // Execute query\n } else {\n // This object is on the DB.\n $query = 'INSERT INTO $this_table_name ($column_names) VALUES ($column_values) WHERE id=$this_id;';\n // Execute query\n }\n\n mysql_run_query($query);\n\n }", "public function save()\n {\n // Updates the database\n if ($this->update() == 0) {\n // If no object was updated insert a new one\n $this->insert();\n }\n }", "protected abstract function doSave();", "public function save()\n {\n // If deposit is new, will get assigned database ID.\n $this->dbID = $this->db->saveDeposit($this);\n }", "public function save()\n {\n if ($collection = DBM_Collection::where('name', $this->collection)->first()) {\n $collection->fields()->delete();\n $collection->delete();\n }\n\n $collection = new DBM_Collection;\n $collection->name = $this->collection;\n $collection->old_name = $this->collection;\n $collection->extra = '';\n $collection->created_at = now();\n $collection->updated_at = now();\n $collection->save();\n\n foreach ($this->columns as $column) {\n $field = new CollectionField;\n $field->dbm_collection_id = $collection->_id;\n foreach ($column as $key => $value) {\n $field->{$key} = $value;\n }\n\n $field->save();\n }\n\n $this->columns = [];\n $this->name = '';\n }", "public function save()\n {\n $properties = array();\n $getFuncs = $this->getAccessorFunctions();\n\n foreach ($getFuncs as $mysqlColumnName => $callback)\n {\n /* @var $callback Callback */\n $property = $callback();\n $properties[$mysqlColumnName] = $property;\n }\n\n if (!isset($this->m_id) || $this->m_id == null)\n {\n $createdObject = $this->getTableHandler()->create($properties);\n $this->m_id = $createdObject->get_id();\n }\n else\n {\n $this->getTableHandler()->update($this->m_id, $properties);\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the total number of lessons in the course.
public function setTotalLessons($TotalLessons) { $this->TotalLessons = $TotalLessons; }
[ "function setNumberOfPages(){\n $this->pages = ceil($this->getTotal()/$this->getPerPage());\n }", "public function setCourseExaminationCount($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->course_examination_count !== $v || $v === 2) {\n\t\t\t$this->course_examination_count = $v;\n\t\t\t$this->modifiedColumns[] = SubjectConfigurationPeer::COURSE_EXAMINATION_COUNT;\n\t\t}\n\n\t\treturn $this;\n\t}", "protected function setNumImprovements()\n {\n $slots = 0;\n $slots += $this->coalPower;\n $slots += $this->oilPower;\n $slots += $this->nuclearPower;\n $slots += $this->windPower;\n $slots += $this->coalMines;\n $slots += $this->ironMines;\n $slots += $this->oilWells;\n $slots += $this->bauxiteMines;\n $slots += $this->leadMines;\n $slots += $this->uraniumMines;\n $slots += $this->farms;\n $slots += $this->oilWells;\n $slots += $this->steelMills;\n $slots += $this->aluminumFactories;\n $slots += $this->munitionsFactories;\n $slots += $this->policeStations;\n $slots += $this->hospitals;\n $slots += $this->recyclingCenters;\n $slots += $this->subways;\n $slots += $this->supermarkets;\n $slots += $this->banks;\n $slots += $this->malls;\n $slots += $this->stadiums;\n $slots += $this->barracks;\n $slots += $this->factories;\n $slots += $this->hangars;\n $slots += $this->drydocks;\n\n $this->numImprovements = $slots;\n }", "public function setTotalNumberOfTrials($totalNumberOfTrials);", "public function setTotalParticipantCount(?int $value): void {\n $this->getBackingStore()->set('totalParticipantCount', $value);\n }", "public function get_settings_lessons_per_page() {\n\t\t\t$course_lessons_per_page = learndash_get_course_lessons_per_page( $this->post_id );\n\t\t\treturn $course_lessons_per_page;\n\t\t}", "function setNumberOfAthletes($cnt)\n {\n $this->_number_of_athletes = $cnt ;\n }", "protected function setTotalPages()\n {\n $this->totalPages = (int) ceil($this->items / $this->itemsPerPage);\n }", "public static function getAllLessonCount()\n {\n $key = config('cache.prefix').'allLessonCount'; \n $newLessons = Cache::remember($key, 5, function() {\n return static::all()->count();\n });\n\n return $newLessons;\n }", "public function setScore()\n {\n $this->score+=1 ;\n }", "public function incrementNumViews()\n {\n $this->numViews++;\n }", "public function setcount()\n\t\t{\n\t\t\t$this->count = $this->count + 1;\n\t\t}", "protected function setCountingRules(): void\r\n {\r\n $this->config->counting_rules['min'] = strlen($this->currentSubject) > $this->getLimits();\r\n $this->config->counting_rules['max'] = strlen($this->currentSubject) < $this->getLimits();\r\n $this->config->counting_rules['fix'] = strlen($this->currentSubject) == $this->getLimits();\r\n }", "public function set_num_links($num_links)\n\t{\n\t\t$this->_num_links = intval($num_links);\n\t}", "public function incrementNumTopics()\n {\n $this->numTopics++;\n }", "public function setReviewsCount($value);", "function setNumberOfRelaySwimmers($cnt)\n {\n $this->_number_of_relay_swimmers = $cnt ;\n }", "public function setNumberOfAttempts($value);", "public function set_num_rows()\n\t{\n\t\t$this->num_recs = $this->resource->num_rows;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get the Top10 most view Picture durant the Academic specified Year
public function getTop10ViewedYear($year){ try{ $sql = "SELECT P.id as id, P.idactivity as idactivity, P.filename as filename, P.time as time, P.viewed as viewed, P.iscensured as iscensured, P.isvideo as isvideo, A.directory as directory FROM picture P, activity A WHERE (A.id = P.idactivity) and (A.date >= :year AND A.date < :year2) and P.iscensured<>'1' and A.level=0 ORDER BY P.viewed DESC LIMIT 0, 10"; $stmt = $this->_db->prepare($sql); $stmt->execute(array('year' => ($year)."-".BEGINYEAR_MONTH."-".BEGINYEAR_DAY, 'year2' => ($year+1)."-".BEGINYEAR_MONTH."-".BEGINYEAR_DAY)); if($stmt->errorCode() != 0){ $error = $stmt->errorInfo(); throw new SQLException($error[2], $error[0], $sql, "Impossible d'obtenir le Top10 view for a specified year"); } $pict = array(); while ($data = $stmt->fetch(PDO::FETCH_ASSOC)){ $pict[] = new Picture($data); } return $pict; }catch(PDOException $e){ throw new DatabaseException($e->getCode(), $e->getMessage(), "Impossible d'obtenir le Top10 view for a specified year"); } }
[ "public static function display_score_card_pictures_by_year($year) {\n $full_path = getcwd();\n $path = str_replace(\"/disc-golf-stats/app/controllers\", \"\", $full_path);\n $path = str_replace(\"/xamppfiles\", \"\", $path);\n\n $echo = ImageDisplayer::display($path. \"/score_cards\", $year);\n\n View::make('game/score_card_images.html', array(\n 'current_year' => $year,\n 'images' => $echo,\n 'players' => Player::all(),\n 'courses' => Course::all(),\n 'game_years' => Game::game_years()\n ));\n }", "public function mostpop_by_year($year) {\n $url = 'http://'.$this->imdbsite.$this->set_pagename('MostpopYear',array(\"year\"=>$year));\n $this->getWebPage('MostpopYear',$url);\n $doc = new DOMDocument();\n @$doc->loadHTML($this->page['MostpopYear']);\n $xp = new DOMXPath($doc);\n $votes = $xp->query(\"//table[@cellspacing='4']/tr/td[1]\");\n $rating = $xp->query(\"//table[@cellspacing='4']/tr/td[2]\");\n $titles = $xp->query(\"//table[@cellspacing='4']/tr/td[3]/a\");\n $nodecount = $titles->length;\n for ($i=0;$i<$nodecount;++$i) {\n preg_match('|(\\d{7})/$|',$titles->item($i)->getAttribute('href'),$match);\n $id = $match[1];\n preg_match('|(.*)\\((\\d{4})\\)|',trim($titles->item($i)->nodeValue),$match);\n $title = trim($match[1]);\n $year = $match[2];\n $rate = trim($rating->item($i)->nodeValue);\n $vote = trim($votes->item($i)->nodeValue);\n $this->mostpopYear[] = array('imdbid'=>$id,'title'=>$title,'year'=>$year,'votes'=>$vote,'rating'=>$rate);\n }\n return $this->mostpopYear;\n }", "public function getYearPages(string $artist, ?int $year): int;", "private function displayPersonalBestYears() {\n\t\t$year = array();\n\t\t$dists = array();\n\t\t$kms = (is_array($this->Configuration()->value('pb_distances'))) ? $this->Configuration()->value('pb_distances') : array(3, 5, 10, 21.1, 42.2);\n\t\tforeach ($kms as $km)\n\t\t\t$dists[(string)$km] = array('sum' => 0, 'pb' => INFINITY);\n\n\t\tif ($this->RaceContainer->num() == 0)\n\t\t\treturn;\n\n\t\tforeach ($this->RaceContainer->allRaces() as $wk) {\n\t\t\t$wk['y'] = date('Y', $wk['time']);\n\n\t\t\tif (!isset($year[$wk['y']])) {\n\t\t\t\t$year[$wk['y']] = $dists;\n\t\t\t\t$year[$wk['y']]['sum'] = 0;\n\t\t\t\t$year['sum'] = 0;\n\t\t\t}\n\t\t\t$year[$wk['y']]['sum']++;\n\t\t\tforeach($kms as $km)\n\t\t\t\tif ($km == $wk['official_distance']) {\n\t\t\t\t\t$year[$wk['y']][(string)$km]['sum']++;\n\t\t\t\t\tif ($wk['official_time'] < $year[$wk['y']][(string)$km]['pb'])\n\t\t\t\t\t\t$year[$wk['y']][(string)$km]['pb'] = $wk['official_time'];\n\t\t\t\t}\n\t\t}\n\n\t\techo '<table class=\"fullwidth zebra-style\">';\n\t\techo '<thead>';\n\t\techo '<tr>';\n\t\techo '<th></th>';\n\n\t\t$Years = array_keys($year);\n\t\tsort($Years);\n\n\t\tforeach ($Years as $y)\n\t\t\tif ($y != 'sum')\n\t\t\t\techo '<th>'.$y.'</th>';\n\n\t\techo '</tr>';\n\t\techo '</thead>';\n\t\techo '<tbody>';\n\n\t\tPersonalBest::activateStaticCache();\n\t\tPersonalBest::lookupDistances($kms, $this->sportid);\n\n\t\tforeach ($kms as $km) {\n\t\t\techo '<tr class=\"r\"><td class=\"b\">'.(new Distance($km))->stringAuto(true, 1).'</td>';\n\n\t\t\tforeach ($Years as $key) {\n\t\t\t\t$y = $year[$key];\n\n\t\t\t\tif ($key != 'sum') {\n\t\t\t\t\tif ($y[(string)$km]['sum'] != 0) {\n\t\t\t\t\t\t$PB = new PersonalBest($km, $this->sportid);\n\t\t\t\t\t\t$distance = Duration::format($y[(string)$km]['pb']);\n\n\t\t\t\t\t\tif ($PB->seconds() == $y[(string)$km]['pb']) {\n\t\t\t\t\t\t\t$distance = '<strong>'.$distance.'</strong>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\techo '<td>'.$distance.' <small>'.$y[(string)$km]['sum'].'x</small></td>';\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo '<td><em><small>---</small></em></td>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo '</tr>';\n\t\t}\n\n\t\t$icon = (new Icon(Icon::INFO))->code();\n\t\t$tooltip = new Tooltip(__('This includes races of all distances, not only those selected for yearly comparison.'));\n\t\t$tooltip->setPosition(Tooltip::POSITION_RIGHT);\n\t\t$tooltip->wrapAround($icon);\n\n\t\techo '<tr class=\"top-spacer no-zebra r\">';\n\t\techo '<td class=\"b\">'.__('In total').' '.$icon.'</td>';\n\n\t\tforeach ($Years as $key) {\n\t\t\tif ($key != 'sum') {\n\t\t\t\techo '<td>'.$year[$key]['sum'].'x</td>';\n\t\t\t}\n\t\t}\n\n\t\techo '</tr>';\n\t\techo '</tbody>';\n\t\techo '</table>';\n\t}", "function getYearPixels( &$data ) {\n\t\t$month_total_edits = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\t$month_total_edits[$year] = $tmp['all'];\n\t\t}\n\t\t\n\t\t$max_width = max( $month_total_edits );\n\t\t\n\t\t$pixels = array();\n\t\tforeach( $data as $year => $tmp ) {\n\t\t\tif( $tmp['all'] == 0 ) $pixels[$year] = array();\n\t\t\t\n\t\t\t$processarray = array( 'all' => $tmp['all'], 'anon' => $tmp['anon'], 'minor' => $tmp['minor'] );\n\t\t\t\n\t\t\tasort( $processarray );\n\t\t\t\n\t\t\tforeach( $processarray as $type => $count ) {\n\t\t\t\t$newtmp = ceil( 500 * ( $count ) / $max_width );\n\t\t\t\t$pixels[$year][$type] = $newtmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $pixels;\n\t}", "public function findTop10()\n {\n $criteria = ['rgm_inner.rating IS NOT NULL', 'rgm_inner.rating_count > :rating_count'];\n $params = ['rating_count' => 20];\n $order_by = [\"rgm_inner.rating DESC\", \"rgm_inner.rating_count DESC\"];\n $limit = 12;\n $sql = $this->buildAlbumSelectQuery($criteria, $order_by, $limit);\n return $this->getEntityManager()->getConnection()->executeQuery($sql, $params)->fetchAll();\n }", "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "public function getAllMoviesAfterYear($year) {//used as test\n\t\t$stmt = $this->DB->prepare\n\t\t( \"SELECT * FROM movies WHERE year >= \" . $year );\n\t\t$stmt->execute ();\n\t\treturn $stmt->fetchAll ( PDO::FETCH_ASSOC );\n\t}", "public static function BestLanding_year()\n\t\t{\n\t\t\t$sql=\"SELECT t1.pilotid,t1.landingrate,t2.firstname,t2.lastname,t2.code,t2.rank FROM \n\t\t\t\t\t(SELECT \n\t\t\t\t\t\tpilotid, MAX(landingrate) as landingrate \n\t\t\t\t\t\t\tFROM \".TABLE_PREFIX.\"pireps \n\t\t\t\t\t\t\t\tWHERE YEAR(submitdate) = YEAR(now()) AND landingrate < 0 AND accepted = 1\n\t\t\t\t\t\t\t\t\tGROUP BY pilotid) t1\n\t\t\t\t\t\t\t\t\t\tLEFT JOIN \".TABLE_PREFIX.\"pilots t2 ON t1.pilotid = t2.pilotid \n\t\t\t\t\t\t\t\t\t\t\tORDER BY landingrate DESC LIMIT 10\";\n\t\t\t\t\t\t\t\t\t\t\treturn DB::get_results($sql);\n\t\t}", "function get_by_year_now_year() {\n\t\t$sql = \"SELECT *\n\t\t\t\tFROM evs_database.evs_pattern_and_year\n\t\t\t\tORDER BY pay_id DESC LIMIT 1\";\n\t\t\t\t\n\t\t$query = $this->db->query($sql);\n\t\treturn $query;\n\t\t\t\t\n\t}", "function getCurrentYearView()\n {\n $d = getdate(time());\n return $this->getYearView($d[\"year\"]);\n }", "function getCurrentYearView() {\n $d = getdate(time());\n return $this->getYearView($d[\"year\"]);\n }", "public function topRate(){\n $filmsInfo = $this->getFilmInfo();\n usort($filmsInfo, function($a, $b){\n if($a->filmClickNum == $b->filmClickNum){\n return 0;\n }\n return ($a->filmClickNum >$b->filmClickNum)?-1:1;\n });\n //var_dump($filmsInfo);\n return $filmsInfo;\n }", "function getTenRandomImages($imgURLs) {\n $imagesToDisplay = array_slice($imgURLs, 0, 10); \n return $imagesToDisplay; \n }", "public function get(int $year);", "function getYearMonthFiguresSummary($year = '', $month = '')\r\n\t{\r\n\t\t$log = FezLog::get();\r\n\t\t$db = DB_API::get();\r\n\r\n\t\t$params = array();\r\n\t\t$stmt = 'SELECT syf_year as year, syf_monthnum as monthnum, syf_month as month, syf_abstracts as abstracts, syf_downloads as downloads ';\r\n\t\t$stmt .= 'FROM ' . APP_TABLE_PREFIX . 'statistics_sum_yearmonth_figures ';\r\n\t\tif ($year)\r\n\t\t{\r\n\t\t\t$stmt .= \"WHERE syf_year = ? \";\r\n\t\t\t$params[] = $year;\r\n\t\t\tif ($month)\r\n\t\t\t{\r\n\t\t\t\t$stmt .= \"AND syf_month = ?\";\r\n\t\t\t\t$params[] = $month;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$stmt .= \"ORDER BY 1 DESC, 2 DESC\";\r\n\r\n\t\ttry {\r\n\t\t\t$res = $db->fetchAll($stmt, $params, Zend_Db::FETCH_ASSOC);\r\n\t\t}\r\n\t\tcatch(Exception $ex) {\r\n\t\t\t$log->err($ex);\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "function topTen()\n {\n $array = $this->model->getTopTen();\n $result = array();\n foreach($array as $name => $value) {\n //truncate array, return only ID and title\n $value = array_slice($value,0,2);\n $result[] = $value;\n }\n return $result;\n }", "function get_vehicles_year_desc() {\r\n global $db;\r\n $query = 'SELECT * FROM vehicles\r\n ORDER BY Year DESC';\r\n $statement = $db->prepare($query);\r\n $statement->execute();\r\n $vehicle = $statement->fetchAll();\r\n $statement->closeCursor();\r\n return $vehicle;\r\n }", "function f_top10_toys_year_country($year,$country) {\n\t\t$query = \"select prefs.toy,count(*) as cnt from prefs,phone where toy <> '' AND phone.country='$country' AND prefs.device_id = phone.device_id AND prefs.device_id not in (select device_id from banned_device_ids) AND LOWER(toy) not regexp (select group_concat(word SEPARATOR '|') from banned_words) group by toy having cnt >= 2 order by cnt desc limit 10 ;\" ;\n $result = $this->db->query($query) or die(mysql_error());\n\t\tunset($top10_toys_year_country) ;\n\t\t$top10_toys_year_country = array() ;\n\n /* fetch object array */\n while ($row = $result->fetch_row()) {\n\t\t\t$jsonRow = array(\n \"toy\" => ucwords($row[0]),\n \"total\" => $row[1],\n );\n\t\t\tarray_push($top10_toys_year_country, $jsonRow) ;\n }\n\t\tarray_push($this->array_appender, array(\"name\" => \"top10_toys_${year}_${country}\", \"description\" => \"Top Toys for ${year} in ${country}\",\"type\" => \"toy\", \"data\" => $top10_toys_year_country )) ;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to set the value of field caminhao_cd_caminhao
public function setCaminhaoCdCaminhao($caminhao_cd_caminhao) { $this->caminhao_cd_caminhao = $caminhao_cd_caminhao; return $this; }
[ "public function setCama(){\n $this->cama = \"Sim\";\n }", "public function setCC()\n {\n }", "function set_codOficina( $codOficina ) {\n // sets the value of codOficina\n $this->codOficina = $codOficina;\n }", "public function SetData_alberturaConta($valor){\n\t\t $this->data_emissao= $valor;\n\t }", "function setCgm($iNumCgm){\n\n $this->aLancamentos[\"lancamCgm\"][\"set\"] = 1;\n $this->aLancamentos[\"lancamCgm\"][\"c76_numcgm\"] = $iNumCgm;\n $this->aLancamentos[\"lancamCgm\"][\"c76_data\"] = $this->dDataLanc;\n $this->oLancamCgm = db_utils::getDao(\"conlancamcgm\");\n\n }", "public function setCodi($codi){\n $this->codi = $codi;\n }", "public function setCaminhoArquivo( $sCaminhoArquivo ) {\n $this->sCaminhoArquivo = $sCaminhoArquivo;\n }", "public function setCV($cv)\n {\n # Check if the value is empty.\n if (!empty($cv)) {\n # Clean it up and set the data member.\n $cv = trim($cv);\n } else {\n # Explicitly set it to NULL.\n $cv = null;\n }\n # Set the data member.\n $this->cv = $cv;\n }", "public function cambioClaveC($id_usuario,$clave){\r\n $respuesta = UsuarioDAO::cambioClaveM($id_usuario,$clave);\r\n }", "function setMarca($Marca) {\r\n $this->Marca = $Marca;\r\n }", "public function setCv($cv) {\n $cv = (($cv !== NULL) && strlen(trim($cv)) > 0) ? trim($cv) : NULL;\n\n $this->cv = $cv;\n $this->toSave['cv'] = $cv;\n }", "public function setCambio_contra($cambio_contra){\n $this->cambio_contra = $cambio_contra;\n }", "public function _setDataCarrera($data_carrera)\n {\n $this->data_carrera = $data_carrera;\n }", "public function setCasemakerLogoAttribute($value){\n\n \t\t //$this->deleteImage($this->attributes['casemaker_logo']);\n\n \t\t $this->attributes['casemaker_logo']= $value;\n \t}", "public function addCamValMod($campo,$valor){\n\t\t if($campo){\n\t\t\t $this->campovalor[] = $this->addFiltro($campo).\" = '\".$this->addFiltro($valor).\"'\";\n $this->ingresadostem .= $this->addFiltro($valor).', ';\n\t\t }\n }", "public function seleccionarCamara2( ) {//kamara bakoitzeko bat\n AccesoGui::$guiDispositivos->seleccionarCamara(2);\n}", "public function setVcId($value)\n {\n if (!array_key_exists('vc_id', $this->fieldsModified)) {\n $this->fieldsModified['vc_id'] = $this->data['fields']['vc_id'];\n } elseif ($value === $this->fieldsModified['vc_id']) {\n unset($this->fieldsModified['vc_id']);\n }\n\n $this->data['fields']['vc_id'] = $value;\n }", "public function set_colecao(Colecao $object)\n {\n $this->colecao = $object;\n $this->colecao_id = $object->id;\n }", "public function set_cidade(Cidade $object)\n {\n $this->cidade = $object;\n $this->cidade_id = $object->id;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Method to get property SelectFields
public function getSelectFields() { return $this->selectFields; }
[ "public function getSelectFields();", "public function getSelectListFields()\r\n {\r\n $fields = Json::decode($this->fields, true);\r\n $selects = ArrayHelper::filter($fields, 'select', 'tagName');\r\n $options = [];\r\n foreach ($selects as $select) {\r\n if (isset($select['options'])) {\r\n $i = 0;\r\n foreach ($select['options'] as $option) {\r\n // Add field ID to each option\r\n $option['id'] = $select['id'] . '_' . $i++;\r\n array_push($options, $option);\r\n }\r\n }\r\n }\r\n return ArrayHelper::column($options, 'value', 'id');\r\n }", "function get_field_options(){\n return $this->get_mapped_property('field_type_options');\n }", "protected function getOptionFields() {\n return $this->options;\n }", "public function getFields();", "public function getListFields();", "public function getSelectedFields()\n {\n return $this->selected_fields;\n }", "public static function selectFields() {\n\t\treturn [\n\t\t\t'event_id',\n\t\t\t'event_type',\n\t\t\t'event_variant',\n\t\t\t'event_agent_id',\n\t\t\t'event_agent_ip',\n\t\t\t'event_extra',\n\t\t\t'event_page_id',\n\t\t\t'event_deleted',\n\t\t];\n\t}", "public function getFieldOptions() {\n $labels = $this->displayHandler->getFieldLabels(TRUE);\n return array_merge(['' => '-- Select --'], $labels);\n }", "function getCpFields()\n\t{\n\t\t$dbo\t= & JFactory::getDBO();\n\t\t$query = 'SELECT ' . $dbo->nameQuote('f.id') .', '. $dbo->nameQuote('f.name') .', '. $dbo->nameQuote('f.label')\n\t\t\t.' FROM ' . $dbo->nameQuote('#__custom_properties_fields') . ' f';\n\t\t$dbo->setQuery($query);\n\n\t\treturn $this->_cache->get(array($dbo, 'loadObjectList'), array());\n\t}", "public static function selectFields() {\n\t\treturn array_merge(\n\t\t\tRevision::selectFields(),\n\t\t\tarray( 'fr_rev_id', 'fr_page_id', 'fr_rev_timestamp',\n\t\t\t\t'fr_user', 'fr_timestamp', 'fr_quality', 'fr_tags', 'fr_flags',\n\t\t\t\t'fr_img_name', 'fr_img_sha1', 'fr_img_timestamp' )\n\t\t);\n\t}", "public function getOptions()\n\t{\n\t\t// Load TJ-Fields language file\n\t\t$lang = Factory::getLanguage()->load('com_tjfields', JPATH_ADMINISTRATOR);\n\n\t\t$fieldname = preg_replace('/[^a-zA-Z0-9_\\-]/', '_', $this->fieldname);\n\n\t\t$db = Factory::getDbo();\n\t\tTable::addIncludePath(JPATH_ROOT . '/administrator/components/com_tjfields/tables');\n\t\t$fieldTable = Table::getInstance('field', 'TjfieldsTable', array('dbo', $db));\n\t\t$fieldTable->load(array('name' => $fieldname));\n\n\t\t// Get object of TJ-Fields field model\n\t\tJLoader::import('components.com_tjfields.models.field', JPATH_ADMINISTRATOR);\n\t\t$tjFieldsModelField = JModelLegacy::getInstance('Field', 'TjfieldsModel');\n\t\t$options = $tjFieldsModelField->getRelatedFieldOptions($fieldTable->id);\n\n\t\treturn $options;\n\t}", "public static function getFields() {\r\n\t\t\r\n\t\treturn static::properties()->table->getFields();\r\n\t\t\r\n\t}", "public function getSelectObject();", "public function getCustomDropDownFields(): array\n {\n return $this->customDropDownFields;\n }", "private function _buildFieldsForSelect()\n {\n // ----------------------------------------------------------\n // Select which fields to return in the query on the focus table\n // ----------------------------------------------------------\n $focus = strtolower($this->_focus);\n $fAlias = DaoMap::$map[$focus]['_']['alias'];\n $fields = array();\n $fields[] = '`' . $fAlias . '`.`id`';\n foreach (DaoMap::$map[$focus] as $field => $properties)\n {\n //entity metadata\n if (trim($field) === '_')\n continue;\n \n //if this is not a relationship\n if (!isset($properties['rel']))\n {\n $fields[] = '`' . $fAlias . '`.`' . $field . '`';\n continue;\n }\n \n //if this is a relationship\n switch ($properties['rel'])\n {\n // Don't return any of these field types\n case DaoMap::ONE_TO_MANY:\n case DaoMap::MANY_TO_MANY:\n {\n break;\n }\n default:\n $field .= 'Id';\n $fields[] = '`' . $fAlias . '`.`' . $field . '`';\n break;\n }\n }\n return $fields;\n }", "protected function getListOptionFields()\n {\n $fields = FieldList::create();\n \n if ($list = $this->owner->getListObject()) {\n \n $fields = $list->getListOptionFields();\n \n foreach ($fields->dataFields() as $field) {\n \n $name = $field->getName();\n \n if (isset($list->$name)) {\n $field->setValue($list->$name, $list);\n }\n \n }\n \n $this->hideFields($fields);\n \n }\n \n return $this->nest($fields);\n }", "private function getFields()\n {\n return $this->fields ? $this->fields : $this->getItemFields();\n }", "public function getFields()\n {\n $oFields = AM_Model_Db_Table_Abstract::factory('field')\n ->findAllByPageId($this->id);\n\n return $oFields;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This method queries whether or not the column with the passed name is available or not. This method uses the `isset()` function to make sure the column is available and has not been removed somehow before, because it has an empty value for example.
public function hasColumn(string $name) : bool { // query whether or not the header is available, if yes try // to load the key and query whether the column is available if ($this->hasHeader($name)) { return isset($this->row[$this->getHeader($name)]); } // return FALSE if not return false; }
[ "public function __isset($name) {\n try {\n $column = $this->searchColumn($name);\n } catch (ColumnNotFoundDBException $e) {\n return FALSE;\n }\n \n return TRUE;\n }", "public static function hasColumn($name): bool\n {\n }", "public function hasColumn(string $name): bool;", "public function hasColumn(): bool\n {\n return isset($this->column);\n }", "public function hasColumn() : bool\n {\n return isset($this->column);\n }", "function _columnIsSet($row, $dbc, $column_name)\n{\n if ( !strcmp($dbc[$column_name], \"not defined\") ) return false;\n return ( trim($row[$dbc[$column_name]]) != \"\" );\n}", "public function has_column($name);", "function sd_tablecolumnexists($tablename,$columnname)\n{\n global $DB;\n\n if(!isset($tablename{0}) || !isset($columnname{0}))\n {\n return false;\n }\n\n $result = $DB->query_first(\"SHOW COLUMNS FROM `$tablename` WHERE `field` = '$columnname'\");\n return isset($result) && ($result !== False) && is_array($result) && (count($result)>0);\n\n}", "public function __isset($name)\n {\n return isset($this->columns[$name]);\n }", "function _columnIsSet($row, $dbc, $column_name)\n{\n\tif ( !strcmp($dbc[$column_name], \"not defined\") )\n\t\treturn false;\n\treturn ( trim($row[$dbc[$column_name]]) != \"\" );\n}", "protected function isDefinedColumn()\n {\n return array_key_exists($this->name, static::$defined);\n }", "function has_column($column_name)\n {\n if (empty($this->object->_table_columns)) {\n $this->object->lookup_columns();\n }\n return array_search($column_name, $this->object->_table_columns) !== FALSE;\n }", "function is_defined_column($table_name,$col_name){\n\tglobal $g_db_sql;\n\t$sql=\"\n\t\tselect 1 from all_tab_columns \n\t\twhere table_name='\".$table_name.\"' \n\t\tand column_name='\".$col_name.\"'\n\t\t\";\n\treturn $g_db_sql->GetOne($sql);\n}", "function is_defined_column($table_name, $col_name) {\n\tglobal $g_db_sql;\n\t$sql = \"\n select 1 from all_tab_columns\n where table_name='\" . $table_name . \"'\n and column_name='\" . $col_name . \"'\n \";\n\treturn $g_db_sql->GetOne ( $sql );\n}", "function columnExists($db, $table, $column_name, $connection_name = null) {\n\t\t$table_definition = $this->getTableDefinition($db, $table);\n\t\tforeach ($table_definition['columns'] as $column) {\n\t\t\tif (strtolower($column['Field']) == strtolower($column_name)) {\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function columnExists( $tablename, $columnname );", "public static function check_column_if_exist($db_name, $table, $column)\r\n {\r\n global $db;\r\n /*$sql=\"SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='\".$db_name.\"' AND TABLE_NAME = '\".$table.\"' AND COLUMN_NAME = '\".$column.\"'\";\r\n $r=$db->query($sql);\r\n $fields=$db->fetchByAssoc($r);\r\n if($fields){\r\n return true;\r\n }else{\r\n return false;\r\n }*/\r\n $cols = $db->get_columns($table);\r\n //if(isset($field) && isset($field['count']) && $field['count'] > 0){\r\n if (is_array($cols)) {\r\n if (isset($cols[$column])) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }", "public function hasColumn(): bool;", "abstract public function columnExists($table, $column);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the person participating
public function getPerson() { return $this->person; }
[ "public function getParticipation()\n {\n return $this->participation;\n }", "public function currentParticipant()\n {\n if(Auth::check()) {\n return $this->participants()->where('user_id', auth()->user()->id)->first();\n }\n return null;\n }", "public function getParticipant()\n\t{\n\t\treturn $this->getKeyValue('participant'); \n\n\t}", "public function getPerson()\n {\n return $this->person;\n }", "public function getConversationPartner() {\n\n $user = Auth::user();\n\n $users = $this->users;\n\n $index = 0;\n foreach ($users as $participant) {\n if ($participant->name === $user->name) break;\n $index++;\n }\n\n if ($index === 1) return $users[0];\n return $users[1];\n }", "public function getConversationPersons();", "public function getPeople(){\n return $this->film['people'];\n }", "public function getCurrentParticipant()\n\t{\n\t\treturn $this->runner->getCurrentWebUserParticipant();\n\t}", "public function getParticipant()\n {\n return $this->hasOne(Participant::className(), ['id' => 'participant_id']);\n }", "public function participants() {\n return DB::query(\"\n SELECT userid, status, notifications, joined, `left`\n FROM participants\n WHERE threadid = %i\", $this->threadid);\n }", "public function get_participants() {\n return $this->participants;\n }", "public function getParticipants()\n {\n return $this->participants;\n }", "public function getShowParticipants()\n {\n return $this->showParticipants;\n }", "public function getRespondent()\n {\n return $this->loader->getRespondent(\n $this->getPatientNumber(),\n $this->getOrganizationId(),\n $this->getRespondentId())\n ;\n }", "public function getParticipations()\n {\n return $this->participations;\n }", "public function get_people() {\n\t\t\treturn $this->run( 'people' );\n\t\t}", "public function getParticipatorTwo()\n {\n return $this->participatorTwo;\n }", "public function getParticipants() {\n\n\t\treturn $this->participants;\n\t}", "public function getFriend()\n {\n return $this->friend;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the active category for the helper
public function getActiveCategory() { return $this->_activeCategory; }
[ "public function getCategory()\n {\n return Mage::registry('current_category');\n }", "public static function GetActiveCategory()\n {\n return self::getShopService()->getActiveCategory();\n }", "public function getCurrentCategory(){\n return Mage::registry('current_category');\n }", "public function getCurrentCategory()\n {\n return $this->registry->registry('current_category');\n }", "private function getCurrentCategory()\n {\n $result = null;\n $catalogLayer = $this->layerResolver->get();\n\n if ($catalogLayer) {\n $result = $catalogLayer->getCurrentCategory();\n }\n\n return $result;\n }", "public static function getActiveCategoryId()\n {\n return Yii::$app->getSession()->get(self::ACTIVE_CATEGORY_ID, 0);\n }", "public function getCategorieActive()\n {\n return $this->categorieActive;\n }", "public function getSelectedCategory()\n {\n return $this->selectedCategory;\n }", "public function getMainCategory();", "function get_category() {\n $category = null;\n\n if (!empty($this->categoryid)) {\n $category = grade_category::fetch('id', $this->categoryid);\n } elseif (!empty($this->iteminstance) && $this->itemtype == 'category') {\n $category = grade_category::fetch('id', $this->iteminstance);\n }\n\n return $category;\n }", "private function getActive(){\n if( isset( $_GET['category_id'] ) ){\n return $_GET['category_id'];\n }\n else{\n return null;\n }\n }", "function get_item_category() {\n if (!$this->is_course_item() and !$this->is_category_item()) {\n return false;\n }\n return grade_category_local::fetch(array('id'=>$this->iteminstance));\n }", "public function getCurrentlySelectedCategoryId() {\n $helper = $this->helper('catalogcategorysearch');\n if ($helper->isCategoryPage() && $helper->selectCategoryOnCategoryPages()) {\n //find active category navigation filter\n foreach (Mage::getSingleton('catalog/layer')->getState()->getFilters() as $filterItem) {\n if ($filterItem->getFilter() instanceof Mage_Catalog_Model_Layer_Filter_Category) {\n //only return the category id when it does not exceed the level of the categories that are shown\n if ($filterItem->getFilter()->getCategory()->getLevel() <= $helper->getMaximumCategoryLevel()) {\n return $filterItem->getValue();\n }\n }\n }\n //get the current category from the main navigation\n return Mage::getSingleton('catalog/layer')->getCurrentCategory()->getEntityId();\n }\n if ($helper->isSearchResultsPage()) {\n //find first active category search filter\n foreach (Mage::getSingleton('catalogsearch/layer')->getState()->getFilters() as $filterItem) {\n if ($filterItem->getFilter() instanceof Mage_Catalog_Model_Layer_Filter_Category) {\n return $filterItem->getValue();\n }\n }\n }\n //get the root category\n return Mage::app()->getStore()->getRootCategoryId();\n }", "public function getCategory()\r\n {\r\n return $this->category;\r\n }", "public function CurrentCategoryID(){\n\t\treturn $this->categoryID;\n\t}", "function ol_get_active_category( $active ) {\n\tif ( ! isset( $_SESSION['mstore_category'] ) && 'all' === $active ) {\n\t\treturn true;\n\t}\n\n\treturn ( $active === $_SESSION['mstore_category'] );\n}", "function category() {\n $db = new DB(\"categories\");\n $db->select(\"category_id = '\" . $this->_vars['category'] . \"'\");\n $db->nextRecord();\n return $db->category_icon;\n }", "function wct_current_category() {\n\t//currently queried object\n\t$queriedObject = get_queried_object();\n\t//check if it has term id\n\tif ( property_exists( $queriedObject, 'term_id' ) ) {\n\t\treturn $queriedObject->term_id;\n\t} else {\n\t\treturn false; //we must be on the shop page\n\t}\n}", "public function getCategory(): string\n {\n return $this->category;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
statuses/retweets/:id Returns a collection of the 100 most recent retweets of the tweet specified by the id parameter.
public function statusesRetweetsId($params = array()) { return $this->get('statuses/retweets/:id', $params); }
[ "function getTweets($name, $id, $num, $maxID) {\n\tglobal $settings, $twitter;\n\t//$maxID = (int) $maxID;\n\tif ($num > 200) {\n\t\t$num = 200;\n\t}\n\t\t\n\t$url = \"https://api.twitter.com/1.1/statuses/user_timeline.json\";\n\t$getfield = \"?count=\".$num.\"&exclude_replies=true&include_rts=false&user_id=\".$name.\"&screen_name=\".$name;\n\tif (strcmp($maxID,\"-1\") != 0) {\n\t\t$getfield = $getfield.\"&max_id=\".$maxID;\n\t}\n\t$requestMethod = \"GET\";\n\t$arr = null;\n\ttry {\n\t\t$var = $twitter->setGetfield($getfield)\n\t\t\t\t\t ->buildOauth($url, $requestMethod)\n\t\t\t\t\t ->performRequest(); \n\t\t$arr = (json_decode($var));\n\t\t\n\t} catch (Exception $e) {\n\t\techo(\"Error $e\");\n\t}\n\n\treturn $arr;\n}", "public function getLatestTweets(){\n $connect =$this->twitterConeection();\n //get only tweets, without replies and retweets.\n $tweets = $connect->get('statuses/user_timeline',['count'=>50, 'exclude_replies'=>true, 'screen_name'=>'b92vesti','include_rts'=>false]);\n //print_r($tweets);\n return $tweets;\n }", "public function getUserTweets($author_id)\n {\n Log::info(\"Fetching tweets for user ID: \".$author_id);\n $results = [];\n $response = \"\";\n $next = \"\";\n $tweets_added = 0;\n\n do {\n $params = [\n 'max_results' => 100,\n 'tweet.fields' => 'created_at,text,referenced_tweets'\n ];\n\n if ($next)\n $params['pagination_token'] = $next;\n\n //Set end_time to the time of the earliest tweet we have now.\n //This is because the tweet IDs do not seem to be necessarily sequential\n //but the created dates seem to be consistent.\n //\n //This allows us to filter out tweets we've already captured to get up to the max 3200 tweets.\n\n $earliest_tweet = Tweets::where('author_id', $author_id)->orderBy('tweet_created')->first();\n Log::info('Looked up earliest tweet:');\n Log::info(var_export($earliest_tweet, TRUE));\n\n if ($earliest_tweet) //If we have at least one existing tweet for this author.\n {\n $dt = new DateTime($earliest_tweet->tweet_created);\n Log::info(\"Setting end_time to: \".$dt->format('Y-m-d\\TH:i:s\\Z'));\n //Use ISO 8601 format\n $params['end_time'] = $dt->format('Y-m-d\\TH:i:s\\Z');\n }\n Log::info('Params used:');\n Log::info(print_r($params, TRUE));\n Log::info('*** Sending API Request for tweets...');\n\n $response = json_decode(Twitter::userTweets($author_id, $params));\n Log::info(\"Response: \");\n Log::info(var_export($response, TRUE));\n //ddd($response);\n\n if (!$response || !isset($response->data))\n {\n Log::info(\"Got invalid response\");\n break;\n }\n\n foreach ($response->data as $tweet)\n {\n Log::info(\"Found new tweet:\");\n Log::info(var_export($tweet, TRUE));\n //$results[] = $tweet;\n $tweet = Tweets::create([\n 'tweet_id' => $tweet->id,\n 'author_id' => $author_id,\n 'tweet_created' => $tweet->created_at,\n 'text' => $tweet->text,\n 'referenced_tweets' => (isset($tweet->referenced_tweets) ? json_encode($tweet->referenced_tweets) : ''),\n ]);\n\n if ($tweet)\n $tweets_added++;\n }\n\n if (isset($response->meta) && isset($response->meta->next_token))\n $next = $response->meta->next_token;\n else\n $next = \"\";\n\n Log::info(\"Next token: \".$next);\n\n //$response = Twitter::searchRecent($query, $params);\n } while ($next);\n\n return $tweets_added;\n\n }", "public function findTweetById(int $id);", "public function rest_response_tweets() {\n\t\treturn new WP_REST_Response( $this->get_latest_tweets() );\n\t}", "function getFeaturedTweets(\n $hashtag = 'custserv',\n $min_retweet_count = 1,\n $max_id = '',\n $load_more_count = 20\n ) {\n\n // Building the parameters\n // of the search API call\n $parameters = [];\n $parameters['include_entities'] = 0;\n $parameters['count'] = $load_more_count;\n\n // Filtering out retweets and only looking for\n // original tweets with the specified hashtag\n $parameters['q'] = '#' . $hashtag . ' -filter:retweets';\n\n // If a max_id was provided for load more,\n // including that as well\n if (strlen($max_id)) {\n $parameters['max_id'] = $max_id;\n }\n\n // Constructing the end point of\n // the API request\n $endpoint = '1.1/search/tweets.json?' . http_build_query($parameters);\n\n // Fetching the results\n $result = $this->makeGetRequest(\n $endpoint\n );\n\n // We will explicitly find out the\n // max ID which will be required for\n // the next load more call\n // (reference: https://dev.twitter.com/rest/public/timelines)\n $lowest_id = 0;\n\n // Looping on the 'statuses' array by reference\n // as we need to modify the array\n foreach ($result['statuses'] as $key => &$value) {\n\n // Formatting the date as unix timestamp\n // so that the front end can easily convert\n // it into any format\n $value['timestamp'] = strtotime($value['created_at']);\n\n // Putting anchor tags around links in\n // the tweet\n $url = '@(http)?(s)?(://)?(([a-zA-Z])([-\\w]+\\.)+([^\\s\\.]+[^\\s]*)+[^,.\\s])@';\n $tweet_text = preg_replace(\n '`([^\"=\\'>])((http|https|ftp)://[^\\s<]+[^\\s<\\.)])`i',\n '$1<a href=\"$2\" target=\"_blank\">$2</a>',\n $value['text']\n );\n $value['text'] = $tweet_text;\n\n // Setting the lowest ID as max ID\n // for the next load more call\n if (!$lowest_id || $value['id'] < $lowest_id) {\n $lowest_id = $value['id'];\n }\n }\n\n // PHP tends to retain the loop value reference\n // which can cause a lot of hurt if the variable\n // '$value' is used again - unsetting it\n unset($value);\n\n // Subtracting 1 from max ID to not\n // repeat the last tweet in the next load more call.\n // Need a 64 bit environment to handle the Twitter IDs\n // (reference: https://dev.twitter.com/rest/public/timelines)\n if ($lowest_id) {\n $lowest_id = $lowest_id - 1;\n\n // Sending as string to make sure\n // the ID is handled without any\n // precision issue\n $result['search_metadata']['load_more_max_id'] = (string)$lowest_id;\n }\n\n // Filtering the tweets bassed on the\n // minimun retweet count post the API call\n if ($min_retweet_count > 0) {\n $result['statuses'] = array_filter(\n $result['statuses'],\n function ($val) use($min_retweet_count) {\n return ($val['retweet_count'] >= $min_retweet_count);\n }\n );\n\n // Resetting the keys of the\n // tweets array\n $result['statuses'] = array_values($result['statuses']);\n }\n\n return $result;\n }", "public function fetchTweet($id);", "private function extract_retweeted_tweets($tweets){\n $size = sizeof($tweets);\n $result = array(\n \"tweets\" => [],\n \"max_id\" => ''\n );\n // return null for empty data\n if($size == 0){\n $result = null;\n }else{\n $result[\"max_id\"] = $tweets[sizeof($tweets) - 1]->id;\n for($i = 0; $i < $size; $i++){\n $obj = $tweets[$i];\n if($obj->retweet_count !== 0){\n $result['tweets'][$obj->id] = $obj;\n }\n }\n }\n return $result;\n }", "public function tweetsAction()\n {\n $ch = curl_init(\"http://api.twitter.com/1/statuses/user_timeline.json?screen_name=snwcp&count=3\");\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n $result = curl_exec($ch);\n curl_close($ch);\n\n $json = json_decode($result);\n $tweets = array();\n if (is_array($json)) {\n foreach ($json as $tweet) {\n $tweets[] = array(\n 'date' => new \\DateTime($tweet->created_at),\n 'text' => $tweet->text,\n );\n\n }\n }\n\n return array('tweets' => $tweets);\n }", "public function gettweetsAction () {\n $id = $this->_getParam('event_id');\n \n $tweet = new Core_Model_TweetEntry ();\n \n if (isset ($id)) {\n $value = $tweet->loadByEventId ($id);\n \n if (isset ($value)) {\n return $this->apiControllerHelper->formatOutput($value);\n }\n }\n }", "public function getLastTweets($screen_name, $count = 10)\n {\n $url = 'statuses/user_timeline.json';\n $url .= '?screen_name=' . $screen_name;\n $url .= '&count=' . $count;\n return $this->_proxy->get($url);\n }", "public function retweet(int $id) {\n $this->twitterOAuth->post(\"statuses/retweet\", [\"id\" => $id]);\n }", "public function scrap_tweets() {\n $settings = array(\n 'oauth' => array(\n 'oauth_access_token' => '16523454-hKQpEvPmUfXsFmVy8vcLjdDp3KyyqGa3KosOjTZLA',\n 'oauth_access_token_secret' => 'Xf5Mqv3RrYA6M6VUcyEHq3gp9x398OUQMtTs1mNemRc',\n 'consumer_key' => 'nT59LJBLuZ5KzfsfaeSew',\n 'consumer_secret' => 'paPpnZkOKdrNJCXxiZClhUCHsV8GbOz1QXSnCgI'\n ),\n 'url' => 'http://api.twitter.com/1.1/search/tweets.json',\n 'method' => 'GET',\n 'query' => '?q=%23SolteraOtraVez2&result_type=recent&count=50',\n 'fields' => array(\n 'q' => '#SolteraOtraVez2',\n 'result_type' => 'recent',\n //'since_id' => 00,\n 'count' => 50\n )\n );\n \n $this->load->library('twitter_api', $settings['oauth']);\n \n $response = $this->twitter_api->setGetfield($settings['query'])->buildOauth($settings['url'], $settings['method'])->performRequest();\n \n //print_r($response);\n \n if($response) {\n $response = json_decode($response);\n $tweets = array();\n \n foreach($response->statuses as $tweet) {\n array_push($tweets, array(\n 'strid' => $tweet->id_str,\n 'text' => $tweet->text,\n 'userid' => $tweet->user->id_str,\n 'name' => $tweet->user->name,\n 'username' => $tweet->user->screen_name,\n 'location' => $tweet->user->location,\n 'followers' => $tweet->user->followers_count,\n 'avatar' => $tweet->user->profile_image_url,\n 'date' => $tweet->created_at\n ));\n }\n \n $this->tweet_model->save_tweets($tweets);\n }\n }", "private function fetch_tweets () {\n $this->add_debug_item('Fetching fresh tweets using Twitter API.');\n\n require_once(dirname(__FILE__) . '/lib/tmhOAuth/tmhOAuth.php');\n \n // Creates a tmhOAuth object.\n $this->tmhOAuth = new tmhOAuth(array(\n 'consumer_key' => $this->options['consumer_key'],\n 'consumer_secret' => $this->options['consumer_secret'],\n 'token' => $this->options['access_token'],\n 'secret' => $this->options['access_token_secret']\n ));\n\n // Request Twitter timeline.\n $params = array(\n 'screen_name' => $this->options['twitter_screen_name']\n );\n if ($this->options['ignore_retweets']) {\n $params['include_rts'] = 'false';\n }\n if ($this->options['ignore_replies']) {\n $params['exclude_replies'] = 'true';\n }\n $response_code = $this->tmhOAuth->request('GET', $this->tmhOAuth->url('1.1/statuses/user_timeline.json'), $params);\n\n $this->add_debug_item('tmhOAuth response code: ' . $response_code);\n \n if ($response_code == 200) {\n $data = json_decode($this->tmhOAuth->response['response'], true);\n\n // Open the twitter wrapping element.\n $html = $this->options['twitter_wrap_open'];\n\n // Iterate over tweets.\n foreach($data as $tweet) {\n $html .= $this->parse_tweet($tweet);\n // If we have processed enough tweets, stop.\n if ($this->tweet_count >= $this->options['tweets_to_display']){\n break;\n }\n }\n\n // Close the twitter wrapping element.\n $html .= $this->options['twitter_wrap_close'];\n\n // Save the formatted tweet list to a file. \n $file = fopen($this->options['cache_file'], 'w');\n fwrite($file, $html); \n fclose($file);\n\n // Save the raw data array to a file. \n $file = fopen($this->options['cache_file_raw'], 'w');\n fwrite($file, serialize($data)); \n fclose($file);\n\n $this->tweet_list = $html;\n $this->tweet_array = $data;\n } else {\n $this->add_debug_item('Bad tmhOAuth response code.');\n }\n }", "public function testGetRetweetsById()\n\t{\n\t\t$id = 217781292748652545;\n\t\t$count = 5;\n\t\t$trim_user = true;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"statuses\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set request parameters.\n\t\t$data['count'] = $count;\n\t\t$data['trim_user'] = $trim_user;\n\n\t\t$path = $this->object->fetchUrl('/statuses/retweets/' . $id . '.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getRetweetsById($id, $count, $trim_user),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "public function getTwitterPosts($account_id, $screen_name, $limit)\n\t{\n\t\treturn $this->connection->get('statuses/user_timeline', ['user_id' => $account_id, 'screen_name' => $screen_name, 'count' => $limit]);\n\t}", "function getTweets($settings, $screen_name, $num_tweets) {\n \n /**For GET request of user $screen_name's timeline**/\n $url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';\n\n /**Req'd vars for Oauth authentication**/ \n $requestMethod = 'GET';\n $getfield = \"?screen_name={$screen_name}&count={$num_tweets}&include_rts=1\";\n $twitter = new TwitterAPIExchange($settings);\n $twitter->setGetfield($getfield);\n $twitter->buildOauth($url, $requestMethod);\n /**json request**/\n $json_req = $twitter->performRequest();\n $data = json_decode($json_req, TRUE);\n \n \n return $data;\n }", "public static function get_tweets()\n\t{\n\t\t$access_token = static::get_access_token();\n\n\t\tob_start();// buffer output\n\n\t\t// Execute CURL\n\t\t\n\t\t//open connection\n\t\t$ch = curl_init();\n\n\t\t//set the url\n\t\tcurl_setopt($ch,CURLOPT_URL, 'https://api.twitter.com/1.1/search/tweets.json?count=4&q='.urlencode('from:@intactfx'));\n\n\t\t// headers\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, [\"Authorization: Bearer {$access_token}\"]);\n\n\t\t//execute\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$result = curl_exec($ch);\n\n\t\t//close connection\n\t\tcurl_close($ch);\n\n\t\t// capture contents\n\t\t$search_result = ob_get_contents();\n\t\tob_end_clean();\n\n\t\treturn json_decode($search_result)->statuses;\n\t}", "function get_tweets() {\n $input = $this->validate_get_tweets();\n $res = $this->OpenDataModel->get_tweets();\n if ($res) {\n foreach ($res as $r) {\n $data[] = array(\n 'id' => $r['id'],\n 'post' => $r['post'],\n 'tag' => $this->OpenDataModel->get_array_tag(explode(',', $r['tag'])),\n 'photo' => $this->check_image($r['photo']), //$r['photo'],\n 'likes' => $this->OpenDataModel->count_post_like($r['id']),\n 'comments' => $this->OpenDataModel->count_post_comment($r['id']),\n 'created_date' => $r['created_date'],\n 'update_date' => $r['update_date'],\n 'is_liked' => $this->check_like_by_user($input['user_id'], $r['id'])\n );\n }\n if ($data) {\n return_data(true, 'Successfully! Found All Tweets.', $data);\n }\n }\n return_data(false, 'No tweet found.', array());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Parses the contents of a wiki page, turning template calls into an arracy of ENPageComponent objects.
public function parsePageContents( $page_contents ) { // escape out variables like "{{PAGENAME}}" $page_contents = str_replace( '{{PAGENAME}}', '&#123;&#123;PAGENAME&#125;&#125;', $page_contents ); // escape out parser functions $page_contents = preg_replace( '/{{(#.+)}}/', '&#123;&#123;$1&#125;&#125;', $page_contents ); // escape out transclusions, and calls like "DEFAULTSORT" $page_contents = preg_replace( '/{{(.*:.+)}}/', '&#123;&#123;$1&#125;&#125;', $page_contents ); // escape out variable names $page_contents = str_replace( '{{{', '&#123;&#123;&#123;', $page_contents ); $page_contents = str_replace( '}}}', '&#125;&#125;&#125;', $page_contents ); // escape out tables $page_contents = str_replace( '{|', '&#123;|', $page_contents ); $page_contents = str_replace( '|}', '|&#125;', $page_contents ); // traverse the page contents, one character at a time $uncompleted_curly_brackets = 0; $free_text = ""; $template_name = ""; $field_name = ""; $field_value = ""; $field_has_name = false; for ( $i = 0; $i < strlen( $page_contents ); $i++ ) { $c = $page_contents[$i]; if ( $uncompleted_curly_brackets == 0 ) { if ( $c == "{" || $i == strlen( $page_contents ) - 1 ) { if ( $i == strlen( $page_contents ) - 1 ) { $free_text .= $c; } $uncompleted_curly_brackets++; $free_text = trim( $free_text ); if ( $free_text != "" ) { $freeTextComponent = ENPageComponent::newFreeText( $free_text ); $this->addComponent( $freeTextComponent ); $free_text = ""; } } elseif ( $c == "{" ) { // do nothing } else { $free_text .= $c; } } elseif ( $uncompleted_curly_brackets == 1 ) { if ( $c == "{" ) { $uncompleted_curly_brackets++; $creating_template_name = true; } elseif ( $c == "}" ) { $uncompleted_curly_brackets--; // is this needed? // if ($field_name != "") { // $field_name = ""; // } if ( $page_contents[$i - 1] == '}' ) { $this->addComponent( $curTemplate ); } $template_name = ""; } } elseif ( $uncompleted_curly_brackets == 2 ) { if ( $c == "}" ) { $uncompleted_curly_brackets--; } if ( $c == "{" ) { $uncompleted_curly_brackets++; $field_value .= $c; } else { if ( $creating_template_name ) { if ( $c == "|" || $c == "}" ) { $curTemplate = ENPageComponent::newTemplate( $template_name ); $template_name = str_replace( ' ', '_', trim( $template_name ) ); $template_name = str_replace( '&', '&amp;', $template_name ); $creating_template_name = false; $creating_field_name = true; $field_id = 1; } else { $template_name .= $c; } } else { if ( $c == "|" || $c == "}" ) { if ( $field_has_name ) { $curTemplate->addNamedField( $field_name, $field_value ); $field_value = ""; $field_has_name = false; } else { // "field_name" is actually the value $curTemplate->addUnnamedField( $field_name ); } $creating_field_name = true; $field_name = ""; } elseif ( $c == "=" ) { // handle case of = in value if ( !$creating_field_name ) { $field_value .= $c; } else { $creating_field_name = false; $field_has_name = true; } } elseif ( $creating_field_name ) { $field_name .= $c; } else { $field_value .= $c; } } } } else { // greater than 2 if ( $c == "}" ) { $uncompleted_curly_brackets--; } elseif ( $c == "{" ) { $uncompleted_curly_brackets++; } $field_value .= $c; } } }
[ "function ouwiki_init_pages($course,$cm,$ouwiki,$subwiki,$ouwiki) {\n if(is_null($ouwiki->template)) {\n return;\n }\n global $CFG;\n $template=$CFG->dataroot.'/'.$ouwiki->course.'/moddata/ouwiki/'.\n $ouwiki->id.'/'.$ouwiki->template;\n if(!file_exists($template)) {\n ouwiki_error('Failed to load wiki template - file missing.');\n }\n $xml=DOMDocument::load($template);\n if(!$xml) {\n ouwiki_error('Failed to load wiki template - not valid XML. Check file in XML viewer and correct.');\n }\n if($xml->documentElement->tagName!='wiki') {\n ouwiki_error('Failed to load wiki template - must begin with &lt;wiki> tag.');\n }\n for($page=$xml->documentElement->firstChild;$page;$page=$page->nextSibling) {\n if($page->nodeType!=XML_ELEMENT_NODE) {\n continue;\n }\n if($page->tagName!='page') {\n ouwiki_error('Failed to load wiki template - expected &lt;page>.');\n }\n $title=null;\n $xhtml=null;\n for($child=$page->firstChild;$child;$child=$child->nextSibling) {\n if($child->nodeType!=XML_ELEMENT_NODE) {\n continue;\n }\n if(!$child->firstChild) {\n $text='';\n } else {\n if($child->firstChild->nodeType!=XML_TEXT_NODE &&\n $child->firstChild->nodeType!=XML_CDATA_SECTION_NODE) {\n ouwiki_error('Failed to load wiki template - expected text node.');\n }\n if($child->firstChild->nextSibling) {\n ouwiki_error('Failed to load wiki template - expected single text node.');\n }\n $text=$child->firstChild->nodeValue;\n }\n switch($child->tagName) {\n case 'title' :\n $title=$text;\n break;\n case 'xhtml' :\n $xhtml=$text;\n break;\n default:\n ouwiki_error('Failed to load wiki template - unexpected element &lt;'.$child->tagName.'>.');\n }\n }\n if($xhtml===null) {\n ouwiki_error('Failed to load wiki template - required &lt;xhtml>.');\n }\n ouwiki_save_new_version($course,$cm,$ouwiki,$subwiki,$title,$xhtml,-1,-1,-1,true);\n }\n}", "public function load()\n {\n // Caching must be disabled if we get some extra page data because then this page\n // is not self-contained anymore.\n $enableCache = ($this->page->getExtraPageData() == null);\n \n if ($enableCache and $this->wasCached())\n {\n // Get the page from the cache.\n $configText = $this->cache->read($this->page->getUri(), 'json');\n $config = json_decode($configText, true);\n $this->page->getConfig()->set($config, false); // false = No need to validate this.\n if (!$this->page->getConfig()->hasValue('segments'))\n throw new PieCrustException(\"Error in page '\".$this->page->getPath().\"': Can't get segments list from cache.\");\n \n $contents = array('content' => null, 'content.abstract' => null);\n foreach ($config['segments'] as $key)\n {\n $contents[$key] = $this->cache->read($this->page->getUri(), $key . '.html');\n }\n \n return $contents;\n }\n else\n {\n // Load the page from disk and re-format it.\n $rawContents = file_get_contents($this->page->getPath());\n $parsedContents = Configuration::parseHeader($rawContents);\n \n // We need to set the configuration on the page right away because\n // most formatters, template engines, and other elements will need\n // access to it for rendering the contents.\n $config = $this->page->getConfig();\n $config->set($parsedContents['config']);\n \n $rawSegmentsOffset = $parsedContents['text_offset'];\n $rawSegments = $this->parseContentSegments($rawContents, $rawSegmentsOffset);\n \n $pieCrust = $this->page->getApp();\n $pageData = $this->page->getPageData();\n $siteData = DataBuilder::getSiteData($pieCrust);\n $appData = DataBuilder::getAppData($pieCrust, $siteData, $pageData, null, false);\n $data = Configuration::mergeArrays(\n $pageData,\n $siteData,\n $appData\n );\n $templateEngineName = $this->page->getConfig()->getValue('template_engine');\n $templateEngine = $pieCrust->getTemplateEngine($templateEngineName);\n if (!$templateEngine)\n throw new PieCrustException(\"Error in page '\".$this->page->getPath().\"': Unknown template engine '\".$templateEngineName.\"'.\");\n $contents = array('content' => null, 'content.abstract' => null);\n foreach ($rawSegments as $key => $content)\n {\n ob_start();\n try\n {\n $templateEngine->renderString($content, $data);\n $renderedContent = ob_get_clean();\n }\n catch (Exception $e)\n {\n ob_end_clean();\n throw new PieCrustException(\"Error in page '\".$this->page->getPath().\"': \".$e->getMessage(), 0, $e);\n }\n \n $config->appendValue('segments', $key);\n $renderedAndFormattedContent = $pieCrust->formatText($renderedContent, $config['format']);\n $contents[$key] = $renderedAndFormattedContent;\n if ($key == 'content')\n {\n $matches = array();\n if (preg_match('/^<!--\\s*(more|(page)?break)\\s*-->\\s*$/m', $renderedAndFormattedContent, $matches, PREG_OFFSET_CAPTURE))\n {\n // Add a special content segment for the \"intro/abstract\" part of the article.\n $offset = $matches[0][1];\n $abstract = substr($renderedAndFormattedContent, 0, $offset);\n $config->appendValue('segments', 'content.abstract');\n $contents['content.abstract'] = $abstract;\n }\n }\n }\n \n // Do not cache the page if 'volatile' data was accessed (e.g. the page displays\n // the latest posts).\n $wasVolatileDataAccessed = $data['pagination']->wasPaginationDataAccessed();\n if ($enableCache and $this->cache != null and !$wasVolatileDataAccessed)\n {\n $yamlMarkup = json_encode($config->get());\n $this->cache->write($this->page->getUri(), 'json', $yamlMarkup);\n \n $keys = $config['segments'];\n foreach ($keys as $key)\n {\n $this->cache->write($this->page->getUri() . '.' . $key, 'html', $contents[$key]);\n }\n }\n \n return $contents;\n }\n }", "public function getContents($page)\n\t{\n\t\t/* Retrieve the info for the sent page */\n\t\t$template \t\t= $this->_getTemplate($page);\n\t\t\n\t\t$parsedContent\t= $this->_parseContent($template); \n\t\t\n\t\techo $parsedContent;\t\t\t\t\n\t\treturn;\n\t}", "public function buildContent(Context $context, Page $page);", "function createPage() {\n\t\treturn ($this->parseTemplate($this->template));\n\t}", "function ouwiki_init_pages($course, $cm, $ouwiki, $subwiki) {\n global $CFG;\n\n if (is_null($ouwiki->template)) {\n return;\n }\n\n $fs = get_file_storage();\n $zip = get_file_packer();\n $context = context_module::instance($cm->id);\n $filepath = '/'.$context->id.'/mod_ouwiki/template/'.$ouwiki->id.$ouwiki->template;\n if ($file = $fs->get_file_by_hash(sha1($filepath)) AND !$file->is_directory()) {\n if (strpos($ouwiki->template, '.xml') !== false) {\n // XML template expected.\n $xmlfile = $file;\n } else {\n // Zip format expected.\n $xmlfilename = strtolower(get_string('template', 'mod_ouwiki')) . '.xml';\n if (!$xmlfile = $fs->get_file($context->id, 'mod_ouwiki', 'template', $ouwiki->id, '/',\n $xmlfilename)) {\n // XML (and other files) not extracted yet. Do once only.\n $zip->extract_to_storage($file, $context->id, 'mod_ouwiki', 'template', $ouwiki->id, '/');\n $xmlfile = $fs->get_file($context->id, 'mod_ouwiki', 'template', $ouwiki->id, '/',\n $xmlfilename);\n }\n }\n\n $content = $xmlfile->get_content();\n $xml = new DOMDocument();\n $xml->loadXML($content);\n if (!$xml) {\n ouwiki_error('Failed to load wiki template - not valid XML.\n Check file in XML viewer and correct.');\n }\n if ($xml->documentElement->tagName != 'wiki') {\n ouwiki_error('Failed to load wiki template - must begin with &lt;wiki> tag.');\n }\n for ($page = $xml->documentElement->firstChild; $page; $page = $page->nextSibling) {\n if ($page->nodeType != XML_ELEMENT_NODE) {\n continue;\n }\n if ($page->tagName != 'page') {\n ouwiki_error('Failed to load wiki template - expected &lt;page>.');\n }\n $title = null;\n $xhtml = null;\n $oldcontextid = null;\n $oldpagever = null;\n $oldversionid = null;\n $attachments = array();\n for ($child = $page->firstChild; $child; $child = $child->nextSibling) {\n if ($child->nodeType != XML_ELEMENT_NODE) {\n continue;\n }\n if (!$child->firstChild) {\n $text = '';\n } else {\n if ($child->firstChild->nodeType != XML_TEXT_NODE &&\n $child->firstChild->nodeType != XML_CDATA_SECTION_NODE) {\n ouwiki_error('Failed to load wiki template - expected text node.');\n }\n if ($child->firstChild->nextSibling) {\n ouwiki_error('Failed to load wiki template - expected single text node.');\n }\n $text = $child->firstChild->nodeValue;\n }\n switch ($child->tagName) {\n case 'title':\n // Replace non-breaking spaces with normal spaces in title\n $title = str_replace(html_entity_decode('&nbsp;', ENT_QUOTES, 'UTF-8'), ' ', $text);\n break;\n case 'xhtml':\n $xhtml = $text;\n break;\n case 'versionid':\n $oldversionid = (int) $text;\n break;\n case 'attachments':\n $attachments = explode('|', $text);\n break;\n default:\n ouwiki_error('Failed to load wiki template - unexpected element &lt;'.\n $child->tagName.'>.');\n }\n }\n if ($xhtml === null) {\n ouwiki_error('Failed to load wiki template - required &lt;xhtml>.');\n }\n\n $newverid = ouwiki_save_new_version($course, $cm, $ouwiki, $subwiki, $title, $xhtml,\n -1, -1, -1, true);\n\n // Copy any images or attachments associated with old version id.\n if ($oldfiles = $fs->get_directory_files($context->id, 'mod_ouwiki', 'template',\n $ouwiki->id, \"/$oldversionid/\")) {\n foreach ($oldfiles as $oldfile) {\n if (in_array($oldfile->get_filename(), $attachments)) {\n // Copy this file to the version attachment record.\n $fs->create_file_from_storedfile(array(\n 'contextid' => $context->id,\n 'filearea' => 'attachment',\n 'itemid' => $newverid,\n 'filepath' => '/'), $oldfile);\n }\n if (mimeinfo('string', $oldfile->get_filename()) == 'image') {\n // Copy this image file to the version record.\n $fs->create_file_from_storedfile(array(\n 'contextid' => $context->id,\n 'filearea' => 'content',\n 'itemid' => $newverid,\n 'filepath' => '/'), $oldfile);\n }\n }\n }\n }\n // lock start page if setting enabled\n if ($ouwiki->lockstartpages) {\n // get start page\n $startpage = ouwiki_get_current_page($subwiki, null);\n ouwiki_lock_editing($startpage->pageid, true);\n }\n } else {\n ouwiki_error('Failed to load wiki template - file missing.');\n }\n}", "public function parse($page)\n {\n $this->fragments = []; // reset internal array if parse() already called on this Parser instance\n $blueprint = $page->intendedTemplate()->name();\n $fields = $this->settings[\"fields\"][$blueprint];\n\n $fragment = new Fragment();\n $fragment->set_page_id($page->id());\n $fragment->set_blueprint($blueprint);\n\n // Meta fields are not being indexed separately but rather give context to the\n // main and boost fields. Since they do not change from fragment to fragment,\n // we set them once and for all.\n if (!empty($fields[\"meta\"])) {\n foreach ($fields[\"meta\"] as $meta_field) {\n // ATTENTION: VERY DIRTY HARDCODED PREPROCESSING AROUND\n // PRESUPPOSED DATE FIELDS\n if ($meta_field == Fragment::DATETIME || $meta_field == \"date\") {\n $fragment->set_meta($meta_field, $page->$meta_field()->toDate());\n } else {\n $fragment->set_meta($meta_field, $page->$meta_field()->value());\n }\n }\n }\n\n // Boost fields\n if (!empty($fields[\"boost\"])) {\n foreach ($fields[\"boost\"] as $boost_field) {\n if (!empty($page->$boost_field()->value())) {\n $fragment->set_id($boost_field);\n $fragment->set_importance(0);\n $fragment->append_content($page->$boost_field()->value());\n\n $this->add_fragment($fragment);\n }\n }\n }\n\n // Main fields\n foreach ($fields[\"main\"] as $main_field) {\n // heading_count is being used to uniquely identify a heading in the\n // content\n $heading_count = 0;\n\n if (!$page->$main_field()->isEmpty()) {\n // Initialisation for a possible headless fragment. If none are found, the\n // next add_fragment() will try adding an empty fragment (which does\n // nothing).\n $fragment->set_id($main_field);\n $fragment->set_importance(1);\n\n // Start breaking up the textarea line by line\n $line = strtok($page->$main_field(), PHP_EOL);\n while ($line !== false) {\n // A new heading has been found, a new fragment can be prepared.\n if (preg_match('/^(#+)\\s+(.+)$/', $line, $matches)) {\n $heading_count++;\n\n $this->add_fragment($fragment);\n\n // Starting new heading based fragment\n $fragment->set_heading($matches[2]);\n $fragment->set_id(\n $main_field .\n \"--\" .\n \\Kirby\\Toolkit\\Str::slug($matches[2]) .\n \"--\" .\n $heading_count\n );\n $fragment->set_importance(strlen($matches[1]));\n } else {\n $fragment->append_content($line);\n }\n // NB: two PHP_EOL (i.e. two new lines) without a character or\n // string between them will be considered as one by strtok().\n // Effectively, this means that empty lines do not make it to the\n // final content.\n $line = strtok(PHP_EOL);\n }\n\n // Saving the last fragment (as saving only happens as a new heading\n // is found). This also takes care of heading-less articles.\n $this->add_fragment($fragment);\n }\n }\n return $this->fragments;\n }", "abstract protected function render_page_content(): void;", "private function loadPage()\n {\n global $warn;\n\n if ($this->page)\n return $this->page; // already done\n\n if ($this->main != \"\" &&\n (substr($this->main, 0, 4) == 'http' ||\n file_exists($this->main)))\n {\n $page = @file_get_contents($this->main);\n if ($page === false)\n { // unexpected failure\n $error = error_get_last();\n $page = '<p><strong>Request for document name=\\'' .\n $this->main . \"' failed</strong>, error=\" .\n '<span class=\"error\">' .\n var_export($error, true) .\n \"</span></p>\";\n } // unexpected failure\n }\n else\n $page = '<p><strong>File not found name=\\'' .\n $this->main . \"'</strong></p>\";\n $this->phpMode = strpos($page, self::OPEN_BRACE) === false;\n\n /****************************************************************\n * Sub Page *\n * *\n * This code substitutes the contents of the sub-pages *\n * directly into the template. This is required because *\n * the sub-pages may themselves have substitutions. *\n ****************************************************************/\n // handle traditional single sub-include by adding it to the array\n // of includes\n if (isset($this->sub) && isset($this->submarker))\n $this->includes[$this->submarker] = $this->sub;\n\n // loop through includes\n foreach($this->includes as $submarker => $subfile)\n { // sub-template provided\n if ($this->phpMode)\n $subpos = strpos($page, \"$\" . $submarker);\n else\n $subpos = strpos($page, self::OPEN_BRACE . $submarker . self::CLOSE_BRACE);\n if ($subpos !== false)\n { // have a place to insert the sub-page\n $sub = '';\n if (strlen($subfile) > 255 ||\n strpos($subfile, self::OPEN_BRACE) !== false ||\n strpos($subfile, '<') !== false)\n { // too long to be key or filename\n $sub = $subfile;\n } // too long to be key or filename\n else\n { // short enough to be record key\n if ($this->db &&\n substr($subfile,0,1) != '/' &&\n substr($subfile,0,1) != '.' &&\n substr($subfile, strlen($subfile) - 5) != '.html')\n { // get sub-template from database record\n $table = $this->table;\n $sql = \"SELECT `Content` FROM $table WHERE Stub=?\";\n $stmt = $pdo->prepare($sql);\n $sqlParms = array($subfile);\n $stmt->execute($sqlParms);\n $row = $stmt->fetch(PDO::FETCH_NUM);\n if (is_array($row))\n $sub = $row[0];\n else\n $sub =\n \"*** no record found for key '$subfile' ***\";\n } // get template from database record\n else\n if ($subfile != \"\" && file_exists($subfile))\n $sub = file_get_contents($subfile);\n else\n {\n error_log(__FILE__ . \" \" . __LINE__ .\n \" unable to open \\$subfile='$subfile' for template='\" . $this->main . \"'\\n\");\n $sub = \"*** file '$subfile' not found ***\";\n }\n } // short enough to be record key\n\n if ($this->phpMode)\n $aftpos = $subpos + strlen($submarker) + 1;\n else\n $aftpos = $subpos + strlen($submarker) + 4;\n // replace the insertion point with the text from the\n // sub-template\n $page = substr($page, 0, $subpos) .\n $sub . substr($page, $aftpos);\n } // have a place to insert the sub-page\n else\n {\n $backtrace = debug_backtrace();\n $caller = current($backtrace);\n $warn .= \"<p>Template.inc: \" . __LINE__ .\n \" unable to find submarker='$submarker' in template='\" . $this->main . \"' for inserting subfile='$subfile'\\n\" .\n 'called from ' . $caller['file'] . ':' . $caller['line'] . \"\\n\";\n }\n } // sub-template provided\n return $page;\n }", "function get_page_content() {\n\t\t\n\t\tif (empty($this->content['markdown']))\n\t\t\t$this->content['markdown'] = file_get_contents($this->text_file);\n\t\t\n\t\t// Split on content/meta split text\n\t\t$split = get_option('markdown_split');\n\t\t\n\t\t// Maybe no metas present?\n\t\tif (strpos($this->content['markdown'], $split) !== false) :\n\t\t\n\t\t\t$arr = explode($split, $this->content['markdown']);\n\t\t\t$this->content['markdown'] = $arr[1];\n\t\t\t$this->content['html'] = Markdown($arr[1]);\n\t\t\t$this->set_page_metas(parse_page_metas($arr[0]));\n\t\t\t\n\t\telse :\n\t\t\n\t\t\t$this->content['html'] = Markdown($this->content['markdown']);\t\t\n\t\t\t\n\t\tendif;\n\t\t\n\t}", "public function get_contents() {\n global $PAGE;\n if (!empty($this->properties->contents)) {\n if (!isset($this->properties->contentsformat)) {\n $this->properties->contentsformat = FORMAT_HTML;\n }\n $context = context_module::instance($PAGE->cm->id);\n $contents = file_rewrite_pluginfile_urls($this->properties->contents, 'pluginfile.php', $context->id,\n 'mod_languagelesson', 'page_contents', $this->properties->id);\n // Must do this BEFORE format_text()!!!!!!\n return format_text($contents, $this->properties->contentsformat,\n array('context'=>$context, 'noclean'=>true));\n // Page edit is marked with XSS, we want all content here.\n } else {\n return '';\n }\n }", "public function parseTemplate()\n {\n \n //parse included files {@include 'file.htm'}\n $this->output = \\lib\\view\\parsers\\ParseInclude::parse($this->output);\n //parse if statements\n $this->output = \\lib\\view\\parsers\\ParseCondition::parse($this->output);\n //parse blocks\n $this->output = ParseBlock::parse($this->output);\n //insert blocks (or stacks)\n $this->output = ParseBlock::put($this->output);\n //process while loops\n $this->output = ParseLoop::parseWhile($this->output);\n //process embed\n $this->output = \\lib\\view\\parsers\\ParseEmbed::parse($this->output);\n //process data\n $this->output = \\lib\\view\\parsers\\ParseData::parse($this->output);\n //process loads\n $this->output = \\lib\\view\\parsers\\ParseLoad::parse($this->output);\n \n }", "function separatePages($wikiContent) {\n\t\t$breakLines = array();\n\t\t$pages = preg_match_all('/\\{\\{pagebreak:((.)+)\\}\\}/',$wikiContent,$breakLines);\n\t\t$pageArray = array();\n\n\t\t$lastTitle = '';\n\t\tforeach ($breakLines[0] as $idx => $breakLine) {\n\t\t\t@list($contents,$wikiContent) = explode($breakLine,$wikiContent);\n\t\t\t/*\n\t\t\tprint_R($contents);\n\t\t\techo \"^^^ ..... \\n\";\n\t\t\tprint_R($wikiContent);\n\t\t\techo \"___ ..... \\n\";\n\t\t\t//*/\n\t\t\t$x = new Cgn_ArticlePage();\n\t\t\t$x->dataItem->content = $contents;\n\t\t\t$pageArray[] = $x;\n\t\t}\n\t\t$x = new Cgn_ArticlePage();\n\t\t$x->dataItem->content = $wikiContent;\n\t\t$pageArray[] = $x;\n\n\t\t//add in the titles\n\t\tforeach ($pageArray as $idx => $articlePage) {\n\t\t\t//the first page is part of the main article object\n\t\t\tif ($idx == 0) { continue; }\n\t\t\t$pageArray[$idx]->dataItem->title = $breakLines[1][$idx-1];\n\t\t}\n\t\treturn $pageArray;\n\t}", "public function get_page_content($page_num);", "abstract function buildPage();", "function main_page($content,$conf) {\n\t\t$this->conf =$conf;\n\n\t\t\t// Current page record which we MIGHT manipulate a little:\n\t\t$pageRecord = $GLOBALS['TSFE']->page;\n\t\t$this->tmplTFdata = unserialize($pageRecord['tx_typoflash_data']);\n\t\t$this->tmplTFdata = $this->tmplTFdata[$pageRecord['tx_typoflash_template']];\n\t\t\n\t\t\t// Find Template in root line IF there is no Data Structure set for the current page:\n\t\tif (!$pageRecord['tx_typoflash_template'])\t{\n\t\t\t\n\t\t\tforeach($GLOBALS['TSFE']->tmpl->rootLine as $pRec)\t{\n\t\t\t\t\n\t\t\t\tif ($pageRecord['uid'] != $pRec['uid'])\t{\n\t\t\t\t\tif ($pRec['tx_typoflash_template'])\t{\t// If there is a next-level DS:\n\t\t\t\t\t\t$pageRecord['tx_typoflash_template'] = $pRec['tx_typoflash_template'];\n\t\t\t\t\t\t$this->tmplTFdata = unserialize($pRec['tx_typoflash_data']);\n\t\t\t\t\t\t$this->tmplTFdata = $this->tmplTFdata[$pRec['uid']];\n\t\t\t\t\t} \n\t\t\t\t} else break;\n\t\t\t}\n\t\t}\n\n\t\t\n\t\t\n\t\treturn $this->renderElement($pageRecord, 'pages');\n\n }", "function frontend_page_content( $params, $smarty, $silent = false ){\n\t$type = $smarty->getTemplateVars( 'page_type' );\n\n\t// capture output to variable\n\tob_start( );\n\n\tif( $type == 'Normal' )\n\t\techo $smarty->getTemplateVars( '__page_content' );\n\telse{\n\t\t$page_id = $smarty->getTemplateVars( 'page_id' );\n\t\t$Plugins = Plugins::getInstance( );\n\t\t$Plugins->frontendPageType( $type, $page_id );\n\t}\n\n\t$content = ob_get_contents( );\n\tob_end_clean( );\n\n\t/**\n\t * parse the page content as a smarty template\n\t */\n\t$content = $smarty->fetch( 'eval:' . $content );\n\n\tif( $silent )\n\t\treturn $content;\n\n\techo $content;\n\t\n}", "abstract public function buildPage();", "private function _parse_page_file_($file, $page_data=array())\n\t{ \n\t\tob_start(); // start output buffer\n\t\textract($page_data);\n\t\tinclude $file;\n\t\t\n\t\t$parsed_content = ob_get_contents(); // get contents of buffer\n\t\t\n\t\tob_end_clean();\n\t\treturn $parsed_content;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
_isChildCollection Is the given name of a collection a child collection of this entry?
protected function _isChildCollection($value) { $this->_type(); if (!empty(AWeberAPI::$_collectionMap[$this->type]) && in_array($value, AWeberAPI::$_collectionMap[$this->type])) return true; return false; }
[ "public function hasCollection(string $name): bool;", "public function isCollection();", "function isCollection()\r\n {\r\n return ($this->getRecordType() == 2) ? true : false;\r\n }", "public function isInheritanceTypeCollectionPerClass()\n {\n return $this->inheritanceType == self::INHERITANCE_TYPE_COLLECTION_PER_CLASS;\n }", "public function isCollection()\n {\n $payload = $this->getPayload();\n return ($payload instanceof Collection);\n }", "public function isCollection(): bool\n {\n // If collection is not explicitly set, assume standard Laravel use,\n // where either collections or models are passed in as content.\n\n if (null === $this->getAttribute('collection')) {\n return $this->getContent() instanceof Collection;\n }\n\n return $this->getAttribute('collection');\n }", "public function isCollection(): bool\n {\n return $this->collection;\n }", "public function isCollection()\n {\n $payload = $this->getPayload();\n return ($payload instanceof HalCollection);\n }", "function is_collection_key() {\n return $this->get_collection_key() === 'yes';\n }", "public function isCollection()\n {\n return $this->as_collection;\n }", "public function isCollection(){\n return $this->isCollection;\n }", "public function isInheritanceTypeSingleCollection()\n {\n return $this->inheritanceType == self::INHERITANCE_TYPE_SINGLE_COLLECTION;\n }", "function is_collection($pid)\n{\n $obj = islandora_object_load($pid);\n return is_object($obj['COLLECTION_POLICY']);\n}", "public function shouldBeHandledAsCollection(): bool;", "public function collectionExists($name) {\r\n $query = 'SELECT collection FROM resto.collections WHERE collection=\\'' . pg_escape_string($name) . '\\'';\r\n $results = $this->dbDriver->fetch($this->dbDriver->query(($query)));\r\n return !empty($results);\r\n }", "function is_laravel_collection($d)\n{\n return is_object($d) === true && get_parent_class($d) === Collection::class;\n}", "public function isCollectionValuedAssociation(string $fieldName);", "private function isQueryOnCollectionGroup(Query $collection): bool\n {\n return data_get($this->getFrom($collection), 'allDescendants', false) === true;\n }", "protected function collection()\n {\n return $this->option('collection') ||\n Str::endsWith($this->argument('name'), 'Collection');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates the CAPTCHA action object from the route specified by [[captchaAction]].
public function createCaptchaAction() { $ca = Kant::$app->createController($this->captchaAction); if ($ca !== false) { /* @var $controller \Kant\Controller\Controller */ list ($controller, $actionID) = $ca; // $controller->layout = $this->layout; // $controller->view->layout = $this->layout; $action = $controller->createActions($actionID); if ($action !== null) { return $action; } } throw new InvalidConfigException('Invalid CAPTCHA action ID: ' . $this->captchaAction); }
[ "private function _create_captcha()\n\t{\n\t\t$cap = create_captcha(config_captcha());\n\t\t$image = $cap['image'];\n\t\t$this->session->set_userdata('captchaword', $cap['word']);\n\t\treturn $image;\n\t}", "public function createCaptcha()\n\t{\n\t\t# get key for captcha\n\t\t$key = $this->secretKey(6);\n\t\t\n\t\t# save the key in a session\n\t\t$_SESSION['taFormCaptcha'] = $key;\n\t\t\n\t\t# create the captcha image\n\t\t$img = $this->captchaImage($key, $img_width=180, $img_height=38);\n\t\t\n\t\t# set headers\n\t\theader(\"Content-type: image/png\");\n\t\theader('Cache-Control: no-cache');\n\t\theader('Pragma: no-cache');\n\t\t\n\t\t# output to browser as PNG image\n\t\t@imagepng($img);\n\t\t@imagedestroy($img);\n\t}", "public function make()\n {\n $captchaCode = strtolower(Str::random(4));\n Session::put('captchaCode', $captchaCode);\n\n $img = imagecreatefromjpeg(public_path().'/img/default/captcha.jpg'); // Create image from file\n\n $color = imagecolorallocate($img, rand(0, 50), rand(0, 50), rand(0, 50));\n $font = public_path().'/img/default/xfiles.ttf';\n $fontHeight = 12; // Font height\n $angle = rand(-3, 3);\n $x = rand(3, 17);\n $y = 16; // y = 0 is located at the BOTTOM of the picture!\n\n imagettftext($img, $fontHeight, $angle, $x, $y, $color, $font, $captchaCode); // Add text to image\n\n imagejpeg($img); // Display image\n event(self::EVENT_NAME_SIMPLE_CAPTCHA_GENERATED, [$img]);\n\n imagedestroy($img); // Delete image from memory\n }", "public function captchaImageAction()\n {\n $captchaId = preg_replace( \"/[^0-9a-z]+/u\", '', strtolower( basename( $this->_getParam( 'id' ) ) ) );\n $captchaFile = OSS_Utils::getTempDir() . \"/captchas/{$captchaId}.png\";\n \n if( @file_exists( $captchaFile ) )\n {\n Zend_Controller_Action_HelperBroker::removeHelper( 'viewRenderer' );\n @ob_end_clean();\n header( 'Content-type: image/png' );\n @readfile( $captchaFile );\n }\n else\n $this->_forward( 'error-404', 'error' );\n }", "public function getCaptcha(){\n\t\t$width = Input::get('w', 100);\n\t\t$height = Input::get('h', 25);\n\t\t$letters = Input::get('letters', 4);\n\t\t$cpa = new Captcha($width, $height, $letters);\n\t\theader(\"Content-Type: image/png\");\n\t\treturn $cpa->createImage();\n\t}", "public function generateCaptcha() {\n\t\t// create a captcha with the CaptchaBuilder lib\n\t\t$builder = new CaptchaBuilder ();\n\t\t$builder->build ();\n\t\t\n\t\t// write the captcha character into session\n\t\t$_SESSION ['captcha'] = $builder->getPhrase ();\n\t\t\n\t\t// render an image showing the characters (=the captcha)\n\t\theader ( 'Content-type: image/jpeg' );\n\t\t$builder->output ();\n\t}", "public function generateCaptcha() {\n return $this->captcha->image();\n }", "function captcha_generate_token() {\n\t// Use action token plus some random for uniqueness\n\treturn md5(generate_action_token(time()) . rand()); \n}", "public function generateCaptcha()\n {\n // create a captcha with the CaptchaBuilder lib\n $builder = new CaptchaBuilder;\n $builder->build();\n\n // write the captcha character into session\n $_SESSION['captcha'] = $builder->getPhrase();\n\n // render an image showing the characters (=the captcha)\n header('Content-type: image/jpeg');\n $builder->output();\n }", "private function generate_captcha(){\n\t\t$s = $this->session;\n\t\tif($s->contains('captcha') && $s->get('captcha_time') > time() - 1800){\n\t\t\t$s->set('captcha', $s->get('captcha') + 1);\n\t\t\tif($s->get('captcha') > 10) {\n\t\t\t\t$this->data['show_captcha'] = true;\n\t\t\t\t$s->set('require_captcha', true);\n\t\t\t}\n\t\t} else {\n\t\t\t$s->set('captcha', 1);\n\t\t\t$s->set('captcha_time', time());\n\t\t\t$s->wipe('require_captcha');\n\t\t}\n\t}", "protected function parseRouteAction($routeAction) {\r\n $actionParts = explode('@', $routeAction);\r\n \r\n $action = new stdClass();\r\n $action->path = $actionParts[0]; \r\n $action->class = $this->getControllerClass($actionParts[0]);\r\n $action->method = $actionParts[1];\r\n $action->params = array();\r\n \r\n return $action;\r\n }", "public function __construct(){\n $this->captchaBuilder = new CaptchaBuilder;\n }", "private function _getCaptcha()\n\t{\n\t\t$this->load->helper('captcha');\n\t\t\n\t\t$vals = array(\n\t\t\t'img_path'\t=> './temp/',\n\t\t\t'word'\t\t=> $this->users->genPass(3, false),\n\t\t\t'img_width'\t=> 70,\n\t\t\t'img_height' => 20,\n\t\t\t'img_url'\t=> base_url().'temp/',\n\t\t\t'fonts' => array('MyriadWebPro-Bold.ttf')\n\t\t);\n\t\t\n\t\t$cap = create_captcha($vals);\n\t\t \n\t\t$data = array(\n\t\t\t'captcha_time'\t=> $cap['time'],\n\t\t\t'ip_address'\t=> $this->input->ip_address(),\n\t\t\t'word'\t\t\t=> $cap['word']\n\t\t);\n\n\t\t$this->db->insert('captcha', $data);\n\t\t$this->session->set_flashdata('captcha', $cap['time'].'.jpg');\n\t\t\n\t\treturn $cap['image'];\n\t}", "private function prepare_captcha() {\n // Content to be displayed in captcha image\n $display = '';\n // Captcha answer to be stored in SESSION\n $answer = '';\n \n // Create the random math question\n if ($this->type === 'math') {\n $signs = array('+', '-', 'x');\n $result = 0;\n do {\n $sign = $signs[mt_rand(0, 2)];\n $left = mt_rand(1, 10);\n $right = mt_rand(1, 5);\n \n switch($sign) {\n case 'x': \n $result = $left * $right; \n break;\n \n case '-': \n $result = $left - $right; \n break;\n \n default: \n $result = $left + $right; \n break;\n }\n } while ($result <= 0); // no negative #'s or 0\n \n $display = \"$left $sign $right = ?\";\n $answer = (string) $result;\n }\n \n // Create the random text\n if ($this->type === 'text') {\n $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n // Generate each random character\n for ($i = 0, $mt_rand_max = strlen($pool) - 1; $i < 5; $i++) {\n $display .= $pool[mt_rand(0, $mt_rand_max)];\n }\n // Answer is the same as the display\n $answer = $display;\n }\n \n // Returns the content and correct answer of the captcha\n return array(\n 'display' => $display,\n 'answer' => $answer\n );\n }", "public static function getCaptcha();", "public function generate()\n {\n // Check if there is a challenge set for this user. Delete old and create a new one.\n // Either way, the timed removal of old captchas will fix this sort of thing.\n\n // list all possible characters, similar looking characters and vowels have been removed\n $possible = '23456789bcdfghjkmnpqrstvwxyz';\n $characters = '';\n $i = 0;\n\n // create a captcha based on supplied length.\n while ($i < $this->CI->bw_config->captcha_length) {\n $characters .= substr($possible, mt_rand(0, strlen($possible) - 1), 1);\n $i++;\n }\n\n // Array to pass to CI captcha helper.\n $config = array('word' => $characters,\n 'img_path' => '/tmp/',\n 'img_url' => base_url() . '',\n 'font_path' => 'assets/font.ttf',\n 'img_width' => '218',\n 'base64' => TRUE\n );\n\n // Create captcha from the config data.\n $captcha = create_captcha($config);\n\n // Load the base64 image into memory and then erase the file.\n $image = $captcha['image'];\n\n $this->CI->session->set_userdata('captha_sol', $characters);\n\n return $image;\n }", "function renderCaptcha() : string {\n\t$c = genCaptcha();\n\t$p = slashPath( pageRoutePath( 'showcaptcha', 'captcha' ), true );\n\t\n\treturn \n\trender( template( 'tpl_captcha' ), [\n\t\t'cap_a'\t\t=> $c[0],\n\t\t'captcha'\t=> $p . $c[1]\n\t] );\n}", "public function getCaptcha()\n {\n \n if(!$this->_captchaAdapter) {\n \n $this->_captchaAdapter=CaptchaFactory::factory(\n array('class' => 'dumb')\n );\n }\n \n return $this->_captchaAdapter;\n }", "function captcha()\n{\n return \\App\\Services\\CaptchaService::instance();\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Check FB apps like or not by current user
public function fbAppLikeOrUnlike($facebook) { $signedRequest = $this->parsePageSignedRequest(); if (is_object($signedRequest)) { if( $signedRequest->page->liked ) $res = 1; else $res = 0; } else $res = 0; return $res; }
[ "function is_user_like_fangate(){\n\tglobal $gianism;\n\treturn $gianism->fb->is_user_like_me_on_fangate();\n}", "public function is_user_like_me_on_fangate(){\n\t\tif($this->fan_gate > 0){\n\t\t\t$page = $this->signed_request('page');\n\t\t\treturn (isset($page['liked']) && $page['liked']);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "public function likeCheck($user, $otherUser){\n\t\t$hasLiked = False;\n\t\t$sql = \"SELECT COUNT(*) AS amount FROM `liketable` WHERE likeSender = '$user' AND likeReceiver = '$otherUser'\";\n\t\t$result = $this->query($sql);\n\t\tif($result[0]['amount']!= 0){\n\t\t\t$hasLiked = True;\n\t\t}\n\t\treturn $hasLiked;\n\t}", "protected function checkForFacebookIos() {}", "public function isLiked()\n {\n if(!\\Auth::user())\n {\n $viewed = \\Session::get($this->get_like_key());\n if(!empty($viewed)) {\n return true;\n } \n } else {\n $user_action = $this->user_counters()\n ->where('action', 'like')\n ->where('class_name', snake_case(get_class($this)))\n ->where('object_id', $this->id)\n ->where('user_id', \\Auth::user()->id)->count();\n if($user_action > 0)\n return true;\n }\n return false;\n }", "public function checkPageLike() \n\t{\t\n\t\t// Get signed request info from Facebook\n\t\t$signed_request = $this->_facebook->getSignedRequest();\n\n\t\tif(isset($signed_request['page']['liked'])) \n\t\t{\n\t\t\treturn $signed_request['page']['liked'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "static function check_if_user_likes($account_name)\n {\n // get account data\n $account_data = Account::get_account_info_by_name($account_name); \n\n // attempt to get like data to check if liked already\n $like_data = Like::where('user_id', Auth()->id())\n ->where('account_id', $account_data->id)\n ->first();\n \n // response based on if like exists\n if(isset($like_data)){\n return true;\n } else {\n return false;\n }\n }", "function is_fb_user_fan() {\n\t$is_fan=false;\n\tif ( isset( $_REQUEST['signed_request'] ) ) {\n\t\t$signed_request = $_REQUEST[\"signed_request\"];\n\t\tlist($encoded_sig, $payload) = explode('.', $signed_request, 2); \n\t\t$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);\n\t\tif( isset( $data['page'] ) ) {\n\t\t\t$is_fan=$data['page']['liked'];\n\t\t}\n\t}\n\treturn $is_fan;\n}", "public static function likes()\n {\n if(!self::checkperms(\"read_stream\"))\n return false;\n $query=\"SELECT user_id, object_id, post_id FROM like WHERE user_id=me()\";\n return self::fql($query);\n }", "function isLiked(int $podcastId, int $userId) {\n if(\\App\\Like::where('podcast_id', $podcastId)->where('user_id', $userId)->count() > 0) {\n return true;\n } else {\n return false;\n }\n}", "function bp_like_users_who_like($bp_like_id = '') {\n $bp_like_id = bp_get_activity_id(); \n $users_who_like = array_keys(bp_activity_get_meta($bp_like_id, 'liked_count', true));\n if (count($users_who_like) == 1) { ?>\n<p><?php echo bp_core_get_userlink($users_who_like[0], $no_anchor = false, $just_link = false); ?><?php _e(' liked this.', 'bp-like'); ?> </p>\n <?php } else {\n $others = count($users_who_like)-1;\n echo bp_core_get_userlink($users_who_like[$others], $no_anchor = false, $just_link = false);\n _e(' and ', 'bp-like'); \n echo bp_core_get_userlink($users_who_like[$others - 1], $no_anchor = false, $just_link = false);\n _e(' and ', 'bp-like'); echo $others . _e('liked this', 'bp-like');\n \n }\n}", "function bp_like_is_liked( $item_id = '', $type = '', $user_id = '' ) {\n\tglobal $bp;\n\t\n\tif ( !$type )\n\t\treturn false;\n\t\n\tif ( !$item_id )\n\t\treturn false;\n\t\n\tif ( !$user_id )\n\t\t$user_id = $bp->loggedin_user->id;\n\t\n\tif ( $type == 'activity' )\n\t\t$user_likes = get_user_meta( $user_id, 'bp_liked_activities', true );\n\t\n\tif ( $type == 'blogpost' )\n\t\t$user_likes = get_user_meta( $user_id, 'bp_liked_blogposts', true );\n\t\n\tif ( !$user_likes ){\n\t\treturn false;\n\t} elseif ( !array_key_exists( $item_id, $user_likes ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t};\n}", "public function isLikedByUser()\n {\n return Auth::user() ? (bool) $this->likes->contains(Auth::user()->id) : false;\n }", "public function hasLikes()\n\t{\n\t\t$this->getPin();\n\n\t\treturn $this->openGraph->getTag('pinterestapp.likes') != 0;\n\t}", "public function is_user_liked_questionBox()\n {\n\n\n return\n $this->user_likes()\n ->where(AskLikeEnum::USER_ID, Auth::id())\n ->exists();\n\n }", "public function isFacebook() {}", "function checkCurrentUserLike ($user_id, $image_id, $connDb) {\n\t$sql_get_like = \"SELECT * FROM likes WHERE image_id = :image_id AND user_id = :user_id\";\n\t$get_like = $connDb->prepare($sql_get_like);\n\t$get_like->bindValue(':image_id', $image_id);\n\t$get_like->bindValue(':user_id', $user_id);\n\t$get_like->execute();\n\t$like_found = $get_like->fetch(PDO::FETCH_ASSOC);\n\treturn($like_found);\n}", "public function user_liked()\n\t{\n\t\t$tagdata = $this->EE->TMPL->tagdata;\n\n\t\tif (!$this->applicationExists() ) {\n\t\t\t$variables[] = array(\n\t\t\t\t$this->_ig_picpuller_prefix.'error_type' => 'NoInstagramApp',\n\t\t\t\t$this->_ig_picpuller_prefix.'error_message' => 'There is no application stored in the Expression Engine data base. It appear set up is not complete.',\n\t\t\t\t$this->_ig_picpuller_prefix.'status' => 'false'\n\t\t\t);\n\n\t\t\treturn $this->EE->TMPL->parse_variables($tagdata, $variables);\n\t\t};\n\n\t\t$this->use_stale = $this->EE->TMPL->fetch_param('use_stale_cache', 'yes');\n\n\t\t$variables = array();\n\t\t$user_id = $this->EE->TMPL->fetch_param('user_id');\n\t\t$limit = $this->EE->TMPL->fetch_param('limit');\n\n\t\tif(isset($limit))\n\t\t{\n\t\t\t$limit = \"&count=$limit\";\n\t\t}\n\n\t\t$min_id = $this->EE->TMPL->fetch_param('min_id');\n\n\t\tif(isset($min_id))\n\t\t{\n\t\t\t$min_id = \"&min_id=$min_id\";\n\t\t}\n\n\n\t\t$max_id = $this->EE->TMPL->fetch_param('max_id');\n\t\tif(isset($max_id))\n\t\t{\n\t\t\t$max_id = \"&max_like_id=$max_id\";\n\t\t}\n\n\t\t// Report error to user since user_id is required\n\n\t\tif($user_id == '')\n\t\t{\n\t\t\t//return \"ERROR: No user ID set for this function\";\n\t\t\t$variables[] = array(\n\t\t\t\t$this->_ig_picpuller_prefix.'error_type' => 'MissingReqParameter',\n\t\t\t\t$this->_ig_picpuller_prefix.'error_message' => 'No user ID set for this function',\n\t\t\t\t$this->_ig_picpuller_prefix.'status' => 'false'\n\t\t\t);\n\n\t\t\treturn $this->EE->TMPL->parse_variables($tagdata, $variables);\n\t\t}\n\n\t\t$ig_user_id = $this->getInstagramId($user_id);\n\t\t$oauth = $this->getAuthCredsForUser($user_id);\n\t\t$query_string = \"https://api.instagram.com/v1/users/self/media/liked?access_token={$oauth}\". $limit.$max_id.$min_id;\n\n\t\t$data = $this->_fetch_data($query_string);\n\n\t\tFB::info($data, \"user_liked func\");\n\n\t\tif ($data['status'] === FALSE ) { // && $this->use_stale != 'yes') {\n\t\t\t$variables[] = array(\n\t\t\t\t$this->_ig_picpuller_prefix.'error_type' => $data['error_type'],\n\t\t\t\t$this->_ig_picpuller_prefix.'error_message' => $data['error_message'],\n\t\t\t\t$this->_ig_picpuller_prefix.'status' => 'false'\n\t\t\t);\n\n\t\t\treturn $this->EE->TMPL->parse_variables($tagdata, $variables);\n\t\t}\n\n\t\t$node = $data['data'];\n\t\t$next_max_id = '';\n\t\tif (isset($data['pagination']['next_max_like_id'])){\n\t\t\t$next_max_id = $data['pagination']['next_max_like_id'];\n\t\t}\n\n\t\t$cacheddata = (isset($data['cacheddata'])) ? 'yes' : 'no';\n\n\t\tforeach($data['data'] as $node)\n\t\t{\n\t\t\t$variables[] = array(\n\t\t\t\t$this->_ig_picpuller_prefix.'type' => $node['type'],\n\t\t\t\t$this->_ig_picpuller_prefix.'video_low_resolution' => isset($node['videos']['low_resolution']['url']) ? $node['videos']['low_resolution']['url'] : \"No video URL available.\",\n\t\t\t\t$this->_ig_picpuller_prefix.'video_standard_resolution' => isset($node['videos']['standard_resolution']['url']) ? $node['videos']['standard_resolution']['url'] : \"No video URL available.\",\n\t\t\t\t$this->_ig_picpuller_prefix.'created_time' => $node['created_time'],\n\t\t\t\t$this->_ig_picpuller_prefix.'link' => $node['link'],\n\t\t\t\t$this->_ig_picpuller_prefix.'caption' => $node['caption']['text'],\n\t\t\t\t$this->_ig_picpuller_prefix.'low_resolution' => $node['images']['low_resolution']['url'],\n\t\t\t\t$this->_ig_picpuller_prefix.'thumbnail' => $node['images']['thumbnail']['url'],\n\t\t\t\t$this->_ig_picpuller_prefix.'standard_resolution' => $node['images']['standard_resolution']['url'],\n\t\t\t\t$this->_ig_picpuller_prefix.'latitude' => isset($node['location']['latitude']) ? $node['location']['latitude'] : '',\n\t\t\t\t$this->_ig_picpuller_prefix.'longitude' => isset($node['location']['longitude']) ? $node['location']['longitude'] : '',\n\t\t\t\t$this->_ig_picpuller_prefix.'media_id' => $node['id'],\n\t\t\t\t$this->_ig_picpuller_prefix.'next_max_id' => $next_max_id,\n\t\t\t\t$this->_ig_picpuller_prefix.'profile_picture' => $node['user']['profile_picture'],\n\t\t\t\t$this->_ig_picpuller_prefix.'username' => $node['user']['username'],\n\t\t\t\t$this->_ig_picpuller_prefix.'website' => $node['user']['website'],\n\t\t\t\t$this->_ig_picpuller_prefix.'full_name' => $node['user']['full_name'],\n\t\t\t\t$this->_ig_picpuller_prefix.'user_id' => $node['user']['id'],\n\t\t\t\t$this->_ig_picpuller_prefix.'comment_count' => $node['comments']['count'],\n\t\t\t\t$this->_ig_picpuller_prefix.'likes' => $node['likes']['count'],\n\t\t\t\t$this->_ig_picpuller_prefix.'status' => 'true',\n\t\t\t\t$this->_ig_picpuller_prefix.'cacheddata' => $cacheddata\n\t\t\t);\n\t\t}\n\t\treturn $this->EE->TMPL->parse_variables($tagdata, $variables);\n\t}", "public function isSocialUser();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Evaluate one double operand.
protected function evaluate1Double(Double $operand) { return new Double(-1 * $operand->getValue()); }
[ "public function evaluate(Double $leftOperand, Double $rightOperand = null);", "public function getDouble();", "public function evaluate($operandLeft, $operandRight);", "public function getDoubleValue() {}", "public function evaluate2Doubles(Double $leftOperand, Double $rightOperand) {\r\n\t\t$rtnValue = new Double($leftOperand->getValue() - $rightOperand->getValue());\r\n\r\n\t\treturn $rtnValue;\r\n\t}", "public static function doubleValue()\n {\n return Hamcrest_Type_IsDouble::doubleValue();\n }", "#[@test]\n public function doubleCast() {\n $this->assertSourcecodeEquals(\n '$s= (double)$num;',\n $this->emit('$s= (double)$num;')\n );\n }", "public function getDouble($i);", "public function testDouble() {\n $needle = 10.0;\n $result = $this->couple->double($needle, $this->haystack);\n $this->assertEquals('double', $result['type']);\n $this->assertEquals($needle, $result['needle']);\n $this->assertEquals($this->haystack, $result['haystack']);\n }", "function evaluate()\n {\n if ($this->operator = ArithmeticOperator::ADD_OP)\n $value = $this->expression_1->evaluate() + $this->expression_2->evaluate();\n elseif ($this->operator = ArithmeticOperator::SUB_OP)\n $value = $this->expression_1->evaluate() - $this->expression_2->evaluate();\n elseif ($this->operator = ArithmeticOperator::MUL_OP)\n $value = $this->expression_1->evaluate() * $this->expression_2->evaluate();\n else\n $value = $this->expression_1->evaluate() / $this->expression_2->evaluate();\n return $value;\n }", "function GetDouble()\n\t{\n\t\t$result = $this->sendRequest(\"GetDouble\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getValueDouble()\n {\n $value = $this->get(self::VALUE_DOUBLE);\n return $value === null ? (double)$value : $value;\n }", "public function nextDouble(): float\n {\n $this->expect(JsonToken::NUMBER);\n\n $result = (float)$this->pop();\n\n $this->incrementPathIndex();\n\n return $result;\n }", "public function getDouble( $attr );", "public function evaluate($operands) \r\n {\r\n $this->validate($operands);\r\n $C = array_pop($operands);\r\n $B = array_pop($operands);\r\n $A = array_pop($operands);\r\n $evaluation = pow($A, 2) + pow($B, 2);\r\n $expectedResult = pow($C, 2);\r\n if ($evaluation === $expectedResult) {\r\n return 1;\r\n }\r\n return 0;\r\n }", "public function getOperand1() {}", "private function handleDouble(float $parameter): Value\n {\n return new Value(new DoubleV($parameter));\n }", "public function testInvokeReturnsFloatIfValueIsFloatDollars()\n\t{\n\t\t$this->assertEquals(1000.5, (new EvaluateNumber())('$1,000.50'));\n\n\t\treturn;\n\t}", "abstract public function evaluate();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Will Echo out "say something"
public function say() { echo 'say something'; }
[ "public function say() {\n var_dump('man say');\n }", "public function say()\n {\n echo \"I'am Dog <br>\";\n }", "protected function say($message = '')\n {\n $this->output->writeln($message);\n }", "function say() {\n\t#include_once(\"text2speech.php\");\n\t\t\n\tif(!isset($_GET['member'])) {\n\t\tsendmessage();\n\t} else {\n\t\tsendgroupmessage();\n\t}\t\n}", "public function sayHello ()\n {\n return \"Hello, \".$this->owner;\n }", "function voice()\n {\n echo \"Dog: \" . $this->name . \" Gav-gav! \\n\";\n }", "public function talk();", "function say_goodbye() {\n return \"Goodbye, {$this->name} {$this->lastname}!\";\n }", "public function sayHi ()\n {\n }", "function say($str) {\n ob_start();\n echo $str;\n $this->ob_flush_clean();\n }", "protected function echoString() {\n }", "public function say($text) {\n $this->responseText = $text;\n }", "public function testSayingHello()\n {\n $input = 'Mahmoud Zalt';\n $expectedOutput = 'Hello, Mahmoud Zalt!';\n\n print $output = (new Say(new NameValidator()))->hello($input); // printing just for fun :)\n\n $this->assertEquals($output, $expectedOutput);\n }", "function SAY($OS, $voice, $statement){\n if($OS === 'WIN'){\n $voice->Speak($statement);\n }elseif($OS === 'LIN' || $OS === 'DAR'){\n exec(\"$voice '$statement'\");\n }\n}", "public function action()\n {\n $this->stdio->outln(\"Hello World!\");\n }", "function talk()\n {\n echo $this->_name . \" is Talking...<br>\";\n }", "public static function greet()\n {\n $version = Yentu::getVersion();\n $welcome = <<<WELCOME\nYentu Database Migration Tool\nVersion $version\n\n\nWELCOME;\n ClearIce::output($welcome);\n }", "function say($i) {\n echo($i . \"\\n\\n\");\n }", "function greetings($name)\n {\n echo \"Halo $name, Selamat Datang di Jabar Coding Camp!<br>\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Data Provider: Camel Case Values
private function dataProviderCamelCaseValues(): array { return [ ["camelCase"], ["testSomeMethod"], ["reallyLongCamelCase"] ]; }
[ "public function underscoredToLowerCamelCaseDataProvider() {}", "public static function camel($value){}", "public function lcfirstDataProvider() {}", "function title_case($value)\n\t{\n\t\treturn Str::title($value);\n\t}", "function title_case($value)\n {\n return Str::title($value);\n }", "public static function ucase()\n\t{\n\t}", "function title_case($value)\n {\n return Str::title($value);\n }", "function camel_case($value)\n {\n return Str::camel($value);\n }", "function camel_case($value)\n\t{\n\t\treturn Str::camel($value);\n\t}", "function title_case( $value )\n\t{\n\t\treturn Str::title( $value );\n\t}", "public function stdWrap_caseDataProvider() {}", "function acf_str_camel_case($string = '') {}", "public function toCamel() {\r\n return lcfirst( $this->toStudly( $this->_base ) );\r\n }", "function title_case($value)\n {\n return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8');\n }", "function db_lowercase() {\n return \"lower\";\n}", "static public function getDataCamelCaseMap()\n {\n return self::$dataCamelCaseMap;\n }", "function camel_case($value)\n {\n return StringHelper::toCamelCase($value);\n }", "public function pipeCamel($data, $parameters = [])\n {\n return camel_case($data);\n }", "private function filterToUpperCamelCase()\n {\n $this->addFilter(new TwigFilter(\n 'toUpperCamelCase',\n function ($string) {\n $result = '';\n foreach (explode(\n '_',\n trim(preg_replace('/[^_A-Za-z0-9]+/', '_', $string), '_')\n ) as $part) {\n $result.= strtoupper($part{0});\n if (strlen($part)>1) {\n $result.= substr($part, 1);\n }\n }\n return $result;\n }\n ));\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
funcao para retorno das notas do empenho (retona um resource);
function getNotas($iEmpenho, $sWhere = '', $lNotaCancelada = true) { $objNota = new cl_empnota(); if (trim($sWhere) != '') { $sWhere = " and $sWhere"; } if ($lNotaCancelada) { $sJoinPag = ''; } else { $sJoinPag = ' and e71_anulado is false'; } $sSqlNota = "SELECT {$this->sCamposNota}"; $sSqlNota .= " from empnota "; $sSqlNota .= " inner join empnotaele on e69_codnota = e70_codnota"; $sSqlNota .= " inner join db_usuarios on db_usuarios.id_usuario = empnota.e69_id_usuario"; $sSqlNota .= " inner join empempenho on empempenho.e60_numemp = empnota.e69_numemp"; $sSqlNota .= " inner join cgm on cgm.z01_numcgm = empempenho.e60_numcgm"; $sSqlNota .= " inner join db_config on db_config.codigo = empempenho.e60_instit"; $sSqlNota .= " and e60_instit =" . db_getsession('DB_instit'); $sSqlNota .= " inner join orcdotacao on orcdotacao.o58_anousu = empempenho.e60_anousu"; $sSqlNota .= " and orcdotacao.o58_coddot = empempenho.e60_coddot"; $sSqlNota .= " inner join pctipocompra on pctipocompra.pc50_codcom = empempenho.e60_codcom"; $sSqlNota .= " inner join emptipo on emptipo.e41_codtipo = empempenho.e60_codtipo"; $sSqlNota .= " left join pagordemnota on e71_codnota = empnota.e69_codnota {$sJoinPag}"; $sSqlNota .= " left join pagordem on e71_codord = e50_codord"; $sSqlNota .= " left join pagordemconta on e49_codord = e71_codord"; $sSqlNota .= " left join cgm cgmordem on e49_numcgm = cgmordem.z01_numcgm"; $sSqlNota .= " left join pagordemele on e53_codord = pagordemnota.e71_codord"; $sSqlNota .= " left join empnotaord on m72_codnota = e69_codnota"; $sSqlNota .= " left join matordem on m72_codordem = m51_codordem"; $sSqlNota .= " left join matordemanu on m51_codordem = m53_codordem"; $sSqlNota .= " where e69_numemp = {$iEmpenho} {$sWhere}"; $rsNota = $objNota->sql_record($sSqlNota); $this->iNumRowsNotas = $objNota->numrows; if ($objNota->numrows > 0) { return $rsNota; } else { return false; } }
[ "function check_resource($u, $a, $t, $rid) {\n global $con;\n $sql = \"SELECT id FROM resource WHERE deleted_at IS NULL AND owner='$u' AND author='$a' AND title='$t' LIMIT 1\";\n if (($temp = mysql_query($sql, $con))) {\n if (mysql_num_rows($temp) > 0) {\n if (($k = mysql_fetch_array($temp))) {\n if ($k[0] == $rid) {\n return false;\n } else {\n return true;\n }\n }\n } else {\n return false;\n }\n } else {\n die_error(-1, json_encode(mysql_error()));\n }\n}", "function consultarNotasDefinitivas() {\r\n \r\n $cadena_sql = $this->sql->cadena_sql(\"consultarEspaciosCursados\", $this->datosEstudiante['CODIGO']);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\"); \r\n \r\n return $resultado;\r\n \r\n }", "function comprobarExistenciaNota(){\n\n\t$sql = \"SELECT * FROM ENTREGA E, USUARIO U, TRABAJO T, NOTA_TRABAJO N \n\t\t\tWHERE (U.login = '$this->login' AND\n\t\t\t\t\tT.IdTrabajo = '$this->IdTrabajo' AND\n\t\t\t\t\tE.login = '$this->login' AND E.IdTrabajo = '$this->IdTrabajo' AND\n\t\t\t\t\tN.login = '$this->login' AND N.IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t\t\t\t)\";\n\n\t\tif (!($result = $this->mysqli->query($sql))){\n\t\t//return 'ERROR'; \n\t\t}else{//si no se produce un error\n\t\t$num_rows = mysqli_num_rows($result);//cogemos \n\n\t\treturn $num_rows;\n\t}\n}", "public function ExisteTicketNoImpreso($taquilla){\r\n \r\n \t//Preparacion del query\r\n \t$sql = \"SELECT * FROM ticket_diario WHERE status='1' AND taquilla = \".$taquilla.\" ORDER BY `fecha_hora` DESC LIMIT 1 \";\r\n \t$result= $this->vConexion->ExecuteQuery($sql);\r\n \t$roww= $this->vConexion->GetArrayInfo($result);\r\n \tif($this->vConexion->GetNumberRows($result)== 0){\r\n \t\treturn 1;\r\n \t}else{\r\n \t\treturn $roww['impreso'];\r\n \t}\r\n \t\r\n \t/*$sql = \"SELECT FROM `ticket` WHERE `fecha_hora` LIKE '%\".$fecha_hora.\"%' , `taquilla`, `total_ticket` , `id_usuario` , `premiado`, `pagado`)\r\n VALUES ('\".$id_ticket.\"', '\".$serial.\"', '\"..\"', '\".$taquilla.\"', '\".$total_ticket.\"', '\".$id_usuario.\"', '0', '0')\";\r\n \treturn $this->vConexion->ExecuteQuery($sql);*/\r\n }", "public function unable();", "public function rejectResource()\n {\n # code...\n }", "function verificarRequisitos($retorno) {\n //verificar requisitos\n $requisitos=$this->validacion->validarRequisitosCreditos($_REQUEST);\n if($requisitos!='ok'&& is_array($requisitos))\n {\n $retorno['mensaje']=\"El estudiante no ha aprobado requisitos de \".$retorno['nombreEspacio'].\":\";\n foreach ($requisitos as $key => $value) {\n $retorno['mensaje'].=\"\\\\n\".$requisitos[$key]['NOMBRE'].\" Codigo:\".$requisitos[$key]['REQUISITO'].\" \";\n }\n $this->enlaceNoAdicion($retorno);\n }\n }", "function findExemplaireOeuvreDispo(){\n //\n }", "private function getMesNous(){\n $result = $this->llibreGateway->getNovetats();\n \n return $this->crearResposta('200 OK', $result);\n }", "public function contarRegistrosOTN()\n\t{\n\t\t$consulta = $this->mysql->query(\"SELECT COUNT(otn) FROM ordenotn\");\n\t\t$resultado = $consulta->fetchAll();\n\n\t\tif (sizeof($resultado) > 0)\n\t\t{\n\t\t\t$this -> codigo_retorno = \"00\";\n\t\t\treturn $resultado;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this -> codigo_retorno = \"01\";#Error\n\t\t}\n\t}", "private function execGet() {\n /**\n * var ResourceImpl\n */\n $resource = NULL;\n if ($this->_resource_exist_b === FALSE) {\n $resource = $this->_givenResource;\n }\n else {\n // WARNING : here i'am manipulating a resource passed by reference from _RESOURCE_POOL !!\n $resource = $this->_foundResource ;\n }\n $resource->reserve($this->_givenResource->getTransactionId());\n $this->updateResourcePool($resource);\n self::$_log->info(sprintf(\"<%s> applied on this <%s> Object: [%s]\",\n self::_GET,\n get_class($resource),\n $resource->toString()));\n return $resource;\n }", "public function carregarHistoricoProcessoQtdRestante()\n {\n $sql = \"SELECT count(*) FROM par.historicowsprocessopar where (hwpwebservice = 'enviarItensSigarp - Sucesso' OR hwpwebservice = 'enviarManualmenteItensSigarp - Sucesso') and carga IS NULL AND pular IS NULL\";\n $intQtdImportado = $this->db->pegaUm($sql);\n \n return $intQtdImportado;\n }", "function consultarNotasInscripcionesEstudiante($cod_estudiante,$cod_proyecto){\r\n $datos= array('cod_estudiante'=>$cod_estudiante,\r\n 'cod_proyecto'=>$cod_proyecto);\r\n $cadena_sql = $this->sql->cadena_sql(\"consultarNotasInscripcionesEstudiante\",$datos);\r\n $resultado = $this->ejecutarSQL($this->configuracion, $this->accesoOracle, $cadena_sql, \"busqueda\");\r\n return $resultado;\r\n }", "function NumRows(&$resource)\n\t\t{\n\t\t\tif($resource)\n\t\t\t{\n\t\t\t\t\n\t\t\t\treturn @mysql_num_rows($resource); \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "function verificarEspacioReprobado($retorno) {\n $reprobado=$this->validacion->validarReprobado($_REQUEST);\n if ($reprobado!='ok' && is_array($reprobado))\n {\n $retorno['mensaje']=\"No se puede adicionar, porque el estudiante se encuentra en <b>Prueba Acad&eacute;mica</b> y no ha reprobado el espacio acad&eacute;mico.<br>\";\n $this->enlaceNoAdicion($retorno);\n }\n }", "protected function rest_get()\n {\n // Should be Implemented in Resource\n return NULL;\n }", "public function consultarCarreraNotificar( ){\n\t\t$carrera = new Carrera( $this->persistencia );\n\t\treturn $carrera->consultarCarreraNotificar( );\n\t}", "private function confermaModificaPrenotazione() {\n $vPrenotazione = USingleton::getInstance('VPrenotazione');\n try{\n $idPrenotazione = $vPrenotazione->recuperaValore('idPrenotazione');// throw errore se non c'è valore\n $ePrenotazione = new EPrenotazione($idPrenotazione);// throw se non esiste la prenotazione\n $ora = $vPrenotazione->recuperaValore('orario');//\n $data = $vPrenotazione->recuperaValore('data');//\n if($ePrenotazione->modificaPrenotazione($data, $ora))//@throws XDBException Se la query non è stata eseguita con successo\n {\n $errore = \"Prenotazione modificata!\"; \n }\n else\n {\n $errore = \"Prenotazione non modificata!\"; \n }\n\n $vPrenotazione->visualizzaFeedback($errore);\n } \n catch (XDBException $e)\n {\n $errore = $e->getMessage() . \" C'è stato un errore. Non è stato possibile effettuare alcuna modifica\";\n $vPrenotazione->visualizzaFeedback($errore);\n }\n catch(XValoreInesistenteException $e)\n {\n $errore = \"Valore inesistente. Non è stato possibile effettuare alcuna modifica\";\n $vPrenotazione->visualizzaFeedback($errore);\n }\n catch(XPrenotazioneException $e)\n {\n $errore = \"Prenotazione inesistente. Non è stato possibile effettuare alcuna modifica\";\n $vPrenotazione->visualizzaFeedback($errore);\n }\n }", "public function getStatus(){\n $sql = \"SELECT\n tasesoid,\n trim(tasesdescricao) as tasesdescricao \n FROM\n termo_aditivo_servico_status\n WHERE\n tasesdt_exclusao IS NULL\n ORDER BY\n tasesdescricao;\";\n\n $sql = pg_query($this->conn, $sql);\t\t\n $result = null;\n \n while($rs = pg_fetch_array($sql)){\n $result[] = array(\"tasesoid\" => $rs[\"tasesoid\"], \"tasesdescricao\" => $rs[\"tasesdescricao\"]);\n }\n\n return $result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the op for this filter. This controls how conditions interact when there are more than one. This should be one of the Filter::OP_ constants.
public function setOp( $op ) { $this->op = $op; }
[ "public function setOp($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Cloud\\Firestore\\V1\\StructuredQuery\\FieldFilter\\Operator::class);\n $this->op = $var;\n\n return $this;\n }", "function getOp() {\n\t\treturn \"OR\";\t\t\n\t}", "public function orOperatorAction() {\n\t\t$this->_conjunctions [] = $this->_currentConjunction;\n\t\t$this->_currentConjunction = array ();\n\t}", "function setItemOp($op) {\r\r\n $this->_itemOp = $op;\r\r\n }", "public function getOp()\n {\n return $this->Op;\n }", "public function andOperatorAction()\n {\n $this->_sign = true;\n //$this->_currentConjunction[end(array_keys($this->_currentConjunction))][1] = $this->_sign;\n if ($this->_higherPriorityOperator === QueryParser::OPERATOR_OR) {\n $this->_conjunctions[] = $this->_currentConjunction;\n $this->_currentConjunction = [];\n } else {\n $this->_currentConjunction[end(array_keys($this->_currentConjunction))][1] = $this->_sign;\n }\n }", "public function getSetOp()\n {\n return isset($this->set_op) ? $this->set_op : null;\n }", "public function setOperator($operator) {\n if (count($this->filters) > 0) {\n $filter = $this->filters[count($this->filters) - 1];\n $filter->setOperator($operator);\n }\n return $this;\n }", "public function getLogicalOperator()\n {\n return $this->logicalOperator == \"or\" ? \"||\" : \"&&\";\n }", "public function setConditionModeToOr()\n {\n return $this->setConditionMode(self::CONDITION_MODE_OR);\n }", "public function getConditionOperator();", "protected function setNextOperation()\n {\n $nxtOp = ($this->getChar() === ',') ? \"and\" : \"or\";\n $this->context->operation = $nxtOp;\n }", "public function getOperator();", "public function setOperators($operators)\n {\n if ($operators) {\n $this->items[ConfigUtil::FILTER_OPERATORS] = $operators;\n } else {\n unset($this->items[ConfigUtil::FILTER_OPERATORS]);\n }\n }", "public function getLogicalOperator(): string\n {\n return $this->logicalOperator === self::LOGIC_OR ? \"||\" : \"&&\";\n }", "abstract protected function getOperator();", "public function setOperator($operator) {\n\t\t$this->operator = $operator;\n\t}", "private function _get_logical_operator()\r\n\t{\r\n\t\t$lo = \"or\";\r\n\t\tif ( isset($_GET['lo']) AND !is_array($_GET['lo']) AND strtolower($_GET['lo']) == \"and\" )\r\n\t\t{\r\n\t\t\t$lo = \"and\";\r\n\t\t}\r\n\t\treturn $lo;\r\n\t}", "public function opOR() {\n\t\treturn 'OR';\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set timezone to use for timestamps in a form and ensure conversion back to UTC before saving in database, assuming that all timestamps are stored in UTC. Call this method in the controller, before calling the load() and save() methods. The timestamps coming back from the form must be of a format that is correctly parsed by the PHP DateTime() constructor. If option `modifyModel = false` only the POSTed value is modified by this function. Existing values in the model will not be modified (because the widget usually automatically handles the conversion). If option `modifyModel = true` also the timestamp of existing values in the model will be modified, eg. so that those values can be directly shown in the form.
public static function useTimeZone($userTimeZone, $model, $options = []) { $defaults = [ 'format' => 'Y-m-d H:i:s', 'modifyModel' => false, 'multipleModels' => false, 'customPostData' => null, // NOT YET IMPLEMENTED. 'onlyAttributes' => [], // NOT YET IMPLEMENTED. 'exclAttributes' => [], ]; $options = array_merge($defaults, $options); date_default_timezone_set($userTimeZone); if ($options['customPostData']) { $postData = $options['customPostData']; } else { $postData = $_POST; } $formName = $model->formName(); foreach ($model->getTableSchema()->columns as $attribute => $column) { if ($column->type == 'datetime' || $column->type == 'timestamp') { // Modify model value from UTC to user's timezone if ($options['modifyModel']) { $model->$attribute = Common::changeTimezone($model->$attribute, 'UTC', $userTimeZone, $options['format']); } if ($options['multipleModels']) { if (is_array($postData[$formName])) { foreach ($postData[$formName] as $currModelIndex => $currModelValues) { if ($postData[$formName][$currModelIndex][$attribute]) { $timestamp = Common::changeTimezone($postData[$formName][$currModelIndex][$attribute], $userTimeZone, 'UTC', $options['format']); if (!$options['customPostData']) { // Set standard $_POST variable $_POST[$formName][$currModelIndex][$attribute] = $timestamp; // Set Yii's bodyParams so that ->request->post() works $post = \Yii::$app->request->getBodyParams(); $post[$formName][$currModelIndex][$attribute] = $timestamp; \Yii::$app->request->setBodyParams($post); } else { $postData[$formName][$currModelIndex][$attribute] = $timestamp; } } } } } else { if ($postData[$formName][$attribute]) { $timestamp = Common::changeTimezone($postData[$formName][$attribute], $userTimeZone, 'UTC', $options['format']); if (!$options['customPostData']) { // Set standard $_POST variable $_POST[$formName][$attribute] = $timestamp; // Set Yii's bodyParams so that ->request->post() works $post = \Yii::$app->request->getBodyParams(); $post[$formName][$attribute] = $timestamp; \Yii::$app->request->setBodyParams($post); } else { $postData[$formName][$attribute] = $timestamp; } } } } } if ($options['customPostData']) { return $postData; } }
[ "function tve_ult_save_date_settings( $model ) {\n\tif ( $model ) {\n\t\tupdate_option( TVE_Ult_Const::SETTINGS_TIME_ZONE, $model['offset'] );\n\t\tupdate_option( TVE_Ult_Const::SETTINGS_DATE_FORMAT, $model['date_format'] );\n\t\tupdate_option( TVE_Ult_Const::SETTINGS_TIME_FORMAT, $model['time_format'] );\n\t\t/* Also updates the gmt_offset value */\n\t\t$gmt_offset = tve_ult_gmt_offset_from_tzstring( $model['offset'] );\n\t\tupdate_option( TVE_Ult_Const::SETTINGS_TIME_ZONE_OFFSET, $gmt_offset );\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "public function timezoneAction()\n {\n $uid = $this->_getParam('user_id');\n $tForm = new Core_Form_User_SetTimeZone($uid);\n $form = $tForm->getForm();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n $this->_model->setId($uid)->edit($form->getValues());\n $message = 'User\\'s timezone has been changed successfully';\n $this->_helper->FlashMessenger($message);\n $this->_helper->Redirector(\n 'edit', \n 'user', \n 'default', \n array('user_id' => $uid)\n );\n } else {\n $form->populate($_POST);\n $this->view->form = $form;\n }\n\n } else {\n\n $this->view->form = $form;\n }\n \n }", "public function setTimezone();", "public static function setTimezone(){\n $tz = Sys::get('config')->timezone;\n if(ThisUser::islogged()){\n $utz = ThisUser::get(\"timezone\");\n if(!empty($utz)){\n $tz = $utz;\n }\n }\n if(!in_array($tz,timezone_identifiers_list()))\n $tz = \"UTC\";\n date_default_timezone_set($tz);\n // Adjust in DB\n //Sys::$Db->setTimezone();\n }", "public function _time_zone_set()\n {\n $time_zone = $this->config->item('time_zone');\n if ($time_zone== '') {\n $time_zone=\"Europe/Dublin\";\n }\n date_default_timezone_set($time_zone);\n }", "public function changeTimezone(){\n\t\t$timezone \t= $this->input->post('timezone');\n\t\t$time \t\t= $this->timezones->getTime($timezone);\n\t\techo $time;\n\t}", "protected function _getTimezoneModel()\r\r\r\n\t{\r\r\r\n\t\treturn Ccc::getModel('core/timezone');\r\r\r\n\t}", "public function setTimezone() {\n\t\t\n\t\t$now \t= new DateTime();\n\t\t$mins \t= $now->getOffset() / 60;\n\t\t$sgn \t= ($mins < 0 ? -1 : 1);\n\t\t$mins \t= abs($mins);\n\t\t$hrs \t= floor($mins / 60);\n\t\t$mins \t-= $hrs * 60;\n\t\t$offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);\n\t\t\n\t\t$this->executeQuery(\"SET time_zone = '$offset';\");\n\t}", "private function set_time_zone()\r\n {\r\n if (PHP_TIME_ZONE)\r\n date_default_timezone_set(PHP_TIME_ZONE);\r\n }", "public function timestampsTz($precision = 0)\n {\n $this->timestamp(Config::get('modelling.model.timestamps.created_at'), $precision)->nullable();\n $this->timestamp(Config::get('modelling.model.timestamps.updated_at'), $precision)->nullable();\n }", "private function setTimeZone() {\n $companySettings = Store::get('company_settings');\n $timezone = $companySettings->time_zone;\n if ($timezone) {\n\n $dt = new \\DateTime('now', new \\DateTimeZone($timezone));\n $abbreviation = $dt->format('T');\n\n config(['app.timezone' => $timezone]);\n view()->share('time_zone', [\n 'name' => $timezone,\n 'abbr' => $abbreviation\n ]);\n\n $offsetToFormat = new \\DateTime('now', new \\DateTimeZone($timezone));\n $timezoneOffset = $offsetToFormat->format('P');\n\n DB::statement(\"SET time_zone = '\".$timezoneOffset.\"'\");\n }\n }", "function sync_php_and_mysql_timezones($config){\n $config->timezone = isset($config->timezone) ? $config->timezone : 'Europe/London';\n date_default_timezone_set($config->timezone);\n $now = new DateTime();\n $minutes = $now->getOffset() / 60;\n $segment = ($minutes < 0 ? -1 : 1);\n $minutes = abs($minutes);\n $hours = floor($minutes / 60);\n $minutes -= $hours * 60;\n $offset = sprintf('%+d:%02d', $hours*$segment, $minutes);\n db::pdo()->query('SET time_zone = :timezone;');\n db::pdo()->bind(array(':timezone' => $offset));\n db::pdo()->execute();\n }", "private static function setTimeZone() {\n\t date_default_timezone_set('UTC');\n\t}", "public static function set_timezone(){\n\t\ttry{\n\t\t\tdate_default_timezone_set(Application::config(\"general->application_timezone\"));\n\t\t}catch(Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "private function normalizeTimezone()\n {\n $datetime = $this->config['datetime'];\n if (!is_array($datetime)) {\n return;\n }\n if ($datetime['timezone']) {\n $current = $this->env->ini_get('date.timezone');\n if ($current !== $datetime['timezone']) {\n if ((!$current) || (!$datetime['keepTimezone'])) {\n $this->env->date_default_timezone_set($datetime['timezone']);\n }\n }\n }\n }", "public function setTimeUserValues()\n\t{\n\t $now = time();\n\t $uid = get_current_user_id();\n\n\t $this->time_modified = $now;\n\t $this->user_modified = $uid;\n\n\t if ( $this->isNewRecord() ) {\n\t $this->time_created = $now;\n\t $this->user_created = $uid;\n\t }\n\t}", "public function setTimezone()\n {\n if (!ini_get('date.timezone')) {\n date_default_timezone_set('UTC');\n }\n }", "public function viewHelperRespectsDefaultTimezoneForIntegerTimestampDataProvider() {}", "public function setTimezone($value);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the value of sales_invoice_item_id
public function setSalesInvoiceItemId($value) { parent::setValue('sales_invoice_item_id', $value); return $this; }
[ "public function getSalesInvoiceItemId()\n {\n return parent::getValue('sales_invoice_item_id');\n }", "function setInvoiceId($value) {\n return $this->setFieldValue('invoice_id', $value);\n }", "function setId_item($iid_item)\n {\n $this->iid_item = $iid_item;\n }", "public function setSalesInvoiceId($value)\n {\n parent::setValue('sales_invoice_id', $value);\n\n return $this;\n }", "public function setItemId($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->item_id !== $v) {\n\t\t\t$this->item_id = $v;\n\t\t\t$this->modifiedColumns[] = ItemPeer::ITEM_ID;\n\t\t}\n\n\t}", "public function getSalesInvoiceId()\n {\n return parent::getValue('sales_invoice_id');\n }", "public function setInvoiceID($value)\n {\n return $this->set('InvoiceID', $value);\n }", "public function setInvoiceID($id)\n {\n }", "public function invoiceId()\n {\n $value = '132456';\n $this->identification->setInvoiceid($value);\n\n $this->assertEquals($value, $this->identification->getInvoiceid());\n }", "public function setItemId($id);", "public function setOrderItemId($order_item_id);", "private function setInvoiceNumber()\n {\n if (isset($this->purchase->invoice_no)) {\n $this->invoiceNumber = $this->purchase->invoice_no;\n } else {\n $this->invoiceNumber = Purchase::count() ? Purchase::latest()->first()->invoice_no + 1 : 1; // take the last invoice number from database and increment by 1\n $this->invoiceNumber = str_pad($this->invoiceNumber, 4, '0', STR_PAD_LEFT); // add prefix if number is to sort\n }\n }", "public function setItemNumber($value) {\n\t\t$this->item_number = $value;\n\t}", "function setCartItem( &$cartItem )\n {\n if ( get_class( $cartItem ) == \"ezcartitem\" )\n {\n $this->CartItemID = $cartItem->id();\n }\n }", "public function setItemIdentifier($value)\n {\n $this->_fields['ItemIdentifier']['FieldValue'] = $value;\n return $this;\n }", "public function setOrderItemId($id);", "function save_invoice_number_field( $cart_item_data, $product_id ) {\n\t\tif ( isset( $_REQUEST['invoice_number'] ) ) {\n\t\t\t$cart_item_data['invoice_number'] = $_REQUEST['invoice_number'];\n\t\t\t/* below statement make sure every add to cart action as unique line item */\n\t\t\t$cart_item_data['unique_key'] = md5( microtime() . rand() );\n\t\t}\n\n\t\treturn $cart_item_data;\n\t}", "function setItemNumber($itemNumber);", "public function setId($value) { $this->_id = $value; }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get count of home thumb data
function countof_home_thumbdata( $thumImageorder, $where ) { return $this->get_countof_thumdata( $thumImageorder, $where ); }
[ "function thumbnailsCount() {\n $counter = 0;\n foreach ($this->jsonData->{'entry'}->{'media$group'}->{'media$thumbnail'} as $t) {\n $counter++;\n }\n return $counter;\n }", "public function getAllImagesCount() {\n $count = $this->db->select('count(*) as count')\n ->from('home_slider')\n ->where('published', 1)\n ->where('priority !=0')\n ->limit(10)\n ->get()\n ->row();\n return $count->count;\n }", "public function getTotalCount()\n {\n return $this->totalThumbCount;\n }", "function how_many_photos($data)\r\n\t{\r\n\t\tglobal $db;\r\n\t\t$query = 'SELECT spotlight_post_id FROM gv_spotlight_post_image WHERE (spotlight_image_block = 0) AND spotlight_post_id = ' . $data;\r\n\t\t$result = mysql_query($query, $db) or die(mysql_error($db));\r\n\t\t\r\n\t\tif(mysql_num_rows($result) > 0)\r\n\t\t{\r\n\t\t\t$number_of_images = mysql_num_rows($result);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t\t$number_of_images = 0;\r\n\t\t}\r\n\t\treturn $number_of_images;\r\n\t}", "function get_all_home_770x320_count()\n {\n $this->db->from('home_770x320');\n return $this->db->count_all_results();\n }", "public function count() {\n\t\tWP_CLI::log( Escape_NextGen_Gallery::init()->count() );\n\t}", "public function getNumberImages () {}", "public function getAllWithImageCount();", "public function countTemporyImages(){\n $count = $this->_tableGw->select()->count();\n return $count;\n }", "function get_count($parsed_data) {\r\n switch ($this->api) {\r\n case 'EBSCOhost':\r\n $count = (int) $parsed_data->Hits;\r\n break;\r\n default:\r\n $count = 0;\r\n break;\r\n }\r\n return $count;\r\n }", "function getPhotosCount()\r\n\t{\r\n\t\t$model = CFactory::getModel('photos');\r\n\t\treturn $model->getPhotosCount();\r\n\t}", "public function getNumberImages ();", "public function ultralinkCount(){ return $this->APICall( 'ultralinkCount', \"Could not retrieve the Ultralink count\" ); }", "function photos_count($spaid) {\n\t\t\t\t$this->db->where('timg_spa_id', $spaid);\n\t\t\t\treturn $this->db->get('pt_spa_images')->num_rows();\n\t\t}", "public function countPhoto_article(){\n\t\t\t\t\t return count($this->listePhoto_article());\n\t\t\t\t\t }", "function get_all_SiteVisitPics_count()\n {\n $this->db->from('prj_site_pics');\n return $this->db->count_all_results();\n }", "function realhomes_count_featured_properties() {\n\t\tglobal $wpdb;\n\n\t\t$query = \" \n\t\tSELECT COUNT( * ) AS featured_properties_count \n\t\tFROM {$wpdb->posts}, {$wpdb->postmeta} \n\t\tWHERE $wpdb->posts.ID = $wpdb->postmeta.post_id\n\t\tAND $wpdb->posts.post_status = 'publish'\n\t\tAND $wpdb->posts.post_author = %d\n\t\tAND $wpdb->posts.post_type = %s\n\t\tAND $wpdb->postmeta.meta_key = %s \n\t\tAND $wpdb->postmeta.meta_value = %s\";\n\n\t\t$results = $wpdb->get_results( $wpdb->prepare( $query, get_current_user_id(), 'property', 'REAL_HOMES_featured', '1' ) );\n\n\t\treturn $results[0]->featured_properties_count;\n\t}", "function get_total_like_count($hotpressid) {\r\n if (DEBUG)\r\n writelog(\"hotPress.class.php :: get_total_like_count() for HotPressId : \" . $hotpressid . \" :: \", \"Start Here \", false);\r\n $result_like = execute_query(\"SELECT COUNT(*) as total_like FROM likehot WHERE hotpressid='$hotpressid'\", false, \"select\");\r\n $result_like['total_like'] = isset($result_like['total_like']) && ($result_like['total_like']) ? $result_like['total_like'] : NULL;\r\n if (DEBUG)\r\n writelog(\"hotPress.class.php :: get_total_like_count() for HotPressId : \" . $hotpressid . \" :: \", \"End Here \", false, $result_like['total_like']);\r\n return $result_like['total_like'];\r\n }", "public function getCountAlbums();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate all recommendations. This includes total assessment, categories, and questions.
function calculateAllRecommendations() { $totalAssessmentScore = 0; $maxAssessmentScore = 0; $recommendations = array(); $minValue = $this->getMinimumValue(); $maxValue = $this->getMaximumValue(); $result = $this->getResult(); $answers = $result->getAnswers(); // Build the category array $categoryArray = array(); foreach((array) $answers as $answer) { $category = tx_wecassessment_category::find($answer->getCategoryUID()); if(is_object($category)) { $sorting = $category->getSorting(); $categoryArray[$sorting]['uid'] = $category->getUID(); $categoryArray[$sorting]['answers'][$answer->getQuestionUID()] = $answer; $categoryArray[$sorting]['totalScore'] += $answer->getWeightedScore(); $categoryArray[$sorting]['maxScore'] += abs($answer->getWeight()) * $this->getMaximumValue(); $categoryArray[$sorting]['weightedAnswerCount'] += abs($answer->getWeight()); $weightedAnswerCount += abs($answer->getWeight()); $totalAssessmentScore += $answer->getWeightedScore(); $maxAssessmentScore += abs($answer->getWeight()) * $this->getMaximumValue(); } } ksort($categoryArray); // Hack to include perfect score if($maxAssessmentScore == $totalAssessmentScore) { $totalAssessmentScore -= .0001; } // Total Assessment Recommendations if($weightedAnswerCount == 0) { $score = 0; } else { $score = $totalAssessmentScore / $weightedAnswerCount; } // Don't allow a score below the minimum (due to negative weighting) if($score < $minValue) { $score = $minValue; } $recommendation = &$this->calculateRecommendation($score); if(is_object($recommendation)) { $recommendation->setMaxScore($this->getMaximumValue()); $recommendations[0] = $recommendation; } // Category Recommendations foreach((array) $categoryArray as $sorting => $children) { $category = tx_wecassessment_category::find($children['uid']); // Hack to include perfect score if($children['maxScore'] == $children['totalScore']) { $children['totalScore'] -= .0001; } if($children['weightedAnswerCount'] == 0) { $categoryScore = 0; } else { $categoryScore = $children['totalScore'] / ($children['weightedAnswerCount']); } // Don't allow a score below the minimum (due to negative weighting) if($categoryScore < $minValue) { $categoryScore = $minValue; } $recommendation = &$category->calculateRecommendation($categoryScore); if(is_object($recommendation)) { $recommendation->setMaxScore($this->getMaximumValue()); $recommendations[] = $recommendation; } foreach((array) $children['answers'] as $answer) { $question = $answer->getQuestion(); $questionScore = $answer->getValue(); // Hack to include perfect score if($questionScore == $this->getMaximumValue()) { $questionScore -= .0001; } // Don't allow a score below the minimum (due to negative weighting) if($questionScore < $minValue) { $questionScore = $minValue; } $recommendation = $question->calculateRecommendation($questionScore); if(is_object($recommendation)) { $recommendation->setMaxScore($this->getMaximumValue()); $recommendations[] = $recommendation; } } } return $recommendations; }
[ "function getRecommendations() {\n\t\tif(!$this->_recommendations) {\n\t\t\t$recommendationClass = $this->_recommendationClass;\n\t\t\tswitch($recommendationClass) {\n\t\t\t\tcase 'tx_wecassessment_recommendation_assessment':\n\t\t\t\t\t$this->_recommendations = tx_wecassessment_recommendation_assessment::findAllInParent($this->getPID(), $this->getUID());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tx_wecassessment_recommendation_category':\n\t\t\t\t\t$this->_recommendations = tx_wecassessment_recommendation_category::findAllInParent($this->getPID(), $this->getUID());\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tx_wecassessment_recommendation_question':\n\t\t\t\t\t$this->_recommendations = tx_wecassessment_recommendation_question::findAllInParent($this->getPID(), $this->getUID());\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $this->_recommendations;\n\t\t\n\t}", "public function getRecommendations();", "public function recalculateRating()\n {\n $reviews = $this->reviews()->notSpam()->approved();\n $avgRating = $reviews->avg('rating');\n $this->rating_cache = round($avgRating,1);\n $this->rating_count = $reviews->count();\n $this->save();\n }", "public function getRecommendations()\n {\n return $this->recommendations;\n }", "public function getRecommendations()\n {\n \n }", "public function getRecommendations()\n {\n if (is_null($this->recommendations)\n || !$this->recommendationsUpToDate\n ) {\n $this->request->resetLoaded();\n $this->recommendations = $this->createRecommendations();\n $this->recommendationsUpToDate = true;\n }\n\n return $this->recommendations;\n }", "private function getBasicAssessmentStatistics()\n {\n // get active runs, users, document groups, and rating options from database\n DatabaseUtils::setEntityManager($this->em);\n $active_run_names = DatabaseUtils::getActiveRuns()['run_names'];\n $active_user_names = DatabaseUtils::getActiveUsers()['active_user_names_without_admins'];\n $active_user_groups = DatabaseUtils::getActiveUsers()['active_user_groups_without_admins'];\n $active_doc_groups = DatabaseUtils::getDocumentGroups()['document_groups'];\n $active_doc_groups_short = DatabaseUtils::getDocumentGroups()['document_groups_short'];\n $rating_levels = DatabaseUtils::getRatingOptions();\n\n // calculate progress for users\n Progress::setEntityManager($this->em);\n $user_progress = $this->getProgressForUsers($active_user_names, $active_user_groups);\n\n // calculate number of total and finished DQCombinations (without multiple assessments)\n $progress_dq = $this->getProgressForDQCombinations();\n $total_assessments = $progress_dq['total'];\n $finished_assessments = $progress_dq['finished'];\n $assessment_prop = $progress_dq['proportion'];\n\n // calculate number of skipped documents\n $skipped = (float)$this->g_repo->assessmentByRating(Constants::SKIPPED)[0][\"col_\" . Constants::SKIPPED];\n\n // calculate progress for all document groups\n $progress_groups = $this->getProgressForDocGroups($active_doc_groups_short);\n $nr_evaluations = $progress_groups['nr_evaluations'];\n $doc_groups_assessments_total = $progress_groups['doc_groups_assessments_total'];\n $doc_groups_assessments = $progress_groups['doc_groups_assessments'];\n $doc_groups_assessments_complete = $progress_groups['doc_groups_assessments_complete'];\n\n // calculate progress for multiple assessments\n $mltple = $this->getProgressForMultipleAssessments(\n $active_doc_groups_short,\n $finished_assessments,\n $doc_groups_assessments_total,\n $doc_groups_assessments_complete\n );\n $total_incl_multiple = $mltple['total_incl_multiple'];\n $finished_incl_multiple = $mltple['finished_incl_multiple'];\n $finished_incl_multiple_prop = $mltple['finished_incl_multiple_prop'];\n\n // get ratings for all runs\n $run_ratings = $this->countRatingsForRuns(\n $this->g_repo,\n $rating_levels,\n $active_run_names\n );\n $run_data = $this->getNumbersForRuns($this->g_repo, $active_run_names);\n $run_nr_assessed = $run_data['assessed'];\n $run_nr_total = $run_data['total'];\n\n // calculate progress for different rating options in all runs\n /** @var $rel_lev RatingOption */\n $rating_for_different_levels = array();\n if ($rating_levels != null) {\n foreach ($rating_levels as $rel_lev) {\n $rating_for_different_levels[$rel_lev->getName()] =\n (float)$this->g_repo->assessmentByRating(\n $rel_lev->getName(),\n $rel_lev->getShortName()\n )[0][\"col_\" . $rel_lev->getShortName()];\n }\n }\n\n return array(\n 'run_names' => $active_run_names,\n 'user_names' => $active_user_names,\n 'doc_groups_names' => $active_doc_groups,\n 'doc_groups' => $active_doc_groups_short,\n 'user_progress' => $user_progress,\n 'total_assessments' => $total_assessments,\n 'finished_assessments' => $finished_assessments,\n 'assessment_prop' => $assessment_prop,\n 'skipped' => $skipped,\n 'nr_evaluations' => $nr_evaluations,\n 'doc_groups_assessments_total' => $doc_groups_assessments_total,\n 'doc_groups_assessments' => $doc_groups_assessments,\n 'doc_groups_assessments_complete' => $doc_groups_assessments_complete,\n 'total_incl_multiple' => $total_incl_multiple,\n 'finished_incl_multiple' => $finished_incl_multiple,\n 'finished_incl_multiple_prop' => $finished_incl_multiple_prop,\n 'rating_levels_in_runs' => $run_ratings,\n 'run_number_assessed' => $run_nr_assessed,\n 'run_number_total' => $run_nr_total,\n 'rating_for_different_levels' => $rating_for_different_levels\n );\n }", "public function postRecommend(Request $request) {\n $user = Auth::user();\n $page = $request->get('page') ? $request->get('page') : 1;\n $itemInPage = $request->get('itemInPage') ? $request->get('itemInPage') : $this->itemInPage;\n $results = [];\n // get question\n $questions = Question::recommendQuestions($page, $itemInPage);\n\n // filter base on user setting\n $questions = $user ? $user->filterQuestions($questions)\n : $questions;\n\n\n foreach ($questions as $question) {\n $answer = $question->hotAnswer;\n // generate topics\n $topics = [];\n foreach ($question->topics as $topic) {\n array_push($topics, [\n 'name' => $topic->name,\n 'id' => $topic->id,\n ]);\n }\n\n if ($answer != null) {\n array_push($results, $answer->jsonAnswerSummary());\n } else {\n $arr = [\n 'id' => $question->id,\n 'topics' => $topics,\n 'topic_pic' => DImage($question->topics->first()->avatar_img_id, 40, 40),\n 'answer' => false,\n 'title' => $question->title,\n ];\n if (!Auth::guest()) {\n $arr['subscribed'] = $user->subscribe->checkHasSubscribed($question->id, 'question');\n } else {\n $arr['guest'] = true;\n }\n array_push($results, $arr);\n }\n\n }\n\n return $results;\n }", "public function CalculateTotals()\n {\n foreach($this->rentals as $rental) {\n $amount = 0;\n\n $Billing = new \\BusinessLogic\\Billing();\n $Points = new \\BusinessLogic\\FrequentRenterPoints();\n $this->total += $Billing->GenerateMovieRentCost($rental);\n $this->points += $Points->GeneratePoints($rental);\n }\n }", "public function getProductRecommendations()\n {\n return $this->productRecommendations;\n }", "public function calculAllFrequents(){\n $freq = $this->getFrequent($this->mat);\n $this->allFrequents = array_merge ($this->allFrequents , $freq);\n $i = 0;\n while(count($freq) != 0 && $i < $this->nbItem ){\n $cand = $this->genrateCandidat($freq);\n $freq = $this->getFrequent($cand);\n if(count($freq) != 0 )\n $this->allFrequents = array_merge($this->allFrequents , $freq);\n $i++;\n }\n }", "private function economicsRating() {\n //Benches:\n $this->m_benches = array();\n $this->m_economic_business = array();\n $this->m_economic_alternative = array();\n $this->m_economic_finalscore = array();\n\n //Load categories:\n $this->m_economic_cats = $this->m_rating->economicsheet()->first()->economiccats()->get();\n //dd($this->m_timing_cats);\n\n //Benches of the rating:\n $ratingbenches = $this->m_rating->ratingbenches()->get()->keyBy('id');\n\n //Benches subtotals acumulate:\n $benches_totals = array();\n foreach ($ratingbenches as $id => $ratingbench) {\n $this->m_benches[$ratingbench->bench_id] = $ratingbench->bench()->first()->title;\n $benches_totals[$ratingbench->bench_id] = 0;\n }\n\n //BUSINESS CASE:\n $SUBCAT_ID=1;\n $item_cat = $this->m_rating->economicsheet()->first()->economiccats()->where('type','=',1)->first();\n //CAPEX subcat:\n $item_subcat = $item_cat->economicsubcats()->where('title','like',\"%Capex%\")->first();\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = $item_subcat->title;\n $bench_subtotals = array();\n foreach ($item_subcat->economicrequests()->orderBy('ordering','asc')->get() as $item_request) {\n $values = array();\n $states = array();\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n $values[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->value;\n $states[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->ratingrequeststate_id;\n if (isset($bench_subtotals[$ratingbench->bench_id]))\n $bench_subtotals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n else\n $bench_subtotals[$ratingbench->bench_id]=$ratingeconomicrequests[$item_request->id]->value;\n //Acumulate totals:\n $benches_totals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => $item_request->title,\n \"values\" => $values,\n \"states\" => $states,\n \"unit\" => \"€\"\n ];\n }\n //dd(array_keys($bench_subtotals, min($bench_subtotals))); \n //Subtotals:\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"TOTAL CAPEX\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $bench_subtotals;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"€\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($bench_subtotals, min($bench_subtotals))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = true;\n\n //OPEX subcat:\n $SUBCAT_ID++;\n $item_subcat = $item_cat->economicsubcats()->where('title','like',\"%Opex%\")->first();\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = $item_subcat->title;\n $bench_subtotals = array();\n foreach ($item_subcat->economicrequests()->orderby('ordering','asc')->get() as $item_request) {\n $values = array();\n $states = array();\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n $values[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->value;\n $states[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->ratingrequeststate_id;\n if (isset($bench_subtotals[$ratingbench->bench_id]))\n $bench_subtotals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n else\n $bench_subtotals[$ratingbench->bench_id]=$ratingeconomicrequests[$item_request->id]->value;\n //Acumulate totals:\n $benches_totals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => $item_request->title,\n \"values\" => $values,\n \"states\" => $states,\n \"unit\" => \"€\"\n ];\n }\n //Subtotals:\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"TOTAL OPEX\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $bench_subtotals;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"€\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($bench_subtotals, min($bench_subtotals))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = true;\n\n //Totals CAPEX + OPEX:\n $SUBCAT_ID++;\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = \"TOTAL PRICE OF TEST (CAPEX + OPEX)\";\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"TOTAL\",\n \"values\" => $benches_totals,\n \"unit\" => \"€\"\n ];\n //Minor and differences:\n $minor = null;\n foreach ($ratingbenches as $ratingbench) {\n if (!isset($minor) || $benches_totals[$ratingbench->bench_id]<$minor) $minor=$benches_totals[$ratingbench->bench_id];\n }\n $differences = array();\n foreach ($ratingbenches as $ratingbench) {\n $differences[$ratingbench->bench_id] = $benches_totals[$ratingbench->bench_id]-$minor;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"Difference € vs cheapest\",\n \"values\" => $differences,\n \"unit\" => \"€\"\n ];\n $percents = array();\n foreach ($ratingbenches as $ratingbench) {\n if($minor>0)\n $percents[$ratingbench->bench_id] = ($differences[$ratingbench->bench_id]/$minor)*100;\n else\n $percents[$ratingbench->bench_id] = 0;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"Difference % vs cheapest\",\n \"values\" => $percents,\n \"unit\" => \"%\"\n ];\n $ratios = array();\n foreach ($ratingbenches as $ratingbench) {\n if ($benches_totals[$ratingbench->bench_id]>0)\n $ratios[$ratingbench->bench_id] = ($minor/$benches_totals[$ratingbench->bench_id])*100;\n else\n $ratios[$ratingbench->bench_id] = 0;\n }\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"TOTAL PRICE SCORE\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $ratios;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"%\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($ratios, max($ratios))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = false;\n\n\n //TRANSPORTATION subcat:\n $SUBCAT_ID++;\n $item_subcat = $item_cat->economicsubcats()->where('title','like',\"%Transportation%\")->first();\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = $item_subcat->title;\n $bench_subtotals = array();\n foreach ($item_subcat->economicrequests()->orderby('ordering','asc')->get() as $item_request) {\n $values = array();\n $states = array();\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n $values[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->value;\n $states[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->ratingrequeststate_id;\n if (isset($bench_subtotals[$ratingbench->bench_id]))\n $bench_subtotals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n else\n $bench_subtotals[$ratingbench->bench_id]=$ratingeconomicrequests[$item_request->id]->value;\n $benches_totals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => $item_request->title,\n \"values\" => $values,\n \"states\" => $states,\n \"unit\" => \"€\"\n ];\n }\n //Subtotals:\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"TOTAL TRANSPORTATION\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $bench_subtotals;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"€\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($bench_subtotals, min($bench_subtotals))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = true;\n\n //TOTAL COST OF TEST = TOTAL PRICE + TRANSPORT + OTHERS\n $SUBCAT_ID++;\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = \"TOTAL COST OF TEST (TOTAL PRICE + TRANSPORT + OTHERS)\";\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"TOTAL\",\n \"values\" => $benches_totals,\n \"unit\" => \"€\"\n ];\n //Minor and differences:\n $minor = null;\n foreach ($ratingbenches as $ratingbench) {\n if (!isset($minor) || $benches_totals[$ratingbench->bench_id]<$minor) $minor=$benches_totals[$ratingbench->bench_id];\n }\n $differences = array();\n foreach ($ratingbenches as $ratingbench) {\n $differences[$ratingbench->bench_id] = $benches_totals[$ratingbench->bench_id]-$minor;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"Difference € vs cheapest\",\n \"values\" => $differences,\n \"unit\" => \"€\"\n ];\n $percents = array();\n foreach ($ratingbenches as $ratingbench) {\n if($minor>0)\n $percents[$ratingbench->bench_id] = ($differences[$ratingbench->bench_id]/$minor)*100;\n else\n $percents[$ratingbench->bench_id] = 0;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"Difference % vs cheapest\",\n \"values\" => $percents,\n \"unit\" => \"%\"\n ];\n $ratios = array();\n foreach ($ratingbenches as $ratingbench) {\n if ($benches_totals[$ratingbench->bench_id]>0)\n $ratios[$ratingbench->bench_id] = ($minor/$benches_totals[$ratingbench->bench_id])*100;\n else\n $ratios[$ratingbench->bench_id] = 0;\n }\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"TOTAL COST SCORE\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $ratios;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"%\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($ratios, max($ratios))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = false;\n\n //OPPORTUNITY subcat:\n $SUBCAT_ID++;\n $item_subcat = $item_cat->economicsubcats()->where('title','like',\"%Opportunity%\")->first();\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = $item_subcat->title;\n $bench_subtotals = array();\n foreach ($item_subcat->economicrequests()->orderby('ordering','asc')->get() as $item_request) {\n $values = array();\n $states = array();\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n $values[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->value;\n $states[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->ratingrequeststate_id;\n if (isset($bench_subtotals[$ratingbench->bench_id]))\n $bench_subtotals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n else\n $bench_subtotals[$ratingbench->bench_id]=$ratingeconomicrequests[$item_request->id]->value;\n $benches_totals[$ratingbench->bench_id]+=$ratingeconomicrequests[$item_request->id]->value;\n\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => $item_request->title,\n \"values\" => $values,\n \"states\" => $states,\n \"unit\" => \"€\"\n ];\n }\n //Subtotals:\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"TOTAL OPPORTUNITY\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $bench_subtotals;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"€\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($bench_subtotals, min($bench_subtotals))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = true;\n\n //REAL COST OF TEST = TOTAL COST + OPPORTUNITY COST\n $SUBCAT_ID++;\n $this->m_economic_business[$SUBCAT_ID][\"title\"] = \"REAL COST OF TEST (TOTAL COST + OPPORTUNITY COST)\";\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"TOTAL\",\n \"values\" => $benches_totals,\n \"unit\" => \"€\"\n ];\n //Minor and differences:\n $minor = null;\n foreach ($ratingbenches as $ratingbench) {\n if (!isset($minor) || $benches_totals[$ratingbench->bench_id]<$minor) $minor=$benches_totals[$ratingbench->bench_id];\n }\n $differences = array();\n foreach ($ratingbenches as $ratingbench) {\n $differences[$ratingbench->bench_id] = $benches_totals[$ratingbench->bench_id]-$minor;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"Difference € vs cheapest\",\n \"values\" => $differences,\n \"unit\" => \"€\"\n ];\n $percents = array();\n foreach ($ratingbenches as $ratingbench) {\n if ($minor>0)\n $percents[$ratingbench->bench_id] = ($differences[$ratingbench->bench_id]/$minor)*100;\n else\n $percents[$ratingbench->bench_id] = 0;\n }\n $this->m_economic_business[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => \"Difference % vs cheapest\",\n \"values\" => $percents,\n \"unit\" => \"%\"\n ];\n $business_ratios = array();\n foreach ($ratingbenches as $ratingbench) {\n if ($benches_totals[$ratingbench->bench_id]>0)\n $business_ratios[$ratingbench->bench_id] = ($minor/$benches_totals[$ratingbench->bench_id])*100;\n else\n $business_ratios[$ratingbench->bench_id] = 0;\n }\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"REAL COST SCORE\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"values\"] = $business_ratios;\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"%\";\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"best_bench\"] = array_keys($business_ratios, max($business_ratios))[0];\n $this->m_economic_business[$SUBCAT_ID][\"subtotals\"][\"visibility\"] = false;\n //dd($this->m_economic_business);\n\n\n //ALTERNATIVE CASE:\n $item_cat = $this->m_rating->economicsheet()->first()->economiccats()->where('type','=',2)->first();\n $SUBCAT_ID=1;\n //DELAY subcat:\n $item_subcat = $item_cat->economicsubcats()->where('title','like',\"%Delays%\")->first();\n $this->m_economic_alternative[$SUBCAT_ID][\"title\"] = $item_subcat->title;\n $bench_subtotals = array();\n $weight_total = array();\n $max_weight = null;\n $alt_final_score = array(); //For each bench, add 50% if Business is Yes, and 50% is Alternative is Yes\n foreach ($item_subcat->economicrequests()->orderby('ordering','asc')->get() as $item_request) {\n $values = array();\n $states = array();\n $ratios = array();\n $weights = array();\n $max_value = null;\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n $values[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->value;\n $states[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->ratingrequeststate_id;\n if (!isset($max_value) || $ratingeconomicrequests[$item_request->id]->value>$max_value) \n $max_value = $ratingeconomicrequests[$item_request->id]->value;\n }\n //With the max values for each request, now calculate ratios:\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n if ($max_value>0)\n $ratios[$ratingbench->bench_id] = number_format(abs($ratingeconomicrequests[$item_request->id]->value-$max_value)*100/$max_value,0);\n else\n $ratios[$ratingbench->bench_id] = 0;\n $weights[$ratingbench->bench_id] = $ratios[$ratingbench->bench_id] * $item_request->weight;\n if (isset($weight_total[$ratingbench->bench_id]))\n $weight_total[$ratingbench->bench_id] += $weights[$ratingbench->bench_id];\n else\n $weight_total[$ratingbench->bench_id] = $weights[$ratingbench->bench_id];\n\n if (!isset($max_weight) || $weight_total[$ratingbench->bench_id]>$max_weight)\n $max_weight = $weight_total[$ratingbench->bench_id];\n }\n $this->m_economic_alternative[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => $item_request->title,\n \"values\" => $values,\n \"states\" => $states,\n \"ratios\" => $ratios,\n \"weights\" => $weights,\n \"max_value\" => $max_value,\n \"unit\" => \"€\"\n ];\n }\n\n //Subtotals:\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"SUM\";\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"%\";\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"weights\"] = $weight_total;\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"max_weight\"] = $max_weight;\n\n //Subcat scores:\n $result = array();\n foreach ($ratingbenches as $ratingbench) {\n if (!isset($alt_final_score[$ratingbench->bench_id]))\n $alt_final_score[$ratingbench->bench_id] = 0;\n\n if ($weight_total[$ratingbench->bench_id]>0.75*$max_weight) {\n $result[$ratingbench->bench_id] =\"Yes\";\n $alt_final_score[$ratingbench->bench_id]+=50;\n } else\n $result[$ratingbench->bench_id] =\"No\";\n }\n $this->m_economic_alternative[$SUBCAT_ID][\"score\"][\"title\"] = \"BEST LAB FOR DELAYS\";\n $this->m_economic_alternative[$SUBCAT_ID][\"score\"][\"benches\"] = $result;\n\n $SUBCAT_ID++;\n //CANCELLATION subcat:\n $item_subcat = $item_cat->economicsubcats()->where('title','like',\"%Cancellation%\")->first();\n $this->m_economic_alternative[$SUBCAT_ID][\"title\"] = $item_subcat->title;\n $bench_subtotals = array();\n $weight_total = array();\n $max_weight = null;\n foreach ($item_subcat->economicrequests()->orderby('ordering','asc')->get() as $item_request) {\n $values = array();\n $states = array();\n $ratios = array();\n $weights = array();\n $max_value = null;\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n $values[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->value;\n $states[$ratingbench->bench_id] = $ratingeconomicrequests[$item_request->id]->ratingrequeststate_id;\n if (!isset($max_value) || $ratingeconomicrequests[$item_request->id]->value>$max_value) \n $max_value = $ratingeconomicrequests[$item_request->id]->value;\n }\n //With the max values for each request, now calculate ratios:\n foreach ($ratingbenches as $ratingbench) {\n $ratingeconomicrequests = $ratingbench->ratingeconomicrequests()->get()->keyBy('economicrequest_id');\n if ($max_value>0)\n $ratios[$ratingbench->bench_id] = number_format(abs($ratingeconomicrequests[$item_request->id]->value-$max_value)*100/$max_value,0);\n else\n $ratios[$ratingbench->bench_id] = 0;\n\n $weights[$ratingbench->bench_id] = $ratios[$ratingbench->bench_id] * $item_request->weight;\n if (isset($weight_total[$ratingbench->bench_id]))\n $weight_total[$ratingbench->bench_id] += $weights[$ratingbench->bench_id];\n else\n $weight_total[$ratingbench->bench_id] = $weights[$ratingbench->bench_id];\n\n if (!isset($max_weight) || $weight_total[$ratingbench->bench_id]>$max_weight)\n $max_weight = $weight_total[$ratingbench->bench_id];\n }\n if (!isset($max_weight) || $weight_total[$ratingbench->bench_id]>$max_weight)\n $max_weight = $weight_total[$ratingbench->bench_id];\n $this->m_economic_alternative[$SUBCAT_ID][\"requests\"][] = [\n \"title\" => $item_request->title,\n \"values\" => $values,\n \"states\" => $states,\n \"ratios\" => $ratios,\n \"weights\" => $weights,\n \"max_value\" => $max_value,\n \"unit\" => \"%\"\n ];\n }\n\n //dd(array_keys($bench_subtotals, min($bench_subtotals))); \n //Subtotals:\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"title\"] = \"SUM\";\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"unit\"] = \"%\";\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"weights\"] = $weight_total;\n $this->m_economic_alternative[$SUBCAT_ID][\"subtotals\"][\"max_weight\"] = $max_weight;\n\n //Subcat scores:\n $result = array();\n foreach ($ratingbenches as $ratingbench) {\n if ($weight_total[$ratingbench->bench_id]>0.75*$max_weight) {\n $result[$ratingbench->bench_id] =\"Yes\";\n $alt_final_score[$ratingbench->bench_id]+=50;\n } else\n $result[$ratingbench->bench_id] =\"No\";\n }\n $this->m_economic_alternative[$SUBCAT_ID][\"score\"][\"title\"] = \"BEST LAB FOR CANCELLATION\";\n $this->m_economic_alternative[$SUBCAT_ID][\"score\"][\"benches\"] = $result;\n\n //ALTERNATIVE CASE SCORE like a subcat:\n $SUBCAT_ID++;\n $this->m_economic_alternative[$SUBCAT_ID][\"title\"] = \"Alternative case score\";\n $this->m_economic_alternative[$SUBCAT_ID][\"requests\"][0][\"title\"] = \"Total score\";\n $this->m_economic_alternative[$SUBCAT_ID][\"requests\"][0][\"values\"] = $alt_final_score;\n $this->m_economic_alternative[$SUBCAT_ID][\"requests\"][0][\"unit\"] = \"%\";\n //dd($this->m_economic_alternative);\n\n //FINAL SCORE:\n $SUBCAT_ID=1;\n $alternative_scores = array();\n foreach ($ratingbenches as $ratingbench) {\n $alternative_scores[$ratingbench->bench_id] = (0.87*$business_ratios[$ratingbench->bench_id])+(0.13*$alt_final_score[$ratingbench->bench_id]);\n }\n $this->m_economic_finalscore[$SUBCAT_ID][\"title\"] = \"Economic rating final score\";\n $this->m_economic_finalscore[$SUBCAT_ID][\"requests\"][0][\"title\"] = \"Total score\";\n $this->m_economic_finalscore[$SUBCAT_ID][\"requests\"][0][\"values\"] = $alternative_scores;\n $this->m_economic_finalscore[$SUBCAT_ID][\"requests\"][0][\"unit\"] = \"%\";\n //dd($this->m_economic_finalscore);\n\n //Add a final score economiccat:\n $economiccat = new Economiccat();\n $economiccat->title = \"Final Score\";\n $economiccat->type = 3;\n $this->m_economic_cats[] = $economiccat;\n //dd($this->m_economic_cats);\n }", "public function reviewAllAction()\n {\n\n // Recovering all the crietia and reviews to scan\n $scores = $this->getDoctrine()->getRepository(Scores::class)->findAll(array('score' => 'ASC') );\n $topics = $this->getDoctrine()->getRepository(Topics::class)->findAll();\n $reviews = $this->getDoctrine()->getRepository(Reviews::class)->findAll();\n\n // Combinations => rate_key + topic;\n foreach($topics as $topic) {\n\n foreach($scores as $score) {\n\n $combs[] = array('text' => \"no {$topic->getValue()}\", 'rate' => -1); // Single negative by 'no' nature... \n\n $variants = array(\n \"{$topic->getValue()}s {$score->getValue()}\", // First plural\n \"{$score->getValue()} {$topic->getValue()}s\", // Second plural\n \"{$score->getValue()} {$topic->getValue()}\", // Both single\n \"{$topic->getValue()} is {$score->getValue()}\"); // Positive apreciation with IS\n\n foreach($variants as $variant) {\n $combs[] = array('text' => $variant, 'rate' => $score->getScore()); // \n }\n\n }\n\n }\n\n // Combinations => $rate_key; by itself\n foreach($scores as $score) {\n\n $combs[] = array('text' => $score->getValue().'s', 'rate' => $score->getScore()); // Plural\n $combs[] = array('text' => $score->getValue(), 'rate' => $score->getScore()); // Singlar\n\n }\n\n foreach($reviews as $review) { \n\n $text = strtolower($review->getText());\n $this->review = array();\n $score = 0;\n \n foreach($combs as $comb) {\n\n if (strpos($text, $comb['text']) !== false) {\n\n $this->setPreviousWord($text, $comb['text'], $match);\n \n $result_txt = $comb['text'];\n if (isset($match[1])) {\n $result_txt = \"{$match[1]}$result_txt\";\n }\n \n $result_txt = $this->setRules($result_txt); // Setting some rules...\n\n if (!empty($result_txt)) {\n\n $score = $score + $comb['rate']; // Adding score\n\n $rate = \"{$comb['rate']}\";\n if ($comb['rate'] > 0) {\n $rate = \"+$rate\";\n }\n\n $this->review[] = $result_txt.' '.$rate; // Adding ratign text...\n\n $text = str_replace($result_txt, '', $text);\n $text = str_replace($comb['text'], '', $text);\n \n }\n\n }\n\n }\n\n $review->setMyScore($score);\n $review->setMyReview($this->review);\n\n }\n\n $em = $this->getDoctrine()->getManager();\n $em->flush();\n\n header('Location: /admin/?entity=Reviews&action=list&menuIndex=0&submenuIndex=-1&done=1');\n exit();\n\n }", "public static function GetRecommendations()\r\n {\r\n \t\r\n \t$cartId = self::GetCartId();\r\n \t\r\n // Build the SQL query\r\n //$sql = 'CALL shopping_cart_get_recommendations(:cart_id, :short_product_description_length)';\r\n \r\n $sql = \"SELECT od1.product_id, od1.product_name,\r\n IF(LENGTH(p.description) <= '150', p.description,\r\n CONCAT(LEFT(p.description,'150'), '...')) AS description\r\n FROM order_detail od1\r\n JOIN order_detail od2\r\n ON od1.order_id = od2.order_id\r\n JOIN product p\r\n ON od1.product_id = p.product_id\r\n JOIN shopping_cart\r\n ON od2.product_id = shopping_cart.product_id\r\n WHERE shopping_cart.cart_id = '$cartId'\r\n \r\n AND od1.product_id NOT IN\r\n (-- Returns the products in the specified\r\n -- shopping cart\r\n SELECT product_id\r\n FROM shopping_cart\r\n WHERE cart_id = '$cartId')\r\n \r\n GROUP BY od1.product_id\r\n -- Order descending by rank\r\n ORDER BY COUNT(od1.product_id) DESC\r\n LIMIT 5\";\r\n\r\n\r\n // Build the parameters array\r\n //$params = array (':cart_id' => self::GetCartId(),':short_product_description_length' =>SHORT_PRODUCT_DESCRIPTION_LENGTH);\r\n\r\n // Execute the query and return the results\r\n return DatabaseHandler::ObtenerTodo($sql);\r\n }", "public function calculateReview()\n {\n $i = 0;\n $sum = 0;\n foreach($this->reviews as $review)\n {\n $sum +=$review->rating;\n \n $i++;\n }\n \n if($i == 0) {\n \n return 0;\n }\n else {\n \n return ($sum/$i);\n \n }\n \n }", "public function getRecommendation()\n {\n return $this->recommendation;\n }", "private static function evaluateWeightings()\n\t\t{\n\t\t\t$total = 0;\n\n\t\t\tforeach(self::$weightCounts as $weight => $count)\n\t\t\t\t$total += ($weight * 20) * $count;\n\n\t\t\tself::$total = $total;\n\t\t}", "public function recommendationResults(Request $request)\n {\n\n $request->validate([\n 'semester' => 'required|between:1,3|numeric',\n 'number_of_courses' => 'required|numeric|min:1',\n ]);\n\n $pageName = \"Course Recommendations\";\n\n $semester = $request->input('semester');\n $requestedNumberOfCourses = $request->input('number_of_courses');\n\n // courses in the selected semester that the user has not already completed\n $availableCourses = Course::getCoursesBySemester($semester)->diff($request->user()->completedCourses);\n\n // find courses to suggest\n $suggestedCourses = $this->getSuggestedCourses($availableCourses);\n\n // find and add any available concurrent courses based on suggested courses above\n $suggestedCourses =\n $this->addCoursesThatCanBeRecommendedAsConcurrent($suggestedCourses, $semester)\n ->take($requestedNumberOfCourses);\n\n $warnings = $this->getConcurrentWarnings($suggestedCourses, $semester);\n\n if ($requestedNumberOfCourses > $suggestedCourses->count()) {\n $this->lessThanExpectedCoursesWarning($warnings);\n }\n\n return view('recommendations.show',\n compact('pageName', 'suggestedCourses', 'warnings', 'semester', 'requestedNumberOfCourses'));\n\n }", "public function calculate()\n {\n $this->calculateItems();\n $this->calculatePayments();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add a formatter to the service container
protected function addFormatter(ServiceContainer $container, $name, $class) { $container->define('formatter.formatters.aist.' . $name, function ($c) use ($class) { /** @var ServiceContainer $c */ return new $class( $c->get('formatter.presenter'), $c->get('console.io'), $c->get('event_dispatcher.listeners.stats') ); }); }
[ "public function setFormatter($formatter){ }", "public function setFormatter($formatter);", "protected function getApp_FormatterService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php';\n include_once \\dirname(__DIR__, 4).'/src/Service/Formatter.php';\n\n $a = ($this->services['monolog.logger.trace'] ?? $this->getMonolog_Logger_TraceService());\n\n if (isset($this->services['app.formatter'])) {\n return $this->services['app.formatter'];\n }\n\n return $this->services['app.formatter'] = new \\App\\Service\\Formatter($a, ($this->services['lexik_jwt_authentication.jwt_manager'] ?? $this->getLexikJwtAuthentication_JwtManagerService()));\n }", "protected function getSonata_Formatter_Validator_FormatterService()\n {\n return $this->services['sonata.formatter.validator.formatter'] = new \\Sonata\\FormatterBundle\\Validator\\Constraints\\FormatterValidator($this->get('sonata.formatter.pool'));\n }", "public function createFormatter();", "protected function getSonata_Formatter_Block_FormatterService()\n {\n return $this->services['sonata.formatter.block.formatter'] = new \\Sonata\\FormatterBundle\\Block\\FormatterBlockService('sonata.formatter.block.formatter', $this->get('templating'));\n }", "public static function formatService(): FormatService {\n return self::getContainer()->get(FormatService::class);\n }", "private function loadFormatters(ContainerBuilder $container)\n {\n foreach ($this->factories as $factory) {\n $factory->buildFormatter($container);\n }\n }", "public function addFormatter($format, FormatterInterface $formatter)\n {\n $this->formatters[$format] = $formatter;\n }", "protected function getApiPlatform_Listener_Request_AddFormatService()\n {\n return $this->privates['api_platform.listener.request.add_format'] = new \\ApiPlatform\\Core\\EventListener\\AddFormatListener(new \\Negotiation\\Negotiator(), ($this->privates['api_platform.metadata.resource.metadata_factory.cached'] ?? $this->getApiPlatform_Metadata_Resource_MetadataFactory_CachedService()), $this->parameters['api_platform.formats']);\n }", "protected function getDiff_FormatterService()\n {\n return $this->services['diff.formatter'] = new \\Drupal\\Core\\Diff\\DiffFormatter($this->get('config.factory'));\n }", "public function addFormat($name, $format);", "protected function getSonata_Formatter_PoolService()\n {\n $a = ${($_ = isset($this->services['sonata.formatter.text.raw']) ? $this->services['sonata.formatter.text.raw'] : $this->get('sonata.formatter.text.raw')) && false ?: '_'};\n\n $this->services['sonata.formatter.pool'] = $instance = new \\Sonata\\FormatterBundle\\Formatter\\Pool('markdown');\n\n $instance->setLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->get('logger')) && false ?: '_'});\n $instance->add('markdown', ${($_ = isset($this->services['sonata.formatter.text.markdown']) ? $this->services['sonata.formatter.text.markdown'] : $this->get('sonata.formatter.text.markdown')) && false ?: '_'}, ${($_ = isset($this->services['sonata.formatter.twig.env.markdown']) ? $this->services['sonata.formatter.twig.env.markdown'] : $this->getSonata_Formatter_Twig_Env_MarkdownService()) && false ?: '_'});\n $instance->add('text', ${($_ = isset($this->services['sonata.formatter.text.text']) ? $this->services['sonata.formatter.text.text'] : $this->get('sonata.formatter.text.text')) && false ?: '_'}, ${($_ = isset($this->services['sonata.formatter.twig.env.text']) ? $this->services['sonata.formatter.twig.env.text'] : $this->getSonata_Formatter_Twig_Env_TextService()) && false ?: '_'});\n $instance->add('rawhtml', $a, ${($_ = isset($this->services['sonata.formatter.twig.env.rawhtml']) ? $this->services['sonata.formatter.twig.env.rawhtml'] : $this->getSonata_Formatter_Twig_Env_RawhtmlService()) && false ?: '_'});\n $instance->add('richhtml', $a, ${($_ = isset($this->services['sonata.formatter.twig.env.richhtml']) ? $this->services['sonata.formatter.twig.env.richhtml'] : $this->getSonata_Formatter_Twig_Env_RichhtmlService()) && false ?: '_'});\n\n return $instance;\n }", "abstract function createFormatter(): FormatterInterface;", "public function addFormatter(callable $formatter): self\n {\n $this->formatters[] = $formatter;\n\n return $this;\n }", "protected function getRequest_AddRequestFormatsListenerService()\n {\n return $this->privates['request.add_request_formats_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\AddRequestFormatsListener(['jsonapi' => [0 => 'application/vnd.api+json'], 'csv' => [0 => 'text/csv', 1 => 'text/plain']]);\n }", "public function getFormatter()\n {\n }", "public function getFormatter()\n {\n\n }", "protected function getDebug_FileLinkFormatterService()\n {\n return $this->services['debug.file_link_formatter'] = new \\Symfony\\Component\\HttpKernel\\Debug\\FileLinkFormatter(NULL);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updating the orders table and reducing from the producttable
public function updateproducttable() { $id = $_SESSION['customer_id']; $query=$this->db->query("SELECT * FROM usertemp WHERE customer_id=$id")->result_array(); $orderquery = $this->db->query("SELECT MAX(orderid) as orderid FROM paymenttable")->result_array(); foreach($orderquery as $key2 => $value2){ $orderid=$value2['orderid']; } foreach ($query as $key => $value){ $productid = $value['id']; $producttablequery = $this->db->query("SELECT quantity FROM producttable WHERE id='$productid'")->result_array(); /* echo "<pre>"; print_r($producttablequery); echo "</pre>"; */ foreach($producttablequery as $key1 => $value1){ $newquantity = $value1['quantity']-$value['quantity']; } //Updating the product table by reducing the purchased items from the orders. $this->db->set('quantity',$newquantity); $this->db->where('id', $value['id']); $this->db->update('producttable'); //Preparing the data to insert the orders table $data = array( 'customer_id' => $id, 'orderid' => $orderid, 'id' => $value['id'], 'product_name' => $value['product_name'], 'product_price' => $value['product_price'], 'quantity' => $value['quantity'], 'isdelivered' => 0 ); //Inserting the data to the orders table $this->db->insert('orders', $data); } }
[ "protected function updateOrders()\n {\n $connection = $this->resource->getConnection('core_write');\n $bind = [self::SENT_TO_ERP_ORDER_TABLE_FLAG => 1];\n $where = ['entity_id IN(?)' => $this->orderIds];\n $connection->update($connection->getTableName('sales_order'), $bind, $where);\n }", "private function updateOrder() {\n\n $this->order->name = $_POST['name'];\n $this->order->address_line_1 = $_POST['address_line_1'];\n $this->order->address_line_2 = $_POST['address_line_2'];\n $this->order->postal_code = $_POST['postal_code'];\n $this->order->state = $_POST['state'];\n $this->order->amount = $_POST['amount'];\n $this->order->region_id = $_POST['region_id'];\n $this->order->reference_number = $_POST['reference_number'];\n $this->order->shipped = $_POST['shipped'] == 'on';\n\n $this->order->save();\n\n foreach ($this->orderProducts as $orderProduct) {\n foreach ($_POST['quantities'] as $orderProductId => $quantity) {\n\n if ($orderProduct->id == $orderProductId) {\n $orderProduct->quantity = $quantity;\n\n $orderProduct->save();\n }\n }\n }\n }", "public static function addProductsFromOrder($orderId = 0)\n\t{\n\t\t$orderId = (int)$orderId;\n\n\t\tif (Sale\\OrderProcessingTable::hasAddedProducts($orderId))\n\t\t\treturn;\n\n\t\t$connection = Main\\Application::getConnection();\n\t\t$type = $connection->getType();\n\n\t\t// Update existing\n\t\tif ($type == \"mysql\" && $connection->isTableExists('b_sale_order_product_stat'))\n\t\t{\n\t\t\t$sqlUpdate = \"\n\t\t\t\tINSERT INTO b_sale_order_product_stat (PRODUCT_ID, RELATED_PRODUCT_ID, ORDER_DATE) \n\t\t\t\tSELECT b.PRODUCT_ID, b1.PRODUCT_ID, DATE(b.DATE_INSERT)\n\t\t\t\tFROM b_sale_basket b, b_sale_basket b1\n\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\tb.ID <> b1.ID \n \t\t\t\tON DUPLICATE KEY UPDATE CNT = CNT + 1;\n\t\t\t\";\n\t\t\t$connection->query($sqlUpdate);\n\n\t\t\t$sqlUpdate = \"UPDATE b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1\n\t\t\t\tSET p2p.CNT = p2p.CNT + 1\n\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\tp2p.PRODUCT_ID = b.PRODUCT_ID AND\n\t\t\t\t\tp2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID\";\n\t\t}\n\t\telseif ($type == \"mssql\")\n\t\t{\n\t\t\t$sqlUpdate = \"UPDATE b_sale_product2product\n\t\t\t\tSET CNT = CNT + 1\n\t\t\t\tFROM b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1\n\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\tp2p.PRODUCT_ID = b.PRODUCT_ID AND\n\t\t\t\t\tp2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID\";\n\t\t}\n\t\telse // Oracle\n\t\t{\n\t\t\t$sqlUpdate = \"UPDATE b_sale_product2product\n\t\t\t\tSET CNT = CNT + 1\n\t\t\t\tWHERE ID IN (\n\t\t\t\t\tSELECT p2p.ID FROM b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1\n\t\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\t\tp2p.PRODUCT_ID = b.PRODUCT_ID AND\n\t\t\t\t\t\tp2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID\n\t\t\t\t\t)\";\n\t\t}\n\n\t\t$connection->query($sqlUpdate);\n\n\t\t// Insert new\n\t\t$sqlInsert = \"INSERT INTO b_sale_product2product (PRODUCT_ID, PARENT_PRODUCT_ID, CNT)\n\t\t\tSELECT b.PRODUCT_ID, b1.PRODUCT_ID, 1\n\t\t\tFROM b_sale_basket b, b_sale_basket b1\n\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\tNOT EXISTS (SELECT 1 FROM b_sale_product2product d WHERE d.PRODUCT_ID = b.PRODUCT_ID AND d.PARENT_PRODUCT_ID = b1.PRODUCT_ID)\";\n\n\t\t$connection->query($sqlInsert);\n\n\t\tSale\\OrderProcessingTable::markProductsAdded($orderId);\n\n\t\tif (defined(\"BX_COMP_MANAGED_CACHE\"))\n\t\t{\n\t\t\t$app = Main\\Application::getInstance();\n\t\t\t$app->getTaggedCache()->clearByTag('sale_product_buy');\n\t\t}\n\t}", "public static function oldOrders(): void\n {\n OldOrderDataUpdate :: execute();\n }", "public static function addProductsFromOrder($orderId = 0)\n\t{\n\t\t$orderId = (int)$orderId;\n\n\t\tif (OrderProcessing::hasAddedProducts($orderId))\n\t\t\treturn;\n\n\t\t$connection = Application::getConnection();\n\t\t$type = $connection->getType();\n\n\t\t// Update existing\n\t\tif ($type == \"mysql\")\n\t\t{\n\t\t\t$sqlUpdate = \"UPDATE b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1\n\t\t\t\tSET p2p.CNT = p2p.CNT + 1\n\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\tp2p.PRODUCT_ID = b.PRODUCT_ID AND\n\t\t\t\t\tp2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID\";\n\t\t}\n\t\telseif ($type == \"mssql\")\n\t\t{\n\t\t\t$sqlUpdate = \"UPDATE b_sale_product2product\n\t\t\t\tSET CNT = CNT + 1\n\t\t\t\tFROM b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1\n\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\tp2p.PRODUCT_ID = b.PRODUCT_ID AND\n\t\t\t\t\tp2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID\";\n\t\t}\n\t\telse // Oracle\n\t\t{\n\t\t\t$sqlUpdate = \"UPDATE b_sale_product2product\n\t\t\t\tSET CNT = CNT + 1\n\t\t\t\tWHERE ID IN (\n\t\t\t\t\tSELECT p2p.ID FROM b_sale_product2product p2p, b_sale_basket b, b_sale_basket b1\n\t\t\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\t\t\tp2p.PRODUCT_ID = b.PRODUCT_ID AND\n\t\t\t\t\t\tp2p.PARENT_PRODUCT_ID = b1.PRODUCT_ID\n\t\t\t\t\t)\";\n\t\t}\n\n\t\t$connection->query($sqlUpdate);\n\n\t\t// Insert new\n\t\t$sqlInsert = \"INSERT INTO b_sale_product2product (PRODUCT_ID, PARENT_PRODUCT_ID, CNT)\n\t\t\tSELECT b.PRODUCT_ID, b1.PRODUCT_ID, 1\n\t\t\tFROM b_sale_basket b, b_sale_basket b1\n\t\t\tWHERE b.ORDER_ID = b1.ORDER_ID AND\n\t\t\t\tb.ORDER_ID = $orderId AND\n\t\t\t\tb.ID <> b1.ID AND\n\t\t\t\tNOT EXISTS (SELECT 1 FROM b_sale_product2product d WHERE d.PRODUCT_ID = b.PRODUCT_ID AND d.PARENT_PRODUCT_ID = b1.PRODUCT_ID)\";\n\n\t\t$connection->query($sqlInsert);\n\n\t\tOrderProcessing::markProductsAdded($orderId);\n\n\t\tif (defined(\"BX_COMP_MANAGED_CACHE\"))\n\t\t{\n\t\t\t$app = Application::getInstance();\n\t\t\t$app->getTaggedCache()->clearByTag('sale_product_buy');\n\t\t}\n\t}", "private function updateCartAndOrder()\n {\n $tables = array(\n 'orders',\n 'cart'\n );\n\n $columns = array(\n 'pos_code',\n 'pos_operator'\n );\n\n foreach ($tables as $table) {\n foreach ($columns as $column) {\n //If column 'orders.$column' does not exist, create it\n \\Db::getInstance(_PS_USE_SQL_SLAVE_)->query(\n 'SHOW COLUMNS FROM `' . _DB_PREFIX_ . $table . '` LIKE \"' . $column . '\"'\n );\n if (\\Db::getInstance()->NumRows() == 0) {\n \\Db::getInstance()->execute(\n 'ALTER TABLE `' . _DB_PREFIX_ . $table . '` ADD `' . $column . '` VARCHAR( 128 ) DEFAULT NULL'\n );\n }\n }\n }\n\n return true;\n }", "function reduce_inventory_rawmats_production($conn,$orderid){\n $query = \"SELECT receipt.productID,\n receipt.quantity\n FROM receipt\n WHERE orderID = $orderid\";\n\n $sql = mysqli_query($conn,$query);\n // iterates thru all products in the receipt per joborder\n while($row = mysqli_fetch_array($sql)){\n\n $id = $row['productID'];\n $recipeqty = $row['quantity'];\n\n $query1 = \"SELECT Recipe.productID AS prodid,\n Recipe.ingredientID AS ingid,\n Recipe.quantity*$recipeqty AS reducqty\n FROM `Recipe`\n INNER JOIN Ingredient ON Ingredient.ingredientID = Recipe.ingredientID\n WHERE Recipe.productID = $id\";\n\n $sql1 = mysqli_query($conn,$query1);\n\n\n while ($rowed = mysqli_fetch_array($sql1)) {\n $prodid = $rowed['prodid'];\n $ingid = $rowed['ingid'];\n $ingquant = $rowed['reducqty'];\n\n $qry = \"UPDATE Ingredient SET quantity = quantity-$ingquant WHERE ingredientID = $ingid\";\n\n mysqli_query($conn,$qry);\n }\n }\n}", "public function updateOrders(Order ...$orders): array;", "protected function reduceQuantities(Order $order) {\n foreach ($order->products as $product) {\n $quantity = WarehouseProduct::where('warehouse_id', $order->warehouse_id)->where('product_id', $product->id)->where('reduced_quantity', '>=', $product->min_sale_quantity)->where('reduced_quantity', '>=', $this->getRealQuantity($product))->first();\n $quantity->reduced_quantity -= $this->getRealQuantity($product);\n $quantity->save();\n $product->total_quantity = $product->quantities->sum(function($quantity) {\n return $quantity->reduced_quantity;\n });\n $product->save();\n }\n }", "protected function increaseOrdered() {\n\t\t$this->db->query(\"\n\t\t\tUPDATE \".TABLE_PRODUCTS.\"\n\t\t\t SET products_ordered = products_ordered + \".(int)$this->p['products_quantity'].\"\n\t\t\t WHERE products_id = '\".(int)$this->p['products_id'].\"'\n\t\t\");\n\t}", "public function updateProductQuantity($data){\n\t\t\n\t\tif(!isset($data['sub_operation_id'])) $data['sub_operation_id'] = 0;\n\t\t\n\t\tif(!isset($data['from_warehouse_id'])){\n\t\t\t$data['from_warehouse_id'] = '(SELECT from_warehouse_id FROM '.$this->pp.'operation WHERE operation_id=\"'.$data['operation_id'].'\" LIMIT 1)';\n\t\t}\n\t\tif(!isset($data['to_warehouse_id'])){\n\t\t\t$data['to_warehouse_id'] = '(SELECT to_warehouse_id FROM '.$this->pp.'operation WHERE operation_id=\"'.$data['operation_id'].'\" LIMIT 1)';\n\t\t}\n\t\n\t\t\n\t\t$price = ' zakup = \"'.$data['zakup'].'\" ';\n\t\tif(isset($data['type_id']) AND $data['type_id'] == 8){\n\t\t\t//$price = ' price_invert = \"'.$data['zakup'].'\" ';\n\t\t}\n\t\t\n\t\tif((int)$data['quantity'] > 0){\n\t\n\t\t\t$sql = 'INSERT INTO ' . DB_PREFIX . 'operation_product\n\t\t\t\t\t\tSET\n\t\t\t\t\t\tquantity = \"'.(int)$data['quantity'].'\",\n\t\t\t\t\t\toperation_id = \"'.(int)$data['operation_id'].'\",\n\t\t\t\t\t\tsub_operation_id = \"'.(int)$data['sub_operation_id'].'\",\n\t\t\t\t\t\tproduct_id = \"'.(int)$data['product_id'].'\",\n\t\t\t\t\t\tprice_invert = \"'.(int)$data['price_invert'].'\",\n\t\t\t\t\t\tmaster_id = \"'.(int)$data['master_id'].'\",\n\t\t\t\t\t\tsize_id = \"'.(int)$data['size_id'].'\",\n\t\t\t\t\t\tfrom_warehouse_id = '.(int)$data['from_warehouse_id'].',\n\t\t\t\t\t\tto_warehouse_id = '.(int)$data['to_warehouse_id'].',\n\t\t\t\t\t\t'.$price.'\n\t\t\t\t\t\ton duplicate key update\n\t\t\t\t\t\tquantity = \"'.(int)$data['quantity'].'\"\n\t\t\t\t\t\t';\n\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$sql = 'DELETE FROM ' . DB_PREFIX . 'operation_product\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\toperation_id = \"'.(int)$data['operation_id'].'\" AND\n\t\t\t\t\t\tsub_operation_id = \"'.(int)$data['sub_operation_id'].'\" AND\n\t\t\t\t\t\tproduct_id = \"'.(int)$data['product_id'].'\" AND\n\t\t\t\t\t\tsize_id = \"'.(int)$data['size_id'].'\" AND\n\t\t\t\t\t\tmaster_id = \"'.(int)$data['master_id'].'\" AND\n\t\t\t\t\t\t'.$price.' \n\t\t\t\t\t\t';\n\t\t\t\n\t\t}\n\t\t//echo $sql;\n\t\t$this->db->query($sql) or die('sadlkjg345 '.$sql);\n\t\t\n\t\t$this->updateWarehouseItems($data['product_id']);\n\t\t\n\t}", "public static function updateProductQuantities( $order_id, $delta='-' )\n\t{\n\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\n\t\tJModel::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/models' );\n\t\t$productsModel = JModel::getInstance( 'Products', 'TiendaModel' );\n\t\t$model = JModel::getInstance( 'Orders', 'TiendaModel' );\n\t\t$model->setId( $order_id );\n\t\t$order = $model->getItem();\n\t\tif (!empty($order->orderitems) && empty($order->quantities_updated))\n\t\t{\n\t\t\tforeach ($order->orderitems as $orderitem)\n\t\t\t{\n\t\t\t\t// update quantities\n\t\t\t\t// TODO Update quantity based on vendor_id\n\t\t\t\t$product = JTable::getInstance('ProductQuantities', 'TiendaTable');\n\t\t\t\t$product->load( array('product_id'=>$orderitem->product_id, 'vendor_id'=>'0', 'product_attributes'=>$orderitem->orderitem_attributes), true, false);\n\n\t\t\t\t$productsTable = JTable::getInstance( 'Products', 'TiendaTable' );\n\t\t\t\t$productsTable->load($orderitem->product_id);\n\t\t\t\t \n\n\t\t\t\t// Check if it has inventory enabled\n\t\t\t\tif (!$productsTable->product_check_inventory || empty($product->product_id))\n\t\t\t\t{\n\t\t\t\t\t// do not update quantities\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tswitch ($delta)\n\t\t\t\t{\n\t\t\t\t\tcase \"+\":\n\t\t\t\t\t\t$new_quantity = $product->quantity + $orderitem->orderitem_quantity;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"-\":\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$new_quantity = $product->quantity - $orderitem->orderitem_quantity;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// no product made infinite accidentally\n\t\t\t\tif ($new_quantity < 0)\n\t\t\t\t{\n\t\t\t\t\t$new_quantity = 0;\n\t\t\t\t}\n\t\t\t\t$product->quantity = $new_quantity;\n\t\t\t\t$product->save();\n\n\t\t\t\t// send mail to notify low quantity\n\t\t\t\t$config = Tienda::getInstance();\n\t\t\t\t$low_stock_notify_enabled = $config->get('low_stock_notify', '0');\n\t\t\t\t$low_stock_notify_value = $config->get('low_stock_notify_value', '0');\n\n\t\t\t\tif ( ( $low_stock_notify_enabled ) && ( $new_quantity <= ( ( int ) $low_stock_notify_value ) ) )\n\t\t\t\t{\n\t\t\t\t\tTienda::load( \"TiendaHelperBase\", 'helpers._base' );\n\t\t\t\t\t$helper = TiendaHelperBase::getInstance( 'Email' );\n\t\t\t\t\t$helper->sendEmailLowQuanty( $product->productquantity_id );\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\t$row = $model->getTable();\n\t\t\t$row->load(array('order_id'=>$order->order_id));\n\t\t\t$row->quantities_updated = 1;\n\t\t\t$row->store();\n\t\t}\n\n\t}", "public function testUpdateAnOrder()\n {\n }", "public function updateOrderProduct($name_client, $cart, $status, $payment_method)\n {\n\n $order_id = $cart->getIdOrder();\n\n $order = $this->find($order_id);\n\n if(!$order) {\n return [\n 'success' => false,\n 'message' => 'Ordem não encontrada'\n ];\n }\n\n DB::beginTransaction();\n\n $order->update([\n 'name_client' => $name_client,\n 'status' => $status,\n 'payment_method' => $payment_method,\n 'date_refresh_status' => date('Ymd'),\n ]);\n\n// return $result;\n\n $productOrder = [];\n $itemsCart = $cart->getItems();\n\n// dd($status);\n\n if($status == 2)\n {\n $result = [];\n foreach ($itemsCart as $item)\n {\n $productOrder[$item['item']->id] = [\n 'qtd' => $item['qtd'],\n 'price' => $item['item']->price,\n ];\n\n $stock = Stock::where('product_id',$item['item']->id)->first();\n\n $amount_stock = $stock->amount;\n\n $stock->amount = ($amount_stock - $item['qtd']);\n\n $result[] = $stock->save();\n\n }\n }else {\n\n foreach ($itemsCart as $item) {\n $productOrder[$item['item']->id] = [\n 'qtd' => $item['qtd'],\n 'price' => $item['item']->price,\n ];\n }\n }\n// return dd($productOrder);\n if( $order)\n {\n\n $order->products()->sync($productOrder);\n\n DB::commit();\n return [\n 'success' => true,\n 'message' =>'Sucesso salvar pedido'\n ];\n }else{\n DB::rollBack();\n return [\n 'success' => false,\n 'message' =>'Falha ao salvar pedido'\n ];\n\n\n }\n\n\n }", "function updateProductAmount($prodTotal, $order_id){\n\t\t$dbo = db_connect();\n\t\t$query = \"UPDATE store.order SET Order_ProductAmount = '$prodTotal', Order_TimeStamp = NOW() WHERE Order_id = ?\";\n\t\t$statement = $dbo->prepare($query);\n\t\t$statement->execute(array($order_id));\n\t}", "public function calcQtd(){\r\n try{\r\n\r\n $this->_qtdOrders = count($this->_result);\r\n\r\n foreach ($this->_result as $item=>$key){\r\n $this->_qtdProd = $this->_qtdProd + $key->quantity;\r\n }\r\n\r\n }catch (Exception $e){\r\n echo $e->getMessage();\r\n }\r\n }", "public function updateOrderAction() {\n //CHECK POST\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n $values = $_POST;\n try {\n foreach ($values['order'] as $key => $value) {\n $tab = Engine_Api::_()->getItem('seaocore_tab', (int) $value);\n if (!empty($tab)) {\n $tab->order = $key + 1;\n $tab->save();\n }\n }\n $db->commit();\n $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "public function update_order($order){\n global $wpdb;\n $table_name = $wpdb->prefix . 'blockonomics_orders';\n $wpdb->replace( \n $table_name, \n $order \n );\n }", "public function testUpdateCustomerGroupProduct()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Generates edit and delete options for a given client ID
private function _adminClientOptions($id) { if ( isset($_SESSION['user']) ) { return <<<ADMIN_OPTIONS <div class="client-admin-options"> <form action="assets/inc/process.inc.php" method="post"> <a class="admin" href="#">Save Edits</a> <input type="hidden" name="client_id" value="$id" /> <input type="hidden" name="token" value="$_SESSION[token]" /> </form> <form action="confirmClientdelete.php" method="post"> <input type="submit" name="delete_client" value="Delete This Client" /> <input type="hidden" name="client_id" value="$id" /> </form> </div><!-- end .client-admin-options --> ADMIN_OPTIONS; } else { return NULL; } }
[ "public function indexClientEdit()\n\t{\n\t\tif (!$this->commons->hasPermission('client/edit')) {\n\t\t\tNot_foundController::show('403');\n\t\t\texit();\n\t\t}\n\t\t/**\n\t\t * Check if id exist in url if not exist then redirect to Client list view \n\t\t **/\n\t\t$id = (int)$this->url->get('id');\n\t\tif (empty($id) || !is_int($id)) {\n\t\t\t$this->url->redirect('clients');\n\t\t}\n\t\t/*Get User name and role*/\n\t\t$data = $this->commons->getUser();\n\t\t/**\n\t\t * Get all Client data from DB using Client model \n\t\t **/\n\t\t$data['result'] = $this->clientModel->getClientByID($id);\n\n\t\tif (empty($data['result'])) {\n\t\t\t$this->url->redirect('clients');\n\t\t}\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER . 'language/' . $data['info']['language'] . '/client.php';\n\t\t$data['lang']['client'] = $client;\n\n\t\t/* Set confirmation message if page submitted before */\n\t\tif (isset($this->session->data['message'])) {\n\t\t\t$data['message'] = $this->session->data['message'];\n\t\t\tunset($this->session->data['message']);\n\t\t}\n\n\t\t/* Set page title */\n\t\t$data['page_title'] = $data['lang']['common']['text_edit'] . ' ' . $data['lang']['common']['text_client'];\n\t\t$data['action'] = URL . DIR_ROUTE . 'client/action';\n\t\t$data['token'] = hash('sha512', TOKEN . TOKEN_SALT);\n\n\t\t/*Render User list view*/\n\t\t$this->view->render('client/client_form.tpl', $data);\n\t}", "private function _adminAddClientOptions()\n\t{\n\t\tif ( isset($_SESSION['user']) )\n\t\t{\n\t\t\treturn <<<ADMIN_OPTIONS\n\t\n\t<div class='horizontalRule'></div>\n\t\t\t\n <div class=\"add-client-admin-options\">\n <form action=\"assets/inc/process.inc.php\" method=\"post\">\n\t\t<input type=\"submit\" name=\"edit_client\" value=\"&#43; Add a New Client\" />\n \t<input type=\"hidden\" name=\"client_id\" value=\"\" />\n\t\t<input type=\"hidden\" name=\"token\" value=\"$_SESSION[token]\" />\n </form>\n </div><!-- end .add-client-admin-options -->\nADMIN_OPTIONS;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function edit()\n {\n\t$this->log(\"edit function\");\n\n \t// Check whether client is logged in\n // $logged_in = false;\n // if ($this->isLoggedIn()) {\n // $logged_in = true;\n // }\n\n // Get custom fields from Client controller => save\n \t$client_custom_fields = $this->Clients->getCustomFieldValues(1);\n return $this->set('client_custom_fields', $client_custom_fields);\n }", "public function editClientList($id){\n $data = ClientList::findOrFail($id);\n return view('backEnd.client.partial.createClientlist',['data'=>$data])->render();\n }", "function printEditSEOClientForm( $clientID ) {\n\tglobal $menuvar, $ftsdb;\n\n\t$result = $ftsdb->select( DBTABLEPREFIX . \"seo_clients\", \"id = :id LIMIT 1\", array(\n\t\t\":id\" => $clientID\n\t) );\n\n\tif ( $result && count( $result ) == 0 ) {\n\t\t$page_content = \"<span class=\\\"center\\\">There was an error while accessing the website's details you are trying to update. You are being redirected to the main page.</span>\n\t\t\t\t\t\t<meta http-equiv=\\\"refresh\\\" content=\\\"5;url=\" . $menuvar['SEOCLIENTS'] . \"\\\">\";\n\t} else {\n\t\t$row = $result[0];\n\n\t\t$formFields = apply_filters( 'form_fields_website_website_edit', array(\n\t\t\t'name' => array(\n\t\t\t\t'text' => 'Name',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'class' => 'required',\n\t\t\t),\n\t\t\t'url' => array(\n\t\t\t\t'text' => 'Website URL',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'class' => 'required',\n\t\t\t),\n\t\t\t'email_address' => array(\n\t\t\t\t'text' => 'Email Address',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t\t'phone' => array(\n\t\t\t\t'text' => 'Phone Number',\n\t\t\t\t'type' => 'text',\n\t\t\t),\n\t\t) );\n\n\t\t$content = makeForm( 'editSEOClient', il( $menuvar['SEOCLIENTS'] ), 'Edit SEO Client', 'Save Client', $formFields, $row, 1 );\n\n\t\t$result = null;\n\t}\n\n\treturn $content;\n}", "public function editAction() {\n $value_id = $this->getCurrentOptionValue()->getId();\n\n # Options\n $option_model = new Inbox_Model_Option();\n\n $this->view->option = $option_model->find($value_id, \"value_id\");\n if(!$this->view->option->getId()) {\n $this->view->option\n ->setValueId($value_id)\n ->save();\n }\n\n $limit = 5000;\n if($this->view->option->getLimit()) {\n $limit = $this->view->option->getLimit();\n }\n\n $message_model = new Inbox_Model_CustomerMessage();\n $this->view->messages = $message_model->findByValueId($value_id, $limit);\n\n\n $this->view->form_option = new Inbox_Form_Option();\n $this->view->form_option->setValueId($value_id);\n $this->view->form_option->populate($this->view->option->getData());\n\n # Customers\n $customer_model = new Customer_Model_Customer();\n $this->view->customers = $customer_model->findByAppId($this->getApplication()->getId());\n\n parent::editAction();\n }", "function wyz_do_frontend_offers_edit( $atts ) {\n\tif ( ( ! current_user_can( 'manage_options' ) && 'on' != get_option( 'wyz_offer_editable' ) ) || 'on' == get_option( 'wyz_disable_offers' ) ) {\n\t\treturn '<h3>' . esc_html__( 'You don\\'t have the right to access this page', 'wyzi-business-finder' ) . '</h3>';\n\t}\n\n\t$query = new WP_Query( array(\n\t\t'post_type' => 'wyz_offers',\n\t\t'posts_per_page' => '-1',\n\t\t'post_status' => array( 'publish', 'pending','future' ),\n\t\t'p' => $_GET[ WyzQueryVars::EditOffer ]\n\t) );\n\t$can_edit = false;\n\n\tglobal $WYZ_USER_ACCOUNT_TYPE;\n\n\tif ( $WYZ_USER_ACCOUNT_TYPE == WyzQueryVars::EditOffer ) {\n\n\t\tif ( $query->have_posts() ) :\n\t\t\twhile ( $query->have_posts() ) :\n\t\t\t\t$query->the_post();\n\n\t\t\t\t$curr_id = get_the_ID();\n\t\t\t\t$curr_post = get_post( $curr_id );\n\t\t\t\tif ( current_user_can( 'manage_options' ) || get_current_user_id() == $curr_post->post_author ) {\n\n\t\t\t\t\t$can_edit = true;\n\t\t\t\t\t\n\t\t\t\t\tif ( $_GET[ WyzQueryVars::EditOffer ] == $curr_id ) {\n\t\t\t\t\t\t$current_post = $curr_id;\n\n\t\t\t\t\t\t// Get CMB2 metabox object.\n\t\t\t\t\t\t$cmb = wyz_frontend_cmb2_update_get( $current_post );\n\n\t\t\t\t\t\t// Get $cmb object_types.\n\t\t\t\t\t\t$post_types = $cmb->prop( 'object_types' );\n\n\t\t\t\t\t\t// Current user.\n\t\t\t\t\t\t$user_id = get_current_user_id();\n\n\t\t\t\t\t\t// Parse attributes.\n\t\t\t\t\t\t$atts = shortcode_atts( array(), $atts, 'offers-form-full-display' );\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t* Let's add these attributes as hidden fields to our cmb form\n\t\t\t\t\t\t* so that they will be passed through to our form submission\n\t\t\t\t\t\t*/\n\t\t\t\t\t\tforeach ( $atts as $key => $value ) {\n\t\t\t\t\t\t\t$cmb->add_hidden_field( array(\n\t\t\t\t\t\t\t\t'field_args' => array(\n\t\t\t\t\t\t\t\t\t'id' => \"atts[$key]\",\n\t\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t\t'default' => $value,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$output = '';\n\n\t\t\t\t\t\t// Get any submission errors.\n\t\t\t\t\t\tif ( ( $error = $cmb->prop( 'submission_error' ) ) && is_wp_error( $error ) ) {\n\t\t\t\t\t\t\t// If there was an error with the submission, add it to our ouput.\n\t\t\t\t\t\t\t$output .= WyzHelpers::wyz_error( $error->get_error_message(), true );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get our form.\n\t\t\t\t\t\tif ( function_exists( 'cmb2_get_metabox_form' ) )\n\t\t\t\t\t\t\t$output .= cmb2_get_metabox_form( $cmb, $current_post, array( 'save_button' => esc_html__( 'Update Post', 'wyzi-business-finder' ) ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tendwhile;\n\t\t\twp_reset_postdata();\n\t\tendif;\n\t}\n\n\twp_reset_postdata();\n\n\tif ( ! $can_edit ) {\n\t\treturn WyzHelpers::wyz_error( esc_html__( 'you don\\'t have the appropriate permissions to edit this post', 'wyzi-business-finder' ), true );\n\t}\n\tif ( ! isset( $current_post ) ) {\n\t\treturn WyzHelpers::wyz_info( esc_html__( 'No', 'wyzi-business-finder' ) . ' ' . WYZ_OFFERS_CPT . ' ' . esc_html__( 'to display', 'wyzi-business-finder' ), true );\n\t}\n\treturn $output;\n}", "public function setClientId(string $client_id);", "function edit($debt_id = 0)\n\t{\n\t\t$data = array();\n\t\t$data['title'] \t\t\t= $this->title;\n\t\t$data['activemenu'] \t= $this->activemenu;\n\t\t$data['debt_details']= $this->debt_model->get_debt_data($debt_id);\n\t\t$data['clients'] \t\t= $this->common_model->get_select_option('ci_clients', 'client_id', 'client_name', $data['debt_details']->client_id);\n\t\t$data['pagecontent'] \t= 'debt/editdebt';\n\t\t$this->load->view('common/holder', $data);\n\t}", "public function admin_edit($id = null)\r\n\t{\r\n\t\t$this->set('json', '{}');\r\n\t\t\r\n\t\t$this->CustomOption->bindName($this->CustomOption, null, true);\r\n\t\t\r\n\t\tif (!empty($id))\r\n\t\t{\r\n\t\t\t$record = $this->CustomOption->find('first', array(\r\n\t\t\t\t'conditions' => array('CustomOption.id' => $id),\r\n\t\t\t\t'recursive' => -1\r\n\t\t\t));\r\n\t\t\t$record['CustomOptionName'] = $this->CustomOption->CustomOptionName->getNames('custom_option_id', $id);\r\n\t\t\t$record['CustomOptionValue'] = $this->CustomOption->CustomOptionValue->getValues($id, true);\r\n\t\t\t\r\n\t\t\t$this->data = $record;\r\n\t\t\t\r\n\t\t\t$this->set('record', $record);\r\n\t\t\t$this->set('json', json_encode($this->_getJsonArray($record)));\r\n\t\t}\r\n\t\t\r\n\t}", "function returnEditSEOClientFormJQuery( $clientID ) {\n\treturn makeFormJQuery( 'editSEOClient', SITE_URL . \"/ajax.php?action=editSEOClient&id=\" . $clientID );\n}", "function libcal_v1_1_client_id_cb( $args ) {\n\t$options = get_option( 'libcal-api-v1_1-settings' );\n\t?>\n\t<input id='libcal_field-client_id' name='libcal-api-v1_1-settings[client_id]' size='30' type='text' value='<?php echo $options['client_id']; ?>' />\n\t<?php\n}", "static function selectOptionsEditor(){\n global $item, $atrId;\n $atributes=mysql::getArray(\"SELECT * FROM `attributes` WHERE id=\".escape($atrId).\" LIMIT 1\",true);\n ajax::window('<h2>Опции списка &laquo;'.$atributes['name'].'&raquo;</h2><div data-close=\"closeSelectEditor('.$atrId.')\" style=\"width:480px; height:340px; overflow:hidden;\">\n <div id=\"tblOptList\" style=\"width:100%; max-height:210px; overflow-y:scroll; background:#eeeeee; padding:0 !important; margin-bottom:10px;\">\n <table id=\"tblOptTable\" class=\"cmstable4\" style=\"margin:0;\">\n '.self::selOptionsTable($atrId).'\n </table>\n </div>\n <hr>\n <form id=\"atrEdFrm\" method=\"POST\">\n <div class=\"btn-group\">\n <div class=\"label\"><i class=\"ic-plus\" style=\"margin-top:6px;\"></i></div>\n <input type=\"hidden\" name=\"opt[attr_id]\" value=\"'.$atrId.'\">\n <input type=\"hidden\" name=\"opt[item]\" value=\"'.$item.'\">\n <input type=\"hidden\" name=\"opt[multiple]\" value=\"'.$atributes['multiple'].'\">\n <input id=\"newOptionValue\" type=\"text\" name=\"opt[name]\" style=\"width:290px;\" maxlength=\"64\" value=\"\">\n <div class=\"btn\" onclick=\"selectOptionSave()\"><i class=\"ic-save\"></i>Сохранить</div>\n </div>\n </form>\n </div>',true);\n return false;\n }", "function libguide_v1_2_client_id_cb( $args ) {\n\t$options = get_option( 'libguides-api-v1_2-settings' );\n\t?>\n\t<input id='libguide_field-client_id' name='libguides-api-v1_2-settings[client_id]' size='30' type='text' value='<?php echo $options['client_id']; ?>' />\n\t<?php\n}", "public static function pxp_admin_clients()\n\t{\n\t\t$action = ( isset( $_REQUEST['action'] ) ) ? $_REQUEST['action'] : '';\n?>\n\t\t<div class=\"wrap\">\n<?php\n\t\tif( $action == \"add-new\" ):\n\t\t\tself::pxp_admin_add_client_display();\n\t\telse:\n\t\t\tself::pxp_admin_client_list();\n\t\tendif;\n?>\t\n\t\t</div>\n<?php\n\t}", "private function generateExerciseForEditContent($id) \n {\n $exercisesDb = new Exercises();\n $exercise = $exercisesDb->findByPrimary($id);\n $previewPicture = '/images/content/dynamisch/exercises/' . $exercise->offsetGet('exercise_id') . '/' .\n $exercise->offsetGet('exercise_preview_picture');\n $previewPictureSource = '/images/content/statisch/grafiken/kein_bild.png';\n $count = $this->getParam('counter');\n\n if (is_file(getcwd() . '/' . $previewPicture)\n && is_readable(getcwd() . '/' . $previewPicture)\n ) {\n $thumbnailService = new Thumbnail();\n $thumbnailService->setThumbWidth(1024);\n $thumbnailService->setThumbHeight(768);\n $thumbnailService->setSourceFilePathName(getcwd() . '/' . $previewPicture);\n $previewPictureSource = $thumbnailService->generateImageString();\n }\n $this->view->assign($exercise->toArray());\n $this->view->assign('previewSource', $previewPictureSource);\n $this->view->assign('exercise_description', $exercise->offsetGet('exercise_description'));\n\n $deviceOptionsService = new DeviceOptionsViewGenerator($this->view);\n $deviceOptionsService->setExerciseId($id);\n\n if (isset($exercise['device_option_id'])) {\n $deviceOptionsService->setOptionId($exercise['device_option_id']);\n }\n if (isset($exercise['device_id'])) {\n $deviceOptionsService->setDeviceId($exercise['device_id']);\n }\n $deviceOptionsService->setForceGenerateEmptyInput(true);\n $deviceOptionsService->setShowDelete(true);\n $this->view->assign('deviceOptionContent', $deviceOptionsService->generate());\n\n $exerciseOptionsService = new ExerciseOptionsViewGenerator($this->view);\n $exerciseOptionsService->setExerciseId($id);\n\n if (isset($exercise['device_option_id'])) {\n $exerciseOptionsService->setOptionId($exercise['exercise_option_id']);\n }\n $exerciseOptionsService->setForceGenerateEmptyInput(true);\n $exerciseOptionsService->setShowDelete(true);\n\n $this->view->assign('exerciseOptionContent', $exerciseOptionsService->generate());\n\n $deviceOptionsService->setShowDelete(false);\n $this->view->assign('deviceOptionsSelectContent', $deviceOptionsService->generateDeviceOptionsSelectContent());\n $exerciseOptionsService->setShowDelete(false);\n $this->view->assign('exerciseOptionsSelectContent', $exerciseOptionsService->generateExerciseOptionsSelectContent());\n\n $this->view->assign('count', $count);\n $this->view->assign('muscleRatingContent', $this->generateMuscleRatingContent($exercise));\n\n return $this->view->render('loops/training-plan-exercise-edit.phtml');\n }", "public function getDeviceOptionEditAction() \n {\n $deviceOptionId = intval($this->getRequest()->getParam('device_option_id', 0));\n $deviceOptionsContent = '';\n\n if (0 < $deviceOptionId) {\n $deviceOptionsDb = new DeviceOptions();\n $deviceOption = $deviceOptionsDb->findOptionById($deviceOptionId);\n\n $this->view->assign('device_option_id', $deviceOption->offsetGet('device_option_id'));\n $this->view->assign('device_option_name', $deviceOption->offsetGet('device_option_name'));\n $this->view->assign('device_option_value', $deviceOption->offsetGet('device_option_default_value'));\n $deviceOptionsContent = $this->view->render('loops/device-option-edit.phtml');\n }\n $this->view->assign('deviceOptionsContent', $deviceOptionsContent);\n }", "public function gen_edit_form($id) {\n\t$b = get_class($this);\n\n // get existing values\n\t$q = \"SELECT * FROM \".$b.\" WHERE ID=?\";\n\t$stmt = doPDOquery($q,[$id]);\n\t$row = $stmt->fetch();\n//p(\"q=\".$q);\n//p(\"id=\".$id);\n//p(\"row=\".implode(\",\",$row));\n\n\t$this->gen_header(\"editing\");\n\n\t$action = $this->action_filename(\"update\",$b);\n\t$parent_field = $this->parent_field();\n//p(\"parent_field=\".$parent_field);\n\tif ($parent_field != \"DBUX\")\n\t\t$parent_ID = $row[$parent_field];\n\telse\t$parent_ID = 0;\n//p(\"parent_ID=\".$parent_ID);\n\n // generate form with fields initialized to current values\n\n\tform__($action);\n\t $this->gen_all_input_fields($row, $parent_ID);\n\t__form();\n\n // If not the bottom-most in the composition hierarchy, list\n // all of the children of this record. And/or a button to\n // go back up.\n\n\tif ($parent_field != \"DBUX\") {\n\t\t// make a return button\n\t// problem here for going to\n\t// the edit record is we have to read the record into\n\t// hidden input. Back button sort of solves this, but then\n\t// there's no regeneration of database state in the\n\t// table subset displayed. Need a \"go back up\" button.\n\t\t$action = $this->action_filename(\"edit\",get_parent_class($this));\n\t\t$parent_ID = $row[$this->parent_field()];\n\n\t\tpostform__($action);\n\t\t input('type=\"hidden\" name=\"ID\" value=\"'.$parent_ID.'\"');\n\t\t button(\"Edit this \".$b.\"'s \".strtolower($parent_field));\n\t\t__form();\n\t}\n\n\t// make a button to add a product of this kind\n\t$action = $this->action_filename(\"add\",$b);\n\n\tpostform__($action);\n\t $lbl = \"Add new \".$b;\n\t if ($parent_field != \"DBUX\")\n\t\t $lbl = $lbl.\" for this \".strtolower($parent_field);\n\t input('type=\"hidden\" name=\"parent_ID\" value=\"'.$parent_ID.'\"');\n\t button($lbl);\n\t__form();\n\n\t$super = strtoupper($b); // relevant field names are all caps\n\tif (static::$subpart != null) {\n\t\t$tablename = static::$subpart;\n\t\t$action = $this->action_filename(\"add\", $tablename);\n\t\tpostform__($action);\n\t\t__form();\n\t\t$fields = get_col_names($tablename);\n\t\t$q = \"SELECT *\"\n\t\t . \" FROM \".$tablename\n\t\t . \" WHERE \".$super.\"=\".$id\n\t\t ;\n// p($q);\n\t\t$stmt = doPDOquery($q,[]);\n\t\tp(\"The \".$tablename.\" table for this \".$b.\":\");\n\t\t$this->show_all_records($fields,$stmt,$tablename);\n\t}\n\n\t$this->finish_up();\n }", "function editGET($adminClient, $curdata) {\n $this->request->data = $curdata;\n\n // If the current data does not have an LDAP config\n // then add the default LDAP config in case the user\n // wants to add LDAP search attributes. \n if(empty($curdata['Oa4mpClientCoLdapConfig'])) {\n $defaultLdapConfig = $adminClient['DefaultLdapConfig'];\n\n $ldapConfig = array();\n $ldapConfig['enabled'] = true;\n $ldapConfig['authorization_type'] = 'simple';\n $ldapConfig['serverurl'] = $defaultLdapConfig['serverurl'];\n $ldapConfig['binddn'] = $defaultLdapConfig['binddn'];\n $ldapConfig['password'] = $defaultLdapConfig['password'];\n $ldapConfig['basedn'] = $defaultLdapConfig['basedn'];\n $ldapConfig['search_name'] = 'uid';\n\n $this->request->data['Oa4mpClientCoLdapConfig'][0] = $ldapConfig;\n } else {\n // We prefer uid to username for UI consistency.\n if($curdata['Oa4mpClientCoLdapConfig'][0]['search_name'] == 'username') {\n $this->request->data['Oa4mpClientCoLdapConfig'][0]['search_name'] = 'uid';\n }\n }\n\n // Need to re-order the scopes to fit our checkbox use of them\n // in the form.\n $newScopes = array();\n foreach($curdata['Oa4mpClientCoScope'] as $s) {\n switch ($s['scope']) {\n case Oa4mpClientScopeEnum::OpenId:\n $newScopes[0] = $s;\n break;\n case Oa4mpClientScopeEnum::Profile:\n $newScopes[1] = $s;\n break;\n case Oa4mpClientScopeEnum::Email:\n $newScopes[2] = $s;\n break;\n case Oa4mpClientScopeEnum::OrgCilogonUserInfo:\n $newScopes[3] = $s;\n break;\n case Oa4mpClientScopeEnum::Getcert:\n $newScopes[4] = $s;\n break;\n }\n }\n\n $this->request->data['Oa4mpClientCoScope'] = $newScopes;\n\n // Copy the available named configurations so that the view\n // only needs to look in one place regardless of edit or add \n // actions.\n $this->request->data['Oa4mpClientCoNamedConfig'] = $curdata['Oa4mpClientCoAdminClient']['Oa4mpClientCoNamedConfig'];\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Calculate "sgn" of number Signum function (
public function sgn(float $x): int { if ($x > 0) { return 1; } elseif ($x == 0) { return 0; } else { return -1; } }
[ "function sgn($value)\n{\n if (is_numeric($value)) {\n if ($value > 0) {\n return 1;\n } elseif ($value < 0){\n return -1;\n } else {\n return 0;\n }\n } else {\n return null;\n }\n}", "public function getISSQNtot()\n {\n return $this->iSSQNtot;\n }", "public function getGrafSvalovinaSignNad() {\n\n $extremniSvalovina = $this->SvalovinaPriSoucasneVazeExtrem + 3 * $this->GrafSvalovinaKrokNormal; \n\t\t/*[F152]*/\n\n if (($this->LBM >= $this->SvalovinaPriSoucasneVazeExtrem) && ($this->LBM < $extremniSvalovina)) {\n\n\n if ($this->LBM > ($this->SvalovinaPriSoucasneVazeExtrem + 2 * $this->GrafSvalovinaKrokNad)) {\n $sign = self::SIGN_RIGHT;\n } else {\n if ($this->LBM > ($this->SvalovinaPriSoucasneVazeExtrem + 1 * $this->GrafSvalovinaKrokNad)) {\n $sign = self::SIGN_MIDDLE;\n } else {\n $sign = self::SIGN_LEFT;\n }\n }\n } else {\n $sign = self::SIGN_VOID;\n }\n\n return $sign;\n }", "protected function signcell($n){if($this->iseven($n)){return(1);}else{return(-1);}}", "public function signCount(): int\n {\n return $this->signCount;\n }", "function sigFig($value, $sigFigs) \n{\n\tif ($value == 0) return 0; // My addition of this line seems to help prevent a \"Warning: division by zero\"\n\t//Convert to scientific notation e.g. 12345 -> 1.2345x10^4 where $significand is 1.2345 and $exponent is 4\n\t$exponent = floor(log10(abs($value))+1);\n\t$significand = round(($value/pow(10, $exponent)) * pow(10, $sigFigs)) / pow(10, $sigFigs);\n\treturn $significand * pow(10, $exponent);\n}", "public function getSigFigs($n)\n {\n $n = ltrim($n, '0+-');\n $dp = strpos($n, '.'); // decimal position\n if ($dp === false) {\n $sigfigs = strlen(rtrim($n, '0'));\n } else {\n $sigfigs = strlen(ltrim($n, '0.')); // eliminate extra decimal character\n if ($dp !== 0) {\n $sigfigs--;\n }\n }\n return $sigfigs;\n }", "public function getSignCount() {\n return $this->_signCount;\n }", "function secp256k1_schnorrsig_sign($context, &$ecdsaSignatureOut, string $msg32, string $secretKey, ?callable $noncefp, $ndata): int {}", "function sign($num) {\n\t\treturn $num?($num/abs($num)):0;\n\t}", "public function getNumSS()\n {\n return $this->numSS;\n }", "public function getNrSirius()\n\t{\n\t\treturn $this->nr_sirius;\n\t}", "private function Sign($arg) {\r\n\r\n\t\tif($arg > 0)\r\n\t\t\treturn 1;\r\n\t\telse if($arg < 0)\r\n\t\t\treturn -1;\r\n\t\telse\r\n\t\t\treturn 0;\r\n\t}", "function gonculate($n) {\n $origArray = range(1,$n);\n foreach ($origArray as $num => $value) {\n $addedArray[] = array_sum(str_split($value));\n }\n $ranked = array_count_values($addedArray);\n $dupCount = array_count_values($ranked);\n $result = array_values($dupCount);\n return $result[0];\n}", "public static function getNumSignificandBits()\n {\n return self::SIGNIFICAND_LENGTH;\n }", "function CrucialityIndexSpearman($nrs='', $diff_rank){\n\t$diff_rank = $diff_rank; // The difference between the ranking values of SAD and SPD\n\t$nrs = $nrs;\t\t\t // The number of simulation runs\n\t\t\t\t\t\t\t // summation-> The sum of all x-values over all simulation runs\n\n\t$a = summation($diff_rank ** 2);\n\t$a = $a / ($nrs * (($nrs ** 2) - 1));\n\t$a = 6 * $a;\n\t$a = 1 - $a;\n\treturn $a;\n}", "public function getSssNo()\n\t{\n\t\treturn $this->sss_no;\n\t}", "protected function __sign($value)\n\t{\n\t\tif($value > 0)\n\t\t\treturn 1;\n\n\t\tif($value == 0)\n\t\t\treturn 1;\n\n\t\tif($value < 0)\n\t\t\treturn -1;\n\t}", "private function gaussianSentence()\n\t{\n\t\t$avg = (float) 24.460;\n\t\t$stdDev = (float) 5.080;\n\n\t\treturn (int) round($this->gauss_ms($avg, $stdDev));\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ prioritizes an array of locations based on their frequency
private function prioritize($max, $locations) { $prioritizedLocations = array(); $counts = array(); foreach ($locations as $baseId => $loc) { $counts[$baseId] = $loc['count']; } arsort($counts); $priority = array_slice($counts, 0, $max, true); foreach ($priority as $baseId => $count) { $prioritizedLocations[$baseId] = $locations[$baseId]; } return $prioritizedLocations; }
[ "function natsort (array &$array) {}", "function array_frequency($input, $threshold = 1)\n{\n // convert $input in a real PHP array\n if (!is_array($input)) $input = explode(\",\", $input);\n // count occurrences (array keys must be strings or integers)\n $unique = array_sanitize(array_count_values($input));\n // exit if there are no data\n if (!$unique) return false;\n\n // compute sum\n $sum = array_sum($unique);\n $data = array();\n // now calculate the frequency of each input element (in percentage)\n foreach ($unique as $k => $value) {\n $frequency = round(100*$value/$sum, 2);\n // store frecuencies above given threshold\n if ($frequency > $threshold) {\n $data[$k] = $frequency;\n }\n }\n // order by frecuency\n arsort($data);\n\n return $data;\n}", "function frequency($array) {\n\t$freq = array(0,0,0,0,0,0,0,0,0,0,0);\n\tfor ($i = 0; $i < count($array); $i = $i + 1) {\n\t\t$freq[$array[$i]] = $freq[$array[$i]] + 1;\n\t}\n\treturn $freq;\n}", "function mode_frequent($freq)\n{\n $freq = array_map('strval', $freq);\n $count_freq = array_count_values($freq);\n\n arsort($count_freq);\n\n $ability = key($count_freq);\n $count_num = current($count_freq);\n $count_gra = next($count_freq);\n\n if ($count_num != $count_gra) {\n //occur different\n echo $ability;\n }\n}", "private function addMinOccurrencesDistance(array $array): array\n {\n foreach ($array as $keyword => $keywordInfo) {\n // if $minOccurrencesDistance is 1, it's the min distance already, don't bother with the calculation\n $compactIndexes = [];\n foreach ($keywordInfo['occurrences'] as $occurrence) {\n $compactIndexes[] = $occurrence['indexes'][0];\n }\n\n $difference = (new Utility())->findMinDiff($compactIndexes);\n // -1 is to only get the number of words between occurrences\n $array[$keyword][self::SORT_BY_MIN_OCCURRENCE_DISTANCE] = is_null($difference) ? null : $difference - 1;\n }\n\n return $array;\n }", "public static function relativeFrequency(array $values): array\n {\n $sample_size = \\count($values);\n $relative_frequencies = array();\n foreach (self::frequency($values) as $subject => $frequency) {\n $relative_frequencies[$subject] = $frequency / $sample_size;\n }\n return $relative_frequencies;\n }", "function freqQuery($queries) {\n\n $dict = array(); // To store number of counts of each element\n $freq = array(); // To store number of elements with a specific freq\n $output = array();\n\n for($i=0; $i < count($queries); $i++) {\n $data = $queries[$i][1];\n\n switch( $queries[$i][0] ) {\n case 1:\n if( !isset( $dict[$data] ) )\n $dict[ $data ] = 0;\n\n $oldFreq = $dict[ $data ];\n $newFreq = $oldFreq + 1;\n\n if( !isset( $freq[ $oldFreq ] ) )\n $freq[ $oldFreq ] = 0;\n\n if( !isset( $freq[ $newFreq ] ) )\n $freq[ $newFreq ] = 0;\n\n // remove element from earlier frequency bag\n $freq[ $oldFreq ] --;\n\n // add count\n $dict[ $data ] ++;\n\n // add element to new frequency bag\n $freq[ $newFreq ] ++;\n\n break;\n case 2:\n \n if( isset( $dict[$data] ) && $dict[$data] > 0) {\n\n $oldFreq = $dict[ $data ];\n $newFreq = $oldFreq - 1;\n\n // remove element from earlier frequency bag\n $freq[ $oldFreq ] --;\n\n // reduce element count\n $dict[ $data ] --;\n\n // add element to current frequency bag\n $freq[ $newFreq ] ++;\n }\n\n break;\n case 3:\n\n // return 1 if a frequency bag exists and has at least one element\n if( isset( $freq[$data] ) && $freq[$data] > 0 )\n $output[] = 1;\n else\n $output[] = 0;\n break;\n }\n }\n \n return $output;\n}", "function precalculate(){\n\t$wordlist = explode(\"\\n\", file_get_contents(dirname(__FILE__).\"/descrambler_wordlist.txt\"));\n\t$words = array();\n\tforeach($wordlist as $word){\n\t\t$word = trim($word);\n\t\t$w = str_split($word, 1);\n\t\tnatcasesort($w); //sort by letter order\n\t\t$w = implode($w);\n\t\t$p = getPoints($w);\n\t\tif(!isset($words[$w])){\n\t\t\t$words[$w] = array($word, $p);\n\t\t}elseif($words[$w][1] < $p or ($words[$w][1] == $p and strcmp($words[$w][0], $word) > 0)){\n\t\t\t$words[$w] = array($word, $p);\n\t\t}\n\t}\n\treturn $words;\n\n}", "function sorting1($arr)\n{\n for ($i = 0; $i < count($arr) - 1; $i++) {\n $minStartPoint = $arr[$i];\n $arr = Minuim($arr, $minStartPoint, $i);\n }\n return $arr;\n}", "private static function sortWeights(&$arr)\n{\n\t$sortby = array('access'=>array(), 'default'=>array(), 'weight'=>array());\n\tforeach ($arr as $item)\n\t{\n\t\t$sortby['last'][] = (empty($item['weight'])) ? 0 : 1;\n\t\t$sortby['location'][] = (empty($item['location'])) ? 0 : $item['location'];\n\t\t$sortby['access'][] = (empty($item['access']) && $item['weight'] > 0) ? 0 : 1;\n\t\t$sortby['default'][] = (empty($item['default'])) ? 0 : 1;\n\t\t$sortby['weight'][] = $item['weight'];\n\t}\n\treturn array_multisort(\n\t\t$sortby['last'], SORT_DESC,\n\t\t$sortby['location'], SORT_DESC,\n\t\t$sortby['access'], SORT_DESC,\n\t\t$sortby['default'], SORT_DESC,\n\t\t$sortby['weight'], SORT_DESC,\n\t\t$arr);\n}", "private function setFreqs()\n {\n $this->freqs_by_num = array_count_values($this->set);\n\n foreach($this->freqs_by_num as $value => $count){\n if(!isset($this->freqs[$count])){\n $this->freqs[$count] = array();\n }\n $this->freqs[$count][] = $value;\n }\n\n ksort($this->freqs);\n asort($this->freqs_by_num);\n\n return $this;\n }", "public function findFrequentWords():array\n {\n $holder = [];\n arsort($this->lengthAppears);\n\n foreach ($this->lengthAppears as $key => $value) {\n\n if (empty($holder)) {\n $holder[$key] = $value;\n\n } else {\n $position = array_search($value, $holder);\n if ($position != 0) {\n $holder[$position] >= $value ? $holder[$key] = $value : false;\n }\n }\n }\n\n return $holder;\n }", "function urb_priorities($zoom,$grade) {\t\t\n\t$sz = urb_name_size($zoom,$grade);\n\t$factor = linear(array(5 => 0.7, 8 => 0.8, 11 => 1, 13 => 1, 15 => 1.1,18 => 1.2),$zoom);\n\t$z2 = linear(array(5 => 1.1, 10 => 1.5, 12 => 1),$zoom);\n\t$z3 = linear(array(5 => 1.5, 10 => 2.5, 12 => 1),$zoom);\n\t$factor = linear(array(5 => 0.7, 8 => 0.8, 11 => 1, 12 => 1.3, 15 => 1.0),$zoom);\n\tif ( $sz > 96*$factor ) return -1;\n\tif ( $sz > 40*$factor ) return 0;\n\tif ( $sz > 20*$factor ) return 1;\n\tif ( $sz > $z2*12.0*$factor) return 2;\n\tif ( $sz > $z3*8.0*$factor ) return 3;\n\tif ( $sz > 2.0*$factor ) return 4;\t\t\t\n\treturn false;\n}", "function locationProximity($locs, $postcode) {\n\n sort($locs); //locs for locations\n\n foreach ($locs as $l) {\n\n if ($l > $postcode){\n if(($l-$postcode)<($postcode-$previous))\n return $l;\n else\n return $previous;\n }else{\n $previous = $l;\n } \n }\n\n //return end of array if no matches\n return end($locs);\n\n}", "function frequency($arr) {\n return [];\n}", "public function optimizeForDistance(array $locations): array;", "function frequency($arr) {\n $returnArr = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n for ($i = 0; $i < sizeof($arr); $i++) {\n $returnArr[$arr[$i]] += 1;\n }\n return $returnArr;\n}", "function array_numeric_sorted_nearest($array, $value, $method = ARRAY_NEAREST_DEFAULT) { \n $count = count($array);\n\n if($count == 0) {\n return null;\n } \n\n $div_step = 2; \n $index = ceil($count / $div_step); \n $best_index = null;\n $best_score = null;\n $direction = null; \n $indexes_checked = Array();\n\n while(true) { \n if(isset($indexes_checked[$index])) {\n break ;\n }\n\n $curr_key = $array[$index];\n if($curr_key === null) {\n break ;\n }\n\n $indexes_checked[$index] = true;\n\n // perfect match, nothing else to do\n if($curr_key == $value) {\n return $curr_key;\n }\n\n $prev_key = $array[$index - 1];\n $next_key = $array[$index + 1];\n\n switch($method) {\n default:\n case ARRAY_NEAREST_DEFAULT:\n $curr_score = abs($curr_key - $value);\n\n $prev_score = $prev_key !== null ? abs($prev_key - $value) : null;\n $next_score = $next_key !== null ? abs($next_key - $value) : null;\n\n if($prev_score === null) {\n $direction = 1; \n }else if ($next_score === null) {\n break 2;\n }else{ \n $direction = $next_score < $prev_score ? 1 : -1; \n }\n break;\n case ARRAY_NEAREST_LOWER:\n $curr_score = $curr_key - $value;\n if($curr_score > 0) {\n $curr_score = null;\n }else{\n $curr_score = abs($curr_score);\n }\n\n if($curr_score === null) {\n $direction = -1;\n }else{\n $direction = 1;\n } \n break;\n case ARRAY_NEAREST_HIGHER:\n $curr_score = $curr_key - $value;\n if($curr_score < 0) {\n $curr_score = null;\n }\n\n if($curr_score === null) {\n $direction = 1;\n }else{\n $direction = -1;\n } \n break;\n }\n\n if(($curr_score !== null) && ($curr_score < $best_score) || ($best_score === null)) {\n $best_index = $index;\n $best_score = $curr_score;\n }\n\n $div_step *= 2;\n $index += $direction * ceil($count / $div_step);\n }\n\n return $array[$best_index];\n}", "function natsort($array_arg) {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Create the HTML to be inserted into the webpage in order to create the Vue component.
abstract public function createVueComponentHtml(UI $ui);
[ "protected function createVueComponent()\n {\n $this->fileGenerateHelper('vue','vue');\n }", "public function buildHtml();", "public function createHTML() {\n\t\t// add JS and CSS files\n\t\t$this->tpl->addJS('monitor.js');\n\t\t$this->tpl->addCSS('monitor.css');\n\n\t\tif(sm_get_conf('show_update')) {\n\t\t\t// user wants updates, lets see what we can do\n\t\t\t$this->createHTMLUpdateAvailable();\n\t\t}\n\t\t$this->createHTMLLabels();\n\n\t\t// add the module's custom template to the main template to get some content\n\t\t$this->tpl->addTemplatedata(\n\t\t\t'main',\n\t\t\tarray(\n\t\t\t\t'content' => $this->tpl->getTemplate($this->getTemplateId()),\n\t\t\t\t'message' => ($this->message == '') ? '&nbsp' : $this->message,\n\t\t\t)\n\t\t);\n\n\t\t// display main template\n\t\techo $this->tpl->display('main');\n\t}", "protected function writeView()\n {\n $component = $this->getView();\n\n $path = resource_path(\"js/components/\" . $this->getViewPath() . \".vue\");\n\n if (! $this->files->isDirectory(dirname($path))) {\n $this->files->makeDirectory(dirname($path), 0777, true, true);\n }\n\n if ($this->files->exists($path) && ! $this->option('force')) {\n $this->error('View already exists!');\n\n return;\n }\n\n $js_template = <<<HTML\n<template>\n <div>[app::$component] Component</div>\n</template>\n\n<script>\n export default {\n name: \"app::{$component}\",\n props: {},\n data () {\n return {\n\n };\n },\n mounted () {},\n computed: {},\n watch: {},\n methods: {}\n }\n</script>\nHTML;\n\n file_put_contents(\n $path,\n $js_template\n );\n }", "abstract public function makeHtml();", "abstract public function buildHTML();", "protected function createView():VueJS{\n\t\treturn $this->vueManager->createVue('#app','app',false);\n\t}", "public static function addToHTML()\n {\n if (!self::isViewingHTMLPage()) {\n return;\n }\n\n // js\n $paths = self::getAssetFilePaths('js');\n echo sprintf(\n '<script>%s</script>',\n self::getCombinedContents($paths)\n );\n\n // css\n $paths = self::getAssetFilePaths('css');\n echo sprintf(\n '<style>%s</style>',\n self::getCombinedContents($paths)\n );\n }", "public function build()\n {\n return $this->renderVueJs('FormTopLayout.vue');\n }", "function composeHtml() {\r\n\t\t\t$result = '';\r\n\t\t\tif ($this->html_template)\r\n\t\t\t\t$result = $this->html_template->show(true);\r\n\t\t\treturn $result;\r\n\t\t}", "function generar_html()\n\t{\n\t\t$this->generar_salida(\"html\");\n\t}", "protected function set_html(){\n\t\t$this->html = $this->create_fields();\n\t}", "public function get_component_html() {\n\t\t$html = '';\n\n\t\tforeach ( $this->components as $component ) {\n\t\t\t$html .= $component->render();\n\t\t}\n\n\t\treturn $html;\n\t}", "protected function _renderHTML(){\n\t\t$page = we_ui_layout_HTMLPage::getInstance();\n\n\t\t$js = <<<EOS\nvar _console_$this->_consoleName = new (WE().layout.messageConsoleView)( '$this->_consoleName', this.window );\n_console_$this->_consoleName.register();\n\nonunload=function() {\n\t_console_$this->_consoleName.unregister();\n}\n\nEOS;\n\t\t$page->addInlineJS($js);\n\n\t\t$headerClass = self::kHeaderFontClass;\n\t\t$iconClassNormal = self::kHeaderIconNormalClass;\n\t\t$iconClassOver = self::kHeaderIconOverClass;\n\n\t\treturn <<<EOHTML\n<div>\n\t<table>\n\t<tr>\n\t\t<td style=\"vertical-align:middle\">\n\t\t<span class=\"$headerClass\" id=\"messageConsoleMessage$this->_consoleName\" style=\"display: none;\">--</span>\n\t\t</td>\n\t\t<td>\n\t\t\t<div onclick=\"_console_$this->_consoleName.openMessageConsole();\" class=\"$iconClassNormal\" onmouseover=\"this.className='$iconClassOver'\" onmouseout=\"this.className='$iconClassNormal'\"><i id=\"messageConsoleImage$this->_consoleName\" class=\"fa fa-lg fa-bell\"></i></div>\n\t\t</td>\n\t</tr>\n\t</table>\n</div>\nEOHTML;\n\t}", "public function build()\n {\n $html = '\n\t\t<div class=\"modal-dialog\">\n\t\t\t<div class=\"modal-content\">\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n\t\t\t\t\t<h4 class=\"modal-title\" id=\"web-modal-title\">' . $this->title . '</h4>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"modal-body\" id=\"web-modal-content\">' . $this->content . '</div>\n\t\t\t\t<div class=\"modal-footer\">\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n\t\t\t\t\t<button type=\"button\" class=\"btn btn-primary\">Save changes</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>';\n\n return $html;\n }", "function createDocXhtml() {\n $this->head = $this->createElement('head', ' ');\n $this->body = $this->createElement('body', ' ');\n }", "public static function contentHtml(): string\n {\n Craft::$app->getView()->registerAssetBundle(SchedApiIntegrationUtilityUtilityAsset::class);\n\n $someVar = 'Have a nice day!';\n return Craft::$app->getView()->renderTemplate(\n 'sched-api-integration/_components/utilities/SchedApiIntegrationUtility_content',\n [\n 'someVar' => $someVar\n ]\n );\n }", "public static function contentHtml(): string\n {\n Craft::$app->getView()->registerAssetBundle(ElasticraftUtilityUtilityAsset::class);\n\n return Craft::$app->getView()->renderTemplate(\n 'elasticraft/_components/utilities/ElasticraftUtility_content',\n [\n 'indexName' => Elasticraft::$plugin->elasticraftService->indexName,\n ]\n );\n }", "protected function createPage(): string\n {\n // TODO: Implement createPage() method.\n ob_start();\n $itemsBooks = $this->getItemsBook($this->contentArray['content']);\n $pagination = $this->getPagination($this->contentArray['page'], $this->contentArray['pages']);\n include(self::DIRECTORY . '/tpl/admin.tpl');\n return ob_get_clean();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all standhouders with an invoice
public function getStandhoudersWithInvoice() { return $this->hasMany('App\Models\Factuur', 'markt_id', 'id'); }
[ "public function getStandhoudersWithPayedInvoice()\r\n {\r\n return $this->hasMany('App\\Models\\Factuur', 'markt_id', 'id')->where('betaald', '=', 1);\r\n }", "public function getInvoices(){\n\t\t$query = $this->myDB->query(\"SELECT i.*, a.agent_name AS name FROM invoices AS i JOIN agents AS a ON agent_id = i.agent_fk ORDER BY i.invoice_id DESC\");\n\t\treturn $query->fetchAll(PDO::FETCH_ASSOC);\n\t}", "public function get_invoice_list()\n {\n return $this->db->select('sr_no, invoice_no, round_off_total, invoice_date, bakery_name,bakery_address, bakery_area, bakery_city')->order_by('sr_no','desc')\n ->from('insider_bill')->join('customers', 'customers.id = insider_bill.customer_id')->get();\n }", "public function getInvoices()\n {\n $url = \"invoices\";\n\n return $this->request('get', $url);\n }", "public function getInvoices()\r\n {\r\n return $this->appointment->where('has_invoice', true)->get();\r\n }", "public function invoices() {\n\t\treturn new Simbila_Response(\n\t\t\t$this->request('/invoice/list','GET')\n\t\t);\t\t\t\t\t\n\t}", "public function getInvoices(){\n $invoices = [];\n $invoice = $this->data;\n $newInvoice = [];\n $newInvoice['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('uid', $invoice);\n $newInvoice['status'] = IndexSanityCheckHelper::indexSanityCheck('status', $invoice);\n $newInvoice['total_tax'] = IndexSanityCheckHelper::indexSanityCheck('gst', $invoice);\n $newInvoice['total'] = IndexSanityCheckHelper::indexSanityCheck('total', $invoice);\n $newInvoice['invoice_number'] = IndexSanityCheckHelper::indexSanityCheck('invoiceNumber', $invoice);\n $newInvoice['amount_due'] = IndexSanityCheckHelper::indexSanityCheck('amountDue', $invoice);\n $newInvoice['amount_paid'] = IndexSanityCheckHelper::indexSanityCheck('amountPaid', $invoice);\n $newInvoice['date'] = IndexSanityCheckHelper::indexSanityCheck('issueDate', $invoice);\n $newInvoice['due_date'] = IndexSanityCheckHelper::indexSanityCheck('dueDate', $invoice);\n $newInvoice['gst_inclusive'] = IndexSanityCheckHelper::indexSanityCheck('gstInclusive', $invoice);\n if (array_key_exists('gstInclusive', $invoice) && array_key_exists('gst', $invoice)) {\n if ($invoice['gstInclusive'] === true) {\n $newInvoice['subtotal'] = (float) $invoice['total'] - (float) $invoice['gst'];\n } else {\n $newInvoice['subtotal'] = $invoice['total'];\n }\n }\n if (array_key_exists('contact', $invoice)) {\n if ($invoice['contact']) {\n $newInvoice = $this->parseContact($newInvoice, $invoice['contact']);\n }\n }\n\n if (array_key_exists('lines', $invoice)) {\n if ($invoice['lines']) {\n $newInvoice = $this->parseLineItems($newInvoice, $invoice['lines'], $newInvoice['accounting_id']);\n }\n }\n\n array_push($invoices, $newInvoice);\n\n return $invoices;\n }", "public function getInvoiceElements();", "public function getInvoices()\n {\n return $this->subscription->where('has_invoice', true)->get();\n }", "public function getInvoices()\n {\n return $this->getApi()->invoice()->query(['project' => $this->getUrl()]);\n }", "public function getInvoices()\n {\n return $this->invoices;\n }", "static function getInvoices(){\n\n $configEntity = self::getConfigEntity();\n $url = $configEntity['apiurl'] . 'v3/cfdi40/list';\n $request = 'GET';\n\n return WrapperApi::callCurl($url, $request);\n }", "public function getInvoices()\n {\n return $this->getApi()->invoice()->query(['contact' => $this->getUrl()]);\n }", "public function invoices()\n {\n return $this->hasManyThrough(\n 'App\\Invoice', 'App\\Payment',\n 'order_id', 'payment_id', 'id'\n );\n\n }", "public function getInvoices(){\n $invoices = [];\n foreach ($this->data as $invoice) {\n $newInvoice = [];\n $newInvoice['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('InvoiceID', $invoice);\n $newInvoice['status'] = $this->parseStatus(IndexSanityCheckHelper::indexSanityCheck('Status', $invoice));\n $newInvoice['updated_at'] = IndexSanityCheckHelper::indexSanityCheck('UpdatedDateUTC', $invoice);\n array_push($invoices, $newInvoice);\n }\n\n return $invoices;\n }", "public function getAllInvoices()\n {\n return $this->db->get('invoices')->result_array();\n }", "function select_invoices_detail_by_invoices(){\n $this->invoices_detail = new Connection;\n $this->comment = new Connection;\n $query = \"SELECT i.* ,COUNT(*) quantity FROM invoices_detail d JOIN invoices i ON d.id_invoices = i.id\"\n .\" GROUP BY date HAVING quantity > 0\";\n $this->comment->insertUserValues($query);\n return $result = $this->comment->get_row();\n }", "public function getAllInvoice() {\n //$sql = \"SELECT DISTINCT DATE_FORMAT(invoice.Invdate, '%Y-%m-%d') FROM InvoiceBundle:Invoice invoice\";\n $sql = \"SELECT DISTINCT invoice.date FROM InvoiceBundle:Invoice invoice\";\n $query = $this->em->createQuery($sql);\n return $query->getResult();\n }", "public function invoices()\n {\n return new Invoice($this);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the Wall Output
public function getWallOut() { }
[ "public function getWall()\n {\n return $this->wall;\n }", "public static function getWall()\n {\n $url = self::$endpointHost . self::$endpointWall;\n return self::doRequest($url);\n }", "public function getWalls(){\n\t\treturn $this->get(\"/wall\");\n\t}", "public function getWallTime()\n {\n return $this->wall_time;\n }", "public function printOut()\n {\n $this->log(\"Horizontal walls: %s\", json_encode($this->horWalls));\n $this->log(\"Vertical walls: %s\", json_encode($this->vertWalls)); \n \n $northDoor = mt_rand(0,$this->width-1);\n $eastDoor = mt_rand(0, $this->height-1);\n\n $str = '+';\n for ($i=0;$i<$this->width;$i++) {\n $str .= ($northDoor == $i) ? ' +' : '---+';\n }\n $str .= PHP_EOL;\n for ($i=0; $i<$this->height; $i++) {\n \n for ($j=0; $j<$this->width; $j++) {\n $str .= (!empty($this->vertWalls[$j][$i]) ? $this->vertWalls[$j][$i] : '| ');\n }\n $str .= ($i == $eastDoor ? ' ' : '|').PHP_EOL.'+';\n for ($j=0; $j<$this->width; $j++) {\n $str .= (!empty($this->horWalls[$j][$i]) ? $this->horWalls[$j][$i] : '---+');\n }\n $str .= PHP_EOL;\n }\n echo $str;\n }", "public function getWallTimeUsage()\n {\n return $this->wall_time_usage;\n }", "function getWallData(){\r\n return $this->commonAlertDatas('get_wall_post');\r\n }", "public function getWallOut()\r\n {\r\n return Yii::app()->getController()->widget('application.modules.calendarplus.widgets.CalendarWallEntryWidget', array('CalendarPlusEntry' => $this), true);\r\n }", "public function wallAction()\n {\n $numberOfPicturesOnWall = 288;\n $electionSupportersForWall = $this->communityUserRepository->findElectionSupportersForWall($numberOfPicturesOnWall);\n $this->view->assign('electionSupporters', $electionSupportersForWall);\n $electionSupportersCount = $this->communityUserRepository->countElectionSupporters();\n $this->view->assign('electionSupportersCount', $electionSupportersCount);\n $goal = 1000;\n $reachedPercentage = round(($electionSupportersCount / $goal * 100));\n $reachedPercentage = $reachedPercentage > 100 ? 100 : $reachedPercentage;\n $this->view->assign('reachedPercentage', $reachedPercentage);\n $picturesOnWall = $this->communityUserRepository->countElectionSupportersForWall($numberOfPicturesOnWall);\n $missingElectionSupportersForWall = $numberOfPicturesOnWall - $picturesOnWall;\n if ($missingElectionSupportersForWall > 0) {\n $missingElectionSupportersArray = array_fill(0, $missingElectionSupportersForWall, NULL);\n $this->view->assign('missingElectionSupporters', $missingElectionSupportersArray);\n }\n $this->view->assign('frontendLanguage', $GLOBALS['TSFE']->sys_language_uid);\n }", "public function display_wall_posts()\n {\n \n }", "function flbb_facebook_wall() {\n\tglobal $flbb;\n\t\n\t// If the Facebook Wall is enabled\n\tif ( isset( $flbb->options['fbwall_enabled'] ) && $flbb->options['fbwall_enabled'] == 'on' ) {\n\t\tif ( isset( $flbb->options['fbwall_title'] ) && $flbb->options['fbwall_title'] ) {\n\t\t\techo '<div class=\"home-title\">' . $flbb->options['fbwall_title'] . '</div>';\n\t\t}\n\t\techo '<div id=\"flbb-facebook-wall\"></div>';\n\t\techo \"<script type='text/javascript'>jQuery('#flbb-facebook-wall').fbWall({\"\n\t\t\t. \"id:'\" . $flbb->options['fbwall_id'] . \"',\"\n\t\t\t. \"accessToken:'\" . $flbb->options['fbwall_at'] . \"',\" \n\t\t\t. \"showGuestEntries:true,\"\n\t\t\t. \"showComments:true,\"\n\t\t\t. \"max:\" . $flbb->options['fbwall_items'] . \",\"\n\t\t\t. \"timeConversion:12\"\n\t\t\t. \"});</script>\";\n\t\t\n\t}\n\t\n}", "public function getWall()\n {\n return $this->hasMany('Apps\\ActiveRecord\\WallPost', 'target_id');\n }", "function getWallPost($aEvent){\r\n $languages = $this->getAlertLanguages('wall');\r\n $sTextAction = _t($languages[$aEvent['action']]);\r\n $sTextWallObject = 'test wall object';\r\n // check for the ownership\r\n if (!($aProfile = getProfileInfo($aEvent['owner_id']))){\r\n return '';\r\n }\r\n // check for the correct data entry\r\n if (!($aDataEntry = $this->_oDb->getEntryByIdAndOwner ($aEvent['object_id'], $aEvent['owner_id'], 0))){\r\n return '';\r\n }\r\n $sCss = ''; \r\n if($aEvent['js_mode']){\r\n $sCss = $this->_oTemplate->addCss('wall_post.css', true);\r\n }else{\r\n $this->_oTemplate->addCss('wall_post.css');\r\n }\r\n $aVars = array(\r\n 'cpt_user_name' => $aProfile['NickName'],\r\n 'cpt_action' => $sTextAction,\r\n 'cpt_object' => $sTextWallObject,\r\n 'cpt_item_url' => BX_DOL_URL_ROOT . $this->_oConfig->getBaseUri() . 'view/' . $aDataEntry[$this->_oDb->_sFieldUri],\r\n 'post_id' => $aEvent['id'],\r\n );\r\n return array(\r\n 'title' => $aProfile['username'] . ' ' . $sTextAction . ' ' . $sTextWallObject,\r\n 'description' => 'test description', // $aDataEntry[$this->_oDb->_sFieldDesc],\r\n 'content' => $sCss . $this->_oTemplate->parseHtmlByName('wall_post', $aVars)\r\n );\r\n }", "public function render_wall(wall $wall) {\n return parent::render_from_template('local_libwall/wall', $wall->export_for_template($this));\n }", "function _getWallHTML($userid, $limit, $limitstart , $allowPosting , $allowRemoval)\n\t\t{\n\t\t\t$config\t\t\t=& CFactory::getConfig();\n\t\t\t$html\t\t\t= '';\n\t\t\t\n\t\t\t$cache_id = JCacheCallback::_makeId(array('plgCommunityWalls', '_getWallHTML'), array($userid, $limit, $limitstart , $allowPosting , $allowRemoval));\n\t\t\t$html .= '\t<script type=\"text/javascript\">\n\t\t\t\t\t\t\tfunction getCacheId(){\n\t\t\t\t\t\t\t\tvar cache_id = \"'.$cache_id.'\";\n\t\t\t\t\t\t\t\treturn cache_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</script>';\n\t\t\t\n\t\t\t$viewAllLink\t= false;\n\t\t\t\n\t\t\tif(JRequest::getVar('task', '', 'REQUEST') != 'app')\n\t\t\t{\n\t\t\t\t$viewAllLink\t= CRoute::_('index.php?option=com_community&view=profile&userid='.$userid.'&task=app&app=walls');\n\t\t\t}\n\t\t\t\n\t\t\t$wallModel\t\t=& CFactory::getModel('wall');\t\t\n\t\t\tif( $allowPosting )\n\t\t\t{\n\t\t\t\t$wallsinput\t= CWallLibrary::getWallInputForm( $userid , 'plugins,walls,ajaxSaveWall' , 'plugins,walls,ajaxRemoveWall', $viewAllLink);\n\t\t\t}else{\n\t\t\t\t$wallsinput = \"\";\n\t\t\t}\n\t\n\t\t\t$contents\t= CWallLibrary::getWallContents( 'user' , $userid , $allowRemoval , $limit, $limitstart );\n\t\n\t\t\t$html.= $wallsinput;\n\t\t\t$html.= '<div id=\"wallContent\" style=\"display: block; visibility: visible;\">';\n\t\t\t\n\t\t\tif ( $contents == '' ) {\n\t\t\t\t$html .= '\n\t\t\t\t<div id=\"wall-empty-container\">\n\t\t\t\t\t<div class=\"icon-nopost\">\n\t\t\t <img src=\"'.JURI::base().'plugins/community/walls/favicon.png\" alt=\"\" />\n\t\t\t </div>\n\t\t\t <div class=\"content-nopost\">'.\n\t\t\t JText::_('PLG_WALLS NO WALL POST').'\n\t\t\t </div>\n\t\t\t\t</div>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$html .= $contents;\n\t\t\t}\n\t\t\t\n\t\t\t$html.= '</div>';\n\t\t\t\n\t\t\t// Add pagination links, only in full app view\n\t\t\tif(JRequest::getVar('task', '', 'REQUEST') == 'app')\n\t\t\t{\n\t\t\t\tjimport('joomla.html.pagination');\n\t\t\t\t$pagination\t= new JPagination( $wallModel->getCount($userid, 'user') , $limitstart , $limit );\n\t\t\t\t$html .= '\n\t\t\t\t<!-- Pagination -->\n\t\t\t\t<div style=\"text-align: center;\">\n\t\t\t\t\t'.$pagination->getPagesLinks().'\n\t\t\t\t</div>\n\t\t\t\t<!-- End Pagination -->';\n\t\t\t}\n\t\t\t\n\t\t\treturn $html;\n\t\t}", "function getRandomWall(){\n $randIndex = rand(0, count($this->Walls)-1);\n return array($this->Walls[$randIndex], $randIndex);\n }", "public function listWallpapers() {\n\n\t\t$contents = $this->assetLoader->loadAsset( $this->domain . $this->handle );\n\n\t\tpreg_match_all('/\\\"raw\\\":\\s*\\\"(.*?)\\\"/', $contents, $matches);\n\n\t\t$images = array_filter($matches[1], function( $url ) {\n\t\t\treturn ! preg_match('/\\\\\\\\u/', $url );\n\t\t});\n\n\t\t$images = array_values(array_unique( $images ));\n\t\t$output = [];\n\t\tforeach ( $images as $image ) {\n\t\t\t$output[] = new RemoteWallpaper( $image, $this->assetLoader );\n\t\t}\n\t\treturn $output;\n\t}", "public function getSystemWallFactory() {\r\n\t\treturn $this->systemWallFactory;\r\n\t}", "protected function check_wall_to_wall() {\n\t\t$conv = $this->get_conversation();\n\t\t$this->wall_to_wall = false;\n\t\t$this->owner_url = '';\n\t\t$this->owner_photo = '';\n\t\t$this->owner_name = '';\n\n\t\tif($conv->get_mode() === 'channel')\n\t\t\treturn;\n\t\t\n\t\tif($this->is_toplevel() && ($this->get_data_value('author_xchan') != $this->get_data_value('owner_xchan'))) {\n\t\t\t$this->owner_url = chanlink_url($this->data['owner']['xchan_url']);\n\t\t\t$this->owner_photo = $this->data['owner']['xchan_photo_m'];\n\t\t\t$this->owner_name = $this->data['owner']['xchan_name'];\n\t\t\t$this->wall_to_wall = true;\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Wraps results in appropriate results class for this GetTopTags execution.
protected function wrapResults($outputs) { return new LastFm_Album_GetTopTags_Results($outputs); }
[ "protected function wrapResults($outputs)\n {\n return new Google_Picasa_RetrieveTagsByUser_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Picasa_SearchPhotosByTag_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Picasa_TagPhoto_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new GitHub_ReposAPI_Repos_ListTags_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Album_AddTags_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_User_GetTopAlbums_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Instagram_RecentlyTaggedMedia_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_AddTags_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Zendesk_Tags_ListTags_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_User_GetTopTracks_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LittleSis_Entity_EntitySearchByKeyword_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_GetTopAlbums_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Google_Documents_SearchByType_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_GetTopFans_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_GetTopTracks_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new Instagram_GetRecentMediaForLocation_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new _37Signals_Highrise_SearchPeople_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_RemoveTag_Results($outputs);\n }", "protected function wrapResults($outputs)\n {\n return new NYTimes_MostPopular_GetMostViewed_Results($outputs);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }