query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
632acadf831530367a8b4205928616f5
Define fields of type increments
[ { "docid": "aad897cac00beb2246d36169d823d358", "score": "0.4821812", "text": "public function increments($name = null){\n\t\tif($name != null){\n\t\t\t$this->name = $name;\n\t\t\t$this->type = 'int';\n\t\t\t$this->length = '11';\n\t\t}\n\t\t$this->autoIncrement = 'AUTO_INCREMENT';\n\t\t$this->index = new primaryIndex($this->name);\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "d7af90ffc3b5f46c43e5367cbca882e2", "score": "0.6155573", "text": "protected function increment_type( string $_type, int $_identifier ): void {\n\t\t$property = \"{$_type}_index\";\n\t\tif ( !isset( $this->{$property}[ $_identifier ] ) ) {\n\t\t\t$this->{$property}[ $_identifier ] = 0;\n\t\t}\n\n\t\t$this->{$property}[ $_identifier ] = $this->{$property}[ $_identifier ] + 1;\n\t\t$this->{$_type} = $this->{$_type} + 1;\n\t}", "title": "" }, { "docid": "6349782c6600531b41a0d67b8be58af3", "score": "0.556423", "text": "public function registerFieldTypes() {}", "title": "" }, { "docid": "ceee70396bd37f2596eca1bd4b914e96", "score": "0.55062234", "text": "protected function fieldType(){\n $this->type = 'number';\n }", "title": "" }, { "docid": "f9071acb6a8e4469649ce5277ca43c71", "score": "0.5486449", "text": "function _set_total_update_count($type) {\n if (isset($this->context['results']['total'][$type])) {\n $this->context['results']['total'][$type] ++; \n }\n else {\n $this->context['results']['total'][$type] = 1;\n }\n }", "title": "" }, { "docid": "a6a62e7997478807c26014d40fd52358", "score": "0.54537994", "text": "public function fieldAutoIncrement();", "title": "" }, { "docid": "992c44d8383efa1471b2daef2aef50f8", "score": "0.5419695", "text": "private function set_types() {\n\n\t\tforeach ( $this->fields as $field )\n\t\t\tif ( $field['type'] == 'group' )\n\t\t\t\tforeach ( $field['fields'] as $_field )\n\t\t\t\t\t$this->field_types[$_field['type']] = $_field['type'];\n\t\t\telse\n\t\t\t\t$this->field_types[$field['type']] = $field['type'];\n\n\t}", "title": "" }, { "docid": "b1746414f6713fc2d27ededb68d0c429", "score": "0.5404548", "text": "public function registerFields(){\n\t\t$this->registerFieldInt('id_hld_catalog_hld', 'Tipo');\n\t\t$this->registerFieldInt('is_default_hld', 'Defecto', false, true, true);\n\t\t$this->registerFieldInt('esta_activo_hld', 'Está activo', false, false, true);\n\t}", "title": "" }, { "docid": "02c5bb8529209967a0d14e82a6db42dc", "score": "0.5399739", "text": "function farm_import_add_importer_fields($type, $bundle, $importer) {\n\n // If the importer doesn't have a mapping array for some reason, bail.\n if (empty($importer->config['processor']['config']['mappings'])) {\n return;\n }\n\n // Get field mappings, depending on the type.\n switch ($type) {\n case 'farm_asset':\n $mappings = farm_import_asset_field_mappings();\n break;\n case 'log':\n $mappings = farm_import_log_field_mappings();\n break;\n default:\n $mappings = array();\n }\n\n // Add fields, if they exist on the bundle.\n foreach ($mappings as $field => $mapping) {\n if (!empty(field_info_instance($type, $field, $bundle))) {\n $importer->config['processor']['config']['mappings'][] = $mapping;\n }\n }\n\n // Add Quantity field, if it exists. This is a bit more complicated because\n // it is a field collection, so there are two targets.\n if (!empty(field_info_instance($type, 'field_farm_quantity', $bundle))) {\n $importer->config['processor']['config']['mappings'][] = array(\n 'source' => 'Quantity value',\n 'target' => 'field_farm_quantity:field_farm_quantity_value',\n 'unique' => FALSE,\n 'language' => 'und',\n );\n $importer->config['processor']['config']['mappings'][] = array(\n 'source' => 'Quantity unit',\n 'target' => 'field_farm_quantity:field_farm_quantity_units',\n 'term_search' => '0',\n 'autocreate' => 1,\n );\n }\n}", "title": "" }, { "docid": "49fd51f37f7580c5d7e082d6dde844aa", "score": "0.53902787", "text": "public function number($type);", "title": "" }, { "docid": "912413a2b15acb4ead8079616584b9ad", "score": "0.5370073", "text": "private function createFields()\n {\n $this->fieldArray = ['id' => 'pk', 'accomodation_id' => 'integer'];\n foreach($this->xml as $key => $val)\n {\n $this->fieldArray[$this->formatOptionName($val->option_name)] = $this->createTypes($val);\n }\n $this->fieldArray[] = 'FOREIGN KEY (accomodation_id) references accomodation(accomodation_id)';\n }", "title": "" }, { "docid": "eba22362c0a621a60bea9a01fce10acb", "score": "0.5336347", "text": "protected function AssignPageTypeFields() {}", "title": "" }, { "docid": "eba22362c0a621a60bea9a01fce10acb", "score": "0.5336347", "text": "protected function AssignPageTypeFields() {}", "title": "" }, { "docid": "ff91e9770a00d364b55e3cc061068fbc", "score": "0.5323735", "text": "function updateNumbers() {\n/* numbering the published posts, starting with 1 for oldest;\n/ creates and updates custom field 'incr_number';\n/ to show in post (within the loop) use <?php echo get_post_meta($post->ID,'your_post_type',true); ?>\n/ alchymyth 2010 */\nglobal $wpdb;\n$querystr = \"SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'europians' \";\n$pageposts = $wpdb->get_results($querystr, OBJECT);\n$counts = 0 ;\nif ($pageposts):\nforeach ($pageposts as $post):\n$counts++;\nadd_post_meta($post->ID, 'incr_number', $counts, true);\nupdate_post_meta($post->ID, 'incr_number', $counts);\nendforeach;\nendif;\n}", "title": "" }, { "docid": "d1bd81c336742321765ef7ff7a1e8b10", "score": "0.5313839", "text": "public function int(): self {\r\n\r\n $this -> type = 'int';\r\n return $this;\r\n }", "title": "" }, { "docid": "f79698540bfd23c4a7a5b0fdae75f671", "score": "0.5310588", "text": "protected function _buildFieldsByType()\n {\n $this->object_fields_by_type = array(\n 'num'=>array(),\n 'str'=>array(),\n 'rel'=>array()\n );\n foreach ($this->getStructureEntry('structure') as $_field=>$_data) {\n if (\n preg_match('/^integer(\\((.*)\\))?/i', $_data['type']) ||\n preg_match('/^float(\\((.*)\\))?/i', $_data['type'])\n ) $this->object_fields_by_type['num'][] = $_field;\n elseif (\n preg_match('/^varchar(\\((.*)\\))?/i', $_data['type']) ||\n preg_match('/(.*)text$/i', $_data['type'])\n ) $this->object_fields_by_type['str'][] = $_field;\n elseif (\n preg_match('/^(.*)_id$/i', $_data['type'])\n ) $this->object_fields_by_type['rel'][] = $_field;\n }\n }", "title": "" }, { "docid": "5daeb23cfc9c857ad88e11fc02672234", "score": "0.5265962", "text": "protected function make($type, array $fields = [])\n {\n while($this->times--)\n {\n $stub = array_merge($this->getStub(), $fields);\n $type::create($stub);\n\n }\n }", "title": "" }, { "docid": "77184b8b94adb6d8138d22e4a43ebe74", "score": "0.52493954", "text": "public function getType() : int {}", "title": "" }, { "docid": "6065b09f12b1d566af89446734abdaf4", "score": "0.52399", "text": "public function getIncrementing()\n {\n }", "title": "" }, { "docid": "61c32a0b0b05f6f2e120402979c555eb", "score": "0.5226587", "text": "function register_field_type_info($info)\n {\n }", "title": "" }, { "docid": "57a9cdd1cbcad358956b4315e6977ee3", "score": "0.52112764", "text": "public function incr()\n {\n }", "title": "" }, { "docid": "515852cfa254a9b9c00548103c7b883a", "score": "0.52063656", "text": "function acf_register_field_type_info($info) {}", "title": "" }, { "docid": "3497d4aafa298d36b6aa79ee10bdb67c", "score": "0.52022284", "text": "public function createMultipleCustomFields()\n {\n }", "title": "" }, { "docid": "5f4a73322d34041fc0a936b2d4a1b909", "score": "0.517685", "text": "public function addFields(array $fields)\n {\n foreach ($fields as $getter => $field)\n {\n if (is_int($getter))\n {\n $getter = null;\n }\n\n $this->addField($field, $getter);\n }\n }", "title": "" }, { "docid": "b6bf7df5da0cc73729217f341dad2032", "score": "0.51734513", "text": "public function getIncrementor(): IncrementorInterface;", "title": "" }, { "docid": "62bc1f17e1690b8659aba69c7d81e3c2", "score": "0.5163841", "text": "public function getType(): int\n {\n }", "title": "" }, { "docid": "f46ae928f191b94e9e576beb50b550fa", "score": "0.514633", "text": "public function bumpField($key,$count = 1);", "title": "" }, { "docid": "c903027b821f022a92d67c841c6f0f9c", "score": "0.51390564", "text": "public function Int32Type()\n{\n$sim['res'][0]=['base'=>'xsd:int'];\nreturn $sim;\n}", "title": "" }, { "docid": "e4f86067d39d55cfdb51c14718d136af", "score": "0.5135571", "text": "protected function _initOldFieldsMap()\n {\n $this->_oldFieldsMap = array(\n 'type' => 'type',\n 'node' => 'node',\n 'level' => 'level'\n );\n /*\n * $this->_oldFieldsMap = array(\n 'type' => 'increment_type',\n 'node' => 'increment_node',\n 'level' => 'increment_level'\n );\n */\n }", "title": "" }, { "docid": "b03d073577fe9b5b50db1f2ec7d4d7e9", "score": "0.51343703", "text": "public function fieldNumeric();", "title": "" }, { "docid": "1abfde61cdc6a88de23efcfa97ec9a2d", "score": "0.5131818", "text": "public function getFieldCount() {\n\t}", "title": "" }, { "docid": "4484093ffbb30f2f4710dcfe88ec2fb9", "score": "0.5099358", "text": "public function typeInt(): self\n\t{\n\t\treturn $this->setType('int');\n\t}", "title": "" }, { "docid": "fad120b73e6a1bec573708895712e9f5", "score": "0.5079643", "text": "protected function set_type() {\n\n\t\t$this->type = 'kirki-number';\n\n\t}", "title": "" }, { "docid": "393a111cff09a9dee64d91c23fe202b6", "score": "0.5075608", "text": "function register_field_type($class)\n {\n }", "title": "" }, { "docid": "75b9216e173c6683854b7fc48ba894ae", "score": "0.5071623", "text": "public function fields()\n {\n return [\n Number::make('count', [\n 'required' => true,\n 'label' => false,\n 'wrapper' => false,\n ]),\n Button::make([\n 'wire:click.prevent' => 'setNumber',\n 'content' => '<span class=\"fas fa-fw fa-plus pr-4\"></span> Add to Cart',\n ], 'add'),\n ];\n }", "title": "" }, { "docid": "2371d7280bfdb496fe42389c9c80e426", "score": "0.5060975", "text": "protected function registerFields() {\n \n }", "title": "" }, { "docid": "cf50a58ebef5924b6b493d5b892a0ae3", "score": "0.50568646", "text": "public function getTypeReference(): int\n {\n }", "title": "" }, { "docid": "68a6dc0ece6077cc09dc0c6ecd9a68a9", "score": "0.5042001", "text": "function set_num_fields($num) {\n $this->num_fields = $num;\n }", "title": "" }, { "docid": "b642a6f7110cd3f7e46e3453b0d9b04b", "score": "0.50180537", "text": "function refresh_field_definition($type)\n\t{\n\t\trequire_code('database_helper');\n\t\t_helper_refresh_field_definition($this,$type);\n\t}", "title": "" }, { "docid": "094ded9a5afd1be04b58610e523b35e3", "score": "0.5012492", "text": "private function registerField(int $index, string $name, int $type)\n {\n if (!\\preg_match('/^(?P<name>[\\w\\-]+)(?P<quantifier>\\+|\\*)?(?P<minimum>(?<=\\+)\\d+)?$/', \\strtolower($name), $matches)) {\n throw new \\InvalidArgumentException('Invalid field definition ' . $name . ': Syntax error');\n }\n\n if (isset($matches['quantifier'])) {\n if ($index !== $this->fieldCount - 1) {\n throw new \\InvalidArgumentException('Invalid field definition ' . $name . ': Quantifiers only allowed in last field');\n }\n\n if (!isset($matches['minimum'])) {\n $matches['minimum'] = $matches['quantifier'] === '+' ? 1 : 0;\n }\n\n $allowsMultiple = true;\n $minimumValues = (int) $matches['minimum'];\n } else {\n $allowsMultiple = false;\n $minimumValues = 0;\n }\n\n $this->fieldDefs[$index] = $this->fieldDefFactory->create($index, $matches['name'], $type, $allowsMultiple, $minimumValues);\n if ($index === $this->fieldCount - 1) {\n $this->lastField = $this->fieldDefs[$index];\n }\n\n $this->fieldNameMap[$matches['name']] = $index;\n }", "title": "" }, { "docid": "2b35918e4a820a2c7cf6581a2901f35a", "score": "0.50101733", "text": "function acf_register_field_type($class) {}", "title": "" }, { "docid": "4f048204ba1a9be1bf3261d4faeaae0c", "score": "0.49924016", "text": "abstract public function translateTypeCount($n);", "title": "" }, { "docid": "7d6cec8f9e60673c36acb1f5d5a60e59", "score": "0.49900994", "text": "protected function getIdentifierDefinition() {\n return BaseFieldDefinition::create('integer')\n ->setReadOnly(TRUE)\n ->setSetting('unsigned', TRUE);\n }", "title": "" }, { "docid": "762a572388100b975684d8945c72610f", "score": "0.49834535", "text": "protected function get_type() {\n\t\treturn 'integer';\n\t}", "title": "" }, { "docid": "5bb3e637cf38fea035f5b1f03769e098", "score": "0.49808082", "text": "public function getType(): int;", "title": "" }, { "docid": "85d0e1b96ef7e49151ab4061323b309e", "score": "0.49786586", "text": "public static function _register()\n {\n self::assignElements(['ListingDuration' => ['type' => 'ListingDurationDefinitionType', 'xmlns' => self::XMLNS, 'cardinality' => '0..*']], parent::NAME);\n self::assignAttributes(['Version' => ['type' => 'int']]);\n }", "title": "" }, { "docid": "2731f9dbfa8d5a06ff95f3ef1c02c750", "score": "0.49772194", "text": "public function testCreateUpdateActionsInteger()\n {\n $changedData = [\n 'type' => [\n 'typeId' => 'type',\n 'key' => 'FOOBAR',\n ],\n 'fields' => [\n 'fieldname' => 5,\n ],\n ];\n\n $this->runAction($changedData);\n }", "title": "" }, { "docid": "07de2073cd6183d11f68dca1eebed133", "score": "0.49621624", "text": "public static function _addNumbering(&$field, &$tplfield, &$i)\n {\n static $number, $subnumber;\n\n if (!$number && !$subnumber) {\n $number = $field['attribute']->m_ownerInstance->getNumbering();\n }\n if (!$subnumber) {\n if (strlen($number) == 1 || (floor($number) <= 9 && floor($number) >= -9 && floor($number) == $number)) {\n $subnumber = $number;\n $number = null;\n } else {\n $subnumber = substr($number, strrpos($number, '.') + 1);\n $number = substr($number, 0, strrpos($number, '.'));\n }\n }\n\n if ($field['label']) {\n if ($number) {\n $tplfield['label'] = \"$number.$subnumber. \";\n } else {\n $tplfield['label'] = \"$subnumber. \";\n }\n ++$subnumber;\n }\n }", "title": "" }, { "docid": "90c1f6a98b577661e6b1ea9318cdf1b0", "score": "0.49596155", "text": "public function preTypeFields($type, $name){\n $fields = array();\n switch($type){\n case 'checkbox':\n $fields = array(\n $name => array(\n 'type' => 'VARCHAR',\n 'null' => TRUE,\n 'constraint' => '255'\n ),\n );\n break;\n case 'datepicker':\n $fields = array(\n $name => array(\n 'type' => 'DATE',\n 'null' => TRUE,\n ),\n );\n break;\n case 'number':\n case 'email':\n case 'file':\n case 'password':\n case 'selectbox':\n case 'text':\n case 'timepicker':\n $fields = array(\n $name => array(\n 'type' => 'VARCHAR',\n 'constraint' => '255',\n 'null' => TRUE,\n ),\n );\n break;\n case 'textarea':\n $fields = array(\n $name => array(\n 'type' => 'TEXT',\n 'null' => TRUE,\n ),\n );\n break;\n default:\n break;\n }\n return $fields;\n }", "title": "" }, { "docid": "309d716a363e03a9d27a92571556b7f1", "score": "0.49465418", "text": "public function incrBy()\n {\n }", "title": "" }, { "docid": "2a45ca86a4a51dbb4be9525721751c4e", "score": "0.49378076", "text": "public function incr()\n {\n // Trying to configure method \"incr\" which cannot be configured because it does not exist, has not been specified, is final, or is static\n }", "title": "" }, { "docid": "0e7d2ad442b14ed3249329829c1e1a89", "score": "0.49300465", "text": "function getFieldsTypes()\n {\n return array(\n 'campaignId' => 'integer',\n 'advertiserId' => 'integer',\n 'campaignName' => 'string',\n 'startDate' => 'date',\n 'endDate' => 'date',\n 'impressions' => 'integer',\n 'clicks' => 'integer',\n 'priority' => 'integer',\n 'weight' => 'integer',\n 'targetImpressions' => 'integer',\n 'targetClicks' => 'integer',\n 'targetConversions' => 'integer',\n 'revenue' => 'double',\n 'revenueType' => 'integer',\n 'capping' => 'integer',\n 'sessionCapping' => 'integer',\n 'block' => 'integer',\n 'comments' => 'string',\n );\n }", "title": "" }, { "docid": "49727389dcc5f0a2ab2a6e03f620c672", "score": "0.49256346", "text": "public function generateInt(TypeInt $type, $value = null) {\n }", "title": "" }, { "docid": "3321398905aeddbe266bfa16386dc1d0", "score": "0.4924981", "text": "public function incrIdTypeResource($increment) {\n $this->setIdTypeResource($this->getIdTypeResource() + $increment);\n }", "title": "" }, { "docid": "306ddcd07b7011c3bbd784ef124aa54d", "score": "0.49245235", "text": "private function _start_complex_value($type) {\n // tagged with the type that they are so we know how to add new values.\n $current_item = array('type' => $type, 'value' => array());\n $this->_stack[] = $current_item;\n }", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.49116638", "text": "abstract public function fields();", "title": "" }, { "docid": "7cff864355ab9b6ae9225997bf13fcad", "score": "0.49116027", "text": "abstract public function num_fields();", "title": "" }, { "docid": "7fbd314ab92048331d56b20c2f58a621", "score": "0.48962268", "text": "protected function decrement_update_count($type)\n {\n }", "title": "" }, { "docid": "c482caf4fa3175a9ca31a1db736b89be", "score": "0.48901585", "text": "function acf_count_local_fields($parent = '') {}", "title": "" }, { "docid": "e2e781df3e159596757bd41d18abf060", "score": "0.48864314", "text": "function get_field_types()\n {\n }", "title": "" }, { "docid": "5f0b4c127b65ea913c070895c7275ab3", "score": "0.48835626", "text": "function register_field_type_info( $info ) {\n\n\t\t\t// convert to object\n\t\t\t$instance = (object) $info;\n\t\t\t$this->types[ $instance->name ] = $instance;\n\t\t}", "title": "" }, { "docid": "32e5ba028b30430a217608fbeb9ea05c", "score": "0.48821458", "text": "function getFieldDescription()\r\n\t{\r\n\t\treturn \"INT(6) NOT NULL AUTO_INCREMENT\";\r\n\t}", "title": "" }, { "docid": "91c73f6a2d1d69c888ee0938286cac2c", "score": "0.4875647", "text": "public static function numericField($parameters){ }", "title": "" }, { "docid": "45dba5a2fc148512b027b01a98f00648", "score": "0.48730975", "text": "public function Int64Type()\n{\n$sim['res'][0]=['base'=>'xsd:long'];\nreturn $sim;\n}", "title": "" }, { "docid": "6b134ce8044ff8b772dc4bb59730b80a", "score": "0.48628464", "text": "protected abstract function addFields();", "title": "" }, { "docid": "79406e52469ce822510eee3be4263405", "score": "0.48608682", "text": "public function initFields();", "title": "" }, { "docid": "bc6178128313adbb426ebae0c054cef6", "score": "0.48434255", "text": "#[TentativeType]\n public function columnCount(): int {}", "title": "" }, { "docid": "53931d4200308b66d228c6732240cacd", "score": "0.48400265", "text": "public function __construct() {\n $this->fieldTypes = array();\n }", "title": "" }, { "docid": "743165b9037a306484dac9c44ee1c598", "score": "0.48372564", "text": "public function addFieldAndType($field, $value, $type) {\n $this->data = array_merge($this->data, array($field=>$value));\n\n if($type == true) {\n array_push($this->type, \"text\");\n }else{\n array_push($this->type, \"integer\");\n }\n $this->setPrepare = true;\n }", "title": "" }, { "docid": "bfd66659e8008b56f63ded32b0cc15e1", "score": "0.48343158", "text": "public static function _register()\n {\n self::assignElements([\n 'PositiveFeedbackLeftCount' => ['type' => 'int'],\n 'NegativeFeedbackLeftCount' => ['type' => 'int'],\n 'NeutralFeedbackLeftCount' => ['type' => 'int'],\n 'FeedbackLeftPercent' => ['type' => 'float'],\n 'RepeatBuyerCount' => ['type' => 'int'],\n 'RepeatBuyerPercent' => ['type' => 'float'],\n 'UniqueBuyerCount' => ['type' => 'int'],\n 'TransactionPercent' => ['type' => 'float'],\n 'CrossBorderTransactionCount' => ['type' => 'int'],\n 'CrossBorderTransactionPercent' => ['type' => 'float']\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "title": "" }, { "docid": "56c5816ca3431e8e45e3e89b8ade83af", "score": "0.4833606", "text": "public function inc($fields = array(), $value = 1)\n {\n $this->updateInit('$inc');\n\n if (is_string($fields)) {\n $this->_updates['$inc'][$fields] = $value;\n } elseif (is_array($fields)) {\n foreach ($fields as $field => $value) {\n $this->_updates['$inc'][$field] = $value;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "ee14fef72956d3c103468d1f817c6746", "score": "0.48303032", "text": "public function incrIdTypeClimate($increment) {\n $this->setIdTypeClimate($this->getIdTypeClimate() + $increment);\n }", "title": "" }, { "docid": "bf5bf40bf0b7f30f0c1ddf7809d290f7", "score": "0.48218977", "text": "protected function parseHelloFields($type)\n {\n }", "title": "" }, { "docid": "a529e988d49ba41bc434fdde02862f09", "score": "0.4820515", "text": "public function setFields($fields) {\n\t\tforeach ($this->tokens as $token) {\n\t\t\tif ($token->type == Token::T_FIELD && count($fields) >= $token->value) {\n\t\t\t\t$value = $fields[$token->value - 1];\n\t\t\t\t$this->setToken($token, $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7e4f257b48b6cc618beb5a929f7565e6", "score": "0.4817406", "text": "public function setInc($inc) {\n $this->inc = (int)$inc;\n return $this;\n }", "title": "" }, { "docid": "9c48bf504865d20c0768b916b4f89cf2", "score": "0.48155648", "text": "function MYMODULE_update_7001() {\n db_query(\"UPDATE {field_config} SET type = 'number_integer', module = 'number' WHERE field_name = 'field_name'\");\n // Text fields have an aditional column for format which number doest have. We drop those.\n db_query(\"ALTER TABLE field_data_name DROP field_name_format\");\n db_query(\"ALTER TABLE field_revision_name DROP field_name_format\");\n // Change all empty values to 0 otherwise we get an error.\n db_query(\"UPDATE field_data_name SET field_name_value = '0' WHERE field_name_value =''\");\n db_query(\"UPDATE field_revision_name SET field_name_value = '0' WHERE field_name_value =''\");\n//change the default values\n db_change_field('field_data_name', 'field_name_value', 'field_name_value', array(\n 'type' => 'int',\n 'length' => 11,\n 'not null' => FALSE,\n 'default' => NULL\n ));\n\n //revision field\n db_change_field('field_revision_name', 'field_name_value', 'field_name_value', array(\n 'type' => 'int',\n 'length' => 11,\n 'not null' => FALSE,\n 'default' => NULL\n ));\n\n field_cache_clear(TRUE);\n}", "title": "" }, { "docid": "0e062fc22d8d68bf742b26c549ba8c5e", "score": "0.4810214", "text": "function _set_fields()\n {\n $this->label = array(\n 'fieldType' => 'TextField',\n 'label' => 'Post Label',\n 'config' => array(\n 'placeholder' => 'separate by comma, leave blank to show all',\n 'id' => 'label',\n 'class' => 'form-control'\n )\n );\n $this->num_posts = array(\n 'fieldType' => 'TextField',\n 'label' => 'Number of Posts',\n 'config' => array(\n 'value' => '5',\n 'id' => 'num_posts',\n 'class' => 'form-control'\n )\n );\n }", "title": "" }, { "docid": "ebc7dc4aa0711cd210e6a27e988160b0", "score": "0.48100838", "text": "public function types()\n {\n return [\n 'id' => [\n 'type' => 'number',\n 'label' => 'Id',\n 'regex' => '',\n 'overview' => false,\n 'create' => false,\n 'edit' => false,\n ],\n 'field_type' => [\n 'type' => 'create-value-edit-label',\n 'label' => trans('hack::modules.form_fields.field_type'),\n 'regex' => 'required',\n 'values' => 'getFieldTypes',\n ],\n 'overview' => [\n 'type' => 'select',\n 'label' => trans('hack::modules.form_fields.overview'),\n 'regex' => '',\n 'default' => 1,\n 'values' => [\n '1' => trans('hack::modules.form_fields.visible'),\n '' => trans('hack::modules.form_fields.invisible'),\n ],\n 'overview' => false,\n ],\n 'label' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.form_fields.label'),\n 'regex' => 'required',\n ],\n 'key' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.form_fields.key'),\n 'regex' => 'required',\n ],\n 'values' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.form_fields.values'),\n 'regex' => '',\n 'overview' => false,\n ],\n 'placeholder' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.form_fields.placeholder'),\n 'regex' => '',\n 'overview' => false,\n ],\n 'default_value' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.form_fields.default_value'),\n 'regex' => '',\n 'overview' => false,\n ],\n 'regex' => [\n 'type' => 'text',\n 'label' => trans('hack::modules.form_fields.regex'),\n 'regex' => '',\n 'overview' => false,\n ],\n 'width' => [\n 'type' => 'select',\n 'label' => trans('hack::modules.form_fields.width'),\n 'regex' => 'required',\n 'values' => [\n 12 => '100%',\n 54 => '80%',\n 9 => '75%',\n 8 => '66%',\n 53 => '60%',\n 6 => '50%',\n 52 => '40%',\n 4 => '33%',\n 3 => '25%',\n 51 => '20%',\n 2 => '16%',\n 1 => '8%',\n ],\n ],\n ];\n }", "title": "" }, { "docid": "bf3133abc2bb0b6ef5aff062d5819ce3", "score": "0.48099563", "text": "private function setFieldSpec(): void\n {\n $fieldSpecStubs = [];\n $relationStubs = [];\n foreach ($this->fields as $field => $definition) {\n\n // Se il field è presente tra i FieldSpec da ignorare non proseguire.\n if (in_array($field, $this->ignoreFieldSpec))\n continue;\n\n // Cambia il type se è presente un override del tipo nei databaseTypeMappings.\n $type = $definition['relation'] ? 'relation' : Arr::get($this->databaseTypeMappings, $definition['type'], $definition['type']);\n\n // Se il type è integer ed il field si chiama 'id', usa il type 'primary_key'.\n $type = ($type === 'integer' && $field === 'id') ? 'primary_key' : $type;\n\n // Leggi lo stub relativo al tipo corretto.\n $stub = file_get_contents(__DIR__ . \"/stubs/fieldspecs/{$type}.stub\");\n\n // Imposta i campi per una possibile relation.\n if ($type === 'relation') {\n\n // Rimuovi il prefisso/suffisso 'id' e ipotizza un nome per il Model della relation.\n $relationTable = str_replace(['id_', '_id'], '', $field);\n $relationModel = $this->guessModelForTable($relationTable);\n\n // Per convenzione di Laravel i nomi delle relation sono formattati in camelCase al plurale.\n $relationName = Str::plural(Str::camel($relationModel));\n\n // Inserisci i valori nello stub del FieldSpec.\n $stub = str_replace('##relation_model##', $relationModel, $stub);\n $stub = str_replace('##relation_name##', $relationName, $stub);\n\n // Aggiungi la relation per il field.\n $stubName = $this->followsLaravelConvention($relationModel, $field) ? 'relation' : 'rich_relation';\n $relationStub = file_get_contents(__DIR__ . \"/stubs/relations/$stubName.stub\");\n\n // Inserisci i valori nello stub della relation.\n $relationStub = str_replace('##relation_name##', $relationName, $relationStub);\n $relationStub = str_replace('##relation_model##', $relationModel, $relationStub);\n $relationStub = str_replace('##relation_field##', $field, $relationStub);\n\n // Aggiungi la relation all'array di possibili relation per questo Model.\n $relationStubs[] = str_replace('##field##', $field, $relationStub);\n }\n\n // Sostituisci il field e aggiungi lo stub all'array di FieldSpec per questo Model..\n $fieldSpecStubs[] = str_replace('##field##', $field, $stub);\n }\n\n // Aggiungi i FieldSpec.\n $this->modelStub = str_replace('##fieldspecs##', implode(\"\\n\\n \", $fieldSpecStubs), $this->modelStub);\n\n // Aggiungi i metodi per le relations.\n $this->modelStub = str_replace('##relations##', implode(\"\\n\\n \", $relationStubs), $this->modelStub);\n }", "title": "" }, { "docid": "88d6173c1fb3513fb64357fc2ae8de3d", "score": "0.48012587", "text": "protected function criteriaRegisterFields(){\n\t\t$this->registerFieldString('version_dpy', 'Versión');\n\t\t\n\t\t$this->registerFieldInt('num_filesjs', 'js');\n\t\t$this->registerFieldInt('num_filesphp', 'php');\n\t\t$this->registerFieldInt('num_filescss', 'css');\n\t\t$this->registerFieldInt('num_filesimg', 'imagen');\n\t}", "title": "" }, { "docid": "94bcdc5060c597266d4860ec3e84abef", "score": "0.47980785", "text": "function _list_field()\n\t{\n\t\t// VARCHAR\n\t\t$fields['code'] = ['type' => 'VARCHAR', 'constraint' => '40', 'null' => TRUE];\n\t\t// TEXT\n\t\t$fields['description'] = ['type' => 'TEXT', 'null' => TRUE];\n\t\t// ID & FOREIGN ID\n\t\t$fields['_id'] \t= ['type' => 'INT', 'constraint' => '32', 'null' => TRUE];\n\t\t// DATE\n\t\t$fields['_date'] = \t['type' => 'DATE', 'null' => TRUE];\n\t\t// NUMERIC PERCENTAGE\n\t\t$fields['percent'] \t= ['type' => 'NUMERIC', 'constraint' => '18,4', 'null' => TRUE];\t\n\t\t// NUMERIC AMOUNT\n\t\t$fields['amount'] = ['type' => 'NUMERIC', 'constraint' => '18,2', 'null' => TRUE];\n\t}", "title": "" }, { "docid": "fae9694ed0c754f6f10a648565fd7db0", "score": "0.47974166", "text": "public function getSemanticIncrements();", "title": "" }, { "docid": "9af492cb201dc16f15254be6413cfb19", "score": "0.47879532", "text": "public static function register_type() {\n\t\tregister_graphql_enum_type(\n\t\t\t'OrderEnum',\n\t\t\t[\n\t\t\t\t'description' => __( 'The cardinality of the connection order', 'wp-graphql' ),\n\t\t\t\t'values' => [\n\t\t\t\t\t'ASC' => [\n\t\t\t\t\t\t'value' => 'ASC',\n\t\t\t\t\t],\n\t\t\t\t\t'DESC' => [\n\t\t\t\t\t\t'value' => 'DESC',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t'defaultValue' => 'DESC',\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "deb418a5b95fecbae95d35ef498a9666", "score": "0.47805777", "text": "public function getFieldCount()\n {\n $this->_initialize();\n\n return parent::getFieldCount();\n }", "title": "" }, { "docid": "159fa5442989596f7703ccbf68cb5e95", "score": "0.4778327", "text": "protected function setIncrementCase($case, $type)\n {\n if( preg_match('/inc\\[(?<increment>[0-9]+)\\]/', $type, $match) )\n {\n if( $this->inc === 0 )\n {\n $this->inc = $match['increment'] ?? 0;\n }\n \n return $case . $this->inc++;\n }\n\n return $this->incrementCase($case); // @codeCoverageIgnore\n }", "title": "" }, { "docid": "4954a5e7ffc2dfa143028b60a076cf7e", "score": "0.47740814", "text": "function vibrant_life_do_field_number( $args = array() ) {\n\tvibrant_life_field_helpers()->fields->do_field_number( $args['name'], $args );\n}", "title": "" }, { "docid": "5939ea5b6c063b95f2d87cf0213a0bfe", "score": "0.4773861", "text": "abstract protected function fields();", "title": "" }, { "docid": "5939ea5b6c063b95f2d87cf0213a0bfe", "score": "0.4773861", "text": "abstract protected function fields();", "title": "" }, { "docid": "1bf40100d66b958eea65cc0151904fa0", "score": "0.47737405", "text": "public static function field_type_activated() {}", "title": "" }, { "docid": "a3eccd0d863daee295c8c8a61961bb3a", "score": "0.47718194", "text": "public function incrByFloat()\n {\n }", "title": "" }, { "docid": "187835e332948d991a77ecfe3ae9eb0c", "score": "0.4770483", "text": "public function getObjectType(): string\n {\n return 'number';\n }", "title": "" }, { "docid": "12d528bd301c62d70d8a8635e5257df0", "score": "0.47693065", "text": "protected function buildInvoiceCoreFields()\n {\n //====================================================================//\n // Order Object\n $this->fieldsFactory()->create((string) self::objects()->encode(\"Order\", SPL_T_ID))\n ->Identifier(\"id_order\")\n ->Name($this->spl->l('Order'))\n ->MicroData(\"http://schema.org/Invoice\", \"referencesOrder\")\n ->isReadOnly()\n ;\n\n //====================================================================//\n // Invoice Reference\n $this->fieldsFactory()->create(SPL_T_VARCHAR)\n ->Identifier(\"number\")\n ->Name(Translate::getAdminTranslation(\"Invoice number\", \"AdminInvoices\"))\n ->MicroData(\"http://schema.org/Invoice\", \"confirmationNumber\")\n ->isReadOnly()\n ->isListed()\n ;\n }", "title": "" }, { "docid": "0ce07c28fd716f83cd958eed624be4d0", "score": "0.4767427", "text": "public function getDataWithTypeField() {}", "title": "" }, { "docid": "2f534adf277bb1c0d9070f597e4a5b0e", "score": "0.4765714", "text": "private function defineAttributes(): void\n {\n $this->countStudent = $this->countStudent();\n $this->countMen = $this->countMen();\n $this->countWomen = $this->countWomen();\n $this->countDev = $this->countDev();\n $this->countOps = $this->countOps();\n }", "title": "" }, { "docid": "5fd95352ebfde494e66012c0415bcfd2", "score": "0.4758239", "text": "public function PositiveIntType()\n{\n$sim['res'][0]=['base'=>'xsd:int'];\n$sim['res'][0]['mii'][0]=['1'];\nreturn $sim;\n}", "title": "" }, { "docid": "9e1b240dacebecedf17abad65c920122", "score": "0.4757048", "text": "function compositeDefinition($type, $field) {\t\n\tstatic $compositeFields = NULL;\n\t\n\tif ($compositeFields == NULL) $compositeFields = get('composite-fields'); // load once\n\t\n\t$fields = array();\n\t$fields[] = array('element' => 'group');\n\t\n\t$label = array_extract($field, array('label'), '');\n\t$name = array_extract($field, array('name'), '');\n\t$base = array_extract($field, array('base'), '');\n\t\n\tif (array_key_exists($type, $compositeFields)) {\n\t\t$fields = $compositeFields[$type];\n\t\t$values = array();\n\t\tforeach ($fields as $key => $fielddef) {\n\t\t\t//if (array_key_exists('value', $field)) $fielddef['value'] = $field['value']; // transfer value to subfields\n\t\t\t\n\t\t\tif (array_key_exists('name', $fielddef)) {\n\t\t\t\t$localname = '';\n\t\t\t\tif (str_begins($fielddef['name'], ':')) $localname = str_replace(':', '', $fielddef['name']);\n\t\t\t\tif (array_key_exists($localname, $values)) {\n\t\t\t\t\t$fielddef['value'] = $values[$localname]; // transfer as valid\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($localname == 'format') {\n\t\t\t\t\t$format = $fielddef['value'];\n\t\t\t\t\tswitch ($format) {\n\t\t\t\t\t\tcase 'datetime':\n\t\t\t\t\t\tcase 'timestamp':\n\t\t\t\t\t\tcase 'time':\n\t\t\t\t\t\t\t$value = $field['value'];\n\t\t\t\t\t\t\tif (is_array($value)) $value = $value[$field['name']];\n\t\t\t\t\t\t\t$values = getdate($value);\n\t\t\t\t\t\t\t$values['month'] = $values['mon'];\n\t\t\t\t\t\t\t$values['day'] = $values['mday'];\n\t\t\t\t\t\t\t$values['hour'] = $values['hours'];\n\t\t\t\t\t\t\t$values['minute'] = $values['minutes'];\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (array_key_exists('type', $fielddef)) $fielddef = self::definedFields($fielddef['type'], $fielddef);\n\t\t\tforeach (array('name' => $name, 'label' => $label) as $item => $parentdata) {\n\t\t\t\tif (array_key_exists($item, $fielddef) && str_begins($fielddef[$item], ':')) {\n\t\t\t\t\t$fielddef[$item] = str_replace(':', $parentdata.':', $fielddef[$item]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (array_key_exists('value', $fielddef) && !is_array($fielddef['value']) && str_contains($fielddef['value'], '$base')) {\n\t\t\t\t$fielddef['value'] = str_replace('$base', $base, $fielddef['value']);\n\t\t\t}\n\t\t\t\n\t\t\t$fields[$key] = $fielddef;\n\t\t}\n\t}\n\t\n\t$fields[] = array('element' => 'group-end');\n\n\treturn $fields;\n}", "title": "" }, { "docid": "6e222acdb542707583b328437c7797b1", "score": "0.4756872", "text": "private function createCounter(): object\n {\n return new class () {\n private $count = 0;\n public function increment() { $this->count++; }\n public function total() { return $this->count; }\n };\n }", "title": "" }, { "docid": "3047b9f20857299024d030f05152e66c", "score": "0.47477657", "text": "public function insertUpdateCounter($projectId, $field_type, $count, $timestamp, $hg_version, $hg_hash);", "title": "" }, { "docid": "0eaed9c5ef579b6e4d734a2251b7d0ec", "score": "0.47444513", "text": "function set_field_value($type,$name,$value) {\n\t\t//------------------------------------\n\t\t\t$verbose_set=($this->verbose&&($this->verbose_level>1));\n\t\t\t\n\t\t\t//Get the line(s) of the misc field values\n\t\t\tif(isset($this->value_entries[\"$name\"])) {\n\t\t\t\t\n\t\t\t\t$object_id=$this->value_entries[\"$name\"][\"infos\"][\"object\"];\n\t\t\t\t\n\t\t\t\tif($type==\"tooltip\") {\n\t\t\t \n\t\t\t\t\t$offset_shift=$this->set_field_tooltip($name,$value);\n\t\t\t \n\t\t\t\t} elseif ($this->useCheckboxParser && isset($this->value_entries[\"$name\"]['infos']['checkbox_state'])) { //FIX: set checkbox value\n $offset_shift=$this->set_field_checkbox($name, $value);\n //ENDFIX\n } else {//if(isset($this->value_entries[\"$name\"][\"values\"][\"$type\"])) {\n//\t\t\t\techo $this->value_entries[\"$name\"][\"values\"][\"$type\"];\n/*\t\t\t\t\t$field_value_line=$this->value_entries[\"$name\"][\"values\"][\"$type\"];\n\t\t\t\t\t$field_value_maxlen=$this->value_entries[\"$name\"][\"constraints\"][\"maxlen\"];\n\t\t\t\t\t\n\t\t\t\t\tif($field_value_maxlen) //Truncates the size if needed\n\t\t\t\t\t\t$value=substr($value, 0, $field_value_maxlen);\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tif($verbose_set) echo \"<br>Change $type value of the field $name at line $field_value_line to '<i>$value</i>'\";\n\t\t\t\t\t$offset_shift=$this->_set_field_value($field_value_line,$value);*/\n\t\t\t\t\tif(isset($this->value_entries[$name][\"values\"][\"current\"]))\n\t\t\t\t\t\t$offset_shift=$this->_set_field_value2($this->value_entries[$name][\"values\"][\"current\"],$value,false);\n\t\t\t\t\telse\n\t\t\t\t\t\t$offset_shift=$this->_set_field_value2($this->value_entries[$name][\"infos\"][\"name_line\"],$value,true);\n\t\t\t\t}\t\t\t\t\t\t\n//\t\t\t\t}else\n//\t\t\t\t\t$this->Error(\"set_field_value failed as invalid valuetype $type for object $object_id\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t//offset size shift will affect the next objects offsets taking into accound the order they appear in the file--\n\t\t\t\t$this->apply_offset_shift_from_object($object_id,$offset_shift);\n\t\t\t\t\t\n\t\t\t} else \n\t\t\t\t$this->Error(\"field $name not found\");\n\t\t\t\n\t\t}", "title": "" }, { "docid": "cdccf5d9b7fd846183bd18dc4a4520f3", "score": "0.47349495", "text": "public function incrementField($table,$field,$kveri){\n $updatekveri = \"UPDATE `{$table}` SET `{$field}`= {$field} + 1 WHERE 1 {$kveri}\";\n $this->db->query($updatekveri,1);\n\n }", "title": "" }, { "docid": "596a8f6550cbfc608bfadce6233592d7", "score": "0.4733046", "text": "public function increment() {\n $this->count++;\n }", "title": "" } ]
84fe536c425fd699c9588e8498f84163
Copies the data from the JSON
[ { "docid": "0f5fb6b92e175a38ca935ff74190e6f9", "score": "0.0", "text": "public static function fromJSON($json)\n {\n $item = new static();\n\n // Get all the data that is supported and try to\n // get it from the json with same key\n foreach ($item->toArray() as $key => $value) {\n if (property_exists($json, $key)) {\n $item->{$key} = $json->{$key};\n }\n }\n\n return $item;\n }", "title": "" } ]
[ { "docid": "84bfea25412991419d1a61908c4c1355", "score": "0.6282833", "text": "protected function thatThePropertiesInTheJson($json)\n {\n $this->restObj = (object)array_merge((array)$this->restObj, json_decode($json, true));\n }", "title": "" }, { "docid": "d1f75b9c7e18c67395f02675352a5145", "score": "0.59905636", "text": "public function setJsonData($json)\n {\n return $this->data = json_encode($json, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "576594ceecfb4f167e707e5e3c15163f", "score": "0.57977694", "text": "public function read_data() {\n $source_path = drupal_get_path('module', 'example') . '/source.json';\n $json_local_data = file_get_contents($source_path);\n $this->json_data = json_decode($json_local_data);\n }", "title": "" }, { "docid": "7a82f92bd198ce5e401fd4a1fec2f53d", "score": "0.57523793", "text": "function jsonStart(){\n $this->json = '';\n }", "title": "" }, { "docid": "f21603cc3fa7e92b99277847e61b408f", "score": "0.5729553", "text": "private function readJsonData()\n {\n if (!is_readable($this->file)) {\n return;\n }\n\n $data = @json_decode($this->file, true);\n $params = new Parameters($data);\n\n foreach (self::$loadProperties as $property) {\n $this->{$property} = $params[$property];\n }\n }", "title": "" }, { "docid": "a446fbaa5a35d21a0114a2ff9752fc76", "score": "0.57229924", "text": "private function loadData()\n\t\t{\n\t\t\tif($lstrData = file_get_contents(JSON_DATA_FILE))\n\t\t\t{\n\t\t\t\tORM::setData($lstrData);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "609c7303efb0f54947d745a4a51232b0", "score": "0.57116276", "text": "public function parseJson(): void\n {\n $this->type = self::TYPE_STRING;\n $this->example = json_encode(['name' => $this->faker->name]);\n }", "title": "" }, { "docid": "32cf660d665d99b7943cdf16c04da785", "score": "0.571135", "text": "private function chargerJson()\n\t{\n\t\tif(file_exists($this->Json_file))\n\t\t{\n\t\t\t$this->locations = json_decode(file_get_contents($this->Json_file, true));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->locations = null;\n\t\t}\n\t}", "title": "" }, { "docid": "88f38b22c8d107fb8e14b58fd468d64c", "score": "0.5708179", "text": "public function patchJson() {\n $data = parent::patchJSON();\n\n // Remove fields which are not needed to be sent to Brightcove.\n if (isset($data['id'])) {\n unset($data['id']);\n }\n\n return $data;\n }", "title": "" }, { "docid": "87d728cabdb9892a07c9dfe49dcbf4b1", "score": "0.56785244", "text": "public function __construct($jsonData) {\n return parent::assignValues($this, $jsonData);\n }", "title": "" }, { "docid": "82a1348be81ec1243a94d032ae1d5da7", "score": "0.5674524", "text": "function getData(){ \n return json_decode($this->data); \n }", "title": "" }, { "docid": "fc5a2fbd4d30f2934c0d1376d2d7dc17", "score": "0.56744313", "text": "private function loadData()\n {\n /*Method to load data*/\n\n return $this->datas = json_decode(file_get_contents(\"https://api.myjson.com/bins/10dyk\"));\n\n }", "title": "" }, { "docid": "58a924cceaa8ff2734f37dd0f261eb7d", "score": "0.56493694", "text": "public function testProjectCopySuccessData(){\r\n $this->curl\r\n ->method('post')\r\n ->willReturn(file_get_contents(\"test/Resources/Json/projects_copy.json\"));\r\n\r\n\r\n $projects = \\Wistia\\Wistia::getResource(\"Projects\", \"apikey\");\r\n $projects->setCurl($this->curl);\r\n $results = $projects->copy(\"ln2k6qwi9k\");\r\n\r\n $j = json_decode($results, true);\r\n\r\n $this->assertTrue(isset($j[\"id\"]));\r\n\r\n }", "title": "" }, { "docid": "b2bb56f4db5057ad20069ddfe1b585fc", "score": "0.5640692", "text": "public function loadJson($json);", "title": "" }, { "docid": "9dd464efeb881e8998e454c4f2eb4efb", "score": "0.56330454", "text": "public function __clone()\n {\n $this->data = unserialize(serialize($this->data));\n }", "title": "" }, { "docid": "dbebb6db9559ba0cec4a8c94cb323421", "score": "0.5577881", "text": "function ExtractJSON() {\n $AgentLimit = (count($this->UserAgent) - 1);\n $AgentID = rand(0, $AgentLimit);\n $UserAgent = $this->UserAgent[$AgentID];\n\n $url = $this->PrepareURL();\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_USERAGENT, $UserAgent);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n $response = curl_exec($ch); \n curl_close ($ch);\n \n $data = explode(\"/\\*\\*/\", $response);\n $end = strrpos($data[0], \"}\");\n \n if ($end === false) {\n return false;\n }\n\n $raw_json = substr($data[0], 0, ($end + 1));\n $base = json_decode($raw_json, 1); \n $json = json_decode(substr($base[\"d\"], 4), 1);\n\n $this->JSON = $json;\n\n return $json;\n }", "title": "" }, { "docid": "95ec77a777b31eb3c469612e54a362f6", "score": "0.5572455", "text": "public function __clone()\n\t{\n\t\t$this->data = unserialize(serialize($this->data));\n\t}", "title": "" }, { "docid": "cb21306d93a8a8a6db1c499489e3ef48", "score": "0.5538524", "text": "public function setJson($data)\n {\n $this->data['body'] = $data;\n }", "title": "" }, { "docid": "dbe90a8ec77a70fbfc26bd0efe9454c7", "score": "0.55241054", "text": "public function jsonDeserialize($data) {\n\t\tforeach ($data AS $key => $value) {\t\n\t\t\t$this->{$key} = $value;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "4f3b88dcb9671aba1e8b3ee7b814119b", "score": "0.55016154", "text": "private function readJson()\n {\n $file = $this->tmpPath . \"/.elabftw.json\";\n $content = file_get_contents($file);\n $this->json = json_decode($content, true);\n $this->category = $this->checkCategory($this->json[0]['type']);\n }", "title": "" }, { "docid": "4d73d10c38a28a780856ece6abbf2337", "score": "0.5492824", "text": "public function copy($data)\n {\n // TODO: Implement copy() method.\n }", "title": "" }, { "docid": "d3b0b18e531aa487681142e4743fc1c8", "score": "0.5455095", "text": "function cargarJson(){\n\t\t$archivo = file_get_contents(\"../json/usuarios_personal.json\");\n\n\t\t// esto me arma un array con todos los usuarios\n $usuariosJSON = explode(PHP_EOL, $archivo);\n\n\t\t// Saco el último elemento que es una línea vacia\n\t\tarray_pop($usuariosJSON);\n\n\t\t// Creo un array vacio, para guardar los usuarios\n\t\t$usuariosFinal = [];\n\n\t\t// Recorremos el array y generamos por cada usuario un array del usuario\n\t\tforeach ($usuariosJSON as $usuario) {\n\t\t\t$usuariosFinal[] = json_decode($usuario, true);\n\t\t}\n\n\t\treturn $usuariosFinal;\n\t}", "title": "" }, { "docid": "a4f7bb70f4c7540197c5a5def7f3a159", "score": "0.5425187", "text": "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "title": "" }, { "docid": "a4f7bb70f4c7540197c5a5def7f3a159", "score": "0.5425187", "text": "protected function json(){\n $this->before(function ($request) {\n if ($request->contentType == \"application/json; charset=utf-8\") {\n $request->data = json_decode($request->data);\n }\n });\n $this->after(function ($response) {\n $response->contentType = \"application/json; charset=utf-8\";\n if (isset($_GET['jsonp'])) {\n $response->body = $_GET['jsonp'].'('.json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES).');';\n } else {\n $response->body = json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n }\n });\n }", "title": "" }, { "docid": "c1507cf473ff12181657459f7cfe1a8f", "score": "0.54138", "text": "private function sauverJson()\n\t{\n\t\tif(!file_exists($this->Json_file))\n\t\t{\n\t\t\tfopen($this->Json_file, \"w\");\n\t\t}\n\t\t\n\t\tfile_put_contents($this->Json_file, json_encode($this->locations), LOCK_EX);\n\t}", "title": "" }, { "docid": "2a15ab82b4f2c2c3472556b4c8a6f326", "score": "0.5395635", "text": "abstract public function transformJsonResponse($json);", "title": "" }, { "docid": "189ba8056ac6c9fbcc6d01dc4a5cb12c", "score": "0.53785414", "text": "public function saveSomething() {\n $this->json = new Json(true,'Test API, nothing but mushrooms here now.');\n }", "title": "" }, { "docid": "ed6b36b2a7166a448d0fe3d7e9728901", "score": "0.53751945", "text": "function ou_bagit_importer_process_json_file($source_uri, $drupal_directory, $json_filename, $parent_collection, $pid_namespace) {\n \n $json_data = drupal_json_decode(file_get_contents(\"{$drupal_directory}/{$json_filename}\"));\n if (! $json_data) { \n drupal_set_message(t('Invalid JSON data in @json', array('@json'=>$json_filename)), 'error');\n watchdog('islandora','Invalid JSON data in %json', array('%json'=>$json_filename), WATCHDOG_ERROR);\n return; \n }\n\n\n # We need local copies of files that potentially live at remote urls \n # TODO This could use more error handling, probably. \n $metadata = array();\n if( array_key_exists('metadata', $json_data['recipe'] )) {\n foreach ($json_data['recipe']['metadata'] as $datastream => $path) {\n $metadata[$datastream] = _ou_bagit_importer_copy($source_uri, $drupal_directory, $path);\n }\n }\n $filestreams = array();\n if( array_key_exists('files', $json_data['recipe'] )) {\n foreach ($json_data['recipe']['files'] as $datastream => $path) {\n $filestreams[$datastream] = _ou_bagit_importer_copy($source_uri, $drupal_directory, $path);\n }\n }\n\n $object = array(\n 'pid_namespace' => $pid_namespace,\n 'uuid' => $json_data['recipe']['uuid'],\n 'label' => $json_data['recipe']['label'],\n 'update' => $json_data['recipe']['update'],\n 'import' => $json_data['recipe']['import'],\n 'metadata' => $metadata,\n 'files' => $filestreams,\n );\n \n # One step to process a main object \n drupal_set_message(t('Saving item @obj', array('@obj' => $object['uuid'] )));\n watchdog('islandora','Saving item %obj', array('%obj'=>$object['uuid']), WATCHDOG_NOTICE);\n $result = ou_bagit_importer_save_item($object, $parent_collection, $pid_namespace);\n _ou_bagit_importer_write_results(\"{$drupal_directory}/results.json\", $result, TRUE);\n\n # Queue processing of member objects if present\n # Book pages and member objects are treated similarly\n if (array_key_exists('members', $json_data['recipe']) || array_key_exists('pages', $json_data['recipe']) ) {\n ou_bagit_importer_process_collection($source_uri, $drupal_directory, $object, $json_data['recipe'], $pid_namespace);\n $batch = &batch_get();\n $batch['progressive'] = FALSE;\n drush_backend_batch_process();\n } \n}", "title": "" }, { "docid": "f8e13027067d5b11eb025788cf2d18b4", "score": "0.53574353", "text": "public function setOriginal($data)\n {\n if (empty($data)) {\n return $this;\n }\n\n if (is_string($data)) {\n $data = json_decode($data, true);\n }\n\n $this->original = $data;\n\n return $this;\n }", "title": "" }, { "docid": "d5441552da3f1f77e5738195a6a2790f", "score": "0.53456855", "text": "public function fromJSON($json) {\n $data = json_decode($json, true);\n $return = $this->fromArray($data);\n unset($data);\n return $return;\n }", "title": "" }, { "docid": "21d46357bb1b89ec33cedc3d7a3c838e", "score": "0.5342715", "text": "private function get_json_contents () {\n\n $json_location = $this->json['file__location'] . $this->json['file__name'];\n return json_decode(file_get_contents($json_location));\n\n }", "title": "" }, { "docid": "be6bdf3c3477a29990122946944ed9e8", "score": "0.53212476", "text": "public function addToJson($data)\n\t{\n\t\t$this->_json = CMap::mergeArray($this->_json, $data);\n\t\t$this->setRenderType('json');\n\t}", "title": "" }, { "docid": "e2c0c9123d82ae79682c87f5751ceda9", "score": "0.5299646", "text": "protected function setUp() {\n parent::setUp();\n $this->tempJson = $this->json;\n }", "title": "" }, { "docid": "e2c0c9123d82ae79682c87f5751ceda9", "score": "0.5299646", "text": "protected function setUp() {\n parent::setUp();\n $this->tempJson = $this->json;\n }", "title": "" }, { "docid": "c20189d7a83a214c6860eb7f6f66e622", "score": "0.52927613", "text": "public function getJsonData()\n {\n\n return $this->json_data;\n }", "title": "" }, { "docid": "2e23328c6435faa7c9c62de7bd9a759e", "score": "0.52801657", "text": "function wp_request_localize_my_json_data() {\n\t\t//$protocol = is_ssl() ? 'https' : 'http';\n\t\t$directory = trailingslashit( get_template_directory_uri() );\n\t\n\t\t// Make the request\n\t\t$request = wp_remote_get( $url );\n\t\n\t\t// Retrieve the data\n\t\t$body = wp_remote_retrieve_body( $request );\n\t\t$data = json_decode( $body );\n\t\n\t\t// Localize script exposing $data contents\n\t\twp_localize_script( 'flavourObject-json', 'flavourObjectJSON', array( \n\t\t\t\t'flavourk_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t'full_data' => $data\n\t\t\t)\n\t\t);\n\t\n\t // Enqueues main js file\n\t\twp_enqueue_script( 'flavourObject-json' );\n\t\n\t}", "title": "" }, { "docid": "16db9553bdcb6f47b7621d561337cad4", "score": "0.52751225", "text": "function passJson()\n {\n $this->generateRandomKey();\n $event = $this->hist_decoded->data->Events[$this->key];\n $this->hist = json_encode(array(\n \"text\" => $event->html,\n \"year\" => $event->year,\n \"date\" => $this->hist_decoded->date\n ));\n\n echo ($this->hist);\n\n }", "title": "" }, { "docid": "f5651c2dc8d64c314fa62567a9ecfed9", "score": "0.52659917", "text": "function getData(){\n $data_file = fopen(\"data-1.json\",\"r\");\n $data_readed = fread($data_file, filesize(\"data-1.json\"));\n $data = json_decode($data_readed, true);\n fclose($data_file);\n return $data;\n }", "title": "" }, { "docid": "19796c5946dd341285a6d5bf8f3d0e4f", "score": "0.5258093", "text": "public function __construct($json) {\n foreach ($json as $key => $value) {\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "6854eac64023bda43abb693d71bea7b2", "score": "0.5251198", "text": "protected function fillData(){\n\t\t$properties = ['name' => $this->name, 'symbol' => $this->symbol, 'atomic_mass' => $this->atomicMass, 'is_real' => $this->isReal];\n\t\t$difference = array_diff_assoc($properties, $this->data);\n\t\t$this->data = array_merge($difference, $this->data);\n\t}", "title": "" }, { "docid": "032031fd89ccd08ac491259ac93a7a5a", "score": "0.5236166", "text": "protected function populateSourceData() {\n if (($csvHandle = fopen($this->csvUrl, \"r\")) !== false) {\n // Get the header row and trim all fields\n $headers = fgetcsv($csvHandle, 10000, \",\");\n $this->trimValues($headers);\n\n // Get all the data rows\n while (($row = fgetcsv($csvHandle, 10000, \",\")) !== false) {\n $this->trimValues($row);\n $this->sourceJsonData[] = $this->processCsvRow($row, $headers);\n }\n\n fclose($csvHandle);\n }\n\n $this->sourceJsonData = array_filter($this->sourceJsonData);\n }", "title": "" }, { "docid": "2509e61eb3bc1e1a8b19922df4897728", "score": "0.52319604", "text": "public function Save() {\n\n $data[] = $_POST['data'];\n\n $inp = file_get_contents('results.json');\n\n $tempArray = json_decode($inp);\n\n array_push($tempArray, $data);\n\n $jsonData = json_encode($tempArray);\n\n file_put_contents('results.json', $jsonData);\n\n }", "title": "" }, { "docid": "d00f53c99eb9148e0c57b7ec1de70cb2", "score": "0.52231216", "text": "private function importAll()\n {\n foreach ($this->json as $item) {\n $this->title = $item['title'];\n $this->body = $item['body'];\n $this->date = $item['date'];\n $this->importData();\n if (is_array($item['files'])) {\n foreach ($item['files'] as $file) {\n $this->importFile($file);\n }\n }\n $this->inserted += 1;\n }\n }", "title": "" }, { "docid": "933b8d0c30a0b85f8575a630514f83a0", "score": "0.5206466", "text": "private function load()\n {\n $decoder = new JsonDecoder();\n $decoder->setObjectDecoding(JsonDecoder::ASSOC_ARRAY);\n\n $this->json = file_exists($this->path)\n ? $decoder->decodeFile($this->path)\n : array();\n }", "title": "" }, { "docid": "e6f8951e8592b3a6aea967574fcddba6", "score": "0.5186257", "text": "protected function getData(){ //\n $data = file_get_contents(__DIR__.\"/../data/data.json\");\n return json_decode($data);\n }", "title": "" }, { "docid": "a2700d50d0bac214fa9cf64f963f1eeb", "score": "0.5178784", "text": "protected function parseFile()\n {\n $this->data = json_decode(\n file_get_contents($this->filePath()),\n true\n );\n }", "title": "" }, { "docid": "61b6122562d79b00b2665d6a64f17964", "score": "0.5173761", "text": "public function getJSON();", "title": "" }, { "docid": "3a8f04f9f2dba3ec8c4d0604e6361bb8", "score": "0.51626724", "text": "private function scrapIncomingData() {\n $updateData = json_decode(file_get_contents('php://input'), TRUE);\n if (JSON_ERROR_NONE != json_last_error()) {\n throw new \\InvalidArgumentException('JSON error: '.json_last_error_msg());\n }\n\n return $updateData;\n }", "title": "" }, { "docid": "5bc6fb7831c0766ace36b562fbd808dd", "score": "0.51598394", "text": "public function unprepare($data) {\n\n\t\treturn json_decode($data, true);\n\n\t}", "title": "" }, { "docid": "8e45db741d21d05a7dad9c6096ec2f9a", "score": "0.5158842", "text": "protected function load()\n\t{\n\n\t\tif (file_exists(realpath($this->origin)))\n\t\t{\n\n\t\t\t$contents = file_get_contents($this->origin);\n\t\t\t$this->data = json_decode($contents);\n\n\t\t\t$record = (array) $this->data[0];\n\t\t\t$this->fields = [];\n\t\t\tforeach ($record as $key => $value)\n\t\t\t\t$this->fields[] = $key;\n\t\t}\n\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "title": "" }, { "docid": "423df0c8e0ca162b461533be58317666", "score": "0.51454103", "text": "public function copy()\n\t{\n\t\t// Assert the object is loaded.\n\t\t$this->assertIsLoaded();\n\n\t\t// Create a new content item.\n\t\t$copy = $this->factory->getContent($this->type->alias)->create();\n\n\t\t// Get the data from this item.\n\t\t$data = (array) $this->dump();\n\n\t\t// Remove unique values.\n\t\tunset($data['content_id']);\n\t\tunset($data['featured']);\n\t\tunset($data['created_date']);\n\t\tunset($data['created_user_id']);\n\t\tunset($data['likes']);\n\t\tunset($data['revision']);\n\n\t\t// Update the content title and alias.\n\t\t$data['title'] = JString::increment($data['title']);\n\t\t$data['alias'] = JFilterOutput::stringURLSafe($data['title']);\n\n\t\t// Update the copy data.\n\t\t$copy->bind($data);\n\n\t\treturn $copy;\n\t}", "title": "" }, { "docid": "452dc09df7025b8f86240d44abf97eae", "score": "0.514526", "text": "public function getJsonData()\n {\n return $this->jsonData;\n }", "title": "" }, { "docid": "fb5a863bf108ebcc312963ded147eced", "score": "0.51435065", "text": "public function get_courier_print_json_data();", "title": "" }, { "docid": "94b767469cef25d200ef151a86e02bba", "score": "0.5140562", "text": "public function copy();", "title": "" }, { "docid": "94b767469cef25d200ef151a86e02bba", "score": "0.5140562", "text": "public function copy();", "title": "" }, { "docid": "b19a1153545ca017d702f1259225eaf2", "score": "0.51356804", "text": "protected function setUp() : void {\n parent::setUp();\n $this->tempJson = $this->json;\n }", "title": "" }, { "docid": "a5788ed84e5e6bc52d43ce279a74c249", "score": "0.5102419", "text": "public function __construct() {\t\n\t\t# open data\n\t\t$data_json = file_get_contents($this->data_path);\n\n\t\t# convert from json string to php array\n\t\t$this->coms = json_decode($data_json, true);\n\t}", "title": "" }, { "docid": "68ba0653fae7dcba53c92fc69a367ab7", "score": "0.509054", "text": "public function resdata($jsonpath) {\n global $CFG;\n $fixturedir = $CFG->dirroot . '/mod/accredible/tests/fixtures/mockapi/v1/';\n $filepath = $fixturedir . $jsonpath;\n return json_decode(file_get_contents($filepath));\n }", "title": "" }, { "docid": "a6b057f3ad4e37551d70d30df36a1f1f", "score": "0.5077376", "text": "public function to_array(){\n\t\t\t\n\t\t\t$array = json_decode( $this->in, true );\n\t\t\t\n\t\t\tif( !empty( $array ) )\n\t\t\t\t$this->data = $array;\n\t\t}", "title": "" }, { "docid": "1bacb5739091789783c75b80640ff3e5", "score": "0.5073515", "text": "function transformSource(string $json)\n{\n $sourceObj = json_decode($json);\n $output = objectToArray($sourceObj);\n\n return $output;\n\n}", "title": "" }, { "docid": "14fad38c8663f13c8aa58a364ab94764", "score": "0.5069172", "text": "public function getJsonData()\n {\n return json_decode($this->data, true);\n }", "title": "" }, { "docid": "cef2bf12dfc9e52755ee7ba37149ba10", "score": "0.50674367", "text": "function getData()\n {\n return json_decode($this->data);\n }", "title": "" }, { "docid": "2d72955a469501f7856f86dbcf124b15", "score": "0.5064093", "text": "public function get_data()\n\t{\n\t\treturn json_decode( $this->_data['data'], TRUE );\n\t}", "title": "" }, { "docid": "9c8cab93cb2641fcb4c1082247d01be7", "score": "0.5063343", "text": "public function ToObjet($data)\n\t{\n\t\t$data = json_encode($data);\n\t\t$data = json_decode($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "abf9dbdb047ee6698579a946bd6b0494", "score": "0.50621754", "text": "public function concertJson();", "title": "" }, { "docid": "3e977d552423ec6c9d0c38fc09363ba0", "score": "0.50559723", "text": "function addInfoFeedProduct($data_json){\n\t \t \t\t$this->proinfo = $data_json;\n\t \t \t}", "title": "" }, { "docid": "0ddf6b59a779393d85287097858bb4ad", "score": "0.5054424", "text": "function newDog($formData) {\n $myFile = \"data.json\";\n\n //Create Empty Array\n $arr_data = array();\n\n //Get Data from Existing Json FILE\n $jsondata = file_get_contents($myFile);\n\n // Convert JSON data into array\n $arr_data = json_decode($jsondata, true);\n\n // Push user data to array\n array_push($arr_data,$formData);\n\n //Convert updated array to JSON\n $jsondata = json_encode($arr_data, JSON_PRETTY_PRINT);\n\n //Write JSON Data into data.json File\n if(file_put_contents($myFile, $jsondata)) {\n Return 'Data successfully saved';\n }\nReturn \"error\";\n}", "title": "" }, { "docid": "c1cf81ee4af51570ece72adad7308d48", "score": "0.50534815", "text": "protected function store()\n\t{\n\n\t\t$output = json_encode($this->data);\n\t\tfile_put_contents($this->origin, $output);\n\t}", "title": "" }, { "docid": "45433e80fe1e0de239ebd1de23549234", "score": "0.5046171", "text": "public function getDataJSON(){\r\n$aux = array(//cria array para receber os valore dos atributos\r\n'motor'=>$this->motor,\r\n'cavalos'=>$this->cavalos);\r\n\r\nreturn($aux);//retorno da funcao, array de string com os valores dos atributos\r\n}", "title": "" }, { "docid": "e6a40dca0091526fb9918638e39bb160", "score": "0.50340515", "text": "public function importJson($json, $reset = true)\n {\n if ($reset) {\n $this->reset();\n }\n\n $data = @ (array) json_decode($json, true);\n \n $name = isset($data['name']) ? $data['name'] : '';\n $compareType = isset($data['compare_type']) ? $data['compare_type'] : '';\n $isNot = isset($data['is_not']) ? $data['is_not'] : false;\n $compareValue = isset($data['compare_value']) ? $data['compare_value'] : '';\n\n $sourceEntityType = isset($data['source_entity_type']) ? $data['source_entity_type'] : '';\n $sourceEntityField = isset($data['source_entity_field']) ? $data['source_entity_field'] : '';\n $sourceEntityFieldType = isset($data['source_entity_field_type']) ? $data['source_entity_field_type'] : '';\n \n $this->_name = $name;\n $this->_compareType = $compareType;\n $this->_isNot = $isNot;\n $this->_compareValue = $compareValue;\n \n $this->_sourceEntityType = $sourceEntityType;\n $this->_sourceEntityField = $sourceEntityField;\n $this->_sourceEntityFieldType = $sourceEntityFieldType;\n\n return $this;\n }", "title": "" }, { "docid": "bbaae4cdde4151206a231dbb34c0bc75", "score": "0.50310636", "text": "public function _setJsonData($jsonData)\n {\n $this->jsonData = $jsonData;\n\n return $this;\n }", "title": "" }, { "docid": "e2e114ebbda6f4f3851897c445280591", "score": "0.5029769", "text": "public function fromJson($json)\n {\n $stdClass = json_decode($json);\n $this->fromStdClass($stdClass);\n }", "title": "" }, { "docid": "b3dadb475c7cad256bb2aa8549f7bf4a", "score": "0.5029448", "text": "public function __construct($json=null) {\n if (is_null($json)) return;\n if ($json instanceof Json) {\n $this->data=$json->data;\n return;\n }\n if (is_object($json)) {\n $stdClass=$json;\n } else {\n $stdClass=self::decode($json);\n }\n $this->cast($stdClass);\n }", "title": "" }, { "docid": "92d5239c9e0974c41c7219e316e6a34a", "score": "0.5028179", "text": "private static function getData()\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n $string = @file_get_contents('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=' . $ip);\n\n $json = json_decode($string);\n $json->ip = $ip;\n return $json;\n }", "title": "" }, { "docid": "542bf25186e18c3d8ac9cc099100e25d", "score": "0.5019224", "text": "public function get_dummy_data() {\n\t\t$data = $this->get_remote_data();\n\t\techo json_encode($data);\n\t\tdie();\n\t}", "title": "" }, { "docid": "b2ae7f358aba28d8382d2da1e0b218bd", "score": "0.5018857", "text": "function updateJSONFile(){\n $ch = curl_init(\"http://api.wunderground.com/api/\".$GLOBALS['API_KEY'].\"/conditions/q/MA/Boston.json\");\n $json_string = \"to-json\";\n $options = array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => array('Content-type: application/json') ,\n CURLOPT_POSTFIELDS => $json_string,\n CURLOPT_HEADER => false\n );\n curl_setopt_array( $ch, $options );\n\n $req = curl_exec($ch);\n //$file = fopen($GLOBALS['jsonCondFile'], \"w\");\n file_put_contents($GLOBALS['jsonCondFile'], $req);\n curl_close($ch);\n //fclose($file);\n\n $ch = curl_init(\"http://api.wunderground.com/api/\".$GLOBALS['API_KEY'].\"/forecast/q/MA/Boston.json\");\n $json_string = \"to-json\";\n $options = array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => array('Content-type: application/json') ,\n CURLOPT_POSTFIELDS => $json_string,\n CURLOPT_HEADER => false\n );\n curl_setopt_array( $ch, $options );\n\n $req = curl_exec($ch);\n //$file = fopen($GLOBALS['jsonForeFile'], \"w\");\n file_put_contents($GLOBALS['jsonForeFile'], $req);\n curl_close($ch);\n //fclose($file);\n\n $ch = curl_init(\"http://api.wunderground.com/api/\".$GLOBALS['API_KEY'].\"/astronomy/q/MA/Boston.json\");\n $json_string = \"to-json\";\n $options = array(\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_HTTPHEADER => array('Content-type: application/json') ,\n CURLOPT_POSTFIELDS => $json_string,\n CURLOPT_HEADER => false\n );\n curl_setopt_array( $ch, $options );\n\n $req = curl_exec($ch);\n //echo $GLOBALS['jsonAstrFile'];\n //$file = fopen($GLOBALS['jsonAstrFile'], \"w\");\n file_put_contents($GLOBALS['jsonAstrFile'], $req);\n curl_close($ch);\n //fclose($file);\n }", "title": "" }, { "docid": "6bc52f96f22270a50f913645318e23ea", "score": "0.5013794", "text": "public function setValue($data)\n {\n// $forJSON = null;\n// if (!empty($data['images']) && is_array($data['images'])) {\n// foreach ($data['images'] as &$image) {\n// if (isset($image['id'])) {\n// $image['file'] = wp_prepare_attachment_for_js($image['id']);\n// }\n// }\n// $forJSON = $data;\n// }\n// $jsonTransport = Kontentblocks::getService('utility.jsontransport');\n// $jsonTransport->registerFieldData(\n// $this->getFieldId(),\n// $this->type,\n// $forJSON,\n// $this->getKey(),\n// $this->getArg('arrayKey')\n// );\n\n if (isset($data['images']) && !empty($data['images'])) {\n $images = array_filter($data['images'], function ($i){\n return !is_null($i);\n });\n $data['images'] = $images;\n }\n return $data;\n }", "title": "" }, { "docid": "7de8007631f117350ea6dfb80da557ab", "score": "0.5013402", "text": "private function loadJson() {\n\t\tif (!isset($this->Json) || !($this->Json instanceof Json))\n\t\t\tLoader::loadComponents($this, array(\"Json\"));\n\t}", "title": "" }, { "docid": "3568150ed82c09c72a53359633bc7a09", "score": "0.5003213", "text": "public function __construct() {\n\t\t$this->raw_json = file_get_contents(storage_path() . '/prezis.json');\n\t\t$this->json = json_decode($this->raw_json, true);\n\t}", "title": "" }, { "docid": "fd62677593116d13acc317eabaf7b619", "score": "0.5003193", "text": "abstract public function json();", "title": "" }, { "docid": "36359e95d6b442cf397d38ab98056458", "score": "0.49988717", "text": "public function setData($root)\n {\n $this->data = json_encode($root);\n }", "title": "" }, { "docid": "a1393fe146bfbb8c6aa5ae7a517dea20", "score": "0.49859354", "text": "abstract protected function getJSONObject();", "title": "" }, { "docid": "2718c6f39d46719827b57736ea8bcaa6", "score": "0.49850395", "text": "public function __clone() {\n foreach ($this->_data as $key => $value) if ($value instanceof self) $this[$key] = clone $value;\n }", "title": "" }, { "docid": "4fda53ea5ed9fff80e226f47b06a27d6", "score": "0.49755087", "text": "function input($data)\n {\n return json_decode($data);\n }", "title": "" }, { "docid": "8bf7ab1798f792c01a008ccf5c824516", "score": "0.49740592", "text": "public function __construct()\n\t{\n\t\t$this->chargerJson();\n\t}", "title": "" }, { "docid": "3bf8d09debf953399fad3a9438f6cb22", "score": "0.4969423", "text": "public function getJsonData(){\n $export = [];\n \n $export['template'] = $this->_templateName;\n $export['width'] = $this->_width;\n $export['height'] = $this->_height;\n $export['fields'] = [];\n \n foreach($this->_fields as $key => $val){\n $export['fields'][$key] = $val;\n }\n \n /*$var = get_object_vars($export);\n foreach($var as &$value){\n if(is_object($value) && method_exists($value,'getJsonData')){\n $value = $value->getJsonData();\n }\n }*/\n return json_readable_encode($export);\n }", "title": "" }, { "docid": "71b36a5c5176707c6e345b26639a18c0", "score": "0.4968813", "text": "public function getNewData()\n { \n $result = new \\stdClass();\n \n return $result;\n \n }", "title": "" }, { "docid": "651d2608798aaf51fd754c7ac1154b39", "score": "0.49681982", "text": "public static function createFromJson($json);", "title": "" }, { "docid": "30ed00d737c58fc3401f3046b29fe0ef", "score": "0.49645808", "text": "public function init() {\n extract($this->data);\n }", "title": "" }, { "docid": "bbcc4269c77f05249656e1e87033bda5", "score": "0.4963391", "text": "public function parseExtractedToJson1($data){\n $res = array(\n \"id\" => $data[\"id\"],\n \"user_id\" => $data[\"user_id\"],\n \"product_id\" => $data[\"product_id\"],\n \"price\" => (int)$data[\"price\"],\n \"created_at\" => $data[\"created_at\"],\n \"updated_at\" => $data[\"updated_at\"],\n );\n return $res;\n }", "title": "" }, { "docid": "e80cb800a4f8b2568d5a90641fd30c62", "score": "0.49497202", "text": "public function __construct($json) {\n if(array_key_exists('double_spend', $json))\n $this->double_spend = $json['double_spend'];\n if(array_key_exists('block_height', $json))\n $this->block_height = $json['block_height'];\n if(array_key_exists('time', $json))\n $this->time = $json['time'];\n if(array_key_exists('lock_time', $json))\n $this->lock_time = $json['lock_time'];\n if(array_key_exists('relayed_by', $json))\n $this->relayed_by = $json['relayed_by'];\n if(array_key_exists('hash', $json))\n $this->hash = $json['hash'];\n if(array_key_exists('tx_index', $json))\n $this->tx_index = $json['tx_index'];\n if(array_key_exists('ver', $json))\n $this->version = $json['ver'];\n if(array_key_exists('size', $json))\n $this->size = $json['size'];\n if(array_key_exists('inputs', $json)) {\n foreach ($json['inputs'] as $input) {\n $this->inputs[] = new Input($input);\n }\n }\n if(array_key_exists('out', $json)) {\n foreach ($json['out'] as $output) {\n $this->outputs[] = new Output($output);\n }\n }\n }", "title": "" }, { "docid": "b4ef9d1b80702d870e3e9619ffd59795", "score": "0.49489856", "text": "function getContentItemSelection()\n {\n $this->json->{self::CONTENT_ITEMS} = $this->items;\n unset($this->json->{self::DATA_CLAIM});\n if ( isset($this->claim->data) ) {\n $this->json->{self::DATA_CLAIM} = $this->claim->data;\n }\n return $this->json;\n }", "title": "" }, { "docid": "ff767f8cef6560261ce170f0f5b371d5", "score": "0.4947663", "text": "public function decode()\n {\n $this->dataSet = file_get_contents(__DIR__ .'/../config.json');\n $this->dataSet = json_decode($this->dataSet);\n }", "title": "" }, { "docid": "9d72d9ce6faa4f24aeba3d911cc83df8", "score": "0.49395472", "text": "function get_json() {\r\n $data = $this->get_data();\r\n return json_encode( $data );\r\n }", "title": "" }, { "docid": "fc6fddef9b03ccb8f11432bcc590aabc", "score": "0.49368697", "text": "public function buildJSON() {\n //$this->JSONData = json_encode(array(\"content_type\" => $this->content_type, \"content_id\" => $this->content_id, \"number_of_questions\" => $this->number_of_questions, \"child_data\" => $this->childData));\n $this->JSONData = json_encode(array(\"childData\"=>$this->childData));\n }", "title": "" }, { "docid": "0fb71c9569f6b37119d4960b118191e4", "score": "0.492153", "text": "function reconstructData()\n {\n $numberOfResults = count($this->resultsDetail);\n $detail = $this->resultsDetail;\n\n for($i = 0; $i < $numberOfResults; $i++){ \n $this->resultsDetailArray[] = [\n 'title' => $detail[$i]->titleNoFormatting,\n 'url' => $detail[$i]->unescapedUrl,\n 'width' => $detail[$i]->width,\n 'height' => $detail[$i]->height,\n 'website' => $detail[$i]->visibleUrl\n ];\n $this->imageTitle[$i] = $detail[$i]->titleNoFormatting;\n $this->imageURL[$i] = $detail[$i]->unescapedUrl;\n $this->imageWidth[$i] = $detail[$i]->width;\n $this->imageHeight[$i] = $detail[$i]->height;\n $this->imageWebsiteURL[$i] = $detail[$i]->visibleUrl;\n } \n }", "title": "" }, { "docid": "9b66873d6e4848b9d8f8654682837801", "score": "0.48982388", "text": "public function baca(){\n if ( Storage::disk('local')->has(DATA) ) {\n $data = Storage::get(DATA);\n }else{\n $data = Storage::disk('local')->put(DATA, json_encode([]));\n }\n $array = json_decode($data);\n return $array;\n }", "title": "" }, { "docid": "eebdcf0fb44c92574f04ea68334cace4", "score": "0.48950446", "text": "public function jsonSerialize() {\n return $this->_data;\n }", "title": "" }, { "docid": "c8e3ef79a5a4b6a3f56592dc60340ad0", "score": "0.48910642", "text": "public function getOriginalData(): object\n {\n return $this->originalData;\n }", "title": "" }, { "docid": "6ccbee25ccade8ecea57b5da2b72e65b", "score": "0.4888866", "text": "public function grabAllData()\n {\n $i = 31;\n\n\n /*$cc = new Copycat;\n $cc->setCURL(array(\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_CONNECTTIMEOUT => 5,\n CURLOPT_HTTPHEADER, \"Content-Type: text/html; charset=iso-8859-1\",\n CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.57 Safari/537.17',\n ));\n\n\n // loops for cycle as many times as days to be grabbed starting from 1st of october\n for ($day = 1; $day <= $i; $day++) {\n\n\n // find data in URL given\n $cc->match([\n 'day' => '/class=\"layoutcell\" align=\"right\">&nbsp;(.*?)</ms',\n 'departure_airport' => '/class=\"depdest\" title=\"Flight ......\"><div class=\"content emphasize\">(.*?)</ms',\n 'arrival_airport' => '/class=\"arrdest\"><div class=\"content\">(.*?)</ms',\n 'connection' => 'direct flights only',\n 'departure_time' => '/class=\"depdest\" title=\"Flight ......\"><div class=\"content\">(.*?)</ms',\n 'arrival_time' => '/class=\"arrdest\"><div class=\"content emphasize\">(.*?)</ms'])\n ->matchAll(['prices' => '/title=\"EUR\">(.*?)</ms'])->URLs('https://www.norwegian.com/uk/booking/flight-tickets/select-flight/?D_City=OSL&A_City=RIX&TripType=1&D_Day=' . $day . '&D_Month=201710&D_SelectedDay=' . $day . '&R_Day=' . $day . '&R_Month=201710&R_SelectedDay=' . $day . '&IncludeTransit=false&AgreementCodeFK=-1&CurrencyCode=EUR&rnd=65098');\n\n $result[] = $cc->get();\n }\n\n file_put_contents(storage_path('data.json'), json_encode($result));*/\n\n $result = json_decode(file_get_contents(storage_path('data.json')), true);\n\n// dd($result);\n\n foreach ($result as &$day) {\n foreach ($day as &$flight) {\n\n $priceArray = [];\n\n foreach ($flight['prices'] as $price) {\n array_push($priceArray, $price);\n };\n\n if (sizeof($priceArray) != 0)\n $flight['best_price'] = min($priceArray);\n\n }\n };\n// dd($day);\n dd($result);\n// dd($result[3]);\n return view('result', $result);\n\n\n //TODO: graziau sudeti duomenis\n // file set contents\n //TODO: sukurti storage direktorija, i kuria bus talpinami file \"OSL_RIX_2017_(uzklausos laikas)\"\n //TODO: front-ende dropdown'as, kuris pagal failiuko data atvaizduos duomenis ekrane\n }", "title": "" }, { "docid": "1655db3d671bd3eabbbe23a7772d49a8", "score": "0.48830923", "text": "function copyFormData()\n {\n // eliminate copying on construction\n $SessionPost = modApiFunc(\"Session\", \"get\", \"SessionPost\");\n $this->ViewState = $SessionPost[\"ViewState\"];\n //Remove some data, that should not be resent to action, from ViewState.\n if(isset($this->ViewState[\"ErrorsArray\"]) &&\n count($this->ViewState[\"ErrorsArray\"]) > 0)\n {\n $this->ErrorsArray = $this->ViewState[\"ErrorsArray\"];\n unset($this->ViewState[\"ErrorsArray\"]);\n }\n\n $this->POST = $SessionPost;\n }", "title": "" } ]
e2626950f889d8603798d0d6d0d1d020
Prevent unconfigured PDO instances!
[ { "docid": "70ab91e9c3023673e65a52400783d5e5", "score": "0.0", "text": "private function __construct($config)\n {\n $dsn = sprintf('mysql:dbname=%s;host=%s;port=%d;', $config['database'], $config['hostname'], $config['port']);\n parent::__construct($dsn, $config['username'], $config['password']); \n }", "title": "" } ]
[ { "docid": "39f9d223cde8d9b9eb816c110fd101d9", "score": "0.7270867", "text": "protected function _pdoCheck() {\n\t\tif (!$this->pdo instanceof PDO)\n\t\t\t$this->pdo = App::getPDO();\n\t}", "title": "" }, { "docid": "f60aab8149d77717dccf78661e0b2fc1", "score": "0.64964664", "text": "protected function onPDOWillInit(){\n\t}", "title": "" }, { "docid": "c84ec541b5263a622b458adf5efb8247", "score": "0.64282346", "text": "function handlesPDO()\n {\n return phpversion('pdo') !== false;\n// return false; // For debug\n }", "title": "" }, { "docid": "c20b9ded77b5b20fb038ee807a39464c", "score": "0.6319806", "text": "protected function onPDODidInit(){\n\t}", "title": "" }, { "docid": "6646a787be5e6c5e95d269713f747732", "score": "0.6302253", "text": "abstract protected function createPdoInstance(): PDO;", "title": "" }, { "docid": "ea06b905e0dd922d3638e48784aa1c0b", "score": "0.6288677", "text": "protected function dissconnect(){\n\t\t$this->pdo = null;\n\t}", "title": "" }, { "docid": "b2b6b080d1caa480020ac980c7a74780", "score": "0.6230144", "text": "protected function inaccessible(): PDO\n {\n return new PDO('sqlite::memory:');\n }", "title": "" }, { "docid": "5286bca04627a9483fa543aa9e6b1bb8", "score": "0.62273717", "text": "abstract public function providePdo();", "title": "" }, { "docid": "281a91429133702d5bb5f2b3c3f456d9", "score": "0.6195787", "text": "function init()\n {\n try {\n $this->pdo = new \\PDO(\"mysql:host=\" . Config::host . \";dbname=\" . Config::dbname, Config::username, Config::password);\n // set the PDO error mode to exception\n $this->pdo->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n }\n catch(\\PDOException $e)\n {\n echo $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "9fe1070299e5ba68795e642dda649424", "score": "0.6107038", "text": "function __construct() {\n\t self::$pdoDB = new PDO(self::DB_DSN, self::DB_USER, self::DB_PASS, array(\t \n\t\t\tPDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n\t\t\tPDO::ATTR_EMULATE_PREPARES => false,\n\t\t\tPDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n\t ));\n }", "title": "" }, { "docid": "687ecb4013cafa1ca2bbb01273c9da42", "score": "0.6106269", "text": "function gotPDO()\n\t{\n\t\tif (defined('PDO::ATTR_DRIVER_NAME'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c7d53cdaad1590410d8f8e0b0d5dc106", "score": "0.60811454", "text": "public function __construct(){\n // Connects to database\n try{\n $this->conn = new PDO(\"mysql:host=\" . DB_HOST . \";dbname=\" . DB_DATABASE . \";charset=utf8\", DB_USER, DB_PASS);\n } catch(PDOException $e) {\n try{\n $this->conn = new PDO(\"mysql:host=\" . DB_HOST . \";dbname=;charset=utf8\", DB_USER, DB_PASS);\n } catch(PDOException $e) {\n die (\"Error: \".$e->getMessage());\n }\n }\n\n\n }", "title": "" }, { "docid": "88fd9614065a6d17914134844427a63a", "score": "0.6077422", "text": "private function __construct(){\n try{\n\t\t\t\t$this->pdo = new PDO('mysql:host=' . Config::get('mysql/host') . ';dbname=' . Config::get('mysql/db'), config::get('mysql/username'), config::get('mysql/password'));\n\t\t\t\t$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(PDOException $e){\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "a38eeb958f0b0dafb40fcd6f2ddd5d75", "score": "0.6077001", "text": "public function __construct(){\n\t // try {\n\t // $this->dbh = new PDO(Config::get('dbDSN'), Config::get('dbUsername'), Config::get('dbPassword'));\n\t // } catch (PDOException $e) {\n\t // echo 'Connection failed: '. $e->getMessage();\n\t // }\n\t}", "title": "" }, { "docid": "76ec890ce9e9ffcdcae71b9d2a8734a8", "score": "0.60447466", "text": "function getPDO()\n{\n // ^^^ updated to allow for foreign key constraints:\n $pdo = new PDO(getDsn());\n \n // foreign key constraints need to be enabled manually in SQLite:\n $result = $pdo->query('PRAGMA foreign_keys = ON');\n \n if ($result === false)\n {\n throw new Exception('Could not turn on foreign key constraints');\n }\n \n // now we can throw the DB connection back to whatever is requesting it\n return $pdo;\n}", "title": "" }, { "docid": "e24e5c98d08bf4a773c4ac3e58ba9fe2", "score": "0.60294616", "text": "private function isValidPdoDriver()\n {\n return in_array($this->dbPdoDriver, PDO::getAvailableDrivers());\n }", "title": "" }, { "docid": "c0d07fce3e5975480030947454b3c79b", "score": "0.6019628", "text": "function getPDO()\n{\n return new PDO(getDsn());\n}", "title": "" }, { "docid": "118e7603d0e6d3154d14ad22bc83609d", "score": "0.599071", "text": "public function __construct() {\n\n try {\n $config = parse_ini_file('.env'); // My secret database information\n $this->connection = new PDO('mysql:host='.$config['DB_HOST'].';dbname='.$config['DB_DATABASE'],$config['DB_USERNAME'],$config['DB_PASSWORD'],\n array(PDO::ATTR_EMULATE_PREPARES => true, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n\n } catch(PDOException $e) {\n echo 'ERROR: ' . $e->getMessage();\n }\n\n }", "title": "" }, { "docid": "161468991f204df8fd6dd0c716c7cc13", "score": "0.5990372", "text": "private function __construct(){\n\t\t$dsn = \t'mysql:host=' . DbConf::read('db.host').\n\t\t\t\t\t ';dbname=' . DbConf::read('db.name').\n\t\t\t\t\t ';charset='. DbConf::read('db.char');\n\t\ttry{\t\t\n\t\t\t$this->pdo = new PDO( $dsn, DbConf::read('db.user'), DbConf::read('db.pswd') );\n\t\t\t$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t$this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t}catch( PDOException $e ){\n\t\t\techo DEBUG ? 'PB with DB connection :'.$e->getMessage() : 'DB Exception';\n\t\t}\n\t}", "title": "" }, { "docid": "70db9d11178dc49d1cb7b9bff041cc63", "score": "0.5982729", "text": "private function __construct(){\r\n //constructs the connection taken from the config file where the details are taken from the core.init.php file\r\n try{\r\n $this->_pdo = new PDO('mysql:host=' . Config::get('mysql/host') . ';dbname='.Config::get('mysql/db'), Config::get('mysql/username'), Config::get('mysql/password'));\r\n } catch(PDOException $e){\r\n die($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "62ec7b0a2df4c8f018b03c0b725fbe27", "score": "0.5972923", "text": "public static function __once() {\n\t\tif(extension_loaded('pdo') !== true) {\n\t\t\tthrow new \\LogicException(\\Glue\\Helper\\General::replace(array('class' => __CLASS__, 'extension' => 'PDO'), GLUE_EXCEPTION_EXTENSION_MISSING));\n\t\t}\n\t}", "title": "" }, { "docid": "07f18a7e397ae62b6247ae9c196b336c", "score": "0.5951466", "text": "private function openPDO()\n\t{\n\t\tdefine(\"DB_TYPE\", \"mysql\");\n\t\tdefine(\"DB_HOST\", \"127.0.0.1\");\n\t\tdefine(\"DB_NAME\", \"ptt_crawler\");\n\t\tdefine(\"DB_USER\", $this->_db_username);\n\t\tdefine(\"DB_PASS\", $this->_db_password);\n\n\t\t// error code of PDO\n\t\tdefine(\"SERVER_SHUTDOWN_CODE\", \"1053\");\n\n\t\t$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8', PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n\t\ttry {\n\t\t\t$this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t} catch (PDOException $e) {\n\t\t\texit(\"Database connection error\\n\");\n\t\t}\n\t}", "title": "" }, { "docid": "2fe9a648811c2684b26ebfa820f7c2af", "score": "0.595062", "text": "public function __construct() {\n $options = [\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n try {\n $this->handler = new PDO($this->dsn, $this->user, $this->password, $options);\n } catch (PDOException $e) {\n $this->error = $e->getMessage();\n }\n }", "title": "" }, { "docid": "e14f75638afdc7e78e21d595cb24e7a1", "score": "0.5935292", "text": "function configure_dbconnection() {\n error('configure_dbconnection() removed');\n}", "title": "" }, { "docid": "d8b8322513eb5ca7a79911312631f36e", "score": "0.59228235", "text": "public function setDbExtPdo()\n {\n $this->setDbExt(self::DB_EXT_PDO);\n }", "title": "" }, { "docid": "a4024ba3026e7722e475c2a5298e7f53", "score": "0.5916675", "text": "private function __construct() {\n try {\n $this->_db = new PDO( 'mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=' . DBCHARSET, DBUSER, DBPWD );\n } catch( PDOException $e ) {\n throw $e;\n }\n }", "title": "" }, { "docid": "7921a8ff25dbdc64caa8d59d1ce9fa07", "score": "0.5915931", "text": "function nuukDb() {\n $nuukDb = new PDO('mysql:host=' . DBHOST . ';dbname=' . DBNAME . ';charset=utf8', DBUSER, DBPASS);\n $nuukDb->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $nuukDb->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\n}", "title": "" }, { "docid": "3bc13fde168a09a946788b89b064ae81", "score": "0.5902257", "text": "private function __construct(){\r\n try {\r\n $this->dbh = Conexion::singleton_conexion();\r\n } catch (PDOException $e) {\r\n print \"Error!: \" . $e->getMessage();\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "a8c523dc3c8da29b31fe74427afbd235", "score": "0.5886679", "text": "private function checkConnection(): PDO\r\n {\r\n if ($this->connection === null) {\r\n return $this->getPDO();\r\n }\r\n return $this->connection;\r\n }", "title": "" }, { "docid": "fdb0cde223b0dc7ba891c9b55116bc0b", "score": "0.587699", "text": "private function __construct() {\n try {\n $this->dbh = new PDO($this->dsn, $this->user, $this->password);\n } catch (PDOException $e) {\n // NOTE IKKE BRUK DETTE I PRODUKSJON\n echo 'Connection failed: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "75aa522377c99a6fe29fc9d2b3a52f5f", "score": "0.58653486", "text": "public function __construct() {\n\t\t$this->dbh = new PDO('mysql://localhost/inspire', 'root', '', array(\n\t\t\tPDO::ATTR_PERSISTENT => true,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING\n\t\t));\n\t}", "title": "" }, { "docid": "5c4c136a9d29c8cb097ceaf6a27ec5f8", "score": "0.58395445", "text": "public function __construct(){\n $dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname; \n \n // Nieuwe PDO instance(dbh = DatabaseHandle)\n try{\n $this->dbh = new PDO($dsn, $this->user, $this->pass);\n //command voor debugging\n //$this->dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING );\n }\n // Het opvangen van errors\n catch(PDOException $e){\n $this->error = $e->getMessage();\n }\n }", "title": "" }, { "docid": "4aa7d7a83a7091fd37559710f668d4f7", "score": "0.58313096", "text": "private static function configuration()\r\n {\r\n try {\r\n $yaml = new Parser();\r\n $databaseConfiguration = $yaml->parse(file_get_contents(__DIR__ . \"/../../config/database.yml\"))[\"mysql\"];\r\n\r\n $pdo = new PDO(sprintf(\"mysql:host=%s;dbname=%s\", $databaseConfiguration[\"host\"], $databaseConfiguration[\"dbname\"]), $databaseConfiguration[\"username\"], $databaseConfiguration[\"password\"]);\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $pdo->setAttribute(PDO::ATTR_AUTOCOMMIT, FALSE);\r\n $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES,TRUE);\r\n\r\n return $pdo;\r\n } catch (\\PDOException $e) {\r\n throw new \\PDOException($e->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "649ab581e8b4134b33f9a1425dd84417", "score": "0.58281577", "text": "public function __construct() {\n // has already been created, so we create only one (singleton)\n if (!self::$instance) {\n try {\n $this->PDO = new PDO('mysql:host=' . DB_HOST .\n ';dbname=' . DB_NAME, DB_USER, DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \\'UTF8\\''));\n $this->PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n print \"¡Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n }\n }", "title": "" }, { "docid": "1832cd8eab1cf2bf21a8455f0641ea70", "score": "0.5820321", "text": "protected function init(){\n try{\n $this->db = new \\PDO('mysql:host='.$this->host.';dbname='.$this->database,$this->user,$this->password);\n }\n catch (\\Exception $e){\n new Error_log($e);\n exit('Database Connect Error, Please Check Your Database Config');\n }\n }", "title": "" }, { "docid": "7f2c05a84c48461ff659ad76f8d08ae0", "score": "0.5819087", "text": "private function __construct()\r\n {\r\n $options = [\r\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n PDO::ATTR_EMULATE_PREPARES => false,\r\n PDO::ERRMODE_EXCEPTION => 1\r\n ];\r\n \r\n $this->pdo = new PDO('mysql:host=192.168.1.8;dbname=db462252800', 'hoteltest', 'hoteltest', $options);\r\n }", "title": "" }, { "docid": "61af09659c697b4aa654b57c12e464e5", "score": "0.58113706", "text": "private function __construct(){\n try{\n $this->_db = new PDO('mysql:host='. Config::get('mysql/host') .';dbname='. Config::get('mysql/db') , Config::get('mysql/username'), Config::get('mysql/password'));\n $this->_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch(PDOException $e){\n die('<p><strong>Message:</strong>'.$e->getMessage().'</p>');\n }\n }", "title": "" }, { "docid": "07e10b1a32e72a0ee468e0d2625eff4f", "score": "0.58063114", "text": "private static function getPDO(): PDO\r\n {\r\n try {\r\n return new PDO(\r\n DSN,\r\n DATABASE_USERNAME,\r\n DATABASE_PASSWORD,\r\n OPTIONS\r\n );\r\n } catch (PDOException $errors) {\r\n die('Erreur de connexion:' . $errors);\r\n }\r\n }", "title": "" }, { "docid": "fd27174438eeda3151be1e60545617ba", "score": "0.5779716", "text": "private function initDBConnection()\n {\n try {\n $this->_pdo = new PDO(DbConfig::getDSN(), DbConfig::getUser(), DbConfig::getPassword());\n } catch (Exception $exception) {\n throw new Exception(\"Can't open the database.\");\n }\n }", "title": "" }, { "docid": "d6d5d00ddfacfcde92855547f3185801", "score": "0.57705426", "text": "function pdoConnect(){\n\t// Let this function throw a PDO exception if it cannot connect\n\tglobal $db_host, $db_name, $db_user, $db_pass;\n\t$db = new PDO(\"mysql:host=$db_host;dbname=$db_name;charset=utf8\", $db_user, $db_pass);\n\t$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\treturn $db;\n}", "title": "" }, { "docid": "e94b9aa466bcd89ff2f6298e7e3ef532", "score": "0.57670754", "text": "public function getPDOInstance()\n {\n return $this->pdo;\n }", "title": "" }, { "docid": "cec466b653dcd59f16e3ce93122448f1", "score": "0.5748156", "text": "public function configure(PDOInterface $PDO): void;", "title": "" }, { "docid": "7cf6912f36eaa99277651995436e542b", "score": "0.5746278", "text": "public static function init(){\n \n if (self::$dbh == null){\n try {\n // Cambiar los valores de las constantes en config.php\n $dsn = \"mysql:host=\".DBSERVER.\";dbname=\".DBNAME.\";charset=utf8\";\n self::$dbh = new PDO($dsn,DBUSER,DBPASSWORD);\n // Si se produce un error se genera una excepción;\n self::$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e){\n echo \"Error de conexión \".$e->getMessage();\n exit();\n }\n \n }\n \n}", "title": "" }, { "docid": "7d800859d3af6e7070dd40e5505eefbd", "score": "0.5732104", "text": "public function __construct(){\r\n\t\t\t$dsn = 'mysql:host=' . HOST . ';dbname=' . DATABASE . ';charset=utf8';\r\n\t\t\t\r\n\t\t\t$options = array(\r\n\t\t\t\t\t\tPDO::ATTR_PERSISTENT => true,\r\n\t\t\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\r\n\t\t\t\t\t\tPDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,\r\n\t\t\t\t\t\tPDO::ATTR_EMULATE_PREPARES => FALSE\r\n\t\t\t);\r\n\t\t\t$this->pdo = new PDO($dsn, USERNAME, PASSWORD, $options);\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "3b4c306ec5383ff80685aaebefa33794", "score": "0.5731966", "text": "function testPDOCreated()\n {\n Pipe::initialise(function($cfg){\n $cfg->connection(DSN);\n });\n \n $instance = Pipe\\Connection::instance();\n \n $this->assertIsA($instance->pdo, 'PDO');\n }", "title": "" }, { "docid": "444ac3b94b725a50f73787e303aafef5", "score": "0.5729834", "text": "function newPDO(){\n $pdo = new PDO(DB_CONNECTION_STRING,\n DB_USER, DB_PWD);\n $pdo->setAttribute(PDO::ATTR_ERRMODE,\n PDO::ERRMODE_EXCEPTION);\n\n return $pdo;\n\n}", "title": "" }, { "docid": "4c20e50e4687c8241753366f009be52a", "score": "0.57280874", "text": "public function __construct() {\n $dsn = dbtype . \":dbname=\" . database . \";host=\" . hostname;\n\n\n try {\n $this->dbh = new PDO($dsn, username, password);\n }\n catch(PDOException $e) {\n echo \"PDO has encountered an error: \" + $e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "4c20e50e4687c8241753366f009be52a", "score": "0.57280874", "text": "public function __construct() {\n $dsn = dbtype . \":dbname=\" . database . \";host=\" . hostname;\n\n\n try {\n $this->dbh = new PDO($dsn, username, password);\n }\n catch(PDOException $e) {\n echo \"PDO has encountered an error: \" + $e->getMessage();\n die();\n }\n }", "title": "" }, { "docid": "05292f39c01274d75679d5bdcbce0991", "score": "0.57245487", "text": "public function __construct()\n\t{\n\t\t$this->pdo = parent::connect();\n\t}", "title": "" }, { "docid": "b001249a4ecc11e5c5ee3fcd1c5d5ad5", "score": "0.57181114", "text": "function get_pdo(){\n\tglobal $PDO;\n\tif ($PDO == NULL) {\n\t\ttry {\n\t\t\t//our PDO is populated with data from our included 'db_creds.inc file\n\t\t\t$PDO = new PDO(K_CONNECTION_STRING, K_USERNAME, K_PASSWORD);\n\t\t\t//this allows the PDO to output errors when not working properly\n\t\t\t$PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//the catch function will catch all errors in the above process\n\t\t}catch(PDOException $e){\n\t\t\tdie(\"ERROR: Could not connect. \" . $e->getMessage());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6539d553da96b7d985e5b94fb8e64f4a", "score": "0.5709618", "text": "public static function publishPDO(Container $container): void\n {\n $container->setClosure(\n Pdo::class,\n /**\n * @param class-string<Pdo> $name\n */\n static function (string $name, array $config): Pdo {\n if ($name === \\PDO::class) {\n // If we got here then that means the developer has opted to use the default PDO\n // but has not defined a PDO in the service container. The reason for this requirement\n // is that the Valkyrja PDO constructors take in a config array, whereas the default\n // PDO takes in a DSN as the first param.\n throw new RuntimeException('Default PDO service not found in container.');\n }\n\n return new $name(\n $config\n );\n }\n );\n }", "title": "" }, { "docid": "3285d972914f360736d168c421b89d6c", "score": "0.5708572", "text": "public function __construct()\n {\n $this->dBMain = new PDO('mysql:host=localhost;dbname=user2', 'user2', 'tuser2');\n if (!$this->dBMain)\n {\n throw new PDOException(\"Error db\");\n }\n }", "title": "" }, { "docid": "ffd2732d7d0127702c92f942e594bdda", "score": "0.56797194", "text": "public static function inappropriate(): PDO\n {\n return new PDO('sqlite::memory:');\n }", "title": "" }, { "docid": "d40b100e9515445a88dbe20a29aea278", "score": "0.5678891", "text": "public function __construct() {\n try {\n\n self::$dbInstance = new PDO(\"mysql:host=$this->server;dbname=$this->db;charset=utf8\", $this->user, $this->pwd);\n self::$dbInstance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch (PDOException $exception) {\n echo $exception->getMessage();\n }\n }", "title": "" }, { "docid": "88cf612d9629ab631988fc05ec90d83f", "score": "0.5669466", "text": "function __construct() {\n\n try {\n\n $this->dbh = new PDO(\"mysql:host={$_SERVER['DB_SERVER']};dbname={$_SERVER['DB']}\",$_SERVER['DB_USER'],$_SERVER['DB_PASSWORD']);\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n die();\n } // Ends try catch\n\n }", "title": "" }, { "docid": "bcdbf3e9fdfb195828059d8db7a52a0b", "score": "0.5655139", "text": "public static function getPDO(): PDO \n {\n try {\n return new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\n } catch (PDOException $e) {\n throw new Exception(\"Erreur: \" . $e->getMessage());\n die();\n }\n }", "title": "" }, { "docid": "e8d28450f545389f49d98e8f4688fdf8", "score": "0.5651655", "text": "public function init()\n {\n if (!extension_loaded('PDO')) {\n // PDO is provided through an extension and not through a class loader.\n return SandboxedIntegration::NOT_AVAILABLE;\n }\n\n $integration = $this;\n\n // public PDO::__construct ( string $dsn [, string $username [, string $passwd [, array $options ]]] )\n dd_trace_method('PDO', '__construct', function (SpanData $span, array $args) {\n if (dd_trace_tracer_is_limited()) {\n return false;\n }\n $span->name = $span->resource = 'PDO.__construct';\n $span->service = 'PDO';\n $span->type = Type::SQL;\n $span->meta = PDOSandboxedIntegration::storeConnectionParams($this, $args);\n });\n\n // public int PDO::exec(string $query)\n dd_trace_method('PDO', 'exec', function (SpanData $span, array $args, $retval) use ($integration) {\n if (dd_trace_tracer_is_limited()) {\n return false;\n }\n $span->name = 'PDO.exec';\n $span->service = 'PDO';\n $span->type = Type::SQL;\n $span->resource = $args[0];\n if (is_numeric($retval)) {\n $span->meta = [\n 'db.rowcount' => $retval,\n ];\n }\n PDOSandboxedIntegration::setConnectionTags($this, $span);\n $integration->addTraceAnalyticsIfEnabled($span);\n PDOSandboxedIntegration::detectError($this, $span);\n });\n\n // public PDOStatement PDO::query(string $query)\n // public PDOStatement PDO::query(string $query, int PDO::FETCH_COLUMN, int $colno)\n // public PDOStatement PDO::query(string $query, int PDO::FETCH_CLASS, string $classname, array $ctorargs)\n // public PDOStatement PDO::query(string $query, int PDO::FETCH_INFO, object $object)\n // public int PDO::exec(string $query)\n dd_trace_method('PDO', 'query', function (SpanData $span, array $args, $retval) use ($integration) {\n if (dd_trace_tracer_is_limited()) {\n return false;\n }\n $span->name = 'PDO.query';\n $span->service = 'PDO';\n $span->type = Type::SQL;\n $span->resource = $args[0];\n if ($retval instanceof \\PDOStatement) {\n $span->meta = [\n 'db.rowcount' => $retval->rowCount(),\n ];\n PDOSandboxedIntegration::storeStatementFromConnection($this, $retval);\n }\n PDOSandboxedIntegration::setConnectionTags($this, $span);\n $integration->addTraceAnalyticsIfEnabled($span);\n PDOSandboxedIntegration::detectError($this, $span);\n });\n\n // public bool PDO::commit ( void )\n dd_trace_method('PDO', 'commit', function (SpanData $span) {\n if (dd_trace_tracer_is_limited()) {\n return false;\n }\n $span->name = $span->resource = 'PDO.commit';\n $span->service = 'PDO';\n $span->type = Type::SQL;\n PDOSandboxedIntegration::setConnectionTags($this, $span);\n });\n\n // public PDOStatement PDO::prepare ( string $statement [, array $driver_options = array() ] )\n dd_trace_method('PDO', 'prepare', function (SpanData $span, array $args, $retval) {\n if (dd_trace_tracer_is_limited()) {\n return false;\n }\n $span->name = 'PDO.prepare';\n $span->service = 'PDO';\n $span->type = Type::SQL;\n $span->resource = $args[0];\n PDOSandboxedIntegration::setConnectionTags($this, $span);\n PDOSandboxedIntegration::storeStatementFromConnection($this, $retval);\n });\n\n // public bool PDOStatement::execute ([ array $input_parameters ] )\n dd_trace_method('PDOStatement', 'execute', function (SpanData $span, array $args, $retval) use ($integration) {\n if (dd_trace_tracer_is_limited()) {\n return false;\n }\n $span->name = 'PDOStatement.execute';\n $span->service = 'PDO';\n $span->type = Type::SQL;\n $span->resource = $this->queryString;\n if ($retval === true) {\n $span->meta = [\n 'db.rowcount' => $this->rowCount(),\n ];\n }\n PDOSandboxedIntegration::setStatementTags($this, $span);\n $integration->addTraceAnalyticsIfEnabled($span);\n PDOSandboxedIntegration::detectError($this, $span);\n });\n\n return SandboxedIntegration::LOADED;\n }", "title": "" }, { "docid": "23f5c838eb0d8c600df3bc34724bf1bd", "score": "0.564853", "text": "public function __construct()\r\n {\r\n $this->PDO = new \\PDO('mysql:host=localhost;dbname=slimprodutos', 'root', 'sacqdr1981'); //Conexão\r\n $this->PDO->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION); //habilitando erros do PDO\r\n }", "title": "" }, { "docid": "072f5e0599dd23230a01d49d0d321bed", "score": "0.563951", "text": "public function __construct() {\n\t\t/* SET dsn */\n\t\t$dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname;\n\n\t\t/* SET PDO OPTIONS */\n\t\t$options = array (\n\t\t\tPDO::ATTR_PERSISTENT =>\t true,\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t);\n\n\t\t/* CREATE PDO instance */\n\t\ttry {\n\t\t\t$this->dbh = new PDO($dsn,$this->user,$this->pass,$options);\n\t\t} catch (PDOException $err) {\n\t\t\techo $err->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "f715aeb3dbc67fa8b557f89946501ada", "score": "0.5638821", "text": "public static function getInstance()\n {\n if (is_null(self::$instance)) {\n self::$instance = new PDO(self::$dns, self::$user, self::$pass);\n self::$instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n } return self::$instance;\n\n }", "title": "" }, { "docid": "bd9ff7e80c5359cadf8aa286f641a6c8", "score": "0.56378996", "text": "public function __construct(){\n if(!isset(self::$connection))\n self::$connection=new PDO('mysql:host=localhost;dbname=mydb', 'root', '',\n array(PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION));\n }", "title": "" }, { "docid": "949ef952698e98b1f4be6ccc74247b93", "score": "0.56349546", "text": "private function __construct()\n {\n try {\n $this->_pdo = new PDO(\n 'mysql:dbname=' . Config::get('mysql/db') . ';' .\n 'host=' . Config::get('mysql/host'), \n Config::get('mysql/username'), //Username\n Config::get('mysql/password') //Password\n );\n } catch(PDOException $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "321973addf2f4a38a05af69564d4f376", "score": "0.563207", "text": "public function __construct(){\n\t\t$dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname;\n\t\t// Set options\n\t\t$options = array(\n \tPDO::ATTR_PERSISTENT => true, \t\t\t\t\t//Persistent database connections can increase performance by checking to see if there is already an established connection to the database.\n \tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\t\t//Using ERRMODE_EXCEPTION will throw an exception if an error occurs.\n\t\t);\n\n\t\t//Create a new PDO instance\n\t\ttry{\n\t\t\t$this->dbh = new PDO($dsn, $this->user, $this->pass, $options);\n\t\t} \n\t\t//Catch any errors\n\t\tcatch(PDOException $e) {\n\t\t\t$this->error = $e->getMessages();\n\t\t}\n\t}", "title": "" }, { "docid": "e493ab99c059e3c0cd7be51698b302da", "score": "0.5628393", "text": "function testCantConnectException()\n {\n try\n {\n Pipe::initialise(function($cfg){\n $cfg->connection('mysql://rcrowe:blah_blah@localhost/what_ever');\n });\n \n $this->assertFalse(true, 'Expected PDOException');\n }\n catch(PDOException $e)\n {\n $this->assertTrue(true);\n }\n }", "title": "" }, { "docid": "c272fde6de5360e6b62290cb43fed128", "score": "0.5626817", "text": "public function __construct() {\n $this->db = new PDO($dsn, $user, $pass);\n }", "title": "" }, { "docid": "587735c69fa10688c17b73cd7d6a8cb9", "score": "0.5626658", "text": "function __construct(){\n //$this->pdo = new PDO('mysql:host=200.135.34.209;dbname=cadastro_cguia', 'cguia', 'cad#789@ifc');\n $this->pdo = new PDO('mysql:host=localhost;dbname=emas', 'root', '');\n $this->pdo2 = new PDO('mysql:host=localhost;dbname=avaliacao', 'root', '');\n }", "title": "" }, { "docid": "8c000a87ffbd70e497ceeb4e96def555", "score": "0.5626378", "text": "public static function init(array $config)\n {\n if (\n !isset($config['host']) || !isset($config['dbname']) ||\n !isset($config['user']) || !isset($config['pwd'])\n ) {\n throw new PDOException('Database configuration error');\n }\n $port = ($config['port']) ?? 3306;\n if (self::$pdo === null) {\n $dsn = 'mysql:host='.$config['host'].';port='.$port.';dbname='.$config['dbname'];\n self::$pdo = new PDO($dsn, $config['user'], $config['pwd'], [PDO::MYSQL_ATTR_FOUND_ROWS => true]);\n }\n self::$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return self::$pdo;\n }", "title": "" }, { "docid": "98b1ad00e10a75faa9dfda5a77a2c959", "score": "0.56247413", "text": "private function __construct()\n {\n try{\n $connection = new PDO(\n 'mysql:host=' . SERVER . ';dbname=' . DATABASE . ';charset=utf8mb4',\n DB_LOGIN, DB_PASS,\n array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_EMULATE_PREPARES => true,\n PDO::ATTR_STRINGIFY_FETCHES => false\n )\n );\n $this->setDB($connection);\n $this->status = true;\n $this->debugMode = false;\n $this->debugHiddenMode = false;\n $this->simMode = false;\n } catch(PDOException $ex) {\n $this->status = false;\n addLogEvent($ex);\n }\n }", "title": "" }, { "docid": "da8b4426a8a8c244d2a8baf32c731a33", "score": "0.5624741", "text": "private function __construct()\n {\n\n $this->pdo = Connection::getInstance()->getConnection();\n }", "title": "" }, { "docid": "06da9c88e261742d11fe2d7698e0c470", "score": "0.56215334", "text": "public function __construct() {\n $this->_dsn = new PDO('mysql:host=10.211.55.101;dbname=vtown_goods', 'goods', '123456aA!');\n }", "title": "" }, { "docid": "4910bbddbba528f03d69fa62f0576a1a", "score": "0.5617995", "text": "function __construct(){\n\n $this->pdo = $this->connect();\n }", "title": "" }, { "docid": "4910bbddbba528f03d69fa62f0576a1a", "score": "0.5617995", "text": "function __construct(){\n\n $this->pdo = $this->connect();\n }", "title": "" }, { "docid": "74c69a5a95329f3866266c18dbc7f11f", "score": "0.5610878", "text": "private static function checkAutocommit(\\PDO $pdo): void\n {\n $vendor = $pdo->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n\n // MySQL turns autocommit off during a transaction.\n if ($vendor == 'mysql') {\n return;\n }\n\n try {\n if ($pdo->getAttribute(\\PDO::ATTR_AUTOCOMMIT)) {\n throw new InvalidArgumentException('PDO::ATTR_AUTOCOMMIT should be disabled.');\n }\n } catch (PDOException $e) {\n /*\n * Ignore this, as some drivers would throw an exception for an\n * unsupported attribute (e.g. Postgres).\n */\n }\n }", "title": "" }, { "docid": "03c496a2076d9c6a6338cf1a34535a01", "score": "0.559945", "text": "function __construct(){\n\t\t\t$db['host'] = 'localhost';\n\t\t\t$db['db_name'] = 'crawxy';\n\t\t\t$db['user'] = 'root';\n\t\t\t$db['password'] = '12345678';\n\n\t\t\t$this->pdo = new PDO('mysql:host='. $db['host'] .';dbname=' . $db['db_name'], $db['user'], $db['password']);\n\t\t\t$this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t}", "title": "" }, { "docid": "ce5bdac109defabf92cf1edc097f4dde", "score": "0.5589319", "text": "function __construct() {\n\n\t\t$dbhost = $this->config['dbhost'];\n\t\t$dbport = $this->config['dbport'];\n\t\t$dbuser = $this->config['dbuser'];\n\t\t$dbpass = $this->config['dbpass'];\n\t\t$dbname = $this->config['dbname'];\n\t\t# for this session allow 0000-00-00 Dates\n $options = array(\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => \"SET SESSION sql_mode = ''\"\n );\n\n\n try {\n\t\t\t$conn = \"mysql:host={$dbhost};port={$dbport};dbname={$dbname}\";\n $this->db = new PDO($conn, $dbuser, $dbpass, $options);\n } catch(PDOException $e) {\n echo $e->getMessage(); \n\t\t\terror_log($e);\n\t\t\texit(1);\n }\n }", "title": "" }, { "docid": "d89510a7201deb78355bf38ecb00c195", "score": "0.5583717", "text": "function getPDO()\n{\n require \".const.php\";\n $dbh = new PDO('mysql:host=' . $dbhost . ';dbname=' . $dbname, $user, $pass);\n return $dbh;\n}", "title": "" }, { "docid": "612f9012ee2c1f1ea97654763e5c3bb2", "score": "0.55831057", "text": "private function __construct() {\n\t\ttry{\n\t\t\t$this->_pdo = new PDO('mysql:host=' . Config::get('mysql/dbhost'). ';dbname=' . Config::get('mysql/dbname'), Config::get('mysql/dbuser'), Config::get('mysql/dbpass'));\n\t\t\t//$this->_pdo = new PDO('mysql:host=localhost;dbname=clubhub','root','');\n\t\t\t//echo Config::get('mysql/dbhost');\n\t\t\t//echo Config::get('mysql/dbname');\n\t\t\t//echo Config::get('mysql/dbuser');\n\t\t\t//echo Config::get('mysql/dbpass');\n\t\t} catch(PDOException $e) {\n\t\t\tdie($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "ea2b3a1bc20b2f05f340365d38656251", "score": "0.55829245", "text": "public function __construct() {\n $this->db = PDOConnection::getInstance();\n }", "title": "" }, { "docid": "3bf9ff05dd74bdcef26e11df4544cd0f", "score": "0.5582274", "text": "function __construct()\n {\n try {\n global $config;\n\n $__db_host = empty($config['DB']['db_host']) ? 'localhost' : $config['DB']['db_host'];\n $__db_name = empty($config['DB']['db_name']) ? '' : $config['DB']['db_name'];\n\n $__db_user = empty($config['DB']['db_user']) ? 'root' : $config['DB']['db_user'];\n $__db_pass = empty($config['DB']['db_pass']) ? '' : $config['DB']['db_pass'];\n\n $__db_dns = empty($config['DB']['db_dns']) ? \"mysql:host=$__db_host; dbname=$__db_name;\" : $config['DB']['db_dns'];\n\n $this->__conn = new PDO($__db_dns, $__db_user, $__db_pass, $this->__attribute);\n return true;\n } catch (PDOException $__err) {\n __error($__err->getMessage(), $__err);\n }\n }", "title": "" }, { "docid": "5da44fa3c0a66169e95ce057003e127b", "score": "0.55746526", "text": "public function __construct()\n {\n $dsn = \"mysql:host={$this->host};dbname={$this->name}\"; # data source name : host db & db name\n \n // option/pengaturan/konfigurasi untuk db pdo\n $option = [\n PDO::ATTR_PERSISTENT => true, # untuk membuat koneksi db kita terus terjaga\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION # mengatur error mode menjadi exeption\n ];\n\n // try catch, untuk konesi pdo\n try\n {\n $this->dbh = new PDO($dsn, $this->username, $this->pass, $option); # instansiasi object pdo dengan dsn, username & pass db\n }\n catch(PDOException $err)\n {\n die($err->getMessage());\n }\n }", "title": "" }, { "docid": "d7f6a1b67d546cd29ee60a0aec2e0df2", "score": "0.5569428", "text": "function __construct()\n {\n \n $root = dirname(__FILE__);\n $this->config = parse_ini_file($root . '/config.ini', true);\n \n if (null === self::$theOnlyConnection) {\n $db = $this->config['database settings'];\n $host = $db['host'];\n $user = $db['user'];\n $pword = $db['pword'];\n $db_name = $db['db'];\n\n self::$theOnlyConnection = new PDO(\"mysql:host=$host;dbname=$db_name\", $user, $pword, array(\n PDO::MYSQL_ATTR_FOUND_ROWS => true,\n PDO::ATTR_PERSISTENT => true\n ));\n self::$theOnlyConnection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n self::$theOnlyConnection->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n }\n\n $this->db = self::$theOnlyConnection;\n }", "title": "" }, { "docid": "1db8eba9f4332cb0178edd36ca74a7ea", "score": "0.5566384", "text": "protected function createPdoInstance()\n {\n //Empty attributes property cases exception in Yajra\\Pdo\\Oci8::__construct() method\n if (!is_array($this->attributes))\n $this->attributes = [];\n\n try {\n return parent::createPdoInstance();\n } catch(PDOException $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "33971c49fc9b9fd7c7421f16345a677f", "score": "0.55594766", "text": "function connect()\n{\n global $config;\n $pdoInstance = new PDO ($config[\"pdo\"][\"dsn\"], $config[\"pdo\"][\"user\"], $config[\"pdo\"][\"password\"]);\n $pdoInstance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $pdoInstance;\n}", "title": "" }, { "docid": "650d19fc22fe8811079747f1daf4868b", "score": "0.55593807", "text": "public function __construct() {\n \n try {\n $this->db = new PDO('mysql:host=localhost;dbname=sportsandco;charset=utf8', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n //BDD pour Mr Tanguy \n //$this->db = new PDO('mysql:host=localhost;dbname=sportsandco;charset=utf8', 'root', 'root', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); \n } \n catch (Exception $error) {\n die($error->getMessage());\n }\n }", "title": "" }, { "docid": "6308914d5bc336637761db4c14f357d3", "score": "0.5558308", "text": "public function desconectar()\n {\n self::$pdo = null;\n }", "title": "" }, { "docid": "e3f8258c66c4940648c790cf3dba58d9", "score": "0.55567026", "text": "public function __construct() {\n\n $environment = AppHelper::getEnvironment();\n\n $configs = ApplicationConfig::databaseConfiguration();\n\n $config = $configs[$environment];\n\n try {\n // set up the connection\n $this->pdo = new \\PDO($config->dsn,\n $config->username,\n $config->password);\n } catch (\\PDOException $e) {\n echo \"Cannot connect to database \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "ac209317cb3cfca810d4c12e9a5b88a0", "score": "0.5556296", "text": "public function __construct()\n {\n $settings = settings();\n try {\n $this->database = new PDO(\n 'mysql:hostname=' . $settings['database']['hostname'] .\n ';dbname=' . $settings['database']['dbname'],\n $settings['database']['username'],\n $settings['database']['password']\n );\n } catch (Exception $e) {\n Fatality($e);\n }\n }", "title": "" }, { "docid": "aef3054a51e4cd1efc11363aeaf92557", "score": "0.55558705", "text": "function yourls_is_db_alive() {\r\n global $ydb;\r\n \r\n $alive = false;\r\n switch( $ydb->DB_driver ) {\r\n case 'pdo' :\r\n $alive = isset( $ydb->dbh );\r\n break;\r\n \r\n case 'mysql' :\r\n $alive = ( isset( $ydb->dbh ) && false !== $ydb->dbh );\r\n break;\r\n \r\n case 'mysqli' :\r\n $alive = ( null == mysqli_connect_error() );\r\n break;\r\n \r\n // Custom DB driver & class : delegate check\r\n default:\r\n $alive = yourls_apply_filter( 'is_db_alive_custom', false );\r\n }\r\n \r\n return $alive;\r\n}", "title": "" }, { "docid": "31bfb82c4b47368eb78d971a3153bb8f", "score": "0.5537939", "text": "public function __construct(){\r\n try{\r\n $this->stringConex = \"mysql:host=\" . BD_HOST . \";dbname=\" . BD_NAME;\r\n $this->conexion= new PDO($this->stringConex, BD_USER, BD_PASS);\r\n }\r\n catch(PDOException $e)\r\n {\r\n echo \"BBDD unavariable\";\r\n error_log(print_r($e, FALSE));\r\n }\r\n }", "title": "" }, { "docid": "59de8373ba93559d200495e35d8f94ae", "score": "0.55369973", "text": "private function __construct() {\n\t\tself::$instance = new PDO( strings::DATABASE_CLASS__DATABASE_INFO, strings::DATABASE_CLASS__DATABASE_USER, strings::DATABASE_CLASS__DATABASE_PASSWORD );\n\t\tself::$instance->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n self::$instance->exec(\"set names utf8\");\n\t}", "title": "" }, { "docid": "47a12154a4a1adc0c1e927be357c2fc6", "score": "0.55366516", "text": "function __construct($config = array()) {\n\t\t$dsn = \"mysql:host=\" . $config ['server'] . \";\" . \"dbname=\" . $config ['dbname'];\n\t\t$this->db = new PDO ( $dsn, $config ['username'], $config ['password'], array (\n\t\t\t\tPDO::ATTR_PERSISTENT => true \n\t\t) );\n\t}", "title": "" }, { "docid": "61af6ea8a5a15a6721fd02ac2b30f20d", "score": "0.5533439", "text": "private function __construct($dbConfig)\n {\n try {\n if ($dbConfig['options']) {\n self::$_instance = new PDO($dbConfig['dsn'], $dbConfig['user'], $dbConfig['pass'], $dbConfig['options']);\n } else {\n self::$_instance = new PDO($dbConfig['dsn'], $dbConfig['user'], $dbConfig['pass']);\n }\n self::$_instance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $ex) {\n echo 'There is a problem with your database connection';\n Logger::add($ex->getMessage(), Logger::LEVEL_CRITICAL);\n die();\n }\n }", "title": "" }, { "docid": "af58550208de96df68bc95467e5fe503", "score": "0.55267674", "text": "public function __construct()\n {\n // Set DSN\n $dsn = 'mysql:host=' . $this->host . ';dbname=' . $this->dbname;\n // Set options\n $options = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"\n );\n // Create a new PDO instanace\n try{\n $this->dbh = new PDO($dsn, $this->user, $this->pass, $options);\n }\n // Catch any errors\n catch(PDOException $e){\n $this->error = $e->getMessage();\n }\n }", "title": "" }, { "docid": "65e955c09073bf59ee3e5da16950fdd3", "score": "0.5524941", "text": "function __construct()\r\n {\r\n //This part checks if the connection was successful\r\n //Its commented out because it sends a header creating a problem\r\n //for sessions\r\n /*try{\r\n //Create a new PDO connection\r\n $this->_dbh = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n echo \"Connected\";\r\n }catch (PDOException $e){\r\n echo $e->getMessage();\r\n }*/\r\n $this->_db = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);\r\n }", "title": "" }, { "docid": "7113a85a86dafb90b8859058f8f6406a", "score": "0.55121547", "text": "function __construct(){\n $pdo = new pdo_connection();\n $this->conn = $pdo->conn;\n\n}", "title": "" }, { "docid": "bd754037d6ffdc599e6cc15e3b9faa22", "score": "0.55042464", "text": "public static function make()\n {\n try {\n return new PDO(\n 'mysql:host=' .\n env('DATABASE_HOST') . ';dbname=' . env('DATABASE_NAME'),\n env('DATABASE_USER'),\n env('DATABASE_PASS'),\n [\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_ORACLE_NULLS => PDO::NULL_EMPTY_STRING\n ]\n );\n } catch (PDOException $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "2141650d5436c05ec2230eeac50b42b0", "score": "0.5496389", "text": "private function connection () {\n $this->db = new PDO('mysql:host=localhost;dbname=charityPets;charset=utf8', 'hassan', 'sharigan60');\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n }", "title": "" }, { "docid": "cebc9b1b165e567550d6a3c7246825a7", "score": "0.5493229", "text": "private function getPDOConnection() {\n // Check if the connection is already established\n if ($this->db == NULL) {\n // Create the connection\n $dsn = \"\" .\n $this->config['driver'] .\n \":host=\" . $this->config['host'] .\n \";dbname=\" . $this->config['dbname'];\n try {\n $this->db = new PDO( $dsn, $this->config[ 'username' ], $this->config[ 'password' ] );\n } catch( PDOException $e ) {\n echo __LINE__.$e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "18d222e6d72871e4c54c35e47baecfd1", "score": "0.5487403", "text": "public function __construct() {\n\t\t// apre la connessione \n\t\t$connectionString = sprintf(\"mysql:host=%s;dbname=%s\", DB_HOST, DB_NAME);\n\t\ttry {\n\t\t\t$this -> conn = new PDO($connectionString, DB_USER, DB_PASSWORD);\n\n\t\t} catch (PDOException $pe) {\n\t\t\tdie($pe -> getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "60199b230434d78863a7da3b85605f6c", "score": "0.5485812", "text": "public function __construct($dsn, $username='', $password='', $driver_options=array()) {\n set_exception_handler(array(__CLASS__, 'exception_handler'));\n\n // . . . create a PDO object\n parent::__construct($dsn, $username, $password, $driver_options);\n\n // Change the exception handler back to whatever it was before\n restore_exception_handler();\n }", "title": "" }, { "docid": "2c1711f661da2a6083b2471190d0f94e", "score": "0.5484036", "text": "public static function getInstance():PDO\n { if(self::$instance === null){\n \n // no new PDO creo una nuova istanza\n self::$instance = new PDO(\"mysql:host=\".Config::DB_HOST.\";dbname=\".Config::DB_NAME,Config::DB_USER,Config::DB_PASSWORD); \n return self::$instance;\n \n }else{\n \n // si return PDO restituisco quella che ho creato prima\n return self::$instance;\n }\n\n\n }", "title": "" } ]
aca0b3487f6d7926f2cc8892de9c0f00
Register each of the asset (enqueues it)
[ { "docid": "64cfe3b41e8c3714ea64348e0f408dc3", "score": "0.0", "text": "public function register() {\n\t}", "title": "" } ]
[ { "docid": "bae258c2e102512ab95f95049920f1c3", "score": "0.75713134", "text": "public function registerAssets()\n {\n foreach (array_merge($this->assets, $this->getTheme()->assets) as $asset) {\n /** @var AssetBundle $asset */\n $asset::register($this->getView());\n }\n }", "title": "" }, { "docid": "02adf5dd7f75109de52e8b52db2413b5", "score": "0.742074", "text": "public function register_assets() {\n\n\t\t// Register assets.\n\t\t$this->register_front();\n\n\t\t// Enqueue front assets.\n\t\t$this->enqueue_front();\n\n\t\t/**\n\t\t * Action hook to execute after registering plugin assets.\n\t\t *\n\t\t * @since 3.2.0\n\t\t */\n\t\tdo_action( 'beehive_register_assets' );\n\t}", "title": "" }, { "docid": "58c8cf86422314ce4d1feb6c43ca674d", "score": "0.7412894", "text": "public function register_assets() {\n\t\tforeach ( $this->assets as $asset ) {\n\t\t\t$js_path = $this->plugin->dir() . '/js/dist/' . $asset . '.asset.php';\n\t\t\t$css_path = $this->plugin->dir() . '/css/' . $asset . '.css';\n\t\t\tif ( file_exists( $js_path ) ) {\n\t\t\t\t$assets_dep = require_once $js_path;\n\t\t\t\twp_register_script(\n\t\t\t\t\t'formation-' . $asset . '-js',\n\t\t\t\t\t$this->plugin->asset_url( 'js/dist/' . $asset . '.js' ),\n\t\t\t\t\t$assets_dep['dependencies'],\n\t\t\t\t\t$assets_dep['version'],\n\t\t\t\t\tfalse\n\t\t\t\t);\n\n\t\t\t\tif ( file_exists( $css_path ) ) {\n\t\t\t\t\twp_register_style(\n\t\t\t\t\t\t'formation-' . $asset . '-css',\n\t\t\t\t\t\t$this->plugin->asset_url( 'css/' . $asset . '.css' ),\n\t\t\t\t\t\tnull,\n\t\t\t\t\t\t$assets_dep['version']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b8f187f9cee3f5dde944095bfd10d973", "score": "0.7301504", "text": "public function registerAssets()\n {\n Asset::register($this->getView());\n }", "title": "" }, { "docid": "4a4f49fbf57de767699c043729cc8282", "score": "0.71431965", "text": "private function init_asset_loader() : void {\n\t\tforeach ( $this->get_theme_assets() as $asset_type => $assets ) {\n\n\t\t\tforeach ( $assets as $asset ) {\n\t\t\t\t$href = $this->root['uri'] . $asset['path'];\n\t\t\t\t$file_time = filemtime( $this->root['dir'] . $asset['path'] );\n\t\t\t\t$crossorigin = ( array_key_exists( 'crossorigin', $asset ) && ( true === $asset['crossorigin'] ) );\n\t\t\t\t$resource_attributes = [$asset['resource_hint'], $asset['mime'], $href, $asset_type, $crossorigin];\n\n\t\t\t\tswitch ( $asset_type ) {\n\t\t\t\t\tcase 'style':\n\t\t\t\t\t\tif ( 'preload' === $asset['resource_hint'] ) {\n\t\t\t\t\t\t\twp_register_style($asset['name'], $href, false, $file_time);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->registered_styles[ $asset['name'] ] = $resource_attributes;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'script':\n\t\t\t\t\t\t$this->registered_scripts[ $asset['name'] ] = $resource_attributes;\n\t\t\t\t\t\twp_register_script( $asset['name'], $href, [], $file_time, false );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3849f1dee02d301973842e17d1ee6c1a", "score": "0.7058624", "text": "public function assets() {\n\n\t\t$stylesheets = include 'inc/ir73-stylesheets.php';\n\t\t$scripts = include 'inc/ir73-scripts.php';\n\n\t\t$assets = new IR73_Assets( $stylesheets, $scripts );\n\t\t$assets->enqueue();\n\n\t}", "title": "" }, { "docid": "08732546b5a9d48c19c0bc04995ec8cf", "score": "0.70122755", "text": "public static function register_assets() {\n\t\tdo_action( 'wponion/assets/register/before' );\n\t\twponion_localize();\n\n\t\tif ( is_version_lte( 'wordpress', '5.0' ) ) { //phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled\n\t\t\twp_register_script( 'lodash', 'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js', array(), '4.17.11', true );\n\t\t}\n\n\t\tself::cdn( 'script', self::$cdn_scripts );\n\t\tself::cdn( 'style', self::$cdn_styles );\n\t\tself::handle_assets( 'style', self::$icon_libs );\n\t\tself::handle_assets( 'script', self::$scripts );\n\t\tself::handle_assets( 'style', self::$styles );\n\n\t\tdo_action( 'wponion/assets/register/after' );\n\t}", "title": "" }, { "docid": "86ddcff14fceb890830ba07b5250bce8", "score": "0.6801432", "text": "public function register_assets () {\n $scripts = $this->get_scripts();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script[ 'deps' ]) ? $script[ 'deps' ] : false;\n\n wp_register_script( $handle, $script[ 'src' ], $deps, $script[ 'version' ], $script[ 'is_footer' ] );\n }\n \n $styles = $this->get_styles();\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style[ 'deps' ]) ? $style[ 'deps' ] : false;\n\n wp_register_style( $handle, $style[ 'src' ], $deps, $style[ 'version' ], $style[ 'is_footer' ] );\n }\n\n wp_localize_script( 'academy-contact-script', 'weDevsAcademy', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong !!', 'wedevs-academy' )\n ] );\n\n wp_localize_script( 'academy-admin-script', 'weDevsAcademy', [\n 'nonce' => wp_create_nonce( 'wd_ac-admin-nonce' ),\n 'confirm' => __( 'Are you sure to delete ?', 'wedevs-academy' ),\n 'error' => __( 'Something went wrong !!', 'wedevs-academy' )\n ] );\n }", "title": "" }, { "docid": "a39e4239a3632f218f3817ec22a1fdb6", "score": "0.6782253", "text": "function enqueue_assets(): void\n {\n /**\n * Creates instance of Enqueuer, passes it microtime by\n * default and converts it's type to string,\n * use `wp_get_theme()->get('Version')` instead of microtime\n * before going into production.\n */\n $enqueuer = new Enqueuer((string)microtime());\n\n /**\n * Let's deregister some scripts that the\n * WordPress is registering by default.\n */\n $enqueuer->deregister_scripts(['jquery', 'wp-embed']);\n \n /**\n * Adding stylesheets, fonts, scripts and other assets\n * to the enqueuer and then enqueueing them, call\n * inside `init` action hook.\n */\n $enqueuer\n ->add_style('font', 'https://fonts.googleapis.com/css2?family=Kumbh+Sans&display=swap')\n ->add_style('main', '/assets/styles/main.css')\n ->add_script('runtime', '/assets/scripts/runtime.js')\n ->add_script('vendors', '/assets/scripts/vendors.js')\n ->add_script('main', '/assets/scripts/main.js')\n ->enqueue();\n }", "title": "" }, { "docid": "9dadce5ddbcc9801c5bfd59940a7e198", "score": "0.6721689", "text": "public function registerAssets()\n {\n $view = $this->getView();\n TabsXAsset::registerBundle($view, $this->bsVersion);\n if ($this->printable) {\n $view->registerCss('@media print{.tab-content.printable > .tab-pane{display:block;opacity:1;}}');\n }\n $id = 'jQuery(\"#' . $this->containerOptions['id'] . '\")';\n $this->registerPlugin($this->pluginName, $id);\n if ($this->enableStickyTabs) {\n StickyTabsAsset::register($view);\n $opts = Json::encode($this->stickyTabsOptions);\n $id = 'jQuery(\"#' . $this->containerOptions['id'] . '>.nav\")';\n $view->registerJs(\"{$id}.stickyTabs({$opts});\");\n }\n }", "title": "" }, { "docid": "da787488ba4a51bc3b46b94677b41430", "score": "0.6711628", "text": "public static function registerAssets() {\n wp_enqueue_style( self::TEXT_DOMAIN . '-style', get_stylesheet_uri(), array(), date('Ymd') . 's1' );\n\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( self::TEXT_DOMAIN . '-plugins', get_template_directory_uri() . '/assets/js/vendor.js', array(), date('Ymd') . 's1', true );\n wp_enqueue_script( self::TEXT_DOMAIN . '-scripts', get_template_directory_uri() . '/assets/js/scripts.js', array(), date('Ymd') . 's1', true );\n\n wp_localize_script( self::TEXT_DOMAIN . '-scripts', 'wp_ajax', array('ajaxurl' => admin_url('admin-ajax.php')));\n }", "title": "" }, { "docid": "208675039ae5c3eb84108334d844ebb1", "score": "0.67002803", "text": "public function registerAssets()\n {\n $view = $this->getView();\n FileInputAsset::register($view);\n /*\n $view->registerJs('$(\".wrap-indicator\").popover({trigger: \"hover\"});');\n */\n foreach ($this->pluginOptions as $key => $value) {\n if (substr($key, 0, 2) === \"el\" && !($value instanceof JsExpression)) {\n $this->pluginOptions[$key] = new JsExpression($value);\n }\n }\n $this->registerPlugin('fileinput', '$(\"#' . $this->containerOptions['id'] . '\")');\n }", "title": "" }, { "docid": "f1660f6d4554fd6bb9c3a0f12711b245", "score": "0.669673", "text": "public function registerAssets()\n {\n $this->view = $this->getView();\n $this->view->registerJS($this->configJs, View::POS_HEAD);\n $this->view->registerCss($this->configCss);\n OSMapAsset::register($this->view);\n\n }", "title": "" }, { "docid": "e98fdab67d2bcb086b4cfc59a8302b4f", "score": "0.66868675", "text": "public function assets()\n {\n $styles = [\n 'css/blocks/' . $this->slug . '.css',\n 'styles/blocks/' . $this->slug . '.css',\n ];\n\n $scripts = [\n 'js/blocks/' . $this->slug . '.js',\n 'scripts/blocks/' . $this->slug . '.js',\n ];\n\n if (! empty($this->assets)) {\n foreach ($this->assets as $asset) {\n if (Str::endsWith($asset, '.css')) {\n $styles = Arr::prepend($styles, $asset);\n }\n\n if (Str::endsWith($asset, '.js')) {\n $scripts = Arr::prepend($scripts, $asset);\n }\n }\n }\n\n foreach ($styles as $style) {\n if (asset($style)->exists()) {\n wp_enqueue_style($this->namespace, asset($style)->uri(), false, null);\n }\n }\n\n foreach ($scripts as $script) {\n if (asset($script)->exists()) {\n wp_enqueue_script($this->namespace, asset($script)->uri(), null, null, true);\n }\n }\n }", "title": "" }, { "docid": "6e9aaa1648c086214e15dc5507fc082d", "score": "0.6635953", "text": "protected function enqueueAssets(): void\n {\n parent::enqueueAssets();\n\n if ($this->printWithTabs()) {\n $this->enqueueTabpanelAssets();\n }\n }", "title": "" }, { "docid": "4bc534653238be46ecd189042db7daa7", "score": "0.6597951", "text": "private function initAsset() {\r\n $this->register(new AssetServiceProvider(), array(\r\n 'assets.version' => ASSET_VERSION,\r\n 'assets.version_format' => 'version',\r\n 'assets.named_packages' => array(\r\n 'css' => array('version' => ASSET_CSS_VERSION, 'base_path' => ASSET_CSS_BASE_PATH),\r\n 'img' => array('version' => ASSET_IMG_VERSION, 'base_path' => ASSET_IMG_BASE_PATH),\r\n 'js' => array('version' => ASSET_JS_VERSION, 'base_path' => ASSET_JS_BASE_PATH),\r\n ),\r\n ));\r\n }", "title": "" }, { "docid": "b55e0c9033d02d7e4b02e509ccec6ba9", "score": "0.6596495", "text": "public function add_assets()\n\t{\n\t\t$this->enqueue_script();\n\t\t$this->enqueue_style();\n\t}", "title": "" }, { "docid": "90178bc61099d806dae25ec11f042bf7", "score": "0.6592756", "text": "public function attachAssets()\n {\n }", "title": "" }, { "docid": "2a0138f4763eb8f2f9868f1e35ce8f6c", "score": "0.65736973", "text": "public function assets() {\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );\n\t}", "title": "" }, { "docid": "77efcdc8307ab71470413af4e6645a17", "score": "0.6513477", "text": "protected function registerAssets()\n {\n $view = $this->getView();\n DateFormatterAsset::register($view);\n DateControlAsset::register($view);\n $pluginOptions = empty($this->pluginOptions) ? [] : $this->pluginOptions;\n $this->pluginOptions = ArrayHelper::merge(\n [\n 'idSave' => $this->saveOptions['id'],\n 'url' => $this->ajaxConversion ? Url::to($this->_module->convertAction) : '',\n 'type' => $this->type,\n 'saveFormat' => $this->saveFormat,\n 'dispFormat' => $this->displayFormat,\n 'saveTimezone' => $this->saveTimezone,\n 'dispTimezone' => $this->displayTimezone,\n 'asyncRequest' => $this->asyncRequest,\n ], $pluginOptions\n );\n $this->registerPlugin($this->pluginName);\n $pluginData = 'data-krajee-' . $this->pluginName;\n if (!empty($this->options[$pluginData])) {\n $this->widgetOptions['options'][$pluginData] = $this->options[$pluginData];\n }\n }", "title": "" }, { "docid": "26bcdee1bf4327308c86a24cf58ca435", "score": "0.6511594", "text": "public function processBundles(): void\n {\n $view = $this->getView();\n\n foreach (array_keys($view->assetBundles) as $name) {\n $this->registerAssetBundle($name);\n }\n }", "title": "" }, { "docid": "83d9ecf58df77496006e4fd2f9542802", "score": "0.6404697", "text": "public static function registerBackendAssets() {\n // $current_screen = get_current_screen();\n wp_enqueue_style( self::TEXT_DOMAIN . '-admin-style', get_template_directory_uri() . '/assets/css/gutenberg.css', array(), date('Ymd') . 'v1' );\n wp_enqueue_script( self::TEXT_DOMAIN . '-admin-scripts', get_template_directory_uri() . '/assets/js/gutenberg.js', array(), date('Ymd') . 'v2', true );\n }", "title": "" }, { "docid": "23cc8b3f7e8ccfcb86f162eb0598a21a", "score": "0.63958555", "text": "public function registerAssets()\n {\n $view = $this->getView();\n $targetId = $this->_id;\n $iconPickerId = $this->pickerOptions['id'];\n IconPickerAsset::register($this->view);\n $this->clientOptions = ArrayHelper::merge($this->clientOptions, [\n 'icon' => $this->_default,\n ]);\n $this->clientOptions = Json::encode($this->clientOptions);\n $js[] = <<<JS\n $(\"#{$iconPickerId}\").iconpicker({$this->clientOptions});\nJS;\n $callback = null;\n if (!empty($this->onSelectIconCallback)) {\n $callback = $this->onSelectIconCallback instanceof JsExpression\n ? $this->onSelectIconCallback->__toString()\n : $this->onSelectIconCallback;\n }\n $js[] = ($callback)\n ? <<<JS\n $(\"#{$iconPickerId}\").on('change', function(e) {\n var callback = {$callback};\n callback(e);\n });\nJS\n :\n <<<JS\n $(\"#{$iconPickerId}\").on('change', function(e) {\n $('#$targetId').val(e.icon);\n });\nJS;\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "66b8e4f9ca35d056f21536027e520f0f", "score": "0.63863623", "text": "function register_assets() {\r\n wp_register_style( 'pb-meta-box', plugins_url( '/assets/css/meta-box.css', __FILE__ ) );\r\n wp_register_script( 'pb-tabs', plugins_url( '/assets/js/tabs.js', __FILE__ ), array( 'jquery' ) );\r\n }", "title": "" }, { "docid": "58cdb24defe1e0ecb2ed4dd1cfd12ce4", "score": "0.63724655", "text": "public function register_admin_assets() {\n\n\t\t// Register admin assets.\n\t\t$this->register_settings_assets();\n\t\t$this->register_google_charts();\n\t\t$this->register_stats_assets();\n\t\t$this->register_dashboard_assets();\n\t\t$this->register_post_assets();\n\t\t$this->register_notice_assets();\n\n\t\t// Enqueue admin assets.\n\t\t$this->enqueue_admin();\n\n\t\t/**\n\t\t * Action hook to execute after registering plugin admin assets.\n\t\t *\n\t\t * @since 3.2.0\n\t\t */\n\t\tdo_action( 'beehive_register_admin_assets' );\n\t}", "title": "" }, { "docid": "c4ba36be9674588428ca84899539ef9f", "score": "0.6356047", "text": "public function registerAssets()\n {\n $view = $this->getView();\n DynamicFormAsset::register($view);\n $this->options['dynamicItems'] = $this->dynamicItems;\n $this->options['dynamicItem'] = $this->dynamicItem;\n $this->options['template'] = '#' . $this->templateID;\n $this->options['fields'] = [];\n foreach ($this->formFields as $field) {\n $this->options['fields'][] = [\n 'id' => Html::getInputId($this->model, '[{}]' . $field),\n 'name' => Html::getInputName($this->model, '[{}]' . $field)\n ];\n }\n $this->options['formId'] = $this->formId;\n $options = Json::encode($this->options);\n $view->registerJs('$(\"#' . $this->id . '\").yiiDynamicForm(' .$options .')');\n }", "title": "" }, { "docid": "66e21554974d1bae6a35e17ed7ddb9f0", "score": "0.63498086", "text": "public function registerAssets()\n {\n $view = $this->getView();\n CharsCounterInputWidgetAssets::register($view);\n \n $view->registerJs('CharsCounter.init();');\n }", "title": "" }, { "docid": "9469c10ca9c33800710b732faf827c0c", "score": "0.6319018", "text": "public function addAssets()\n {\n $this->setAssets( new Assets );\n\n $this->addCss('notfound');\n }", "title": "" }, { "docid": "be95631172add0dc810e5778aa34997a", "score": "0.62959176", "text": "public function register(): void\n\t{\n\t\t\\add_action('init', [$this, 'setAssetsManifestRaw']);\n\t\t\\add_filter(static::MANIFEST_ITEM, [$this, 'getAssetsManifestItem']);\n\t}", "title": "" }, { "docid": "f05bc71d81b83091e69d7690a1ece67a", "score": "0.6247431", "text": "protected function registerAssets()\n {\n $view = $this->getView();\n CommentListAsset::register($view);\n $script = \"\n $('#form-container').show();\n $('.comment-button').hide();\n \";\n $view->registerJs($script);\n }", "title": "" }, { "docid": "a661fa631a3ffa0413c67ba5b47481fc", "score": "0.62307435", "text": "function enqueue_assets() {\n $dirJS = new DirectoryIterator(FQP_SYSTEM_FRONT_APP_PATH );\n $dirCSS = new DirectoryIterator(FQP_SYSTEM_FRONT_APP_PATH );\n\n foreach ($dirJS as $file) {\n if (pathinfo($file, PATHINFO_EXTENSION) === 'js') {\n $fullName = basename($file);\n if(!mb_strpos($fullName, 'hot-update') && !mb_strpos($fullName, 'legacy')) {\n wp_enqueue_script($fullName, FQP_FRONT_APP_PATH. '/' . $fullName, false, '1.0.0', TRUE);\n }\n }\n }\n\n foreach ($dirCSS as $file) {\n if (pathinfo($file, PATHINFO_EXTENSION) === 'css') {\n $fullName = basename($file);\n wp_enqueue_style($fullName, FQP_FRONT_APP_PATH . '/' . $fullName);\n }\n }\n}", "title": "" }, { "docid": "b867232acbc53646c8ec17affea3095d", "score": "0.6229649", "text": "public function registerAssetFiles($view)\n {\n foreach ($this->js as $js) {\n if (strpos($js, '/') !== 0 && strpos($js, '://') === false) {\n $view->registerJsFile($this->baseUrl . '/' . $js, [], $this->jsOptions);\n } else {\n $view->registerJsFile($js, [], $this->jsOptions);\n }\n }\n foreach ($this->css as $css) {\n if (strpos($css, '/') !== 0 && strpos($css, '://') === false) {\n $view->registerCssFile($this->baseUrl . '/' . $css, [], $this->cssOptions);\n } else {\n $view->registerCssFile($css, [], $this->cssOptions);\n }\n }\n }", "title": "" }, { "docid": "2ca63dc0263e14bf6a351fdff4dd4263", "score": "0.6209856", "text": "function register_assets() {\n\n\t\t$styles = '/assets/css/jmfe.min.css';\n\t\t$vendor_styles = '/assets/css/vendor.min.css';\n\t\t$vendor_scripts = '/assets/js/vendor.min.js';\n\t\t$radio = '/assets/js/radio.min.js';\n\t\t$date = '/assets/js/date.min.js';\n\t\t$vendor_phone = '/assets/js/intlTelInput.min.js';\n\t\t$phone = '/assets/js/phone.min.js';\n\t\t$scripts = '/assets/js/jmfe.min.js';\n\t\t$scripts_version = WPJM_FIELD_EDITOR_VERSION;\n\n\t\tif ( defined( 'WPJMFE_DEBUG' ) ) {\n\n\t\t\t$styles = '/assets/css/build/jmfe.css';\n\t\t\t$vendor_styles = '/assets/css/build/vendor.css';\n\t\t\t$vendor_scripts = '/assets/js/build/vendor.js';\n\t\t\t$radio = '/assets/js/build/radio.js';\n\t\t\t$date = '/assets/js/build/date.js';\n\t\t\t$vendor_phone = '/assets/js/build/intlTelInput.js';\n\t\t\t$phone = '/assets/js/build/phone.js';\n\t\t\t$scripts = '/assets/js/build/jmfe.js';\n\t\t\t$scripts_version = filemtime( WPJM_FIELD_EDITOR_PLUGIN_DIR . $scripts );\n\n\t\t}\n\n\t\twp_register_style( 'jmfe-styles', WPJM_FIELD_EDITOR_PLUGIN_URL . $styles );\n\t\twp_register_style( 'jmfe-vendor-styles', WPJM_FIELD_EDITOR_PLUGIN_URL . $vendor_styles );\n\t\t// wp_register_style( 'jmfe-phone-field-style', WPJM_FIELD_EDITOR_PLUGIN_URL . '/assets/css/intlTelInput.min.css', array(), WPJM_FIELD_EDITOR_VERSION );\n\n\t\twp_register_script( 'jmfe-vendor-scripts', WPJM_FIELD_EDITOR_PLUGIN_URL . $vendor_scripts, array( 'jquery' ), $scripts_version, TRUE );\n\t\twp_register_script( 'jmfe-scripts', WPJM_FIELD_EDITOR_PLUGIN_URL . $scripts, array( 'jquery' ), $scripts_version, TRUE );\n\n\t\t$assets = WP_Job_Manager_Field_Editor_Assets::get_instance();\n\t\t$assets->register_assets();\n\t}", "title": "" }, { "docid": "32d258ba41ccfd27825a60d0f273a18d", "score": "0.6167844", "text": "function initialise(){\n\n $this->manager = new \\Reportico\\Assetter\\Assetter(new \\Requtize\\FreshFile\\FreshFile(__DIR__.\"/../\"));\n\n /*\n * Autoload assets from widgets folder\n */\n\n $files = glob(__DIR__.\"/widgets/*\");\n\n foreach ( $files as $file) {\n\n //echo \"$file<BR>\";\n $base = substr(basename($file), 0, -4);\n $load = true;\n if ( $base == \"DynamicGrid\" ) $load = false;\n if ( $base == \"SubmitExecute\" ) continue;\n if ( $base == \"Widget\" ) {\n continue;\n }\n $file = \"\\\\Reportico\\\\Widgets\\\\\".substr(basename($file), 0, -4);\n\n $widget = new $file($this->engine, $load);\n if ( $widget->name )\n $this->availableAssets[$widget->name] = $widget;\n\n }\n }", "title": "" }, { "docid": "4bf7bdde5e3210b171ad45d4ad99199c", "score": "0.61516744", "text": "function register_assets() {\n\n\t\t\twp_register_script(\n\t\t\t\t'ac',\n\t\t\t\tADMINCUSTOMIZER_URI . '/assets/dist/js/admin-customizer.min.js',\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\tdefined( 'WP_DEBUG' ) && WP_DEBUG ? time() : ADMINCUSTOMIZER_VER,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\twp_register_style(\n\t\t\t\t'ac',\n\t\t\t\tADMINCUSTOMIZER_URI . '/assets/dist/css/admin-customizer.min.css',\n\t\t\t\tarray(),\n\t\t\t\tdefined( 'WP_DEBUG' ) && WP_DEBUG ? time() : ADMINCUSTOMIZER_VER\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "7daa828c71f43e7bb0e8f02a48581318", "score": "0.6132498", "text": "public function register()\n {\n $paths = Config::getPaths();\n // type ( js || css), id, path\n Assets::addToFooter('js', 'typerocket-jquery', $paths['urls']['js'] . '/jquery-3.1.1.min.js');\n // Assets::addToFooter('js', 'typerocket-core', $paths['urls']['js'] . '/typerocket.js');\n Assets::addToHead('js', 'typerocket-global', $paths['urls']['js'] . '/global.js');\n Assets::addToHead('css', 'typerocket-core', $paths['urls']['css'] . '/typerocket.css');\n\n if (config('typerocket.media.unsplash.enabled')) {\n Assets::addToFooter('js', 'typerocket-unsplash', $paths['urls']['js'] . '/unsplash.js');\n }\n }", "title": "" }, { "docid": "b2105b650bb6664493a507141db6a1d6", "score": "0.6127392", "text": "public function processAssets();", "title": "" }, { "docid": "8e745f44acd51a1c2bd86a8219fc6405", "score": "0.6109522", "text": "private function registerResources()\n {\n $this->registerFacades();\n /* $this->registerRoutes(); */\n }", "title": "" }, { "docid": "e08727de186bbf2da803f3619929a697", "score": "0.61093456", "text": "protected function syncAssets()\n {\n try {\n $assets = $this->api->syncInitial('Asset');\n while (! empty($assets)) {\n $this->saveAssets($assets);\n $assets = $this->api->syncNext();\n }\n } catch (GuzzleException $e) {\n $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "eb4bbef78e74465f2908b9fbbdfe39f0", "score": "0.6102832", "text": "protected function registerAssetBundle() {\n $view = $this->getView();\n $js = '';\n $js .= \"var player_\" . $this->_idElement .\";\";\n $view->registerJs($js, 1);\n $script = '';\n if(!isset($this->view->js[self::POS_JS][self::ID_JS])) {\n $script .= self::START_JS . $this->generateJs($this->_idElement);\n $script .= \"}\";\n } else {\n $script = $this->addJs($this->generateJs($this->_idElement));\n }\n $view->registerJs($script, self::POS_JS, self::ID_JS);\n }", "title": "" }, { "docid": "c687c5dcd878fbd7cc0ec4478a7dc0f8", "score": "0.60946673", "text": "public function assetAction()\n {\n foreach (array('css', 'js') as $asset) {\n foreach ($iterator = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator(ROOT_PATH . '/public/' . $asset, \\RecursiveDirectoryIterator::SKIP_DOTS), \\RecursiveIteratorIterator::SELF_FIRST) as $item) {\n if (!$item->isDir() && ($item->getExtension() == 'css' || $item->getExtension() == 'js')) {\n $subPath = $iterator->getSubPathName();\n $dir = strstr($subPath, $item->getFilename(), true);\n $add = 'add' . ucfirst($asset);\n $this->assets->$add($asset . '/' . $dir . $item->getFilename());\n }\n }\n }\n\n // Minify css and js collection\n \\Baseapp\\Library\\Tool::assetsMinification();\n }", "title": "" }, { "docid": "f6a80b870ee85a51d5587b55f0009754", "score": "0.6077899", "text": "public function load_resources() {\n\t\t\t\n\t\t\tforeach ( $this->styles as $style ) {\n\t\t\t\tif ( is_admin() && $style['scope'] == ( 'admin' || 'shared' ) ) {\n\t\t\t\t\tif ( ! wp_style_is( $style['handle'], 'enqueued' ) ) {\n\t\t\t\t\t\t$this->register_style( $style );\n\t\t\t\t\t\twp_enqueue_style( $style['handle'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! is_admin() && $style['scope'] == ( 'frontend' || 'shared' ) ) {\n\t\t\t\t\tif ( ! wp_style_is( $style['handle'], 'enqueued' ) ) {\n\t\t\t\t\t\t$this->register_style( $style );\n\t\t\t\t\t\twp_enqueue_style( $style['handle'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ( $this->scripts as $script ) {\n\t\t\t\tif ( is_admin() && $script['scope'] == ( 'admin' || 'shared' ) ) {\n\t\t\t\t\tif ( ! wp_script_is( $script['handle'], 'enqueued' ) ) {\n\t\t\t\t\t\t$this->register_script( $script );\n\t\t\t\t\t\twp_enqueue_script( $script['handle'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ( ! is_admin() && $script['scope'] == ( 'frontend' || 'shared' ) ) {\n\t\t\t\t\tif ( ! wp_script_is( $script['handle'], 'enqueued' ) ) {\n\t\t\t\t\t\t$this->register_script( $script );\n\t\t\t\t\t\twp_enqueue_script( $script['handle'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5e8035017216a948286b7033331dcaf2", "score": "0.60700494", "text": "public function enqueue_assets()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "5562a799c631e761e45b13513fae90cf", "score": "0.60581815", "text": "public function register_assets() {\n\t\twp_register_script( 'itsec-pwls-login-modal', plugin_dir_url( __FILE__ ) . 'js/modal.js', [ 'jquery' ] );\n\t\twp_register_style( 'itsec-pwls-login-modal', plugin_dir_url( __FILE__ ) . 'css/modal.css' );\n\t}", "title": "" }, { "docid": "83b20c50bce7a0a4ea2f772e795109ae", "score": "0.6048992", "text": "public function loadResources()\n {\n $plugins = $this->pluginManager->getPlugins();\n\n foreach ($plugins as $id => $plugin) {\n if(!method_exists($plugin, 'registerAPIResources')) {\n continue;\n }\n\n $resources = $plugin->registerAPIResources();\n if (!is_array($resources)) {\n continue;\n }\n\n\n $this->registerResources($resources);\n }\n }", "title": "" }, { "docid": "485eda24f6c52019cc3a378c5e2b0134", "score": "0.6034888", "text": "protected function registerAsset(): void\n {\n $this->app->singleton('orchestra.asset', static function (Container $app) {\n /** @var \\Orchestra\\Asset\\Dispatcher $dispatcher */\n $dispatcher = $app->make('orchestra.asset.dispatcher');\n\n return new Factory($app->make('orchestra.asset.dispatcher'));\n });\n }", "title": "" }, { "docid": "e93d65921dc99a91cd536017f67865ab", "score": "0.60300565", "text": "public function enqueue_assets(){\n\n\t\twp_enqueue_style( 'jmfe-styles' );\n\t\twp_enqueue_style( 'jmfe-vendor-styles' );\n\t\twp_enqueue_script( 'jmfe-vendor-scripts' );\n\t\twp_enqueue_script( 'jmfe-scripts' );\n\n\t}", "title": "" }, { "docid": "34575aacbcb5f2c06cebda58526b059c", "score": "0.60255516", "text": "public function register() {\n // Scripts\n $scripts = $this->get_scripts();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, ! empty( $script['version'] ) ? $script['version'] : false, true );\n\n }\n\n // Styles\n $styles = $this->get_styles();\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, ! empty( $style['version'] ) ? $style['version'] : false );\n }\n\n // Localization\n $localize = $this->get_localize();\n\n foreach ( $localize as $handle => $vars ) {\n wp_localize_script( $handle, 'comparrot', $vars );\n }\n }", "title": "" }, { "docid": "810ddedc70f063306fbb8ede72907604", "score": "0.6018496", "text": "private function publishAssets(){\n\t\t$cs = Yii::app()->clientScript;\n\t\t$assetsPath = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'resources');\n\t\t\n\t\t$cs->registerCssFile($assetsPath . '/css/' . ($this->debug ? 'jquery.ibutton.css' : 'jquery.ibutton.min.css'));\n\t\t\n\t\t//register the Yii's built in Metadata jQuery plugin\n\t\tif($this->useJqueryMetadata)\n\t\t\t$cs->registerCoreScript('metadata');\n\t\t\n\t\t//register the easing plugin\n\t\tif($this->useJqueryEasing)\n\t\t\t$cs->registerScriptFile($assetsPath . '/lib/' . 'jquery.easing.1.3.js');\n\t\t\n\t\t$cs->registerScriptFile($assetsPath . '/lib/' . ($this->debug ? 'jquery.ibutton.js' : 'jquery.ibutton.min.js') , CClientScript::POS_END);\n\t}", "title": "" }, { "docid": "6d71ffd221623150f7c0fe63ef5ebedb", "score": "0.60107994", "text": "protected function register_assets() {\n wp_register_script(\n 'rai-settings',\n $this->get_js_url( 'settings.js' ),\n [ 'jquery' ],\n $this->get_config( 'version' ),\n false\n );\n\n wp_localize_script(\n 'rai-settings', 'rai_settings', [\n 'linkedin_auth_button_id' => $this->get_config( 'linkedin_auth_button_id' ),\n 'linkedin_auth_key_url_param_name' => $this->get_config( 'linkedin_auth_key_url_param_name' ),\n 'linkedin_client_id' => $this->get_config( 'linkedin_api_key' ),\n 'linkedin_auth_url' => $this->get_config( 'linkedin_auth_url' ),\n 'linkedin_auth_state' => $this->get_config( 'linkedin_authorization_nonce' ),\n 'unlink_url_param_name' => $this->get_config( 'linkedin_unlink_key' ),\n 'unlink_url_param_value' => $this->get_config( 'linkedin_unlink_value' ),\n ]\n );\n\t}", "title": "" }, { "docid": "f6e2cf89989c1327339246dccdd5d955", "score": "0.6006985", "text": "public function wp_enqueue_assets() {\r\n\t\r\n\t}", "title": "" }, { "docid": "bdaa882754fb76680ea22e1400b14deb", "score": "0.5990222", "text": "public static function assets(array $assets) {\n\t\t$addAssets = function () use ($assets) {\n\t\t\tif (!is_admin()) {\n\t\t\t\t$defaults = array(\n\t\t\t\t\t'do' => 'register',\n\t\t\t\t\t'type' => 'script',\n\t\t\t\t\t'in_footer' => false,\n\t\t\t\t\t'deps' => array(),\n\t\t\t\t\t'version' => false,\n\t\t\t\t\t'media' => 'all',\n\t\t\t\t\t'fallback' => false\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tforeach($assets as $asset) {\t\t\t\t\t\n\t\t\t\t\t$asset = wp_parse_args( $asset, $defaults );\n\t\t\t\t\t\n\t\t\t\t\tif ( $asset['fallback'] && ! @fopen( $asset['src'], 'r' ) ) {\n\t\t\t\t\t\t$asset['src'] = $asset['fallback'];\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($asset['type'] == 'script') {\n\t\t\t\t\t\tif ($asset['do'] == 'enqueue') {\n\t\t\t\t\t\t\twp_enqueue_script( $asset['handle'], $asset['src'], $asset['deps'], $asset['version'], $asset['in_footer'] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twp_register_script( $asset['handle'], $asset['src'], $asset['deps'], $asset['version'], $asset['in_footer'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($asset['do'] == 'enqueue') {\n\t\t\t\t\t\t\twp_enqueue_style( $asset['handle'], $asset['src'], $asset['deps'], $asset['version'], $asset['media'] );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twp_register_style( $asset['handle'], $asset['src'], $asset['deps'], $asset['version'], $asset['media'] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twp_deregister_script( 'jquery' ); // deregisters the default WordPress jQuery\n\t\t\t\t\n\t\t\t\t$jquery_url = 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js';\n\t\t\t\t\n\t\t\t\tif ( @fopen($jquery_url, 'r') ) {\n\t\t\t\t\twp_enqueue_script( 'jquery', $jquery_url, false, '1.8.2', true ); // register the external file\n\t\t\t\t} else {\n\t\t\t\t\twp_enqueue_script( 'jquery', get_bloginfo('template_url') . '/assets/js/libs/jquery.js', false, '1.8.2', true );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\t\n\t\tadd_action('wp_enqueue_scripts', $addAssets, 999);\n\t}", "title": "" }, { "docid": "e21d54b3c7decb6a542bdb5b5808f859", "score": "0.598486", "text": "public function enqueue_assets( Assets $assets ) {\n\t\t// Enqueue fonts.\n\t\t$assets->enqueue_fonts();\n\n\t\t// Enqueue base admin screen stylesheet.\n\t\t$assets->enqueue_asset( 'googlesitekit-admin-css' );\n\n\t\t// Helps detection of enabled ad blockers to warn users before activating or setup AdSense module.\n\t\tif ( $this->is_ad_blocker_detection_required() ) {\n\t\t\t$assets->enqueue_asset( 'googlesitekit-ads-detect' );\n\t\t}\n\n\t\tif ( $this->args['enqueue_callback'] ) {\n\t\t\tcall_user_func( $this->args['enqueue_callback'], $assets );\n\t\t}\n\t}", "title": "" }, { "docid": "3d6a83d8e5139bfd3a01960b9860d6e1", "score": "0.5984496", "text": "public function enqueue_assets() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'cherry-interface-builder',\n\t\t\t\tesc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.js', __FILE__ ) ),\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\t$this->module_version,\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_enqueue_style(\n\t\t\t\t'cherry-interface-builder',\n\t\t\t\tesc_url( Cherry_Core::base_url( 'inc/assets/min/cherry-interface-builder.min.css', __FILE__ ) ),\n\t\t\t\tarray(),\n\t\t\t\t$this->module_version,\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "977b6a5fde621de0b935003982ea8df5", "score": "0.5980502", "text": "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addYiiGemsCommonCss();\n $this->assetsInfo[] = array(\n 'name' => \"button.css\",\n 'assetDir' => dirname(__FILE__) . \"/assets/common\"\n );\n if ($this->shadowName) {\n $this->addAssetInfo(\n GradientUtil::getCssFileForAquaShadow($this->shadowName), \n GradientUtil::getAquaShadowAssetDir($this->shadowName)\n );\n }\n }", "title": "" }, { "docid": "cc3d46064fe06758df89bd91e46ae63d", "score": "0.5976332", "text": "function enqueue_assets() {\n\n\t\t\t/**\n\t\t\t * Filter all localization data.\n\t\t\t *\n\t\t\t * @since 0.1.0\n\t\t\t */\n\t\t\t$data = apply_filters( 'ac_script_data', $this->script_data );\n\t\t\twp_localize_script( 'ac', 'AC', $data );\n\n\t\t\twp_enqueue_script( 'ac' );\n\t\t\twp_enqueue_style( 'ac' );\n\t\t}", "title": "" }, { "docid": "42962013d2f2886d3aec75445ebb7b1f", "score": "0.59728914", "text": "private function register_enqueues () {\n\t \t\t\n\t \t\t// Enqueue scripts and styles for the administration area\n\t \t\tadd_action( 'admin_print_scripts', array( &$this, 'admin_enqueue_script' ), null, 2 );\n\t \t\tadd_action( 'admin_print_styles', array( &$this, 'admin_enqueue_style' ), null, 2 );\n\t \t\t\n\t \t\t// Enqueue scripts and styles for the frontend\n\t \t\tadd_action( 'wp_print_scripts', array( &$this, 'enqueue_script' ), null, 2 );\n\t \t\tadd_action( 'wp_print_styles', array( &$this, 'enqueue_style' ), null, 2 );\n\t \t\n\t \t}", "title": "" }, { "docid": "7fb9dc3b42790caaf7ace1517530bdbf", "score": "0.5962868", "text": "protected static function handle_assets( $type, $data ) {\n\t\tforeach ( $data as $key => $src ) {\n\t\t\tself::regiser_asset( $type, $src, $key );\n\t\t}\n\t}", "title": "" }, { "docid": "0a94cf70ae87daabafe466bf1c099145", "score": "0.5953869", "text": "protected function loadResources()\n\t{\n\t\tif ( $this->hasValues($this->resources) ) {\n\t\t\tarray_walk($this->resources, [$this, 'register']);\n\t\t}\n\t}", "title": "" }, { "docid": "e40118ce4d596ba1b028868e039606d2", "score": "0.59534293", "text": "public function registerAssets()\n {\n if ($this->disabled) {\n return;\n }\n $view = $this->getView();\n $view->registerJs('jQuery.fn.kvDatepicker.dates={};');\n if (!empty($this->_langFile)) {\n DatePickerAsset::registerBundle($view, $this->bsVersion)->js[] = $this->_langFile;\n } else {\n DatePickerAsset::registerBundle($view, $this->bsVersion);\n }\n $id = $this->options['id'];\n $el = \"jQuery('#\" . $this->options['data-datepicker-source'] . \"')\";\n $this->registerPlugin($this->pluginName, $el);\n if ($this->_hasAddon && $this->removeButton !== false) {\n $view->registerJs(\"initDPRemove('{$id}');\");\n }\n if ($this->_hasAddon) {\n $view->registerJs(\"initDPAddon('{$id}');\");\n }\n if ($this->type === self::TYPE_RANGE) {\n FieldRangeAsset::register($view);\n $view->registerJs(\"initDPRemove('{$id}', true);\");\n }\n }", "title": "" }, { "docid": "3b6abbc1cca594769d5ddf9a50ea7a17", "score": "0.5907413", "text": "public function init() {\n parent::init();\n\t\t$this -> publishAssets();\n\n }", "title": "" }, { "docid": "7cfe3ef2973cfde4b452f1ccd60dd446", "score": "0.5891597", "text": "public function registerBootstrap3CoreAssets()\n {\n\n //bootstrap css\n (app()->params['bootswatch3_skin'] == \"none\") ?\n cs()->registerCssFile(bu() . '/libs/bootstrap/dist/css/bootstrap.min.css') :\n cs()->registerCssFile(bu() . '/libs/bootswatch/' . app()->params['bootswatch3_skin'] . '/bootstrap.min.css');\n\n //bootstrap js\n cs()->registerScriptFile(bu() . '/libs/bootstrap/dist/js/bootstrap.min.js', CClientScript::POS_END);\n }", "title": "" }, { "docid": "af613e15e2c703ba1f4d14d766fadf10", "score": "0.58846277", "text": "private function _loadAssets() {\n//\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'loadFrontCSS' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'loadAdminCSS' ) );\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'loadAdminJS' ) );\n\t}", "title": "" }, { "docid": "1de3a59b38f58637e1be442e698a87a5", "score": "0.5881879", "text": "public function register()\n {\n $this->assetManager->callServices();\n\n $this->registerStyles();\n $this->registerScripts();\n }", "title": "" }, { "docid": "6a3e80ee30d6960884e936a0e859b85f", "score": "0.58614564", "text": "protected function createAssets()\n {\n $path = $this->rootPath . '/app/assets';\n\n $directories = array(\n '/javascript/frontend',\n '/javascript/backend',\n '/javascript/globals',\n '/stylesheets/frontend',\n '/stylesheets/backend',\n '/stylesheets/globals',\n );\n\n foreach($directories as $directory)\n {\n $this->directoryCreator($path . $directory);\n }\n\n $this->createAssetFiles($path);\n\n $this->info('created asset structures');\n }", "title": "" }, { "docid": "7669aa888176fc5c3483012e70276f55", "score": "0.58474576", "text": "public function load_assets() {\n\n $this->load_css();\n\n $this->load_js();\n\n }", "title": "" }, { "docid": "be2462e08c58da952180dfba0c354d26", "score": "0.584167", "text": "public function register_all() {\n\n\t\tforeach ( $this->config as $config ) {\n\t\t\t$config = wp_parse_args( $config, $this->get_default_structure() );\n\n\t\t\tif ( isset( $config['deregister'] ) ) {\n\t\t\t\t$this->deregister( $config['handle'] );\n\t\t\t}\n\n\t\t\tif ( isset( $config['pre_register'] ) ) {\n\t\t\t\t$this->pre_register( $config );\n\t\t\t\tcontinue; // <- This will continue and it wont load the localized object.\n\t\t\t}\n\n\t\t\tif ( $this->is_load_on( $config ) ) {\n\t\t\t\t$this->enqueue( $config );\n\t\t\t}\n\n\t\t\tif ( empty( $config['localize'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( is_array( $config['localize'] ) ) {\n\t\t\t\t$this->localize_script( $config );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "93cf316724258a9aa5c58a6418c3a436", "score": "0.58341986", "text": "public function load_assets() {\n\t\tadd_action( \"load-{$this->pagehook}\", array( $this, 'assets' ) );\n\t}", "title": "" }, { "docid": "a7ce7c13fee2763f3b39452fc16102cf", "score": "0.58289295", "text": "public function load_assets(){\n $load_scripts = false;\n $screen = get_current_screen();\n\n foreach( self::$xboxs as $xbox ){\n if( is_a( $xbox, 'Xbox\\Includes\\Metabox' ) ){\n if( in_array( $screen->post_type, (array) $xbox->arg( 'post_types' ) ) ){\n $load_scripts = true;\n }\n } else{\n if( false !== stripos( $screen->id, $xbox->id ) ){\n $load_scripts = true;\n }\n }\n }\n //Los scripts también se incluyen en la lista de cada post_type, para futuras características\n\n if( $load_scripts ){\n new AssetsLoader( $this->version );\n }\n }", "title": "" }, { "docid": "f2b21444feb812ecfb84fc0be45dc653", "score": "0.58278614", "text": "public function enqueue() {\n\t\tkirki_controls()->scripts()->enqueue_control_assets( $this->type );\n\t}", "title": "" }, { "docid": "3b08fceb5b09c710677ea9b43a61ac31", "score": "0.58219516", "text": "public function registerAssets()\n {\n $view = $this->getView();\n TreeViewAsset::register($view);\n if ($this->_hasBootstrap && $this->autoLoadBsPlugin) {\n BootstrapPluginAsset::register($view);\n }\n $this->pluginOptions += [\n 'treeId' => $this->treeOptions['id'],\n 'detailId' => $this->detailOptions['id'],\n 'toolbarId' => $this->toolbarOptions['id'],\n 'wrapperId' => $this->treeWrapperOptions['id'],\n 'actions' => $this->nodeActions,\n 'modelClass' => $this->query->modelClass,\n 'formAction' => $this->nodeActions[Module::NODE_SAVE],\n 'formOptions' => $this->nodeFormOptions,\n 'currUrl' => Yii::$app->request->url,\n 'messages' => $this->clientMessages,\n 'alertFadeDuration' => $this->alertFadeDuration,\n 'enableCache' => ArrayHelper::getValue($this->cacheSettings, 'enableCache', true),\n 'cacheTimeout' => ArrayHelper::getValue($this->cacheSettings, 'cacheTimeout', 300000),\n 'showTooltips' => $this->showTooltips,\n 'isAdmin' => $this->isAdmin,\n 'showInactive' => $this->showInactive,\n 'softDelete' => $this->softDelete,\n 'iconsList' => $this->_iconsList,\n 'showFormButtons' => $this->showFormButtons,\n 'showIDAttribute' => $this->showIDAttribute,\n 'nodeView' => $this->nodeView,\n 'nodeAddlViews' => $this->nodeAddlViews,\n 'nodeSelected' => $this->_nodeSelected,\n 'breadcrumbs' => $this->breadcrumbs,\n 'multiple' => $this->multiple,\n 'allowNewRoots' => $this->allowNewRoots\n ];\n $this->registerPlugin('treeview');\n }", "title": "" }, { "docid": "f9a006b1352bea5aa3273730b9902e86", "score": "0.58210295", "text": "public static function enqueue_assets() {\n\t\t\twp_enqueue_script(\n\t\t\t\t'ui-select-select2',\n\t\t\t\tself::get_current_file_url() . '/assets/select2.js',\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\t'0.2.9',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_enqueue_script(\n\t\t\t\t'ui-select-min',\n\t\t\t\tself::get_current_file_url() . '/assets/min/ui-select.min.js',\n\t\t\t\tarray( 'jquery' ),\n\t\t\t\t'1.0.0',\n\t\t\t\ttrue\n\t\t\t);\n\t\t\twp_enqueue_style(\n\t\t\t\t'ui-select-select2',\n\t\t\t\tself::get_current_file_url() . '/assets/select2.css',\n\t\t\t\tarray(),\n\t\t\t\t'0.2.9',\n\t\t\t\t'all'\n\t\t\t);\n\t\t\twp_enqueue_style(\n\t\t\t\t'ui-select-min',\n\t\t\t\tself::get_current_file_url() . '/assets/min/ui-select.min.css',\n\t\t\t\tarray(),\n\t\t\t\t'1.0.0',\n\t\t\t\t'all'\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "01601bb06b1ddd61f75bb016ec17238d", "score": "0.5820501", "text": "public function registerAssetBundle($name);", "title": "" }, { "docid": "62dcc80a3d9241c90212ab39424d4b27", "score": "0.58126795", "text": "public function register()\n {\n\n CombineAssets::registerCallback(function ($combiner) {\n $combiner->registerBundle('$/waka/crsm/assets/css/simple_grid/simple-table.less');\n });\n\n }", "title": "" }, { "docid": "a18b07e28e482f57ca8f6cdb846cb183", "score": "0.5811493", "text": "protected function setupAssetsInfo() {\n JQuery::registerJQuery();\n $this->addAssetInfo(\n \"js/jquery.easing.1.3.js\",\n $this->getCommonAssetDir()\n );\n \n $this->addAssetInfo(\n array(\"quicksand.css\", \"quicksand.js\"),\n dirname(__FILE__) . \"/assets\"\n );\n }", "title": "" }, { "docid": "896f9a75e6759d9a0c1c2842ed89c261", "score": "0.5798285", "text": "private function confAssets()\n {\n $styles = $this->reg->getAssets('styles');\n $scripts = $this->reg->getAssets('scripts');\n $this->templateManager->assign('styles', $styles);\n $this->templateManager->assign('scripts', $scripts);\n }", "title": "" }, { "docid": "60b6e181e1f3d5985b9f77e47a412891", "score": "0.5796915", "text": "public function registerAssets()\r\n {\r\n $view = $this->getView();\r\n HyphenatorAsset::register($view)->language = $this->language;\r\n $options = Json::encode($this->pluginOptions);\r\n $js = \"Hyphenator.config($options);\";\r\n $js .= 'Hyphenator.run();';\r\n $view->registerJs($js);\r\n }", "title": "" }, { "docid": "ec3bc2a0ab61fcc9d2fc5a40a1d567ce", "score": "0.57519704", "text": "function loadAssets()\n {\n switch($this->c->name){\n\n case 'paidlistings_plans':\n\n $this->c->assets['js'][] = 'paidlistings';\n\n $this->c->assets['css'][] = 'paidlistings';\n\n $this->c->assets['css'][] = 'form';\n\n break;\n\n case 'paidlistings_invoices':\n\n $this->c->assets['css'][] = 'paidlistings';\n\n break;\n\n case 'paidlistings_orders':\n\n $this->c->assets['css'][] = 'paidlistings';\n\n $this->c->assets['css'][] = 'theme';\n\n break;\n\n case 'paidlistings': // my account page\n\n $this->c->assets['js'][] = 'paidlistings';\n\n $this->c->assets['css'][] = 'paidlistings';\n\n $this->c->assets['css'][] = 'theme';\n\n $this->c->assets['css'][] = 'theme.list';\n\n $this->c->assets['css'][] = 'theme.form';\n\n break;\n\n case 'com_content':\n\n case 'listings':\n\n $this->c->assets['js'][] = 'paidlistings';\n\n $this->c->assets['css'][] = 'paidlistings';\n\n break;\n }\n }", "title": "" }, { "docid": "1cb73d4065415e686fac587138aa489f", "score": "0.5742046", "text": "function enqueue(): void\n {\n foreach ($this->styles as $style)\n wp_enqueue_style($style[0], $style[1], $style[2], $style[3], $style[4]);\n\n foreach ($this->scripts as $script)\n wp_enqueue_script($script[0], $script[1], $script[2], $script[3], $script[4]);\n }", "title": "" }, { "docid": "46e88bada38c6208028f420408163fe8", "score": "0.5736926", "text": "public function addAssets($assets, $group='default')\n {\n\n for ($i = 0; $i < count($assets); $i++) {\n $assetType = $this->__findAssetType($assets[$i]);\n\n if (!isset($this->__assetContainer_Css[$group])) {\n $this->__assetContainer_Css[$group] = array();\n }\n\n if (!isset($this->__assetContainer_Js[$group])) {\n $this->__assetContainer_Js[$group] = array();\n }\n\n //Direct the incoming assets to their dedicated containers\n if ($assetType == 'css') {\n array_push($this->__assetContainer_Css[$group], $assets[$i]);\n } elseif ($assetType == 'js') {\n array_push($this->__assetContainer_Js[$group], $assets[$i]);\n } else {\n //Do nothing (ignore invalid asset type)\n }\n }\n }", "title": "" }, { "docid": "240400b9952d8d1c1b1fbdc036ec570c", "score": "0.57333386", "text": "public function enqueue()\n {\n $styles = $this->styles();\n\n foreach ($styles as $style) {\n [\n 'handle' => $handle,\n 'src' => $src,\n 'dependencies' => $dependencies,\n 'version' => $version,\n 'media' => $media\n ] = $style;\n\n wp_register_style(\n $handle,\n $src,\n $dependencies,\n $version,\n $media\n );\n\n wp_enqueue_style($handle);\n }\n }", "title": "" }, { "docid": "80de95facb3845617de0117b7c4da71a", "score": "0.5711813", "text": "public static function registerExternalAssets($element, View $view) {\n $additionalAssets = Module::getInstance()->additionalAssets;\n foreach($additionalAssets as $key => $types) {\n if (is_int($key) && is_string($types)) {\n $className = $types;\n if (class_exists($className) === true) {\n $className::register($view);\n } else {\n Yii::error(Module::t('helpers', 'Class \"{classname}\" does not exist.', ['classname' => $className]));\n }\n\n } elseif (is_string($key) && is_array($types)) {\n if ($element->type !== null) {\n $register = false;\n foreach($element->type->getBlocTypes()->each() as $blocType) {\n /* @var $blocType \\blackcube\\core\\models\\BlocType */\n if (in_array($blocType->id, $types) || in_array($blocType->name, $types)) {\n $register = true;\n break;\n }\n }\n if ($register === true) {\n $className = $key;\n if (class_exists($className) === true) {\n $className::register($view);\n } else {\n Yii::error(Module::t('helpers', 'Class \"{classname}\" does not exist.', ['classname' => $className]));\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "9d188d67c70144b503152830309f6713", "score": "0.569638", "text": "private function assetKeysToResources(){\n $this->assets = array();\n foreach($this->assetKeys as $resKey=>$localResourceArray){\n $resourceArray = $this->config['remote'][$resKey];\n\n $base = $resourceArray['base'];\n $version = $resourceArray['version'];\n $allFilesInfo = $resourceArray['files'];\n if(in_array('all',$localResourceArray)){\n foreach($allFilesInfo as $fileKey=>$fileInfo){\n $resKey = str_replace(\".\",\":\",$resKey);\n $fileKey = str_replace(\".\",\":\",$fileKey);\n $this->constructResourcePaths($version,$base,$fileInfo,\"$resKey.$fileKey\");\n }\n }else{\n foreach($localResourceArray as $fileKey){\n $resKey = str_replace(\".\",\":\",$resKey);\n $fileKey = str_replace(\".\",\":\",$fileKey);\n $this->constructResourcePaths($version,$base,$allFilesInfo[$fileKey],\"$resKey.$fileKey\");\n }\n }\n \n }\n }", "title": "" }, { "docid": "2d5d8764e1b1b13e0c98577990bd2a42", "score": "0.56688637", "text": "abstract protected function loadAssets();", "title": "" }, { "docid": "9da670e42a913266d791aaa174ea62ce", "score": "0.5666088", "text": "public function putAssets()\n {\n\n $json = \\Input::all();\n\n $key = \\Input::get('key');\n\n $json['mode'] = 'edit';\n\n $batch = \\Input::get('batch');\n\n \\Dumper::insert($json);\n\n }", "title": "" }, { "docid": "3c5686fca57982080c164402c64429f1", "score": "0.5658661", "text": "public function register_assets( $hook ) {\n\t\tif ( 'post.php' != $hook ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_enqueue_style( $this->plugin_slug . '_meta_boxes_css', plugin_dir_url(\n\t\t\t__FILE__ ) . '../assets/css/meta-boxes.css' );\n\n\t\twp_enqueue_script( $this->plugin_slug . '_meta_boxes_js', plugin_dir_url(\n\t\t\t__FILE__ ) . '../assets/js/meta-boxes.js', array( 'jquery' ),\n\t\t\t$this->version, true );\n\n\t\t// Localize the JS file for handling frontend actions.\n\t\twp_localize_script( $this->plugin_slug . '_meta_boxes_js', 'apple_news_meta_boxes', array(\n\t\t\t'publish_action' => $this->publish_action,\n\t\t) );\n\n\t}", "title": "" }, { "docid": "735705eff9a08d8c45bf7b6d54f61479", "score": "0.56315595", "text": "private function register_post_assets() {\n\t\t// Stats widget new style.\n\t\twp_register_style(\n\t\t\t'beehive_post_stats',\n\t\t\tBEEHIVE_URL . 'app/assets/css/post-stats.min.css',\n\t\t\t[],\n\t\t\tBEEHIVE_VERSION\n\t\t);\n\n\t\t// Stats widget new script.\n\t\twp_register_script(\n\t\t\t'beehive_post_stats',\n\t\t\tBEEHIVE_URL . 'app/assets/js/post-stats.min.js',\n\t\t\t[ 'jquery' ],\n\t\t\tBEEHIVE_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\t// Localize stats variables.\n\t\twp_localize_script( 'beehive_post_stats', 'beehive_vars',\n\t\t\t/**\n\t\t\t * Filter hook to modify script vars.\n\t\t\t *\n\t\t\t * @since 3.2.0\n\t\t\t */\n\t\t\tapply_filters( 'beehive_google_post_stats_localize_vars', [\n\t\t\t\t'is_network' => $this->is_network(),\n\t\t\t] )\n\t\t);\n\t}", "title": "" }, { "docid": "b81a258b672b8362672f6694e171c5fc", "score": "0.5618896", "text": "public function init()\n {\n parent::init();\n //$this->publishAssets();\n }", "title": "" }, { "docid": "c643c95645e2047b4a668f797bf9db19", "score": "0.5611371", "text": "function addFromArray($assets) {\n if (!is_array($assets)) $assets = [$assets];\n foreach ($assets as $key => $asset) {\n if ($key === 'debug') {\n if (self::$debug) $this->addFromArray($asset);\n } else if ($key === 'prod') {\n if (!self::$debug) $this->addFromArray($asset);\n } else {\n if (isset(self::$libs[$asset])) {\n $this->addLib($asset);\n } elseif (substr($asset, -4) == '.css' || strpos($asset,'.css?v=') !== false) {\n $this->addCss($asset);\n } else {\n $this->addJs($asset);\n }\n }\n }\n }", "title": "" }, { "docid": "786457c09420561b918f580f14b1c097", "score": "0.5602329", "text": "public function addToAssetList($assets)\n {\n $assets['core'][$this->tag]['settings'] = 'Y';\n // $assets['core'][$this->tag]['image'] = OPPP_BASE_URL . 'images/elements/' . $this->tag . '/' . $this->tag . '.png';\n $assets['core'][$this->tag]['base_path'] = OPPP_BASE_URL . 'js/elements/';\n\n return $assets;\n }", "title": "" }, { "docid": "13d02be41e6df371da7b582972973548", "score": "0.5599169", "text": "private function registerPublishableResources()\n {\n $basePath = dirname(__DIR__);\n $publishable = [\n 'voyager_assets' => [\n \"$basePath/publishable/assets\" => public_path('vendor/tcg/voyager/assets'),\n ],\n 'migrations' => [\n \"$basePath/publishable/database/migrations/\" => database_path('migrations'),\n ],\n 'seeds' => [\n \"$basePath/publishable/database/seeds/\" => database_path('seeds'),\n ],\n 'demo_content' => [\n \"$basePath/publishable/demo_content/\" => storage_path('app/public'),\n ],\n 'config' => [\n \"$basePath/publishable/config/voyager.php\" => config_path('voyager.php'),\n ],\n 'views' => [\n \"$basePath/publishable/views/\" => resource_path('views/vendor/voyager'),\n ],\n 'lang' => [\n \"$basePath/resources/lang/\" => resource_path('lang/vendor/voyager'),\n ]\n ];\n\n foreach ($publishable as $group => $paths) {\n $this->publishes($paths, $group);\n }\n }", "title": "" }, { "docid": "0ca766537925b4d2e0d061a2cef0fe24", "score": "0.5585458", "text": "function add_resources() {\n wp_register_script( 'threejs', plugins_url('resources/three.min.js', __FILE__ ));\n wp_register_script( 'skinview3d', plugins_url('resources/skinview3d.min.js', __FILE__ ));\n wp_register_script( 'skin_viewer_main', plugins_url('resources/main.js', __FILE__ ));\n }", "title": "" }, { "docid": "b7ec6c7769fce0c94e852074e7fd51d8", "score": "0.5573665", "text": "private function publishResourceAssets()\n {\n $this->publishes(EbreescoolngAdminLTE::resourceAssets(), 'ebreescoolngadminlte');\n }", "title": "" }, { "docid": "196b995d4cb01be3f75528b4c5413f2e", "score": "0.55721027", "text": "protected function registerBatch()\n {\n $this->pipeline('batch', function ($pipeline, $object) {\n return $pipeline->send($object)\n ->through([\n AddToLaravelMedialibrary::class\n ])\n ->thenReturn();\n });\n }", "title": "" }, { "docid": "6b413bdbbae22ffd245d73073e9fa51c", "score": "0.55624604", "text": "protected static function publishAssets() {\n //$baseUrl = Yii::app()->assetManager->publish($assets);\n Yii::app()->clientScript->registerCoreScript('jquery');\n /*\n if (is_dir($assets)) {\n Yii::app()->clientScript->registerCoreScript('jquery');\n } else {\n throw new Exception('VDropDownChain - Error: Couldn\\'t find assets to publish.');\n }\n */\n }", "title": "" }, { "docid": "32e004875f0ad25fd942ebe4cec9dc7d", "score": "0.5538436", "text": "public function asset($assets) { return $this->assets($assets); }", "title": "" }, { "docid": "d2ba8083846e461eab5a5efce60d5d98", "score": "0.5536414", "text": "public function registerAssets($assets = array())\n {\n $default = array(\n 'css' => array(\n 'style',\n ),\n 'js' => array(\n 'jquery-1.6.2',\n ),\n );\n\n if(empty($assets)) {\n\n $assets = $default;\n } else {\n $assets['css'] = array_merge($assets['css'], $default['css']);\n $assets['js'] = array_merge($assets['js'], $default['js']);\n $assets['css'] = array_unique($assets['css']);\n $assets['js'] = array_unique($assets['js']);\n\n }\n\n $assetsHtmlString = '';\n\n if(array_key_exists('css', $assets) && count($assets['css']) > 0) {\n foreach($assets['css'] as $name) {\n $assetsHtmlString .= '<link rel=\"stylesheet\" href=\"'.CSS_DIR.'/'.$name.'.css\" type=\"text/css\">';\n }\n }\n\n if(array_key_exists('js', $assets) && count($assets['js']) > 0) {\n foreach($assets['js'] as $name) {\n $assetsHtmlString .= '<script type=\"text/javascript\" src=\"'.JS_DIR.'/'.$name.'.js\"></script>';\n }\n }\n\n return $assetsHtmlString;\n }", "title": "" }, { "docid": "d32078aaa0c35f57573d4afe91b11219", "score": "0.5536331", "text": "protected function registerResources()\n {\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'avored-related');\n $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'avored-related');\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n //$this->loadRoutesFrom(__DIR__ . '/../routes/web.php');\n }", "title": "" }, { "docid": "ea9964114aa9a1a955f34644ddd0522c", "score": "0.55310655", "text": "public function registerMediaCollections()\n {\n $this->addMediaCollection('logo')->singleFile();\n }", "title": "" }, { "docid": "a7c4acb2feffb0f1db5fb4558e6be06d", "score": "0.55246586", "text": "protected static function register_styles( array $styles ): void {\n\t\tforeach ( $styles as $name => $data ) {\n\t\t\tif ( is_array( $data ) ) {\n\t\t\t\t$version = $data['version'] ?? BasePlugin::get_version();\n\t\t\t\t$dependencies = $data['dependencies'] ?? [];\n\t\t\t\t$subfolder = $data['subfolder'] ?? '';\n\t\t\t\t$media = $data['media'] ?? 'all';\n\t\t\t} else {\n\t\t\t\t$subfolder = $data;\n\t\t\t\t$media = 'all';\n\n\t\t\t\t$meta = require_once BasePlugin::get_path( $subfolder . '/' . $name . '.asset.php' );\n\t\t\t\t$dependencies = $meta['dependencies'] ?? [];\n\t\t\t\t$version = $meta['version'] ?? [];\n\t\t\t}\n\n\t\t\twp_register_style( $name, BasePlugin::get_url( $subfolder . '/' . $name . '.js' ), $dependencies, $version, $media );\n\t\t}\n\t}", "title": "" }, { "docid": "699e6581ea52be316365f54a43ee7bc4", "score": "0.5524289", "text": "public function registerMediaCollections(): void\n {\n // Banner is a single image, so subsequent images replace prior ones\n $this\n ->addMediaCollection('banner_general')\n ->singleFile();\n }", "title": "" } ]
6e3fb183a8bddcb81b97c2f8a78db27b
Appends value to 'store_id' list
[ { "docid": "3ef458ba03ffe81e445dc2d885a1758d", "score": "0.71010846", "text": "public function appendStoreId($value)\n {\n return $this->append(self::store_id, $value);\n }", "title": "" } ]
[ { "docid": "492aeb1fd45ecf42f8efeae3e514ee8f", "score": "0.6464527", "text": "public function addIdFilter($store)\n {\n return $this->addFieldToFilter('main_table.store_id', ['in' => $store]);\n }", "title": "" }, { "docid": "d8195047d8a1a2b546df35b9fce49161", "score": "0.6215217", "text": "public function addStoreIdFilter($store)\n\t{\n\t\treturn $this->addStoreFilter($store);\n\t}", "title": "" }, { "docid": "94fd1fe8c5a7943b2094a00dbeae1ada", "score": "0.60084146", "text": "function setStores(array $store_id): void {\n }", "title": "" }, { "docid": "d86ec8b9b5bc46a6c0015afca91013fa", "score": "0.5955081", "text": "public function setStoreId($value)\n {\n return $this->set(self::store_id, $value);\n }", "title": "" }, { "docid": "c16337818e37d125910773f3c25b0853", "score": "0.59135455", "text": "public function getStoreIds();", "title": "" }, { "docid": "c16337818e37d125910773f3c25b0853", "score": "0.59135455", "text": "public function getStoreIds();", "title": "" }, { "docid": "9a33ce0f52ec5c0b5d1a093f206d9c4b", "score": "0.5884889", "text": "public function setStoreId($storeId);", "title": "" }, { "docid": "153b8cf26986b80ad2a373f3e16ba605", "score": "0.58171237", "text": "function fancy_store_increment($storeid)\n\t{\n\t\t$this->db->set('fancy_counter', 'fancy_counter+0', FALSE);\n\t\t$this->db->where('store_id', $storeid);\n\t\t$this->db->update('store_info');\n\t}", "title": "" }, { "docid": "3dcabb332acef835d43e6cf194449ba2", "score": "0.5781322", "text": "public function setStoreIds(array $store_ids);", "title": "" }, { "docid": "82fc18f871393b77b11cd84a3fd5ba48", "score": "0.57688195", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Add the list state to the store id.\n\t\t$id .= ':' . $this->getState('list.select');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "23a94c6b7553141a92b3d6eb9e7e407a", "score": "0.5680091", "text": "public function setStoreIds($storeIds)\r\n {\r\n $storeIds = array_values( $storeIds );\r\n if ($this->getAwStoreIds($storeIds))\r\n {\r\n $this->getSelect()->where('order.store_id in (?)', $this->getAwStoreIds($storeIds));\r\n }\r\n return parent::setStoreIds($storeIds);\r\n }", "title": "" }, { "docid": "38beb1bf7587103c2f39dc47d12aeb1d", "score": "0.5624009", "text": "function linkedStoreId(): array {\n\t}", "title": "" }, { "docid": "c78880620bc8004df5bd9c6208ac2491", "score": "0.5612299", "text": "private function saveStoreProductBulk($storeId, $data)\n {\n $newData = [];\n for ($i = 0; $i < count($data[$this->upcKey]); $i++) {\n $newData[$i][] = $storeId;\n $newData[$i][] = $data[$this->upcKey][$i];\n $newData[$i][] = $data[$this->titleKey][$i];\n $newData[$i][] = $data[$this->priceKey][$i];\n }\n $command = \\Yii::$app->db->createCommand()->batchInsert(\n StoreProduct::tableName(),\n ['store_id', 'upc', 'title', 'price'],\n $newData\n );\n $sql = $command->getRawSql();\n $sql .= ' ON DUPLICATE KEY UPDATE \n title = IF (upc = VALUES(upc), VALUES(title), title),\n price = IF (upc = VALUES(upc), VALUES(price), price)';\n $command->setRawSql($sql);\n $command->execute();\n\n// Yii::$app->db\n// ->createCommand()\n// ->batchInsert('store_product', ['store_id', 'upc', 'title', 'price'], $newData)\n// ->execute();\n }", "title": "" }, { "docid": "b911ee22891398a0105aa11bf4ec6834", "score": "0.5561228", "text": "protected function _getStoreIdsToInclude()\n\t{\n\t\treturn array_map(\n\t\t\tfunction ($store) {\n\t\t\t\treturn $store->getId();\n\t\t\t},\n\t\t\tMage::helper('pepperjam_network')->getAllStoresForProgramId(\n\t\t\t\tMage::helper('pepperjam_network/config')->getProgramId($this->_store)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "8ea6171db2552bffe12e39a970ab7522", "score": "0.54968446", "text": "public function getStoreIds()\n {\n if (!$this->hasStoreIds()) {\n $storeIds = $this->_getResource()->getStoreIds($this->getId());\n $this->setData('store_ids', (array)$storeIds);\n }\n return $this->getData('store_ids');\n }", "title": "" }, { "docid": "c848b5f5c7e9293cc9f3929b6ab1c980", "score": "0.5479856", "text": "private function getStoreId()\n {\n return Mage::app()->getStore()->getId();\n }", "title": "" }, { "docid": "61c2abdbb465bb8395378acc9d4c8d83", "score": "0.54626614", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Add the list state to the store id.\n\t\t$id .= ':' . $this->state->get('list.start');\n\t\t$id .= ':' . $this->state->get('list.limit');\n\t\t$id .= ':' . $this->state->get('list.ordering');\n\t\t$id .= ':' . $this->state->get('list.direction');\n\n\t\treturn md5($this->context . ':' . $id);\n\t}", "title": "" }, { "docid": "74a9f24f910f753fe90f8b2869672916", "score": "0.54455376", "text": "public function getAllStoreId(){\n\n \t$va_Stores = $this->getStoreId();\n \tif($va_Stores){\n\n \t\tif($va_Stores[0]!=0){\n \t\t\treturn $va_Stores;\n \t\t}\n \t\t$va_Return = array();\n \t\tforeach (Mage::app()->getStores() as $vo_Store){\n \t\t\t$va_Return[]=$vo_Store->getId();\n \t\t}\n \t\treturn $va_Return;\n \t}\n\n }", "title": "" }, { "docid": "583006b160044a85a4f5d366e43aa5d9", "score": "0.54424125", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Add the list state to the store id.\n\t\t$id .= ':' . $this->get('start');\n\t\t$id .= ':' . $this->get('limit');\n\t\t$id .= ':' . $this->get('sort');\n\t\t$id .= ':' . $this->get('sort_Dir');\n\n\t\treturn md5('overrides:' . $id);\n\t}", "title": "" }, { "docid": "7b76eb1479dff9babbcaace15b667e94", "score": "0.5428217", "text": "abstract protected function setList($groceries, $storeId = null);", "title": "" }, { "docid": "e7d8603d01755657b912e7ff79cb33a0", "score": "0.5425226", "text": "public function getStoreId()\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "e7d8603d01755657b912e7ff79cb33a0", "score": "0.5425226", "text": "public function getStoreId()\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "e7d8603d01755657b912e7ff79cb33a0", "score": "0.5425226", "text": "public function getStoreId()\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "e7d8603d01755657b912e7ff79cb33a0", "score": "0.5425226", "text": "public function getStoreId()\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "e7d8603d01755657b912e7ff79cb33a0", "score": "0.5425226", "text": "public function getStoreId()\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "e7d8603d01755657b912e7ff79cb33a0", "score": "0.5425226", "text": "public function getStoreId()\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "357932c643c7b93a1c87fb4d6ed88a67", "score": "0.53581876", "text": "public function getStoreId();", "title": "" }, { "docid": "357932c643c7b93a1c87fb4d6ed88a67", "score": "0.53581876", "text": "public function getStoreId();", "title": "" }, { "docid": "6efb8151646f4699737fd57b7aa0fb31", "score": "0.53523594", "text": "function getStoreIdsForProducts()\n {\n $sql = \"SELECT product_id, store_id FROM `\" . DB_PREFIX . \"product_to_store` ps;\";\n $storeIds = array();\n $result = $this->db->query($sql);\n foreach ($result->rows as $row) {\n $productId = $row['product_id'];\n $storeId = $row['store_id'];\n if (!isset($storeIds[$productId])) {\n $storeIds[$productId] = array();\n }\n if (!in_array($storeId, $storeIds[$productId])) {\n $storeIds[$productId][] = $storeId;\n }\n }\n return $storeIds;\n }", "title": "" }, { "docid": "b124107623b15635cfd6925c930f3f77", "score": "0.5323266", "text": "function repository_attach_id(&$value, $key, $id){\n $value['repo_id'] = $id;\n}", "title": "" }, { "docid": "e825c8891b7250918b64c9a3615e178c", "score": "0.53084475", "text": "function set_last_export_id( $table_name, $last_id, $store_id ) {\n\t\treturn $this->db->query( \"INSERT INTO export_meta SET table_name='\".$table_name.\"', last_id='\".$last_id.\"', store_id='\".$store_id.\"' ON DUPLICATE KEY UPDATE last_id='\".$last_id.\"'\" );\n\t}", "title": "" }, { "docid": "be90f22a6f4bfef10ad575fd2a10db8f", "score": "0.5299787", "text": "public function getStoreId(): int\n {\n return $this->store_id;\n }", "title": "" }, { "docid": "1192efa44f265f0e56ba2938f4144fb5", "score": "0.5263941", "text": "protected function afterFind(){\n\t\t$this->other=json_decode($this->other,true);\t\n\t\t$criteria=new CDbCriteria();\n\t\t$criteria->compare('store_id',$this->id);\n\t\t$tmp=SuggestStore::model()->findAll($criteria);\n\t\t$result=array();\n\t\tforeach ($tmp as $item) {\t\t\t\n\t\t\t$result[]=$item->to_store_id;\n\t\t}\t\n\t\t$this->tmp_product_ids=implode(',',$result);\t\t\n\t\treturn parent::afterFind();\n\t}", "title": "" }, { "docid": "469e1146f63b652ef4ad99a39ff42f5d", "score": "0.5246548", "text": "public function setStoreId($id)\n {\n $this->session->setData(self::SESSION_KEY_SELECTED_STORE_ID, $id);\n }", "title": "" }, { "docid": "a1c6702c34f012ad3fb53446833d36d5", "score": "0.5243782", "text": "public function getStoreId()\n {\n return Mage::app()->getStore()->getId();\n }", "title": "" }, { "docid": "8c0cc69fbe3e8c78ab1db11c6fe5ef73", "score": "0.5238663", "text": "public function getStoreId()\n {\n $storeId = $this->getData('store_id');\n if (is_null($storeId)) {\n $storeId = Mage::app()->getStore()->getId();\n $this->setData('store_id', $storeId);\n }\n return $storeId;\n }", "title": "" }, { "docid": "a4bad6a55a2f0bcd5054b1bd86e28bd3", "score": "0.52256423", "text": "public function addVariantSetIds( $value){\n return $this->_add(1, $value);\n }", "title": "" }, { "docid": "a4bad6a55a2f0bcd5054b1bd86e28bd3", "score": "0.52256423", "text": "public function addVariantSetIds( $value){\n return $this->_add(1, $value);\n }", "title": "" }, { "docid": "4d8e2cd096d5816bb50a502c829758dd", "score": "0.51926506", "text": "public function addStoreFilter($storeId = null)\n {\n if (is_null($storeId)) {\n $storeId = $this->getStoreId();\n }\n\n parent::addStoreFilter($storeId);\n\n if (!is_array($storeId)) {\n $storeId = array($storeId);\n }\n\n if (!empty($this->_storesIds)) {\n $this->_storesIds = array_intersect($this->_storesIds, $storeId);\n } else {\n $this->_storesIds = $storeId;\n }\n\n return $this;\n }", "title": "" }, { "docid": "96735fb25235970c66f5910978191ba9", "score": "0.51874506", "text": "public function addVariantSetIds( $value){\n return $this->_add(6, $value);\n }", "title": "" }, { "docid": "848cc9f358f3aa484ab899083832b8de", "score": "0.5161876", "text": "public function markAllProductsForUpdate($store = null);", "title": "" }, { "docid": "4b81f7fe5a6d4451402584f9f0ef8595", "score": "0.51540303", "text": "public function getListByStore(\n $storeId\n );", "title": "" }, { "docid": "ce050eff724df90d81662f44989eb902", "score": "0.51473135", "text": "protected function getStoreId($id = '')\n\t{\n\t\t$id\t.= ':'.$this->getState('filter.search');\t\t\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "fee6bb30645e2f19c5edfb9cfb84b02b", "score": "0.5147245", "text": "protected function getStoreId()\n {\n return Mage::app()->getStore(true)->getId();\n }", "title": "" }, { "docid": "75dadf5138f1bc1ba2c59fc3ee777d92", "score": "0.51122934", "text": "protected function _getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id\t.= ':'.$this->getState('list.start');\n\t\t$id\t.= ':'.$this->getState('list.limit');\n\t\t$id\t.= ':'.$this->getState('list.ordering');\n\t\t$id\t.= ':'.$this->getState('list.direction');\n\t\t$id\t.= ':'.$this->getState('check.state');\n\t\t$id\t.= ':'.$this->getState('filter.state');\n\t\t$id\t.= ':'.$this->getState('filter.search');\n\t\t$id\t.= ':'.$this->getState('filter.category_id');\n\n\t\treturn md5($id);\n\t}", "title": "" }, { "docid": "832596c1c949cfeb840937e16ab2e084", "score": "0.5103342", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id .= ':' . $this->getState('filter.date_field');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "6c1630c2a250a44aea65f3ad92ba16e0", "score": "0.5087389", "text": "public function setStoreId($storeId)\n {\n return $this->setData(self::STORE_ID, $storeId);\n }", "title": "" }, { "docid": "6c1630c2a250a44aea65f3ad92ba16e0", "score": "0.5087389", "text": "public function setStoreId($storeId)\n {\n return $this->setData(self::STORE_ID, $storeId);\n }", "title": "" }, { "docid": "dc67d271d367895f5a6effa9b436dac7", "score": "0.5057691", "text": "protected function _addStoresVisibility()\n {\n $tagIds = array();\n foreach ($this as $item) {\n $tagIds[] = $item->getTagId();\n }\n\n $tagsStores = array();\n if (sizeof($tagIds) > 0) {\n $select = $this->getConnection()->select()\n ->from($this->getTable('tag/relation'), array('store_id', 'tag_id'))\n ->where('tag_id IN(?)', $tagIds);\n $tagsRaw = $this->getConnection()->fetchAll($select);\n foreach ($tagsRaw as $tag) {\n if (!isset($tagsStores[$tag['tag_id']])) {\n $tagsStores[$tag['tag_id']] = array();\n }\n\n $tagsStores[$tag['tag_id']][] = $tag['store_id'];\n }\n }\n\n foreach ($this as $item) {\n if (isset($tagsStores[$item->getTagId()])) {\n $item->setStores($tagsStores[$item->getTagId()]);\n } else {\n $item->setStores(array());\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "0ae348cd28b14c541828dce41fa3eb10", "score": "0.5030588", "text": "protected function _addStoreInfo()\n {\n\n $this->_getFieldSet()->addField(\n 'store_id',\n 'select',\n [\n 'label' => __(\"Store\"),\n 'title' => __(\"Store\"),\n 'values' => $this->_systemStore->getStoreValuesForForm(),\n 'name' => 'store_id',\n 'required' => true\n ]\n );\n return $this;\n }", "title": "" }, { "docid": "efb5938cee9f43d7f982cd556f330e16", "score": "0.5026464", "text": "public function getStoreIds()\n {\n if (!$this->hasStoreIds()) {\n $storeIds = [];\n if ($stores = $this->_storeManager->getStores()) {\n $storeIds = array_keys($stores);\n }\n $this->setStoreIds($storeIds);\n }\n return $this->getData('store_ids');\n }", "title": "" }, { "docid": "efb5938cee9f43d7f982cd556f330e16", "score": "0.5026464", "text": "public function getStoreIds()\n {\n if (!$this->hasStoreIds()) {\n $storeIds = [];\n if ($stores = $this->_storeManager->getStores()) {\n $storeIds = array_keys($stores);\n }\n $this->setStoreIds($storeIds);\n }\n return $this->getData('store_ids');\n }", "title": "" }, { "docid": "d2f5005b8a37a2b5668d2db7d3c79a02", "score": "0.50135535", "text": "protected function getStoreId($id = '')\n\t{\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "15ca4a6f4b6cf68277e727990937fcd8", "score": "0.50133234", "text": "private function addStoreFilter($store)\n {\n $id = -1;\n if ($store instanceof StoreInterface) {\n $id = $store->getId();\n } elseif (is_numeric($store)) {\n $id = $store;\n }\n\n $this->addFieldToFilter('storeid', $id);\n return $this;\n }", "title": "" }, { "docid": "01a613dc065924b57391aa7eeb1abed1", "score": "0.5011703", "text": "public function setStoreIds($storeIds)\r\n {\r\n if ($storeIds) {\r\n $this->getSelect()->where('order_items.store_id IN (?)', (array)$storeIds);\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "0b1356446b8d1735a13349866469acfe", "score": "0.49804828", "text": "function appendValueToIdPArray($value, $CookieArray){\n\t\n\t// Remove value if it already existed in array\n\tforeach (array_keys($CookieArray) as $i){\n\t\tif ($CookieArray[$i] == $value){\n\t\t\tunset($CookieArray[$i]);\n\t\t}\n\t}\n\t\n\t// Add value to end of array\n\t$CookieArray[] = $value;\n\t\n\treturn $CookieArray;\n}", "title": "" }, { "docid": "383863f6f2579f10aed0b1684c28ab8a", "score": "0.4978632", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id .= ':' . $this->getState('filter.search');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "0c1c914e2ed9a403247fcf48b7be829e", "score": "0.49640748", "text": "public function getStoreId()\n {\n $storeId = $this->getData('store_id');\n if (is_null($storeId)) {\n $storeId = Mage::app()->getStore()->getId();\n }\n return $storeId;\n }", "title": "" }, { "docid": "f074357b66a9cf231b521d48895afcd0", "score": "0.4952435", "text": "public function setStoreIds($storeIds)\n {\n if ($storeIds) {\n $this->getSelect()->where('order_items.store_id IN (?)', (array)$storeIds);\n }\n return $this;\n }", "title": "" }, { "docid": "5749d62ba6a22d6bbac25138213b259f", "score": "0.4950084", "text": "public function addStoreFilter($storeId)\n {\n if (is_array($storeId)) {\n $this->addFieldToFilter('main_table.store_id', array('in' => $storeId));\n } elseif (is_numeric($storeId)) {\n $this->addFieldToFilter('main_table.store_id', array('eq' => $storeId));\n\n }\n\n return $this;\n }", "title": "" }, { "docid": "66c61d71ffedd6ae4028bbf9124b65a8", "score": "0.49472216", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id\t.= ':' . $this->getState('filter.search');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "9ff348e7fd149a3e45163ee167b84307", "score": "0.4946246", "text": "public function getStoreId()\n {\n \treturn Mage::app()->getFrontController()->getAction()->getStoreId();\n }", "title": "" }, { "docid": "dd6ada57af7e475d4f51f2f7801a85a9", "score": "0.49431947", "text": "public function setStoreId($id)\n {\n $this->set('StoreID', is_null($id) ? null : (int) $id);\n return $this->getStoreId();\n }", "title": "" }, { "docid": "b74cce834bd70783ce002be8b6cda55a", "score": "0.4940783", "text": "public function getStoreId()\n {\n $value = $this->get(self::store_id);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "d34011c539a624cc17e54f23ef8938b6", "score": "0.49254602", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "6c4a466a4793ffa95261166c6da435b5", "score": "0.49232066", "text": "public function addStoreFilter($store) {\n if (! Mage::app()->isSingleStoreMode()) {\n if ($store instanceof Mage_Core_Model_Store) {\n $store = array($store->getId());\n }\n $this->addFieldToFilter('website_id', array('eq' => $store));\n return $this;\n }\n return $this;\n }", "title": "" }, { "docid": "65b700a8cb4888066c8cf8ff47207d6e", "score": "0.49229798", "text": "public function getStoreList() {\r\n is_login();\r\n $table = 'stores';\r\n $primaryKey = 'id';\r\n $columns = array(\r\n array('db' => 'id', 'dt' => 0), array('db' => 'is_active', 'dt' => 1),\r\n array('db' => 'name', 'dt' => 2),\r\n array('db' => 'license_no', 'dt' => 3),\r\n array('db' => 'poc', 'dt' => 4),\r\n array('db' => 'id', 'dt' => 5)\r\n );\r\n\r\n $sql_details = array(\r\n 'user' => $this->db->username,\r\n 'pass' => $this->db->password,\r\n 'db' => $this->db->database,\r\n 'host' => $this->db->hostname\r\n );\r\n $where = array(\"is_deleted != 1\");\r\n $output_arr = SSP::complex($_GET, $sql_details, $table, $primaryKey, $columns, $where);\r\n\r\n foreach ($output_arr['data'] as $key => $value) {\r\n $id = $output_arr['data'][$key][count($output_arr['data'][$key]) - 1];\r\n $output_arr['data'][$key][count($output_arr['data'][$key]) - 1] = '';\r\n if (CheckPermission($table, \"all_update\")) {\r\n $output_arr['data'][$key][count($output_arr['data'][$key]) - 1] .= '<a id=\"btnEditRow\" class=\"mClass\" href=\"' . base_url() . 'store/editStores/' . $id . '\" type=\"button\" title=\"View/Edit\"><i class=\"fa fa-eye\"></i></a>';\r\n } else if (CheckPermission($table, \"own_update\") && (CheckPermission($table, \"all_update\") != true)) {\r\n $user_id = getRowByTableColomId($table, $id, 'user_id', 'user_id');\r\n if ($user_id == $this->user_id) {\r\n $output_arr['data'][$key][count($output_arr['data'][$key]) - 1] .= '<a id=\"btnEditRow\" class=\"mClass\" href=\"' . base_url() . 'store/editStores/' . $id . '\" type=\"button\" title=\"View/Edit\"><i class=\"fa fa-eye\"></i></a>';\r\n }\r\n }\r\n\r\n if (CheckPermission($table, \"all_delete\")) {\r\n $output_arr['data'][$key][count($output_arr['data'][$key]) - 1] .= '<a style=\"cursor:pointer;\" class=\"mClass\" data-toggle=\"modal\" onclick=\"setId(' . $id . ', \\'store\\')\" data-target=\"#cnfrm_delete\" title=\"delete\"><i class=\"fa fa-trash-o\" ></i></a>';\r\n } else if (CheckPermission($table, \"own_delete\") && (CheckPermission($table, \"all_delete\") != true)) {\r\n $user_id = getRowByTableColomId($table, $id, 'user_id', 'user_id');\r\n if ($user_id == $this->user_id) {\r\n $output_arr['data'][$key][count($output_arr['data'][$key]) - 1] .= '<a style=\"cursor:pointer;\" class=\"mClass\" data-toggle=\"modal\" onclick=\"setId(' . $id . ', \\'store\\')\" data-target=\"#cnfrm_delete\" title=\"delete\"><i class=\"fa fa-trash-o\" ></i></a>';\r\n }\r\n }\r\n $output_arr['data'][$key][0] = '<input type=\"checkbox\" name=\"selData\" value=\"' . $output_arr['data'][$key][0] . '\">';\r\n }\r\n\r\n echo json_encode($output_arr);\r\n }", "title": "" }, { "docid": "5ebd0ce2ffd330e26c94ffd3c0d7c4b8", "score": "0.49205443", "text": "protected function getStoreId($id = '')\r\n\t{\r\n\t \r\n \r\n \r\n $id\t.= ':'.$this->getState('filter.search');\r\n\t\t$id\t.= ':'.$this->getState('filter.kat');\r\n\t\t$id\t.= ':'.$this->getState('filter.state');\r\n\t \r\n\t \r\n\r\n\t\treturn parent::getStoreId($id);\r\n\t}", "title": "" }, { "docid": "7118186ee713c3f6ef2c9e83271dabf6", "score": "0.49186453", "text": "public function addStoreItems(StoreItems $l)\n\t{\n\t\t$this->collStoreItemss[] = $l;\n\t\t$l->setItem($this);\n\t}", "title": "" }, { "docid": "558e844af5f557a33d5a9a043251e7e5", "score": "0.49116918", "text": "public function getStoreId()\n {\n return $this->_storeManager->getStore()->getId();\n }", "title": "" }, { "docid": "65176f4b869c04e583df0787ca7f2465", "score": "0.49073124", "text": "public function setStoreIds($storeIds)\n {\n if ($storeIds) {\n $this->getSelect()->where('`order`.store_id IN (?)', (array)$storeIds);\n }\n return $this;\n }", "title": "" }, { "docid": "9422b9739738281f8bb395a7a57ce3e9", "score": "0.49038005", "text": "public function getStoreId()\n {\n if (is_null($this->_storeId)) {\n $this->setStoreId(Mage::app()->getStore()->getId());\n }\n return $this->_storeId;\n }", "title": "" }, { "docid": "32582f30beec0e265d45d021322f3ca8", "score": "0.48947442", "text": "protected function registerJsonStore(&$storeId, &$url, &$idProperty, &$remoteSort){\n\t\t\n\t}", "title": "" }, { "docid": "520a60e2d9fe08accc32b06c9b281f96", "score": "0.48895496", "text": "protected function getStoreId($id = '')\r\n\t{\r\n\t\t// Compile the store id.\r\n\t\t$id .= ':'.$this->getState('filter.access');\r\n\r\n\t\treturn parent::getStoreId($id);\r\n\t}", "title": "" }, { "docid": "9042c4a46719362e485da6aa1ef94590", "score": "0.488394", "text": "public function testCreateShopMultipleStore() {\n $another_store = $this->createStore('Second store', '[email protected]');\n $this->drupalGet('admin/commerce/trustedshops/shops/add');\n\n // Check the integrity of the form, the store field should be visible as\n // we have 2 available stores.\n $this->assertSession()->fieldExists('tsid[0][value]');\n $this->assertSession()->fieldExists('store[target_id][value]');\n\n // Submit form.\n $edit = [\n 'tsid[0][value]' => 'RCGABMX17MMTAF9V97G9DZEAKG1EILO0U',\n 'store[target_id][value]' => $another_store->id(),\n ];\n $this->submitForm($edit, 'Save');\n $this->assertSession()->statusCodeEquals(200);\n\n // Ensure the shop has been created in the selected store.\n $this->container->get('entity_type.manager')->getStorage('commerce_trustedshops_shop')->resetCache([1]);\n $shop = Shop::load(1);\n $this->assertEquals('RCGABMX17MMTAF9V97G9DZEAKG1EILO0U', $shop->getTsid());\n $this->assertEquals($another_store, $shop->getStore());\n }", "title": "" }, { "docid": "f2c0860bcf6554e94a631cd694db6909", "score": "0.4883107", "text": "public function categoryAdd($storeId = null);", "title": "" }, { "docid": "de5ff57a768e21b34c6df4f8dedfcf4f", "score": "0.4881795", "text": "public function setStoreId($store_id)\n {\n $this->store_id = $store_id;\n\n return $this;\n }", "title": "" }, { "docid": "de5ff57a768e21b34c6df4f8dedfcf4f", "score": "0.4881795", "text": "public function setStoreId($store_id)\n {\n $this->store_id = $store_id;\n\n return $this;\n }", "title": "" }, { "docid": "de5ff57a768e21b34c6df4f8dedfcf4f", "score": "0.4881795", "text": "public function setStoreId($store_id)\n {\n $this->store_id = $store_id;\n\n return $this;\n }", "title": "" }, { "docid": "de5ff57a768e21b34c6df4f8dedfcf4f", "score": "0.4881795", "text": "public function setStoreId($store_id)\n {\n $this->store_id = $store_id;\n\n return $this;\n }", "title": "" }, { "docid": "de5ff57a768e21b34c6df4f8dedfcf4f", "score": "0.4881795", "text": "public function setStoreId($store_id)\n {\n $this->store_id = $store_id;\n\n return $this;\n }", "title": "" }, { "docid": "de5ff57a768e21b34c6df4f8dedfcf4f", "score": "0.4881795", "text": "public function setStoreId($store_id)\n {\n $this->store_id = $store_id;\n\n return $this;\n }", "title": "" }, { "docid": "2f3047583a6caa8c0b5fb6178a4e35d3", "score": "0.48799938", "text": "public function addStoreFilter($storeId)\n {\n $entityInfo = $this->_getAssociatedEntityInfo('store');\n if (!$this->getFlag('is_store_table_joined')) {\n $this->setFlag('is_store_table_joined', true);\n if ($storeId instanceof Mage_Core_Model_Store) {\n $storeId = $storeId->getId();\n }\n $subSelect = $this->getConnection()->select()\n ->from(array('store' => $this->getTable($entityInfo['associations_table'])), '')\n ->where('store.' . $entityInfo['entity_id_field'] . ' IN (?)', $storeId);\n $this->getSelect()->exists(\n $subSelect, 'main_table.'.$entityInfo['rule_id_field'].' = store.'.$entityInfo['rule_id_field']\n );\n }\n return $this;\n }", "title": "" }, { "docid": "a4c07f14fcff8b69c045110728feabf5", "score": "0.4876917", "text": "public function addContainerId() {\n $saved = true;\n /** @var modSystemSetting $setting */\n $setting = $this->modx->getObject(modSystemSetting::class, ['key' => 'articles.container_ids']);\n if (!$setting) {\n $setting = $this->modx->newObject(modSystemSetting::class);\n $setting->set('key','articles.container_ids');\n $setting->set('namespace','articles');\n $setting->set('area','furls');\n $setting->set('xtype','textfield');\n }\n $value = $setting->get('value');\n $archiveKey = $this->object->get('id').':arc_';\n $value = is_array($value) ? $value : explode(',',$value);\n if (!in_array($archiveKey,$value)) {\n $value[] = $archiveKey;\n $value = array_unique($value);\n $setting->set('value',implode(',',$value));\n $saved = $setting->save();\n }\n return $saved;\n }", "title": "" }, { "docid": "a6eb46a4d63a901b46a33503f0ea76a9", "score": "0.4874966", "text": "public function getSiteId($store = null)\n {\n return Mage::getStoreConfig(self::XML_PATH_SITE_ID, $store); \n }", "title": "" }, { "docid": "dcf6551ecbc4b653c3deaf28ef8f438e", "score": "0.48623666", "text": "function addId($id)\n {\n if ($sz = func_num_args()) {\n for ($i = 0; $i < $sz; $i++) {\n $ids = func_get_arg($i);\n if (FALSE === is_array($ids)) {\n if (dp_strlen($ids)) {\n $this->mIds[dp_strtolower($ids)] = TRUE;\n }\n } else {\n foreach ($ids as $id) {\n if (dp_strlen($id)) {\n $this->mIds[dp_strtolower($id)] = TRUE;\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "8824742459a1edaf7db2efe867f1bd6c", "score": "0.48571092", "text": "protected function getStoreId($id = '') {\n // Compile the store id.\n $id.= ':' . $this->getState('filter.search');\n $id.= ':' . $this->getState('filter.state');\n\n return parent::getStoreId($id);\n }", "title": "" }, { "docid": "e48d7ed68346cab7645a4f078664f383", "score": "0.4844365", "text": "public function setShopId($value)\n {\n return $this->set(self::_SHOP_ID, $value);\n }", "title": "" }, { "docid": "fad69b63e972468762dfbcd3823aed29", "score": "0.48443133", "text": "protected function getStoreId($id = '') {\n // Compile the store id.\n $id .= ':' . $this->getState('filter.search');\n $id .= ':' . $this->getState('filter.state');\n\n return parent::getStoreId($id);\n }", "title": "" }, { "docid": "3e60a99216acfa65a1f03f6abe3f1f5c", "score": "0.48436472", "text": "public function getNewOrderList($store_id) {\r\n $this->db->select('o.id,o.order_bill_id,s.name as store_name,o.note,o.status as order_status_id,os.order_status_name,CONCAT_WS(\" \",u.name,u.lname) as user_name,'\r\n . ' o.order_date,o.payment_type,o.payment_status,o.created_on,o.amount');\r\n $this->db->from('order o');\r\n $this->db->join('order_store_mapping osm', 'osm.order_id = o.id', 'left');\r\n $this->db->join('table_order_status os', 'os.order_status_id = o.status', 'left');\r\n $this->db->join('stores s', 's.id = o.store_id', 'left');\r\n $this->db->join('users u', 'u.user_id = o.user_id', 'left');\r\n $this->db->where('o.status',2);\r\n $this->db->where('o.store_id',$store_id);\r\n $this->db->or_where('osm.store_id', $store_id);\r\n $this->db->group_by('o.id');\r\n $this->db->order_by('o.created_on','DESC');\r\n $query = $this->db->get();\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "639807fde17b6113cddd4407777ec3f1", "score": "0.48389512", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id .= ':' . $this->getState('filter.level_id');\n\t\t$id .= ':' . $this->getState('filter.type_id');\n\t\t$id .= ':' . $this->getState('filter.category_id');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "5d802a8c161bc192da3801dbc9d409d9", "score": "0.48388648", "text": "function get_storeids_by_category($ids, $st_cat_id) {\n $temp_query2 = \"SELECT DISTINCT store_category_sid FROM store_category WHERE store_category_sid IN ($ids) AND store_category_cid = '$st_cat_id'\";\n $temp_sids_results2 = mysql_query($temp_query2) or die(mysql_error());\n $records = mysql_num_rows($temp_sids_results2);\n if ($records == 0) {\n $ret['type'] = 'error';\n $ret['response'] = '';\n } else {\n while ($store_ids2 = mysql_fetch_assoc($temp_sids_results2)) {\n $stores_ids2[] = $store_ids2['store_category_sid'];\n }\n if (!empty($stores_ids2)) {\n //rsort($stores_ids2);\n $ids = implode(',', $stores_ids2);\n $ret['type'] = 'ids';\n $ret['response'] = $ids;\n } else {\n $ret['type'] = 'error';\n $ret['response'] = '';\n }\n }\n return $ret;\n}", "title": "" }, { "docid": "ac5ee1a2a55f36dd2874d514d0fc76ec", "score": "0.48371646", "text": "public function getStoreId()\n {\n\t\treturn $this->getGTSHelper()->getExtensionConfig(\n\t\t\tDevelo_Googletrustedstores_Helper_Data::CONFIG_PATH_MERCHANT_ID\n\t\t);\n\t}", "title": "" }, { "docid": "2e1d3ca9f9eb4de4146a84fd362258c6", "score": "0.48368156", "text": "public function getStores()\r\n {\r\n return $this->hasData('stores') ? $this->getData('stores') : $this->getData('store_id');\r\n }", "title": "" }, { "docid": "bca703163409f9635f066bb9e0011fc5", "score": "0.48288035", "text": "protected function getStoreId($id = '')\n {\n // Compile the store id.\n $id.= ':' . $this->getState('filter.search');\n $id.= ':' . $this->getState('filter.state'); \n\n return parent::getStoreId($id);\n }", "title": "" }, { "docid": "fbaee03fba3289482adf144c013c11d3", "score": "0.4814166", "text": "private function _addIds()\n {\n $sectionCount = 1;\n foreach ($this->_mergedArrays as $section) {\n $sectionId = 'section' . $sectionCount;\n $section['sectionId'] = $sectionId;\n $sectionCount++;\n\n $this->_mergedArrays[$section['SectionMainImage']] = $section;\n }\n }", "title": "" }, { "docid": "3edb225baea551860c0e211c6a4b4cf0", "score": "0.48131737", "text": "public function getStoreId()\n {\n if (is_null($this->storeId)) {\n $this->storeId = Mage::app()->getStore()->getId();\n }\n\n return $this->storeId;\n }", "title": "" }, { "docid": "b07ebe68ae06d16d952bc2204eb04f14", "score": "0.48119345", "text": "function addAmenitiesByValue($Array) {\n $this->InsertData( $this->amenities , $Array );\t\t\n $insertId = $this->getLatestRecordId();\n return $insertId;\n }", "title": "" }, { "docid": "2baa6ae07533b64a7e3b9b44321b6243", "score": "0.48095188", "text": "protected function getStoreId($id = '')\n\t{\n\t\t// Compile the store id.\n\t\t$id .= ':' . $this->getState('filter.search');\n\t\t$id .= ':' . $this->getState('filter.state');\n\n\t\treturn parent::getStoreId($id);\n\t}", "title": "" }, { "docid": "c2e0edbe8eefafe41c2cc14a904eaed8", "score": "0.48080704", "text": "public function beforeSave()\n {\n /**\n * Prepare store Ids if applicable and if they were set as string in comma separated format.\n * Backwards compatibility.\n */\n if ($this->hasStoreIds()) {\n $storeIds = $this->getStoreIds();\n if (!empty($storeIds)) {\n $this->setStoreIds($storeIds);\n }\n }\n\n parent::beforeSave();\n return $this;\n }", "title": "" } ]
0a0efd51c5e1e79b1b92f6f94e268d8a
Format to make message compatible with parse xml. When dephpugger receive the xml, there is any invalid chars and start with code (three ints). This method remove this to make compatible with `simplexml_load_string`
[ { "docid": "d57a60aadf707d4ae73251b444a73847", "score": "0.46451807", "text": "public function formatMessage($message)\n {\n // Remove # of bytes + null characters.\n $message = str_replace(\"\\0\", '', $message);\n $message = str_replace(\"\\00\", '', $message);\n $message = preg_replace(\"/^\\d+?(?=<)/\", '', $message);\n // Remove strings that could change between runs.\n $message = preg_replace('/appid=\"[0-9]+\"/', 'appid=\"\"', $message);\n $message = preg_replace('/engine version=\".*?\"/', 'engine version=\"\"', $message);\n $message = preg_replace('/protocol_version=\".*?\"/', 'protocol_version=\"\"', $message);\n $message = preg_replace('/ idekey=\".*?\"/', '', $message);\n $message = preg_replace('/address=\"[0-9]+\"/', 'address=\"\"', $message);\n\n return $message;\n }", "title": "" } ]
[ { "docid": "c364a324ed5ce75bbfa10d01340b43dd", "score": "0.6071639", "text": "function fix_xml_output($xml_input) {\n $xml_output = str_replace(\"/>\", \" />\", $xml_input);\n $xml_output = str_replace(\"<?xml version=\\\"1.0\\\"?>\\n\", \"\", $xml_output);\n\n // Decode UTF8 char for clean output\n $xml_output = str_replace(\"&#xA0;\", \" \", $xml_output); //no-break space = non-breaking space\n $xml_output = str_replace(\"&#xA1;\", \"¡\", $xml_output); //inverted exclamation mark\n $xml_output = str_replace(\"&#xA2;\", \"¢\", $xml_output); //cent sign\n $xml_output = str_replace(\"&#xA3;\", \"£\", $xml_output); //pound sign\n $xml_output = str_replace(\"&#xA4;\", \"¤\", $xml_output); //currency sign\n $xml_output = str_replace(\"&#xA5;\", \"¥\", $xml_output); //yen sign = yuan sign\n $xml_output = str_replace(\"&#xA6;\", \"¦\", $xml_output); //broken bar = broken vertical bar\n $xml_output = str_replace(\"&#xA7;\", \"§\", $xml_output); //section sign\n $xml_output = str_replace(\"&#xA8;\", \"¨\", $xml_output); //diaeresis = spacing diaeresis\n $xml_output = str_replace(\"&#xA9;\", \"©\", $xml_output); //copyright sign\n $xml_output = str_replace(\"&#xAA;\", \"ª\", $xml_output); //feminine ordinal indicator\n $xml_output = str_replace(\"&#xAB;\", \"«\", $xml_output); //left-pointing double angle quotation mark = left pointing guillemet\n $xml_output = str_replace(\"&#xAC;\", \"¬\", $xml_output); //not sign\n $xml_output = str_replace(\"&#xAD;\", \"­\", $xml_output); //soft hyphen = discretionary hyphen\n $xml_output = str_replace(\"&#xAE;\", \"®\", $xml_output); //registered sign = registered trade mark sign\n $xml_output = str_replace(\"&#xAF;\", \"¯\", $xml_output); //macron = spacing macron = overline = APL overbar\n $xml_output = str_replace(\"&#xB0;\", \"°\", $xml_output); //degree sign\n $xml_output = str_replace(\"&#xB1;\", \"±\", $xml_output); //plus-minus sign = plus-or-minus sign\n $xml_output = str_replace(\"&#xB2;\", \"²\", $xml_output); //superscript two = superscript digit two = squared\n $xml_output = str_replace(\"&#xB3;\", \"³\", $xml_output); //superscript three = superscript digit three = cubed\n $xml_output = str_replace(\"&#xB4;\", \"´\", $xml_output); //acute accent = spacing acute\n $xml_output = str_replace(\"&#xB5;\", \"µ\", $xml_output); //micro sign\n $xml_output = str_replace(\"&#xB6;\", \"¶\", $xml_output); //pilcrow sign = paragraph sign\n $xml_output = str_replace(\"&#xB7;\", \"·\", $xml_output); //middle dot = Georgian comma = Greek middle dot\n $xml_output = str_replace(\"&#xB8;\", \"¸\", $xml_output); //cedilla = spacing cedilla\n $xml_output = str_replace(\"&#xB9;\", \"¹\", $xml_output); //superscript one = superscript digit one\n $xml_output = str_replace(\"&#xBA;\", \"º\", $xml_output); //masculine ordinal indicator\n $xml_output = str_replace(\"&#xBB;\", \"»\", $xml_output); //right-pointing double angle quotation mark = right pointing guillemet\n $xml_output = str_replace(\"&#xBC;\", \"¼\", $xml_output); //vulgar fraction one quarter = fraction one quarter\n $xml_output = str_replace(\"&#xBD;\", \"½\", $xml_output); //vulgar fraction one half = fraction one half\n $xml_output = str_replace(\"&#xBE;\", \"¾\", $xml_output); //vulgar fraction three quarters = fraction three quarters\n $xml_output = str_replace(\"&#xBF;\", \"¿\", $xml_output); //inverted question mark = turned question mark\n $xml_output = str_replace(\"&#xC0;\", \"À\", $xml_output); //Latin capital letter A with grave = Latin capital letter A grave\n $xml_output = str_replace(\"&#xC1;\", \"Á\", $xml_output); //Latin capital letter A with acute\n $xml_output = str_replace(\"&#xC2;\", \"Â\", $xml_output); //Latin capital letter A with circumflex\n $xml_output = str_replace(\"&#xC3;\", \"Ã\", $xml_output); //Latin capital letter A with tilde\n $xml_output = str_replace(\"&#xC4;\", \"Ä\", $xml_output); //Latin capital letter A with diaeresis\n $xml_output = str_replace(\"&#xC5;\", \"Å\", $xml_output); //Latin capital letter A with ring above = Latin capital letter A ring\n $xml_output = str_replace(\"&#xC6;\", \"Æ\", $xml_output); //Latin capital letter AE = Latin capital ligature AE\n $xml_output = str_replace(\"&#xC7;\", \"Ç\", $xml_output); //Latin capital letter C with cedilla\n $xml_output = str_replace(\"&#xC8;\", \"È\", $xml_output); //Latin capital letter E with grave\n $xml_output = str_replace(\"&#xC9;\", \"É\", $xml_output); //Latin capital letter E with acute\n $xml_output = str_replace(\"&#xCA;\", \"Ê\", $xml_output); //Latin capital letter E with circumflex\n $xml_output = str_replace(\"&#xCB;\", \"Ë\", $xml_output); //Latin capital letter E with diaeresis\n $xml_output = str_replace(\"&#xCC;\", \"Ì\", $xml_output); //Latin capital letter I with grave\n $xml_output = str_replace(\"&#xCD;\", \"Í\", $xml_output); //Latin capital letter I with acute\n $xml_output = str_replace(\"&#xCE;\", \"Î\", $xml_output); //Latin capital letter I with circumflex\n $xml_output = str_replace(\"&#xCF;\", \"Ï\", $xml_output); //Latin capital letter I with diaeresis\n $xml_output = str_replace(\"&#xD0;\", \"Ð\", $xml_output); //Latin capital letter ETH\n $xml_output = str_replace(\"&#xD1;\", \"Ñ\", $xml_output); //Latin capital letter N with tilde\n $xml_output = str_replace(\"&#xD2;\", \"Ò\", $xml_output); //Latin capital letter O with grave\n $xml_output = str_replace(\"&#xD3;\", \"Ó\", $xml_output); //Latin capital letter O with acute\n $xml_output = str_replace(\"&#xD4;\", \"Ô\", $xml_output); //Latin capital letter O with circumflex\n $xml_output = str_replace(\"&#xD5;\", \"Õ\", $xml_output); //Latin capital letter O with tilde\n $xml_output = str_replace(\"&#xD6;\", \"Ö\", $xml_output); //Latin capital letter O with diaeresis\n $xml_output = str_replace(\"&#xD7;\", \"×\", $xml_output); //multiplication sign\n $xml_output = str_replace(\"&#xD8;\", \"Ø\", $xml_output); //Latin capital letter O with stroke = Latin capital letter O slash\n $xml_output = str_replace(\"&#xD9;\", \"Ù\", $xml_output); //Latin capital letter U with grave\n $xml_output = str_replace(\"&#xDA;\", \"Ú\", $xml_output); //Latin capital letter U with acute\n $xml_output = str_replace(\"&#xDB;\", \"Û\", $xml_output); //Latin capital letter U with circumflex\n $xml_output = str_replace(\"&#xDC;\", \"Ü\", $xml_output); //Latin capital letter U with diaeresis\n $xml_output = str_replace(\"&#xDD;\", \"Ý\", $xml_output); //Latin capital letter Y with acute\n $xml_output = str_replace(\"&#xDE;\", \"Þ\", $xml_output); //Latin capital letter THORN\n $xml_output = str_replace(\"&#xDF;\", \"ß\", $xml_output); //Latin small letter sharp s = ess-zed\n $xml_output = str_replace(\"&#xE0;\", \"à\", $xml_output); //Latin small letter a with grave = Latin small letter a grave\n $xml_output = str_replace(\"&#xE1;\", \"á\", $xml_output); //Latin small letter a with acute\n $xml_output = str_replace(\"&#xE2;\", \"â\", $xml_output); //Latin small letter a with circumflex\n $xml_output = str_replace(\"&#xE3;\", \"ã\", $xml_output); //Latin small letter a with tilde\n $xml_output = str_replace(\"&#xE4;\", \"ä\", $xml_output); //Latin small letter a with diaeresis\n $xml_output = str_replace(\"&#xE5;\", \"å\", $xml_output); //Latin small letter a with ring above = Latin small letter a ring\n $xml_output = str_replace(\"&#xE6;\", \"æ\", $xml_output); //Latin small letter ae = Latin small ligature ae\n $xml_output = str_replace(\"&#xE7;\", \"ç\", $xml_output); //Latin small letter c with cedilla\n $xml_output = str_replace(\"&#xE8;\", \"è\", $xml_output); //Latin small letter e with grave\n $xml_output = str_replace(\"&#xE9;\", \"é\", $xml_output); //Latin small letter e with acute\n $xml_output = str_replace(\"&#xEA;\", \"ê\", $xml_output); //Latin small letter e with circumflex\n $xml_output = str_replace(\"&#xEB;\", \"ë\", $xml_output); //Latin small letter e with diaeresis\n $xml_output = str_replace(\"&#xEC;\", \"ì\", $xml_output); //Latin small letter i with grave\n $xml_output = str_replace(\"&#xED;\", \"í\", $xml_output); //Latin small letter i with acute\n $xml_output = str_replace(\"&#xEE;\", \"î\", $xml_output); //Latin small letter i with circumflex\n $xml_output = str_replace(\"&#xEF;\", \"ï\", $xml_output); //Latin small letter i with diaeresis\n $xml_output = str_replace(\"&#xF0;\", \"ð\", $xml_output); //Latin small letter eth\n $xml_output = str_replace(\"&#xF1;\", \"ñ\", $xml_output); //Latin small letter n with tilde\n $xml_output = str_replace(\"&#xF2;\", \"ò\", $xml_output); //Latin small letter o with grave\n $xml_output = str_replace(\"&#xF3;\", \"ó\", $xml_output); //Latin small letter o with acute\n $xml_output = str_replace(\"&#xF4;\", \"ô\", $xml_output); //Latin small letter o with circumflex\n $xml_output = str_replace(\"&#xF5;\", \"õ\", $xml_output); //Latin small letter o with tilde\n $xml_output = str_replace(\"&#xF6;\", \"ö\", $xml_output); //Latin small letter o with diaeresis\n $xml_output = str_replace(\"&#xF7;\", \"÷\", $xml_output); //division sign\n $xml_output = str_replace(\"&#xF8;\", \"ø\", $xml_output); //Latin small letter o with stroke = Latin small letter o slash\n $xml_output = str_replace(\"&#xF9;\", \"ù\", $xml_output); //Latin small letter u with grave\n $xml_output = str_replace(\"&#xFA;\", \"ú\", $xml_output); //Latin small letter u with acute\n $xml_output = str_replace(\"&#xFB;\", \"û\", $xml_output); //Latin small letter u with circumflex\n $xml_output = str_replace(\"&#xFC;\", \"ü\", $xml_output); //Latin small letter u with diaeresis\n $xml_output = str_replace(\"&#xFD;\", \"ý\", $xml_output); //Latin small letter y with acute\n $xml_output = str_replace(\"&#xFE;\", \"þ\", $xml_output); //Latin small letter thorn\n $xml_output = str_replace(\"&#xFF;\", \"ÿ\", $xml_output); //Latin small letter y with diaeresis\n\n return $xml_output;\n}", "title": "" }, { "docid": "1641e958616af54841ed82bc4a3a0eef", "score": "0.58072853", "text": "public function to_string_safe() {\n\n\t\t$string = $this->to_string();\n\n\t\t// store number\n\t\tif ( preg_match( '/<configfile>(\\w+)<\\/configfile>/', $string, $matches ) ) {\n\t\t\t$string = preg_replace( '/<configfile>(\\w+)<\\/configfile>/', '<configfile>' . str_repeat( '*', strlen( $matches[1] ) ) . '</configfile>', $string );\n\t\t}\n\n\t\t// card number\n\t\tif ( preg_match( '/<cardnumber>(\\d+)<\\/cardnumber>/', $string, $matches ) ) {\n\t\t\t$string = preg_replace( '/<cardnumber>\\d+<\\/cardnumber>/', '<cardnumber>' . substr( $matches[1], 0, 1 ) . str_repeat( '*', strlen( $matches[1] ) - 5 ) . substr( $matches[1], -4 ) . '</cardnumber>', $string );\n\t\t}\n\n\t\t// real CSC code\n\t\t$string = preg_replace( '/<cvmvalue>\\d+<\\/cvmvalue>/', '<cvmvalue>***</cvmvalue>', $string );\n\n\t\treturn $this->prettify_xml( $string );\n\t}", "title": "" }, { "docid": "f10ba7d18a8a66389f9f5cca371e6176", "score": "0.56535983", "text": "function xml_error_string ($code) {}", "title": "" }, { "docid": "f2ce9154aa28ce8cb9fc3fc5b6b62ecf", "score": "0.55692065", "text": "function sanitize_for_xml($v) {\n $v = mb_convert_encoding(mb_convert_encoding($v, 'UTF-16', 'UTF-8'), 'UTF-8', 'UTF-16');\n \n // Remove various characters not allowed in XML\n /////$v = preg_replace('/[^\\x{0009}\\x{000A}\\x{000D}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{10000}-\\x{10FFFF}]/u', '�', $v);\n\n return $v;\n}", "title": "" }, { "docid": "b86e645edf8741e732aedaa68714cf04", "score": "0.55556446", "text": "protected function parseXmlErrors()\n\t{\n\t\t$errors = '';\n\t\tforeach(libxml_get_errors() as $err)\n\t\t{\n\t\t\t$errors .= $err->code.'<br/>';\n\t\t}\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "05d03c0687bf075d8d351c35bfda3414", "score": "0.54907936", "text": "function XmlSafeStr($s) \r\n{ \r\n return trim(preg_replace(\"/[\\\\x00-\\\\x08\\\\x0b-\\\\x0c\\\\x0e-\\\\x1f]/\",'',$s));; \r\n}", "title": "" }, { "docid": "a5a073c32ff45d3c38610b0329a68fd5", "score": "0.54711294", "text": "function safe_ascii_for_xml($str)\n\t{\n\t\treturn remove_invisible_characters($str, FALSE);\n\t}", "title": "" }, { "docid": "8622f3c8ae94e0320752fbcc137ebf16", "score": "0.54367703", "text": "private function __fixXml($data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\tif (is_string($value)) {\n\t\t\t\t$data[$key] = preg_replace('/\\\\\\x1A/', \"\\n\", $value);\n\t\t\t}\n\t\t\tif (is_array($value) && count($value) == 0) {\n\t\t\t\t$data[$key] = '';\n\t\t\t} elseif (is_array($value)) {\n\t\t\t\t$data[$key] = $this->__fixXml($value);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "88e11b12fc661880372176a225019e97", "score": "0.54125655", "text": "public function cleanXml() {\n $this->xml = $this->xml->asXml();\n $this->xml = str_replace( 'dia:', '', $this->xml );\n $this->xml = str_replace( ' xmlns:dia=\"http://www.lysator.liu.se/~alla/dia/\"', '', $this->xml );\n }", "title": "" }, { "docid": "45ee6492044bfbcd0cadda2d328c0a4f", "score": "0.5348053", "text": "function xss_clean1($data)\n{\n // Fix &entity\\n;\n $data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n $data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n $data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\n // Remove any attribute starting with \"on\" or xmlns\n $data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n // Remove javascript: and vbscript: protocols\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\n // Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n // Remove namespaced elements (we do not need them)\n $data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n do\n {\n // Remove really unwanted tags\n $old_data = $data;\n $data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n }\n while ($old_data !== $data);\n\n // we are done...\n return $data;\n}", "title": "" }, { "docid": "d23b64d0e5539810467e6fece35ce55f", "score": "0.5317214", "text": "public function xml_error()\n\t{\n\t\t$result = '';\n\t\t\n\t\tif(!empty($this->error_message))\n\t\t{\n\t\t\t$result = $this->error_message;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1264f93aabf15882dd3cb24c49462e81", "score": "0.53162235", "text": "public static function xss_clean($data) {\n return $data;\n // Fix &entity\\n;\n $data = str_replace(array('&amp;', '&lt;', '&gt;'), array('&amp;amp;', '&amp;lt;', '&amp;gt;'), $data);\n $data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n $data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\n // Remove any attribute starting with \"on\" or xmlns\n $data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n // Remove javascript: and vbscript: protocols\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\n // Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n // Remove namespaced elements (we do not need them)\n $data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n do {\n // Remove really unwanted tags\n $old_data = $data;\n $data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n } while ($old_data !== $data);\n\n // we are done...\n return $data;\n }", "title": "" }, { "docid": "ac0a4867026c142d36bac4992d89f08f", "score": "0.53067344", "text": "public function get_xml_error() {\n\tif($this->parse_error) {\n\t $errCode = xml_get_error_code ($this->parser);\n\t $thisError = \"Error Code [\". $errCode .\"] \\\"<strong style='color:red;'>\" . xml_error_string($errCode).\"</strong>\\\",\n\t\t\t\t\t\t\tat char \".xml_get_current_column_number($this->parser) . \"\n\t\t\t\t\t\t\ton line \".xml_get_current_line_number($this->parser).\"\";\n\t}else $thisError = $this->parse_error;\n\treturn $thisError;\n }", "title": "" }, { "docid": "02f6266620ee673020b79ebced67254c", "score": "0.52763456", "text": "function XMLEntities($string) \r\n{ \r\n\t$string = preg_replace('/[^\\x09\\x0A\\x0D\\x20-\\x7F]/e', '_privateXMLEntities(\"$0\")', $string); \r\n\treturn $string; \r\n}", "title": "" }, { "docid": "864f1a086c3b70afaaf8647f428581c8", "score": "0.52661014", "text": "protected function xmlInvalidTestString()\n {\n $dom = new DOMDocument();\n $dom->load(__DIR__ . '/Fixtures/InvalidStoredValueRedeemReply.xml');\n $string = $dom->C14N();\n\n return $string;\n }", "title": "" }, { "docid": "8137ba4845075704bbd4943d7e3e7a5d", "score": "0.51962435", "text": "public function toString(): string\n {\n return 'is valid XML';\n }", "title": "" }, { "docid": "1da0a93eb94fc153a9c4cf32a09d9367", "score": "0.51873446", "text": "protected function cleanDebugInfo($xml) {\n return preg_replace('/<\\!-- SERVER DEBUG INFO \\(BASE64 ENCODED\\)\\:(\\s+)([A-Za-z0-9\\/=+]*)(\\s+)-->/s', '', $xml);\n }", "title": "" }, { "docid": "a3e5999376d21e718c57037322acff54", "score": "0.5066373", "text": "function getCode($code) {\n // ----------------------------------------\n // $code = <string> code from XML\n // ----------------------------------------\n // RETURNS = <string> code restored to original source code\n // ----------------------------------------\n $code = str_replace(\"&lt;\", \"<\", $code);\n $code = str_replace(\"&gt;\", \">\", $code);\n $code = str_replace(\"[br]\", \"\\n\", $code);\n return $code;\n }", "title": "" }, { "docid": "3284e395934d5cff651de5aef7eb3219", "score": "0.5040115", "text": "function XmlFormat($Txt) {\r\n\r\n\t\t// delete line breaks\r\n\t\t$Txt = str_replace(\"\\r\",'',$Txt);\r\n\t\t$Txt = str_replace(\"\\n\",'',$Txt);\r\n\r\n\t\t// init values\r\n\t\t$p = 0;\r\n\t\t$lev = 0;\r\n\t\t$Res = '';\r\n\r\n\t\t$to = true;\r\n\t\twhile ($to!==false) {\r\n\t\t\t$to = strpos($Txt,'<',$p);\r\n\t\t\tif ($to!==false) {\r\n\t\t\t\t$tc = strpos($Txt,'>',$to);\r\n\t\t\t\tif ($to===false) {\r\n\t\t\t\t\t$to = false; // anomaly\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// get text between the tags\r\n\t\t\t\t\t$x = trim(substr($Txt, $p, $to-$p),' ');\r\n\t\t\t\t\tif ($x!=='') $Res .= \"\\n\".str_repeat(' ',max($lev,0)).$x;\r\n\t\t\t\t\t// get the tag\r\n\t\t\t\t\t$x = substr($Txt, $to, $tc-$to+1);\r\n\t\t\t\t\tif ($Txt[$to+1]==='/') $lev--;\r\n\t\t\t\t\t$Res .= \"\\n\".str_repeat(' ',max($lev,0)).$x;\r\n\t\t\t\t\t// change the level\r\n\t\t\t\t\tif (($Txt[$to+1]!=='?') && ($Txt[$to+1]!=='/') && ($Txt[$tc-1]!=='/')) $lev++;\r\n\t\t\t\t\t// next position\r\n\t\t\t\t\t$p = $tc + 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$Res = substr($Res, 1); // delete the first line break\r\n\t\tif ($p<strlen($Txt)) $Res .= trim(substr($Txt, $p), ' '); // complete the end\r\n\r\n\t\treturn $Res;\r\n\r\n\t}", "title": "" }, { "docid": "cf363d9940f768794f65348b660e5a8a", "score": "0.50372", "text": "function formatXmlString($xml)\n {\n $xml = preg_replace('/(>)(<)(\\/*)/', \"$1\\n$2$3\", $xml);\n\n // now indent the tags\n $token = strtok($xml, \"\\n\");\n $result = ''; // holds formatted version as it is built\n $pad = 0; // initial indent\n $matches = array(); // returns from preg_matches()\n\n // scan each line and adjust indent based on opening/closing tags\n while ($token !== false) :\n // test for the various tag states\n // 1. open and closing tags on same line - no change\n if (preg_match('/.+<\\/\\w[^>]*>$/', $token, $matches)) :\n $indent=0;\n // 2. closing tag - outdent now\n elseif (preg_match('/^<\\/\\w/', $token, $matches)) :\n $pad--;\n // 3. opening tag - don't pad this one, only subsequent tags\n elseif (preg_match('/^<\\w[^>]*[^\\/]>.*$/', $token, $matches)) :\n $indent=1;\n // 4. no indentation needed\n else :\n $indent = 0;\n endif;\n // pad the line with the required number of leading spaces\n $line = str_pad($token, strlen($token)+$pad, ' ', STR_PAD_LEFT);\n $result .= $line . \"\\n\"; // add to the cumulative result, with linefeed\n $token = strtok(\"\\n\"); // get the next token\n $pad += $indent; // update the pad size for subsequent lines\n endwhile;\n\n $pos = strpos($result, \"False\");\n if($pos == \"\")\n {\n $result = \"SMS Sent Successfully.\";\n }\n else\n {\n $result = \"Error Sending SMS: \". str_replace(\"False\",\"\" , $result);\n }\n return $result;\n }", "title": "" }, { "docid": "d3c3e248610642ba12806f4013cd1d47", "score": "0.50056714", "text": "public function clean ( $xml )\n {\n if ( md5( $xml ) === $this -> cleanedHash )\n {\n return $this -> cleanedXML;\n }\n \n /**\n * Variables for determining the type of block we're in \n * \n * @var $inComment Are we in an HTML/XML comment block?\n * @var $inCode Are we in a code block? ( JavaScript, CSS... )\n * @var $inPreformat Are we in a preformatted block? ( Textarea, pre )\n * @var $inInline Are we inside an inline tag?\n * @var $inSpecial Are we inside doctype, CDATA or similar?\n */\n $inComment = false;\n $inCode = false;\n $inPreformat = false;\n $inInline = false;\n $inSpecial = false;\n \n /**\n * @var $openedInSpecial Count opened tags in special blocks\n */\n $openedInSpecial = 0;\n \n /**\n * Various tag categories\n */\n $inlineTags = array (\"a\",\"basefont\",\"bdo\",\"font\",\n \"iframe\",\"map\",\"param\",\"q\",\n \"span\",\"sub\",\"sup\",\"abbr\",\"acronym\",\n \"cite\", \"del\", \"dfn\", \"em\", \"kbd\",\n \"strong\", \"var\", \"b\", \"big\", \"i\",\n \"s\", \"small\", \"strike\", \"tt\", \"u\",\n \"span\", \"title\", \"img\");\n $preformatTags = array ( 'pre', 'textarea', 'code' );\n $codeTags = array ( 'script', 'style' );\n \n /**\n * Controls the indentation\n */\n $indentLevel = 0;\n \n /**\n * Have we just begun a new line?\n */\n $newLine = true;\n \n \n /**\n * Tracks newlines in code|preformat|comment\n */\n $startedNewLine = false;\n \n /**\n * Output variable\n */\n $cleanedXML = '';\n \n /**\n * Are we in the opening or closing of a tag?\n */\n $inATag = false;\n \n /**\n * And so it begins.. We now loop through all the characters in our XML\n * Before version 2.0, we used to loop lines and use regular expressions, \n * but this approach is a lot more versatile\n */\n for ( $char = 0; $char < strlen( $xml ); $char++ )\n {\n /**\n * Case: We're not in a comment, and the next characters is an opening bracket\n * Meaning: An XML tag has just been encountered\n * Action: We figure out what kind of tag has been encountered, and act acordingly \n */\n if ( $xml[$char] === '<' && !$inComment ) // We're starting or ending a tag\n {\n /**\n * We find out what kind of tag we have by looping through the following characters\n * until we encounter a closing bracket or a space. We then take the corresponding\n * substring.\n */\n $inTag = 'comment';\n if ( $xml[$char+1] !== '!' ) {\n $findFirstSpace = strpos( $xml, ' ', $char );\n $findFirstEnd = strpos( $xml, '>', $char );\n if ( $findFirstSpace === false )\n $inTag = trim( substr( $xml, $char + 1, $findFirstEnd - $char - 1 ), '/' );\n elseif ( $findFirstEnd === false )\n $inTag = trim( substr( $xml, $char + 1, $findFirstSpace - $char - 1 ), '/' );\n else\n $inTag = trim( substr( $xml, $char + 1, min( $findFirstEnd, $findFirstSpace ) - $char - 1 ), '/' );\n }\n \n /**\n * Case: The first character after the opening bracket is a forward slash\n * Meaning: We have encountered an XML ending tag\n * Action: See comments for the if-else block\n */\n if ( $xml[$char+1] === '/' )\n {\n /**\n * If the tag is not an inline tag, we decrease the indentation level\n * Also, if we're not in a preformat block, we also add a newline and indentation\n * before we add then ending tag. We then set the newline flag so we will get a new line\n * after the closing tag.\n */\n if ( !in_array( $inTag, $inlineTags ) )\n {\n $indentLevel--;\n if ( !$inPreformat && !($inTag === 'script' && $xml[$char-1] === '>') ) // We want empty <script></script> tags on a single line.\n {\n $cleanedXML .= \"\\n\";\n $cleanedXML .= $this -> getIndentation( $indentLevel, $this -> indentBy );\n }\n $cleanedXML .= '</' . $inTag . '>';\n $newLine = true;\n }\n /**\n * If, on the other hand, we are ending an inline tag, we only append the ending tag\n * to the output, set the inline flag to false and unset the newline flag in case\n * it has been set.\n */\n else\n {\n $cleanedXML .= '</' . $inTag . '>';\n $inInline = false;\n $newLine = false;\n }\n \n // If we're in a special block, we decrement the counter for opened tags in the block\n if ( $inSpecial )\n $openedInSpecial--;\n \n // If we're ending a preformat tag, we unset the preformat flag\n if ( in_array( $inTag, $preformatTags ) )\n $inPreformat = false;\n // If we're ending a code tag, we unset the code flag\n elseif ( in_array ( $inTag, $codeTags ) )\n $inCode = false;\n \n // Since we've already appended the ending tag, we skip that amount of characters from input\n $char += strlen( '</' . $inTag . '>' ) - 1;\n \n }\n /**\n * Case: The first character after the opening bracket is an exclamation mark\n * Meaning: We're entering a special XML block ( comment, Doctype, CDATA... )\n * Action: We determine the type of block, and set the appropriate flags.\n * For special blocks, we also initialize a counter for opened tags in the block\n * so we know when the block ends ( by looking at when the counter hits zero again )\n */\n elseif ( $xml[$char+1] === '!' )\n {\n // Comment\n if ( $xml[$char+2] === '-' )\n {\n $inComment = true;\n }\n // Other special blocks\n else\n {\n $inSpecial = true;\n $openedInSpecial = 0;\n $inATag = true;\n }\n $indentLevel++;\n $newLine = false;\n $cleanedXML .= $xml[$char];\n }\n /**\n * Case: The first character is neither a forward slash or an exclamation mark\n * Meaning: We're opening a new tag\n * Action: We find the type of tag we're opening, and act acordingly\n */\n else\n {\n /**\n * We only want to add a new line if we're either entering a block\n * element OR the $newLine flag has been set.\n * We then unset the newline flag so that we don't get an extra newline.\n */\n if ( $newLine || !in_array ( $inTag, $inlineTags ) )\n {\n $cleanedXML .= \"\\n\";\n $cleanedXML .= $this -> getIndentation( $indentLevel, $this -> indentBy );\n }\n $newLine = false;\n \n // Set the inline flag if we're opening an inline tag\n if ( in_array( $inTag, $inlineTags ) )\n {\n $inInline = true;\n }\n \n // If we're opening a preformat tag, we set the appropriate tag\n if ( in_array( $inTag, $preformatTags ) )\n $inPreformat = true;\n // Similarily, we set the code flag if we're opening a code tag\n elseif ( in_array ( $inTag, $codeTags ) )\n $inCode = true;\n \n // We then add the opening bracket to the output and set the \"in a tag\" flag\n $cleanedXML .= '<';\n $inATag = true;\n \n /**\n * We now need to find out if this is a self closing tag or not.\n * If it is, we shouldn't increase the indent level, and we should also\n * Append the tag to output directly and bypass the reading of those\n * since it will make everything easier for us\n * \n * We also don't want to increase the indentlevel if we're in an inline tag\n */\n $endOfTag = strpos ( $xml, '>', $char );\n if ( $xml[$endOfTag-1] !== '/' && !$inInline ) // Not self closing, and not inline\n {\n $indentLevel++;\n // Remember the counter\n if ( $inSpecial )\n $openedInSpecial++;\n }\n elseif ( $xml[$endOfTag-1] === '/' ) // Self closing\n {\n // We find the complete contents of the tag, output it, increase $char and get on our way\n $tagContent = substr ( $xml, $char + 1, $endOfTag - $char );\n $cleanedXML .= $tagContent;\n $char += strlen ( $tagContent );\n \n // If its a block element, we still want a new line\n if ( !$inInline ) {\n $newLine = true;\n } else {\n $newLine = false;\n }\n \n // We now need to unset some of the flags since the tag has been closed\n $inInline = false;\n $inATag = false;\n }\n }\n }\n /**\n * Case: We're in a comment block, and we've enountered -->\n * Meaning: The comment is ending\n * Action: Skip characters, unset comment flag, add newline and append to output\n */\n elseif ( $inComment && $xml[$char] === '-' && $xml[$char+1] === '-' && $xml[$char+2] === '>' )\n {\n $char += 3 - 1;\n $indentLevel--;\n $inComment = false;\n $cleanedXML .= '-->';\n $newLine = true;\n }\n /**\n * Case: We've encountered a newline, tab or carriage return whithout any \"weird\" flags set\n * Meaning: We've hit a special character that should not be included in the output\n * Action: Nothing... That's what you do when you skip something\n */\n elseif ( in_array( $xml[$char], array( \"\\t\", \"\\r\", \"\\n\" ) ) && !$inComment && !$inCode && !$inPreformat )\n {}\n /**\n * Case: We've encountered a closing bracket, we're in a special block and the opened tags counter is zero\n * Meaning: We've hit the ending of the special tag\n * Action: Unset the special and in a tag flag, and decrement the indentation counter\n */\n elseif ( $xml[$char] === '>' && $inSpecial && $openedInSpecial === 0 )\n {\n $inSpecial = false;\n $inATag = false;\n $indentLevel--;\n $cleanedXML .= '>';\n }\n /**\n * Case: The next character is a closing bracket, we're in a tag definition, and we're not in a special block\n * Meaning: We've hit the end of an opening tag\n * Action: Unset the in-a-tag flag, and add newline if appropriate\n */\n elseif ( $xml[$char] === '>' && $inATag && !$inSpecial )\n {\n $inATag = false;\n $cleanedXML .= '>';\n // We don't want to add a newline if we've just opened an inline tag or are in preformat mode\n if ( $inInline || $inPreformat )\n $newLine = false;\n else\n $newLine = true;\n }\n /**\n * Case: We've hit an ordinary character\n * Meaning: Well.. Nothing special...\n * Action: Get the character to output\n */\n else\n {\n /**\n * Remember to add a newline if the flag is set.\n * We don't want to obey the newline flag if the first character on the line is an \"empty\" character\n * In that case, we don't do anything, and wait until we hit a non-empty character.\n */\n if ( $newLine && !in_array( $xml[$char], array ( \"\\r\", \"\\n\", \"\\t\", \" \" ) ) )\n {\n $cleanedXML .= \"\\n\" . $this -> getIndentation ( $indentLevel, $this -> indentBy );\n $newLine = false;\n }\n \n // We're in a code or comment block\n if ( $inCode || $inComment )\n {\n // Inside code and comment blocks, all newlines should cause the next line to be indented\n if ( $xml[$char] === \"\\n\")\n {\n $cleanedXML .= \"\\n\" . $this -> getIndentation ( $indentLevel, $this -> indentBy );\n $startedNewLine = true;\n }\n // If we've hit a non-empty character, we print it\n elseif ( !in_array( $xml[$char], array ( \"\\r\", \"\\t\", \" \" ) ) )\n {\n $cleanedXML .= $xml[$char];\n $startedNewLine = false;\n }\n // If we've hit a space, and are not at the beginning of a line, we output it as well\n elseif ( $xml[$char] === \" \" && !$startedNewLine )\n {\n $cleanedXML .= \" \";\n }\n }\n // We're in a preformatted block, so we jusdt output the character\n elseif ( $inPreformat )\n {\n $cleanedXML .= $xml[$char];\n }\n // If the previously outputted character was not a newline or the last character in the indentation string\n // And the character is not an empty character, we output it\n elseif ( !in_array( $cleanedXML[ strlen ( $cleanedXML ) - 1 ], array( \"\\n\", $this -> indentBy[ strlen ( $this -> indentBy ) - 1 ] ) ) || \n !in_array( $xml[$char], array ( \"\\r\", \"\\n\", \"\\t\", \" \" ) ) )\n {\n $cleanedXML .= $xml[$char];\n }\n }\n }\n \n $cleanedXML=htmlentities($cleanedXML);\n $cleanedXML=str_replace(\"\\\\t\", \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\", $cleanedXML);\n $cleanedXML=str_replace(\"\\n\", \"<br>\", $cleanedXML);\n \n // $this -> cleanedHash = md5 ( $xml );\n // $this -> cleanedXML = $xml;\n \n // Return!\n \n\n return $cleanedXML;\n }", "title": "" }, { "docid": "f717614e13f340abd72a394b11ee4c50", "score": "0.49905506", "text": "public function to_string_safe() {\n\n\t\t$string = parent::to_string_safe();\n\n\t\t// mask the card number\n\t\tif ( preg_match( '/<ssl_card_number>(\\d+)<\\/ssl_card_number>/', $string, $matches ) && strlen( $matches[1] ) > 4 ) {\n\t\t\t$string = preg_replace( '/<ssl_card_number>\\d+<\\/ssl_card_number>/', '<ssl_card_number>' . substr( $matches[1], 0, 1 ) . str_repeat( '*', strlen( $matches[1] ) - 5 ) . substr( $matches[1], -4 ) . '</ssl_card_number>', $string );\n\t\t}\n\n\t\t// mask the CSC\n\t\t$string = preg_replace( '/<ssl_cvv2cvc2>\\d+<\\/ssl_cvv2cvc2>/', '<ssl_cvv2cvc2>***</ssl_cvv2cvc2>', $string );\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "b56d7821f0a89d1aea735270bb9523f5", "score": "0.49841928", "text": "function getXml()\n {\n return '';\n }", "title": "" }, { "docid": "28e642f6346f8f68d5730110491b3d64", "score": "0.4981732", "text": "public function cleanAuthXml($xml)\n {\n $xml = preg_replace('#(\\<(?:Encrypted)?CardSecurityCode\\>).*(\\</(?:Encrypted)?CardSecurityCode\\>)#', '$1***$2', $xml);\n $xml = preg_replace('#(\\<(?:Encrypted)?PaymentAccountUniqueId.*?\\>).*(\\</(?:Encrypted)?PaymentAccountUniqueId\\>)#', '$1***$2', $xml);\n return $xml;\n }", "title": "" }, { "docid": "d9776ba3ae059d7a5d3ac728f0552645", "score": "0.4957536", "text": "function codify(){\n\t\t$this->another_message = htmlentities($this->another_message,ENT_QUOTES,'utf-8');\n\t\t$this->pending = htmlentities($this->pending,ENT_QUOTES,'utf-8');\n\t\t$this->content = htmlentities($this->content,ENT_QUOTES,'utf-8');\n\t\t$this->from_name = htmlentities($this->from_name,ENT_QUOTES,'utf-8');\n\t\t$this->page_name = htmlentities($this->page_name,ENT_QUOTES,'utf-8');\n\t}", "title": "" }, { "docid": "a5fb93cfb97d8145928be22a97f1c37c", "score": "0.4950396", "text": "function striptag($message, $allowed_tags)\n{\n $message = entity_decode($message);\n\n /*\n * Each element in the allowed_tags array is the tag body, without the <>\n * (eg; '/i' for the </I> tag), and case is irrelevant.\n */\n $pos = 0;\n\n /* Split out the entire string into text and tags (w/ attributes) */\n while (1) {\n /* Find the beginning of the next tag */\n $openpos = strpos(substr($message, $pos), '<');\n if (is_bool($openpos) && !$openpos)\n break;\n\n /* Find the beginning of the next tag */\n if ($openpos > 0)\n $elements[] = substr($message, $pos, $openpos);\n\n list($valid, $closepos, $attr) = parse_tag(substr($message, $openpos + $pos));\n\n if ($valid)\n $elements[] = $attr;\n else\n $elements[] = convert_brackets(substr($message, $pos + $openpos, $closepos));\n\n $pos += $openpos + $closepos;\n }\n\n $elements[] = substr($message, $pos);\n\n $n_message = '';\n for ($i = 0; $i < count($elements); $i++) {\n $element = $elements[$i];\n\n if (is_array($element)) {\n list($str, $skip) = validate_tag($elements, $i, $allowed_tags);\n\n $n_message .= $str;\n $i += $skip;\n } else\n $n_message .= convert_brackets($element);\n }\n\n /* prevent ppl from making empty nested tags, eg <sub><sup></sup></sub> */\n while (strlen($n_message)>0) {\n $last = $n_message;\n foreach ($allowed_tags as $tag => $etag) {\n $n_message = preg_replace(\"#<$tag>\\s*</$tag>#i\", \"\", $n_message);\n }\n /* we have converged. stop */\n if ($last == $n_message) break;\n }\n\n return $n_message;\n}", "title": "" }, { "docid": "6ac610f5f81e6a61c39894e64ee844ff", "score": "0.49421835", "text": "public function message()\n {\n return 'Phone required format +380 (XX) XXX XX XX';\n }", "title": "" }, { "docid": "70f0e3833943985b4e2fa129dc7b71c5", "score": "0.49365288", "text": "public function format ()\n\t{\n\t\t// $dom->preserveWhiteSpace = false;\n\t\t// $dom->formatOutput = true;\n\t\t// $dom->loadXML($xml->xmlGet(XmlHandler::STRING));\n\t\t// $result = preg_replace('/^ |\\G /m', \"\\t\", $dom->saveXML());\n\t}", "title": "" }, { "docid": "e72ceb5920c27fe784e82f650a2f5fcf", "score": "0.49317718", "text": "public function ErrorsAsXML() {\n $xml = simplexml_load_string(\"<?xml version='1.0'?>\\n<phpsysinfo></phpsysinfo>\");\n $generation = $xml->addChild('Generation');\n $generation->addAttribute('version', PSI_VERSION);\n $generation->addAttribute('timestamp', time());\n if ($this->errors > 0) {\n foreach($this->arrErrorList as $arrLine) {\n $error = $xml->addChild('Error');\n $error->addChild('Function', $arrLine['command']);\n $error->addChild('Message', $arrLine['message']);\n }\n }\n return $xml->asXML();\n }", "title": "" }, { "docid": "f559dd0ca81db903b4bd6878fb107f5d", "score": "0.49145693", "text": "function limpiaxss($dato)\n {\n // Fix &entity\\n;\n $dato = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $dato);\n $dato = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $dato);\n $dato = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $dato);\n $dato = html_entity_decode($dato, ENT_COMPAT, 'UTF-8');\n\n // Remove any attribute starting with \"on\" or xmlns\n $dato = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $dato);\n\n // Remove javascript: and vbscript: protocols\n $dato = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $dato);\n $dato = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $dato);\n $dato = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $dato);\n\n // Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n $dato = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $dato);\n $dato = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $dato);\n $dato = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $dato);\n\n // Remove namespaced elements (we do not need them)\n $dato = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $dato);\n\n do{\n\t // Remove really unwanted tags\n\t $datoviejo = $dato;\n\t $dato = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $dato);\n }\n while ($datoviejo !== $dato);\n // we are done...\n return $dato;\n }", "title": "" }, { "docid": "ac9d63047c9a015afee9d693013bbbce", "score": "0.49080718", "text": "function filtre_cdata($t) {\n\tif (preg_match(',[<>&\\x0-\\x8\\xb-\\xc\\xe-\\x1f],u', $t)) {\n\t\t$t = preg_replace('/[\\x0-\\x8\\xb-\\xc\\xe-\\x1f]/ue', '\"&#x\".bin2hex(\\'$0\\').\";\"', $t);\n\t\treturn \"<![CDATA[\" . str_replace(']]>', ']]]]><![CDATA[>', $t).']]>';\n\t} else\n\t\treturn $t;\n}", "title": "" }, { "docid": "ac95e5fb647654c54a2a8ec1664e9723", "score": "0.48936883", "text": "function normalizeFormat($x1){\n\t$x1=strlen($x1) . 'x' . (string)$x1;\n\treturn $x1;\n}", "title": "" }, { "docid": "fe10236609a016d59db8116136cacaab", "score": "0.48912913", "text": "function mnet_server_fault_xml($code, $text, $privatekey = null) {\n global $MNET_REMOTE_CLIENT, $CFG;\n // Replace illegal XML chars - is this already in a lib somewhere?\n $text = str_replace(array('<','>','&','\"',\"'\"), array('&lt;','&gt;','&amp;','&quot;','&apos;'), $text);\n\n $return = mnet_server_prepare_response('<?xml version=\"1.0\"?>\n<methodResponse>\n <fault>\n <value>\n <struct>\n <member>\n <name>faultCode</name>\n <value><int>'.$code.'</int></value>\n </member>\n <member>\n <name>faultString</name>\n <value><string>'.$text.'</string></value>\n </member>\n </struct>\n </value>\n </fault>\n</methodResponse>', $privatekey);\n\n if (!empty($CFG->mnet_rpcdebug)) {\n trigger_error(\"XMLRPC Error Response $code: $text\");\n trigger_error(print_r($return,1));\n }\n\n return $return;\n}", "title": "" }, { "docid": "1d91099093124d05af3e8b332accfd6c", "score": "0.48912463", "text": "function generate_errors($errNum, $format = \"xml\", $aa = 0){\r\n\r\n $msg = ERROR_MSGS[$errNum];\r\n\r\n if ($format == \"json\"){\r\n $json = array(\"conv\" => array(\"error\" => array(\"code\" => \"$errNum\", \"msg\" => \"$msg\")));\r\n header(\"Content-type: application/json\");\r\n echo json_encode($json, JSON_PRETTY_PRINT);\r\n }\r\n else{\r\n $xml = \"<?xml version='1.0' encoding = 'UTF-8'?>\";\r\n $xml .= \"<conv><error>\";\r\n $xml .= \"<code>\". $errNum . \"</code>\";\r\n $xml .= \"<msg>\" . $msg . \"</msg>\";\r\n $xml .= \"</error></conv>\";\r\n\r\n if($aa == 1){ // s2-rouf helped with this if statement\r\n echo $xml;\r\n\r\n }else{\r\n header(\"Content-type: text/xml\");\r\n echo $xml;\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "826973f5c5e42915eca0ca2e2cb24705", "score": "0.48843533", "text": "protected function _xmlUnconvertSafeCdata( $v )\n\t{\n\t\t# Legacy\n\t\t$v = str_replace( \"<!¢|CDATA|\", \"<![CDATA[\", $v );\n\t\t$v = str_replace( \"|¢]>\" , \"]]>\" , $v );\n\t\t\n\t\t# New\n\t\t$v = str_replace( \"<!#^#|CDATA|\", \"<![CDATA[\", $v );\n\t\t$v = str_replace( \"|#^#]>\" , \"]]>\" , $v );\n\t\t\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "14cf501cbb8c1f217c4926556998b41f", "score": "0.48737186", "text": "public function getMessageFormat();", "title": "" }, { "docid": "8e42b9741202f2ac5425dccb70f0a02b", "score": "0.48342133", "text": "function removeXss($val) {\n if (is_int($val)) return $val;\n \n // remove all non-printable characters. CR(0a) and LF(0b) and TAB(9) are allowed\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n \n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=&#X40&#X61&#X76&#X61&#X73&#X63&#X72&#X69&#X70&#X74&#X3A &#X61&#X6C&#X65&#X72&#X74&#X28&#X27&#X58&#X53&#X53&#X27&#X29>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`;?+={}[]_|\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n \n // &#x0040 @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // &#00064 @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n \n return $val;\n}", "title": "" }, { "docid": "8028f01301fa527cbc3af54e99d5f73e", "score": "0.48305652", "text": "function xml_get_error_code ($parser) {}", "title": "" }, { "docid": "d3807f245836a1950babff3f94044318", "score": "0.48263198", "text": "public function testXMLValidIP() {\n $this->assertStringStartsWith('<?xml version=\"1.0\"?>', $this->_ipv->xml(self::VALID_IP));\n }", "title": "" }, { "docid": "cd4489cecf8735b33098f0176005f8ab", "score": "0.4824867", "text": "public function xssClean($data)\n {\n // If its empty there is no point cleaning it :\\\n if (empty($data)) {\n return $data;\n }\n\n // Recursive loop for arrays\n if (is_array($data)) {\n foreach ($data as $key => $value) {\n $data[$key] = $this->xssClean($data);\n }\n\n return $data;\n }\n\n // Fix &entity\\n;\n $data = $this->fixEntity($data);\n\n // Remove any attribute starting with \"on\" or xmlns\n $data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n // Remove javascript: and vbscript: protocols\n $data = $this->removeJavaScriptProtocols($data);\n\n $data = $this->removeVbScriptProtocols($data);\n\n $data = preg_replace(\n '#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u',\n '$1=$2nomozbinding...',\n $data\n );\n\n // Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n $data = $this->fixIe($data);\n\n // Remove namespaces elements (we do not need them)\n $data = $this->removeNameSpaceElements($data);\n\n $data = preg_replace($this->sqlReplace, '', $data);\n\n do {\n // Remove really unwanted tags\n $old_data = $data;\n $data = preg_replace(\n '#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l\n (?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i',\n '',\n $data\n );\n } while ($old_data !== $data);\n\n return htmlentities($data);\n }", "title": "" }, { "docid": "bc9cbf07f394f675e110e18ab1d43195", "score": "0.48195308", "text": "function to_text($data)\n{\n\t$data=preg_replace('/<\\?xml version.+?preserve\\\">/',\"\",$data);\n\t$data=preg_replace('/<\\/extr.+?api>/',\"\",$data);\n\t$data=preg_replace('/&lt;.*?&gt;/',\"\",$data);\n\n\treturn $data;\t//return string\n}", "title": "" }, { "docid": "8e62faeb0f19a52eddea80166a255562", "score": "0.48155695", "text": "protected function _xmlConvertSafeCdata( $v )\n\t{\n\t\t# Legacy\n\t\t//$v = str_replace( \"<![CDATA[\", \"<!¢|CDATA|\", $v );\n\t\t//$v = str_replace( \"]]>\" , \"|¢]>\" , $v );\n\t\t\n\t\t# New\n\t\t$v = str_replace( \"<![CDATA[\", \"<!#^#|CDATA|\", $v );\n\t\t$v = str_replace( \"]]>\" , \"|#^#]>\" , $v );\n\t\t\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "31a79af75b17a161fe93809edac44ef9", "score": "0.48130602", "text": "function formatXmlString($data){\n \n\tif(gettype($data) === 'object') $data = $data->asXML();\n\n //Format XML to save indented tree rather than one line\n \t$dom = new DOMDocument('1.0');\n \t$dom->preserveWhiteSpace = false;\n \t$dom->formatOutput = true;\n \t$dom->loadXML($data);\n \n \t$ret = $dom->saveXML();\n \treturn $ret;\n }", "title": "" }, { "docid": "c0e9274673fdd27afb44623819b4227e", "score": "0.48089898", "text": "function getXML($input)\n {\n $crlf = \"\\r\\n\";\n $output = '<?xml version=\\'1.0\\'?>' . $crlf .\n '<!DOCTYPE email SYSTEM \"http://www.phpguru.org/xmail/xmail.dtd\">' . $crlf .\n '<email>' . $crlf .\n Mail_mimeDecode::_getXML($input) .\n '</email>';\n return $output;\n }", "title": "" }, { "docid": "7b3f70b9297729d0c3d754f1c7c24c82", "score": "0.48084605", "text": "function __xml($data) {\r\n\r\n\t\t$result = \"\";\r\n\t\tforeach ($data as $k => $v) {\r\n\t\t\t$value = is_array($v) ? \"\\n\" . $this->__xml($v) : $this->_change_encoding($v, \"HTML-ENTITIES\", true);\r\n\t\t\t$result .= \"<$k>$value</$k>\\n\";\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "66a84ca70b48e477dc3b97c5a91b5150", "score": "0.48032507", "text": "private function _compileXML(){\n\t\t// array_walk_recursive($this->listArr, array($xml, 'addChild'));\n\t\t// return $xml->asXML();\n\t\t$string = '<?xml version=\"1.0\"?>' . \"\\r\\n\";\n\n\t\t$string .= '<friendlist>' . \"\\r\\n\";\n\n\t\tforeach ($this->listArr as $array) {\n\n\t\t\t$string .= \"\\t\".'<friend>' . \"\\r\\n\";\n\n\t\t\t\t$string .= \"\\t\\t\".'<'.$this->IDkey.'>' . \"\\r\\n\";\n\n\t\t\t\t\t$string .= \"\\t\\t\\t\".$array[$this->IDkey] . \"\\r\\n\";\n\n\t\t\t\t$string .= \"\\t\\t\".'</'.$this->IDkey.'>' . \"\\r\\n\";\n\n\t\t\t\t$string .= \"\\t\\t\".'<'.$this->Nicknamekey.'>' . \"\\r\\n\";\n\n\t\t\t\t\t$string .= \"\\t\\t\\t\".$array[$this->Nicknamekey] . \"\\r\\n\";\n\n\t\t\t\t$string .= \"\\t\\t\".'</'.$this->Nicknamekey.'>' . \"\\r\\n\";\n\n\t\t\t$string .= \"\\t\".'</friend>' . \"\\r\\n\";\n\n\t\t}\n\n\t\t$string .= '</friendlist>';\n\n\t\treturn $string;\n\n\t}", "title": "" }, { "docid": "a8a98a472eecbb0c5a8f361f2f83b47a", "score": "0.4777982", "text": "function FILTER_SANITIZE_CODE($value)\r\n{\r\n $value = preg_replace('/\\./', '', $value); //remove .\r\n $value = preg_replace('/\\s/', '', $value); //remove spaces\r\n return preg_match('/^[123458][EU]\\d{4}$/', $value)?$value:false;\r\n}", "title": "" }, { "docid": "b8cd7ada19e63f9632fcfaf1c8de7082", "score": "0.477765", "text": "private function badRequest($type){\n $str = $this->xmlHeader();\n switch($type){\n case '0':\n $str .= \"<result><status>0:BAD STATUS CALL</status></result>\";\n break;\n case '1':\n $str .= \"<result><status>1:BAD START CALL</code></error>\";\n break;\n case '2':\n $str .= \"<result><status>2:BAD STOP CALL</code></error>\";\n break;\n case '3':\n $str .= \"<result><status>3:BAD RESTART CALL</code></error>\";\n break;\n case '4':\n $str .= \"<result><status>4:BAD START CALL, SERVICE NAME BLACKLISTED</code></error>\";\n break;\n case '5':\n $str .= \"<result><status>5:BAD STOP CALL, SERVICE NAME BLACKLISTED</code></error>\";\n break;\n case '6':\n $str .= \"<result><status>6:BAD RESTART CALL, SERVICE NAME BLACKLISTED</code></error>\";\n break;\n }\n print $str;\n }", "title": "" }, { "docid": "40d40c34a5e7b2173ec6f68be4199942", "score": "0.47754836", "text": "function fix88595($s) {\nglobal $ISO88595;\n\n\tif (!$ISO88595)\n\t\treturn($s);\n$replacement = array(\n\t\"\\xa0\" => '&nbsp;', \"\\xa1\" => '&#x401;', \"\\xa2\" => '&#x402;', \"\\xa3\" => '&#x403;',\n\t\"\\xa4\" => '&#x404;', \"\\xa5\" => '&#x405;', \"\\xa6\" => '&#x406;', \"\\xa7\" => '&#x407;',\n\t\"\\xa8\" => '&#x408;', \"\\xa9\" => '&#x409;', \"\\xaa\" => '&#x40a;', \"\\xab\" => '&#x40b;',\n\t\"\\xac\" => '&#x40c;', \"\\xad\" => '&#x0ad;', \"\\xae\" => '&#x40e;', \"\\xaf\" => '&#x40f;',\n\t\"\\xb0\" => '&#x410;', \"\\xb1\" => '&#x411;', \"\\xb2\" => '&#x412;', \"\\xb3\" => '&#x413;',\n\t\"\\xb4\" => '&#x414;', \"\\xb5\" => '&#x415;', \"\\xb6\" => '&#x416;', \"\\xb7\" => '&#x417;',\n\t\"\\xb8\" => '&#x418;', \"\\xb9\" => '&#x419;', \"\\xba\" => '&#x41a;', \"\\xbb\" => '&#x41b;',\n\t\"\\xbc\" => '&#x41c;', \"\\xbd\" => '&#x41d;', \"\\xbe\" => '&#x41e;', \"\\xbf\" => '&#x41f;',\n\t\"\\xc0\" => '&#x420;', \"\\xc1\" => '&#x421;', \"\\xc2\" => '&#x422;', \"\\xc3\" => '&#x423;',\n\t\"\\xc4\" => '&#x424;', \"\\xc5\" => '&#x425;', \"\\xc6\" => '&#x426;', \"\\xc7\" => '&#x427;',\n\t\"\\xc8\" => '&#x428;', \"\\xc9\" => '&#x429;', \"\\xca\" => '&#x42a;', \"\\xcb\" => '&#x42b;',\n\t\"\\xcc\" => '&#x42c;', \"\\xcd\" => '&#x42d;', \"\\xce\" => '&#x42e;', \"\\xcf\" => '&#x42f;',\n\t\"\\xd0\" => '&#x430;', \"\\xd1\" => '&#x431;', \"\\xd2\" => '&#x432;', \"\\xd3\" => '&#x433;',\n\t\"\\xd4\" => '&#x434;', \"\\xd5\" => '&#x435;', \"\\xd6\" => '&#x436;', \"\\xd7\" => '&#x437;',\n\t\"\\xd8\" => '&#x438;', \"\\xd9\" => '&#x439;', \"\\xda\" => '&#x43a;', \"\\xdb\" => '&#x43b;',\n\t\"\\xdc\" => '&#x43c;', \"\\xdd\" => '&#x43d;', \"\\xde\" => '&#x43e;', \"\\xdf\" => '&#x43f;',\n\t\"\\xe0\" => '&#x440;', \"\\xe1\" => '&#x441;', \"\\xe2\" => '&#x442;', \"\\xe3\" => '&#x443;',\n\t\"\\xe4\" => '&#x444;', \"\\xe5\" => '&#x445;', \"\\xe6\" => '&#x446;', \"\\xe7\" => '&#x447;',\n\t\"\\xe8\" => '&#x448;', \"\\xe9\" => '&#x449;', \"\\xea\" => '&#x44a;', \"\\xeb\" => '&#x44b;',\n\t\"\\xec\" => '&#x44c;', \"\\xed\" => '&#x44d;', \"\\xee\" => '&#x44e;', \"\\xef\" => '&#x44f;',\n\t\"\\xf0\" => '&#x2116;', \"\\xf1\" => '&#x451;', \"\\xf2\" => '&#x452;', \"\\xf3\" => '&#x453;',\n\t\"\\xf4\" => '&#x454;', \"\\xf5\" => '&#x455;', \"\\xf6\" => '&#x456;', \"\\xf7\" => '&#x457;',\n\t\"\\xf8\" => '&#x458;', \"\\xf9\" => '&#x459;', \"\\xfa\" => '&#x45a;', \"\\xfb\" => '&#x45b;',\n\t\"\\xfc\" => '&#x45c;', \"\\xfd\" => '&#x0a7;', \"\\xfe\" => '&#x45e;', \"\\xff\" => '&#x45f;'\n\t);\n\treturn(str_replace(array_keys($replacement), array_values($replacement), $s));\n}", "title": "" }, { "docid": "b3a8a4808f9385deaacca44cd6713135", "score": "0.47697717", "text": "public function message()\n {\n $result = match(true) {\n\n ! $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character, one uppercase character, one number, and one special character.',\n\n $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character, one uppercase character, and one special character.',\n\n\n ! $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character, and one special character and one number.',\n\n ! $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one uppercase character, and one special character and one number.',\n\n ! $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character, one uppercase character and one number.',\n\n $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character and one special character.',\n\n $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one uppercase character and one special character.',\n \n $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one uppercase character and one special character.',\n\n ! $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one special character and one number.',\n\n ! $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character and one number.',\n\n ! $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one uppercase character and one number.',\n\n ! $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one number.',\n\n $this->containsNumbers &&\n ! $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one uppercase character.',\n\n $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n ! $this->containsLowerCaseLetters &&\n $this->containsSpecialCharacters => 'The :attribute must contain at least one lowercase character.',\n\n $this->containsNumbers &&\n $this->containsUpperCaseLetters &&\n $this->containsLowerCaseLetters &&\n ! $this->containsSpecialCharacters => 'The :attribute must contain at least one special character.',\n \n };\n\n return $result;\n }", "title": "" }, { "docid": "47099a58eb51eddaf1992f1a8e8056bc", "score": "0.47684646", "text": "function test_input($data){\n\t// Fix &entity\\n;\n\t$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n\t$data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n\t$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n\t$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\n\t// Remove any attribute starting with \"on\" or xmlns\n\t$data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n\t// Remove javascript: and vbscript: protocols\n\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\n\t// Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n\t// Remove namespaced elements (we do not need them)\n\t$data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n\tdo\n\t{\n\t\t// Remove really unwanted tags\n\t\t$old_data = $data;\n\t\t$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n\t}\n\twhile ($old_data !== $data);\n\n\t// we are done...\n\treturn $data;\n}", "title": "" }, { "docid": "f0f54ef4c357a2531de8bc4d9f95c414", "score": "0.47556952", "text": "private function parseOnlyChanges()\n {\n $onlyChanges = $this->importXml->Каталог['СодержитТолькоИзменения'];\n\n if (!$onlyChanges) {\n throw new CommerceMLException('Attribute was not set: \"СодержитТолькоИзменения\".');\n }\n\n $this->onlyChanges = (string)$onlyChanges;\n }", "title": "" }, { "docid": "d0c6760fff14daf15f4b17f2934b2082", "score": "0.4746639", "text": "function Fix_CodeID($Code)\n{\n $Result = '';\n if (empty($Code))\n return $Result;\n for ($i = 0; $i <= strlen($Code); $i++)\n {\n $Char = ord(substr($Code, $i, 1));\n if (($Char >= 48 && $Char <= 57) || ($Char >= 65 && $Char < 90) || ($Char >= 97 && $Char <\n 123) || array_search($Char, array(\n 45,\n 46,\n 91,\n 93,\n 95), true))\n $Result .= chr($Char);\n }\n return $Result;\n}", "title": "" }, { "docid": "d0c6760fff14daf15f4b17f2934b2082", "score": "0.4746639", "text": "function Fix_CodeID($Code)\n{\n $Result = '';\n if (empty($Code))\n return $Result;\n for ($i = 0; $i <= strlen($Code); $i++)\n {\n $Char = ord(substr($Code, $i, 1));\n if (($Char >= 48 && $Char <= 57) || ($Char >= 65 && $Char < 90) || ($Char >= 97 && $Char <\n 123) || array_search($Char, array(\n 45,\n 46,\n 91,\n 93,\n 95), true))\n $Result .= chr($Char);\n }\n return $Result;\n}", "title": "" }, { "docid": "16b13f02a8e35462a4fa8566fe7cabba", "score": "0.47462922", "text": "function strip_cdata(string $source_code): string\n {\n preg_match_all('/<!\\[cdata\\[(.*?)\\]\\]>/is', $source_code, $matches);\n\n return str_replace($matches[ 0 ], $matches[ 1 ], $source_code);\n }", "title": "" }, { "docid": "e4cc7aa25290967ad2f32e241a696bfd", "score": "0.47443417", "text": "public function getXML() {\n $out = \"<exception>\";\n $out .= \"<message>\".htmlspecialchars($this->message, ENT_COMPAT, \"UTF-8\", false).\"</message>\";\n $out .= \"<code>\".htmlspecialchars($this->code, ENT_COMPAT, \"UTF-8\", false).\"</code>\";\n $out .= \"<location>\".htmlspecialchars(self::getLocation(), ENT_COMPAT, \"UTF-8\", false).\"</location>\";\n \n $out .= \"<getVariables>\";\n foreach ($_GET as $key => $value){\n $out .= $this->getVariableXML($key, $value);\n }\n $out .= \"</getVariables>\";\n \n $out .= \"<postVariables>\";\n foreach ($_POST as $key => $value){\n if (!strstr($key,\"card\")){\n $out .= $this->getVariableXML($key, $value);\n }\n }\n $out .= \"</postVariables>\";\n \n $out .= \"<ipaddress>\".htmlspecialchars($this->getIP()).\"</ipaddress>\";\n\n $out .= \"<backtrace>\";\n $i = 1;\n foreach ($this->getReversedTrace() as $back) {\n if ($back[\"class\"] != \"FrameEx\") {\n $out .= \"<step number='\".$i++.\"' line='{$back['line']}' file='{$back['file']}' class='{$back['class']}' function='{$back['function']}' />\";\n }\n }\n $out .= \"</backtrace>\";\n \n $out .= \"</exception>\";\n \n return $out;\n }", "title": "" }, { "docid": "090fabc3dd8ab719a2bd1938e51e7578", "score": "0.47414973", "text": "function feedfilter_lifehacker_com($raw)\r\n\t{\r\n\t\treturn preg_replace('@(\\t){4}<a(.*)$@s', '', $raw);\r\n\t}", "title": "" }, { "docid": "6b858ad0514b98678a3a0a86655c8328", "score": "0.47347537", "text": "function bot_rsg2_display_clean_data ( $attrib ) {\n\t$attrib = str_replace( \"&nbsp;\", '', \"$attrib\" );\n\n\treturn trim( $attrib );\n}", "title": "" }, { "docid": "3af0f6dca84b6886fc19fce6afa2625c", "score": "0.47176525", "text": "private function xmlEntities($str){\n $xml = array('&#34;','&#38;','&#38;','&#60;','&#62;','&#160;','&#161;','&#162;','&#163;','&#164;','&#165;','&#166;','&#167;','&#168;','&#169;','&#170;','&#171;','&#172;','&#173;','&#174;','&#175;','&#176;','&#177;','&#178;','&#179;','&#180;','&#181;','&#182;','&#183;','&#184;','&#185;','&#186;','&#187;','&#188;','&#189;','&#190;','&#191;','&#192;','&#193;','&#194;','&#195;','&#196;','&#197;','&#198;','&#199;','&#200;','&#201;','&#202;','&#203;','&#204;','&#205;','&#206;','&#207;','&#208;','&#209;','&#210;','&#211;','&#212;','&#213;','&#214;','&#215;','&#216;','&#217;','&#218;','&#219;','&#220;','&#221;','&#222;','&#223;','&#224;','&#225;','&#226;','&#227;','&#228;','&#229;','&#230;','&#231;','&#232;','&#233;','&#234;','&#235;','&#236;','&#237;','&#238;','&#239;','&#240;','&#241;','&#242;','&#243;','&#244;','&#245;','&#246;','&#247;','&#248;','&#249;','&#250;','&#251;','&#252;','&#253;','&#254;','&#255;','&#8217;','&#145;');\n $html = array('&quot;','&amp;','&amp;','&lt;','&gt;','&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&rsquo;','&lsquo;');\n $str = str_replace($html,$xml,$str);\n $str = str_ireplace($html,$xml,$str);\n return $str;\n}", "title": "" }, { "docid": "28e02e3ab440a8792b7b785aa23db8cd", "score": "0.47088283", "text": "function display_xml_error($error, $xml='')\n{\n\t$return .= str_repeat('-', $error->column) . \"\\n<br>\";\n\n\tswitch ($error->level) \n\t{\n\t\tcase LIBXML_ERR_WARNING:\n\t\t\t$return .= \"Warning $error->code: \";\n\t\t\tbreak;\n\t\tcase LIBXML_ERR_ERROR:\n\t\t\t$return .= \"Error $error->code: \";\n\t\t\tbreak;\n\t\tcase LIBXML_ERR_FATAL:\n\t\t\t$return .= \"Fatal Error $error->code: \";\n\t\t\tbreak;\n}\n\n\t$return .= trim($error->message) .\n\t\"\\n<br> Line: $error->line\" .\n\t\"\\n<br> Column: $error->column\";\n\n\tif ($error->file) \n\t{\n\t\t$return .= \"\\n<br> File: $error->file\";\n\t}\n\treturn \"$return<br>\\n\\n--------------------------------------------\\n\\n<br>\";\n}", "title": "" }, { "docid": "c09d19943b2e8a3a3c00d23fe4297c3c", "score": "0.47081155", "text": "function checkenc($data) {\n\t\t$tmp_pos = 0;\n\t\t$tmp_data = $data;\n\t\t$good_token = \"&#\"; //the good encoding we're looking for has this sequence after/including the crap out digit below\n\t\t$bad_token = \"&\"; //the digit that makes the parser crap out\n\t\twhile ($tmp_pos <= strlen($tmp_data)) {\n\t\t\t$tmp_pos = strpos($tmp_data, $bad_token, $tmp_pos);\n\t\t\tif ($tmp_pos && substr($tmp_data, $tmp_pos, 2) != $good_token) { //if & is not followed by #, get rid of the &\n\t\t\t\t$tmp_data = substr_replace($tmp_data, substr($tmp_data, $tmp_pos+1, 1), $tmp_pos, 1);\n\t\t\t\t$tmp_pos++;\n\t\t\t} elseif ($tmp_pos && substr($tmp_data, $tmp_pos, 2) == $good_token) { //if & is followed by #, then we're okay... leave the data alone and move on\n\t\t\t\t$tmp_data = $tmp_data;\n\t\t\t\t$tmp_pos++;\n\t\t\t} else { //make sure the while loop will be broken\n\t\t\t\t$tmp_pos = strlen($data) + 100;\n\t\t\t}\n\t\t}\n\t\treturn $tmp_data; //return the modified string\n\t}", "title": "" }, { "docid": "499b762ae99d4b403b99f5c1ce37d542", "score": "0.47051027", "text": "function cleanInput($strRawText,$strType)\n {\n \n if ($strType==\"Number\") {\n $strClean=\"0123456789.\";\n $bolHighOrder=false;\n }\n else if ($strType==\"VendorTxCode\") {\n $strClean=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.\";\n $bolHighOrder=false;\n }\n else {\n $strClean=\" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.,'/{}@():?-_&£$=%~<>*+\\\"\";\n $bolHighOrder=true;\n }\n \n $strCleanedText=\"\";\n $iCharPos = 0;\n \n do\n {\n // Only include valid characters\n $chrThisChar=substr($strRawText,$iCharPos,1);\n \n if (strspn($chrThisChar,$strClean,0,strlen($strClean))>0) { \n $strCleanedText=$strCleanedText . $chrThisChar;\n }\n else if ($bolHighOrder==true) {\n // Fix to allow accented characters and most high order bit chars which are harmless \n if (bin2hex($chrThisChar)>=191) {\n $strCleanedText=$strCleanedText . $chrThisChar;\n }\n }\n \n $iCharPos=$iCharPos+1;\n }\n while ($iCharPos<strlen($strRawText));\n \n $cleanInput = ltrim($strCleanedText);\n return $cleanInput;\n \n }", "title": "" }, { "docid": "94034e0a644a0d866c9a345fe1c2d796", "score": "0.4704058", "text": "function xss_clean( $str ) {\n\t\n\tif( !$str )\n\t\treturn $str;\n\t\n\tif( is_array( $str ) ) {\n\t\tforeach( $str as &$item ) {\n\t\t\t$item = $this->clean($item);\n\t\t}\n\t\treturn $str;\n\t}\n\t\n\t// strip any raw control characters that might interfere with our cleaning\n\t$str = self::strip_control_chars($str);\n\t\n\t// fix and decode entities (handles missing ; terminator)\n\t$str = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $str);\n\t$str = preg_replace('/(&#*\\w+)\\s+;/', '$1;', $str);\n\t$str = preg_replace('/(&#x*[0-9A-F]+);*/i', '$1;', $str);\n\t$str = html_entity_decode($str, ENT_COMPAT, 'Windows-1252');\n\t\n\t// strip any control characters that were sneakily encoded as entities\n\t$str = $this->strip_control_chars($str);\n\t\n\t// normalise line endings\n\t$str = str_replace(\"\\r\\n\", \"\\n\", $str);\n\t$str = str_replace(\"\\r\", \"\\n\", $str);\n\t\n\t// remove any attribute starting with \"on\" or xmlns\n\t$str = preg_replace('#(?:on[a-z]+|xmlns)\\s*=\\s*[\\'\"\\s]?[^\\'>\"]*[\\'\"\\s]?\\s?#i', '', $str);\n\n\t// remove javascript: and vbscript: protocols and -moz-binding CSS property\n\t$str = preg_replace('#([a-z]*)\\s*=\\s*([`\\'\"]*)\\s*j\\s*a\\s*v\\s*a\\s*s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*:#i', '$1=$2nojavascript...', $str);\n\t$str = preg_replace('#([a-z]*)\\s*=([\\'\"]*)\\s*v\\s*b\\s*s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*:#i', '$1=$2novbscript...', $str);\n\t$str = preg_replace('#([a-z]*)\\s*=([\\'\"]*)\\s*-moz-binding\\s*:#', '$1=$2nomozbinding...', $str);\n\n\t// only works in IE: <span style=\"width: expression(alert('XSS!'));\"></span>\n\t$str = preg_replace('#(<[^>]+?)style\\s*=\\s*[`\\'\"]*.*?expression\\s*\\([^>]*+>#is', '$1>', $str);\n\t$str = preg_replace('#(<[^>]+?)style\\s*=\\s*[`\\'\"]*.*?behaviour\\s*\\([^>]*+>#is', '$1>', $str);\n\t$str = preg_replace('#(<[^>]+?)style\\s*=\\s*[`\\'\"]*.*?s\\s*c\\s*r\\s*i\\s*p\\s*t\\s*:*[^>]*+>#is', '$1>', $str);\n\n\t// remove namespaced elements (we do not need them)\n\t$str = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $str);\n\n\t// remove data URIs\n\t$str = preg_replace(\"#data:[\\w/]+;\\w+,[\\w\\r\\n+=/]*#i\", \"data: not allowed\", $str);\n\n\t// remove really unwanted tags\n\tdo {\n\t\t$old = $str;\n\t\t$str = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|body|embed|frame(?:set)?|head|html|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $str);\n\t}\n\twhile ($old !== $str);\n\n\treturn $str;\n\t//return mb_convert_encoding($str, 'HTML-ENTITIES', 'ISO-8859-1');\n\n}", "title": "" }, { "docid": "f8c0069e0a33ef038b5c00fe7320baee", "score": "0.46977988", "text": "public function test_entity_fix()\n\t{\n\t\t$string = '8237'; // 0x202D\n\t\t$this->assertEmpty(Util::entity_fix($string));\n\t}", "title": "" }, { "docid": "f5824532839e24eb0a50bd2bb4adb22a", "score": "0.46893546", "text": "public function testConvenioInvalidFormatWithOneMoreCharacter() {\n $this->assertFalse(BoletoValidator::convenio('85890000460-9 52460179160-5 60759305086-5 83148300001-09'));\n }", "title": "" }, { "docid": "a2a9c362f46f6d0ff46643c6a14dc9f9", "score": "0.46832716", "text": "private function stripBadUtf8()\n {\n return !empty($this->transportInfo['body']) && !empty($this->transportInfo['body']['strip_bad_utf8']);\n }", "title": "" }, { "docid": "4653cca84ff1aeff4e2324f07cdb6bcd", "score": "0.4678467", "text": "static public function sanitize_xss($data)\n { \n // Fix &entity\\n;\n $data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n $data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n $data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n //$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n \n // Remove any attribute starting with \"on\" or xmlns\n $data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n \n // Remove javascript: and vbscript: protocols\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n $data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n \n // Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n $data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n \n // Remove namespaced elements (we do not need them)\n $data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n \n do\n {\n // Remove really unwanted tags\n $old_data = $data;\n $data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n }\n while ($old_data !== $data);\n \n // we are done...\n return $data;\n }", "title": "" }, { "docid": "43b76247eaf6f1c4350c00e20eccd472", "score": "0.46722132", "text": "function valid_string_text()\r\n {\r\n return 'Must not contain angle brackets (&lt; &gt;)';\r\n }", "title": "" }, { "docid": "440a63abcd7ceb05419981309d12ff78", "score": "0.46628517", "text": "function from_long_xml($xmlFragmentString)\r\n{\r\n return (string)strip_tags($xmlFragmentString);\r\n}", "title": "" }, { "docid": "6de26ebf53fbe8050365866c9044f961", "score": "0.46553677", "text": "public function message()\n {\n return 'The :attribute xml data is invalid.';\n }", "title": "" }, { "docid": "694db80957c385943236d98a730f6b0d", "score": "0.46521917", "text": "public function getParsingErrorMessage():string;", "title": "" }, { "docid": "d4f8016532b4d181f7a10a0e64f43f0a", "score": "0.46514654", "text": "function formatXmlString_legacy($xml) { \n \n // add marker linefeeds to aid the pretty-tokeniser (adds a linefeed between all tag-end boundaries)\n $xml = preg_replace('/(>)(<)(\\/*)/', \"$1\\n$2$3\", $xml);\n \n // now indent the tags\n $token = strtok($xml, \"\\n\");\n $result = ''; // holds formatted version as it is built\n $pad = 0; // initial indent\n $matches = array(); // returns from preg_matches()\n \n // scan each line and adjust indent based on opening/closing tags\n while ($token !== false) : \n \n // test for the various tag states\n \n // 1. open and closing tags on same line - no change\n if (preg_match('/.+<\\/\\w[^>]*>$/', $token, $matches)) : \n $indent=0;\n // 2. closing tag - outdent now\n elseif (preg_match('/^<\\/\\w/', $token, $matches)) :\n $pad--;\n // 3. opening tag - don't pad this one, only subsequent tags\n elseif (preg_match('/^<\\w[^>]*[^\\/]>.*$/', $token, $matches)) :\n $indent=1;\n // 4. no indentation needed\n else :\n $indent = 0; \n endif;\n \n // pad the line with the required number of leading spaces\n $line = str_pad($token, strlen($token)+$pad, ' ', STR_PAD_LEFT);\n $result .= $line . \"\\n\"; // add to the cumulative result, with linefeed\n $token = strtok(\"\\n\"); // get the next token\n $pad += $indent; // update the pad size for subsequent lines \n endwhile; \n \n return $result;\n}", "title": "" }, { "docid": "99305aca7a867b1e5c13c959bc50a52a", "score": "0.4641957", "text": "protected function formatData()\n {\n if (!empty($this->rawData['@attributes']['id'])) {\n $this->id = $this->rawData['@attributes']['id'];\n\n unset($this->rawData['@attributes']);\n }\n\n if (count($this->rawData)) {\n foreach ($this->rawData as $item => $value) {\n $itemMatches = null;\n\n if (preg_match($this->notamItemPattern, $item, $itemMatches)) {\n if (!empty($itemMatches[1])) {\n if (!empty($value) && !is_array($value)) {\n array_push(\n $this->notam,\n sprintf(\"%s) %s\", $itemMatches[1], (string) $value)\n );\n }\n\n if ($itemMatches[1] == 'Q') {\n $coordMatches = null;\n\n if (preg_match($this->coordinatesPattern, $value, $coordMatches)) {\n $this->parseCoordinates($coordMatches);\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "f90b4664ce5e63030f2a2f82adb87b05", "score": "0.462769", "text": "public function message()\n {\n return 'The number input must be prefixed with 081';\n }", "title": "" }, { "docid": "f788a021e4e3b71ea4da6d9f59f57c7d", "score": "0.46268663", "text": "function tidy_is_xml () {}", "title": "" }, { "docid": "95836cb50ee04b984a15de0711f8f7ca", "score": "0.46262914", "text": "function msgfmt_parse_message($locale, $value) {}", "title": "" }, { "docid": "fa9196fd2f965238fc55a0f09249ecf4", "score": "0.46252698", "text": "function remove0x($string) {\n if(strtolower(substr($string,0,2))=='0x')\n $string=substr($string,2);\n\n return $string;\n }", "title": "" }, { "docid": "2eab39db8d869c5b038a53d9f25fb990", "score": "0.46238205", "text": "function xml_safe($str) {\n $str = str_replace('<', '&lt;', $str);\n $str = str_replace('>', '&gt;', $str);\n $str = str_replace('&', '&amp;', $str);\n $str = str_replace(\"'\", '&apos;', $str);\n $str = str_replace('\"', '&quot;', $str);\n\n return $str;\n }", "title": "" }, { "docid": "6fb1db4bdf8a2cc0b93fb494e5389192", "score": "0.4623719", "text": "private function repairWordML($data)\n {\n //This is to fix the problem with empty cells in a table (a Word bug)\n $data = str_replace('</w:tcPr></w:tc>', '</w:tcPr><w:p /></w:tc>', $data);\n //We also clean extra line feeds generated by the parser after <br /> tags that may give problems with the rendering of WordML\n $data = preg_replace('/<w:br \\/><w:t xml:space=\"preserve\">[\\n\\r]/', '<w:br /><w:t xml:space=\"preserve\">', $data);\n //can not put two tables together\n $data = preg_replace('/<\\/w:tbl><w:tbl>/i', '</w:tbl><w:p /><w:tbl>', $data);\n return $data;\n }", "title": "" }, { "docid": "3646b0ee444715e6dcb52ff704b16b49", "score": "0.46227166", "text": "public function toXML()\r\n {\r\n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' . PHP_EOL\r\n .'<wtf>' . PHP_EOL;\r\n \r\n if (isset($this->state)) {\r\n $xml .= $this->state->toXML();\r\n }\r\n if (isset($this->response)) {\r\n $xml .= \"<response>{$this->response}</response>\" . PHP_EOL;\r\n }\r\n if (isset($this->chat)) {\r\n $xml .= '<chat>' . PHP_EOL;\r\n foreach ($this->chat as $msg) {\r\n $msg = htmlspecialchars($msg);\r\n $xml .= \"<msg>$msg</msg>\" . PHP_EOL;\r\n }\r\n $xml .= '</chat>' . PHP_EOL;\r\n }\r\n if (isset($this->error)) {\r\n $msg = htmlspecialchars($this->error);\r\n $xml .= \"<error><msg>$msg</msg><url>./</url></error>\" . PHP_EOL;\r\n } \r\n \r\n $xml .= '</wtf>';\r\n \r\n return $xml;\r\n }", "title": "" }, { "docid": "5bfe8ff653f9528fd7a5b36de0623a11", "score": "0.46203676", "text": "public static function getZipCodeValidationFailMessage() {\n $outgoingMessage = new TextMessage(\"Sorry! That's not a zip code that we can accept. It should be in one of the following formats:\\n12345\\n12345-6789\");\n return $outgoingMessage;\n }", "title": "" }, { "docid": "2d4617dea8812318efcc4bfb79d9b7a1", "score": "0.4601436", "text": "private function cleanTemplateTRPR()\n {\n $this->_xml = preg_replace('/__GENERATETRPR__/', '', $this->_xml);\n }", "title": "" }, { "docid": "6aabd682203a09619ec288244a2aae0b", "score": "0.45995036", "text": "private function cleanXmlBeforeAssert($xml)\n {\n return preg_replace('~(*BSR_ANYCRLF)\\R~', \"\\r\\n\", $xml);\n }", "title": "" }, { "docid": "b8e9b73ba6cdcff3169559876f9a102e", "score": "0.459478", "text": "protected function cleanMsg($msg)\n {\n $words = array('question', 'error', 'comment', 'info');\n return preg_replace('~</?(' . implode('|', $words) . ')>~i', '', $msg);\n }", "title": "" }, { "docid": "bf520dbe0115843433511706bb80069a", "score": "0.4593052", "text": "protected function parseGeneralValues()\n {\n $this->Container->Metadata->setTimestampAndTimezoneOffsetWithUtcFixFrom((string)$this->Xml->time);\n\n if (strlen((string)$this->Xml->time) == 19) {\n $this->Container->Metadata->setTimezoneOffset(null);\n }\n\n if (!empty($this->Xml->sportType)) {\n $this->Container->Metadata->setSportName((string)$this->Xml->sportType);\n }\n\n if (!empty($this->Xml->device)) {\n $string = (string)$this->Xml->device->make.', '.((string)$this->Xml->device->model);\n\n $this->Container->Metadata->setCreator('', $string.' ('.((string)$this->Xml->device['id']).')');\n }\n\n if (!empty($this->Xml->cmt)) {\n $this->Container->Metadata->setDescription((string)$this->Xml->cmt);\n }\n }", "title": "" }, { "docid": "279b5fa1edb748faadca505f0309138f", "score": "0.4569995", "text": "public function testXMLInvalidIP() {\n $ipq = $this->_ipv->xml(self::INVALID_IP);\n }", "title": "" }, { "docid": "bf3d0372d53353d8a2cc97828a9cf366", "score": "0.456803", "text": "private function cleanTemplateTcPr()\n {\n $this->_xml = preg_replace('/__GENERATETCPR__/', '', $this->_xml);\n }", "title": "" }, { "docid": "b08e81199f3f8949d44a1eea91734bd3", "score": "0.45648628", "text": "function formatDocument($number):string {\n $document = preg_replace(\"/[^0-9]/\", \"\", $number );\n $type = NULL;\n\n if(strlen($document) == 11){\n $type = \"CPF\";\n }elseif(strlen($document) == 14){\n $type = \"CNPJ\";\n }elseif (strlen($document) == 9){\n $type = \"RG\";\n }\n\n switch ($type){\n default:\n $formatNumber = \"Não foi possível definir o tipo de dado\";\n break;\n\n case \"CPF\":\n $firstBlock = substr($document, 0, 3);\n $secondBlock = substr($document, 3, 3);\n $thirdBlock = substr($document, 6, 3);\n $verifyingDigit = substr($document, -2);\n $formattedDocument = $firstBlock . \".\" . $secondBlock . \".\" . $thirdBlock . \"-\" . $verifyingDigit;\n break;\n\n case \"CNPJ\":\n $firstBlock = substr($document, 0, 2);\n $secondBlock = substr($document, 2, 3);\n $thirdBlock = substr($document, 5, 3);\n $fourthBlock = substr($document, 8, 4);\n $verifyingDigit = substr($document, -2);\n $formattedDocument = $firstBlock . \".\" . $secondBlock . \".\" . $thirdBlock . \"/\" . $fourthBlock . \"-\" . $verifyingDigit;\n break;\n\n case \"RG\":\n $firstBlock = substr($document, 0, 2);\n $secondBlock = substr($document, 2, 3);\n $thirdBlock = substr($document, 5, 3);\n $verifyingDigit = substr($document, -2);\n $formattedDocument = $firstBlock . \".\" . $secondBlock . \".\" . $thirdBlock . \"-\" . $verifyingDigit;\n break;\n }\n\n return $formattedDocument;\n}", "title": "" }, { "docid": "a3080438ddc970d815b3a883c96b5864", "score": "0.45646155", "text": "protected function normalize(): void\n {\n if (strlen($this->hex) === 6) {\n $this->convert = array( $this->hex[0] . $this->hex[1], $this->hex[2] . $this->hex[3], $this->hex[4] . $this->hex[5] );\n } elseif (strlen($this->hex ) === 3) {\n $this->convert = array( $this->hex[0] . $this->hex[0], $this->hex[1] . $this->hex[1], $this->hex[2] . $this->hex[2] );\n } else {\n throw new HexConverterFormatException('Format sorunu: ' . $this->hex);\n }\n }", "title": "" }, { "docid": "555bb81bdeeb37a08bf337f520cf9717", "score": "0.45638642", "text": "function clean_value ( $val )\n{\n\tif ( $val != '' )\n\t{\n\t\t// I think this block of slightly modified code came from IPB.\n\t\t/*$val = str_replace ('&#032;',\t\t' ',\t\t$val);\n\t\t$val = str_replace ('&',\t\t'&amp;',\t$val);\n\t\t$val = str_replace ('<!',\t\t'&#60;&#33;',\t$val);\n\t\t$val = str_replace ('-->',\t\t'--&#62;',\t$val);\n\t\t$val = preg_replace ('/<script/i',\t'&#60;script',\t$val);\n\t\t$val = str_replace ('>',\t\t'&gt;',\t\t$val);\n\t\t$val = str_replace ('<',\t\t'&lt;',\t\t$val);\n\t\t$val = preg_replace ('/\\|/',\t\t'&#124;',\t$val);*/\n\t\t\n\t\t$val = stripslashes ($val);\n\t\t$val = str_replace (\"\\r\\n\",\t\t\"\\n\",\t\t$val);\t// Win32 => new line\n\t\t$val = str_replace (\"\\r\",\t\t\"\\n\",\t\t$val);\t// Mac => new line\n\t\t//$val = str_replace ('!',\t\t'&#33;',\t$val);\n\t\t\n\t\t$val = htmlspecialchars ($val);\n\n\t\t// Multibyte characters fix (could do it properly, but this is the easiest way and it works relatively well)\n\t\t$val = preg_replace ('/&amp;#([0-9]+);/', '&#$1;', $val);\n\t\t$val = preg_replace ('/&amp;#x([A-Z0-9]+);/', '&#x$1', $val);\n\t}\n\n\treturn $val;\n}", "title": "" }, { "docid": "51a1f994a4e35c78b32af6c509a72651", "score": "0.45629892", "text": "public function get_request_xml() {\n\n\t\t// Remove namespace\n\t\t$this->request_xml = preg_replace( '/[[:space:]]xmlns[^=]*=\"[^\"]*\"/i', '', $this->request_xml );\n\n\t\t// replace merchant authentication\n\t\t$this->request_xml = preg_replace( '/<name>[a-zA-Z0-9]*<\\/name>/', '<name>123456789</name>', $this->request_xml );\n\t\t$this->request_xml = preg_replace( '/<transactionKey>[a-zA-Z0-9]*<\\/transactionKey>/', '<transactionKey>123456789</transactionKey>', $this->request_xml );\n\n\t\t// replace real card number\n\t\t$this->request_xml = preg_replace( '/<cardNumber>[0-9]*<\\/cardNumber>/', '<cardNumber>0000000000000000</cardNumber>', $this->request_xml );\n\n\t\t// replace real CVV code\n\t\t$this->request_xml = preg_replace( '/<cardCode>[0-9]*<\\/cardCode>/', '<cardCode>000</cardCode>', $this->request_xml );\n\n\t\treturn $this->request_xml;\n\t}", "title": "" }, { "docid": "00201386edde0520fc17f39d4c4f8fae", "score": "0.45573086", "text": "public function xoopsCodeDecodeSafe( $text ) {\n\t\tif ( preg_match( '/[<>\\'\\\"]/', $text ) ) {\n\t\t\t$text = htmlspecialchars( str_replace( '\\\"', '\"', $text ), ENT_QUOTES );\n\t\t}\n\n\t\t$patterns[] = \"/\\[color=(['\\\"]?)([a-zA-Z0-9]*)\\\\1](.*)\\[\\/color\\]/sU\";\n\n\t\t$replacements[] = '<span style=\"color: #\\\\2;\">\\\\3</span>';\n\n\t\t//\t\t$patterns[] = \"/\\[size=(['\\\"]?)([a-z0-9-]*)\\\\1](.*)\\[\\/size\\]/sU\";\n\t\t//\t\t$replacements[] = '<span style=\"font-size: \\\\2;\">\\\\3</span>';\n\t\t//\t\t$patterns[] = \"/\\[font=(['\\\"]?)([^;<>\\*\\(\\)\\\"']*)\\\\1](.*)\\[\\/font\\]/sU\";\n\t\t//\t\t$replacements[] = '<span style=\"font-family: \\\\2;\">\\\\3</span>';\n\n\t\t$patterns[] = \"/\\[b](.*)\\[\\/b\\]/sU\";\n\n\t\t$replacements[] = '<strong>\\\\1</strong>';\n\n\t\t$patterns[] = \"/\\[i](.*)\\[\\/i\\]/sU\";\n\n\t\t$replacements[] = '<i>\\\\1</i>';\n\n\t\t$patterns[] = \"/\\[u](.*)\\[\\/u\\]/sU\";\n\n\t\t$replacements[] = '<span style=\"text-decoration:underline\">\\\\1</span>';\n\n\t\t$patterns[] = \"/\\[d](.*)\\[\\/d\\]/sU\";\n\n\t\t$replacements[] = '<del>\\\\1</del>';\n\n\t\treturn preg_replace( $patterns, $replacements, $text );\n\t}", "title": "" }, { "docid": "60c3b69eb0fb580a929af1cd6d44794d", "score": "0.45543104", "text": "public function xml()\n\t{\n\t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n\t<valid>', $this->response->valid ? 'true' : 'false', '</valid>';\n\t}", "title": "" }, { "docid": "18d73b86dc6204b28f9b43a806ae4a05", "score": "0.4550153", "text": "function to_xml(){\r\n\t\tif ($this->skip) return \"\";\r\n\t\treturn $this->to_xml_start().$this->to_xml_end();\r\n\t}", "title": "" }, { "docid": "709440f684251406ddd4c37509318e1b", "score": "0.45487362", "text": "function _siemens_xml_esc( $str )\n{\n\t# the stupid Siemens phone does not understand &lt;, &gt, &amp;\n\t# - neither as named nor as numbered entities\n\t# it does understand ' as &apos;, &#039;, &#39;, &#x27;\n\t# and \" as $quot;, &#034;, &#34;, &#x22;\n\treturn str_replace(\n\t\tarray('<', '>', '&', '\\'' , '\"' ),\n\t\tarray('' , '' , '+', '&#39;', '&#34;'),\n\t$str);\n}", "title": "" }, { "docid": "1142db703cc1b2ecb7f1bc6c73b101f1", "score": "0.45450118", "text": "public function validate()\n {\n return \"AT+CNUM=?\\r\";\n }", "title": "" }, { "docid": "ded937414fd09fbff749f236d71a2fef", "score": "0.45436585", "text": "function tidy_repair_string () {}", "title": "" }, { "docid": "db821486f1e514f3dbc639ce85597763", "score": "0.45417386", "text": "private function scanEscapedUnicodeSequence(): string\n {\n $bytes = $this->byteIterator;\n $sequence = \"\";\n\n for ($i = 0; $i < 4; $i++) {\n $byte = $bytes->current();\n $bytes->next();\n if (!\\ctype_xdigit($byte)) {\n throw new ParseException($this->getExceptionMessage($byte));\n }\n $sequence .= $byte;\n }\n\n return $sequence;\n }", "title": "" }, { "docid": "54f9a6193215b3f3ebac9df659ea6cf5", "score": "0.4536222", "text": "private function sanitize_xml($xml)\n\t{\n\t\t# convert \"&\" to \"&amp;\" but not \"&crap;\" to \"&amp;crap;\"\n\t\t$sanitized_xml = preg_replace('/&(?!\\w+;)/', '&amp;', $xml);\n\n\t\treturn $sanitized_xml;\n\t}", "title": "" }, { "docid": "5cbee5cf962bfa039b77113c6ed56b84", "score": "0.45180947", "text": "function xml_set_character_data_handler ($parser, $handler) {}", "title": "" } ]
da32c5a6513dbc388ae7d5dafd31825e
Check whether the row contains modifications
[ { "docid": "4e5ff998e5f228d4eddef87551753764", "score": "0.66291016", "text": "function isDirty() {\n\t\tforeach ($this->cell as $cell) {\n\t\t\tif ($cell->isDirty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "a7086c827c76e9ccb6266d374fa2efa3", "score": "0.74574906", "text": "public function isModified()\n {\n return !!$this->modifiedColumns;\n }", "title": "" }, { "docid": "598912530fe73b7e0904fd497587d8ee", "score": "0.6842303", "text": "function hasUpdateRowPermission()\n \t{\n \treturn $this->perms_map[\"updaterow\"];\n \t}", "title": "" }, { "docid": "2c6158fd3a2e0ef9e89569727dcf7f1f", "score": "0.6833473", "text": "public function hasChanges();", "title": "" }, { "docid": "41ea9e20e0cd7bb001bed87d2fbb6dff", "score": "0.6773964", "text": "public function hasRowsAffected(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "d65c0d475c5ccbbc546105cca8ee693a", "score": "0.67301434", "text": "public static function hasModifiedRecords()\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\PostgresConnection $instance */\n return $instance->hasModifiedRecords();\n }", "title": "" }, { "docid": "8436c7cfdbf9b6af65193f86a4b7e73c", "score": "0.6715905", "text": "public function affected(){\n\t\tif(mysqli_affected_rows($this->db) == 1):\n\t\t\treturn true;\n\t\tendif;\n\t}", "title": "" }, { "docid": "baa0187da7f1cf637a235d5d0c20318b", "score": "0.6665226", "text": "public function isModified() {\n\t\treturn $this->data !== $this->old_data;\n\t}", "title": "" }, { "docid": "83c16a8aea8e3b33ed40157372002872", "score": "0.66476876", "text": "public function hasCommitRow(){\n return $this->_has(9);\n }", "title": "" }, { "docid": "773930cd57e3256a6d2d886ea7dc7fbf", "score": "0.6623749", "text": "public function checkAlteredColumns() {\n // Add modifier field for each change\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "8c7689c0eb4a9a9a5f0acd2afe3fd70b", "score": "0.65397894", "text": "public function isColumnModified($col)\n {\n return $this->modifiedColumns && isset($this->modifiedColumns[$col]);\n }", "title": "" }, { "docid": "e89f493962d0502eedcebe7054dbde38", "score": "0.6524981", "text": "public function updateOK() {\r\n\t\t\treturn ($this->_db->affectedRows() >= 0);\r\n\t\t}", "title": "" }, { "docid": "a8611ef847c98873d525daae07019e4d", "score": "0.6507422", "text": "public function hasModifications()\n {\n return count($this->getExpectedModifications()) > 0;\n }", "title": "" }, { "docid": "5396e4d98201ee086a297f6d5328fc88", "score": "0.6499101", "text": "public function isModified ()\r\n {\r\n return (count($this->modifiedFields) > 0) ? $this->modifiedFields : false;\r\n }", "title": "" }, { "docid": "2935b07000ff7d17a9a0bfd07f94150d", "score": "0.64590657", "text": "public function hasBeenModified();", "title": "" }, { "docid": "72364f64cbdad8d7d33c1daab0f9b95a", "score": "0.6440421", "text": "protected function hasChanged()\n {\n return (boolean)count($this->changed_data);\n }", "title": "" }, { "docid": "8ef93244a794657572dbc81bff10687f", "score": "0.64298517", "text": "public function isModified()\n {\n return !empty($this->modified_fields) || !empty($this->modified_attributes);\n }", "title": "" }, { "docid": "98dc6bde39f9828fb86f8c567a63541f", "score": "0.63930947", "text": "function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}", "title": "" }, { "docid": "98dc6bde39f9828fb86f8c567a63541f", "score": "0.63930947", "text": "function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}", "title": "" }, { "docid": "98dc6bde39f9828fb86f8c567a63541f", "score": "0.63930947", "text": "function isModified() {\n\t\t$modified = $this->_Modified;\n\t\tif ( !$modified && $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$modified = $modified || $oObject->isModified();\n\t\t\t}\n\t\t}\n\t\treturn $modified;\n\t}", "title": "" }, { "docid": "46cf97c449f624837981043fbe643499", "score": "0.6387317", "text": "public function isModified(): bool;", "title": "" }, { "docid": "86cd7fc63e042b5407c1d276bf056c4d", "score": "0.63343406", "text": "public function hasRow(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "38b9c2dc3a47b943ae47b6dc9a102e8f", "score": "0.6326342", "text": "public function isDirty();", "title": "" }, { "docid": "38b9c2dc3a47b943ae47b6dc9a102e8f", "score": "0.6326342", "text": "public function isDirty();", "title": "" }, { "docid": "38b9c2dc3a47b943ae47b6dc9a102e8f", "score": "0.6326342", "text": "public function isDirty();", "title": "" }, { "docid": "38b9c2dc3a47b943ae47b6dc9a102e8f", "score": "0.6326342", "text": "public function isDirty();", "title": "" }, { "docid": "e87f2bd95831d7941120cc3ce144021e", "score": "0.6281846", "text": "public function valid()\n\t{\n\t\treturn $this->offsetExists($this->_currentRow);\n\t}", "title": "" }, { "docid": "2046cb32b391d33d789e823f51b7699d", "score": "0.6270456", "text": "final public function hasAffected()\r\n {\r\n // return mysql_affected_rows() > 0;\r\n return $this->_pdocon->rowCount > 0;\r\n }", "title": "" }, { "docid": "ecf95e847917c5f176da8eabde03edd2", "score": "0.6239656", "text": "abstract public function hasCurrentRowData ();", "title": "" }, { "docid": "a1ad16e2b94aad7fd2aebcf2e844c300", "score": "0.6226176", "text": "public function isUpdated() {}", "title": "" }, { "docid": "abb45442670fdd92ffc56a695af1f57d", "score": "0.62100285", "text": "public function checkAddedColumns() {\n }", "title": "" }, { "docid": "ef99fc96172565d64d1749a59ea70323", "score": "0.61933404", "text": "public function hasPendingChanges()\n {\n if (count($this->itemsAdd) || count($this->nodesMove) || count($this->itemsRemove)) {\n return true;\n }\n foreach ($this->objectsByPath['Node'] as $item) {\n if ($item->isModified()) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f1f79530d450ca272fc545e031e0076d", "score": "0.6185235", "text": "public function sql_affected_rows() {}", "title": "" }, { "docid": "ed186d81513ad3fc0d946d791c39e463", "score": "0.6165548", "text": "public function hasMutations(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "7d0737cb5b66b28a4552a8e187968e37", "score": "0.61623484", "text": "public function hasChanges($fields_data) {\n return true;\n }", "title": "" }, { "docid": "993af59f1f77fdfa91e8ed1069e5709e", "score": "0.61618006", "text": "public function recordIsClean()\n {\n return empty($this->dirtyCols);\n }", "title": "" }, { "docid": "133dd9b743733d160551837b3dada7e0", "score": "0.6159859", "text": "final public function isModified()\n {\n return !empty($this->_modified);\n }", "title": "" }, { "docid": "3ceb285163429ed4c1668b0a249563ab", "score": "0.6137035", "text": "public function hasRowHistory()\n {\n return true;\n }", "title": "" }, { "docid": "3547f3367b5354d321a6057c6c8277f5", "score": "0.6133593", "text": "function check_del() {\r\n if ($_SESSION['login_level'] > 1) {\r\n foreach ($this->_rowid as $rowid) {\r\n if (!$this->get_row(array('rowid'=>$rowid,'author'=>$_SESSION['login_user'])))\r\n echo '<p>You may not modify this row</p>';\r\n return False;\r\n }\r\n }\r\n return True;\r\n }", "title": "" }, { "docid": "e306fd8fb7558a6975d4f78f5c35b267", "score": "0.6127052", "text": "public function affected_rows() {\n\t\t\n\t\tif (!$this->link) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn mysql_affected_rows($this->link);\n\t\t\n\t}", "title": "" }, { "docid": "c75342541a103186c85ca0c6199d97b5", "score": "0.6112554", "text": "public function hasBeenMutated();", "title": "" }, { "docid": "ec01e8d800e835fce1e1a39757e686e4", "score": "0.61122036", "text": "public function hasMutations(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "e6a33df7ca65818a9c9d724ebabe6c9b", "score": "0.610544", "text": "public function isModificado() {\n\n $db = & $this->DB();\n $key = $db->GetOne(\"SELECT hash FROM wshash WHERE\n banco = ? AND\n tabela = ? AND\n chave = ?\",\n array($this->my_dbase, $this->_table,\n $this->GetPrimaryKeysValues()));\n\n return $this->getHash() != $key;\n }", "title": "" }, { "docid": "1b89c133d0a41acc9c64a3d0a09abbb4", "score": "0.60995036", "text": "public function checkRows()\n {\n for ($idx = 0; $idx < 9; $idx++) {\n if (!$this->checkRowAt($idx)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "62fba4100e786069c631a93ed9c281e5", "score": "0.60970354", "text": "public function is_modified()\n\t{\n\t\treturn $this->dataModified;\n\t}", "title": "" }, { "docid": "23fe7bce8e3c087ce62985b0d9e56567", "score": "0.60850084", "text": "public function isFileUpdatedByContent() {\n $this->loadBaseFileData();\n $this->loadTargetFileData();\n\n // compare asean countries's records in base file with target file's records to decide the data was updated or not\n return json_encode($this->getBaseFileRecords()) !== json_encode($this->getTargetFileRecords());\n }", "title": "" }, { "docid": "3c88b37987fdd234f7f023e67ea1da7a", "score": "0.60782576", "text": "function prepare_update() {\r\n if ($_SESSION['login_level'] > 1) {\r\n foreach ($this->_rowid as $rowid) {\r\n if (!$this->get_row(array('rowid'=>$rowid,'author'=>$_SESSION['login_user']))) {\r\n echo '<p>You may not modify this row</p>';\r\n return False;\r\n }\r\n }\r\n }\r\n return True;\r\n }", "title": "" }, { "docid": "da5ec3b4df37248f2f40967ca58b3e74", "score": "0.6076266", "text": "public function get_affected_rows();", "title": "" }, { "docid": "7ef5d37837e0c41e8dfb13b81d84104f", "score": "0.6067895", "text": "public function hasRevisions() {\n\t\treturn (count($this->row->revisions) > 0);\n\t}", "title": "" }, { "docid": "85db3fb707f35fda76ffdda5e453ff7d", "score": "0.60653526", "text": "public function valid()\n {\n return $this->rowset->valid();\n }", "title": "" }, { "docid": "a504e5ac45e3394beef521efc097e219", "score": "0.6040319", "text": "public function valid() {\n return !is_null($this->currentRow);\n }", "title": "" }, { "docid": "5a606422b4f001b299563a9e756a25a2", "score": "0.60376334", "text": "public function isDirty()\n {\n return ($this->dirty['old'] !== $this->dirty['new']);\n }", "title": "" }, { "docid": "7d6ce1eeaf2ef5a0b36fcafa56eb10af", "score": "0.60359424", "text": "public function affected()\n {\n return mysql_affected_rows($this->link);\n \n }", "title": "" }, { "docid": "e892ab8d8c9a8682d4cda9545b3a21f5", "score": "0.60340893", "text": "public function isModified(): bool\n {\n return (bool) $this->modified;\n }", "title": "" }, { "docid": "cab01ff39e208f54824984708013466b", "score": "0.6032886", "text": "protected function _affectedRows() {\n return pg_affected_rows($this->result);\n }", "title": "" }, { "docid": "7fc581ee758dcf7d8613fe17ecb9630c", "score": "0.6023455", "text": "function affected_rows()\n\t{\n\t\treturn @mysql_affected_rows($this->m_link_id);\n\t}", "title": "" }, { "docid": "b45cffc128a549cff6b44dd787e446ea", "score": "0.60079414", "text": "public function isPrimaryKeyModified()\n {\n return $this->primary_key_modified;\n }", "title": "" }, { "docid": "58257301b5fe4e38c6fe23183f8fb8f1", "score": "0.6004627", "text": "public function valid()\n {\n return current($this->rows) !== false;\n }", "title": "" }, { "docid": "43856c2650001d69a3c549d498f5a0a8", "score": "0.5999797", "text": "public function isDirty()\n {\n return !($this->attributes === $this->original);\n }", "title": "" } ]
ca8f3287c0b2a22ed3cc453c01060716
/ | | Set Mimi Type | It will set default array of class i.e $allowed_extensions |
[ { "docid": "c821024f818f49aeaa25d31570e09519", "score": "0.0", "text": "private function set_mime_type( $file_path ) { \n\t\t\n\t\t/* by Function - mime_content_type */\n\t\tif( function_exists( 'mime_content_type' ) ) {\n\t\t\t$file_mime_type = @mime_content_type( $file_path );\n\t\t}\n\t\t\n\t\t/* by Function - mime_content_type */\n\t\telse if( function_exists( 'finfo_file' ) ) {\n\t\t\t\n\t\t\t$finfo = @finfo_open(FILEINFO_MIME);\n\t\t\t$file_mime_type = @finfo_file($finfo, $file_path);\n\t\t\tfinfo_close($finfo); \n\t\t\n\t\t}\n\t\t\n\t\t/* Default - FALSE */\n\t\telse {\n\t\t\t$file_mime_type = FALSE;\n\t\t }\n\t\t \n\t\t return $file_mime_type;\t \n\t\n\t}", "title": "" } ]
[ { "docid": "916726c0d7ad6aa2abcd0afc0004e62b", "score": "0.66366434", "text": "public function __setType($type){\n \t$this->type = $type;\n }", "title": "" }, { "docid": "dc43668778ab2941178673dcfc30b696", "score": "0.6496373", "text": "public function set_type($type);", "title": "" }, { "docid": "8907bdfad3195979d81fe2045011a9b8", "score": "0.63940257", "text": "public function type_set(string $type );", "title": "" }, { "docid": "b22ea91b84620023e4ac8e34ed90d30c", "score": "0.6372315", "text": "final function initType()\n\t{\n\t\t$this->setType(\"xmg\");\n\t}", "title": "" }, { "docid": "90a5a5adc7fe5c4b79bebc87152a1d09", "score": "0.6370587", "text": "public function setAllowedExtensions()\n\t{\n\t\t$numArgs = func_num_args();\n\t\t$args = func_get_args();\n\n\t\tif($numArgs == 1 && is_array($args[0]))\n\t\t\t$this->allowedExtensions = $args[0];\n\t\telseif($numArgs > 0)\n\t\t\t$this->allowedExtensions = $args;\n\t}", "title": "" }, { "docid": "5ba5013cb3445f01a003f319eb679f2e", "score": "0.6248516", "text": "protected function set_type() {\n\t\t$this->type = 'kirki-dimensions';\n\t}", "title": "" }, { "docid": "88420805faec655af4630dc5ef7db7ef", "score": "0.61350495", "text": "function setContentType($value) {\r\n $this->content_type = $value;\r\n }", "title": "" }, { "docid": "b89f815b55ac0e0587326cafeeb752cb", "score": "0.6116588", "text": "protected function register_default_types() {\n\t\trequire_once \"{$this->dir}/includes/fontpack.php\";\n\t\tOE_Icon_Picker_Fontpack::instance();\n\n\t\t/**\n\t\t * Allow themes/plugins to disable one or more default types\n\t\t * \n\t\t */\n\t\t$default_types = array_filter( (array) apply_filters( 'oe_icon_picker_default_types', $this->default_types ) );\n\n\t\t/**\n\t\t * Validate filtered default types\n\t\t */\n\t\t$default_types = array_intersect( $this->default_types, $default_types );\n\n\t\tif ( empty( $default_types ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $default_types as $filename => $class_suffix ) {\n\t\t\t$class_name = \"OE_Icon_Picker_Type_{$class_suffix}\";\n\n\t\t\trequire_once \"{$this->dir}/includes/types/{$filename}.php\";\n\t\t\t$this->registry->add( new $class_name() );\n\t\t}\n\t}", "title": "" }, { "docid": "01672c3097443f15fae380e5e6672aa2", "score": "0.6082034", "text": "function setAboutFileType($type) {\r\n\t\treturn $this->setData('type', $type);\r\n\t}", "title": "" }, { "docid": "d337414b92927ae9c7f5063cf7912dd7", "score": "0.6074869", "text": "public function setType( $type );", "title": "" }, { "docid": "d337414b92927ae9c7f5063cf7912dd7", "score": "0.6074869", "text": "public function setType( $type );", "title": "" }, { "docid": "d337414b92927ae9c7f5063cf7912dd7", "score": "0.6074869", "text": "public function setType( $type );", "title": "" }, { "docid": "3a27e962aaabb33d0ea0b85ecbcc68bb", "score": "0.6073914", "text": "private function set_allowed_extensions( $allowed_extensions = array() ) { \n\t\t\n\t\t$defaults = $this->get_allowed_extensions();\n\t\t$allowed_extensions = array_unique( $this->chip_parse_args( $allowed_extensions, $defaults ) );\n\t\t$this->allowed_extensions = $allowed_extensions;\t \n\t\n\t}", "title": "" }, { "docid": "52daf778f4656a22dd866100b434e8e0", "score": "0.6071469", "text": "private function setExtension($type)\n\t{\n\t\tswitch ($type) {\n\t\t\tcase 'twig':\n\t\t\t\t$this->extension = '.html.twig';\n\t\t\t\tbreak;\n\n case 'php':\n $this->extension = '.php';\n break;\n\n\t\t\tdefault:\n\t\t\t\t$this->extension = '.html';\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "d1b5e7d8784b72d0d7103e1ee4ae6131", "score": "0.6065435", "text": "function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "f8ca3a580e9f7304a37c0b5155485cba", "score": "0.6064826", "text": "public function setType($type) {\n \t\t\t$this->type = $type;\n \t\t}", "title": "" }, { "docid": "6cf81db33e8e594581bbc2e80e710f6e", "score": "0.6047012", "text": "public function setType($type) {\n if(in_array($type, $this->allowedTypes)) {\n $this->type = $type;\n } else {\n $this->type = FormElementComponent::TEXT_TYPE;\n }\n }", "title": "" }, { "docid": "32b602bd9a6cdcb08ee2dbf8ca89af5b", "score": "0.6035096", "text": "public function __construct()\n {\n \n $this->setType('television'); //setting the type to be a television on initialization\n \n }", "title": "" }, { "docid": "7946f66ee3f892be0ad36957f88a7577", "score": "0.60116696", "text": "protected function setModelType(): void\n {\n $namespaceArray = explode('\\\\', get_class($this));\n $lastPart = end($namespaceArray);\n $this->modelType = strtolower($lastPart);\n }", "title": "" }, { "docid": "4d12306648045ecd4bf858df72194b35", "score": "0.60059875", "text": "public function set_allowed_types($types)\n\t{\n\t\tif ( ! is_array($types) && $types == '*')\n\t\t{\n\t\t\t$this->allowed_types = '*';\n\t\t\treturn;\n\t\t}\n\t\t$this->allowed_types = explode('|', $types);\n\t}", "title": "" }, { "docid": "2a9766fdc7b5e700da3b3de06d52d4b4", "score": "0.60043263", "text": "public function setType( $type )\n {\n }", "title": "" }, { "docid": "fe51c5ff0cf9e80d43e0325d4e56033c", "score": "0.5997937", "text": "abstract public function type($set_type = false);", "title": "" }, { "docid": "3de51edc27f73fceb1d848ee458b3ecd", "score": "0.59818155", "text": "function setAllowedTypes($a_types)\r\n\t{\r\n\t\t$this->allowed_types = $a_types;\r\n\t}", "title": "" }, { "docid": "97b34a05118c23ddfce19c81d2463036", "score": "0.5981346", "text": "private function __construct() {\n\t\t$types['image'] = Array('png', 'gif', 'jpeg', 'jpg'=>'jpeg');\n\t\t$types['text'] = Array('html', 'htm'=>'html', 'css', 'rtf', 'xml', 'xsl');\n\t\t$types['audio'] = Array('mp3', 'mp4', 'wav');\n\t\t$types['video'] = Array('mov'=>'quicktime', 'mpeg');\n\t\t$types['application'] = Array('js'=>'javascript', 'json'=>'javascript',\n\t\t 'exe'=>'octet-stream', 'zip', 'tar', 'pdf',\n\t\t\t\t\t\t\t\t 'doc'=>'msword', 'swf'=>'x-shockwave-flash',\n\t\t\t\t\t\t\t\t\t 'sit'=>'stuffit', 'rar'=>'x-rar');\n\t\t$this->types = $types;\n\t}", "title": "" }, { "docid": "e2e9dfff3b3d46bc69363c7324613b05", "score": "0.5956865", "text": "function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "ed3916aafbe461c014bc9bf5c6907c04", "score": "0.5926306", "text": "protected function setAddonType()\n {\n if (!$this->addonType) {\n\n $addonType = explode('\\\\', (new \\ReflectionClass($this))->getName());\n\n $this->addonType = snake_case($addonType[3]);\n }\n }", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "f41fcbe033f13ace23d0b6681da472ab", "score": "0.5924706", "text": "public function setType($type);", "title": "" }, { "docid": "5e119441f32d5b6f0f8160c9184168b4", "score": "0.59230775", "text": "public function setType($type){\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "b1d35d1ecb0ce61504ef550b928fb138", "score": "0.5916483", "text": "public function setType($type)\n {\n $this->_type = $type;\n }", "title": "" }, { "docid": "13b1ee174a77ee4dbeb0eedb0612e5a1", "score": "0.5913441", "text": "public function setAllowedContentTypes(?array $value): void {\n $this->getBackingStore()->set('allowedContentTypes', $value);\n }", "title": "" }, { "docid": "d1aa0e07333c62e7e6c838c0ef4feaa8", "score": "0.5910067", "text": "private function setFieldType(){\n\t\t$attributes = $this->getAttributes();\n\t\tforeach($attributes as $attribute){\n\t\t\t$this->filterable[$attribute->getAttributeCode()] = $attribute->getData('is_filterable');\n\t\t\t$this->fieldType[$attribute->getAttributeCode()] = $attribute-> getFrontendInput();\n\t\t}\n\t}", "title": "" }, { "docid": "cf89b29373a3cf36b295334cbba6ce3c", "score": "0.5903856", "text": "function get_type($i){$this->type = $i;}", "title": "" }, { "docid": "7be1e2a116fc3c46b9435c3fd1d343c7", "score": "0.58994055", "text": "public function setFileType($type) {\n\t\t$this->type=$type;\n\t\t$this->ftInst=new $type($this);\n\t}", "title": "" }, { "docid": "13e24a788045177aa5f39cd5a3105212", "score": "0.5887026", "text": "private function _setType($type) {\n \n /** if $type isn't a string or is empty then return false */\n if (empty($type) || gettype($type) != 'string') { return false; }\n \n /** if the type has been set - then add settings via settings function */\n if (array_key_exists($type, $this->types)) { $this->settings($this->types[$type]); }\n }", "title": "" }, { "docid": "35654402a7f436320748ddf1018df475", "score": "0.5874276", "text": "function setDefaultDataType($type){\n $result = false;\n if (is_string($type) && strlen($type) < $this->MAX) {\n $type = trim($type);\n $result = $this->defaultDataType;\n $this->defaultDataType = $type;\n }\n return $result;\n }", "title": "" }, { "docid": "5f699002e58e722b40e6fee6fc824649", "score": "0.58547825", "text": "public function setFileType(string $fileType)\n\t{\n\t\t$this->fileType=$fileType; \n\t\t$this->keyModified['file_type'] = 1; \n\n\t}", "title": "" }, { "docid": "9896dd93cb1cf0e4d34bd23dc99e5b4a", "score": "0.58484405", "text": "function setContentType($content_type = null) {\n global $VALID_CONTENT_TYPES;\n if (!empty($content_type) && in_array($content_type, $VALID_CONTENT_TYPES)) {\n $this->content_type = $content_type;\n }\n }", "title": "" }, { "docid": "c1d9d6c46d4e454287b631b21677151c", "score": "0.58363813", "text": "function setType( $new_type ) {\n\t\t$this->type = $new_type;\n\t}", "title": "" }, { "docid": "1b38d8f3c26f5bb636ac986cfef1a75b", "score": "0.58329093", "text": "public function setType($type) {\n\t\t\n\t\t$this->type = $type;\n\t\t\n\t}", "title": "" }, { "docid": "7f3cd9bd7fb550930623852d13891a2b", "score": "0.5828902", "text": "public function setFileType(Choice $fileType)\n\t{\n\t\t$this->fileType=$fileType; \n\t\t$this->keyModified['file_type'] = 1; \n\n\t}", "title": "" }, { "docid": "37702c6a79effc5b48ede4829391274e", "score": "0.58242846", "text": "public function type_set(string $type )\n {\n $this->_type = $type;\n }", "title": "" }, { "docid": "16cc9edced0fdc87d2a85e94c913e4f1", "score": "0.5817079", "text": "function set_type() {\n\n\t\treturn self::$type;\n\n\t}", "title": "" }, { "docid": "71ff46bd315a683a2a3baa42f7d2ffdf", "score": "0.58048356", "text": "public function setType($value){\n $this->_type = $value;\n }", "title": "" }, { "docid": "1f30a1c62ac908570336929d7ad0dc97", "score": "0.5798568", "text": "protected function _setFormType($val){\n\t\t$this->_formType = $val;\n\t}", "title": "" }, { "docid": "6bd1320e24bee95c24d7864f1bdb3b38", "score": "0.5779852", "text": "public function setType($type)\n\t{\n\t\tif(preg_match('#^(.*)?_?(.*)_name$#',$type))\n\t\t{\n\t\t\t$explodedType=explode('_',$type);\n\t\t\tif(count($explodedType)==3)\n\t\t\t{\n\t\t\t\t$this->type=$explodedType[0].' '.$explodedType[1];\n\t\t\t}else{\n\t\t\t\t$this->type=$explodedType[0];\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t$this->type = $type;\n\t\t}\n\t}", "title": "" }, { "docid": "c7e0c7d21c1ec06f0e0652eeac04d7bb", "score": "0.5772846", "text": "function validation_types() {\r\n\r\n\t\t\t$array[0] = __('None','ultimate-member');\r\n\t\t\t$array['alphabetic'] = __('Alphabetic value only','ultimate-member');\r\n\t\t\t$array['alpha_numeric'] = __('Alpha-numeric value','ultimate-member');\r\n\t\t\t$array['english'] = __('English letters only','ultimate-member');\r\n\t\t\t$array['facebook_url'] = __('Facebook URL','ultimate-member');\r\n\t\t\t$array['google_url'] = __('Google+ URL','ultimate-member');\r\n\t\t\t$array['instagram_url'] = __('Instagram URL','ultimate-member');\r\n\t\t\t$array['linkedin_url'] = __('LinkedIn URL','ultimate-member');\r\n\t\t\t$array['vk_url'] = __('VKontakte URL','ultimate-member');\r\n\t\t\t$array['lowercase'] = __('Lowercase only','ultimate-member');\r\n\t\t\t$array['numeric'] = __('Numeric value only','ultimate-member');\r\n\t\t\t$array['phone_number'] = __('Phone Number','ultimate-member');\r\n\t\t\t$array['skype'] = __('Skype ID','ultimate-member');\r\n\t\t\t$array['soundcloud'] = __('SoundCloud Profile','ultimate-member');\r\n\t\t\t$array['twitter_url'] = __('Twitter URL','ultimate-member');\r\n\t\t\t$array['unique_email'] = __('Unique E-mail','ultimate-member');\r\n\t\t\t$array['unique_value'] = __('Unique Metakey value','ultimate-member');\r\n\t\t\t$array['unique_username'] = __('Unique Username','ultimate-member');\r\n\t\t\t$array['unique_username_or_email'] = __('Unique Username/E-mail','ultimate-member');\r\n\t\t\t$array['url'] = __('Website URL','ultimate-member');\r\n\t\t\t$array['youtube_url'] = __('YouTube Profile','ultimate-member');\r\n\t\t\t$array['custom'] = __('Custom Validation','ultimate-member');\r\n\r\n\t\t\t/**\r\n\t\t\t * UM hook\r\n\t\t\t *\r\n\t\t\t * @type filter\r\n\t\t\t * @title um_admin_field_validation_hook\r\n\t\t\t * @description Extend validation types\r\n\t\t\t * @input_vars\r\n\t\t\t * [{\"var\":\"$types\",\"type\":\"array\",\"desc\":\"Validation Types\"}]\r\n\t\t\t * @change_log\r\n\t\t\t * [\"Since: 2.0\"]\r\n\t\t\t * @usage add_filter( 'um_admin_field_validation_hook', 'function_name', 10, 1 );\r\n\t\t\t * @example\r\n\t\t\t * <?php\r\n\t\t\t * add_filter( 'um_admin_field_validation_hook', 'my_admin_field_validation', 10, 1 );\r\n\t\t\t * function my_admin_field_validation( $types ) {\r\n\t\t\t * // your code here\r\n\t\t\t * return $types;\r\n\t\t\t * }\r\n\t\t\t * ?>\r\n\t\t\t */\r\n\t\t\t$array = apply_filters( 'um_admin_field_validation_hook', $array );\r\n\t\t\treturn $array;\r\n\t\t}", "title": "" }, { "docid": "a4a7607c5067b0a1c644539baa3a9ad1", "score": "0.5750903", "text": "public function set_type ($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "a4a7607c5067b0a1c644539baa3a9ad1", "score": "0.5750903", "text": "public function set_type ($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "19a3758c67c7b82d38ee2dcdd8ec8757", "score": "0.5747153", "text": "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t\t$this->setAttribute('class', \"msg {$this->type}\");\n\t}", "title": "" }, { "docid": "10d0e98053efdb496156ed209505a309", "score": "0.5741232", "text": "public function validType(array $allowed)\n\t{\n\t\t$this->validation['type'] = $allowed;\n\t}", "title": "" }, { "docid": "3a3c37302a6119763ec1caf4a9bce29d", "score": "0.57289916", "text": "public function set_type($type)\n {\n $this->type = $type;\n }", "title": "" }, { "docid": "964bd7450d63c1fa5cb0b180b770ef9b", "score": "0.57278824", "text": "function SetMessageType() {\r\n if(count($this->attachment) < 1 && strlen($this->AltBody) < 1)\r\n $this->message_type = \"plain\";\r\n else\r\n {\r\n if(count($this->attachment) > 0)\r\n $this->message_type = \"attachments\";\r\n if(strlen($this->AltBody) > 0 && count($this->attachment) < 1)\r\n $this->message_type = \"alt\";\r\n if(strlen($this->AltBody) > 0 && count($this->attachment) > 0)\r\n $this->message_type = \"alt_attachments\";\r\n }\r\n }", "title": "" }, { "docid": "7218ee34d99e9793687a6018340facea", "score": "0.5724282", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "7218ee34d99e9793687a6018340facea", "score": "0.5724282", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "f7f7c74588403964b346f27e0917aa5c", "score": "0.5720706", "text": "private static function _setMimeType() {\n\t\t// Set the mime type in case we are directly returning the new thumbnail image.\n\t\tswitch(static::$_image->ext) {\n\t\t\tcase 'jpg':\n\t\t\tcase 'jpeg':\n\t\t\tdefault:\n\t\t\t\tstatic::$_image->mimeType = 'image/jpeg';\n\t\t\tbreak;\n\t\t\tcase 'png':\n\t\t\t\tstatic::$_image->mimeType = 'image/png';\n\t\t\tbreak;\n\t\t\tcase 'gif':\n\t\t\t\tstatic::$_image->mimeType = 'image/gif';\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.5717174", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.5717174", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.5717174", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "0116000d672cfd8fd9fb530aca6f5153", "score": "0.5717174", "text": "public function setType($type) {\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "b846f7e77d429a2cebfc7585c088581e", "score": "0.57083076", "text": "private function set_extension() {\n\n spl_autoload_extensions( $this->acceptedExt );\n\n }", "title": "" }, { "docid": "ea951fe55f80d6289da3c6a17ccc4f97", "score": "0.5693012", "text": "public function setType (string $type);", "title": "" }, { "docid": "cff73b53224b23983e36a695720229e6", "score": "0.56899476", "text": "private function set_post_type_options() {\n\t\t/**\n\t\t * Custom post type supports array used in register_post_type().\n\t\t *\n\t\t * @var array\n\t\t */\n\t\t$this->custom_post_type_supports = array(\n\t\t\t'title',\n\t\t\t'editor', // (content)\n\t\t\t'author',\n\t\t\t'thumbnail', // (featured image) (current theme must also support Post Thumbnails)\n\t\t\t'excerpt',\n\t\t\t'trackbacks',\n\t\t\t'custom-fields',\n\t\t\t'comments', // (also will see comment count balloon on edit screen)\n\t\t\t'revisions', // (will store revisions)\n\t\t\t'page-attributes', // (template and menu order) (hierarchical must be true)\n\t\t\t'post-formats',\n\t\t);\n\n\t\t// Lower case post type labels.\n\t\t$lowercase_post_type_title = strtolower( $this->post_type_title );\n\t\t$lowercase_post_type_single = strtolower( $this->post_type_single );\n\n\t\t/**\n\t\t * The post types custom labels used in register_post_type().\n\t\t *\n\t\t * @var array\n\t\t */\n\t\t$this->custom_post_type_labels = array(\n\t\t\t'name' => __( $this->post_type_title ),\n\t\t\t'singular_name' => __( $this->post_type_single ),\n\t\t\t'add_new' => __( \"Add New {$this->post_type_single}\" ),\n\t\t\t'add_new_item' => __( \"Add New {$this->post_type_single}\" ),\n\t\t\t'edit_item' => __( \"Edit {$this->post_type_single}\" ),\n\t\t\t'new_item' => __( \"New {$this->post_type_single}\" ),\n\t\t\t'all_items' => __( \"All {$this->post_type_title}\" ),\n\t\t\t'view_item' => __( \"View {$this->post_type_single}\" ),\n\t\t\t'search_items' => __( \"Search {$this->post_type_title}\" ),\n\t\t\t'not_found' => __( \"No {$lowercase_post_type_title} found\" ),\n\t\t\t'not_found_in_trash' => __( \"No {$lowercase_post_type_title} found in Trash\" ),\n\t\t\t'parent_item_colon' => __( '' ),\n\t\t\t'menu_name' => __( $this->post_type_title ),\n\t\t\t'featured_image' => __( \"{$this->post_type_single} Image\" ),\n\t\t\t'set_featured_image' => __( \"Set {$lowercase_post_type_single} image\" ),\n\t\t\t'remove_featured_image' => __( \"Remove {$lowercase_post_type_single} image\" ),\n\t\t\t'use_featured_image' => __( \"Use as {$lowercase_post_type_single} image\" ),\n\t\t);\n\n\t\t/**\n\t\t * Custom post type arguments used in register_post_type().\n\t\t *\n\t\t * @var array\n\t\t */\n\t\t$this->custom_post_type_args = array(\n\t\t\t// 'labels' => This is handled by $this->custom_post_type_labels do not set directly\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => $this->post_type, 'with_front' => false ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => true,\n\t\t\t'menu_position' => 5,\n\t\t\t'can_export' => true,\n\t\t\t'menu_icon' => 'dashicons-edit',\n\t\t\t// 'supports' => This is handled by $this->post_type_supports do not set directly\n\t\t);\n\t}", "title": "" }, { "docid": "d7407efc4258d898e95f84e7b75ea9bb", "score": "0.56860024", "text": "public function setType(string $type);", "title": "" }, { "docid": "6b03325e10f65f068b5de2a3ec880171", "score": "0.5681791", "text": "protected function fieldType(){\n $this->type = 'file';\n }", "title": "" }, { "docid": "62c16d0c1944236aed74629309127b26", "score": "0.5678349", "text": "function setType($type) {\n $this->type = (string) $type;\n }", "title": "" }, { "docid": "4eb7bce56d7858b5ef6cc09a7fca88d4", "score": "0.5672094", "text": "public function setName($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "a8b67fb1ec81c2e100f8e01faf9a975d", "score": "0.56505644", "text": "public function setType($type)\r\n {\r\n $this->type = $type;\r\n }", "title": "" }, { "docid": "a8b67fb1ec81c2e100f8e01faf9a975d", "score": "0.56505644", "text": "public function setType($type)\r\n {\r\n $this->type = $type;\r\n }", "title": "" }, { "docid": "32e42d5136110533772fbd52764cd78d", "score": "0.56349736", "text": "public function __construct( $type = 'text')\n\t{\t\t\t\t\n\t\t$this->type\t\t= $type;\n\t\n\t}", "title": "" }, { "docid": "277bbc0da9f4563da7cb458d08c853a3", "score": "0.5621216", "text": "function setContentType($type, $charset = null);", "title": "" }, { "docid": "82808f4d3cb015a6a58894a394d6a123", "score": "0.5612309", "text": "function setType($type) {\n\t\treturn $this->setData('type', $type);\n\t}", "title": "" }, { "docid": "10e25a8a558799d6202e93e2474ecf9e", "score": "0.5605031", "text": "private function _setConstraintsTypeImage()\n\t{\n\t\t$this->_sConstraintClassName = str_replace('\\File', '\\Image', $this->_sConstraintClassName);\n\t}", "title": "" }, { "docid": "fb4e0c1d72e99cb321a78a6ab95478b9", "score": "0.55893695", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "fb4e0c1d72e99cb321a78a6ab95478b9", "score": "0.55893695", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "b7fa7d6170378bffefee94f0545fdb9e", "score": "0.55781573", "text": "function setMessageType($input) {\n\t\t$this->messageType = $input;\n\t}", "title": "" }, { "docid": "ac77a5b54f71dbe440ae3c14bdf70b1e", "score": "0.5572004", "text": "function set_slider_configuration_files($type = null){\n set_ui_common_configuration_files('slider', $type);\n}", "title": "" }, { "docid": "6fe0eaf9d941d6e9eca666fc6310581a", "score": "0.55717033", "text": "protected function assignType()\n {\n $this->type = 'master';\n }", "title": "" }, { "docid": "a55a95ff14d1ffc21fc19382e655d6b0", "score": "0.5570811", "text": "private function _setTypes()\r\n\t{\r\n\t\t$this->_method = $_SERVER['REQUEST_METHOD'];\r\n\t\t$this->_accept = strpos($_SERVER['HTTP_ACCEPT'], 'json') > 0\r\n\t\t\t? 'json'\r\n\t\t\t: 'html';\r\n\t\t\r\n\t\t$this->_ajax = strpos($this->_path, '/ajax/') === 0;\r\n\t\tif ($this->_ajax) {\r\n\t\t\t$this->_path = substr($this->_path, 5);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e0b6b3ba78e66fcba00381655d12898c", "score": "0.5567486", "text": "protected function loadContentType()\n {\n\nparent::loadContentType();\n\n $this->typeLabel = 'Srf Show';\n $this->typeId = 'aacd3cdb-d9e2-40da-ad32-212e73537479';\n // $this->viewClass=TvShowContentView::class;\n\n $this->mediaType=new TvMediaType();\n\n }", "title": "" }, { "docid": "1431fe617bc6e426cf79b563182cd038", "score": "0.5566705", "text": "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "1431fe617bc6e426cf79b563182cd038", "score": "0.5566705", "text": "public function setType($type)\n\t{\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "5988d65311ea13d6ce365f655ce6f466", "score": "0.55582833", "text": "public function setAllowedExtensions(array $allowedExtensions = array())\n {\n $this->_allowedExtensions = array_map('strtolower', $allowedExtensions);\n }", "title": "" }, { "docid": "f1a7be171b5306701c66b4b39fcaae2f", "score": "0.5556869", "text": "public function setTypes(array $types): void\n {\n $this->types = $types;\n }", "title": "" }, { "docid": "b22ee41c1799b6a2fdc1f86ae4837feb", "score": "0.55509007", "text": "public function setType($type) {\n $this->type = $type;\n }", "title": "" }, { "docid": "70593b4ca1add62ba718845c6ae29f2a", "score": "0.5549766", "text": "public function add_content_type(){}", "title": "" }, { "docid": "73eeff718471cf736aef16235ffbb5b3", "score": "0.5544852", "text": "public function _setFileType($fileType) {\n\t\t$this->_fileType = $fileType;\n\t}", "title": "" }, { "docid": "575e0d9d4b2e9afdcc7c4666699cb99f", "score": "0.55422455", "text": "function __construct($type = \"\", $typeArr = array()) {\n /** \n * Check if $typeArr is an array and not empty\n * if it isn't empty then the array will be set as an available type' \n */\n if (!empty($typeArr) && gettype($typeArr) == \"array\") {\n $this->addType($typeArr);\n }\n /**\n * Check if $type is a string\n * if string isn't empty then the type will be set \n */\n if (!empty($type) && gettype($type) == \"string\") {\n $this->_setType($type);\n }\n }", "title": "" }, { "docid": "21f49a7583a7e4f3fb045c84a1c95676", "score": "0.5537498", "text": "public function setType($type) { return $this->_set('type', $type); }", "title": "" }, { "docid": "db06f37e189e2677fdf07f6e6973e6c9", "score": "0.5536464", "text": "function set_ui_type() {\n\t\t$this->ui_type = empty( $this->postmeta['ui-type'] ) ? false : $this->postmeta['ui-type'];\n\t}", "title": "" }, { "docid": "6f6db226bbbf8e60719939dd175b345c", "score": "0.5530731", "text": "function setElementType($setElemType) {\n $this->ElementType = $setElemType;\n }", "title": "" }, { "docid": "251a0bf3873c3f9466111ff72b20d580", "score": "0.552563", "text": "public function setType($type)\n {\n $this->type = trim($type);\n }", "title": "" }, { "docid": "251a0bf3873c3f9466111ff72b20d580", "score": "0.552563", "text": "public function setType($type)\n {\n $this->type = trim($type);\n }", "title": "" }, { "docid": "3df764ae7485ff478603347d0cd29209", "score": "0.55215174", "text": "public function setType(string $type)\n\t{\n\t\t$this->type=$type; \n\t\t$this->keyModified['type'] = 1; \n\n\t}", "title": "" }, { "docid": "3df764ae7485ff478603347d0cd29209", "score": "0.55215174", "text": "public function setType(string $type)\n\t{\n\t\t$this->type=$type; \n\t\t$this->keyModified['type'] = 1; \n\n\t}", "title": "" }, { "docid": "7e9e6cfb89317ea94825a15460f1958b", "score": "0.5518482", "text": "protected function setType($type)\n {\n $this->type = $type;\n }", "title": "" } ]
50643f8d57ebbab3f65123c3e45f0e40
Builds an actual category tree.
[ { "docid": "6befd726db23d09497a8438e7c438ae1", "score": "0.57636", "text": "private function buildTree(array $categories)\n {\n $tree = [];\n\n foreach ($categories as $category) {\n $categoryId = $category['id'];\n $parentId = $category['parent'];\n\n unset($category['id'], $category['parent']);\n\n isset($tree[$parentId]) ?: $tree[$parentId] = [];\n isset($tree[$categoryId]) ?: $tree[$categoryId] = [];\n $tree[$parentId][] = array_merge($category, ['children' => &$tree[$categoryId]]);\n }\n\n return $tree[$categories[0]['parent']];\n }", "title": "" } ]
[ { "docid": "ea5152375ae98cbf0e13a94dbac5b075", "score": "0.7210865", "text": "public function getCategoryTree();", "title": "" }, { "docid": "a2e8757be70af7718a20adc3063b1a1c", "score": "0.70965403", "text": "function build_tree_cat($parent_id = 0, $level = 0, $per_page = 0, $page = 0) {\n \n //run our query. by default starts at top of\n //the tree (with zero depth)\n $table = Tbl_cat_term_taxonomy::TBL;\n $tablejoin = array('0' => array('table' => Tbl_cat_term::TBL, 'field1' => Tbl_cat_term::TBL . '.' . Tbl_cat_term::id, 'field2' => $table . '.' . Tbl_cat_term_taxonomy::term_id,));\n $where_cat = array(Tbl_cat_term_taxonomy::TBL . '.' . Tbl_cat_term_taxonomy::parent => $parent_id);\n \n //$order = $table . '.' . Tbl_cat_term::id;\n $getJoin = $this->join($table, $tablejoin, '', $where_cat, \"cat_term.term_id DESC\", '', $per_page, $page);\n \n //display each child row\n //\"img_id DESC\", '', $config['per_page'], $page\n $i = 0;\n $getcate = '';\n foreach ($getJoin as $row) {\n $i++;\n \n //indent as necessary and print name\n $getcate.= '<tr>';\n $getcate.= '<td align=\"center\"><input type=\"checkbox\" value=\"' . $row->{Tbl_cat_term::id} . '\" id=\"itemid\" name=\"itemid[]\"></td>';\n $getcate.= '<td class=\"popular-category\" id=\"category-' . $row->{Tbl_cat_term_taxonomy::parent} . '\">';\n $getcate.= str_repeat('&#8212; ', $level) . $row->{Tbl_cat_term::name} . \"\\n\";\n $getcate.= '</td>';\n $getcate.= '<td><div class=\"btn-group\"><button class=\"btn btn-sm dropdown-toggle\" data-toggle=\"dropdown\">\n <i class=\"fa fa-cog\"></i>\n <span class=\"caret\"></span>\n </button><ul class=\"dropdown-menu\">\n <li>\n <a href=\"' . base_url() . 'upload/category?edit=' . $row->{Tbl_cat_term::id} . '\"><i class=\"fa fa-pencil\"></i> Edit</a>\n </li>\n <li>\n <a data-modal=\"true\" data-text=\"Do you want to delete this TV?\" data-type=\"confirm\" data-class=\"error\" data-layout=\"top\" data-action=\"tv/category?delete=' . $row->{Tbl_cat_term::id} . '\" class=\"btn-notification\"><i class=\"fa fa-times\"></i> Remove</a>\n </li>\n </ul></div></td>';\n $getcate.= '</tr>';\n \n //we want to see all the children that belong to this\n //node… so we need to call *this* function again\n $getcate.= $this->build_tree_cat($row->{Tbl_cat_term::id}, $level + 1);\n }\n \n //echo '<ul class=\"categories\">';\n //build_tree($parent_id=0,$level=0);\n //echo '</ul>';\n return $getcate;\n }", "title": "" }, { "docid": "fbeca9e1ef1d9e4351babc9308a3a235", "score": "0.70212334", "text": "public function buildTree();", "title": "" }, { "docid": "22e6a451f13d66e9f8301d4edec47c52", "score": "0.70198464", "text": "private function createCategoryTree()\n {\n // create root category\n CategoryUtil::createCategory(\n '/__SYSTEM__/Modules',\n 'Mediasharex',\n null,\n $this->__('Mediasharex'),\n $this->__('Media Module')\n );\n // create albums subcategory\n CategoryUtil::createCategory(\n '/__SYSTEM__/Modules/Mediasharex',\n 'Albums',\n null,\n $this->__('Albums'),\n $this->__('Initial Albums category created on install')\n );\n\t // create subcategory\n\t CategoryUtil::createCategory(\n\t '/__SYSTEM__/Modules/Mediasharex/Albums',\n\t 'Nature',\n\t null,\n\t $this->__('Nature'),\n\t $this->__('Nature')\n\t );\n\t // create subcategory\n\t CategoryUtil::createCategory(\n\t '/__SYSTEM__/Modules/Mediasharex/Albums',\n\t 'People',\n\t null,\n\t $this->__('People'),\n\t $this->__('People')\n\t );\t\n\t\t\n\t\t// create media subcategory\t\t\t\t\n CategoryUtil::createCategory(\n '/__SYSTEM__/Modules/Mediasharex',\n 'Media',\n null,\n $this->__('Media'),\n $this->__('Initial media category created on install')\n );\n\t // create subcategory\n\t CategoryUtil::createCategory(\n\t '/__SYSTEM__/Modules/Mediasharex/Media',\n\t 'Funny',\n\t null,\n\t $this->__('Funny'),\n\t $this->__('Funny')\n\t );\n\t // create subcategory\n\t CategoryUtil::createCategory(\n\t '/__SYSTEM__/Modules/Mediasharex/Media',\n\t 'Cars',\n\t null,\n\t $this->__('Cars'),\n\t $this->__('Cars')\n\t );\n\t\t\n // get the category path to insert Mediasharex categories\n $albumrootcat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/Mediasharex/Albums'); \n if ($albumrootcat) {\n // create an entry in the categories registry to the Main property\n if (!CategoryRegistryUtil::insertEntry('Mediasharex', 'mediasharex_albums', 'Albums', $albumrootcat['id'])) {\n throw new Zikula_Exception(\"Cannot insert Category Registry entry.\");\n }\n } else {\n $this->throwNotFound(\"Root category not found.\");\n }\n\t\t\n\t\t// get the category path to insert Mediasharex categories\n $mediarootcat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/Mediasharex/Media');\t\t\n if ($mediarootcat) {\n // create an entry in the categories registry to the Main property\n if (!CategoryRegistryUtil::insertEntry('Mediasharex', 'mediasharex_media', 'Media', $mediarootcat['id'])) {\n throw new Zikula_Exception(\"Cannot insert Category Registry entry.\");\n }\n } else {\n $this->throwNotFound(\"Root category not found.\");\n }\t\t\t\t\n\n return true;\n }", "title": "" }, { "docid": "a76b2dba85ac45e41f500809047ab137", "score": "0.6871572", "text": "function tx_damfrontend_categorisationTree() {\n\n\n\t\t$this->treeID = 1;\n\t\t$this->title = 'categorytree';\n \t\t$this->treeName = 'txdamCat';\n\t\t$this->domIdPrefix = $this->treeName;\n\t\t$this->table = 'tx_dam_cat';\n\t\t$this->parentField = $GLOBALS['TCA'][$this->table]['ctrl']['treeParentField'];\n\t\t$this->parentField = 'parent_id';\n\t\t$this->typeField = $GLOBALS['TCA'][$this->table]['ctrl']['type'];\n\n\t\t$this->renderer; // keeps the reference to the frontend renderer\n\t\t$this->catLogic= t3lib_div::makeInstance('tx_damfrontend_DAL_categories');\n\n\t\t$this->fieldArray = array('uid','title');\n\t\tif($this->parentField) $this->fieldArray[] = $this->parentField;\n\t\tif($this->typeField) $this->fieldArray[] = $this->typeField;\n\t\t$this->defaultList = 'uid,pid,tstamp,sorting';\n\n\t\t$this->clause = ' AND deleted=0';\n\t\t$this->orderByFields = 'sorting,title';\n\n\t\t$conf = tx_dam::config_getValue('setup.selections.'.$this->treeName);\n\t\t$this->TSconfig = $conf['properties'];\n\t\t$this->mediaFolder = tx_dam_db::getPid();\n \t}", "title": "" }, { "docid": "c3c53941415b8ce57a782738aa124496", "score": "0.683876", "text": "function buildCatTree_tangible(&$treeData, &$key, $cat_parent_id = 0, $level = 0) {\n\tglobal $glob, $db, $resultsForeign, $config;\n\t\n\t$emptyCat\t= ($config['show_empty_cat']) ? '' : 'AND noProducts >= 1';\n\t$query = sprintf(\"SELECT cat_name, cat_id, noProducts, cat_father_id FROM %sImeiUnlock_category WHERE type = '1' AND cat_father_id = '%d' AND hide = '0' AND (cat_desc != '##HIDDEN##' OR cat_desc IS NULL) %s ORDER BY priority, cat_father_id, cat_name ASC\", $glob['dbprefix'], $cat_parent_id, $emptyCat);\n\t$results = $db->select($query);\n\t\n\tif ($results) {\n\t\t$level++;\n\t\tfor ($i=0; $i<count($results); $i++) {\n\t\t\tif (is_array($resultsForeign)) {\n\t\t\t\tfor ($k=0; $k<count($resultsForeign); $k++) {\n\t\t\t\t\tif ($resultsForeign[$k]['cat_id'] == $results[$i]['cat_id']) {\n\t\t\t\t\t\t$results[$i]['cat_name'] = $resultsForeign[$k]['cat_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$results[$i]['cat_name'] = $results[$i]['cat_name'];\n\t\t\t}\n\t\t\t## Make an array of tree data this way always know what the next key value is and things become far easier\n\t\t\t$treeData[$key]['level']\t\t= $level;\n\t\t\t$treeData[$key]['cat_name']\t\t= validHTML($results[$i]['cat_name']);\n\t\t\t$treeData[$key]['cat_id']\t\t= $results[$i]['cat_id']; \n\t\t\t$treeData[$key]['noProducts']\t= $results[$i]['noProducts'];\n\t\t\t$treeData[$key]['cat_father_id']= $results[$i]['cat_father_id'];\n\t\t\t$key++;\n\t\t\t\n\t\t\tif ($config['cat_tree']) buildCatTree_tangible($treeData, $key, $results[$i]['cat_id'], $level);\n\t\t}\n\t}\n\treturn $treeData;\n}", "title": "" }, { "docid": "b7e303f584c14ff709131202e0935d86", "score": "0.67565346", "text": "public static function display_category_tree() {\n\t\t$treeObject = Doctrine_Core::getTable('Category')->getCategoriesWithProducts()->getTable()->getTree();\n\t\t$rootColumnName = $treeObject->getAttribute('rootColumnName');\n\t\tforeach ($treeObject->fetchRoots() as $root) {\n\t\t\tself::display_node($root->$rootColumnName); //recursively creates entire tree\n\t\t}\n\t}", "title": "" }, { "docid": "106662dd2325abf0828fd8f13bd50ac5", "score": "0.6680301", "text": "private function getCategoryTreeModule()\n\t{\n\t\t$query = $this->db->getQuery(true);\n\n\t\t// Get all categories\n\t\t$query->select($this->db->quoteName('category_child_id', 'cid') . ',' . $this->db->quoteName('category_parent_id', 'pid'))\n\t\t\t->from($this->db->quoteName('#__virtuemart_categories', 'c'))\n\t\t\t->leftJoin(\n\t\t\t\t$this->db->quoteName('#__virtuemart_category_categories', 'x')\n\t\t\t\t. ' ON ' . $this->db->quoteName('c.virtuemart_category_id') . ' = ' . $this->db->quoteName('x.category_child_id')\n\t\t\t);\n\n\t\t// Execute the query\n\t\t$this->db->setQuery($query);\n\t\t$records = $this->db->loadObjectList();\n\n\t\t// Check if there are any records\n\t\tif (count($records) == 0)\n\t\t{\n\t\t\t$this->categories = false;\n\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->categories = array();\n\n\t\t\t// Group all categories together according to their level\n\t\t\tforeach ($records as $record)\n\t\t\t{\n\t\t\t\t$this->categories[$record->pid][$record->cid][\"category_id\"] = $record->pid;\n\t\t\t\t$this->categories[$record->pid][$record->cid][\"category_child_id\"] = $record->cid;\n\t\t\t}\n\t\t}\n\n\t\t$catpath = array();\n\t\tkrsort($this->categories);\n\n\t\tforeach ($this->categories as $pid => $categories)\n\t\t{\n\t\t\tforeach ($categories as $cid => $category)\n\t\t\t{\n\t\t\t\t$catpath[$cid] = $pid;\n\t\t\t}\n\n\t\t\t// Free up memory\n\t\t\tunset($this->categories[$pid]);\n\t\t}\n\n\t\t// Clean up unused array\n\t\tunset($this->categories);\n\n\t\tforeach ($catpath as $cid => $value)\n\t\t{\n\t\t\t$catlevel = $value;\n\t\t\t$this->catpaths[$cid][] = $catlevel;\n\n\t\t\twhile ($catlevel > 0)\n\t\t\t{\n\t\t\t\t$this->catpaths[$cid][] = $catpath[$catlevel];\n\t\t\t\t$catlevel = $catpath[$catlevel];\n\t\t\t}\n\n\t\t\t// Clean up for some memory\n\t\t\tunset($catpath[$cid]);\n\t\t}\n\n\t\t// Clean up unused array\n\t\tunset($catpath);\n\n\t\tforeach ($this->catpaths as $cid => $paths)\n\t\t{\n\t\t\t$this->catlevels[$cid] = count($paths);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6ba31b2aaba13b8f565a046b0c15ff25", "score": "0.66688526", "text": "function buildTree($categories)\n{\n $maxLevel = getMaxLevel($categories);\n $result = '<ul>';\n\n for ($i = 0; $i < $maxLevel; $i++) {\n $entryArray = filterByValue($categories, 'level', strval($i));\n\n if ($i === 0) {\n $result .= getLi($entryArray);\n } else {\n foreach ($entryArray as $elem) {\n $entryChildsArray;\n $result .= '<ul>';\n $result .= '<li>' . $elem['name'] . '</li>';\n $result .= '<ul>';\n $id = $elem['id'];\n\n $entryChildsArray = filterByValue(\n $categories,\n 'nearest_parent_id',\n $id\n );\n\n $result .= getLi($entryChildsArray);\n $result .= '</ul>';\n $result .= '</ul>';\n }\n }\n }\n\n $result .= '</ul>';\n\n return $result;\n}", "title": "" }, { "docid": "78cea1b08b6f713cbe4ca571643fc5d0", "score": "0.6520115", "text": "public function tree($CatId) {\n\t\t$this->tree = \"\";\t\t\t\t\t\n\t\t$this->depth = 1;\t\t\t\t\t\n\t\t$this->top_level_on = 1;\t\t\t\n\t\t$this->exclude = array(0);\t\n\t\t$this->tempTree = '';\t\t\n\t\t$sql = \"select * from ccategory where site_id = '\".ID.\"' and module_id = '\".MID.\"' and parent_id = '\".$CatId.\"'\";\n\t\t$nav_query = $this->dbFrameWork->Execute($sql);\n\t\tif($this->dbFrameWork->ErrorMsg()) {\n\t\t\tthrow new Exception($this->dbFrameWork->ErrorMsg());\n\t\t}\n\t\twhile($nav_row = $nav_query->FetchRow()) {\n\t\t\t$goOn = 1;\t\t\t// Resets variable to allow us to continue building out the tree.\n\t\t\tfor($x = 0; $x < count($this->exclude); $x++)\t\t// Check to see if the new item has been used\n\t\t\t{\n\t\t\t\tif ( $this->exclude[$x] == $nav_row['category_id'] )\n\t\t\t\t{\n\t\t\t\t\t$goOn = 0;\n\t\t\t\t\tbreak;\t// Stop looking b/c we already found that it's in the exclusion list and we can't continue to process this node\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $goOn == 1 )\n\t\t\t{\n\t\t\t\t$this->tree .= \"<li class=\\\"lilinks\\\"><a href=\\\"\".HTTPPATH.\"/index.php?ID=\".ID.\"&MID=\".MID.\"&pg=\".pg.\"&catId=\".$nav_row['category_id'].$this->qs.\"\\\" class=\\\"alinks\\\">\".$nav_row['category'] . \"</a></li>\";\t\t\t\t// Process the main tree node\n\t\t\t\tarray_push($this->exclude, $nav_row['category_id']);\t\t// Add to the exclusion list\n\t\t\t\t$this->tree .= $this->build_child($nav_row['category_id']);\t\t// Start the recursive function of building the child tree\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d3f1ca11dd8775e10e98dd32f1d6f44a", "score": "0.65094215", "text": "function _category_tree ( $cat_group, $parent_id='' )\n\t{\n\t\t$this->cached_vars['categories'] = array();\n\n\t\t$cat_groups = array();\n\n\t\tif ( $cat_group != '' )\n\t\t{\n\t\t\t$cat_groups = preg_split(\"/,|\\|/s\", $cat_group);\n\t\t}\n\n\t\t//loop through the categories with with the sort orders\n\n\t\tforeach($cat_groups AS $group_id)\n\t\t{\n\n\t\t\tif( $group_id != '' )\n\t\t\t{\n\n\t\t\t\t$sql = \"SELECT \t\tc.cat_name AS category_name,\n\t\t\t\t\t\t\t\t\tc.cat_id AS category_id,\n\t\t\t\t\t\t\t\t\tc.parent_id AS parent_id,\n\t\t\t\t\t\t\t\t\tp.cat_name AS parent_name,\n\t\t\t\t\t\t\t\t\tc.cat_image AS category_image,\n\t\t\t\t\t\t\t\t\tcg.group_id,\n\t\t\t\t\t\t\t\t\tcg.group_name\n\t\t\t\t\t\tFROM\t\texp_categories c\n\t\t\t\t\t\tLEFT JOIN \texp_categories p\n\t\t\t\t\t\tON \t\t\tp.cat_id = c.parent_id\n\t\t\t\t\t\tLEFT JOIN \texp_category_groups cg\n\t\t\t\t\t\tON \t\t\tc.group_id = cg.group_id\n\t\t\t\t\t\tWHERE \t\tc.cat_id != 0\";\n\n\t\t\t\tif ( $group_id != '' && is_numeric( $group_id ) )\n\t\t\t\t{\n\t\t\t\t\t$sql .= \" AND c.group_id = '\".ee()->db->escape_str( $group_id ).\"'\";\n\t\t\t\t}\n\n\t\t\t\tif ( $parent_id != '' && is_numeric( $parent_id ) )\n\t\t\t\t{\n\t\t\t\t\t$sql .= \" AND c.parent_id = '\".ee()->db->escape_str( $parent_id ).\"'\";\n\t\t\t\t}\n\n\t\t\t\t/*$sort_order = ( isset( $query->row['sort_order'] ) === TRUE AND\n\t\t\t\t\t\t\t\t$query->row['sort_order'] == 'a' ) ? 'c.cat_name' : 'c.cat_order';\n\n\t\t\t\t//get the sort order for this group\n\t\t\t\t$query = ee()->db->query(\n\t\t\t\t\t\"SELECT sort_order\n\t\t\t\t\t FROM \texp_category_groups\n\t\t\t\t\t WHERE \tgroup_id='{$group_id}'\");*/\n\n\t\t\t\t$sort_order = 'c.cat_name'; /*( isset( $query->row['sort_order'] ) === TRUE AND\n\t\t\t\t\t\t\t\t$query->row['sort_order'] == 'a' ) ? 'c.cat_name' : 'c.cat_order';*/\n\n\t\t\t\t$sql .= \" ORDER BY c.cat_order, c.parent_id, \".$sort_order;\n\n\t\t\t\t$query = ee()->db->query($sql);\n\n\t\t\t\t//This is messsy.\n\t\t\t\t//It's done this way as this actually runs as part of the accessory in EE2\n\t\t\t\t//And gets the wrong class to get the extension settings\n\t\t\t\t//Overload the class in this case.\n\n\t\t\t\t$this->settings = $this->_get_settings(FALSE,FALSE,'primary_category_ext');\n\n\t\t\t\t//add these to the categories array.\n\t\t\t\t$this->cached_vars['categories'][$group_id] \t\t\t\t\t= $query->result_array();\n\t\t\t\t$this->cached_vars['group_settings'] \t\t\t\t\t\t\t= $this->settings['cat_groups'];\n\n\t\t\t\t//we've got no categories in this group\n\t\t\t\tif($query->num_rows == 0)\n\t\t\t\t{\n\t\t\t\t\t$sql_cat_group = ee()->db->query(\"SELECT group_name FROM exp_category_groups WHERE group_id = \" . ee()->db->escape_str($group_id) );\n\t\t\t\t\t$this->cached_vars['category_groups'][$group_id] \t= $sql_cat_group->row('group_name');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->cached_vars['category_groups'][$query->row('group_id')] \t= $query->row('group_name');\n\t\t\t\t}\n\n\t\t\t\t/** ----------------------------------------------\n\t\t\t\t/**\tAdd cookie saved cats\n\t\t\t\t/** ---------------------------------------------*/\n\n\n\t\t\t\tif ( ee()->input->get_post('entry_id') === FALSE OR\n\t\t\t\t\t ee()->input->get_post('entry_id') == '' )\n\t\t\t\t{\n\t\t\t\t\tif ( ee()->input->cookie( 'pc_cookie_categories_'.$this->channel_id.'_'.$group_id ) !== FALSE\n\t\t\t\t\t\tAND ee()->input->cookie( 'pc_cookie_categories_'.$this->channel_id.'_'.$group_id ) != ''\n\t\t\t\t\t\tAND ee()->input->cookie( 'pc_remember_other_categories_'.$this->channel_id.'_'.$group_id ) !== FALSE\n\t\t\t\t\t\tAND ee()->input->cookie( 'pc_remember_other_categories_'.$this->channel_id.'_'.$group_id ) == 'y' )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->cached_vars['cookies']['remember_other_categories'][$this->channel_id][$group_id] = 'y';\n\t\t\t\t\t\t$this->selected_cats\t= array_merge( $this->selected_cats, explode( \"|\", ee()->input->cookie( 'pc_cookie_categories_'.$this->channel_id.'_'.$group_id ) ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8b84cd3411951991bd01df4b62e8984c", "score": "0.65068597", "text": "function build_menu($parent_id = 0, $level = 0, $show_parent = 0, $selected = 0) {\n //the tree (with zero depth)\n $table = Tbl_cat_term_taxonomy::TBL;\n $tablejoin = array('0' => array('table' => Tbl_cat_term::TBL, 'field1' => Tbl_cat_term::TBL . '.' . Tbl_cat_term::id, 'field2' => $table . '.' . Tbl_cat_term_taxonomy::term_id,));\n if (!empty($show_parent)) {\n $where_cat = array(Tbl_cat_term::TBL . '.' . Tbl_cat_term::slug => $show_parent, Tbl_cat_term::TBL . '.' . Tbl_cat_term::term_group => 'category');\n } \n else {\n $where_cat = array(Tbl_cat_term_taxonomy::TBL . '.' . Tbl_cat_term_taxonomy::parent => $parent_id, Tbl_cat_term::TBL . '.' . Tbl_cat_term::term_group => 'category');\n }\n \n //$order = $table . '.' . Tbl_cat_term::id;\n $getJoin = $this->join($table, $tablejoin, '', $where_cat, 'cat_term.name ASC');\n \n //$result = mysql_query(\"SELECT * FROM cat_term_taxonomy INNER JOIN cat_term ON cat_term_taxonomy.term_id=cat_term.term_id WHERE parent='\" . $parent_id . \"'\");\n $getcate = '';\n $has_childs = false;\n $i = 0;\n foreach ($getJoin as $row) {\n $i++;\n if ($row->parent == $parent_id) {\n if ($has_childs === false) {\n $has_childs = true;\n if ($level != 0) {\n $getcate.= '<ul style=\"display:none\" class=\"displaysubcat\">';\n }\n }\n if (!empty($selected) && $selected == $row->slug) {\n $active = 'active';\n } \n else {\n $active = '';\n }\n if ($level != 0) {\n $getCurSlug = $this->select(Tbl_cat_term::TBL, '*', array(Tbl_cat_term::id => $row->parent));\n if (!empty($getCurSlug)) {\n $GetCSlug = $getCurSlug[0]->{Tbl_cat_term::slug};\n $getLink = base_url() . $GetCSlug . '/index/' . $row->slug;\n if ($level + $i == 2) {\n $getcate.= '<li><a href=\"' . $getCurSlug[0]->{Tbl_cat_term::slug} . '\" class=\"' . $row->parent . ' level-' . $level . '\">All ' . $getCurSlug[0]->{Tbl_cat_term::name} . '</a></li>';\n }\n } \n else {\n $getLink = base_url() . $row->slug;\n }\n } \n else {\n $getLink = base_url() . $row->slug;\n }\n \n //indent as necessary and print name\n //$getcate .= $MainCat;\n $getcate.= '<li class=\"' . $active . ' in-cat-' . $row->slug . '\"><a href=\"' . $getLink . '\" class=\"' . $row->parent . ' level-' . $level . '\">' . $row->name . '</a>';\n $getcate.= $this->build_menu($row->term_id, $level + 1);\n $getcate.= '</li>';\n \n //we want to see all the children that belong to this\n //node… so we need to call *this* function again\n \n }\n }\n if ($has_childs === true) {\n if ($level != 0) {\n $getcate.= '</ul>';\n }\n }\n return $getcate;\n }", "title": "" }, { "docid": "3a511f343ca2f2501fe0793095f3df19", "score": "0.64301336", "text": "function buildCategories($block='left') {\n $left = '';\n $right = '';\n $run = 0;\n $theChildren = array();\n $q_parent = mysql_query(\"SELECT * FROM \".$this->prefix.\"categories\n WHERE enCat = 'yes'\n AND isParent = 'yes'\n ORDER BY catname\n \") or die(mysql_error());\n while ($PARENTS = mysql_fetch_object($q_parent)) {\n if (++$run%2!=0) {\n $children = '';\n $ccount = 0;\n $theChildren = array();\n if ($this->settings->modr=='yes') {\n $url = $this->settings->install_path.'category/'.seoUrl(cleanData($PARENTS->catname)).'/'.$PARENTS->id.'/1/index.html';\n } else {\n $url = '?p=category&amp;cat='.$PARENTS->id;\n }\n $q_children = mysql_query(\"SELECT * FROM \".$this->prefix.\"categories\n WHERE enCat = 'yes'\n AND childOf = '$PARENTS->id'\n ORDER BY catname\n LIMIT \".SUB_CATEGORY_DISPLAY_COUNT.\"\n \") or die(mysql_error());\n if (mysql_num_rows($q_children)>0) {\n $theChildren = $this->getChildrenOfParent($PARENTS->id);\n } \n while ($CHILDREN = mysql_fetch_object($q_children)) {\n if ($this->settings->modr=='yes') {\n $curl = $this->settings->install_path.'category/'.seoUrl(cleanData($PARENTS->catname)).'/'.seoUrl(cleanData($CHILDREN->catname)).'/'.$CHILDREN->id.'/1/index.html';\n } else {\n $curl = '?p=category&amp;cat='.$CHILDREN->id;\n }\n $children .= '<a href=\"'.$curl.'\" title=\"'.cleanData($PARENTS->catname).': '.cleanData($CHILDREN->catname).'\">'.cleanData($CHILDREN->catname).'</a>'.(SHOW_CATEGORY_RECIPE_COUNT ? ' ('.rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat = \\''.$CHILDREN->id.'\\'').')' : '').(++$ccount!=mysql_num_rows($q_children) ? ', ' : (SUB_CATEGORY_DISPLAY_COUNT>mysql_num_rows($q_children) ? '' : '...'));\n }\n $left .= str_replace(array('{url}','{parent}','{children}','{count}'),\n array($url,cleanData($PARENTS->catname),($children ? '<span class=\"children\">'.$children.'</span>' : ''),(SHOW_CATEGORY_RECIPE_COUNT ? ' ('.(PARENT_WITH_CHILD_COUNT ? rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat = \\''.$PARENTS->id.'\\'')+(!empty($theChildren) ? rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat IN ('.implode(',',$theChildren).')') : 0) : rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat = \\''.$PARENTS->id.'\\'')).')' : '')),\n file_get_contents(PATH.'templates/html/categories-list.htm')\n );\n } else {\n $children = '';\n $ccount = 0;\n $theChildren = array();\n if ($this->settings->modr=='yes') {\n $url = $this->settings->install_path.'category/'.seoUrl(cleanData($PARENTS->catname)).'/'.$PARENTS->id.'/1/index.html';\n } else {\n $url = '?p=category&amp;cat='.$PARENTS->id;\n }\n $q_children = mysql_query(\"SELECT * FROM \".$this->prefix.\"categories\n WHERE enCat = 'yes'\n AND childOf = '$PARENTS->id'\n ORDER BY catname\n LIMIT \".SUB_CATEGORY_DISPLAY_COUNT.\"\n \") or die(mysql_error());\n if (mysql_num_rows($q_children)>0) {\n $theChildren = $this->getChildrenOfParent($PARENTS->id);\n } \n while ($CHILDREN = mysql_fetch_object($q_children)) {\n if ($this->settings->modr=='yes') {\n $curl = $this->settings->install_path.'category/'.seoUrl(cleanData($PARENTS->catname)).'/'.seoUrl(cleanData($CHILDREN->catname)).'/'.$CHILDREN->id.'/1/index.html';\n } else {\n $curl = '?p=category&amp;cat='.$CHILDREN->id;\n }\n $children .= '<a href=\"'.$curl.'\" title=\"'.cleanData($PARENTS->catname).': '.cleanData($CHILDREN->catname).'\">'.cleanData($CHILDREN->catname).'</a>'.(SHOW_CATEGORY_RECIPE_COUNT ? ' ('.rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat = \\''.$CHILDREN->id.'\\'').')' : '').(++$ccount!=mysql_num_rows($q_children) ? ', ' : (SUB_CATEGORY_DISPLAY_COUNT>mysql_num_rows($q_children) ? '' : '...'));\n }\n $right .= str_replace(array('{url}','{parent}','{children}','{count}'),\n array($url,cleanData($PARENTS->catname),($children ? '<span class=\"children\">'.$children.'</span>' : ''),(SHOW_CATEGORY_RECIPE_COUNT ? ' ('.(PARENT_WITH_CHILD_COUNT ? rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat = \\''.$PARENTS->id.'\\'')+(!empty($theChildren) ? rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat IN ('.implode(',',$theChildren).')') : 0) : rowCount('recipes',' WHERE enRecipe = \\'yes\\' AND isApproved = \\'no\\' AND cat = \\''.$PARENTS->id.'\\'')).')' : '')),\n file_get_contents(PATH.'templates/html/categories-list.htm')\n );\n }\n }\n return ($block=='left' ? $left : $right);\n}", "title": "" }, { "docid": "a902720fb0ee9f0c61f330bddc23f965", "score": "0.63467056", "text": "function build_cat(&$data, $filter = '') {\r\n \t\t$this->obj->load->model('nny_catmodel');\r\n\t\t$aryCatList = array();\r\n\t\t$filter .= \" AND cat_type = 'news'\";\r\n\t\t$this->obj->nny_catmodel->getCategoryTree($aryCatList, 0, 0, array(), $filter);\r\n\t\t$data['aryCatList'] = $aryCatList;\r\n }", "title": "" }, { "docid": "05e9a6d88f05e9f7c8ba0e5b22fd0cd2", "score": "0.63420814", "text": "public static function getCategoryTree($start=0)\r\n {\r\n $data = BlogCategoryModel::where('status','=',1)->get();\r\n\r\n if(count((array) $data)!=0)\r\n {\r\n return self::buildTree($data->toArray(),$start);\r\n }\r\n }", "title": "" }, { "docid": "3d75ffaa2f1e8b9f6e86b5be0b26d8dd", "score": "0.632696", "text": "public function category_tree( $type = 'text', $group_id = '', $parent_id = '', $only_show_selected = '' )\r\n\t{\r\n\t\t/**\t----------------------------------------\r\n\t\t/** Fetch member's categories\r\n\t\t/**\t----------------------------------------*/\r\n\r\n\t\tif ( $this->member_id != 0 AND count( $this->assigned_cats ) == 0 )\r\n\t\t{\r\n\t\t\t$catq\t= $this->EE->db->query( \"SELECT cat_id FROM exp_user_category_posts WHERE member_id = '\".$this->EE->db->escape_str( $this->member_id ).\"'\" );\r\n\r\n\t\t\tforeach ( $catq->result_array() as $row )\r\n\t\t\t{\r\n\t\t\t\t$this->assigned_cats[]\t= $row['cat_id'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/**\t----------------------------------------\r\n\t\t/** Fetch categories\r\n\t\t/**\t----------------------------------------*/\r\n\r\n\t\t$sql = \"SELECT c.cat_name\t AS category_name,\r\n\t\t\t\t\t c.cat_id\t\t AS category_id,\r\n\t\t\t\t\t c.parent_id\t AS parent_id,\r\n\t\t\t\t\t c.cat_image\t AS category_image,\r\n\t\t\t\t\t c.cat_description AS category_description,\r\n\t\t\t\t\t c.cat_url_title\t AS category_url_title,\r\n\t\t\t\t\t p.cat_name\t AS parent_name,\r\n\t\t\t\t\t cg.group_name AS category_group_name, cg.group_id AS category_group_id,\r\n\t\t\t\t\t fd.*\r\n\t\t\t\tFROM exp_categories c\r\n\t\t\t\tLEFT JOIN exp_categories p ON p.cat_id = c.parent_id\r\n\t\t\t\tLEFT JOIN exp_category_groups cg ON cg.group_id = c.group_id\r\n\t\t\t\tLEFT JOIN exp_category_field_data AS fd ON fd.cat_id = c.cat_id\r\n\t\t\t\tWHERE c.cat_id != 0 \";\r\n\r\n\t\tif ( $group_id != '' AND ctype_digit( $group_id ) )\r\n\t\t{\r\n\t\t\t$sql\t.= \" AND c.group_id = '\".$this->EE->db->escape_str( $group_id ).\"'\";\r\n\t\t}\r\n\r\n\t\tif ( $parent_id != '' AND ctype_digit( $parent_id ) )\r\n\t\t{\r\n\t\t\t$sql\t.= \" AND c.parent_id = '\".$this->EE->db->escape_str( $parent_id ).\"'\";\r\n\t\t}\r\n\r\n\t\tif ( $only_show_selected == 'yes' )\r\n\t\t{\r\n\t\t\t$sql\t.= \" AND c.cat_id IN ('\".implode( \"','\", $this->assigned_cats ).\"')\";\r\n\t\t}\r\n\r\n\t\t/**\t----------------------------------------\r\n\t\t/** Establish sort order\r\n\t\t/**\t----------------------------------------*/\r\n\r\n\t\tif ( count( $this->cat_params ) > 0 AND isset( $this->cat_params['orderby'] ) === TRUE AND $this->cat_params['orderby'] == 'category_order' )\r\n\t\t{\r\n\t\t\t$sql .= \" ORDER BY c.parent_id, c.cat_order\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$sql .= \" ORDER BY c.parent_id, c.cat_name\";\r\n\t\t}\r\n\r\n\t\tif ( ! isset ($this->cache[md5($sql)]))\r\n\t\t{\r\n\t\t\t$query = $this->EE->db->query($sql);\r\n\t\t\t$this->cache[md5($sql)] = $query;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$query = $this->cache[md5($sql)];\r\n\t\t}\r\n\r\n\t\tif ($query->num_rows() == 0)\r\n\t\t{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t/**\t----------------------------------------\r\n\t\t/** Assign cats to array\r\n\t\t/**\t----------------------------------------*/\r\n\r\n\t\tforeach($query->result_array() as $row)\r\n\t\t{\r\n\t\t\t$cat_array[$row['category_id']] = $row;\r\n\t\t}\r\n\r\n\t\t$this->categories[]\t= $this->cat_formatting['category_header'];\r\n\r\n\t\t/**\t----------------------------------------\r\n\t\t/**\tLoop for each category\r\n\t\t/**\t----------------------------------------\r\n\t\t/*\tListen, we try to construct a family\r\n\t\t/*\twhen we can, but if we're not\r\n\t\t/*\tauto-assigning parent cats, forget it.\r\n\t\t/*\tJust show a flat list.\r\n\t\t/**\t----------------------------------------*/\r\n\r\n\t\tforeach($cat_array as $key => $val)\r\n\t\t{\r\n\t\t\tif ( in_array( $key, $this->used_cat ) === TRUE ) continue;\r\n\r\n\t\t\t$selected\t= ( in_array( $key, $this->assigned_cats ) === TRUE ) ? $this->cat_formatting['category_selected']: '';\r\n\r\n\t\t\t$checked\t= ( in_array( $key, $this->assigned_cats ) === TRUE ) ? $this->cat_formatting['category_selected']: '';\r\n\r\n\t\t\t$parent\t\t= ( $this->search === TRUE ) ? $val['parent_name']: '';\r\n\r\n\t\t\t$cat_body\t= $this->cat_formatting['category_body'];\r\n\r\n\t\t\t$cat_body\t= str_replace( LD.\"selected\".RD, $selected, $cat_body );\r\n\r\n\t\t\t$cat_body\t= str_replace( LD.\"checked\".RD, $checked, $cat_body );\r\n\r\n\t\t\t$data\t\t\t\t\t= $val;\r\n\t\t\t$data['depth']\t\t\t= 0;\r\n\t\t\t$data['indent']\t\t\t= '';\r\n\t\t\t$data['category_id']\t= $key;\r\n\r\n\t\t\tforeach($this->catfields as $name => $id)\r\n\t\t\t{\r\n\t\t\t\tif (isset($val['field_id_'.$id]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$data[$name] = $val['field_id_'.$id];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$cat_body = $this->EE->functions->prep_conditionals($cat_body, $data);\r\n\r\n\t\t\tforeach($data as $var_name => $var_value)\r\n\t\t\t{\r\n\t\t\t\t$cat_body = str_replace(LD.$var_name.RD, $var_value, $cat_body);\r\n\t\t\t}\r\n\r\n\t\t\t$this->categories[] = $cat_body;\r\n\r\n\t\t\t$this->used_cat[]\t= $key;\r\n\r\n\t\t\t$this->category_subtree($key, $cat_array, $group_id, $depth=0, $type, $parent_id);\r\n\t\t}\r\n\r\n\t\t$this->categories[]\t= $this->cat_formatting['category_footer'];\r\n\t}", "title": "" }, { "docid": "2bf23b32601706ac631982c1164828de", "score": "0.6269545", "text": "public function getCategoryTree() \n {\n $sql = \"\nSELECT * \n FROM category\n \";\n $result = $this->db->query($sql);\n $return = array();\n foreach($result as $val) {\n $return[$val['id_parent']][] = $val;\n }\n return $return;\n }", "title": "" }, { "docid": "c449f5f05f72786cee1ac9c8a24635e4", "score": "0.6265891", "text": "function _categoryTree( $data, $tree, $id = 0, $text='', $currentId) {\t\t\n\n\t\t// Ordering\n\t\t$countItemsInCat \t= 0;\n\t\tforeach ($data as $key) {\t\n\t\t\t$show_text = $text . $key->title;\n\t\t\t\n\t\t\tstatic $iCT = 0;// All displayed items\n\t\n\t\t\tif ($key->parent_id == $id && $currentId != $id && $currentId != $key->id ) {\t\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$tree[$iCT] \t\t\t\t\t= new JObject();\n\t\t\t\t\n\t\t\t\t// Ordering MUST be solved here\n\t\t\t\tif ($countItemsInCat > 0) {\n\t\t\t\t\t$tree[$iCT]->orderup\t\t\t\t= 1;\n\t\t\t\t} else {\n\t\t\t\t\t$tree[$iCT]->orderup \t\t\t\t= 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($countItemsInCat < ($key->countid - 1)) {\n\t\t\t\t\t$tree[$iCT]->orderdown \t\t\t\t= 1;\n\t\t\t\t} else {\n\t\t\t\t\t$tree[$iCT]->orderdown \t\t\t\t= 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$tree[$iCT]->id \t\t\t\t= $key->id;\n\t\t\t\t$tree[$iCT]->title \t\t\t\t= $show_text;\n\t\t\t\t$tree[$iCT]->title_self \t\t= $key->title;\n\t\t\t\t$tree[$iCT]->parent_id\t\t\t= $key->parent_id;\n\t\t\t\t$tree[$iCT]->owner_id\t\t\t= $key->owner_id;\n\t\t\t\t$tree[$iCT]->name\t\t\t\t= $key->name;\n\t\t\t\t$tree[$iCT]->alias\t\t\t\t= $key->alias;\n\t\t\t\t$tree[$iCT]->image\t\t\t\t= $key->image;\n\t\t\t\t$tree[$iCT]->section\t\t\t= $key->section;\n\t\t\t\t$tree[$iCT]->image_position\t\t= $key->image_position;\n\t\t\t\t$tree[$iCT]->description\t\t= $key->description;\n\t\t\t\t$tree[$iCT]->published\t\t\t= $key->published;\n\t\t\t\t$tree[$iCT]->editor\t\t\t\t= $key->editor;\n\t\t\t\t$tree[$iCT]->ordering\t\t\t= $key->ordering;\n\t\t\t\t$tree[$iCT]->access\t\t\t\t= $key->access;\n\t\t\t\t$tree[$iCT]->count\t\t\t\t= $key->count;\n\t\t\t\t$tree[$iCT]->params\t\t\t\t= $key->params;\n\t\t\t\t$tree[$iCT]->checked_out\t\t= $key->checked_out;\n\t\t\t\t$tree[$iCT]->groupname\t\t\t= $key->groupname;\n\t\t\t\t$tree[$iCT]->usercatname\t\t= $key->usercatname;\n\t\t\t\t$tree[$iCT]->parentname\t\t\t= $key->parentname;\n\t\t\t\t$tree[$iCT]->hits\t\t\t\t= $key->hits;\n\t\t\t\t$tree[$iCT]->ratingavg\t\t\t= $key->ratingavg;\n\t\t\t\t$tree[$iCT]->accessuserid\t\t= $key->accessuserid;\n\t\t\t\t$tree[$iCT]->uploaduserid\t\t= $key->uploaduserid;\n\t\t\t\t$tree[$iCT]->deleteuserid\t\t= $key->deleteuserid;\n\t\t\t\t$tree[$iCT]->userfolder\t\t\t= $key->userfolder;\n\t\t\t\t$tree[$iCT]->latitude\t\t\t= $key->latitude;\n\t\t\t\t$tree[$iCT]->longitude\t\t\t= $key->longitude;\n\t\t\t\t$tree[$iCT]->zoom\t\t\t\t= $key->zoom;\n\t\t\t\t$tree[$iCT]->geotitle\t\t\t= $key->geotitle;\n\t\t\t\t$tree[$iCT]->approved\t\t\t= $key->approved;\n\t\t\t\t$tree[$iCT]->link\t\t\t\t= '';\n\t\t\t\t$tree[$iCT]->filename\t\t\t= '';// Will be added in View (after items will be reduced)\n\t\t\t\t$tree[$iCT]->linkthumbnailpath\t= '';\n\n\t\t\t\t$iCT++;\n\t\t\t\t\n\t\t\t\t$tree = $this->_categoryTree($data, $tree, $key->id, $show_text . \" &raquo; \", $currentId );\n\t\t\t\t$countItemsInCat++;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn($tree);\n\t}", "title": "" }, { "docid": "017e41b773d36f4f46fe558225a8472b", "score": "0.6259987", "text": "public function build()\n {\n\n if ($this->html)\n return $this->html;\n\n if (count($this->data) == 0) {\n $this->html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n $this->html .= '</ul>'.NL;\n\n return $this->html;\n }\n\n $html = '';\n\n $html .= '<ul id=\"'.$this->id.'\" class=\"wgt_tree\" >'.NL;\n\n foreach ($this->data as $id => $row) {\n\n $entry = $this->buildTreeNode($row);\n\n $html .= <<<HTML\n<li id=\"{$this->id}_{$id}\" >\n\n {$entry}\n <ul id=\"{$this->id}_{$id}_tree\" ></ul>\n\n</li>\n\nHTML;\n\n\n }\n\n $html .= '</ul>'.NL;\n\n\n $this->html = $html;\n\n return $this->html;\n\n }", "title": "" }, { "docid": "66294e5c4dc3fb9f9993f63f88f26cc6", "score": "0.62586087", "text": "function get_categories_treeview()\n\t{\n\t\t/* Get all the articles categories */\n\t\t$categories = $this->get_category();\n\t\t\n\t\treturn $this->treeview( 0, 0, $categories );\n\t}", "title": "" }, { "docid": "80854365b7509352978b952a701000ec", "score": "0.6242246", "text": "protected function buildTree()\n {\n if (!$this->treeBuilder) {\n $this->treeBuilder = new TreeBuilder();\n }\n return $this->treeBuilder->build($this->getTreeConfig(), $this->components()->toArray());\n }", "title": "" }, { "docid": "bd06d911ca613bbad24a815845270d78", "score": "0.62349045", "text": "function hierarchical_category_tree( $cat ) {\n // wpse-41548 // alchymyth // a hierarchical list of all categories //\n $next = get_categories('hide_empty=false&orderby=name&order=ASC&parent=' . $cat);\n\n if( $next ) : \n echo '<ul class=\"dropdown\">'; \n foreach( $next as $cat ) :\n echo '<li><a href=\"' . get_category_link( $cat->term_id ) . '\" title=\"' . sprintf( __( \"View all posts in %s\" ), $cat->name ) . '\" ' . '><h6>' . $cat->name . '</h6></a></li>'; \n hierarchical_category_tree( $cat->term_id );\n endforeach; \n echo '</ul>'; \n endif;\n }", "title": "" }, { "docid": "fa48b39906624a4963fde7e8778c0232", "score": "0.6229785", "text": "function rebuild_category_tree($parentid = 0, $left = 1, $cattype = 'product', $slng = 'eng')\r\n {\r\n global $ilance;\r\n \r\n // the right value of this node is the left value + 1 \r\n $right = $left + 1; \r\n \r\n // get all children of this node \r\n $result = $ilance->db->query(\"\r\n SELECT cid\r\n FROM \" . DB_PREFIX . \"categories\r\n WHERE parentid = '\" . intval($parentid) . \"'\r\n AND cattype = '\" . $ilance->db->escape_string($cattype) . \"'\r\n ORDER BY title_$slng ASC\r\n \", 0, null, __FILE__, __LINE__);\r\n while ($row = $ilance->db->fetch_array($result, DB_ASSOC))\r\n { \r\n // recursive execution of this function for each child of this node \r\n // $right is the current right value, which is incremented by the rebuild_tree function \r\n $right = $this->rebuild_category_tree($row['cid'], $right, $cattype, $slng); \r\n } \r\n \r\n // we've got the left value, and now that we've processed \r\n // the children of this node we also know the right value \r\n $ilance->db->query(\"\r\n UPDATE \" . DB_PREFIX . \"categories\r\n SET lft = '\" . $left . \"', rgt = '\" . $right . \"'\r\n WHERE cid = '\" . $parentid . \"'\r\n \", 0, null, __FILE__, __LINE__);\r\n \r\n // return the right value of this node + 1 \r\n return $right + 1; \r\n }", "title": "" }, { "docid": "32bd99ab3da6dc612a4788f3f668d6c1", "score": "0.6096232", "text": "function walk_category_tree() {\n\t$args = func_get_args();\n\t// the user's options are the third parameter\n\tif ( empty( $args[2]['walker'] ) || ! ( $args[2]['walker'] instanceof Walker ) ) {\n\t\t$walker = new Walker_Category;\n\t} else {\n\t\t$walker = $args[2]['walker'];\n\t}\n\treturn call_user_func_array( array( $walker, 'walk' ), $args );\n}", "title": "" }, { "docid": "be7b7ef7d257c3ba8a9deda9492e1b33", "score": "0.60961604", "text": "public function run ()\n\t{\n\t\tCategory::truncate();\n\t\t$root = Category::query()->updateOrCreate([\n\t\t\t'name' => 'Root',\n\t\t], [\n\t\t\t'name' => 'Main',\n\t\t\t'parentId' => null,\n\t\t\t'description' => 'This is the super-parent category.',\n\t\t\t'type' => Types::Root,\n\t\t\t'specials' => [],\n\t\t]);\n\t\tforeach ($this->categories as $key => $value) {\n\t\t\t$category = new Category();\n\t\t\t$category->name = $key;\n\t\t\t$category->description = sprintf('%s is a really cool trend. There\\'s a whole lot more inside so be sure to follow.', $key);\n\t\t\t$category->parentId = $root->id();\n\t\t\t$category->type = Types::Category;\n\t\t\t$category->specials = ['brandInFocus' => false, 'popularCategory' => false, 'trendingNow' => false];\n\t\t\t$category->inheritParentAttributes = false;\n\t\t\t$category->save();\n\t\t\tif (is_array($value) && count($value) > 0) {\n\t\t\t\tforeach ($value as $innerCategory => $innerValue) {\n\t\t\t\t\t$inner = new Category();\n\t\t\t\t\t$inner->name = $innerCategory;\n\t\t\t\t\t$inner->description = sprintf('%s is a really cool trend. There\\'s a whole lot more inside so be sure to follow.', $innerCategory);\n\t\t\t\t\t$inner->parentId = $category->id();\n\t\t\t\t\t$inner->type = Types::SubCategory;\n\t\t\t\t\t$inner->specials = ['brandInFocus' => false, 'popularCategory' => false, 'trendingNow' => false];\n\t\t\t\t\t$inner->inheritParentAttributes = true;\n\t\t\t\t\t$inner->save();\n\t\t\t\t\tif (is_array($innerValue) && count($innerValue) > 0) {\n\t\t\t\t\t\tforeach ($innerValue as $subInnerCategory => $subInnerValue) {\n\t\t\t\t\t\t\t$subInner = new Category();\n\t\t\t\t\t\t\t$subInner->name = $subInnerValue;\n\t\t\t\t\t\t\t$subInner->description = sprintf('%s is a really cool trend. There\\'s a whole lot more inside so be sure to follow.', $subInnerValue);\n\t\t\t\t\t\t\t$subInner->parentId = $inner->id();\n\t\t\t\t\t\t\t$subInner->type = Types::Vertical;\n\t\t\t\t\t\t\t$subInner->specials = ['brandInFocus' => false, 'popularCategory' => false, 'trendingNow' => false];\n\t\t\t\t\t\t\t$subInner->inheritParentAttributes = true;\n\t\t\t\t\t\t\t$subInner->save();\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}", "title": "" }, { "docid": "c15c9dddf74656f9edd3edb09c359ddc", "score": "0.60939723", "text": "private function parse() {\n if (!empty($this->rows)) {\n foreach ($this->rows as $key => $value) {\n $this->parsed[] = new RML_Folder(intval($value->id), intval($value->parent), $value->name, intval($value->ord), intval($value->type));\n }\n }\n \n // Create the tree\n $folder = null;\n foreach($this->parsed as $key => $category){\n $parent = $category->parent;\n if ($parent > -1) {\n $folder = $this->getFolderByID($parent);\n if ($folder !== null) {\n $folder->children[] = $category;\n }\n }\n }\n \n $cats_tree = array();\n foreach ($this->parsed as $category) {\n if ($category->parent <= -1) {\n $cats_tree[] = $category;\n }\n }\n $this->tree = $cats_tree;\n }", "title": "" }, { "docid": "90d980b7849cfd8e8802f0e72e72dee3", "score": "0.6092017", "text": "function report_coursequotas_build_category_tree(array &$catrecords, $parent = 0) {\n global $DB;\n\n $cattree = [];\n\n // Find categories with the same parent and add them.\n foreach ($catrecords as $catid => $record) {\n if ($record->parent === $parent) {\n $cat = new \\stdClass();\n $cat->id = $catid;\n $cat->name = $record->name;\n $cat->categorysize = (int)$DB->get_field(CATEGORYSIZE_TABLENAME, CATEGORYSIZE_FIELDQUOTA, [CATEGORYSIZE_FIELDCATEGORYID => $catid]);\n $cat->visible = $record->visible;\n $cattree[$catid] = $cat;\n // Efficiency improvement: Once the category is added to the tree, it won't be added again.\n unset($catrecords[$catid]);\n }\n }\n\n if (empty($cattree)) {\n return false;\n }\n\n // Find categories with the same parent and add them. This is done in a second iteration to avoid repeating the same level.\n foreach ($cattree as $catid => $cat) {\n // Recursive call to find subcategories.\n $cat->subcategories = report_coursequotas_build_category_tree($catrecords, $catid);\n }\n\n return $cattree;\n}", "title": "" }, { "docid": "04fbdded613fa934b3ee98bff5241ed4", "score": "0.6081244", "text": "public function run()\n {\n $categories = [\n \t[\n \t\t'name'\t\t=>\t'Mobile Phone Accessories',\n \t\t'children' \t=>\t[\n \t\t\t['name' =>\t'Phone Cases'],\n \t\t\t['name' =>\t'Protectors'],\n \t\t\t['name' =>\t'Chargers '],\n \t\t\t[\n \t\t\t\t'name' \t\t=>\t'Earphones',\n \t\t\t\t'children'\t=>\t[\n \t\t\t\t\t['name' =>\t'Blue Tooth Earphones'],\n \t\t\t\t\t['name' =>\t'Wired Control Earphones'],\n \t\t\t\t],\n \t\t\t],\n \t\t],\n \t],\n \t[\n \t\t'name'\t\t=>\t'PC Components',\n \t\t'children'\t=>\t[\n \t\t\t['name'\t=>\t'Monitors'],\n \t\t\t[\n \t\t\t\t'name'\t\t=>\t'Graphic Card',\n \t\t\t\t'children'\t=>\t[\n \t\t\t\t\t['name'\t=>\t'Dedicated'],\n \t\t\t\t\t['name'\t=>\t'Integrated'],\n \t\t\t\t],\n \t\t\t],\n \t\t\t['name'\t=>\t'PC Memories'],\n \t\t\t['name'\t=> \t'CPU '],\n \t\t\t['name'\t=>\t'Mother Board'],\n \t\t\t['name'\t=>\t'Hard Drive'],\n \t\t],\n \t],\n \t[\n \t\t'name'\t\t=>\t'Computer Type',\n \t\t'children'\t=>\t[\n \t\t\t['name'\t=>\t'Laptops'],\n \t\t\t['name'\t=>\t'Desktops'],\n \t\t\t['name'\t=>\t'Tablets'],\n \t\t\t['name'\t=>\t'All-in-Ones'],\n \t\t\t['name'\t=>\t'Servers'],\n \t\t],\n \t],\n ];\n\n foreach ($categories as $data) {\n $this->createCategory($data);\n }\n }", "title": "" }, { "docid": "a6b6fa624bc7f41dc08bb390efe1c5c3", "score": "0.60637444", "text": "public function buildCategoryTree($storeId, $category = null)\n {\n $childTrees = [];\n $childrenParentId = $category ? $category->getCategoryId() : CategoryInterface::ROOT_CATEGORY_PARENT_ID ;\n\n /** @var SortOrder $sortOrder */\n $sortOrder = $this->sortOrderBuilder\n ->setField(CategoryInterface::SORT_ORDER)\n ->setAscendingDirection()\n ->create();\n\n /** @var SearchCriteria $searchCriteria */\n $searchCriteria = $this->searchCriteriaBuilder\n ->addFilter(CategoryInterface::IS_ENABLE, true)\n ->addFilter(CategoryInterface::STORE_IDS, $storeId)\n ->addFilter(CategoryInterface::PARENT_ID, $childrenParentId)\n ->addSortOrder($sortOrder)\n ->create();\n\n try {\n /** @var CategoryInterface[] $categories */\n $childCategories = $this->categoryRepository->getList($searchCriteria)->getItems();\n } catch (LocalizedException $e) {\n $this->logger->critical($e);\n $childCategories = [];\n }\n\n foreach ($childCategories as $childCategory) {\n $childTrees[] = $this->buildCategoryTree($storeId, $childCategory);\n }\n\n /** @var CategoryTree $resultTree */\n $resultTree = $this->categoryTreeFactory\n ->create()\n ->setCategory($category)\n ->setArticles($category ? $this->getCategoryArticles($category, $storeId) : [])\n ->setChildren($childTrees);\n\n return $resultTree;\n }", "title": "" }, { "docid": "cf9a61a2a8a3584a01b2a455bbf9ac9a", "score": "0.6044473", "text": "public function get_categories()\n {\n $GLOBALS['categories'] = [];\n $GLOBALS['nesting'] = 0;\n\n /*\n * Receives category id\n * Save all children into $GLOBALS['categories']\n */\n function save_children($id)\n {\n $GLOBALS['nesting']++;\n\n $children = Categories::all()->where('parent_id', $id);\n foreach ($children as $current){\n $data = [\n 'id' => $current->id,\n 'name' => $current->name,\n 'nesting'=> $GLOBALS['nesting'],\n ];\n array_push($GLOBALS['categories'], $data);\n if($current->has_children()){\n save_children($current->id);\n }\n }\n\n $GLOBALS['nesting']--;\n }\n\n foreach($this->all() as $current){\n if(!$current->parent_id){\n $data = [\n 'id' => $current->id,\n 'name' => $current->name,\n 'nesting'=> $GLOBALS['nesting'] = 0,\n ];\n array_push($GLOBALS['categories'], $data);\n\n if($current->has_children()){\n save_children($current->id);\n }\n }\n }\n\n unset($GLOBALS['nesting']);\n return $GLOBALS['categories'];\n }", "title": "" }, { "docid": "f265f12705b8e189dcea78c76d0da7c6", "score": "0.60180396", "text": "function getAllCategories($mode) {\n\t if ($mode == 1) {\n\t\t $query = \"SELECT * FROM ref_category;\";\n\t\t\tmysql_query($query) or die(mysql_error());\n\t\t $numResults=mysql_query($query);\n\t\t\t$numRows=mysql_num_rows($numResults);\n\t\t\t$categories=array();\n\t\t $i=0;\n\t\t\twhile($i < $numRows) {\n\t\t\t $row = mysql_fetch_array($numResults);\n\t\t\t array_push($categories, array(\"id\"=>$row['id'], \"name\"=>$row['name']));\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $categories;\n\t\t} else if ($mode == 2) {\n\t\t $query = \"SELECT root.id AS root_id, root.name AS root_name, down1.id AS down1_id, down1.name AS down1_name, down2.id AS down2_id, down2.name AS down2_name FROM ref_category AS root LEFT OUTER JOIN ref_category AS down1 ON down1.parent_id = root.id LEFT OUTER JOIN ref_category AS down2 ON down2.parent_id = down1.id WHERE root.parent_id IS NULL ORDER BY root_name, down1_name, down2_name\";\n\t\t\tmysql_query($query) or die(mysql_error());\n\t\t $numResults=mysql_query($query);\n\t\t\t$numRows=mysql_num_rows($numResults);\n\t\t\t$categories=array();\n\t\t $i=0;\n\t\t\t$level0Id = 0;\n\t\t\t$level1Id = 0;\n\t\t\t$level2Id = 0;\n\t\t\t$categoriesTree = array();\n\t\t\t$level1Children = array();\n\t\t\t$rootChildren = array();\n\t\t\t$leafArr = array();\n\t\t\twhile($i < $numRows) {\n\t\t\t $row = mysql_fetch_array($numResults);\n\t\t\t\t$leafArr = array();\n\t\t\t\tif ($row['down2_id'] != null) {\n\t\t\t\t $leafArr = array(\"id\"=>$row['down2_id'], \"text\"=>$row['down2_name']);\n\t\t\t\t}\n\t\t\t\tif ($level1Id == 0 || $level1Id == $row['down1_id']) {\n\t\t\t\t if (sizeof($leafArr) > 0) {\n\t\t\t\t array_push($level1Children, $leafArr);\n\t\t\t\t\t}\n\t\t\t\t\t$level1Id = $row['down1_id'];\n\t\t\t\t\t$level1Name = $row['down1_name'];\n\t\t\t\t} else {\n\t\t\t\t array_push($rootChildren, array(\"id\"=>$level1Id, \"text\"=>$level1Name, \"children\"=>$level1Children));\n\t\t\t\t\t// Reset level 1 children as level 1 element has changed.\n\t\t\t\t\t$level1Children = array();\n\t\t\t\t\t// Add leaf node (level 2) from current (level 1 changed) DB row.\n\t\t\t\t\tif (sizeof($leafArr) > 0) {\n\t\t\t\t\t array_push($level1Children, $leafArr);\n\t\t\t\t\t}\n\t\t\t\t\t// read new ID/Name of level 1.\n\t\t\t\t\t$level1Id = $row['down1_id'];\n\t\t\t\t\t$level1Name = $row['down1_name'];\n\t\t\t\t}\n\t\t\t\tif ($rootId != $row['root_id']) {\n\t\t\t\t if ($rootId == 0) {\n\t\t\t\t\t $rootId = $row['root_id'];\n\t\t\t\t\t\t$rootName = $row['root_name'];\n\t\t\t\t\t} else {\n\t\t\t\t\t array_push($categoriesTree, array(\"id\"=>$rootId, \"text\"=>$rootName, \"children\"=>$rootChildren));\n\t\t\t\t\t\t$rootChildren = array();\n\t\t\t\t\t\t$rootId = $row['root_id'];\n\t\t\t\t\t\t$rootName = $row['root_name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tif ($numRows > 0) {\n\t\t\t if (sizeOf($level1Children) > 0) {\n\t\t\t array_push($rootChildren, array(\"id\"=>$level1Id, \"text\"=>$level1Name, \"children\"=>$level1Children));\n\t\t\t }\n\t\t array_push($categoriesTree, array(\"id\"=>$rootId, \"text\"=>$rootName, \"children\"=>$rootChildren));\n\t\t\t}\n\t\t\treturn $categoriesTree;\n\t\t}\n\t}", "title": "" }, { "docid": "124a13cef47d2e43d4c7148a73513295", "score": "0.6012076", "text": "protected function _getTree()\r\n {\r\n if (!$this->_tree) {\r\n $this->_tree = Mage::getResourceModel('mageplaza_betterblog/category_tree')->load();\r\n }\r\n return $this->_tree;\r\n }", "title": "" }, { "docid": "6e585692aa9e14c4ae984230df5a7575", "score": "0.60052615", "text": "function build_tree_drop($parent_id = 0, $level = 0) {\n //the tree (with zero depth)\n $table = Tbl_cat_term_taxonomy::TBL;\n $tablejoin = array('0' => array('table' => Tbl_cat_term::TBL, 'field1' => Tbl_cat_term::TBL . '.' . Tbl_cat_term::id, 'field2' => $table . '.' . Tbl_cat_term_taxonomy::term_id,));\n $where_cat = array(Tbl_cat_term_taxonomy::TBL . '.' . Tbl_cat_term_taxonomy::parent => $parent_id);\n \n //$order = $table . '.' . Tbl_cat_term::id;\n $getJoin = $this->join($table, $tablejoin, '', $where_cat);\n \n //$result = mysql_query(\"SELECT * FROM cat_term_taxonomy INNER JOIN cat_term ON cat_term_taxonomy.term_id=cat_term.term_id WHERE parent='\" . $parent_id . \"'\");\n $getcate = '';\n \n foreach ($getJoin as $row) {\n \n //indent as necessary and print name\n $getcate.= '<option value=\"' . $row->term_id . '\" class=\"level-' . $row->parent . '\">';\n $getcate.= str_repeat('&nbsp;&nbsp;&nbsp;', $level) . $row->name . \"\\n\";\n $getcate.= '</option>';\n \n //we want to see all the children that belong to this\n //node… so we need to call *this* function again\n $getcate.= $this->build_tree_drop($row->term_id, $level + 1);\n }\n return $getcate;\n }", "title": "" }, { "docid": "e360cb8348ead5c46e37423635510fd7", "score": "0.6003695", "text": "private function buildTree(&$tree, $id)\n {\n $object = $this->findOneBy(['cid' => $id]);\n\n if (!$object instanceof Category) {\n return;\n }\n\n $tree[$object->getCid()] = $object;\n\n if ($object->getParent() == 0) {\n return;\n }\n\n $this->buildTree($tree, $object->getParent());\n }", "title": "" }, { "docid": "fd5d873ccc997751386cba9b9da8500f", "score": "0.60024256", "text": "public function buildCat($id)\n {\n $str = '<ul>';\n for ($z = 0; $z < count($this->cats); $z++) {\n if ($this->cats[$z]['parent_category_id'] == $id) {\n $str .= \"<li class='listnone'><span class='glyphicon glyphicon-folder-open'>&nbsp;</span><span class='tree_branch'>\" . $this->cats[$z]['name'] . \"</span><i> (\" . $this->cats[$z]['notice'] . \")</i>\";\n $str .= $this->buildItem($this->cats[$z]['id']);\n $str .= $this->buildCat($this->cats[$z]['id']);\n $str .= \"</li>\";\n }\n }\n $str .= \"</ul>\";\n return $str;\n }", "title": "" }, { "docid": "66498c904b4bfebfbb1f7cc8dc9896cf", "score": "0.59929204", "text": "public static function &constructCategoryTree($category)\n\t{\n\t\t\n\t\t$root=array();\n\t\t$titles=array();\n\t\t$subs=self::findSubCategories($category, $titles);\n\t\tfor($i=0; $i<count($subs); $i++)\n\t\t{\n\t\t\t$child=self::constructCategoryTree($titles[$i]);\n\t\t\t$root[$subs[$i]]=$child;\n\t\t}\n\t\treturn $root;\n\t\t\n\t}", "title": "" }, { "docid": "fb6bf6073843dd1d36acb0a126597655", "score": "0.5991423", "text": "private function processCategories(){\n\t\tif ($this->m_node != null){\n\t\t\t$catNode = $this->m_node->categories;\n\t\t\tif ($catNode != null){\n\t\t\t\t$temp = $catNode->suggestedCategoryTitle;\n\t\t\t\tif ($temp != null){\n\t\t\t\t\t$this->m_suggestedCategoryTitle = $temp;\n\t\t\t\t}\n\t\t\t\t$temp = $catNode->suggestedCategoryID;\n\t\t\t\tif ($temp != null){\n\t\t\t\t\t$this->m_suggestedCategoryID = $temp;\n\t\t\t\t}\n\t\t\t\t$temp = isset($catNode->detailedSuggestedCategory)?$catNode->detailedSuggestedCategory:null;\n\t\t\t\tif ($temp != null){\n\t\t\t\t\t$this->m_detailedSuggestedCategory = $temp;\n\t\t\t\t\t$this->m_detailedSuggestedProductCount = $temp->productCount;\n\t\t\t\t\t$this->m_detailedSuggestedIDs = $temp->ids;\n\t\t\t\t\t$this->m_detailedSuggestedNodeString = $temp->nodeString;\n\t\t\t\t\t$this->m_detailedSuggestedSEOPath = $temp->seoPath;\n\t\t\t\t}\n\t\t\t\t$cats = isset($catNode->categoryList)?$catNode->categoryList:null;\n\t\t\t\tif ($cats != null && sizeof($cats) > 0){\n\t\t\t\t\tforeach ($cats as $cat){\n\t\t\t\t\t\t$this->m_categories[] = new EasyAsk_Impl_NavigateCategory($cat);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$cats = isset($catNode->initialCategoryList)?$catNode->initialCategoryList:null;\n\t\t\t\tif ($cats != null && sizeof($cats) > 0){\n\t\t\t\t\t$this->m_initialDisplayLimitForCategories = $catNode->InitDispLimit;\n\t\t\t\t\tforeach ($cats as $cat){\n\t\t\t\t\t\t$this->m_initialCategories[] = new EasyAsk_Impl_NavigateCategory($cat);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "afae81adbb6074b2d257c6cbf7c41f5e", "score": "0.59576124", "text": "public function tree()\n\t{\n\t\techo json_encode(category::get_category_tree_data(FALSE, $this->admin));\n\t}", "title": "" }, { "docid": "228e617c8e69da0ef5e642e7b22b0137", "score": "0.595573", "text": "function category_tree($active,$override_list = '0',$cache_category_list = '0',$widget = '0',$widget_list_categories = '1',$widget_clause = '`order` ASC',$widget_cols = '1') {\n\t\tglobal $privileges;\n\t\tglobal $user;\n\t\tglobal $user_data;\n\t\t$file = PATH . \"/generated/categories.php\";\n\t\t// Cache category list\n\t\tif ($cache_category_list == '1' && $override_list != '1' && $widget != '1') {\n \t\t\tif (file_exists($file)) {\n\t\t\t\tob_start();\n\t\t\t\tinclude($file);\n\t\t\t\t$contents = ob_get_contents();\n\t\t\t\tob_end_clean();\n\t\t\t\treturn $contents;\n \t\t\t} else {\n \t\t\t\t$tree = $this->category_tree($active,'1');\n \t\t\t\t$this->write_file($file,$tree);\n \t\t\t\treturn $tree;\n \t\t\t}\n\t\t}\n\t\t// Generate list from DB\n\t\telse {\n\t\t\t// Direct linking?\n\t\t\t$direct_linking = $this->get_option('direct_link');\n\t\t\t// Public site?\n\t\t\t$public_site = $this->check_public();\n\t\t\tif ($public_site == '0' && empty($user)) {\n\t\t\t\treturn '';\n\t\t\t}\n\t\t\t// Continue\n\t\t\t$list = '';\n\t\t\t$articles_hidden = '';\n\t\t\t$kill_widget_cols = '';\n\t\t\t$url_display_type = $this->get_option('url_display_type');\n\t\t\tif ($widget == '1') {\n\t\t\t\t$class = \"bd_widget_ul\";\n\t\t\t\t$wid_class = \"bd_widget_ul_primary\";\n\t\t\t\t$final_class_primary_ul = \" class=\\\"bd_widget_ul bd_widget_ul_primary\\\"\";\n\t\t\t\t$subcat = $active;\n\t\t\t\t// Does this widget have columns?\n\t\t\t\tif ($widget_cols > 1) {\n\t\t\t\t\t$kill_widget_cols = '1';\n\t\t\t\t\t$col_width = floor((100) / $widget_cols);\n\t\t\t\t\t$col_width -= 1;\n\t\t\t\t\t$list .= \"<style type=\\\"text/css\\\"><!--\\n\";\n\t\t\t\t\t$list .= \".bd_widget_ul {\\n\";\n\t\t\t\t\t$list .= \"\tfloat: left;\\n\";\n\t\t\t\t\t$list .= \"\twidth: \" . $col_width . \"%;\\n\";\n\t\t\t\t\t$list .= \"}\\n\";\n\t\t\t\t\t$list .= \".bd_widget_ul_primary {\\n\";\n\t\t\t\t\t$list .= \"\tfloat: none;\\n\";\n\t\t\t\t\t$list .= \"}\\n\";\n\t\t\t\t\t$list .= \"--></style>\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$subcat = '0';\n\t\t\t\t$class = \"\";\n\t\t\t\t$final_class_primary_ul = \"\";\n\t\t\t\t$wid_class = \"\";\n\t\t\t}\n\t\t\t$q = \"SELECT * FROM `\" . TABLE_PREFIX . \"categories` WHERE `subcat`='$subcat' AND `base`!='1' ORDER BY `order` ASC\";\n\t\t\t$result = $this->run_query($q);\n\t\t\t$list .= \"<ul$final_class_primary_ul id=\\\"articles0\\\"\";\n\t\t\tif ($active != \"0\" && $widget != '1') {\n\t\t\t\t$list .= \" style=\\\"display:none;\\\"\";\n\t\t\t}\n\t\t\t$list .= \">\\n\";\n\t\t\t$current_widget_loop = 1;\n\t\t \t$found_categories = '0';\n\t\t \t$theCates = '';\n\t\t \t$show = '0';\n\t\t \t$private = '';\n\t\t\t// Loop through the primary \"base\" categories\n\t\t\tif ($widget_list_categories == '1') {\n\t\t \t\twhile ($row = mysql_fetch_array($result)) {\n\t\t \t\t\t$found_categories = '1';\n\t\t \t\t\t// Here we determine whether there are multiple\n\t\t \t\t\t// articles in a category or just one. If there\n\t\t \t\t\t// is only one, we link directly to it. Otherwise\n\t\t \t\t\t// we display the options.\n\t\t \t\t\tif ($widget != '1') {\n\t\t\t \t\t\t// Private?\n\t\t\t\t\t\tif ($row['public'] == '0' || $row['public'] == '2' || $row['public'] == '3') {\n\t\t\t\t \t\t\tif ($privileges['is_admin'] == '1' || $privileges['can_view_private'] == '1') {\n\t\t\t\t\t\t\t\t$private = \"<img src=\\\"\" . URL . \"/templates/html/_imgs/private.png\\\" width=\\\"16\\\" height=\\\"16\\\" alt=\\\"This category is private.\\\" title=\\\"This category is private.\\\" border=\\\"0\\\" style=\\\"vertical-align:middle;padding-left:4px;\\\" />\";\n\t\t\t\t\t\t\t\t$show = '1';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (empty($user)) {\n\t\t\t\t\t\t\t\t\t$show = '0';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$hasAccess = $this->user_permissions('',$user_data['id'],$user_data['type'],'0',$row['id']);\n\t\t\t\t\t\t\t\t\tif ($hasAccess == '1') {\n\t\t\t\t\t\t\t\t\t\t$show = '1';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$show = '0';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$show = '1';\n\t\t\t\t\t\t\t$private = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Create the link\n\t\t\t\t\t\tif ($show == '1') {\n\t\t\t\t\t\t\tif ($direct_linking == '1') {\n\t\t\t\t \t\t\t\tif (! empty($row['home_article'])) {\n\t\t\t\t\t \t\t\t\t$q1 = \"SELECT `id`,`name` FROM `\" . TABLE_PREFIX . \"articles` WHERE `id`='\" . $row['home_article'] . \"'\";\n\t\t\t\t\t \t\t\t\t$single_article_details = $this->get_array($q1);\n\t\t\t\t\t \t\t\t\t$link = $this->prepare_link($single_article_details['id'],$row['id'],$single_article_details['name']);\n\t\t\t\t \t\t\t\t} else {\n\t\t\t\t\t \t\t\t\t$link = $this->prepare_link('',$row['id'],'');\n\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t//$q1 = \"SELECT `id`,`name` FROM `\" . TABLE_PREFIX . \"articles` WHERE `category`='\" . $row['id'] . \"'\";\n\t\t\t\t\t\t\t\t//$single_article_details = $this->get_array($q1);\n\t\t\t\t\t\t\t\t//$link = $this->prepare_link($single_article_details['id'],$row['id'],$single_article_details['name']);\n\t\t\t\t \t\t\t\t$theCates .= \"<li class=\\\"category_entry\\\"><a href=\\\"$link\\\">\" . $row['name'] . \"</a>$private</li>\\n\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (! empty($row['home_article'])) {\n\t\t\t\t\t\t\t\t\t$q1 = \"SELECT `id`,`name` FROM `\" . TABLE_PREFIX . \"articles` WHERE `id`='\" . $row['home_article'] . \"' LIMIT 1\";\n\t\t\t\t\t\t\t\t\t$single_article_details = $this->get_array($q1);\n\t\t\t\t\t\t\t\t\t$link = $this->prepare_link($single_article_details['id'],$row['id'],$single_article_details['name']);\n\t\t\t\t\t \t\t\t\t$theCates .= \"<li class=\\\"category_entry\\\"><a href=\\\"$link\\\">\" . $row['name'] . \"</a>$private</li>\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t \t\t\t\t\t$theCates .= \"<li class=\\\"category_entry\\\"><a href=\\\"#\\\" onclick=\\\"return expandCategory('\" . $row['id'] . \"');\\\">\" . $row['name'] . \"</a>$private</li>\\n\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/*\n\t\t\t\t \t\t\tif (empty($row['home_article']) && $direct_linking == '1') {\n\t\t\t\t\t\t\t\t$q1 = \"SELECT `id`,`name` FROM `\" . TABLE_PREFIX . \"articles` WHERE `category`='\" . $row['id'] . \"'\";\n\t\t\t\t\t\t\t\t$single_article_details = $this->get_array($q1);\n\t\t\t\t\t\t\t\t$link = $this->prepare_link($single_article_details['id'],$row['id'],$single_article_details['name']);\n\t\t\t\t \t\t\t\t$theCates .= \"<li class=\\\"category_entry\\\"><a href=\\\"$link\\\">\" . $row['name'] . \"</a>$private</li>\\n\";\n\t\t\t\t \t\t\t} else {\n\t\t\t\t \t\t\t\tif (! empty($row['home_article']) && $direct_linking == '1') {\n\t\t\t\t\t\t\t\t\t$q1 = \"SELECT `id`,`name` FROM `\" . TABLE_PREFIX . \"articles` WHERE `id`='\" . $row['home_article'] . \"' LIMIT 1\";\n\t\t\t\t\t\t\t\t\t$single_article_details = $this->get_array($q1);\n\t\t\t\t\t\t\t\t\t$link = $this->prepare_link($single_article_details['id'],$row['id'],$single_article_details['name']);\n\t\t\t\t\t \t\t\t\t$theCates .= \"<li class=\\\"category_entry\\\"><a href=\\\"$link\\\">\" . $row['name'] . \"</a>$private</li>\";\n\t\t\t\t \t\t\t\t} else {\n\t\t\t\t \t\t\t\t\t$theCates .= \"<li class=\\\"category_entry\\\"><a href=\\\"#\\\" onclick=\\\"expandCategory('\" . $row['id'] . \"');return false;\\\">\" . $row['name'] . \"</a>$private</li>\\n\";\n\t\t\t\t \t\t\t\t}\n\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}\n\t\t \t\t\t// If the active category isn't \"base\",\n\t\t \t\t\t// display that category rather than the\n\t\t \t\t\t// \"base\" category.\n\t\t \t\t\tif ($row['id'] == $active && $active != \"0\") {\n\t\t \t\t\t\t// First get sub-categories within\n\t\t \t\t\t\t// this category.\n\t\t \t\t\t\t/*\n\t\t\t\t\t\t$q1 = \"SELECT id,name FROM `\" . TABLE_PREFIX . \"categories` WHERE `subcat`='\" . $row['id'] . \"' ORDER BY `order` ASC\";\n\t\t\t\t\t\t$subcategories = $this->run_query($q1);\n\t\t\t\t\t\twhile ($rowA = mysql_fetch_array($subcategories)) {\n\t\t \t\t\t\t\t$list .= \"<li class=\\\"sub_link\\\"><a href=\\\"#\\\" onclick=\\\"originalMenu();return false;\\\">\" . $rowA['name'] . \"</a></li>\";\n\t\t\t \t\t\t\t$get_articles = $this->list_articles($rowA['id']);\n\t\t\t \t\t\t\t$articles_hidden .= $get_articles;\n\t\t \t\t\t\t}\n\t\t \t\t\t\t*/\n\t\t \t\t\t\t// Append the article titles for this category\n\t\t \t\t\t\t$get_articles = $this->list_articles($row['id'],'1','0',$active,$url_display_type,$widget,$widget_list_categories,$widget_clause,$widget_cols);\n\t\t \t\t\t}\n\t\t \t\t\t// Here we get other category data without\n\t\t \t\t\t// displaying it.\n\t\t \t\t\telse {\n\t\t \t\t\t\t$get_articles = $this->list_articles($row['id'],'','',$active,$url_display_type,$widget,$widget_list_categories,$widget_clause,$widget_cols);\n\t\t \t\t\t}\n\t\t \t\t\t$articles_hidden .= $get_articles;\n\t\t \t\t\t\n\t\t \t\t\t// For widgets with columns.\n\t\t \t\t\tif ($kill_widget_cols == '1' && $current_widget_loop == 3) {\n\t\t \t\t\t\t$articles_hidden .= \"<div style=\\\"clear:both;\\\"></div>\";\n\t\t \t\t\t\t$current_widget_loop = 0;\n\t\t \t\t\t}\n\t\t \t\t\t$current_widget_loop++;\n\t\t \t\t}\n\t \t\t}\n\t\t\t$theCates .= \"<li class=\\\"category_separator\\\"></li>\\n\";\n\t \t\tif ($kill_widget_cols == '1' && $current_widget_loop != '1') {\n\t \t\t\t$articles_hidden .= \"<div style=\\\"clear:both;\\\"></div>\";\n\t \t\t}\n\t \t\t// Categories found?\n\t \t\tif ($found_categories > 0) {\n\t\t\t\t$list .= \"<li class=\\\"categories_heading\\\">\" . lg_subcates . \"</li>\\n\";\n\t\t\t\t$list .= $theCates;\n\t \t\t}\n\t \t\t// Add base articles to the list\n\t\t\t// Articles\n\t\t\t$add_where = '';\n\t\t\tif ($privileges['can_view_private'] != '1' && $privileges['is_admin'] != '1') {\n\t\t\t\t$add_where .= \" AND `public`='1' AND `display_on_sidebar`='1'\";\n\t\t\t} else {\n\t\t\t\t$add_where .= \"\";\n\t\t\t}\n\t\t\tif (! empty($widget_clause) && $widget == '1') {\n\t\t\t\t$q = \"SELECT `id`,`name`,`category`,`public` FROM `\" . TABLE_PREFIX . \"articles` WHERE `category`='$active'$add_where $widget_clause\";\n\t\t\t} else {\n\t\t\t\t$q = \"SELECT `id`,`name`,`category`,`public` FROM `\" . TABLE_PREFIX . \"articles` WHERE `category`='0'$add_where ORDER BY `order` ASC\";\n\t\t\t}\n\t\t\t//echo $q;\n\t\t\t\n\t\t\t$result = $this->run_query($q);\n\t \t\t$found_sublink = '0';\n\t\t\t$sublinks = '';\n\t \t\twhile ($row = @mysql_fetch_array($result)) {\n\t \t\t\t$found_sublink = '1';\n\t\t\t\t$private = '';\n\t\t\t\t$link = $this->prepare_link($row['id'],$row['category'],$row['name']);\n\t\t\t\tif ($row['public'] != '1') {\n\t\t\t\t\t$private = \"<img src=\\\"\" . URL . \"/templates/html/_imgs/private.png\\\" width=\\\"16\\\" height=\\\"16\\\" alt=\\\"This page is not public.\\\" title=\\\"This page is not public.\\\" border=\\\"0\\\" style=\\\"vertical-align:middle;padding-left:4px;\\\" />\";\n\t\t\t\t} else {\n\t\t\t\t\t$private = '';\n\t\t\t\t}\n\t\t\t\tif (BD_ARTICLE_VIEWING == $row['id']) {\n\t\t\t\t\t$sublinks .= \"<li class=\\\"sub_link on\\\"><a href=\\\"$link\\\">\" . $row['name'] . \"</a>$private</li>\\n\";\n\t\t\t\t} else {\n\t\t\t\t\t$sublinks .= \"<li class=\\\"sub_link\\\"><a href=\\\"$link\\\">\" . $row['name'] . \"</a>$private</li>\\n\";\n\t\t\t\t}\n\t \t\t}\n\t \t\tif ($found_sublink > 0) {\n\t\t\t\t$list .= \"<li class=\\\"articles_heading\\\">\" . lg_sublinks . \"</li>\\n\";\n\t\t\t\t$list .= $sublinks;\n\t \t\t} else {\n\t \t\t\t// $list = '';\n\t \t\t}\n\t \t\t$list .= \"</ul>\\n\";\n\t \t\t$list .= $articles_hidden;\n\t \t\t// Cache category list\n\t \t\t// We can only get to this spot in the code\n\t \t\t// if caching is on but the file doesn't\n\t \t\t// exist.\n\t \t\tif ($cache_category_list == '1') {\n\t\t\t\t$fp = fopen($file, 'w');\n\t\t\t\tfwrite($fp, $list);\n\t\t\t\tfclose($fp);\n\t \t\t}\n\t\t\treturn $list;\n\t\t}\n\t}", "title": "" }, { "docid": "23cb2120cebb84bc86e4c44580f37ffe", "score": "0.59388083", "text": "public function get_publication_category_tree()\n {\n return $this->categoryTree;\n }", "title": "" }, { "docid": "c4e1c3b89e6ff6e45c4cec5774b14f2f", "score": "0.59108585", "text": "protected function buildCategoryTree($categories)\n {\n $tree = [];\n\n foreach ($categories as $category) {\n $this->logger->info(\"Searching info for category {$category->name}\");\n $info = $this->getCategoryInfo($category->category_id);\n\n $tree[] = [\n 'id' => $category->category_id,\n 'name' => $category->name,\n 'children' =>\n isset($category->children) && !empty($category->children) ?\n $this->buildCategoryTree($category->children) : [],\n 'path' => !empty($info) && isset($info->path) && !empty($info->path) ? $info->path : \"\",\n 'url_path' => !empty($info) && isset($info->url_path) && !empty($info->url_path) && isset($this->config['host']) ? ($this->config['host'] . \"/\" . $info->url_path) : null,\n 'url_key' => !empty($info) && isset($info->url_key) && !empty($info->url_key) ? $info->url_key : null,\n 'image' => null,\n ];\n }\n\n return $tree;\n }", "title": "" }, { "docid": "9f7e30c749dbbaf134c2f610770a8460", "score": "0.59070647", "text": "public function category() {\n\n\t\t$parent_cat = null ;\n\t\t// Load the Text Parser\n\t\t$this->helpers(array(\"TextParser\"));\n\t\t$this->helpers(array(\"Date\"));\n\t\t\n\t\t$list_cat = $this->Knowledgebase->buildTree($this->KnowledgebaseCategories->getAllCategories($this->company_id)) ; \n\t\t$sub_cat = $this->KnowledgebaseCategories->getAll($this->company_id , $this->get[0] ) ; //getAll sub categories($company_id, $parent_id = null)\n\t\t$category = $this->KnowledgebaseCategories->get($this->get[0] ) ; //getAll categories($company_id, $parent_id = null)\n\t\t$articles = $this->KnowledgebaseArticles->getAll($this->company_id , $this->get[0] ) ; //getAll articles($company_id, $parent_id = null)\n\n\t\tif (!empty($category->parent_id))\n\t\t\t$parent_cat = $this->KnowledgebaseCategories->get($category->parent_id ) ; //getAll categories($company_id, $parent_id = null)\n\t\t\n\t\t$this->set(\"lesarticles\", $articles);\n\t\t$this->set(\"sub_cat\", $sub_cat);\n\t\t$this->set(\"parent_cat\", $parent_cat);\n\t\t$this->set(\"category\", $category);\n\t\t$this->set(\"lescategories\", $list_cat);\n\n\t\t$this->view->setView(null, \"Knowledgebase.default\");\t\n\t\t$this->structure->set(\"page_title\", Language::_(\"ClientMain.category.page_title\", true , $this->Html->ifSet($category->name)));\t\n\t}", "title": "" }, { "docid": "b21c04d6e935530ab23ec7647c21368d", "score": "0.59054446", "text": "public function category_tree($group_id, $selected = '', $order = 'c')\n\t{\n\t\t// reset $this->categories\n\t\t$this->initialize(array(\n\t\t\t\t'categories'\t=> array(),\n\t\t\t\t'cat_parents'\t=> array(),\n\t\t\t\t'cat_array'\t\t=> array(),\n\t\t\t)\n\t\t);\n\n\t\t// Fetch the category group ID number\n\t\t// Drop it into an array for where_in()\n\t\t$group_ids = $group_id;\n\n\t\tif ( ! is_array($group_id))\n\t\t{\n\t\t\t$group_ids = explode('|', $group_id);\n\t\t}\n\n\t\t$catarray = array();\n\n\t\tif (is_array($selected))\n\t\t{\n\t\t\tforeach ($selected as $key => $val)\n\t\t\t{\n\t\t\t\t$catarray[$val] = $val;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$catarray[$selected] = $selected;\n\t\t}\n\n\t\t$order = ($order == 'a') ? \"cat_name\" : \"cat_order\";\n\n\t\t$query = ee()->db->select('cat_name, cat_id, parent_id, cat_image, cat_description, g.group_id, group_name, cat_url_title')\n\t\t\t\t\t\t->from('category_groups g, categories c')\n\t\t\t\t\t\t->where('g.group_id', 'c.group_id', FALSE)\n\t\t\t\t\t\t->where_in('g.group_id', $group_ids)\n\t\t\t\t\t\t->order_by('group_id, parent_id, '.$order, 'asc')\n\t\t\t\t\t\t->get();\n\n\t\tif ($query->num_rows() === 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Assign the query result to a multi-dimensional array\n\n\t\tforeach($query->result_array() as $row)\n\t\t{\n\t\t\t$cat_array[$row['cat_id']]\t= array(\n\t\t\t\t$row['parent_id'],\n\t\t\t\t$row['cat_name'],\n\t\t\t\t$row['group_id'],\n\t\t\t\t$row['group_name'],\n\t\t\t\t$row['cat_image'],\n\t\t\t\t$row['cat_description'],\n\t\t\t\t$row['cat_url_title']\n\t\t\t);\n\t\t}\n\n\t\t// Build our output...\n\n\t\tforeach($cat_array as $key => $val)\n\t\t{\n\t\t\tif (0 == $val[0])\n\t\t\t{\n\t\t\t\t$sel = (isset($catarray[$key])) ? TRUE : FALSE;\n\t\t\t\t$depth = 1;\n\n\t\t\t\t$this->categories[$key] = array($key, $val[1], (int) $val[2], $val[3], $sel, $depth, FALSE, $val[4], $val[5], $val[6]);\n\t\t\t\t//$this->categories[$key] = array('cat_id' => $key, 'cat_name' => $val['1'], 'group_id' => $val['2'], 'group_name' => $val['3'], 'selected' => $sel, 'depth' => $depth);\n\t\t\t\t$this->_category_subtree($key, $cat_array, $depth, $selected);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->categories;\n\t}", "title": "" }, { "docid": "6357b95a09da66cfb787291e82b5cc16", "score": "0.58678377", "text": "public function buildTree($cats, $parent = null, $onlyParent = false)\n {\n if (is_array($cats) && !empty($cats[$parent])) {\n $tree = '<ul class=\"parents\">';\n if ($onlyParent == false) {\n foreach ($cats[$parent] as $cat) {\n $tree .= '<li>'.$cat['title'].',' . $cat['name'] . ' , ' . $cat['email'];\n $tree .= $this->buildTree($cats, $cat['id']);\n $tree .= '</li>';\n }\n } elseif (is_numeric($onlyParent)) {\n $cat = $cats[$parent][$onlyParent];\n $tree .= '<li>'.$cat['title'].', ' . $cat['name'] . ', ' . $cat['email'];\n $tree .= $this->buildTree($cats, $cat['id']);\n $tree .= '</li>';\n }\n $tree .= '</ul>';\n } else return null;\n return $tree;\n }", "title": "" }, { "docid": "fb8331240cbcacdcbc9fb1f28e722338", "score": "0.58667374", "text": "public function getCategory()\n {\n $data = null;\n $orderby = 'category_orderby asc';\n $object = \"id,category_name,category_parent,category_component,category_action,category_icon\";\n $list = $this->getQuery($object, \"category_status = 1 and category_parent = 0\", $orderby, \"\");\n if (isset($list) && $list) {\n foreach ($list as $key => $value) {\n if ($value[\"category_name\"]) {\n $data[] = array(\n \"id\" => $value[\"id\"],\n \"category_name\" => $value[\"category_name\"],\n \"category_parent\" => $value[\"category_parent\"],\n \"category_component\" => $value[\"category_component\"],\n \"category_icon\" => $value[\"category_icon\"],\n \"category_action\" => $value[\"category_action\"],\n );\n /**begin menu cap 2*/\n $list_c2 = $this->getQuery($object, \"category_status = 1 and category_parent = \" . $value['id'], $orderby, \"\");\n if (isset($list_c2) && $list_c2) {\n foreach ($list_c2 as $key_c2 => $value_c2) {\n if ($value_c2[\"category_name\"]) {\n $data[$key][$value[\"category_parent\"]][] = array(\n \"id\" => $value_c2[\"id\"],\n \"category_name\" => $value_c2[\"category_name\"],\n \"category_parent\" => $value_c2[\"category_parent\"],\n \"category_component\" => $value_c2[\"category_component\"],\n \"category_icon\" => $value_c2[\"category_icon\"],\n \"category_action\" => $value_c2[\"category_action\"],\n );\n }\n }\n }\n /**end menu cap 2*/\n }\n }\n }\n return $data;\n }", "title": "" }, { "docid": "d9c274ca72ba40be53ba8b514cdf6d7e", "score": "0.58478546", "text": "public function __construct(){\n\t\t\t$res = DB::$db->query(\"SELECT cat_id, parent_id, cat_name FROM categories\");\n\t\t\t$this->cats = array();\n\t\t\twhile($row = $res->fetch()){\n\t\t\t\tif($row['parent_id'] == \"0\"){\n\t\t\t\t\t$this->cats[$row['cat_id']] = $row; \n\t\t\t\t}else{\n\t\t\t\t\t$this->cats[$row['parent_id']]['subcats'][] = $row;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "85cd6582f00d2379f29659c3748ef6e1", "score": "0.5844758", "text": "function get_download_category_tree($category_id=NULL,$tree=NULL,$title=NULL,$do_stats=true,$use_compound_list=false,$levels=NULL,$addable_filter=false)\n{\n\tif (!$use_compound_list)\n\t{\n\t\tif ($levels==-1) return array();\n\t}\n\n//\tif (!has_category_access(get_member(),'downloads',strval($category_id))) return array();\n\n\tif (is_null($category_id)) $category_id=db_get_first_id();\n\tif (is_null($tree)) $tree='';\n\n\t// Put our title onto our tree\n\tif (is_null($title)) $title=get_translated_text($GLOBALS['SITE_DB']->query_value('download_categories','category',array('id'=>$category_id)));\n\t$tree.=$title;\n\n\t// We'll be putting all children in this entire tree into a single list\n\t$children=array();\n\t$children[0]=array();\n\t$children[0]['id']=$category_id;\n\t$children[0]['title']=$title;\n\t$children[0]['tree']=$tree;\n\t$children[0]['compound_list']=strval($category_id).',';\n\tif ($addable_filter) $children[0]['addable']=has_submit_permission('mid',get_member(),get_ip_address(),'cms_downloads',array('downloads',$category_id));\n\tif ($do_stats) $children[0]['filecount']=$GLOBALS['SITE_DB']->query_value('download_downloads','COUNT(*)',array('category_id'=>$category_id));\n\n\t// Children of this category\n\t$rows=$GLOBALS['SITE_DB']->query_select('download_categories',array('id','category'),array('parent_id'=>$category_id),'',300/*reasonable*/);\n\tif (count($rows)==300) $rows=array();\n\t$children[0]['child_count']=count($rows);\n\t$tree.=' > ';\n\tif (($levels!==0) || ($use_compound_list))\n\t{\n\t\tforeach ($rows as $child)\n\t\t{\n\t\t\t$child_id=$child['id'];\n\t\t\t$child_title=get_translated_text($child['category']);\n\t\t\t$child_tree=$tree;\n\n\t\t\t$child_children=get_download_category_tree($child_id,$child_tree,$child_title,$do_stats,$use_compound_list,is_null($levels)?NULL:max(0,$levels-1),$addable_filter);\n\t\t\tif ($use_compound_list)\n\t\t\t{\n\t\t\t\tlist($child_children,$_compound_list)=$child_children;\n\t\t\t\t$children[0]['compound_list'].=$_compound_list;\n\t\t\t}\n\n\t\t\tif ($levels!==0)\n\t\t\t\t$children=array_merge($children,$child_children);\n\t\t}\n\t}\n\n\treturn $use_compound_list?array($children,$children[0]['compound_list']):$children;\n}", "title": "" }, { "docid": "d8f890cea652691962ccb5050efe363b", "score": "0.5838226", "text": "public static function categoryTree($rootcatid, $align)\n {\n $ambit = JoomAmbit::getInstance();\n $config = JoomConfig::getInstance();\n $user = JFactory::getUser();\n $categories = $ambit->getCategoryStructure(true);\n\n // Check access rights settings\n $filter_cats = false;\n $restricted_hint = false;\n $restricted_cats = false;\n $root_access = false;\n if(!$config->get('jg_showrestrictedhint') && !$config->get('jg_showrestrictedcats'))\n {\n $filter_cats = true;\n }\n else\n {\n if($config->get('jg_showrestrictedhint'))\n {\n $restricted_hint = true;\n }\n if($config->get('jg_showrestrictedcats'))\n {\n $restricted_cats = true;\n }\n }\n\n // Array to hold the relevant sub-category objects\n $subcategories = array();\n // Array to hold the valid parent categories\n $validParentCats = array();\n $validParentCats[$rootcatid] = true;\n\n // Get all relevant subcategories\n $keys = array_keys($categories);\n $startindex = array_search($rootcatid, $keys);\n if($startindex !== false)\n {\n $stopindex = count($categories);\n $root_access = in_array($categories[$rootcatid]->access, $user->getAuthorisedViewLevels()) && !$categories[$rootcatid]->protected;\n\n for($j = $startindex + 1; $j < $stopindex; $j++)\n {\n $i = $keys[$j];\n $parentcat = $categories[$i]->parent_id;\n if(isset($validParentCats[$parentcat]))\n {\n // Hide empty categories\n $empty = false;\n if($config->get('jg_hideemptycats'))\n {\n $subcatids = JoomHelper::getAllSubCategories($i, true, ($config->get('jg_hideemptycats') == 1), true);\n // If 'jg_hideemptycats' is set to 1 the root category will always be in $subcatids, so check whether there are images in it\n if( !count($subcatids)\n || (count($subcatids) == 1 && $config->get('jg_hideemptycats') == 1 && !$categories[$i]->piccount)\n )\n {\n $empty = true;\n }\n }\n\n if( $categories[$i]->published\n && ($filter_cats == false || (\n in_array($categories[$i]->access, $user->getAuthorisedViewLevels())\n && (($parentcat == $rootcatid && $root_access) || ($parentcat != $rootcatid && $subcategories[$parentcat]->access))\n )\n )\n && !$categories[$i]->hidden\n && (!$config->get('jg_hideemptycats') || !$empty)\n )\n {\n $validParentCats[$i] = true;\n $subcategories[$i] = clone $categories[$i];\n if(\n ( $parentcat == $rootcatid\n && !$root_access\n )\n ||\n ( $parentcat != $rootcatid\n &&\n !$subcategories[$parentcat]->access\n )\n || !in_array($categories[$i]->access, $user->getAuthorisedViewLevels())\n || $categories[$i]->protected\n )\n {\n $subcategories[$i]->access = false;\n\n if(\n ( $parentcat == $rootcatid\n && !$root_access\n )\n ||\n ( $parentcat != $rootcatid\n &&\n !$subcategories[$parentcat]->access\n )\n )\n {\n $subcategories[$i]->protected = false;\n }\n }\n }\n }\n else\n {\n if($parentcat == 0)\n {\n // Branch has been processed completely\n break;\n }\n }\n }\n }\n\n // Show the treeview\n $count = count($subcategories);\n if(!$count)\n {\n return;\n }\n\n // If $align is 'jg_element_txt' we are displaying random thumbnails\n // or the thumbnail alignment is set to 'Use global'. In both cases\n // we have to take 'jg_ctalign' under consideration.\n if($align == 'jg_element_txt')\n {\n switch($config->get('jg_ctalign'))\n {\n case 0:\n // Changing: $align is only 'jg_element_txt' if the thumbnail is aligned left\n // Break omitted intentionally\n case 1:\n // Left\n $align = 'jg_element_txt_l';\n break;\n case 2:\n // Right\n $align = 'jg_element_txt_r';\n break;\n case 3:\n // Break omitted intentionally\n default:\n // Centered\n $align = 'jg_element_txt_c';\n break;\n }\n }\n\n if($align == 'jg_element_txt_l')\n {\n?>\n <div class=\"jg_treeview_l\">\n<?php\n }\n elseif($align == 'jg_element_txt_r')\n {\n?>\n <div class=\"jg_treeview_r\">\n<?php\n }\n else\n {\n?>\n <div class=\"jg_treeview_c\">\n<?php\n }\n?>\n <table>\n <tr>\n <td>\n <script type=\"text/javascript\" language=\"javascript\">\n <!--\n // Create new dTree object\n var jg_TreeView<?php echo $rootcatid;?> = new jg_dTree( <?php echo \"'\".\"jg_TreeView\".$rootcatid.\"'\"; ?>,\n <?php echo \"'\".$ambit->getScript('dTree/img/').\"'\"; ?>);\n // dTree configuration\n jg_TreeView<?php echo $rootcatid;?>.config.useCookies = true;\n jg_TreeView<?php echo $rootcatid;?>.config.inOrder = true;\n jg_TreeView<?php echo $rootcatid;?>.config.useSelection = false;\n // Add root node\n jg_TreeView<?php echo $rootcatid;?>.add( 0, -1, ' ', <?php echo \"'\".JRoute::_( 'index.php?view=gallery'.$rootcatid).\"'\"; ?>, false);\n // Add node to hold all subcategories\n jg_TreeView<?php echo $rootcatid;?>.add( <?php echo $rootcatid; ?>, 0, <?php echo \"'\".JText::_('COM_JOOMGALLERY_COMMON_SUBCATEGORIES', true).\"(\".$count.\")\".\"'\";?>,\n <?php echo $root_access ? \"'\".JRoute::_('index.php?view=category&catid='.$rootcatid).\"'\" : \"''\"; ?>,\n <?php echo $root_access ? 'false' :'true'; ?> );\n<?php\n foreach($subcategories as $category)\n {\n // Create sub-category name and sub-category link\n if($filter_cats == false || $category->access || $category->protected)\n {\n // If the category is accessible create a link.\n // The link is also created if the category is password-protected, but only if its parent category is accessible.\n // The latter is ensured above by setting property 'protected' respectively.\n if($category->access || $category->protected)\n {\n $cat_name = addslashes(trim($category->name));\n $cat_link = JRoute::_('index.php?view=category&catid='.$category->cid);\n }\n else\n {\n $cat_name = ($restricted_cats == true ? addslashes(trim($category->name)) : JText::_('COM_JOOMGALLERY_COMMON_NO_ACCESS', true));\n $cat_link = '';\n }\n }\n if($restricted_hint == true)\n {\n if(!$category->access)\n {\n if($category->protected)\n {\n $cat_name .= '<span class=\"jg_rm\">'.self::icon('key.png', 'COM_JOOMGALLERY_COMMON_TIP_YOU_NOT_ACCESS_THIS_CATEGORY').'</span>';\n }\n else\n {\n $cat_name .= '<span class=\"jg_rm\">'.self::icon('group_key.png', 'COM_JOOMGALLERY_COMMON_TIP_YOU_NOT_ACCESS_THIS_CATEGORY').'</span>';\n }\n }\n }\n if($config->get('jg_showcatasnew'))\n {\n $isnew = JoomHelper::checkNewCatg($category->cid);\n }\n else\n {\n $isnew = '';\n }\n $cat_name .= $isnew;\n\n // Add node\n if($category->parent_id == $rootcatid)\n {\n?>\n jg_TreeView<?php echo $rootcatid;?>.add(<?php echo $category->cid;?>,\n <?php echo $rootcatid;?>,\n <?php echo \"'\".$cat_name.\"'\";?>,\n <?php echo \"'\".$cat_link.\"'\"; ?>,\n <?php echo $category->access ? 'false' :'true'; ?>\n );\n<?php\n }\n else\n {\n?>\n jg_TreeView<?php echo $rootcatid;?>.add(<?php echo $category->cid;?>,\n <?php echo $category->parent_id;?>,\n <?php echo \"'\".$cat_name.\"'\";?>,\n <?php echo \"'\".$cat_link.\"'\"; ?>,\n <?php echo $category->access ? 'false' :'true'; ?>\n );\n<?php\n }\n }\n?>\n document.write(jg_TreeView<?php echo $rootcatid;?>);\n -->\n </script>\n </td>\n </tr>\n </table>\n </div>\n<?php\n }", "title": "" }, { "docid": "8e5a3b6e395ff782644fd1a73d883184", "score": "0.58270943", "text": "public function getTree()\r\n\t{\r\n\t\t\t\t\t\t\t//node.left_id, node.right_id\r\n\t\t\t\t\t\t///FROM category AS node,\r\n\t\t\t\t\t\t\t//category AS parent\r\n\t\t\t\t\t\t//WHERE node.left_id BETWEEN parent.left_id AND parent.right_id\r\n\t\t\t\t\t\t//GROUP BY node.category_id\r\n\t\t\t\t\t\t//ORDER BY node.left_id\") ;\r\n\t\t//$items = $this->_db->fetchAll($sql);\r\n\t\treturn $this->_categoryDAO->getTree();\r\n\t}", "title": "" }, { "docid": "42ea19df81b1aeb3e382496db423f1f8", "score": "0.5816561", "text": "function getXMLTreeList() {\n if (isset($this->categs) && is_array($this->categs)) {\n $result = sprintf(\n '<listview title=\"%s\" width=\"200\">'.LF,\n papaya_strings::escapeHTMLChars($this->_gt('Poll categories'))\n );\n $result .= '<items>'.LF;\n foreach ($this->categs as $id => $categ) {\n if (isset($categ) && is_array($categ)) {\n if ($this->categs[$id]['pollcount'] > 0) {\n $selected = ($this->params['categ_id'] == $id) ?\n 'node=\"open\" selected=\"selected\"' : 'node=\"close\"';\n } else {\n $selected = ($this->params['categ_id'] == $id) ?\n 'node=\"empty\" selected=\"selected\"' : 'node=\"empty\"';\n }\n $result .= sprintf(\n '<listitem href=\"%s\" title=\"%s\" nhref=\"%s\" %s />'.LF,\n papaya_strings::escapeHTMLChars(\n $this->getLink(\n array('categ_id' => (int)$id, 'cmd' => 'edit_categ')\n )\n ),\n papaya_strings::escapeHTMLChars($categ['categ_title']),\n papaya_strings::escapeHTMLChars(\n $this->getLink(array('categ_id' => (int)$id))\n ),\n $selected\n );\n if ((isset($this->polls) && is_array($this->polls)) &&\n ($this->params['categ_id'] == $id)) {\n $result .= $this->getXMLPollTreeList($this->params['categ_id']);\n }\n }\n }\n $result .= '</items>'.LF;\n $result .= '</listview>'.LF;\n $this->layout->addLeft($result);\n }\n }", "title": "" }, { "docid": "273dbbdcdc16bee1d2e8d203dfaa7518", "score": "0.5766573", "text": "public function getCategoriesTree(): Response\n {\n return response(['data' => Category::get()->toTree()]);\n }", "title": "" }, { "docid": "b3b9a2ec11e7d86cda415d4340ccd0fe", "score": "0.5762068", "text": "public function actionListcategories()\n\t{\n $all = Categories::model()->findAll();\n $list = array();\n\n $i=0;\n foreach($all as $value)\n {\n if ($value->parentid == 0) {\n $i++;\n $list[$i]['name'] = $value->name;\n $list[$i]['id'] = $value->id;\n $list[$i]['parentid'] = $value->parentid;\n $list[$i]['datecreate'] = $value->datecreate;\n $list[$i]['level'] = 1;\n foreach ($all as $values)\n {\n if ($values->parentid == $value->id ) {\n $i++;\n $list[$i]['name'] = \" ---- \".$values->name;\n $list[$i]['id'] = $values->id;\n $list[$i]['parentid'] = $values->parentid;\n $list[$i]['datecreate'] = $values->datecreate;\n $list[$i]['level'] = 2;\n foreach ($all as $values_2)\n {\n if ($values_2->parentid == $values->id ) {\n $i++;\n $list[$i]['name'] = \" -------- \".$values_2->name;\n $list[$i]['id'] = $values_2->id;\n $list[$i]['parentid'] = $values_2->parentid;\n $list[$i]['datecreate'] = $values_2->datecreate;\n $list[$i]['level'] = 3;\n }\n }\n }\n }\n }\n }\n\n /* END Get Categories data */\n\n\n $this->render('listcategories',array(\n 'categories' =>$list,\n 'all' =>$all,\n ));\n\n\t}", "title": "" }, { "docid": "4f03312f754f0da3ee3d4dc6fda885d9", "score": "0.5753821", "text": "function get_category_tree_info()\n\t{\n\t\t$query = \"SELECT * from $this->category_tree_table where self_id = '$this->id'\";\n\t\t$result =$this->db->query($query,true, \"Error- query get_category_tree_info\");\n\n\t\t// Get the id and the name.\n\n\t\t$row = $this->db->fetchByAssoc($result);\n\n\n\t\t\tif($row != null)\n\t\t\t{\n\t\t\t\tif ($row['parent_node_id'] != '') $this->parent_node_id = stripslashes($row['parent_node_id']);\n\t\t\t\tif ($row['node_id'] != '' ) $this->node_id = stripslashes($row['node_id']);\n\t\t\t\tif ($row['type'] != '' ) $this->type = stripslashes($row['type']);\n\t\t\t}\n\n\t\t$this->get_branch_id();\n\n\t//end function get_category_tree_info\n\t}", "title": "" }, { "docid": "68b8791be6978957d3958ede178dcf6e", "score": "0.5748515", "text": "public function create_categories() {\n // Our basic course category structure is:\n // /Courses/Faculty/Courses\n // /Courses/Faculty/Modules\n // The courses that will be enrollable will be in a category with courses_ or modules_ idnumbers.\n\n // Not discoverable.\n $cat1 = $this->getDataGenerator()->create_category([\n 'idnumber' => 'CAT1',\n 'parent' => 0,\n 'name' => 'Courses'\n ]);\n // Not discoverable.\n $catfac1 = $this->getDataGenerator()->create_category([\n 'idnumber' => 'FAC1',\n 'parent' => $cat1->id,\n 'name' => 'Faculty1'\n ]);\n // Discoverable.\n $this->coursescat = $this->getDataGenerator()->create_category([\n 'idnumber' => 'courses_FAC1',\n 'parent' => $catfac1->id,\n 'name' => 'Course pages'\n ]);\n // Discoverable.\n $this->modulescat = $this->getDataGenerator()->create_category([\n 'idnumber' => 'modules_FAC1',\n 'parent' => $catfac1->id,\n 'name' => 'Module pages'\n ]);\n // Not discoverable.\n $this->levelscat = $this->getDataGenerator()->create_category([\n 'idnumber' => 'level_FAC1',\n 'parent' => $catfac1->id,\n 'name' => 'Level pages'\n ]);\n // Not discoverable.\n $this->otherscat = $this->getDataGenerator()->create_category([\n 'idnumber' => 'Other',\n 'parent' => 0,\n 'name' => 'Other'\n ]);\n\n }", "title": "" }, { "docid": "d954e82ac765ab1e4b6f73350b7b8b75", "score": "0.5726981", "text": "public function getCategoryCollection()\n\t{\n\t\t$category = $this->_categoryFactory->create();\n\t\t\n\t\t$rootCatID = NULL;\n\t\tif($this->getData('parentcat') > 0){\n\t\t\t$rootCatID = $this->getData('parentcat'); \n\t\t}\n\t\telse{\n\t\t\t$rootCatID = $this->_storeManager->getStore()->getRootCategoryId();\n\t\t}\n\n\t\t$category->load($rootCatID);\n\t\t$childCategories = $category->getChildrenCategories()->clear()->addAttributeToSelect('image')->addAttributeToSelect('additional_image')->addAttributeToSelect('include_in_menu');\n\t\treturn $childCategories;\n\t}", "title": "" }, { "docid": "3af3e45a1d44a2f5b20a40195b95e434", "score": "0.57238984", "text": "public function categoryTreeIterator()\n {\n return new CategoryTreeIterator($this);\n }", "title": "" }, { "docid": "6dd42bbb8453642e23f6e1357e8d2aa4", "score": "0.5719601", "text": "function build_tree($roles, $parent_id = 0) {\r\n\t$tree = array ();\r\n\tforeach ( $roles as $role ) {\r\n\t\t\r\n\t\tif ($role ['parent_id'] == $parent_id) {\r\n\t\t\t$tree [] = array (\r\n\t\t\t\t\t'category' => $role,\r\n\t\t\t\t\t'children' => build_tree ( $roles, $role ['id'] ) \r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n\t\r\n\treturn $tree;\r\n}", "title": "" }, { "docid": "a13f1b9c0ff3bd0f47db08c0dd32711e", "score": "0.5701785", "text": "function _notifications_build_category_tree($_notification_types,$notification_code,$ob,$id,$depth=0)\n{\n\tstatic $done_get_change=false;\n\n\t$_notification_categories=$ob->create_category_tree($notification_code,$id);\n\n\t$statistical_notification_type=_find_member_statistical_notification_type(get_member());\n\n\t$notification_categories=array();\n\tforeach ($_notification_categories as $c)\n\t{\n\t\t$notification_category=(is_integer($c['id'])?strval($c['id']):$c['id']);\n\n\t\t$current_setting=notifications_setting($notification_code,$notification_category);\n\t\tif ($current_setting==A__STATISTICAL) $current_setting=_find_member_statistical_notification_type(get_member());\n\t\t$notification_types=array();\n\t\tforeach ($_notification_types as $possible=>$ntype)\n\t\t{\n\t\t\t$current_setting=notifications_setting($notification_code,$notification_category);\n\t\t\tif ($current_setting==A__STATISTICAL) $current_setting=$statistical_notification_type;\n\t\t\t$allowed_setting=$ob->allowed_settings($notification_code);\n\n\t\t\t$available=(($possible & $allowed_setting) != 0);\n\n\t\t\tif (count($_POST)!=0)\n\t\t\t{\n\t\t\t\t$checked=post_param_integer('notification_'.$notification_category.'_'.$ntype,0);\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$checked=(($possible & $current_setting) != 0)?1:0;\n\t\t\t}\n\n\t\t\t$notification_types[]=array(\n\t\t\t\t'NTYPE'=>$ntype,\n\t\t\t\t'LABEL'=>do_lang_tempcode('ENABLE_NOTIFICATIONS_'.$ntype),\n\t\t\t\t'CHECKED'=>($checked==1),\n\t\t\t\t'RAW'=>strval($possible),\n\t\t\t\t'AVAILABLE'=>$available,\n\t\t\t\t'SCOPE'=>$notification_category,\n\t\t\t);\n\t\t}\n\n\t\tif ((!array_key_exists('num_children',$c)) && (array_key_exists('child_count',$c))) $c['num_children']=$c['child_count'];\n\t\tif ((!array_key_exists('num_children',$c)) && (array_key_exists('children',$c))) $c['num_children']=count($c['children']);\n\t\t$children=new ocp_tempcode();\n\t\tif ((array_key_exists('num_children',$c)) && ($c['num_children']!=0))\n\t\t{\n\t\t\t$children=_notifications_build_category_tree($_notification_types,$notification_code,$ob,$notification_category,$depth+1);\n\t\t}\n\n\t\t$notification_categories[]=array(\n\t\t\t'NUM_CHILDREN'=>strval(array_key_exists('num_children',$c)?$c['num_children']:0),\n\t\t\t'DEPTH'=>strval($depth),\n\t\t\t'NOTIFICATION_CATEGORY'=>$notification_category,\n\t\t\t'NOTIFICATION_TYPES'=>$notification_types,\n\t\t\t'CATEGORY_TITLE'=>$c['title'],\n\t\t\t'CHECKED'=>notifications_enabled($notification_code,$notification_category),\n\t\t\t'CHILDREN'=>$children,\n\t\t);\n\t}\n\n\t$tree=do_template('NOTIFICATIONS_TREE',array(\n\t\t'NOTIFICATION_CODE'=>$notification_code,\n\t\t'NOTIFICATION_CATEGORIES'=>$notification_categories,\n\t));\n\n\treturn $tree;\n}", "title": "" }, { "docid": "431743ab5e709a8886a9117a585c7e22", "score": "0.5699894", "text": "private function buildCategoryTree(array $categories, $parentId = 0)\n {\n $tree = [];\n foreach ($categories as $category) {\n if ($category[\"parent_id\"] == $parentId) {\n $categoryData = [\n \"id\" => (int) $category[\"category_id\"],\n \"name\" => (string) $category[\"name\"],\n \"children\" => $this->buildCategoryTree(\n $categories,\n $category[\"category_id\"]\n ),\n ];\n $tree[] = $categoryData;\n }\n }\n return $tree;\n }", "title": "" }, { "docid": "0eec3fcce01f1527d739e774ea90d08c", "score": "0.56953967", "text": "function nav_cat($cat_tree) {\r\n\tfor($i=0;$i<count($cat_tree);$i++) {\r\n\t\tlist($pname,$purl,$folder,$name) = explode(RAZDELITEL,$cat_tree[$i]);\r\n\t\t$query = $purl.'/'.$folder;\r\n\t\t\tif($purl !== '') {$catr = '<a href=\"'.siteengine(CAT_SCRIPT,$purl).'\" title=\"'.__('Parents category').' - '.$pname.'\">'.$pname.\"</a>\".' - <a href=\"'.siteengine(CAT_SCRIPT,$query).'\" title=\"'.__('Category').' - '.$name.'\">'.$name.\"</a><br />\\r\\n\";}\r\n\t\t\telse {$catr = '<a href=\"'.siteengine(CAT_SCRIPT,$folder).'\" title=\"'.__('Category').' - '.$name.'\">'.$name.\"</a><br />\\r\\n\";}\r\n\t\t\t{$cfold[] = $name;}\r\n\t\t\t{$cattree[] = $catr;}\r\n\t}\r\n$ctree = array_combine($cfold, $cattree);\r\nreturn $ctree;\r\n}", "title": "" }, { "docid": "ae811c0c8c4704179f2c599242b7322d", "score": "0.5681916", "text": "function adi_matrix_cat_tree($list,$parent='root') {\n\t$return = array();\n\tforeach ($list as $cat)\n\t\tif ($cat['parent'] == $parent)\n\t\t\t$return[$cat['name']] = adi_matrix_cat_tree($list,$cat['name']);\n\treturn $return;\n}", "title": "" }, { "docid": "937d1b18b7c7a8fc502098e92cae67e8", "score": "0.56766623", "text": "function simple_tree_builder($items, $sub = '', $type='')\n {\n $output = '';\n\n if( isset($items) && (is_array($items)) )\n {\n $output .= '<ul class=\"nav nav-stacked simple-tree\">' . PHP_EOL;\n foreach ($items as $item){\n $output .= '<li>'. PHP_EOL;\n $output .= '<strong>'.$sub.$item['name'].'</strong>' . PHP_EOL;\n $output .= '<div class=\"tree-link-action pull-right text-right\">' . PHP_EOL;\n $output .= button_edit(base_url('admin/category/form/'.$type.'/'.$item['id_category']), $confirm = FALSE) . PHP_EOL;\n $output .= button_delete(base_url('admin/category/delete/'.$item['id_category']), $confirm = TRUE) . PHP_EOL;\n $output .= '</div>'. PHP_EOL;\n $output .= '</li>'. PHP_EOL;\n if (isset($item['children']) && count($item['children']) > 0)\n {\n $sub2 = str_replace('<i class=\"fa fa-long-arrow-right\"></i>', '&nbsp;', $sub);\n $sub2 .= '&nbsp;&nbsp;&nbsp;&nbsp; <i class=\"fa fa-long-arrow-right\"></i> &nbsp;';\n $output .= simple_tree_builder($item['children'], $sub2, $type);\n }\n }\n $output .= '</ul>' . PHP_EOL;\n }\n\n return $output;\n\n }", "title": "" }, { "docid": "81c6531c1645f0979bc835f613b9e072", "score": "0.5673411", "text": "static function get_all_categories_with_levels()\n\t\t{\n\t\t\t// Get all categories in hierarchical way\n\t\t\t$args = array(\n\t\t\t 'show_option_all' => '',\n\t\t\t 'show_option_none' => '',\n\t\t\t 'orderby' => 'ID', \n\t\t\t 'order' => 'ASC',\n\t\t\t 'show_last_update' => 0,\n\t\t\t 'show_count' => 0,\n\t\t\t 'hide_empty' => 0, \n\t\t\t 'child_of' => 0,\n\t\t\t 'exclude' => '',\n\t\t\t 'echo' => 0,\n\t\t\t 'selected' => 0,\n\t\t\t 'hierarchical' => 1, \n\t\t\t 'name' => 'cat',\n\t\t\t 'class' => 'postform',\n\t\t\t 'depth' => 0 );\n\t\t\t$categories_output = wp_dropdown_categories( $args );\n\t\t\t$arr = split('<option',$categories_output);\n\t\t\t$hierarchical_order = array();\n\t\t\tforeach ($arr as $item) {\n\t\t\t\tif (substr_count($item,'value=\"')) {\n\t\t\t\t\t$id = substr($item,strpos($item,'value=\"') + strlen('value=\"'),strpos($item,'\">') - (strpos($item,'value=\"') + strlen('value=\"')));\n\t\t\t\t\t$hierarchical_order[] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// End: Get all categories in hierarchical way \n\t\t\t\n\t\t\t$all_categories = self::get_all_categories();\n\t\t\t$to_return = array();\n\t\t\t\n\t\t\tforeach ($all_categories as $item) {\n\t\t\t\t$term_id = $item->term_id;\n\t\t\t\t\n\t\t\t\t// Get the list of names of parents\n\t\t\t\t$parents = self::get_all_categories_parents($term_id);\n\t\t\t\t\n\t\t\t\t// Determining the level \n\t\t\t\t$level = count($parents);\t\t\t\n\t\t\t\t\n\t\t\t\t$to_return[$term_id] = array(\n\t\t\t\t\t\t\t\t\t\t'id' => $term_id,\n\t\t\t\t\t\t\t\t\t\t'name' => $item->name,\n\t\t\t\t\t\t\t\t\t\t'level' => $level\n\t\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t// Order in hierarchical way\n\t\t\t$hierarchical_order_arr = array();\n\t\t\tforeach ($hierarchical_order as $item) {\n\t\t\t\t$hierarchical_order_arr[] = $to_return[$item];\n\t\t\t}\n\t\t\t\n\t\t\treturn $hierarchical_order_arr;\n\t }", "title": "" }, { "docid": "1ed396dd7b296bea63719f87bf46f592", "score": "0.5659983", "text": "function getmaketree($catName, $cat_father_id, $catId, $link=false, $skipFirstSymbol=false, $reverseSort=true, $admin=false) {\n\tglobal $db, $config, $glob;\n\t\n\t// get category array for cat dir\n\t$cache\t\t= new cache('misc.catArray');\n\t$catArray\t= $cache->readCache();\n\t\n\tif (!$cache->cacheStatus) {\n\t\t$query\t\t= \"SELECT cat_id, cat_name, cat_father_id FROM \".$glob['dbprefix'].\"ImeiUnlock_category ORDER BY cat_id DESC\";\n\t\t$catArray\t= $db->select($query);\n\t\t$cache->writeCache($catArray);\n\t}\n\t\n\t// get category array in foreign innit\n\t// get category array for cat dir\n\t$cache = new cache('misc.catArrayForeign.'.LANG_FOLDER);\n\t$catArrayForeign = $cache->readCache();\n\t\n\tif (!$cache->cacheStatus) {\n\t\t$catArrayForeign = $db->select(\"SELECT cat_master_id as cat_id, cat_name FROM \".$glob['dbprefix'].\"ImeiUnlock_cats_lang WHERE cat_lang = '\".LANG_FOLDER.\"'\");\n\t\t$cache->writeCache($catArrayForeign);\n\t}\n\t\n\t$config['dirSymbol'] = \"&nbsp;\";\n\t\n\tif ($link) {\n\t\tif (!$admin) {\n\t\t\t$dirArray[0] = $config['dirSymbol'].\"<a href='\".$GLOBALS['rootRel'].\"index.php?_a=viewCat&amp;catId=\".$catId.\"' class='txtLocation'>\".$catName.\"</a>\";\n\t\t} else {\n\t\t\t$dirArray[0] = $config['dirSymbol'].\"<a href='\".$glob['adminFile'].\"?_g=categories/index&amp;parent=\".$catId.\"' class='txtLink'>\".$catName.\"</a>\";\n\t\t}\n\t} else {\n\t\t$dirArray[] = $config['dirSymbol'].$catName;\n\t}\n\t\n\tforeach ($catArray as $i => $cat) {\n\t\tif (is_array($catArrayForeign) && !empty($catArrayForeign)) {\n\t\t\tforeach ($catArrayForeign as $k => $catForeign) {\n\t\t\t\tif ($catForeign['cat_id'] == $cat['cat_id']) {\n\t\t\t\t\t$catArray[$i]['cat_name'] = validHTML($catForeign['cat_name']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset($cat['cat_id']) && $cat['cat_id'] == $cat_father_id) {\n\t\t\tif ($link) {\n\t\t\t\tif ($admin) {\n\t\t\t\t\t$dirArray[$i+1] = $config['dirSymbol'].\"<a href='\".$glob['adminFile'].\"?_g=categories/index&amp;parent=\".$catArray[$i]['cat_id'].\"' class='txtLink'>\".$catArray[$i]['cat_name'].\"</a>\";\n\t\t\t\t} else {\n\t\t\t\t\t$dirArray[$i+1] = $config['dirSymbol'].\"<a href='\".$GLOBALS['rootRel'].\"index.php?_a=viewCat&amp;catId=\".$catArray[$i]['cat_id'].\"' class='txtLocation'>\".$catArray[$i]['cat_name'].\"</a>\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$dirArray[]\t= $config['dirSymbol'].$catArray[$i]['cat_name'];\n\t\t\t}\n\t\t\t\n\t\t\t$cat_father_id = $cat['cat_father_id'];\n\t\t}\n\t}\n\t\t\t\n\tif ($reverseSort) {\n\t\tkrsort($dirArray);\n\t} else {\n\t\tksort($dirArray);\n\t}\n\treset($dirArray);\n\t\n\t$dir = \"\";\t\n\tforeach ($dirArray as $key => $value){\n\t \t$dir[] = $value;\n\t}\n\t\n\treturn $dir;\n}", "title": "" }, { "docid": "890e000fd224aae900cc990a6b582600", "score": "0.56545347", "text": "protected function _getTree()\n {\n if (!$this->_tree) {\n $this->_tree = Mage::getResourceModel('news/category_tree')->load();\n }\n return $this->_tree;\n }", "title": "" }, { "docid": "da9b21612e3c7b403ea8140db3d04300", "score": "0.563914", "text": "public function run()\n {\n $subCategories = array(\n array(\n ['name' => 'Desktops', 'tag' => 'desktops'],\n ['name' => 'Laptops', 'tag' => 'laptops'],\n ['name' => 'Play Station', 'tag' => 'play-station'],\n ['name' => 'XBox One', 'tag' => 'xbox'],\n ['name' => 'Speakers', 'tag' => 'speakers'],\n ['name' => 'Keyboard', 'tag' => 'keyboard'],\n ['name' => 'Mouse', 'tag' => 'mouse'],\n ),\n array(\n ['name' => 'Smart Phones', 'tag' => 'smart-phones'],\n ['name' => 'Apple Phones', 'tag' => 'iphone'],\n ['name' => 'Mobile Speakers', 'tag' => 'mobile-speakers'],\n ['name' => 'Head Phones', 'tag' => 'head-phones'],\n ['name' => 'Ear Phones', 'tag' => 'ear-phones'],\n ['name' => 'Mobile Accessories', 'tag' => 'mobile-accessories'],\n ['name' => 'Phone Cases', 'tag' => 'phone-cases']\n ),\n array(\n ['name' => 'Jeans', 'tag' => 'jeans'],\n ['name' => 'Shirts', 'tag' => 'shirts'],\n ['name' => 'T-Shirts', 'tag' => 'tshirts'],\n ['name' => 'Trousers', 'tag' => 'trousers'],\n ['name' => 'Sweatshirts', 'tag' => 'sweatshirts'],\n ['name' => 'Joggers', 'tag' => 'joggers'],\n ['name' => 'Shorts', 'tag' => 'shorts'],\n ['name' => 'Track Pants', 'tag' => 'track-pants']\n ),\n array(\n ['name' => 'Jeans', 'tag' => 'jeans'],\n ['name' => 'Shirts', 'tag' => 'shirts'],\n ['name' => 'T-Shirts', 'tag' => 'tshirts'],\n ['name' => 'Jeggings', 'tag' => 'jeggings'],\n ['name' => 'Sweatshirts', 'tag' => 'sweatshirts'],\n ['name' => 'Trousers & Capris', 'tag' => 'trousers-capris'],\n ['name' => 'Panties', 'tag' => 'panties'],\n ['name' => 'Night Dresses', 'tag' => 'night-dresses']\n ),\n array(\n ['name' => 'Casual Shoes', 'tag' => 'casual-shoes'],\n ['name' => 'Sports Shoes', 'tag' => 'sports-shoes'],\n ['name' => 'Running Shoes', 'tag' => 'running-shoes'],\n ['name' => 'Workout Shoes', 'tag' => 'workout-shoes'],\n ['name' => 'Flats', 'tag' => 'flats'],\n ['name' => 'Socks', 'tag' => 'socks'],\n ['name' => 'Formal Shoes', 'tag' => 'formal-shoes'],\n ['name' => 'Boots', 'tag' => 'boots']\n ),\n array(\n ['name' => 'Smart TVs', 'tag' => 'smart-tvs'],\n ['name' => 'Android TVs', 'tag' => 'android-tvs'],\n ['name' => 'Refrigerators', 'tag' => 'refrigerators'],\n ['name' => 'Washing Machines', 'tag' => 'washing-machines'],\n ['name' => 'Air Conditioners', 'tag' => 'air-conditioners'],\n ['name' => 'TV Speakers', 'tag' => 'tv-speakers'],\n ['name' => 'Microwave Owens', 'tag' => 'microwave-owens'],\n ['name' => 'Dish Washers', 'tag' => 'dish-washers']\n ),\n array(\n ['name' => 'Sofa', 'tag' => 'sofa'],\n ['name' => 'Beds & Matresses', 'tag' => 'beds-matresses'],\n ['name' => 'TV Units', 'tag' => 'tv-units'],\n ['name' => 'Jeggings', 'tag' => 'jeggings'],\n ['name' => 'Wardrobes', 'tag' => 'wardrobes'],\n ['name' => 'Dining Tables', 'tag' => 'dining-tables'],\n ['name' => 'Coffee Tables', 'tag' => 'coffee-tables'],\n ['name' => 'Kotchen Appliances', 'tag' => 'kitchen-appliances']\n )\n );\n\n $categories = Category::all();\n foreach($categories as $key => $category){\n $subcategories = $subCategories[$key];\n foreach($subcategories as $subcategory){\n $sCat = new SubCategory();\n $sCat->name = $subcategory['name'];\n $sCat->tag = $subcategory['tag'];\n $sCat->category_id = $category->id;\n $sCat->save();\n }\n }\n }", "title": "" }, { "docid": "356daed95b6ff72c1cc567dc2d3b10cd", "score": "0.56191295", "text": "public function run()\n {\n $categories = [\n [\n 'id' => 1,\n 'type' => 0,\n 'name' => 'Web Development',\n 'desc' => 'Web Development',\n 'order' => 0,\n 'parent_id' => null,\n ],\n [\n 'id' => 2,\n 'type' => 0,\n 'name' => 'Web Design',\n 'desc' => 'Web Design',\n 'order' => 1,\n 'parent_id' => 1,\n ],\n [\n 'id' => 3,\n 'type' => 0,\n 'name' => 'Web Programming',\n 'desc' => 'Web Programming',\n 'order' => 2,\n 'parent_id' => 1,\n ],\n [\n 'id' => 4,\n 'type' => 0,\n 'name' => 'Ecommerce',\n 'desc' => 'Ecommerce',\n 'order' => 3,\n 'parent_id' => 1,\n ],\n [\n 'id' => 5,\n 'type' => 0,\n 'name' => 'UI Design',\n 'desc' => 'UI Design',\n 'order' => 4,\n 'parent_id' => 1,\n ],\n [\n 'id' => 6,\n 'type' => 0,\n 'name' => 'Website QA',\n 'desc' => 'Website QA',\n 'order' => 5,\n 'parent_id' => 1,\n ],\n [\n 'id' => 7,\n 'type' => 0,\n 'name' => 'Website Project Management',\n 'desc' => 'Website Project Management',\n 'order' => 6,\n 'parent_id' => 1,\n ],\n [\n 'id' => 8,\n 'type' => 0,\n 'name' => 'Other - Web Development',\n 'desc' => 'Other - Web Development',\n 'order' => 7,\n 'parent_id' => 1,\n ],\n [\n 'id' => 9,\n 'type' => 0,\n 'name' => 'Software Development',\n 'desc' => 'Software Development',\n 'order' => 1,\n 'parent_id' => null,\n ],\n [\n 'id' => 10,\n 'type' => 0,\n 'name' => 'Desktop Applications',\n 'desc' => 'Desktop Applications',\n 'order' => 0,\n 'parent_id' => 9,\n ],\n [\n 'id' => 11,\n 'type' => 0,\n 'name' => 'Game Development',\n 'desc' => 'Game Development',\n 'order' => 1,\n 'parent_id' => 9,\n ],\n [\n 'id' => 12,\n 'type' => 0,\n 'name' => 'Scripts & Utilities',\n 'desc' => 'Scripts & Utilities',\n 'order' => 2,\n 'parent_id' => 9,\n ],\n [\n 'id' => 13,\n 'type' => 0,\n 'name' => 'Software Plug-ins',\n 'desc' => 'Software Plug-ins',\n 'order' => 3,\n 'parent_id' => 9,\n ],\n [\n 'id' => 14,\n 'type' => 0,\n 'name' => 'Mobile Apps',\n 'desc' => 'Mobile Apps',\n 'order' => 4,\n 'parent_id' => 9,\n ],\n [\n 'id' => 15,\n 'type' => 0,\n 'name' => 'Application Interface Design',\n 'desc' => 'Application Interface Design',\n 'order' => 5,\n 'parent_id' => 9,\n ],\n [\n 'id' => 16,\n 'type' => 0,\n 'name' => 'Software Project Management',\n 'desc' => 'Software Project Management',\n 'order' => 6,\n 'parent_id' => 9,\n ],\n [\n 'id' => 17,\n 'type' => 0,\n 'name' => 'Software QA',\n 'desc' => 'Software QA',\n 'order' => 7,\n 'parent_id' => 9,\n ],\n [\n 'id' => 18,\n 'type' => 0,\n 'name' => 'VOIP',\n 'desc' => 'VOIP',\n 'order' => 8,\n 'parent_id' => 9,\n ],\n [\n 'id' => 19,\n 'type' => 0,\n 'name' => 'Other - Software Development',\n 'desc' => 'Other - Software Development',\n 'order' => 9,\n 'parent_id' => 9,\n ],\n [\n 'id' => 20,\n 'type' => 0,\n 'name' => 'Networking & Information Systems',\n 'desc' => 'Networking & Information Systems',\n 'order' => 2,\n 'parent_id' => null,\n ],\n [\n 'id' => 21,\n 'type' => 0,\n 'name' => 'Network Administration',\n 'desc' => 'Network Administration',\n 'order' => 0,\n 'parent_id' => 20,\n ],\n [\n 'id' => 22,\n 'type' => 0,\n 'name' => 'DBA - Database Administration',\n 'desc' => 'DBA - Database Administration',\n 'order' => 1,\n 'parent_id' => 20,\n ],\n [\n 'id' => 23,\n 'type' => 0,\n 'name' => 'Server Administration',\n 'desc' => 'Server Administration',\n 'order' => 2,\n 'parent_id' => 20,\n ],\n [\n 'id' => 24,\n 'type' => 0,\n 'name' => 'Other - Networking & Information Systems',\n 'desc' => 'Other - Networking & Information Systems',\n 'order' => 3,\n 'parent_id' => 20,\n ],\n [\n 'id' => 25,\n 'type' => 0,\n 'name' => 'ERP / CRM Implementation',\n 'desc' => 'ERP / CRM Implementation',\n 'order' => 4,\n 'parent_id' => 20,\n ],\n [\n 'id' => 26,\n 'type' => 0,\n 'name' => 'Writing & Translation',\n 'desc' => 'Writing & Translation',\n 'order' => 3,\n 'parent_id' => null,\n ],\n [\n 'id' => 27,\n 'type' => 0,\n 'name' => 'Technical Writing',\n 'desc' => 'Technical Writing',\n 'order' => 0,\n 'parent_id' => 26,\n ],\n [\n 'id' => 28,\n 'type' => 0,\n 'name' => 'Website Content',\n 'desc' => 'Website Content',\n 'order' => 1,\n 'parent_id' => 26,\n ],\n [\n 'id' => 29,\n 'type' => 0,\n 'name' => 'Blog & Article Writing',\n 'desc' => 'Blog & Article Writing',\n 'order' => 2,\n 'parent_id' => 26,\n ],\n [\n 'id' => 30,\n 'type' => 0,\n 'name' => 'Copywriting',\n 'desc' => 'Copywriting',\n 'order' => 3,\n 'parent_id' => 26,\n ],\n [\n 'id' => 31,\n 'type' => 0,\n 'name' => 'Other - Writing & Translation',\n 'desc' => 'Other - Writing & Translation',\n 'order' => 4,\n 'parent_id' => 26,\n ],\n [\n 'id' => 32,\n 'type' => 0,\n 'name' => 'Translation',\n 'desc' => 'Translation',\n 'order' => 5,\n 'parent_id' => 26,\n ],\n [\n 'id' => 33,\n 'type' => 0,\n 'name' => 'Creative Writing',\n 'desc' => 'Creative Writing',\n 'order' => 6,\n 'parent_id' => 26,\n ],\n [\n 'id' => 34,\n 'type' => 0,\n 'name' => 'Administrative Support',\n 'desc' => 'Administrative Support',\n 'order' => 4,\n 'parent_id' => null,\n ],\n [\n 'id' => 35,\n 'type' => 0,\n 'name' => 'Data Entry',\n 'desc' => 'Data Entry',\n 'order' => 0,\n 'parent_id' => 34,\n ],\n [\n 'id' => 36,\n 'type' => 0,\n 'name' => 'Personal Assistant',\n 'desc' => 'Personal Assistant',\n 'order' => 1,\n 'parent_id' => 34,\n ],\n [\n 'id' => 37,\n 'type' => 0,\n 'name' => 'Web Research',\n 'desc' => 'Web Research',\n 'order' => 2,\n 'parent_id' => 34,\n ],\n [\n 'id' => 38,\n 'type' => 0,\n 'name' => 'Email Response Handling',\n 'desc' => 'Email Response Handling',\n 'order' => 3,\n 'parent_id' => 34,\n ],\n [\n 'id' => 39,\n 'type' => 0,\n 'name' => 'Other - Administrative Support',\n 'desc' => 'Other - Administrative Support',\n 'order' => 4,\n 'parent_id' => 34,\n ],\n [\n 'id' => 40,\n 'type' => 0,\n 'name' => 'Transcription',\n 'desc' => 'Transcription',\n 'order' => 5,\n 'parent_id' => 34,\n ],\n [\n 'id' => 41,\n 'type' => 0,\n 'name' => 'Design & Multimedia',\n 'desc' => 'Design & Multimedia',\n 'order' => 5,\n 'parent_id' => null,\n ],\n [\n 'id' => 42,\n 'type' => 0,\n 'name' => 'Graphic Design',\n 'desc' => 'Graphic Design',\n 'order' => 0,\n 'parent_id' => 41,\n ],\n [\n 'id' => 43,\n 'type' => 0,\n 'name' => 'Logo Design',\n 'desc' => 'Logo Design',\n 'order' => 1,\n 'parent_id' => 41,\n ],\n [\n 'id' => 44,\n 'type' => 0,\n 'name' => 'Illustration',\n 'desc' => 'Illustration',\n 'order' => 2,\n 'parent_id' => 41,\n ],\n [\n 'id' => 45,\n 'type' => 0,\n 'name' => 'Print Design',\n 'desc' => 'Print Design',\n 'order' => 3,\n 'parent_id' => 41,\n ],\n [\n 'id' => 46,\n 'type' => 0,\n 'name' => '3D Modeling & CAD',\n 'desc' => '3D Modeling & CAD',\n 'order' => 4,\n 'parent_id' => 41,\n ],\n [\n 'id' => 47,\n 'type' => 0,\n 'name' => 'Audio Production',\n 'desc' => 'Audio Production',\n 'order' => 5,\n 'parent_id' => 41,\n ],\n [\n 'id' => 48,\n 'type' => 0,\n 'name' => 'Video Production',\n 'desc' => 'Video Production',\n 'order' => 6,\n 'parent_id' => 41,\n ],\n [\n 'id' => 49,\n 'type' => 0,\n 'name' => 'Voice Talent',\n 'desc' => 'Voice Talent',\n 'order' => 7,\n 'parent_id' => 41,\n ],\n [\n 'id' => 50,\n 'type' => 0,\n 'name' => 'Animation',\n 'desc' => 'Animation',\n 'order' => 8,\n 'parent_id' => 41,\n ],\n [\n 'id' => 51,\n 'type' => 0,\n 'name' => 'Other - Design & Multimedia',\n 'desc' => 'Other - Design & Multimedia',\n 'order' => 9,\n 'parent_id' => 41,\n ],\n [\n 'id' => 52,\n 'type' => 0,\n 'name' => 'Presentations',\n 'desc' => 'Presentations',\n 'order' => 10,\n 'parent_id' => 41,\n ],\n [\n 'id' => 53,\n 'type' => 0,\n 'name' => 'Engineering & Technical Design',\n 'desc' => 'Engineering & Technical Design',\n 'order' => 11,\n 'parent_id' => 41,\n ],\n [\n 'id' => 54,\n 'type' => 0,\n 'name' => 'Customer Service',\n 'desc' => 'Customer Service',\n 'order' => 6,\n 'parent_id' => null,\n ],\n [\n 'id' => 55,\n 'type' => 0,\n 'name' => 'Customer Service & Support',\n 'desc' => 'Customer Service & Support',\n 'order' => 0,\n 'parent_id' => 54,\n ],\n [\n 'id' => 56,\n 'type' => 0,\n 'name' => 'Technical Support',\n 'desc' => 'Technical Support',\n 'order' => 1,\n 'parent_id' => 54,\n ],\n [\n 'id' => 57,\n 'type' => 0,\n 'name' => 'Phone Support',\n 'desc' => 'Phone Support',\n 'order' => 2,\n 'parent_id' => 54,\n ],\n [\n 'id' => 58,\n 'type' => 0,\n 'name' => 'Other - Customer Service',\n 'desc' => 'Other - Customer Service',\n 'order' => 3,\n 'parent_id' => 54,\n ],\n [\n 'id' => 59,\n 'type' => 0,\n 'name' => 'Order Processing',\n 'desc' => 'Order Processing',\n 'order' => 4,\n 'parent_id' => 54,\n ],\n [\n 'id' => 60,\n 'type' => 0,\n 'name' => 'Sales & Marketing',\n 'desc' => 'Sales & Marketing',\n 'order' => 7,\n 'parent_id' => null,\n ],\n [\n 'id' => 61,\n 'type' => 0,\n 'name' => 'Advertising',\n 'desc' => 'Advertising',\n 'order' => 0,\n 'parent_id' => 60,\n ],\n [\n 'id' => 62,\n 'type' => 0,\n 'name' => 'Email Marketing',\n 'desc' => 'Email Marketing',\n 'order' => 1,\n 'parent_id' => 60,\n ],\n [\n 'id' => 63,\n 'type' => 0,\n 'name' => 'SEM - Search Engine Marketing',\n 'desc' => 'SEM - Search Engine Marketing',\n 'order' => 2,\n 'parent_id' => 60,\n ],\n [\n 'id' => 64,\n 'type' => 0,\n 'name' => 'SMM - Social Media Marketing',\n 'desc' => 'SMM - Social Media Marketing',\n 'order' => 3,\n 'parent_id' => 60,\n ],\n [\n 'id' => 65,\n 'type' => 0,\n 'name' => 'PR - Public Relations',\n 'desc' => 'PR - Public Relations',\n 'order' => 4,\n 'parent_id' => 60,\n ],\n [\n 'id' => 66,\n 'type' => 0,\n 'name' => 'Telemarketing & Telesales',\n 'desc' => 'Telemarketing & Telesales',\n 'order' => 5,\n 'parent_id' => 60,\n ],\n [\n 'id' => 67,\n 'type' => 0,\n 'name' => 'Market Research & Surveys',\n 'desc' => 'Market Research & Surveys',\n 'order' => 6,\n 'parent_id' => 60,\n ],\n [\n 'id' => 68,\n 'type' => 0,\n 'name' => 'Sales & Lead Generation',\n 'desc' => 'Sales & Lead Generation',\n 'order' => 7,\n 'parent_id' => 60,\n ],\n [\n 'id' => 69,\n 'type' => 0,\n 'name' => 'Other - Sales & Marketing',\n 'desc' => 'Other - Sales & Marketing',\n 'order' => 8,\n 'parent_id' => 60,\n ],\n [\n 'id' => 70,\n 'type' => 0,\n 'name' => 'SEO - Search Engine Optimization',\n 'desc' => 'SEO - Search Engine Optimization',\n 'order' => 9,\n 'parent_id' => 60,\n ],\n [\n 'id' => 71,\n 'type' => 0,\n 'name' => 'Business Plans & Marketing Strategy',\n 'desc' => 'Business Plans & Marketing Strategy',\n 'order' => 10,\n 'parent_id' => 60,\n ],\n [\n 'id' => 72,\n 'type' => 0,\n 'name' => 'Business Services',\n 'desc' => 'Business Services',\n 'order' => 8,\n 'parent_id' => null,\n ],\n [\n 'id' => 73,\n 'type' => 0,\n 'name' => 'Accounting',\n 'desc' => 'Accounting',\n 'order' => 0,\n 'parent_id' => 72,\n ],\n [\n 'id' => 74,\n 'type' => 0,\n 'name' => 'HR / Payroll',\n 'desc' => 'HR / Payroll',\n 'order' => 1,\n 'parent_id' => 72,\n ],\n [\n 'id' => 75,\n 'type' => 0,\n 'name' => 'Financial Services & Planning',\n 'desc' => 'Financial Services & Planning',\n 'order' => 2,\n 'parent_id' => 72,\n ],\n [\n 'id' => 76,\n 'type' => 0,\n 'name' => 'Payment Processing',\n 'desc' => 'Payment Processing',\n 'order' => 3,\n 'parent_id' => 72,\n ],\n [\n 'id' => 77,\n 'type' => 0,\n 'name' => 'Legal',\n 'desc' => 'Legal',\n 'order' => 4,\n 'parent_id' => 72,\n ],\n [\n 'id' => 78,\n 'type' => 0,\n 'name' => 'Project Management',\n 'desc' => 'Project Management',\n 'order' => 5,\n 'parent_id' => 72,\n ],\n [\n 'id' => 79,\n 'type' => 0,\n 'name' => 'Business Consulting',\n 'desc' => 'Business Consulting',\n 'order' => 6,\n 'parent_id' => 72,\n ],\n [\n 'id' => 80,\n 'type' => 0,\n 'name' => 'Recruiting',\n 'desc' => 'Recruiting',\n 'order' => 7,\n 'parent_id' => 72,\n ],\n [\n 'id' => 81,\n 'type' => 0,\n 'name' => 'Statistical Analysis',\n 'desc' => 'Statistical Analysis',\n 'order' => 8,\n 'parent_id' => 72,\n ],\n [\n 'id' => 82,\n 'type' => 0,\n 'name' => 'Other - Business Services',\n 'desc' => 'Other - Business Services',\n 'order' => 9,\n 'parent_id' => 72,\n ],\n [\n 'id' => 83,\n 'type' => 0,\n 'name' => 'Bookkeeping',\n 'desc' => 'Bookkeeping',\n 'order' => 10,\n 'parent_id' => 72,\n ],\n ];\n DB::table('categories')->insert($categories);\n }", "title": "" }, { "docid": "11fc6812f04a43d8df2ee25e877971d3", "score": "0.561544", "text": "function adi_matrix_categories($getTree_array) {\n\tglobal $adi_matrix_debug;\n\n\t// $getTree_array is array of arrays:\n\t// 'id' => 'xx',\n\t// 'name' =>\t'category-name',\n\t// 'title' => 'Category Title',\n\t// 'level' => 0, (in category hierarchy)\n\t// 'children' => 2,\t(no. of children)\n\t// 'parent' => 'root',\t(name of parent)\n\n\t$cat_tree = adi_matrix_cat_tree($getTree_array);\n\n\t$categories = array();\n\tforeach ($getTree_array as $this_cat) {\n\t\t$categories[$this_cat['name']]['parent'] = $this_cat['parent'];\n\t\t$categories[$this_cat['name']]['children'] = adi_matrix_cat_descendents($cat_tree,$this_cat['name']);\n\t}\n\n\treturn $categories;\n}", "title": "" }, { "docid": "40e70a6bb273a8619e088bc07ca97500", "score": "0.56038046", "text": "public function categoryFamily(){\n\n\t# PARENTS\n\t#\n\t$this->tempCat\t= array();\n\t$category\t\t= $this->categoryGet(array(\n\t\t'thread'\t=> true,\n\t\t'debug'\t\t=> false\n\t));\n\n\t$this->categoryFamilyParent($category);\n\tforeach($this->tempCat as $id_category => $tree){\n\t\t$this->dbQuery(\"UPDATE k_category SET categoryParent='\".substr($tree, 0, -1).\"' WHERE id_category=\".$id_category);\n\t}\n\n\t# CHILDREN\n\t#\n\t$category = $this->categoryGet(array(\n\t\t'threadFlat'\t=> true,\n\t\t'debug'\t\t\t=> false\n\t));\n\t\n\tforeach($category as $e){\n\t\t$tree = $this->categoryFamilyChildren($e);\n\t\t$has = (sizeof($tree) >= 1) ? '1' : '0';\n\t\t$tree = (sizeof($tree) > 0) ? implode(',', $tree) : ''; #$e['id_category'];\n\n\t\t$this->dbQuery(\n\t\t\t\"UPDATE k_category \".\n\t\t\t\"SET categoryChildren='\".$tree.\"', categoryHasChildren=\".$has.\" \".\n\t\t\t\"WHERE id_category=\".$e['id_category']\n\t\t);\n\t}\n}", "title": "" }, { "docid": "8864f6eb8d2614d6a43e45011e0f0d17", "score": "0.5600519", "text": "public static final function getSortedCategoryTree($orderBy = 'a.name_en ASC')\r\n {\r\n\t\t$dboAccess = \\Core\\Hybernate\\Products\\Product_Category::getInstance();\r\n $categories = \\Core\\Hybernate\\Products\\Product_Category::getMultiInstance(array('isParent' => 1), true, array(\r\n\t\t\t'order_by' => $orderBy\r\n\t\t));\r\n\t\t\r\n\t\tarray_walk($categories, function(&$item) use($orderBy, $dboAccess) {\r\n\t\t\t$item['children'] = $dboAccess->getDataAccessInterface()->getAll('\r\n\t\t\t\t\tSELECT a.*\r\n\t\t\t\t\tFROM product_category_parent AS pcp\r\n\t\t\t\t\tINNER JOIN product_category AS a\r\n\t\t\t\t\tON a.id = pcp.categoryId\r\n\t\t\t\t\tWHERE pcp.parentCategoryId = :parentId \r\n\t\t\t\t\tGROUP BY a.id ASC \r\n\t\t\t\t\tORDER BY ' . $orderBy . ';\r\n\t\t\t\t ', array('parentId' => (int) $item['id']));\r\n\t\t});\r\n\t\t\r\n\t\treturn $categories;\r\n }", "title": "" }, { "docid": "69b57c3533ac1b0656bba6d071ef883f", "score": "0.5592852", "text": "protected function createTreeNode($id)\n {\n $entity = $this->createEntity($id);\n $treeNode = new CategoryTreeNode($entity);\n\n return $treeNode;\n }", "title": "" }, { "docid": "c76078e8868dfc91237b06420d4757f1", "score": "0.5587615", "text": "function nice_get_download_category_tree($it=NULL,$use_compound_list=false,$addable_filter=false)\n{\n\t$tree=get_download_category_tree(NULL,NULL,NULL,false,$use_compound_list,NULL,$addable_filter);\n\tif ($use_compound_list) $tree=$tree[0];\n\n\t$out=''; // XHTMLXHTML\n\tforeach ($tree as $category)\n\t{\n\t\tif (($addable_filter) && (!$category['addable'])) continue;\n\n\t\t$selected=($category['id']==$it);\n\t\t$line=do_template('DOWNLOAD_LIST_LINE_2',array('_GUID'=>'0ccffeff5b80b1840188b839aee8d9f2','TREE'=>$category['tree'],'FILECOUNT'=>'?'));\n\t\t$out.='<option value=\"'.(!$use_compound_list?strval($category['id']):$category['compound_list']).'\"'.($selected?' selected=\"selected\"':'').'>'.$line->evaluate().'</option>';\n\t}\n\n\tif ($GLOBALS['XSS_DETECT']) ocp_mark_as_escaped($out);\n\n\treturn make_string_tempcode($out);\n}", "title": "" }, { "docid": "f0f20c4aa2f6d8b9c6ea7386eaa81d2a", "score": "0.5579746", "text": "function _buildQuery($filterOnly = false) {\n\n $this->db->select(XCMS_Tables::TABLE_CATEGORIES . \".*\");\n $this->db->select(\"level, ordering, parent_id, count(category_id) as articles\");\n $this->db->join(XCMS_Tables::TABLE_CATEGORIES_RELATIONS, \"node_id = id\");\n $this->db->join(XCMS_Tables::TABLE_ARTICLES_CATEGORIES, \"category_id = id\", \"left\");\n $this->db->group_by(\"id, name, level, ordering, parent_id\");\n $this->db->order_by(\"level\", \"ASC\");\n\n // Front-end filter for unpublished items\n if (!XCMS_Config::get(\"XCMS_BACKEND\")) {\n $this->db->where(\"published\", 1);\n }\n\n // Hook for customized filtering\n XCMS_Hooks::execute(\"categories.build_categories_query\", array(\n &$this, &$this->db, $filterOnly\n ));\n\n return $this->db;\n\n }", "title": "" }, { "docid": "95d385fc3c06d95135d3c71ae91be863", "score": "0.5577845", "text": "public function category_subtree( $cat_id, $cat_array, $group_id, $depth = 0, $type, $parent_id = '' )\r\n\t{\r\n\t\t$depth\t= ($depth == 0) ? 1: $depth + 1;\r\n\r\n\t\t$indent\t= 15;\r\n\r\n\t\t$this->categories[]\t= $this->cat_formatting['category_header'];\r\n\r\n\t\t$checked\t= ( $this->selected === TRUE ) ? 'checked=\"checked\"': '';\r\n\r\n\t\t$arr\t\t= array();\r\n\r\n\t\tforeach ($cat_array as $key => $val)\r\n\t\t{\r\n\t\t\tif ( in_array( $key, $this->used_cat ) === TRUE ) continue;\r\n\r\n\t\t\t$selected\t= ( in_array( $key, $this->assigned_cats ) === TRUE ) ? $this->cat_formatting['category_selected']: '';\r\n\r\n\t\t\t$checked\t= ( in_array( $key, $this->assigned_cats ) === TRUE ) ? $this->cat_formatting['category_selected']: '';\r\n\r\n\t\t\tif ($cat_id == $val['parent_id'])\r\n\t\t\t{\r\n\t\t\t\t$cat_body\t= $this->cat_formatting['category_body'];\r\n\r\n\t\t\t\t$cat_body\t= str_replace( LD.\"selected\".RD, $selected, $cat_body );\r\n\r\n\t\t\t\t$cat_body\t= str_replace( LD.\"checked\".RD, $checked, $cat_body );\r\n\r\n\t\t\t\t$data\t\t\t\t\t= $val;\r\n\t\t\t\t$data['depth']\t\t\t= $depth;\r\n\t\t\t\t$data['indent']\t\t\t= str_repeat( $this->cat_formatting['category_indent'], $depth);\r\n\t\t\t\t$data['categoriy_id']\t= $key;\r\n\t\t\t\tforeach($this->catfields as $name => $id)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (isset($val['field_id_'.$id]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$data[$name] = $val['field_id_'.$id];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$cat_body = $this->EE->functions->prep_conditionals($cat_body, $data);\r\n\r\n\t\t\t\tforeach($data as $var_name => $var_value)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cat_body = str_replace(LD.$var_name.RD, $var_value, $cat_body);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->categories[] = $cat_body;\r\n\r\n\t\t\t\t$this->used_cat[]\t= $key;\r\n\r\n\t\t\t\t$this->category_subtree($key, $cat_array, $group_id, $depth, $type, $parent_id);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->categories[]\t= $this->cat_formatting['category_footer'];\r\n\t}", "title": "" }, { "docid": "585f69433e7214a189d2156e415cb568", "score": "0.55640674", "text": "function categoryTree($cid=[], $parent_id = 0, $sub_mark = '') {\n $pdo = pdo_connect_mysql();\n if ($parent_id != 0) {\n $stmt = $pdo->query(\"SELECT * FROM category WHERE parent_id = $parent_id ORDER BY category ASC\");\n } else {\n $stmt = $pdo->query(\"SELECT * FROM category WHERE parent_id IS NULL ORDER BY category ASC\");\n }\n if ($stmt->rowCount() > 0) {\n $row = $stmt->fetchAll(PDO::FETCH_ASSOC);\n foreach ($row as $item) {\n\n // check if given id is in arrey of active IDs and mark option as selected\n if(in_array($item['id'], $cid)) {\n echo \"<option value=\".$item['id'].\" selected>\".$sub_mark.$item['category'].\"</option>\"; \n } else {\n echo \"<option value=\".$item['id'].\">\".$sub_mark.$item['category'].\"</option>\";\n }\n categoryTree($cid, $item['id'], $sub_mark.'-');\n }\n }\n }", "title": "" }, { "docid": "114d9bb18faed14e184ab7b0ee9637e5", "score": "0.55596423", "text": "public function run()\n {\n $subcategories = array(\n \t\tarray('name' => 'Handicraft','category_id' => 1),\n \t\tarray('name' => 'Drawings','category_id' => 1),\n \t\tarray('name' => 'Paintings','category_id' => 1),\n \t\tarray('name' => 'Computers','category_id' => 2),\n \t\tarray('name' => 'Home Electronics','category_id' => 2),\n \t\tarray('name' => 'Mobile Phones','category_id' => 2),\n \t\tarray('name' => 'Bracelets','category_id' => 3),\n \t\tarray('name' => 'Earrings','category_id' => 3),\n \t\tarray('name' => 'Necklaces','category_id' => 3),\n \t\tarray('name' => 'Pendants','category_id' => 3),\n \t\tarray('name' => 'Rings','category_id' => 3),\n array('name' => 'Watches','category_id' => 3),\n \t\tarray('name' => 'Childrens','category_id' => 4),\n \t\tarray('name' => 'Mens','category_id' => 4),\n \t\tarray('name' => 'Womens','category_id' => 4),\n array('name' => 'Shoes','category_id' => 4),\n array('name' => 'Bags','category_id' => 4),\n \t\tarray('name' => 'Books','category_id' => 5),\n \t\tarray('name' => 'Movies','category_id' => 5),\n \t\tarray('name' => 'Music','category_id' => 5),\n \t\tarray('name' => 'Guitars & Basses','category_id' => 6),\n \t\tarray('name' => 'Banjos','category_id' => 6),\n \t\tarray('name' => 'Orchestral','category_id' => 6),\n \t\tarray('name' => 'Dresses','category_id' => 7),\n \t\tarray('name' => 'Mens Formal Wear','category_id' => 7),\n \t\tarray('name' => 'Dolls','category_id' => 8),\n \t\tarray('name' => 'Toys','category_id' => 8),\n \t\tarray('name' => 'Games','category_id' => 8),\n \t\tarray('name' => 'Cars','category_id' => 9),\n \t\tarray('name' => 'Motorcycle','category_id' => 9),\n \t\tarray('name' => 'Sporting Equipment','category_id' => 10),\n \t\tarray('name' => 'Dinnerware','category_id' => 11),\n \t\tarray('name' => 'Glassware','category_id' => 11),\n \t\tarray('name' => 'Cookware','category_id' => 11),\n \t\tarray('name' => 'Tea & Coffee Accessories','category_id' => 11),\n \t);\n \tDB::table('sub_categories')->insert($subcategories);\n }", "title": "" }, { "docid": "cc672a3f92525fe95dbecf6263f84060", "score": "0.5555369", "text": "public function build() {\n $sql_clen = DB::table(\"clen_hierarhije\")->where(\"id_clena_hierarhije\", $this->root_id)->first();\n\n $cleni_hierarhije = array(\"name\" => $sql_clen->ime_clena_hierarhije);\n $dokument = $this->addChildren($this->root_id);\n $cleni_hierarhije[\"children\"] = $dokument;\n\n return json_encode($cleni_hierarhije);\n\n }", "title": "" }, { "docid": "aa069de65e9ca0341f74cb4928a5bb55", "score": "0.55266273", "text": "function printEcommerceCategoryTree($threaded,$conditionalData,$currentCategories = null) {\n\t\tif(sizeof($threaded)>0){\n\t\t\t$html = '<ul class=\"treeUl\">';\n\t\t\tforeach ($threaded as $key => $node) {\n\t\t\t\t$html .= '<li>';\n\t\t\t\tforeach ($node as $type => $threaded) {\n\t\t\t\t\tif ($type !== 'children') {\n\t\t\t\t\t\t//add section\n\t\t\t\t\t\tif($currentCategories == null){\n\t\t\t\t\t\t\tif(array_key_exists($threaded['id'], $conditionalData)):\n\t\t\t\t\t\t\t\t$html .= '<label class=\"checkbox\"><input class=\"category_ids\" type=\"checkbox\" value=\"'.$threaded['id'].'\" disabled=\"disabled\" name=\"data[Type][TypeCategory][][category_id]\">'.$threaded['title'].'</label>';\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\t$html .= '<label class=\"checkbox\"><input class=\"category_ids\" type=\"checkbox\" value=\"'.$threaded['id'].'\" name=\"data[Type][TypeCategory][][category_id]\">'.$threaded['title'].'</label>';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t}else{ //edit section\n\t\t\t\t\t\t\tif(array_key_exists($threaded['id'],$currentCategories) == true):\n\t\t\t\t\t\t\t\t$checked = 'checked';\n\t\t\t\t\t\t\telse :\n\t\t\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t\t//$checked = true;\n\t\t\t\t\t\t\tif(array_key_exists($threaded['id'], $conditionalData)):\n\t\t\t\t\t\t\t\tif($checked == 'checked'){\n\t\t\t\t\t\t\t\t\t$html .= '<label class=\"checkbox\"><input '.$checked.' class=\"category_ids\" type=\"checkbox\" value=\"'.$threaded['id'].'\" name=\"data[Type][TypeCategory][][category_id]\">'.$threaded['title'].'</label>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$html .= '<label class=\"checkbox\"><input '.$checked.' class=\"category_ids\" type=\"checkbox\" value=\"'.$threaded['id'].'\" disabled=\"disabled\" name=\"data[Type][TypeCategory][][category_id]\">'.$threaded['title'].'</label>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\t$html .= '<label class=\"checkbox\"><input '.$checked.' class=\"category_ids\" type=\"checkbox\" value=\"'.$threaded['id'].'\" name=\"data[Type][TypeCategory][][category_id]\">'.$threaded['title'].'</label>';\n\t\t\t\t\t\t\tendif;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!empty($threaded)) {\n\t\t\t\t\t\t\t$html .= $this -> printEcommerceCategoryTree($threaded,$conditionalData,$currentCategories);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html .= '</li>';\n\t\t\t}\n\t\t\t$html .= '</ul>';\n\t\t\treturn $html;\n\t\t}\n\t}", "title": "" }, { "docid": "331cbb8783e739858a469864fc4fa90a", "score": "0.551758", "text": "public function index()\n {\n return Category::get()->toTree();\n }", "title": "" }, { "docid": "20d0259b6c46f5453314641933e81581", "score": "0.5515816", "text": "public function _display_rgraphtree()\n\t{\n\t\t// Load the View\n\t\t$view = View::factory('rgraphtree');\n\t\t$view->rgraphtree_js = new View('rgraphtree_js');\n\t\t\n\t\t$subdomain = Kohana::config('settings.subdomain');\n\t\t\n\t\t// Build JSON or grab it from cache\n\t\t$cache = Cache::instance();\n\t\t$json = $cache->get($subdomain.'_rgraphtree_json');\n\t\tif ( ! $json)\n\t\t{ // Cache is Empty so Re-Cache\n\t\t\n\t\t\t$array = array('id'=>'root_node','name'=>'<span style=\"color:#000000;font-weight:bold;font-style:italic;\">'.Kohana::config('settings.site_name').'</span>','children'=>array());\n\t\t\t\n\t\t\t// Get parent categories\n\t\t\t$p_cats = ORM::factory('category')->where('parent_id',0)->where('category_visible',1)->find_all();\n\t\t\t$i = 0;\n\t\t\tforeach ($p_cats as $p_cat)\n\t\t\t{\n\t\t\t\t// Set parent category\n\t\t\t\t$array['children'][$i] = array('id'=>'c_'.$p_cat->id,'name'=>'<span style=\"color:#'.$p_cat->category_color.';font-weight:bold;font-style:italic;\">'.$p_cat->category_title.'</span>','children'=>array());\n\t\t\t\t\n\t\t\t\t// Get child categories\n\t\t\t\t$c_cats = ORM::factory('category')->where('parent_id',$p_cat->id)->where('category_visible',1)->find_all();\n\t\t\t\t$n = 0;\n\t\t\t\tforeach ($c_cats as $c_cat)\n\t\t\t\t{\n\t\t\t\t\t// Set child in parent node\n\t\t\t\t\t$array['children'][$i]['children'][$n] = array('id'=>'c_'.$c_cat->id,'name'=>'<span style=\"color:#'.$c_cat->category_color.';font-weight:bold;\">'.$c_cat->category_title.'</span>','children'=>array());\n\t\t\t\t\t\n\t\t\t\t\t// Get child categories reports\n\t\t\t\t\t$reports = $this->get_reports_in_category($c_cat->id);\n\t $r = 0;\n\t\t\t\t\tforeach($reports as $report)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Set report in the child category\n\t\t\t\t\t\t$array['children'][$i]['children'][$n]['children'][$r] = array('id'=>'r_'.$report->id,'name'=>substr($report->incident_title,0,5).'...');\n\t\t\t\t\t\t$r++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$n++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Get parent categories reports\n\t\t\t\t\n\t\t\t\t$reports = $this->get_reports_in_category($p_cat->id);\n\t\t\t\tforeach($reports as $report)\n\t\t\t\t{\n\t\t\t\t\t// Set report in parent category\n\t\t\t\t\t// note: Keep using 'n' as an index here\n\t\t\t\t\t$array['children'][$i]['children'][$n] = array('id'=>'r_'.$report->id,'name'=>substr($report->incident_title,0,5).'...');\n\t\t\t\t\t$n++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$json = json_encode($array);\n\t\t\t$cache->set($subdomain.'_rgraphtree_json', $json, array('rgraphtree_json'), 600);\n\t\t}\n\t\t\n\t\t$view->rgraphtree_js->json = $json;\n\t\t\n\t\t//echo '<br/><br/>';\n\t\t//echo $view->rgraphtree_js->json;\n\t\t//echo '<br/><br/>';\n\t\t\n\t\t$view->render(TRUE);\n\t}", "title": "" }, { "docid": "5bcd7ba422454c0570877f917e98aed6", "score": "0.5503752", "text": "protected function buildAclTree(){\n $this->buildRoles()\n ->buildRecources();\n }", "title": "" }, { "docid": "419a55c4987ec31c7c71c406d02069cf", "score": "0.5497247", "text": "public function getHierarchy()\n {\n\n $parentChildArr = array();\n //$categoryModel = new Cats();\n //$parentArr = $categoryModel->getParents();\n //foreach($parentArr as $id => $name) {\n //$parentChildArr[] = array('parent_id' => 0, 'child_id' => $id);\n //}\n\n $categoriesParentAndChildrenArr = $this->all();\n foreach($categoriesParentAndChildrenArr as $key => $obj) {\n $tmp = $obj->getAttributes();\n $parentChildArr[] = array('parent_id' => $tmp['parent_id'], 'child_id' => $tmp['child_id']);\n }\n\n $tree = $this->buildTree($parentChildArr);\n\n return $tree;\n\n }", "title": "" }, { "docid": "bbb76de2ea9d1836dc06f8239c1a2c8f", "score": "0.5495851", "text": "protected function _createCategoriesControl()\r\n {\r\n $htmlHelper = $this->app->html;\r\n\r\n $fields = $this->app->jbcsvmapper->getCategoryFields();\r\n $options = array($htmlHelper->_('select.option', '', ' ** '));\r\n\r\n foreach ($fields as $groupKey => $group) {\r\n\r\n $options[] = $htmlHelper->_('select.option', '<OPTGROUP>', JText::_('JBZOO_ITEM_GROUP_' . strtoupper($groupKey)));\r\n\r\n foreach ($group as $fieldKey => $field) {\r\n $options[] = $htmlHelper->_('select.option', $fieldKey, $field);\r\n }\r\n\r\n $options[] = $htmlHelper->_('select.option', '</OPTGROUP>');\r\n }\r\n\r\n return $htmlHelper->_('select.genericlist', $options, 'assign[]', 'class=\"type-select\"');\r\n }", "title": "" }, { "docid": "25eae96bc5fa7742389a546912e8c3d4", "score": "0.54953253", "text": "function getAllWbgCategories(){\n\t\t$sql_res = mysql_query(\"SELECT * FROM wbg_tree_categories\");\n\t\twhile ($arr = mysql_fetch_assoc($sql_res)) {\n\t\t\t@$wbgCats['parent_id'][] = $arr;\n\t\t\t//$wbgCats[$arr['id']]['parent_id'] = $arr['parent_id'];\n\t\t}\n\t\treturn $wbgCats;\n\t}", "title": "" }, { "docid": "58c5baed42d008ef6545bf1df31b4403", "score": "0.5490214", "text": "function construct_categories($mode = '', $columns = 3, $cid = 0, $storeid = '')\r\n {\r\n global $ilance, $myapi, $phrase, $ilconfig, $ilpage;\r\n \r\n ($apihook = $ilance->api('categories_construct_categories_start')) ? eval($apihook) : false;\r\n ($apihook = $ilance->api('categories_construct_categories_end')) ? eval($apihook) : false;\r\n \r\n return $html;\r\n }", "title": "" }, { "docid": "cdd0c032d1fcb2673218b8d8df7c3ec5", "score": "0.5487831", "text": "protected function newTree()\n\t{\n\t\t$items = [];\n\n\t\tforeach ($this->lists() as $row)\n\t\t{\n\t\t\t$items[] = new FlattenedItem($row->id, $row->parent_id);\n\t\t}\n\n\t\treturn Tree::makeFromFlattenedItems($items);\n\t}", "title": "" }, { "docid": "9114957b0c3e6be7a95f615792a28b1e", "score": "0.5480779", "text": "public function build_category_list($category, $new=0) {\n $categories = $this->get_category_data();\n $flag = false;\n foreach ($categories as &$cat) {\n $classes = '';\n if (!$flag) {\n $flag = true;\n $classes[] = 'first';\n }\n if ($category == $cat['name']) {\n $classes[] = 'current';\n }\n if ($classes) {\n $cat['class'] = hsc(implode(' ', $classes)); \n }\n }\n\n // Because of the reference in the above loop, $cat refers to the last item\n $cat['class'] = (isset($cat['class'])) ? $cat['class'] . ' last' : 'last';\n\n $smarty = smarty_core();\n $smarty->assign('categories', $categories);\n $smarty->assign('viewid', $this->get('id'));\n\t\t$smarty->assign('outcome', $this->get('submittedoutcome')); // Added by Shashank\n $smarty->assign('courseoutcome', $this->get('submittedcourseoutcome'));\t\t\n $smarty->assign('new', $new);\n return $smarty->fetch('view/blocktypecategorylist.tpl');\n }", "title": "" }, { "docid": "f77b2ee90cfbca3d0446eb983463e239", "score": "0.5466902", "text": "public static final function getCategoryTree($returnArray = true, $orderBy = 'a.id ASC, a.orderIndex ASC, a.name_en ASC')\r\n {\r\n $categoriesIds = array();\r\n $sortedCategories = array();\r\n $categories = \\Core\\Hybernate\\Products\\Product_Category::getMultiInstance(array(), (bool) $returnArray, array('order_by' => $orderBy));\r\n $categorieParents = \\Core\\Hybernate\\Products\\Product_Category_Parent::getMultiInstance(array(), (bool) $returnArray);\r\n\r\n foreach ($categories as $category) {\r\n $categoryId = (int) (true === $returnArray ? $category['id'] : $category->getId());\r\n $categoriesIds[$categoryId] = $category;\r\n }\r\n\r\n // Extract the parents\r\n foreach ($categoriesIds as $categoryId => $category) {\r\n $isParent = (bool) (true === $returnArray ? $category['isParent'] : $category->getIsParent());\r\n if (true === $isParent) {\r\n $sortedCategories[$categoryId] = $category;\r\n $sortedCategories[$categoryId]['children'] = array();\r\n }\r\n }\r\n\r\n // Extract sub categories\r\n foreach ($categorieParents as $parentData) {\r\n $parentId = (int) (true === $returnArray ? $parentData['parentCategoryId'] : $parentData->getParentCategoryId());\r\n $categoryId = (int) (true === $returnArray ? $parentData['categoryId'] : $parentData->getCategoryId());\r\n $sortedCategories[$parentId]['children'][$categoryId] = $categoriesIds[$categoryId];\r\n }\r\n\r\n unset($categoriesIds);\r\n unset($categories);\r\n unset($categorieParents);\r\n\r\n return $sortedCategories;\r\n }", "title": "" }, { "docid": "ab932c0037c3bf3c918cfa655af0dd0e", "score": "0.5465632", "text": "public function build_path_cats($category_id, $type, $full = FALSE)\n\t{\n\t\t$table_name = $this->categories_tables[$type];\n\t\t\t\t\n\t\t$query = \"SELECT \" . ($full ? '*' : 'parent.short_name_cat') . \" FROM {$table_name} AS node, {$table_name} AS parent \";\n\t\t$query .= \"WHERE node.lft BETWEEN parent.lft AND parent.rgt \";\n\t\t$query .= \"AND node.id = {$category_id};\";\n\t\t\n\t\t$result = array();\n\t\t\n\t\tif ($full)\n\t\t{\n\t\t\t$result = $this->db->query($query)->result_array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($this->db->query($query)->result_array() as $node)\n\t\t\t{\n\t\t\t\t$result[] = $node['short_name_cat'];\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t\t\n\t\t/*\n\t\tdo\n\t\t{\n\t\t\t$this->db->where('id', $category_id);\n\t\t\t$query = $this->db->get($table_name);\n\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$row = $query->row();\n\t\t\t\t$result[] = $row->short_name_cat;\n\t\t\t\t$category_id = $row->parent_cat_id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = array();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\twhile ($category_id !== NULL);\n\n\t\treturn empty($result) ? $result : array_reverse($result);\n\t\t * \n\t\t */\n\t}", "title": "" }, { "docid": "7724aa8fd87143d05d8ac17d6f1c3132", "score": "0.5461986", "text": "function _displayTopLevelCategories($tree)\r\n{\t\r\n\t//get all the categories and go through each one\r\n\t$categories = $tree->getElementsByTagName('Category');\r\n\techo '<P><B>Main Categories</B><BR>Please Select:<BR>';\r\n\t$catlist = '';\r\n\tforeach($categories as $cat)\r\n\t{\t\r\n\t\t//get the ID and ParentID\r\n\t\t$catIDNode = $cat->getElementsByTagName('CategoryID');\r\n\t\t$parentIDNode = $cat->getElementsByTagName('CategoryParentID');\r\n\t\t//if ID equals ParentID then it is a Top-Level category\r\n\t\t\r\n\t\tif($catIDNode->item(0)->nodeValue == $parentIDNode->item(0)->nodeValue)\r\n\t\t{\t\r\n\t\t\t//get name and display as link\r\n\t\t\t$catNameNode = $cat->getElementsByTagName('CategoryName');\r\n\t\t\t//$this->load->model('Myebay_model'); \r\n\t\t\t//$this->Myebay_model->GetItem($this->id);\t\r\n\t\t\techo '<BR><A href=\"'.Site_url().'Mydev/Add/', $catIDNode->item(0)->nodeValue, '\">', $catNameNode->item(0)->nodeValue,'</A>';\r\n\r\n\t\t\t$catlist[$catIDNode->item(0)->nodeValue] = $catNameNode->item(0)->nodeValue;\r\n\t\t}\r\n\t}\r\n\tprintcool ($catlist);\r\n}", "title": "" }, { "docid": "f44ac9d5517a55c9126be2c2cc7d0d39", "score": "0.5456834", "text": "function copyTree( $parentID, $parentCategory )\r\n {\r\n $category = new eZArticleCategory( $parentID );\r\n\r\n $categoryList = $category->getByParent( $category, true );\r\n\r\n $tree = array();\r\n $level++;\r\n foreach ( $categoryList as $category )\r\n {\r\n array_push( $tree, array( $return_array[] = new eZArticleCategory( $category->id() ) ) );\r\n\r\n $newCategory = new eZArticleCategory( );\r\n $newCategory->setName( $category->name() );\r\n $newCategory->setDescription( $category->description() );\r\n $newCategory->setParent( $parentCategory );\r\n $newCategory->setOwner( eZUser::currentUser() );\r\n $newCategory->store();\r\n\r\n // write access\r\n eZObjectPermission::setPermission( -1, $newCategory->id(), \"article_category\", 'w' );\r\n\r\n // read access\r\n eZObjectPermission::setPermission( -1, $newCategory->id(), \"article_category\", 'r' );\r\n\r\n\r\n if ( $category != 0 )\r\n {\r\n $tree = array_merge( $tree, $this->copyTree( $category->id(), $newCategory ) );\r\n }\r\n\r\n }\r\n\r\n return $tree;\r\n }", "title": "" }, { "docid": "5846acefec8414114f24bc0a24d0882c", "score": "0.54553384", "text": "function _getEntireCategoryTree($devID, $appID, $certID, $compatabilityLevel, $siteID, $userToken, $serverUrl)\r\n{\r\n\t//Build the request Xml string\r\n\t$requestXmlBody = '<?xml version=\"1.0\" encoding=\"utf-8\" ?>';\r\n\t$requestXmlBody .= '<GetCategoriesRequest xmlns=\"urn:ebay:apis:eBLBaseComponents\">';\r\n\t$requestXmlBody .= \"<RequesterCredentials><eBayAuthToken>$userToken</eBayAuthToken></RequesterCredentials>\";\r\n\t$requestXmlBody .= \"<DetailLevel>ReturnAll</DetailLevel>\"; //get the entire tree\r\n\t$requestXmlBody .= \"<Item><Site>$siteID</Site></Item>\";\r\n\t$requestXmlBody .= \"<ViewAllNodes>1</ViewAllNodes>\"; //Gets all nodes not just leaf nodes\r\n\t$requestXmlBody .= '</GetCategoriesRequest>';\r\n\t\r\n\t//Create a new eBay session with all details pulled in from included keys.php\r\n\t$session = new eBaySession($userToken, $devID, $appID, $certID, $serverUrl, $compatabilityLevel, $siteID, 'GetCategories');\r\n\t$responseXml = $session->sendHttpRequest($requestXmlBody);\r\n\tif(stristr($responseXml, 'HTTP 404') || $responseXml == '')\r\n\t\tdie('<P>Error sending request');\r\n\t\r\n\t//Xml string is parsed and creates a DOM Document object\r\n\t$responseDoc = new DomDocument();\r\n\t$responseDoc->loadXML($responseXml);\r\n\t\r\n\t//save the tree to local file\r\n\t$responseDoc->save('CatTree.xml');\r\n\t\r\n\t//return the DOM Document\r\n\treturn $responseDoc;\r\n}", "title": "" }, { "docid": "e09a348c0fc08e593a5a1d05d39264b5", "score": "0.5445718", "text": "protected function createCategories(): Collection\n {\n $categories = factory(Category::class, 4)->create();\n $categories->push(\n ...$categories->reduce(function ($acc, $c) {\n return array_merge(\n $acc,\n $c->children()\n ->createMany(factory(Category::class, 3)->make()->toArray())\n ->toArray()\n );\n }, [])\n );\n return $categories;\n }", "title": "" }, { "docid": "b0f0f34c8ceab48201dcb5d542f69f25", "score": "0.54318917", "text": "function thdk_create_categories() {\n $taxonomy = 'category'; // category by default for posts for other custom post types like woo-commerce it is product_cat\n $append = true ;// true means it will add the cateogry beside already set categories. false will overwrite\n\n $term = 'Travel';\n if(!term_exists($term, $taxonomy)){\n $travelid = wp_insert_term($term, $taxonomy, array(\n 'slug' => 'travel'\n ));\n }\n\n $term = 'Photography';\n if(!term_exists($term, $taxonomy)){\n $photoid = wp_insert_term($term, $taxonomy, array(\n 'slug' => 'photography'\n ));\n }\n\n $term = 'Featured Photo';\n if(!term_exists($term, $taxonomy)){\n wp_insert_term($term, $taxonomy, array(\n 'slug' => 'featuredphotos',\n 'parent'=> $photoid\n ));\n }\n\n $term = 'Featured Travel';\n if(!term_exists($term, $taxonomy)){\n wp_insert_term($term, $taxonomy, array(\n 'slug' => 'featuredtravel',\n 'parent'=> $travelid\n ));\n }\n\n $term = 'Photo of the week';\n if(!term_exists($term, $taxonomy)){\n wp_insert_term($term, $taxonomy, array(\n 'slug' => 'photo-of-the-week'\n ));\n }\n}", "title": "" }, { "docid": "8f637c46ca19587af0f9157bad90cad8", "score": "0.5430648", "text": "function categories($val='') {\n global $TABLE_PREFIX,$CACHE_DURATION;\n\n $return=\"\\n\".'<select name=\"category\"><option value=\"0\">----</option>';\n\n $c_q=get_result(\"SELECT c.id, c.name, sc.id as sid, sc.name as sname FROM {$TABLE_PREFIX}categories c LEFT JOIN {$TABLE_PREFIX}categories sc on c.id=sc.sub where c.sub='0' ORDER BY c.sort_index, sc.sort_index, c.id, sc.id\",true,$CACHE_DURATION);\n $b_sub=0;\n foreach ($c_q as $c) {\n $cid=$c['id'];\n $name=unesc($c['name']);\n\n if ($b_sub!=$cid && $b_sub!=0)\n $return.=\"\\n</optgroup>\";\n\n // lets see if it has sub-categories.\n if (empty($c['sid'])) {\n $b_sub=0;\n $return.= \"\\n<option\".(($cid==$val)?' selected=\"selected\"':'').' value=\"'.$cid.'\">'.$name.'</option>';\n } else {\n if ($b_sub!=$cid) {\n $return.=\"\\n<optgroup label='$name'>\";\n $b_sub=$cid;\n }\n $sub = $c['sid'];\n $return.= \"\\n<option\".(($sub==$val)?' selected=\"selected\"':'').' value=\"'.$sub.'\">'.unesc($c['sname']).'</option>';\n }\n }\n\n return $return.'</select>';\n}", "title": "" }, { "docid": "23001e6dd39b59fab3021aad6f384518", "score": "0.5430028", "text": "private function getCategoryData() {\n $categories = DB::table('categories')\n ->select('id', 'name')\n ->whereNull('deleted_at')\n ->get();\n $aCatTree = array();\n foreach ($categories as $category) {\n $aCatTree[$this->modifyCategoryName($category->name)] = $category->id;\n }\n $this->categoryData = $aCatTree;\n }", "title": "" }, { "docid": "009a6d59f4d0d5b9d8aec0c3d1e2da6c", "score": "0.54283994", "text": "function cmdeals_walk_category_dropdown_tree() {\n\t$args = func_get_args();\n\t// the user's options are the third parameter\n\tif ( empty($args[2]['walker']) || !is_a($args[2]['walker'], 'Walker') )\n\t\t$walker = new CMDeals_Walker_CategoryDropdown;\n\telse\n\t\t$walker = $args[2]['walker'];\n\n\treturn call_user_func_array(array( &$walker, 'walk' ), $args );\n}", "title": "" }, { "docid": "b90d33a0cd58c2d1fbf166956c5aa4de", "score": "0.5418794", "text": "static public function tree();", "title": "" }, { "docid": "10be29ef45bce5d410eacfc2b5cc6f60", "score": "0.5417938", "text": "public static function display_root_categories() {\n\t\t$treeObject = Doctrine_Core::getTable('Category')->getTree();\n\t\t$rootColumnName = $treeObject->getAttribute('rootColumnName');\n\t\techo \"<div id='sfcart_menu'><ul>\";\n\t\tforeach ($treeObject->fetchRoots() as $root) {\n\t\t\t$options = array('root_id' => $root->$rootColumnName);\n\t\t\tforeach($treeObject->fetchTree($options) as $node) {\n\t\t\t\tif ($node['level'] == 1) {\n\t\t\t\t\techo \"<li><a href='/store/\". $node->getCrumb() .\"'>\" . $node['name'] . \"</a></li>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</ul></div><div style='clear:both'></div>\";\n\t}", "title": "" }, { "docid": "e3ed94e4312a80088939e5051f8502aa", "score": "0.5410328", "text": "public function run()\n {\n $categories = [\n [\n 'Name' => 'Saltele',\n 'Slug' => 'saltele',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n 'children' => [\n [\n 'Name' => 'Saltele Tehnologie 1',\n 'Slug' => 'saltea-tehnologie-1',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Saltele Tehnologie 2',\n 'Slug' => 'saltea-tehnologie-2',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Saltele Tehnologie 3',\n 'Slug' => 'saltea-tehnologie-3',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Saltele Tehnologie 4',\n 'Slug' => 'saltea-tehnologie-4',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Saltele Tehnologie 5',\n 'Slug' => 'saltea-tehnologie-5',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n ],\n ],\n [\n 'Name' => 'Perne',\n 'Slug' => 'perne',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n 'children' => [\n [\n 'Name' => 'Perne Tehnologie 1',\n 'Slug' => 'perne-tehnologie-1',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Perne Tehnologie 2',\n 'Slug' => 'perne-tehnologie-2',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Perne Tehnologie 3',\n 'Slug' => 'perne-tehnologie-3',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n ],\n ],\n [\n 'Name' => 'Pilote',\n 'Slug' => 'pilote',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n 'children' => [\n [\n 'Name' => 'Pilote Tehnologie 1',\n 'Slug' => 'pilote-tehnologie-1',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Pilote Tehnologie 2',\n 'Slug' => 'pilote-tehnologie-2',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Pilote Tehnologie 3',\n 'Slug' => 'pilote-tehnologie-3',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n ],\n ],\n [\n 'Name' => 'Alte tipuri de produse 1',\n 'Slug' => 'alte-tipuri-de-produse-1',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n 'children' => [\n [\n 'Name' => 'Produs Tehnologie 1',\n 'Slug' => 'produs-tehnologie-1',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Produs Tehnologie 2',\n 'Slug' => 'produs-tehnologie-2',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Produs Tehnologie 3',\n 'Slug' => 'produs-tehnologie-3',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n ],\n ],\n [\n 'Name' => 'Alte tipuri de produse 2',\n 'Slug' => 'alte-tipuri-de-produse-2',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n 'children' => [\n [\n 'Name' => 'Produs Tehnologie 1',\n 'Slug' => 'produs-tehnologie-1',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Produs Tehnologie 2',\n 'Slug' => 'produs-tehnologie-2',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n [\n 'Name' => 'Produs Tehnologie 3',\n 'Slug' => 'produs-tehnologie-3',\n 'Active' => 1,\n 'CreatedUser' => 'Gabor',\n ],\n ],\n ],\n ];\n foreach($categories as $category)\n {\n \\App\\Category::create($category);\n }\n }", "title": "" } ]
6d4ce249bafd807aad5ea3176eea292a
/ the function where actual web service call trigger
[ { "docid": "5b074dd0ee65ac2be6c66d8aff7055e2", "score": "0.0", "text": "function requestBags()\n{\n\n /* Generate a random number for the purchase order*/\n $randNum = (rand()%99);\n\n /* Requested date is two weeks from today*/\n $reqDate = mktime(0,0,0,date(\"m\"),date(\"d\")+14,date(\"Y\"));\n $reqDateStr = date(\"Y/m/d\", $reqDate);\n\n /* The payload string*/\n $requestPayloadString = <<<XML\n <po:Order xmlns:po=\"http://www.back_packers.com/ws/purchaseorder\">\n <po:OrderId>po-$randNum</po:OrderId>\n <po:ReqDate>$reqDateStr</po:ReqDate>\n <po:Design>\n <po:FileName>design.jpg</po:FileName>\n <po:Image><xop:Include xmlns:xop=\"http://www.w3.org/2004/08/xop/include\" href=\"cid:myid1\"></xop:Include></po:Image>\n </po:Design>\n </po:Order>\nXML;\n\n try {\n global $request_str;\n global $response_str;\n /* Load the design*/\n $f = file_get_contents(\"./design.jpg\");\n \n /* Build the message*/\n $requestMessage = new WSMessage($requestPayloadString, \n array(\"to\" => \"http://localhost/solutions/store/manuf_service.php\",\n \"action\" => \"http://www.back_packers.com/purchaseOrder\",\n \"attachments\" => array(\"myid1\" => $f)));\n \n /* Load certificates and keys*/\n $rec_cert = ws_get_cert_from_file(\"keys/bob_cert.cert\");\n $my_cert = ws_get_cert_from_file(\"keys/alice_cert.cert\");\n $my_key = ws_get_key_from_file(\"keys/alice_key.pem\");\n\n /* Load policy file*/\n $policy_xml = file_get_contents(\"policy.xml\");\n $policy = new WSPolicy($policy_xml);\n\n /* Ceate a security token with reqd configurations*/\n $sec_token = new WSSecurityToken(array(\"user\" => \"Alice\",\n \"password\" => \"abcd!1234\",\n \"passwordType\" => \"Digest\",\n \"privateKey\" => $my_key,\n \"certificate\" => $my_cert,\n \"receiverCertificate\" => $rec_cert));\n\n /* Create a new client*/\n $client = new WSClient(array(\"useWSA\" => TRUE,\n \"useMTOM\" => FALSE,\n \"policy\" => $policy,\n \"securityToken\" => $sec_token));\n\n /* Request*/\n $responseMessage = $client->request($requestMessage);\n\n /* to track the messages */\n $request_str = $client->getLastRequest();\n $response_str = $client->getLastResponse();\n\n $request_str = format_xml($request_str);\n $response_str = format_xml($response_str);\n\n \n /* Print the response*/\n print \"<div id=\\\"message\\\">More Backpacks requested : The purchase order number is {$responseMessage->str}</div>\";\n\n } catch (Exception $e) {\n if ($e instanceof WSFault) {\n printf(\"Soap Fault: %s\\n\", $e->Reason);\n } else {\n printf(\"Message = %s\\n\",$e->getMessage());\n }\n }\n\n}", "title": "" } ]
[ { "docid": "4c4b2fecf3ab7c0247623e837ab95361", "score": "0.73733467", "text": "abstract protected function callService();", "title": "" }, { "docid": "fde65f14394340b6c3ba94613eb76331", "score": "0.6411742", "text": "public function call(){}", "title": "" }, { "docid": "fde65f14394340b6c3ba94613eb76331", "score": "0.6411742", "text": "public function call(){}", "title": "" }, { "docid": "fde65f14394340b6c3ba94613eb76331", "score": "0.6411742", "text": "public function call(){}", "title": "" }, { "docid": "fde65f14394340b6c3ba94613eb76331", "score": "0.6411742", "text": "public function call(){}", "title": "" }, { "docid": "fde65f14394340b6c3ba94613eb76331", "score": "0.6411742", "text": "public function call(){}", "title": "" }, { "docid": "fde65f14394340b6c3ba94613eb76331", "score": "0.6411742", "text": "public function call(){}", "title": "" }, { "docid": "daad9938b87c46d9b9d4b9be4819532b", "score": "0.6409921", "text": "public function actionCallback() {\n\t\trequire dirname(__FILE__) . '/../Hybrid/Endpoint.php';\n\t\tHybrid_Endpoint::process();\n\t}", "title": "" }, { "docid": "6d426d8c183ca62dbe6625ca80b53d4f", "score": "0.629405", "text": "public function call();", "title": "" }, { "docid": "6d426d8c183ca62dbe6625ca80b53d4f", "score": "0.629405", "text": "public function call();", "title": "" }, { "docid": "fa602b6bdd2931c1c446a5503b0d300d", "score": "0.60711664", "text": "public function endpointAction()\n {\n Hybrid_Endpoint::process();\n }", "title": "" }, { "docid": "0eb0cb8e53dceee7d869666d27c9c55e", "score": "0.60270983", "text": "public static function callService ($requestData);", "title": "" }, { "docid": "b7ea6e5f6b22b09bbe08d29c98b2f9be", "score": "0.595889", "text": "public function performSoapCall()\n {\n $logger = new LoggerWrapper();\n $result = null;\n $soap_client_handle = null;\n $soap_client_handle = $this->createSoapClient($logger);\n\n $soap_function = $this->selectSoapCall();\n\n try {\n if (isset($_SESSION['username'])) {\n if ($soap_client_handle !== false) {\n $call_result = $soap_client_handle->__soapCall($soap_function, $this->params);\n $logger->logAction('Successful SOAP call', $_SESSION['unique_id'], 'INFO');\n }\n $this->result = $call_result;\n }\n } catch(\\SoapFault $e) {\n switch ($e->getMessage()) {\n case 'java.lang.NullPointerException':\n $_SESSION['error'] = 'Please enter a MSISDN number. ';\n break;\n case 'com.orange.telematics.otel.soap.MessageServiceException: login failed':\n $_SESSION['error'] = 'Please try again with valid login credentials. ';\n break;\n default:\n $_SESSION['error'] = 'Something went wrong, please try again. ';\n break;\n }\n $logger->logAction($e->getMessage(), $_SESSION['unique_id'], ERROR, 'Error with SOAP: ');\n header(\"Location: \" . $_SERVER['HTTP_REFERER']);\n exit();\n }\n }", "title": "" }, { "docid": "bb8b4c33f5458f5f582ec1444bdb9027", "score": "0.59443825", "text": "function airtime($function,$info){\r\n\r\n try {\r\n\r\n /* Initialize webservice with your WSDL */\r\n $client = new SoapClient($this->wsdl_url);\r\n\r\n $login = array(\r\n \"user\" => $this->user,\r\n \"pass\" => $this->pass\r\n );\r\n\r\n $settings = array_merge($login,$info);\r\n\r\n $log_id = $this->api_tracker('request', json_encode($settings));\r\n\r\n switch ($function) {\r\n case 'fetchBalance':\r\n $response = $client->fetchBalance($settings);\r\n break;\r\n case 'placeOrder':\r\n $response = $client->placeOrder($settings);\r\n break;\r\n case 'fetchOrder':\r\n $response = $client->fetchOrder($settings);\r\n break;\r\n case 'fetchOrderLatest':\r\n $response = $client->fetchOrderLatest($settings);\r\n break;\r\n case 'queryOrder':\r\n if(isset($settings['orderno']) && $settings['orderno'] != '' && strlen($settings['orderno']) > 5){\r\n $response = $client->queryOrder($settings);\r\n }else{\r\n $response = false;\r\n }\r\n break;\r\n case 'fetchProducts':\r\n $response = $client->fetchProducts($settings);\r\n break;\r\n default:\r\n # code...\r\n break;\r\n }\r\n\r\n } catch (SoapFault $fault) {\r\n trigger_error(\"SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})\", E_USER_ERROR);\r\n }\r\n\r\n $this->api_tracker('response', json_encode($response), $log_id);\r\n\r\n return $response;\r\n }", "title": "" }, { "docid": "a51314316808e994cb2a420fa8c9cd21", "score": "0.5865458", "text": "function doit($url) {\n\n //get the data from service\n $data = get($url);\n\nreturn $data;\n}", "title": "" }, { "docid": "640d4f1746e6e558110aeffbd3fa58ab", "score": "0.5825838", "text": "public function invoke(/* ... */);", "title": "" }, { "docid": "234e2c861457b93cefa7faa5d0c48960", "score": "0.57911474", "text": "abstract public function doRequest();", "title": "" }, { "docid": "7ba1f318051584334d65ac87e70033bd", "score": "0.57682264", "text": "function call(){\n $this->parseData();\n if($this->requests != NULL){\n foreach ($this->requests as $key => $value) {\n $classname = strtolower($this->classFinder($key));\n global $$classname;\n if($$classname == null) {\n $$classname = new $this->classFinder($key);\n }\n $$classname->signal($key, $this->data);\n }\n } else {\n global $bxtreme;\n $bxtreme->home();\n }\n \n }", "title": "" }, { "docid": "4d5c3631c8a2ce1f03c4f453f8ad1ad1", "score": "0.5675756", "text": "public function callMethods(){\r\n $this->setDataArray();\r\n $this->setAccountsPageData();\r\n $this->callFunction();\r\n $this->setArray();\r\n \r\n }", "title": "" }, { "docid": "7c7bbac8c92e2ff852bc34acabc5a924", "score": "0.56480026", "text": "public function webhook() {\n \n\t\t...\n \n\t \t}", "title": "" }, { "docid": "455f1221f742408e1545ff22ece7e804", "score": "0.56224465", "text": "function execute()\n{\n $return = new AppSysBaseObject();\n $serviceControlKey = getServiceControlKey();\n switch($serviceControlKey)\n {\n case \"USERSAFETY-LOGIN_BY_EMAIL_PROSPECT\":\n case \"USERSAFETY-REGISTER_BY_EMAIL_PROSPECT\":\n zReqOnce(\"/_controls/classes/executors/\".$serviceControlKey.\".php\");\n $executor = new Executor();\n $executor->execute();\n $return->transferSysReturnAry($executor);\n break;\n case \"TEST_ACTION\":\n zReqOnce(\"/gd.trxn.com/_controls/classes/executors/\".$serviceControlKey.\".php\");\n $executor = new Executor();\n $executor->execute();\n $return->transferSysReturnAry($executor);\n break;\n case \"TASK_CONTROL\":\n zReqOnce(\"/gd.trxn.com/crossapplication/_controls/classes/executors/\".$serviceControlKey.\".php\");\n $executor = new Executor();\n $executor->execute();\n $return->transferSysReturnAry($executor);\n break;\n case \"USERSAFETY-LOGIN_BY_EMAIL\":\n case \"USERSAFETY-REGISTER_BY_EMAIL\":\n zReqOnce(\"/gd.trxn.com/usersafety/_controls/classes/executors/\".$serviceControlKey.\".php\");\n $executor = new Executor();\n $executor->execute();\n $return->transferSysReturnAry($executor);\n break;\n case \"NO_KEY_SENT\":\n $return->setSysReturnData(\"ACTION_SERVICE_CONTROL_KEY_NOT_FOUND\", \"Action not provided\");\n zLog()->LogInfo(\"SERVICE_CONTROL_KEY{\".getServiceControlKey().\"}\");\n break;\n default:\n $return->setSysReturnData(\"ACTION_SERVICE_CONTROL_KEY_NOT_FOUND\", \"Action not Valid\");\n }\n zLog()->LogDebug(\"EXECUTOR Return : \".$return->getSysReturnAryJSON());\n perform($serviceControlKey, $return);\n}", "title": "" }, { "docid": "9f7d3117114834b2f584af310a19be30", "score": "0.5599505", "text": "public function request() {}", "title": "" }, { "docid": "fd97bd631635356a580c4d36a74c6898", "score": "0.5597993", "text": "public static function service() { throw new Exception(\"Must override this function.\"); }", "title": "" }, { "docid": "88d183aafc0bdf87cd206e8b61fb3334", "score": "0.5580354", "text": "public function xsvcAction()\n {\n return;\n }", "title": "" }, { "docid": "5f66dcdfe4784f2a649c029a62f799b7", "score": "0.55788714", "text": "public function after_call()\n {\n $this->debug_headers_response();\n\n $this->debug($this->call_result, 'Soap Result');\n\n $this->check_result_for_errors();\n }", "title": "" }, { "docid": "db814e029a397e0d855e00755fd9e747", "score": "0.5562057", "text": "public function testTeamsIdTeamDataDataSourceSoapGet()\n {\n\n }", "title": "" }, { "docid": "a5b21a03d6ce41c4827cc8d97b5b6275", "score": "0.55601496", "text": "abstract public function call();", "title": "" }, { "docid": "ba3780442c58990b7e4fc4f679b708da", "score": "0.555363", "text": "abstract public function invoke();", "title": "" }, { "docid": "f8c9e3070537bb7e89677bb4173addb3", "score": "0.5537309", "text": "public function processApi(){\n $this->ar_query = explode(\"/\", $_REQUEST['rquest']);\n array_shift($this->ar_query);\n $func = $this->ar_query[0];\n \n // $func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n if((int)method_exists($this,$func) > 0)\n {\n $this->$func();\n } else {\n //$this->response('Error code 404, Page not found',404); // If the method not exist with in this class, response would be \"Page not found\".\n\t http_response_code(404);\n }\n }", "title": "" }, { "docid": "e94f819f1b81099e8b4e89f881b5f719", "score": "0.55284667", "text": "function index()\n\t{\n\t\t$data = array();\n\n\t\t$this->load->library('xmlrpc');\n\t\t$this->load->library('xmlrpcs');\n//\t\t$this->xmlrpc->set_debug(TRUE);\n\n\t\t$config['functions']['getOrigins'] = array('function' => 'service.getOrigins');\n\t\t$config['functions']['getDestinations'] = array('function' => 'service.getDestinations');\n\t\t$config['functions']['getFlights'] = array('function' => 'service.getFlights');\n\t\t$config['object'] = $this;\n\n\t\t$this->xmlrpcs->initialize($config);\n\t\t$this->xmlrpcs->serve();\n\t}", "title": "" }, { "docid": "6c1c6adcb35d3b9bef81987d38f1e255", "score": "0.55165863", "text": "public function getCall();", "title": "" }, { "docid": "856fac7f4b1c6114e00ed4ac3526f3d3", "score": "0.5511194", "text": "public function runexternalyAction()\n {\n try {\n $config = Mage::helper('klevu_search/config');\n if($config->isExternalCallEnabled()){\n if($this->getRequest()->getParam('data') == \"updatesonly\") {\n Mage::getModel('klevu_search/product_sync')->run();\n Mage::getModel(\"content/content\")->run();\n Mage::getSingleton('core/session')->addSuccess(\"Updated Data has been sent to klevu.\");\n } else if($this->getRequest()->getParam('data') == \"alldata\") {\n // Modified the updated date klevu_product_sync table\n Mage::getModel('klevu_search/product_sync')->markAllProductsForUpdate();\n // Run the product sync for all store\n Mage::getModel('klevu_search/product_sync')->run();\n Mage::getModel(\"content/content\")->run();\n Mage::getSingleton('core/session')->addSuccess(\"All products Data sent to klevu.\");\n }\n }\n\n $debugapi = Mage::getModel('klevu_search/product_sync')->getApiDebug();\n $content=\"\";\n if($this->getRequest()->getParam('debug') == \"klevu\") {\n // get last 500 lines from klevu log \n $path = Mage::getBaseDir(\"log\").\"/Klevu_Search.log\";\n if($this->getRequest()->getParam('lines')) {\n $line = $this->getRequest()->getParam('lines'); \n }else {\n $line = 100;\n }\n\n $content.= $this->getLastlines($path, $line, true);\n \n //send php and magento version\n $content.= \"</br>\".'****Current Magento version on store:'.Mage::getVersion().\"</br>\";\n $content.= \"</br>\".'****Current PHP version on store:'. phpversion().\"</br>\";\n \n //send cron and logfile data\n $cron = Mage::getBaseDir().\"/cron.php\";\n $cronfile = file_get_contents($cron);\n $content.= nl2br(htmlspecialchars($content)).nl2br(htmlspecialchars($cronfile));\n $response = Mage::getModel(\"klevu_search/api_action_debuginfo\")->debugKlevu(array('apiKey'=>$debugapi,'klevuLog'=>$content,'type'=>'log_file'));\n if($response->getMessage()==\"success\") {\n Mage::getSingleton('core/session')->addSuccess(\"Klevu search log sent.\");\n }\n \n $content = serialize(Mage::getModel('klevu_search/product_sync')->debugsIds());\n $response = Mage::getModel(\"klevu_search/api_action_debuginfo\")->debugKlevu(array('apiKey'=>$debugapi,'klevuLog'=>$content,'type'=>'product_table'));\n \n if($response->getMessage()==\"success\") {\n Mage::getSingleton('core/session')->addSuccess(\"Status of indexing queue sent.\");\n }else {\n Mage::getSingleton('core/session')->addSuccess($response->getMessage());\n }\n \n $response = Mage::getModel(\"klevu_search/api_action_debuginfo\")->debugKlevu(array('apiKey'=>$debugapi,'klevuLog'=>$content,'type'=>'index'));\n if($response->getMessage()==\"success\") {\n Mage::getSingleton('core/session')->addSuccess(\"Status of magento indices sent.\");\n }else {\n Mage::getSingleton('core/session')->addSuccess($response->getMessage());\n }\n\n Mage::helper('klevu_search')->log(Zend_Log::DEBUG, sprintf(\"klevu debug data was sent to klevu server successfully.\"));\n }\n\n $rest_api = $this->getRequest()->getParam('api');\n if(!empty($rest_api)) {\n Mage::getModel('klevu_search/product_sync')->sheduleCronExteranally($rest_api);\n Mage::getSingleton('core/session')->addSuccess(\"Cron scheduled externally.\"); \n }\n\n $this->_redirect('search/index/runexternalylog');\n }\n catch(Exception $e) {\n Mage::helper('klevu_search')->log(Zend_Log::DEBUG, sprintf(\"Product Synchronization was Run externally:\\n%s\", $e->getMessage()));\n }\n }", "title": "" }, { "docid": "bea8f45715deafffd56c2cbd07c05825", "score": "0.5507933", "text": "function cl_db_remessawebservice() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_remessawebservice\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ec50d81ba4be00d1f81db03c72871c59", "score": "0.5504751", "text": "public function beforeFulfillRequest () {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3a9f5d7b7d2c22a2438bcde554d17b30", "score": "0.5490988", "text": "function\nmain()\n{\n\tglobal $ALL_REQUEST;\n\t/*\n\t** retreive interface definitions\n\t*/\n\t$interfaces = ParseInterfaceDefinitions($GLOBALS['WEBSERVICES_WHO_WHAT_INTERFACE']);\n\tif (isset($ALL_REQUEST['interface']))\n\t{\n\t\tif (isset($interfaces[$ALL_REQUEST['interface']]))\n\t\t{\n\t\t\t$interface = $interfaces[$ALL_REQUEST['interface']];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tInvalidRequest();\n\t\t}\n\t}\n\telse\n\t{\n\t\t$interface = $interfaces[\"default\"];\n\t}\n\n\t/*\n\t** Security Checks\n\t*/\n\tif (!$GLOBALS['ENABLE_WEBSERVICES'])\n\t{\n\t\tAccessDenied();\n\t}\n\telseif ($interface->password != \"\"\n\t\t&& $interface->password != $ALL_REQUEST['password'])\n\t{\n\t\tAccessDenied();\n\t}\n\n\t// columns to return in xml summary\n\t$selectCols = array(\"SummaryData\", \"irn_1\", \"MulMultiMediaRef:1\");\n\tif ($interface->nameCol != \"\")\n\t{\n\t\t$selectCols = array_merge($selectCols, \n\t\t\t\t\tarray($interface->nameCol));\n\t}\n\tif ($interface->catagoryCol != \"\")\n\t{\n\t\t$selectCols = array_merge($selectCols, \n\t\t\t\t\tarray($interface->catagoryCol));\n\t}\n\tif ($interface->descriptionCol != \"\")\n\t{\n\t\t$selectCols = array_merge($selectCols, \n\t\t\t\t\tarray($interface->descriptionCol));\n\t}\n\t$selectCols = array_merge($selectCols, $interface->extraReturnCols);\n\n\t$selectCols = array_unique($selectCols);\n\n\t// columns for limit and offset\n\t$limit = $GLOBALS['DEFAULT_RETRIEVAL_LIMIT'];\n\tif (is_numeric($ALL_REQUEST['limit']))\n\t\t$limit = $ALL_REQUEST['limit'];\n\tif ($limit > $interface->maximumRetrievalLimit)\n\t\t$limit = $interface->maximumRetrievalLimit;\n\n\t$offset = 0;\n\tif (is_numeric($ALL_REQUEST['offset']))\n\t\t$offset = $ALL_REQUEST['offset'];\n\n\t$database = $GLOBALS['DEFAULT_DATABASE'];\n\tif ($inteface->database != \"\")\n\t\t$database = $interface->database;\n\n\t/*\n\t** Perform the query\n\t*/\n\t$where = BuildWhereStatement($interface->mapping);\n\t$query = new Query();\n\t$query->Select = $selectCols;\n\t$query->From = $database;\n\t$query->Where = BuildWhereStatement($interface->mapping);\n\t$query->Limit = $limit;\n\t$query->Offset = $offset;\n\n\t$results\t= $query->Fetch();\n\t$status\t\t= $query->Status;\n\t$matches\t= \"\";\n\t$error\t\t= \"\";\n\tif ($query->Matches > 0)\n\t\t$matches = ' matches=\"' . $query->Matches . '\"';\n\tif ($query->Error != \"\")\n\t\t$error = ' error=\"' . $query->Error . '\"';\n\t\n\t/*\n\t** Output XML Results\n\t*/\n\theader(\"Content-type: text/xml\");\n\n\tprint \"<?xml version=\\\"1.0\\\" ?>\\n\";\n\tprint \"<results status=\\\"$status\\\"$matches$error>\\n\";\n\t\n\t// Set displaypage to default if not defined in interface\n\tif ($interface->displayPage != \"\")\n\t{\n\t\t$displaypage = $interface->displayPage;\n\t}\n\telse\n\t{\n\t\t$displaypage = 'http://' \n\t\t\t. $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'] \n\t\t\t. $GLOBALS['DEFAULT_DISPLAY_PAGE'];\n\t}\n\t$imagepage = 'http://' \n\t\t. $GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME'] \n\t\t. $GLOBALS['MEDIA_URL'];\n\n\tforeach ($results as $rec)\n\t{\n\t\tprint \"<record>\\n\";\n\n\t\t// Print out Summary and link to record\n\t\t$data = EncodeXmlSpecialChars($rec->{\"SummaryData\"});\n\t\tprint \"\\t<Summary>$data</Summary>\\n\";\n\n\t\t$refirn = $rec->{\"irn_1\"};\n\t\tprint \"\\t<RecordReference>$displaypage?irn=$refirn</RecordReference>\\n\";\n\n\t\t// Print others\n\t\tforeach ($selectCols as $fld)\n\t\t{\n\t\t\t$data = EncodeXmlSpecialChars($rec->{$fld});\n\t\t\tif ($fld == \"MulMultiMediaRef:1\")\n\t\t\t{\n\t\t\t\t$refirn = $rec->{$fld};\n\t\t\t\tif (!is_numeric($rec->{$fld}) )\n\t\t\t\t\tcontinue;\n\t\t\t\tprint \"\\t<ImageReference>$imagepage?irn=$refirn</ImageReference>\\n\";\n\t\t\t\tprint \"\\t<ThumbnailReference>$imagepage?irn=$refirn&amp;thumb=yes</ThumbnailReference>\\n\";\n\t\t\t}\n\t\t\telseif ($fld == $interface->nameCol)\n\t\t\t{\n\t\t\t\tprint \"\\t<Name>$data</Name>\\n\";\n\t\t\t}\n\t\t\telseif ($fld == $interface->catagoryCol)\n\t\t\t{\n\t\t\t\tprint \"\\t<Catagory>$data</Catagory>\\n\";\n\t\t\t}\n\t\t\telseif ($fld == $interface->descriptionCol)\n\t\t\t{\n\t\t\t\tprint \"\\t<Description>$data</Description>\\n\";\n\t\t\t}\n\t\t\telseif ($fld == \"SummaryData\")\n\t\t\t{\n\t\t\t\t//ignore. already printed above outside loop\n\t\t\t}\n\t\t\telseif ($fld == \"irn_1\")\n\t\t\t{\n\t\t\t\t//ignore. already printed above outside loop\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//sub out invalid chars in colnames\n\t\t\t\t$fld = str_replace(\":\", \"_\", $fld);\n\t\t\t\tprint \"\\t<$fld>$data</$fld>\\n\";\n\t\t\t}\n\t\t}\n\t\tprint \"</record>\\n\";\n\t}\n\tprint \"</results>\\n\";\n\n}", "title": "" }, { "docid": "3cc931a7b5199dec8f89a1fa873ca83b", "score": "0.5482655", "text": "public function httpRequestEntryPoint()\n\t{\n\t // dont unescape $_POST because only numbers and base64 values will be accessed\n\t\t$this->processHttpRequest($_POST);\n\t}", "title": "" }, { "docid": "716184ab4c7dcc0fc515189d944a2a6c", "score": "0.5480082", "text": "public function processRequest()\n {\n $this->_event->trigger($this->_openRequestName);\n $this->_event->trigger($_SERVER[\"REQUEST_METHOD\"]);\n $this->_event->trigger($this->_closeRequestName);\n }", "title": "" }, { "docid": "9336d0e787138a120fdf2b8b7db056c9", "score": "0.5456063", "text": "function invokeRequestReport(MarketplaceWebService_Interface $service, $request) {\n\n\t\t\t$status = 0;\n\t\t\t$data = array();\n\n\t\t\ttry {\n\t\t\t\t$response = $service->requestReport($request);\n\t\t\t\tif ($response->isSetRequestReportResult()) {\n\t\t\t\t\t$requestReportResult = $response->getRequestReportResult();\n\t\t\t\t\tif ($requestReportResult->isSetReportRequestInfo()) {\n\t\t\t\t\t\t$reportRequestInfo = $requestReportResult->getReportRequestInfo();\n\t\t\t\t\t\tif ($reportRequestInfo->isSetReportRequestId() != \"\" && $reportRequestInfo->getReportType() == \" _GET_MERCHANT_LISTINGS_ALL_DATA_\" && $reportRequestInfo->getReportProcessingStatus() == \"_SUBMITTED_\") {\n\t\t\t\t\t\t\treturn array('status'=>1,'data'=>$data);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\treturn array('status'=>$status,'data'=>$data);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn array('status'=>$status,'data'=>$data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn array('status'=>$status,'data'=>$data);\n\t\t\t\t}\n\t\t\t} \n\t\t\tcatch (MarketplaceWebService_Exception $ex) {\n\t\t\t\treturn array('status'=>$status,'data'=>$data);\n\t\t\t}\n\n\t\t\t/************************* Example Start ****************************\n\t\t\t\ttry {\n\t\t\t\t\t$response = $service->requestReport($request);\n\t\t\t\t\techo \"Service Response<br/>\";\n\t\t\t\t\techo \"=============================================================================<br/>\";\n\t\t\t\t\techo \"RequestReportResponse<br/>\";\n\t\t\t\t\tif ($response->isSetRequestReportResult()) { \n\t\t\t\t\t\techo \"RequestReportResult<br/>\";\n\t\t\t\t\t\t$requestReportResult = $response->getRequestReportResult();\n\t\t\t\t\t\tif ($requestReportResult->isSetReportRequestInfo()) {\n\t\t\t\t\t\t\t$reportRequestInfo = $requestReportResult->getReportRequestInfo();\n\t\t\t\t\t\t\techo \"ReportRequestInfo<br/>\";\n\t\t\t\t\t\t\tif ($reportRequestInfo->isSetReportRequestId()) {\n\t\t\t\t\t\t\t\techo \"ReportRequestId \".$reportRequestInfo->getReportRequestId().\"<br/>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($reportRequestInfo->isSetReportType()) {\n\t\t\t\t\t\t\t\techo \"ReportType \".$reportRequestInfo->getReportType().\"<br/>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($reportRequestInfo->isSetStartDate()) {\n\t\t\t\t\t\t\t\techo \"StartDate \".$reportRequestInfo->getStartDate()->format(DATE_FORMAT).\"<br/>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($reportRequestInfo->isSetEndDate()) {\n\t\t\t\t\t\t\t\techo \"EndDate \".$reportRequestInfo->getEndDate()->format(DATE_FORMAT).\"<br/>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($reportRequestInfo->isSetSubmittedDate()) {\n\t\t\t\t\t\t\t\techo \"SubmittedDate \".$reportRequestInfo->getSubmittedDate()->format(DATE_FORMAT).\"<br/>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($reportRequestInfo->isSetReportProcessingStatus()) {\n\t\t\t\t\t\t\t\techo \"ReportProcessingStatus \".$reportRequestInfo->getReportProcessingStatus().\"<br/>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\tif ($response->isSetResponseMetadata()) { \n\t\t\t\t\t\techo \"ResponseMetadata<br/>\";\n\t\t\t\t\t\t$responseMetadata = $response->getResponseMetadata();\n\t\t\t\t\t\tif ($responseMetadata->isSetRequestId()) {\n\t\t\t\t\t\t\techo \"RequestId \".$responseMetadata->getRequestId().\"<br/>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\techo \"ResponseHeaderMetadata: \".$response->getResponseHeaderMetadata().\"<br/>\";\n\t\t\t\t} \n\t\t\t\tcatch (MarketplaceWebService_Exception $ex) {\n\t\t\t\t\techo \"Caught Exception: \".$ex->getMessage().\"<br/>\";\n\t\t\t\t\techo \"Response Status Code: \".$ex->getStatusCode().\"<br/>\";\n\t\t\t\t\techo \"Error Code: \".$ex->getErrorCode().\"<br/>\";\n\t\t\t\t\techo \"Error Type: \".$ex->getErrorType().\"<br/>\";\n\t\t\t\t\techo \"Request ID: \".$ex->getRequestId().\"<br/>\";\n\t\t\t\t\techo \"XML: \".$ex->getXML().\"<br/>\";\n\t\t\t\t\techo \"ResponseHeaderMetadata: \".$ex->getResponseHeaderMetadata().\"<br/>\";\n\t\t\t\t}\n\t\t\t************************* Example End *****************************/\n\t\t}", "title": "" }, { "docid": "7a7f2b09c49df61bce8db13f0764ba20", "score": "0.54539996", "text": "abstract public function getServiceJS();", "title": "" }, { "docid": "362c5737cd46755ad45e723c889907d7", "score": "0.54530144", "text": "public function callApiIdentificacion($parameters, $path, $methodName,$request,$differentCall=false,$timeout = 10)\n {\n $ambiente = '';\n if($this->container->hasParameter('ambiente'))\n $ambiente = $this->container->getParameter('ambiente');\n else\n $ambiente = 'desarrollo';\n // Descomentariar esta linea para probar con datacredito real. Esto tiene\n // un costo, y ips bloqueadas, no intentar seguido.\n //$ambiente = 'produccion';\n if($ambiente == 'desarrollo') {\n $view2 = View::create();\n $view2->setStatusCode(200);\n // Return response without the status code.\n $view2->setData(\"blablabla\");\n\n if($methodName == 'validar') {\n $view2->setData(json_decode($this->mockValidacion(), true));\n }\n if($methodName == 'verificar') {\n $view2->setData(json_decode($this->mockRespuesta(), true));\n }\n if($methodName == 'preguntas'){\n $view2->setData(json_decode($this->mockPreguntas(), true));\n }\n\n return $view2;\n }\n\n\n ini_set(\"soap.wsdl_cache_enabled\", 1);\n $opts = array(\n //\"ssl\" => array(\"ciphers\" => \"RC4-SHA\")\n );\n $user = \"900862831\";\n //$client = new \\SoapClient(\"http://172.24.14.29:8080/localizacion2/services/ServicioLocalizacion2?wsdl\",\n $client = new \\SoapClient($path . \"?wsdl\",\n array(\"connection_timeout\" => $timeout,\n \"trace\" => true,\n \"exceptions\" => true,\n \"stream_context\" => stream_context_create($opts),\n 'location' => $path,\n \"login\" => '79787598',\n //\"password\" => $pass\n ));\n\n // var_dump($client->__getFunctions());\n\n $paramProducto = '2641';\n $producto = '007';\n $canal = '001';\n $res=null;\n if(!$differentCall)\n $res = $client->__soapCall($methodName, array($paramProducto, $producto, $canal, $request));\n else\n $res = $client->__soapCall($methodName, array($producto, $paramProducto, $request));\n\n // Transform xml to array in the next 3 lines.\n $xml = simplexml_load_string($res, \"SimpleXMLElement\", LIBXML_NOCDATA);\n $json = json_encode($xml);\n $array2 = json_decode($json,TRUE);\n\n // Fixarray takes as reference the second parameter, so we are going to\n // store the fixed array here.\n $array = array();\n $this->fixArray($array2, $array);\n\n $view = View::create();\n $errorCode = 200;\n if (isset($array[\"resultado\"]) && !($array[\"resultado\"] == \"01\" || $array[\"resultado\"] == \"true\" ))\n $errorCode = 404;\n\n // Set status code of view with http codes.\n $view->setStatusCode($errorCode);\n\n // Return response without the status code.\n $view->setData($array);\n return $view;\n }", "title": "" }, { "docid": "d35b75a3e5f19ed62463780d9f6d3bd6", "score": "0.5450593", "text": "protected function executeEndpoint(): void\n {\n // Do nothing here, override\n }", "title": "" }, { "docid": "2e186d008309354107bb39b51362aeb9", "score": "0.5447635", "text": "public function processRequest(){\r\n\t\t$this->server->service($GLOBALS['HTTP_RAW_POST_DATA'] );\r\n\t}", "title": "" }, { "docid": "f8931e74e85957a97aba1fcd9db93f56", "score": "0.5445813", "text": "public function processRequest()\n {\n $this->_jaxonSetup();\n // Process Jaxon Request\n $jaxon = jaxon();\n $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_BEFORE, array($this, 'onEventBefore'));\n $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_AFTER, array($this, 'onEventAfter'));\n $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_INVALID, array($this, 'onEventInvalid'));\n $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_ERROR, array($this, 'onEventError'));\n if($jaxon->canProcessRequest())\n {\n // Traiter la requete\n $jaxon->processRequest();\n }\n }", "title": "" }, { "docid": "3e5e892d76eca9c6d07f3c71408ec9db", "score": "0.543933", "text": "public function processApi(){\n @$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->responseData(0,404,\"function not found\",\"\");// If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "8eb057128d8974271d4e37abceb343fe", "score": "0.54215777", "text": "function phpRequestExecutor()\r\n\t{\r\n\t}", "title": "" }, { "docid": "f3329c3275bf8fcce07050a4f620f681", "score": "0.5417632", "text": "public function callWebservice($_imagePath = null)\n {\n\n if($_imagePath)\n {\n $_cUrlQuery = $this->buildQuery($_imagePath);\n $_cUrlResult = curl_exec($_cUrlQuery);\n curl_close($_cUrlQuery);\n Mage::log($_imagePath.' has been processed by the Webservice', 6, $this->_logfile);\n return json_decode($_cUrlResult);\n\n } else {\n Mage::log('No image-path given to callWebservice() in Webservice model', $this->_logLevel, $this->_logfile);\n }\n }", "title": "" }, { "docid": "315b72a3bff5f0ed7d6cf13133c5923c", "score": "0.5414564", "text": "public function processApi(){\n\t\t\tif(!isset($_REQUEST['rquest']))\n\t\t\t{\n\t\t\t\t$error = array('status' => \"bad request\", \"msg\" => \"Invalid URL\");\n\t\t\t\t$this->response($this->json($error),404);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse{\n\t\t\t\t$error = array('status' => \"bad request\", \"msg\" => \"Invalid URL\");\n\t\t\t\t$this->response($this->json($error),404);\n\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "d491f6b3b2a2baec53be97cddca23f96", "score": "0.5414029", "text": "public function processApi(){\r\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['request'])));\r\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\r\n\t\t\t\t$this->$func();\r\r\n\t\t\telse\r\r\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\r\n\t\t}", "title": "" }, { "docid": "1273bd77081e1b2d569b6b1e04c57118", "score": "0.54084754", "text": "public function go($_requestedResource){\n\n\t\t//Reset messaging\n\t\t$this->success = '';\n\t\t$this->error = '';\n\t\t\t\t\n\t\treturn call_user_func(array($this, self::SERVICE_FUNCITON_PREFIX.$_requestedResource));\n\t}", "title": "" }, { "docid": "a1cbc8924f76f79d21bd381fd7935a2c", "score": "0.5406815", "text": "public abstract function executeSoap(Payment $payment): mixed;", "title": "" }, { "docid": "137ae2bdb8912c20581505d41b99cfec", "score": "0.54063934", "text": "abstract function SendRequest();", "title": "" }, { "docid": "607c2b13f6153d8940e73577ce5abcb2", "score": "0.5406115", "text": "public function invoke()\n {\n $status = $this->before_filter();\n\n if (No2_HTTP::is_success($status)) {\n $method = $this->respond_to($this->action, $this->http_method);\n $status = $this->$method();\n }\n\n if (!is_null($status))\n $this->view->set_status($status);\n }", "title": "" }, { "docid": "ed86ccb513de1682868b2fe0d1aa271d", "score": "0.5404952", "text": "protected function _getRequest()\n\t{\n\t}", "title": "" }, { "docid": "309137162deb31368b269bd51a6f432c", "score": "0.5389766", "text": "public function Dispatch ();", "title": "" }, { "docid": "9a92f6f0bfe1372d8b68d3b7aecbfc7f", "score": "0.53880847", "text": "protected function _handle()\n {\n $request = $this->getRequest();\n\n $method = $request->getMethod();\n if (!$this->_table->hasMethod($method)) {\n return $this->fault(\"Method not found '$method'\", -1001);\n }\n\n $params = $request->getParams();\n $invocable = $this->_table->getMethod($method);\n $serviceMap = $this->getServiceMap();\n $service = $serviceMap->getService($method);\n $serviceParams = $service->getParams();\n\n if (count($params) < count($serviceParams)) {\n $params = $this->_getDefaultParams($params, $serviceParams);\n }\n\n try {\n $result = $this->_dispatch($invocable, $params);\n } catch (Exception $e) {\n return $this->fault($e->getMessage(), $e->getCode(), $e);\n }\n\n\t\treturn $result;\n }", "title": "" }, { "docid": "475b52edb23e18e5cb7f53f6a66aad28", "score": "0.53862995", "text": "public function serviceRun()\n {\n $this->_commonOutput();\n parent::serviceRun();\n }", "title": "" }, { "docid": "ca2d8763426deebcf191ac1850b879fd", "score": "0.53859395", "text": "public function processApi()\r\n {\r\n global $xdb, $SystemSettings;\r\n\r\n //ph2 tokens\r\n // if($this->blnIgnoreSessionToken == true)\r\n // {\r\n // $this->SessionToken = \"PON135\";\r\n // }else{\r\n\r\n // $this->clearTokenCache();\r\n\r\n // switch($this->Call)\r\n // {\r\n // case \"getMemberDetails\":\r\n // case \"getFarmList\":\r\n // case \"getFarmDetails\":\r\n // case \"getVineyardBlockList\":\r\n // case \"getVineyardBlockDetails\":\r\n\r\n // //check session token\r\n // if(!$this->checkToken($this->SessionToken))\r\n // {\r\n // //record\r\n // $this->record(self::$INVALID_SESSION_TOKEN);\r\n\r\n // //response\r\n // $this->_content_type = \"text/html\";\r\n // $this->response(self::$INVALID_SESSION_TOKEN, self::$HTTP_ERROR_CODE);\r\n // return false;\r\n // }\r\n // break;\r\n // }\r\n // }\r\n\r\n //check method exist\r\n $func = trim(str_replace(\"/\",\"\",$this->Call));\r\n if(($this->blnMethodExist = method_exists($this,$func) ) === true){\r\n //record vendor-access to call\r\n $this->record(self::$VALID_CALL);\r\n\r\n //make the call\r\n $rst = $this->$func($this->args);\r\n switch($this->ReturnType)\r\n {\r\n case \"xml\":\r\n $this->_content_type = \"application/xml\";\r\n $this->response(NemoAPI::xml($rst));\r\n break;\r\n case \"json\":\r\n $this->_content_type = \"application/json\";\r\n $this->response(NemoAPI::json($rst));\r\n break;\r\n }\r\n return true;\r\n }else{\r\n\r\n //record call\r\n $this->record(self::$INVALID_CALL);\r\n\r\n //response\r\n $this->_content_type = \"text/html\";\r\n\r\n $this->response(self::$INVALID_CALL, self::$HTTP_ERROR_CODE); // If the method not exist with in this class \"Page not found\".\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "3b8bad296f82c6a51c29e5f14a486290", "score": "0.53838277", "text": "function processRequest(){\r\n\r\n //for now I'll simply return the initialise_transaction() method\r\n return $this->process_return();\r\n }", "title": "" }, { "docid": "3abc0b82c3e9bf385fe2339145b803c6", "score": "0.5377866", "text": "protected function processSoapCall($path,$uri,$action,$parameter) {\n\n try{\n\n $client = new SoapClient(null, array(\"location\" => \"http://\".\"192.168.178.43:2870\".$path,\n\n \"uri\" => $uri,\n\n \"trace\" => true ));\n\n\n return $client->__soapCall($action,$parameter);\n\n }catch(Exception $e){\n\n $faultstring = $e->faultstring;\n\n $faultcode = $e->faultcode;\n\n if(isset($e->detail->UPnPError->errorCode)){\n\n $errorCode = $e->detail->UPnPError->errorCode;\n\n throw new Exception(\"Error during Soap Call: \".$faultstring.\" \".$faultcode.\" \".$errorCode.\" (\".$this->resolveErrorCode($path,$errorCode).\")\");\n\n }else{\n $this->SendDebug(\"Error during Soap Call: \", $faultstring.\" \".$faultcode,0);\n throw new Exception(\"Error during Soap Call: \".$faultstring.\" \".$faultcode);\n return $faultcode;\n }\n\n }\n\n }", "title": "" }, { "docid": "6c98ff6161c8f04c597f58cda221a1db", "score": "0.5377635", "text": "public function processApi(){\n\t\t\t$call = explode(\"/\",$_REQUEST['rquest']);\n//\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\t$func = trim($call[0]);\n\t\t\t$param1 = trim($call[1]);\n\t\t\t$param2 = trim($call[2]);\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func($param1, $param2);\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "95e20d46198d327cb6067b9eb1a32582", "score": "0.5376501", "text": "public function processApi(){\r\n $x = $_REQUEST['x'];\r\n $this->request_url = explode(\"/\", $x);\r\n $func = strtolower(trim(str_replace(\"/\",\"\",$this->request_url[0])));\r\n if((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "294885fded058ce47aad4d8c8047ec05", "score": "0.5372978", "text": "abstract protected function callback();", "title": "" }, { "docid": "064d57af32a93e5611ef3453d62a2163", "score": "0.5365625", "text": "public function handleRequest ();", "title": "" }, { "docid": "d47e227dc209c7aaaa90f982872e686b", "score": "0.5354623", "text": "public function testTeamsIdDynamicDatasNkDataSourceSoapGet()\n {\n\n }", "title": "" }, { "docid": "c98493dc572fd1a2613c5ece2b8352fb", "score": "0.5352531", "text": "public function getServiceCode();", "title": "" }, { "docid": "d4986353e00994e5847d6d3b4d4aa271", "score": "0.53480303", "text": "function soap_request($name, $params) {\n\tglobal $client;\n\n\t// run soap request\n\t$results = (array)$client->$name($params);\n\t\n\t// if no data, return null\n\tif (!isset($results['return'])) {\n\t\treturn null;\n\t}\n\t\n\t// fix problem where code expects array but single result returns a scalar\n\tif (sizeof($results['return']) == 1) $results['return'] = array($results['return']);\n\t\n\treturn $results['return'];\n}", "title": "" }, { "docid": "0e139a65a4e6632778d17724634cacdf", "score": "0.5345855", "text": "public function process() {\n\t\t//calling the service\n\t\t$mode = HTTP_Helper::retrievePost( 'mode' );\n\t\t$scenario = HTTP_Helper::retrievePost( 'scenario' );\n\t\t$service = $this->getService();\n\t\t$service->mode = $mode;\n\t\t$service->scenario = $scenario;\n\t\t$ret = $service->process();\n\t\tif ( ! is_wp_error( $ret ) ) {\n\t\t\tSettings::instance()->addToResolved( self::$slug );\n\t\t} else {\n\t\t\twp_send_json_error( [\n\t\t\t\t'message' => $ret->get_error_message()\n\t\t\t] );\n\t\t}\n\t}", "title": "" }, { "docid": "bf80e48eec2b6b4346f2e7ed6078bcca", "score": "0.53409976", "text": "public function callback() {\n \n if (rgget('action') == 'return') {\n \n return $this->gf_paynow_process_paynow_notify();\n \n //return $this->maybe_thankyou_page();\n } else if (rgget('action') != 'notify') {\n $this->gf_paynow_process_paynow_notify();\n exit;\n }\n }", "title": "" }, { "docid": "3a5f3bb765e0334c8dd71cc0de4ccf8e", "score": "0.53388405", "text": "public function processApi()\n {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['x'])));\n if ((int)method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class \"Page not found\".\n }", "title": "" }, { "docid": "bc932f089c7c9337df523fff7ba3a605", "score": "0.533698", "text": "function process() {\n\t\ttry {\n\t\t\tif ($this->apikey == null) {\n\t\t\t\t$this->setApiKey($this->getApiKeyImplementation());\n\t\t\t}\n\t\t\t$this->validate();\n\t\t\t$test = $this->params[$this->testvar];\n\t\t\tif ($test == RestClass::TEST_ECHO) {\n\t\t\t\t$result = testImplementation();\n\t\t\t} else {\n\t\t\t\t$result = processImplementation();\n\t\t\t}\n\t\t\tsuccess($result);\n\t\t} catch (RestException $e) {\n\t\t\terror($e->getMessage(), $e->getCode());\n\t\t}\n\t}", "title": "" }, { "docid": "33accc17f010692362a97e51d28f0053", "score": "0.5334905", "text": "public function getCall(){\r\n $deviceModel = new DeviceModel();\r\n $genMethod = new GeneralMethod();\r\n $result = $deviceModel->getCall(); \r\n $genMethod->generateResult($result);\r\n }", "title": "" }, { "docid": "1c07c45afbe9770b50cc041062c2ec81", "score": "0.5333845", "text": "public function onPreRunService()\n\t{\n\t\t$this->raiseEvent('OnPreRunService',$this,null);\n\t}", "title": "" }, { "docid": "701486c423f62999a77ac60daeb85822", "score": "0.5332675", "text": "function index() {\n\t\techo $this->r_method;\n\t\techo \"<br>\";\n\t\techo $this->c_method;\n\t\t// echo 'running rpc'.\"\\n\\n\";\n\t}", "title": "" }, { "docid": "97f27db384a626c501d1952df178a89e", "score": "0.5324429", "text": "public function CallBack($response) {\n\t\n\t}", "title": "" }, { "docid": "a2983926696823b9da60acaa54e9e2f8", "score": "0.5320801", "text": "function query() {\n\n //Get webservice and webservice type array\n $data = $this->view;\n\n if(isset($this->value['0']) && $this->value['0'] != '0' && !empty($data->exposed_data['exposed_services_list'])){\n // make sure base table is included in the query\n $this->ensure_my_table();\n \n //Get webservice table name\n $other_services = $this->diferent_service_types();\n $col_name = 'value';\n switch ($this->value['0']) {\n case 'predefined_datacollections':\n $webservice = 'field_predefined_datacollections';\n //Remove prefix from key\n $prefix = 'predefined_datacollections_';\n $webserviceType = $this->remove_prefix_from_key($data->exposed_data['exposed_services_list'], $prefix);\n $col_name = 'target_id';\n break;\n case 'applications':\n $webservice = 'field_applications';\n //Remove prefix from key\n $prefix = 'applications_';\n $webserviceType = $this->remove_prefix_from_key($data->exposed_data['exposed_services_list'], $prefix);\n break;\n case 'ftp':\n $webservice = 'field_ftp_permissions';\n //Remove prefix from key\n $prefix = 'ftp_';\n $webserviceType = $this->remove_prefix_from_key($data->exposed_data['exposed_services_list'], $prefix);\n break;\n\n default:\n $webservice = 'field_bundle_webservices_'.strtolower($this->value['0']);\n //GetService list array\n $webserviceType = $data->exposed_data['exposed_services_list'];\n break;\n }\n\n $service = array($webservice => array('und' => $webserviceType));\n\n //defind empty users array\n $users = array();\n if($data->exposed_data['seperate_permissions'] == \"1\"){\n //Seperate permissions only\n $usersAll = _kms_permissions_get_uids_by_separate_services($service, $col_name);\n foreach($usersAll as $uid => $sids) {\n $users[] = $uid;\n }\n }else{\n //Show seperate permissions and bundles \n //Get all users which are in has permission for that webservice\n $users = _kms_user_get_users_from_services($service, $col_name);\n }\n \n if(empty($users)){ $users['0'] = '0'; }\n //Add where expresion to view query\n $usersIn = join($users, ', ');\n $operator = \"IN (\".$usersIn.\")\";\n $this->query->add_where_expression($this->options['group'], \"users.uid $operator\");\n }\n }", "title": "" }, { "docid": "6bac8e6ac0e59dc61ba8378f7b6d179f", "score": "0.53170604", "text": "public function testSuccessfulService() {\n\t\t$expected = '200';\n\t\t$uri = new Uri('spring://alpha.venus.uk/testpoint');\n\t\n\t\t$this->handler->register('testpoint', function() {\n\t\t\treturn '200';\n\t\t});\n\n\t\t$actual = $this->handler->run($uri,[],$this->node);\n\t\t$this->assertEquals($expected, $actual);\n\t}", "title": "" }, { "docid": "771586d2682f47914b012e0251cac243", "score": "0.53120166", "text": "public function __call($method_name, $args)\r\n\t{\r\n\t\tKohana::$log->write('debug', \"Got soap request; method name: :method, arguments: :arguments\",\r\n\t\t\tarray('name'=> $method_name, 'arguments' => Kohana::debug($args)));\r\n\t\t$request = Soap_Request::factory($method_name, $args)->execute();\r\n\t\treturn $request->response;\r\n\t}", "title": "" }, { "docid": "91e087c79a8843facc8c62701b232e42", "score": "0.53085166", "text": "public function processApi(){\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "5a98d1cb2fba50fd4e7d3c50f6369b4b", "score": "0.53075385", "text": "public function jaxonAction()\n {\n $this->jaxon();\n // Process the Jaxon request\n if($this->jaxon->canProcessRequest())\n {\n $this->jaxon->processRequest();\n }\n }", "title": "" }, { "docid": "874efb96831a954e7f9741640d813131", "score": "0.53074735", "text": "public function processApi(){\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",@$_REQUEST['x'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n\t}", "title": "" }, { "docid": "484cf5e111c05938ae0bbc80ffd77be4", "score": "0.5306088", "text": "public function processApi(){\t\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\tif((int)method_exists($this,$func) > 0){\n\t\t\t$this->$func();\n\t\t}\n\t\telse{\n\t\t\t$this->response('',404);\n\t\t}\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.5303154", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "4e5466d36dbaa6c290781a93f193588d", "score": "0.52985203", "text": "public function processApi(){\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n if(method_exists($this, $func)){\n $this->$func();\n }else{\n echo \"me echa\";\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }\n }", "title": "" }, { "docid": "d1f6a52a4f78d8860e0b50e4cebcee15", "score": "0.5297596", "text": "function soapClient($info){\n\t\t$params = array(\n\t\t \"ImportVendorDetails\" => array(\n\t\t \"vendorRequest\" => $info,\n\t\t \"errorMessage\" => \"\"\n\t\t )\n\t\t);\n\t\t\n\t\t$navfunc=\"ImportVendorDetails\";\n\t\t$response=navApiService($params,$navfunc);\n\t\t\n\t\treturn($response);\n\t}", "title": "" }, { "docid": "a4ca931d89686a2eb23033d385cf2be6", "score": "0.52899003", "text": "function actionIndex(){\n //$webservice->bindingStyle = WsdlGenerator::STYLE_RPC;\n //$aa = $webservice->generateWsdl('app\\controllers\\AuditServiceController','http://admin.audit.com/audit-service/soap');\n //$fb = fopen('audit.wsdl','w');\n //fwrite($fb,$aa);\n //fclose($fb);\n //var_dump($aa);die;\n\n $soap_url = 'http://admin.audit.com/audit.wsdl';\n try {\n try{\n $arr = [\n 'registrarId' => '12345',\n 'domain' => '格润丝.商标',\n 'contactId' => '1481s6qf5e8y',\n\t\t\t\t\t'registorType'=>2,\n 'contactCode'=>'1',\n 'contactValue'=>'412725198811193425',\n\t\t\t\t\t'org'=>1234561212,\n\t\t\t\t\t'orgCode'=>1234561212,\n\t\t\t\t\t'businessLicense'=>1234561212122,\n 'registeredYears'=>10,\n 'parseUrl'=>'http://www.huyi.com',\n 'trademarkRegNo'=>'156257383927',\n 'tmClassType'=>'第一类,第二类',\n 'tmIssuingCountry'=>'CN',\n 'tmProofExpiresDate'=>'2020-12-03',\n 'otherParam'=>'',\n ];\n\n $fp12 = fopen(Yii::$app->basePath.'/20150210161931893.jpg', 'rb',0);\n $file12 = fread($fp12, filesize(Yii::$app->basePath.'/20150210161931893.jpg')); //二进制数据\n fclose($fp12);\n\n $file1 = ['dataHandler'=>base64_encode($file12),'fileName'=>'id.jpg','type'=>1,'fileSuffix'=>'jpg'];\n\n $file2 = ['dataHandler'=>base64_encode($file12),'fileName'=>'org.jpg','type'=>2,'fileSuffix'=>'jpg'];\n $file3 = ['dataHandler'=>base64_encode($file12),'fileName'=>'business.jpg','type'=>3,'fileSuffix'=>'jpg'];\n $files = [$file1,$file2,$file3];\n $arr['files'] = $files;\n\n $xml = '<wsse:Security xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\" ><wsse:UsernameToken xmlns:wsu=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd\"><wsse:Username>huyi1</wsse:Username><wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">' . sha1('123456') . '</wsse:Password></wsse:UsernameToken></wsse:Security>';\n\n $header = new \\SoapHeader('http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd', 'CallbackHandler', new \\SoapVar($xml, XSD_ANYXML), true);\n $opt = array('trace'=>1,'encoding'=>'utf-8', 'exceptions' => 1,'uri'=> \"http://service.nightwish.gtld.knet.cn/\", 'soap_version' => SOAP_1_2);\n\n $client = new \\SoapClient($soap_url,$opt);\n $client->__setSoapHeaders(array($header));\n $res = $client->UploadAuditData($arr);\n var_dump($res);die;\n }catch (\\SoapFault $e) {\n var_dump($e->faultstring);die;\n }\n }catch (Exception $e){\n var_dump($e->getMessage());die;\n }\n }", "title": "" }, { "docid": "f955abeaa3b3f2308776af21025a4546", "score": "0.52871436", "text": "public function after_request() {\n\t}", "title": "" }, { "docid": "2649fcbef03863a06758f44f06aa392f", "score": "0.5284319", "text": "public function get_webhook() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "4edb0c7b1f91bf6f52b6d62fbec71cdf", "score": "0.52842826", "text": "public function postflight()\n {\n }", "title": "" }, { "docid": "d61e6fc2dc5e73d1d1e51e1a7ca12a0f", "score": "0.5283797", "text": "function ssapolicybisins_post() {\n $data = json_decode(file_get_contents(\"php://input\"), true);\n $parameter = array(\n 'act_mpde' => $this->post('act_mpde'),\n 'admintype' => $this->post('id')\n );\n $data = $this->supper_admin->call_procedureRow('proc_ssagetbusiness',$parameter);\n if(!empty($data)){\n $data = $this->send_json($data);\n $this->response($data, 202);\n }\n else{\n $this->response(\"Something Went Wrong\", 400); // 200 being the HTTP response code\n }\n\n }", "title": "" }, { "docid": "64525ecbe83652d2b04bafa4f17268d9", "score": "0.5280371", "text": "private function SoapRequest() {\n\n $webServiceUrl = ($this->teste) ? Komerci::WSDL_TEST_URL : Komerci::WSDL_URL;\n \n $soapClient = new SoapClient($webServiceUrl, $this->parametros); \n $soapResult = $soapClient->__soapCall($this->metodo, $this->parametros);\n\n $resultado = $this->metodo.\"Result\";\n \n $this->resposta = new Response($soapResult->$resultado->any);\n\n }", "title": "" }, { "docid": "27118ec041d6865ef9e7f7f3c26a1b25", "score": "0.5279224", "text": "public function processApi()\n{\n\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\tif((int)method_exists($this,$func) > 0)\n \t\t$this->$func();\n \telse\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n \t\t$this->response('method doesnt exist',404);\n}", "title": "" }, { "docid": "d01c4199b9ace365d901fd7bd1fdb12c", "score": "0.5278155", "text": "function foo()\n{\n $client = new SoapClient('foo');\n}", "title": "" }, { "docid": "e29fe91da56534b5d05fe99ec4c30414", "score": "0.52712715", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['request'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page?Method not found\".\n\t\t}", "title": "" }, { "docid": "5064d93a355ae7724103a210dfcd39c0", "score": "0.5270505", "text": "protected function getFunction()\n {\n return 'perform';\n }", "title": "" }, { "docid": "a0583c2455a7c431c0ab0c2f58a33f8f", "score": "0.5269574", "text": "public function handleRequest();", "title": "" }, { "docid": "56da3e39836302ad7ca277fe18885f26", "score": "0.5267595", "text": "function getResponse();", "title": "" }, { "docid": "16525e9a45ad19494e21b0ecc4f48fcb", "score": "0.5267276", "text": "function pick_your_service(){\r\n switch ($this->service_case) {\r\n case \"nytimes.com\":\r\n $this->nytimes();\r\n break;\r\n default:\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "42574a97986628662fe2706cd5450399", "score": "0.5262895", "text": "abstract public function sendRequest();", "title": "" }, { "docid": "1e9b4f93187854576b5f82222d05783a", "score": "0.52626354", "text": "function trigger_callback_of_payin_transaction(array $payload);", "title": "" }, { "docid": "704351e17b4fd3983d3a993fb0b573fb", "score": "0.52571416", "text": "abstract protected function response();", "title": "" }, { "docid": "45c7e2b1d6acd3ec20727796c6ef7c65", "score": "0.5248987", "text": "public function respostacontato()\n {\n //\n }", "title": "" } ]
7a80f68be10a2c8d99934252d480daec
Factory method to instantiate the request object with given parameters
[ { "docid": "b72de57a401c7e2eeecd08bb30cc6ea8", "score": "0.0", "text": "public static function factory($params = null)\n {\n $class = new self;\n\n foreach ($params as $property => $propertyConfig) {\n if(is_array($propertyConfig)){\n if(isset($propertyConfig[\"type\"])){\n $class->$property = new $propertyConfig[\"type\"];\n } else if(isset($propertyConfig[\"value\"])){\n $value = $propertyConfig[\"value\"];\n } \n } else {\n $class->$propertyConfig = null;\n }\n }\n\n return $class;\n }", "title": "" } ]
[ { "docid": "a2f3aefa7dd881cbc7b0766c6351ee32", "score": "0.78597564", "text": "private function createRequest()\n\t{\n\t\t$path = $this->getRequestUri();\n\t\treturn new Request($_SERVER['REQUEST_METHOD'], $path);\n\t}", "title": "" }, { "docid": "b513da8105fee1af6d89685eafe37292", "score": "0.7601716", "text": "public function requestFactory()\n {\n $uri = 'https://example.com/foo/bar?abc=123';\n $headers = [];\n $body = '';\n $request = new Request(\n 'GET',\n $uri,\n $headers,\n $body\n );\n\n return $request;\n }", "title": "" }, { "docid": "6cd713c7441879a82a9804fdc5ebddc3", "score": "0.754823", "text": "protected function createRequest(): Request\n {\n return Request::createFromGlobals();\n }", "title": "" }, { "docid": "486dfc85a3270883ac57eed59d493fc5", "score": "0.75067663", "text": "abstract public function __construct(&$request);", "title": "" }, { "docid": "999de756c791dce5d33225bf992ee581", "score": "0.7380631", "text": "public function createRequest();", "title": "" }, { "docid": "999de756c791dce5d33225bf992ee581", "score": "0.7380631", "text": "public function createRequest();", "title": "" }, { "docid": "c70758462c1b554b48afd5cae2de78d6", "score": "0.73047113", "text": "protected function createRequestObject()\n {\n return new ezcMvcRequest();\n }", "title": "" }, { "docid": "3d8fb51694bfb5642c6c4ced8dcd5e18", "score": "0.7074819", "text": "public function __construct ( HttpRequest $request = null) {}", "title": "" }, { "docid": "6c8717b27724c68e7b59fbf426b4c2e9", "score": "0.7036058", "text": "function new_request(): Request {\n $request = new Request();\n\n $request->set_headers(get_headers());\n $request->set_body(\\fopen('php://input', 'r'));\n\n $qs = [];\n \\parse_str($_SERVER['QUERY_STRING'] ?? '', $qs);\n $request->set_query_all($qs);\n\n return $request;\n}", "title": "" }, { "docid": "073224ecd7c718179981f751e965e5ef", "score": "0.70227516", "text": "public function testCreatingFromGlobals()\n {\n $requestFromConstructor = new Request($_GET, $_POST, $_COOKIE, $_SERVER, $_FILES, $_ENV);\n $this->assertEquals($requestFromConstructor, Request::createFromGlobals());\n }", "title": "" }, { "docid": "876cf868ea845786464082ab0ade20b3", "score": "0.6986373", "text": "public function __construct(Request $request);", "title": "" }, { "docid": "2beb09fee7a79f9cfc52622bc0639344", "score": "0.69783276", "text": "public static function createFromGlobals(){\n\t\t//Method inherited from Symfony\\Component\\HttpFoundation\\Request\n\t\treturn Illuminate\\Http\\Request::createFromGlobals();\n\t }", "title": "" }, { "docid": "2beb09fee7a79f9cfc52622bc0639344", "score": "0.69783276", "text": "public static function createFromGlobals(){\n\t\t//Method inherited from Symfony\\Component\\HttpFoundation\\Request\n\t\treturn Illuminate\\Http\\Request::createFromGlobals();\n\t }", "title": "" }, { "docid": "23a99615a6bb35627eb50da48277de9f", "score": "0.69759715", "text": "public function createRequest($request)\n\t{\n\t\t// Generic request execution\n\t\treturn $this->request($request);\n\t}", "title": "" }, { "docid": "a52bbcbd8f92912dcec5a48548288688", "score": "0.69452864", "text": "public static function createFromGlobals()\n {\n $request = new self();\n $request->setUri($_SERVER['REQUEST_URI']);\n $request->setMethod($_SERVER['REQUEST_METHOD']);\n $request->setGetParameters($_GET);\n $request->setPostParameters($_POST);\n\n return $request;\n }", "title": "" }, { "docid": "ad16b99b0410d05233f353a8f6d6c95a", "score": "0.6927473", "text": "protected function newRequest() {\n\t\t$req = new \\stdClass;\n\t\t$req->attrs = new \\stdClass();\n\t\t$req->attrs->request = [];\n\t\t$req->attrs->get = [];\n\t\t$req->attrs->post = [];\n\t\t$req->attrs->cookie = [];\n\t\t$req->attrs->server = [];\n\t\t$req->attrs->files = [];\n\t\t$req->attrs->session = null;\n\t\t$req->attrs->paramsDone = false;\n\t\t$req->attrs->inputDone = false;\n\t\t$req->attrs->input = new Input();\n\t\t$req->attrs->inputReaded = 0;\n\t\t$req->attrs->chunked = false;\n\t\t$req->upstream = $this;\n\t\treturn $req;\n\t}", "title": "" }, { "docid": "ddacffcaacb9c645fe6af3d18e5189bf", "score": "0.6902973", "text": "public static function createFromGlobals()\n {\n $request = new static($_GET, $_POST, [], $_COOKIE, $_FILES, $_SERVER, null);\n if (0 === strpos($request->headers->get('CONTENT_TYPE'), 'application/x-www-form-urlencoded')\n && \\in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH'])\n ) {\n parse_str($request->getContent(), $data);\n $request->request = new ParameterBag($data);\n }\n\n return $request;\n }", "title": "" }, { "docid": "0416a4ef89c2679dd7e26982d59c9bbe", "score": "0.68776035", "text": "public function loadRequest()\n\t{\n\t\tif( ! $this->filesystem)\n\t\t{\n\t\t\t$this->setFilesystem(new Filesystem);\n\t\t}\n\t\t\n\t\tif( ! isset($this->request))\n\t\t{\n\t\t\t$this->setRequest();\n\t\t}\n\n\t\t// How to test?\n\t\treturn new $this->request(\n\t\t\tnew RequestMethod,\n\t\t\tnew Repository($this->namespace),\n\t\t\tnew Parser($this->filesystem, $this->namespace)\n\t\t);\n\t}", "title": "" }, { "docid": "75b910dbe9b846cf15256da460ee80e9", "score": "0.6865671", "text": "public function constructRequestFactory($name)\n\t{\n\t\t// Will throw InvalidArgumentException if class does not exist\n\t\t$class = $this->resolveReflectionClass($name);\n\t\t\n\t\t// Check if class implements CacheInterface\n\t\tif (!$class->implementsInterface('StreamOne\\\\API\\\\v3\\\\RequestFactoryInterface'))\n\t\t{\n\t\t\tthrow new \\InvalidArgumentException(\"Class \" . $name . \" does not implement RequestFactoryInterface\");\n\t\t}\n\t\t\n\t\t// Construct cache from arguments and return it\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\t\t\n\t\treturn $class->newInstanceArgs($args);\n\t}", "title": "" }, { "docid": "84faa0ba8dd8ba146f898828868df5f2", "score": "0.6843986", "text": "function __construct($request){\n $this->_request = $request;\n }", "title": "" }, { "docid": "ee09d9074376f8414c96e22693412244", "score": "0.68407464", "text": "private function buildRequest() {\n return Zend\\Diactoros\\ServerRequestFactory::fromGlobals(\n $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES\n );\n }", "title": "" }, { "docid": "9c4255c52fca367b727fb414d9f2ce88", "score": "0.68171287", "text": "public function createRequest(string $className, string $requestType = self::REQUEST_TYPE_QUERY, ...$args);", "title": "" }, { "docid": "60ec98f9df2fedb5255cd4e796072df0", "score": "0.6805238", "text": "protected function getRequestObject()\n {\n PhDI::reset();\n $di = new PhDI();\n\n $di->set(\n 'filter',\n function () {\n return new PhTFilter();\n }\n );\n\n $request = new PhTRequest();\n $request->setDI($di);\n\n return $request;\n }", "title": "" }, { "docid": "0099706ab4488ab575e23951f48d76e0", "score": "0.6784193", "text": "protected abstract function makeRequest(HttpRequest $request);", "title": "" }, { "docid": "24a4573ef0d7c004a448c7350427fa92", "score": "0.67704093", "text": "protected function createRequest()\r\n {\r\n $name = $this->qualifyClass($this->getNameInput());\r\n\r\n $this->call('make:request', [\r\n 'name' => str_replace('Controller', '', str_replace($this->getNamespace($name) . '\\\\', '', $name) . 'Request')\r\n ]);\r\n }", "title": "" }, { "docid": "3086d6ab20c84563b15fc6e96eb05cbe", "score": "0.6744206", "text": "public function createRequest()\n {\n $this->request = $this->createRequestObject();\n $this->processStandardHeaders();\n $this->processAcceptHeaders();\n $this->processUserAgentHeaders();\n $this->processFiles();\n $this->processAuthVars();\n $this->processCookies();\n\n $this->request->raw = &$_SERVER;\n\n return $this->request;\n }", "title": "" }, { "docid": "094cab6a4f3cb2128a350d3f72679d19", "score": "0.67417574", "text": "public function __construct( Request $request )\n {\n\n }", "title": "" }, { "docid": "646da9a33795024c2e7c6c25025fc4e7", "score": "0.6635513", "text": "public function __construct(HttpRequest $request = null)\n {\n }", "title": "" }, { "docid": "b3535479d0d85beb07a96fd752493c86", "score": "0.6611543", "text": "public static function createFromRequest(\n Zend_Controller_Request_Abstract $request)\n {\n return new self($request->getParams());\n }", "title": "" }, { "docid": "719011ca2f516ee2bf89ba9ec5d11348", "score": "0.6599102", "text": "function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) {/*{{{*/\n $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != \"on\") ? 'http' : 'https';\n @$http_url or $http_url = $scheme . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n @$http_method or $http_method = $_SERVER['REQUEST_METHOD'];\n \n $request_headers = OAuthRequest::get_headers();\n\n // let the library user override things however they'd like, if they know\n // which parameters to use then go for it, for example XMLRPC might want to\n // do this\n if ($parameters) {\n $req = new OAuthRequest($http_method, $http_url, $parameters);\n }\n // next check for the auth header, we need to do some extra stuff\n // if that is the case, namely suck in the parameters from GET or POST\n // so that we can include them in the signature\n else if (@substr($request_headers['Authorization'], 0, 5) == \"OAuth\") {\n $header_parameters = OAuthRequest::split_header($request_headers['Authorization']);\n if ($http_method == \"GET\") {\n $req_parameters = $_GET;\n } \n else if ($http_method = \"POST\") {\n $req_parameters = $_POST;\n } \n $parameters = array_merge($header_parameters, $req_parameters);\n $req = new OAuthRequest($http_method, $http_url, $parameters);\n }\n else if ($http_method == \"GET\") {\n $req = new OAuthRequest($http_method, $http_url, $_GET);\n }\n else if ($http_method == \"POST\") {\n $req = new OAuthRequest($http_method, $http_url, $_POST);\n }\n return $req;\n }", "title": "" }, { "docid": "205eb68033768690a1d2f3151bf9185c", "score": "0.65972924", "text": "private function createNewXmlRequest()\n {\n $req = new Request\\Root();\n $req->header = new Request\\Header();\n $req->request = new Request\\Request();\n $req->request->search = new Request\\Search();\n $req->request->options = new Request\\Options();\n $req->header->credentials = new Request\\Credentials();\n $req->header->credentials->user = $this->config[\"user\"];\n $req->header->credentials->password = $this->config[\"password\"];\n $req->header->credentials->source = $this->config[\"source\"];\n\n return $req;\n }", "title": "" }, { "docid": "598556d85f2bdbb077a1d665ce8755a6", "score": "0.6593035", "text": "public function __construct(Request $request){\n\n\t\t$this->request = $request;\n\n\t}", "title": "" }, { "docid": "786e2ff03f47c869d35b8f1901bf526d", "score": "0.6561836", "text": "public static function factory( Request $request )\n {\n $requestHash = spl_object_hash( $request );\n\n if( !isset( self::$requestsMap[ $requestHash ] ) )\n {\n self::$requestsMap[ $requestHash ] = new self( $request );\n }\n\n return self::$requestsMap[ $requestHash ];\n }", "title": "" }, { "docid": "d1aff49d00683d2343f318ca7d560536", "score": "0.6561748", "text": "public function __construct(Request $request)\n {\n \t$this->request = $request;\n }", "title": "" }, { "docid": "5d06026999bb40337b196972f1f9c198", "score": "0.654492", "text": "public function __construct($request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "5d06026999bb40337b196972f1f9c198", "score": "0.654492", "text": "public function __construct($request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "5d06026999bb40337b196972f1f9c198", "score": "0.654492", "text": "public function __construct($request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "5d06026999bb40337b196972f1f9c198", "score": "0.654492", "text": "public function __construct($request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "5d06026999bb40337b196972f1f9c198", "score": "0.654492", "text": "public function __construct($request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "5d06026999bb40337b196972f1f9c198", "score": "0.654492", "text": "public function __construct($request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "8ce7862179d1b878f094e86ccae1c72c", "score": "0.6538574", "text": "public function __construct(array $request =null)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "0b76be2143d78a9707ecba05f5190798", "score": "0.65196115", "text": "public function testCreateInstanceWithParams()\n {\n $object = RequestUri::getInstance(RequestUriTest::URL);\n $this->assertInstanceOf(RequestUri::class, $object);\n\n return $object;\n }", "title": "" }, { "docid": "79594eff2fe0cd4e143dbde73a165339", "score": "0.65102863", "text": "abstract public function request(array $params = array());", "title": "" }, { "docid": "4d0d1a28d6c0567900abc507df7ba674", "score": "0.6507992", "text": "public static function newFromRequest(Request $request)\n {\n $reflector = new \\ReflectionClass(get_called_class());\n\n return $reflector->newInstanceArgs($request->getConstructParamsArray());\n }", "title": "" }, { "docid": "13a1ad65affd43ddaa5d3ce7de0b2225", "score": "0.6495967", "text": "public function __construct($request = null)\n {\n\n if (!$request)\n return null;\n\n if ($element = $request->param('element', Validator::CKEY))\n $this->element = $element;\n\n if ($refMask = $request->param('ref_mask', Validator::CKEY))\n $this->refMask = $refMask;\n\n if ($refField = $request->param('ref_field', Validator::CKEY))\n $this->refField = $refField;\n\n if ($refId = $request->param('ref_id', Validator::CKEY))\n $this->refId = $refId;\n\n }", "title": "" }, { "docid": "20e355af9405a05b75b7a20ef8b5e9fd", "score": "0.64959246", "text": "public function __construct(Request $request) {\n\t\t$this->request = $request;\n\t}", "title": "" }, { "docid": "3e5ba6703df8d5ed0aef8ce518840fa5", "score": "0.64922416", "text": "public function __construct(Request $request){\n $this->request = $request;\n }", "title": "" }, { "docid": "05fffed1d4757192271b4b7c2384d5c4", "score": "0.6486447", "text": "public function __construct()\n {\n $this->request = request();\n }", "title": "" }, { "docid": "a3e5aad79cf2693e538f739e7a922c0e", "score": "0.6466647", "text": "public function __construct(Request $request)\n {\n\n }", "title": "" }, { "docid": "a3e5aad79cf2693e538f739e7a922c0e", "score": "0.6466647", "text": "public function __construct(Request $request)\n {\n\n }", "title": "" }, { "docid": "8f95f0f2965fcda0ee8766b4982e9353", "score": "0.6456735", "text": "public function __construct(Request $request, Response $response, array $invokeArgs = array());", "title": "" }, { "docid": "7780c0c0bc35fb066b3004bd65a341c6", "score": "0.6454587", "text": "public function createRequest(string $method, $uri): RequestInterface;", "title": "" }, { "docid": "6e534884edb36de4318e9e228cfd329b", "score": "0.64530253", "text": "protected function makeRequest()\n {\n }", "title": "" }, { "docid": "93e93d1568576194e8840e2455701d88", "score": "0.64514464", "text": "public static function makeRequest() {\n return new \\ZincPHP\\http\\ZincHTTP;\n }", "title": "" }, { "docid": "d2087e3c9ee125159aa035213bb58b8a", "score": "0.64426434", "text": "public function __construct(Request $request)\n {\n }", "title": "" }, { "docid": "f8eb2ef77fa614bb5181239c58521fde", "score": "0.6439553", "text": "public function __construct(Request $request)\n\t{\n\t\t$this->request = $request;\n }", "title": "" }, { "docid": "3a3d4347df8060f4c3046f0972456ac3", "score": "0.64395416", "text": "public function __construct(Request $request)\n {\n $this->req = $request;\n }", "title": "" }, { "docid": "a5393671695341058c4a09802965aff5", "score": "0.6438675", "text": "public function __construct(Request $request) {\n\t\t$this->_request = $request->all();\n }", "title": "" }, { "docid": "fe60f894dd45799bb218ffc8aaa6a6d8", "score": "0.6437617", "text": "public function __construct ($request) {\n $this->setRequest($request);\n }", "title": "" }, { "docid": "5a5c50f84ee48dba1f1aef95a4167f0a", "score": "0.64353496", "text": "public function __construct(Request $request)\n\t{\n\t\t$this->request = $request;\n\t}", "title": "" }, { "docid": "5a5c50f84ee48dba1f1aef95a4167f0a", "score": "0.64353496", "text": "public function __construct(Request $request)\n\t{\n\t\t$this->request = $request;\n\t}", "title": "" }, { "docid": "e7c6615016a436f5fe5b0cf048441174", "score": "0.6430716", "text": "public function __construct (Request $request){\n }", "title": "" }, { "docid": "45b0b79a52c377cb63e5b102240f56ac", "score": "0.64198583", "text": "static public function makeRequest() {\n return new ZincHTTP;\n }", "title": "" }, { "docid": "a60dff59e5f623c42e78133398995d3e", "score": "0.6418795", "text": "public function __construct(request $request)\n {\n }", "title": "" }, { "docid": "2906cfc205610a980ccec947623dec9e", "score": "0.64038765", "text": "public function __construct\n (\n $request\n )\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "0c6205c9d8fca74c9efdb87297e8871a", "score": "0.6383749", "text": "public function __construct( $request = null )\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "1c25ee7e18d28ddc2aa25710aefff684", "score": "0.6380458", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "696cebb6422302a6b19128bda6b5628f", "score": "0.63793933", "text": "public function __construct($request = null)\n\t{\n if (! $request) {\n $request = app('request');\n }\n\n $this->setRequestAndFields($request);\n\t}", "title": "" }, { "docid": "08818df84d797cff798b915fc95bb0c8", "score": "0.6376334", "text": "public function testCreatingFromGlobalsWithOverriddenGlobalsAndRawBody()\n {\n $get = ['get' => 'foo'];\n $post = ['post' => 'foo'];\n $cookie = ['cookie' => 'foo'];\n $server = ['server' => 'foo'];\n $files = [\n [\n 'name' => 'foo.txt',\n 'type' => 'text/plain',\n 'tmp_name' => '/tmp/bar',\n 'error' => UPLOAD_ERR_OK,\n 'size' => 1024\n ]\n ];\n $env = ['env' => 'foo'];\n $rawBody = \"It's not Rocket Appliances Julian\";\n $requestFromConstructor = new Request($get, $post, $cookie, $server, $files, $env, $rawBody);\n $this->assertEquals(\n $requestFromConstructor,\n Request::createFromGlobals($get, $post, $cookie, $server, $files, $env, $rawBody)\n );\n }", "title": "" }, { "docid": "522da4d3e83a4070c68ce670f16612ef", "score": "0.6371246", "text": "private function initPrepareRequest()\n {\n if ($this->prepareRequest == null) {\n Utils::deprecation_error('Creating PaymentPrepareRequest on the fly. Consider managing it explicitely');\n\n $this->prepareRequest = new PaymentPrepareRequest();\n $this->prepareRequest->setShopper(new Shopper());\n $this->prepareRequest->getShopper()->setAccount(new Account());\n $this->prepareRequest->setShipping(new Shipping());\n $this->prepareRequest->setOrder(new Order());\n }\n }", "title": "" }, { "docid": "a604eaff94407a7e8fd487f48a533160", "score": "0.63540816", "text": "public function __construct (Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "ffbe66e2000df29e0a95c015d080d63d", "score": "0.63453573", "text": "public static function createFromRequest(ServerRequestInterface $request, array $systemConfiguration = null): self\n {\n return static::createFromServerParams(\n $request->getServerParams(),\n $systemConfiguration ?? $GLOBALS['TYPO3_CONF_VARS']['SYS']\n );\n }", "title": "" }, { "docid": "69cab1713890699c20ee1726e7b58bd7", "score": "0.634096", "text": "protected function createRequest()\n {\n $request = Str::studly(class_basename($this->argument('name')));\n\n $this->call('module:request', [\n 'name' => $request,\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "10fae02328d1512aff4f82447efa0017", "score": "0.6337773", "text": "public function __construct(Request $request) {\n $this->request = $request;\n }", "title": "" }, { "docid": "10fae02328d1512aff4f82447efa0017", "score": "0.6337773", "text": "public function __construct(Request $request) {\n $this->request = $request;\n }", "title": "" }, { "docid": "10fae02328d1512aff4f82447efa0017", "score": "0.6337773", "text": "public function __construct(Request $request) {\n $this->request = $request;\n }", "title": "" }, { "docid": "10fae02328d1512aff4f82447efa0017", "score": "0.6337773", "text": "public function __construct(Request $request) {\n $this->request = $request;\n }", "title": "" }, { "docid": "10fae02328d1512aff4f82447efa0017", "score": "0.6337773", "text": "public function __construct(Request $request) {\n $this->request = $request;\n }", "title": "" }, { "docid": "7006c00f4a455c8b895f6d4ce62164bb", "score": "0.63363224", "text": "public function __construct($request = false)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "dceb9d77b734cf085e1f776d30e15227", "score": "0.6328802", "text": "private function createRequest()\n {\n $headers = [];\n\n if (!is_null($this->options->appID)) {\n $headers['upsub-app-id'] = $this->options->appID;\n }\n\n if (!is_null($this->options->secret)) {\n $headers['upsub-secret'] = $this->options->secret;\n }\n\n if (!is_null($this->options->name)) {\n $headers['upsub-connection-name'] = $this->options->name;\n }\n\n $request = new $this->options->dependencies->Curl;\n $request->setTimeout = $this->options->timeout;\n $request->setHeaders($headers);\n\n return $request;\n }", "title": "" }, { "docid": "7a030bfe94c1cf55fb519b72752c340d", "score": "0.63261604", "text": "public function __construct($request)\n {\n parent::__construct($request);\n $this->input = $request;\n }", "title": "" }, { "docid": "2059fbcf57763b4c3294af518d479ed7", "score": "0.6325923", "text": "public function __construct(Request $request)\n {\n $this->request=$request;\n }", "title": "" }, { "docid": "fb3d4ae3e499eba0fa92e476964967b8", "score": "0.6323269", "text": "private function createRequest()\n {\n $request = new stdClass;\n\n // Add merchant id\n $request->merchantID = $this->getMerchantId();\n\n // Add merchant reference code\n $request->merchantReferenceCode = $this->getMerchantReferenceCode();\n\n // Add merchant defined data fields\n $dataFields = $this->getDataFields();\n if (!empty($dataFields)) {\n $request->merchantDefinedData = new stdClass;\n $request->merchantDefinedData->mddField = [];\n foreach ($dataFields as $key => $value) {\n $dataField = new stdClass;\n $dataField->id = $key;\n $dataField->_ = $value;\n array_push($request->merchantDefinedData->mddField, $dataField);\n }\n }\n\n // Add client information\n $request->clientLibrary = 'CyberSourceClient';\n $request->clientLibraryVersion = '1';\n $request->clientEnvironment = php_uname();\n\n return $request;\n }", "title": "" }, { "docid": "e82b1f7b37219d56d24d280c16d54e2b", "score": "0.63204426", "text": "public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) { \r\n $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != \"on\") \r\n ? 'http' \r\n : 'https'; \r\n @$http_url or $http_url = $scheme . \r\n '://' . $_SERVER['HTTP_HOST'] . \r\n ':' . \r\n $_SERVER['SERVER_PORT'] . \r\n $_SERVER['REQUEST_URI']; \r\n @$http_method or $http_method = $_SERVER['REQUEST_METHOD']; \r\n\r\n // We weren't handed any parameters, so let's find the ones relevant to \r\n // this request. \r\n // If you run XML-RPC or similar you should use this to provide your own \r\n // parsed parameter-list \r\n if (!$parameters) { \r\n // Find request headers \r\n $request_headers = OAuthUtil::get_headers(); \r\n\r\n // Parse the query-string to find GET parameters \r\n $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']); \r\n\r\n // It's a POST request of the proper content-type, so parse POST \r\n // parameters and add those overriding any duplicates from GET \r\n if ($http_method == \"POST\" \r\n && @strstr($request_headers[\"Content-Type\"], \r\n \"application/x-www-form-urlencoded\") \r\n ) { \r\n\t\t\t\t$cxContext = stream_context_create();\r\n\t\t\t\t$post_data = OAuthUtil::parse_parameters( \r\n file_get_contents(self::$POST_INPUT, False, $cxContext) \r\n ); \r\n $parameters = array_merge($parameters, $post_data); \r\n } \r\n\r\n // We have a Authorization-header with OAuth data. Parse the header \r\n // and add those overriding any duplicates from GET or POST \r\n if (@substr($request_headers['Authorization'], 0, 6) == \"OAuth \") { \r\n $header_parameters = OAuthUtil::split_header( \r\n $request_headers['Authorization'] \r\n ); \r\n $parameters = array_merge($parameters, $header_parameters); \r\n } \r\n\r\n } \r\n\r\n return new OAuthRequest($http_method, $http_url, $parameters); \r\n }", "title": "" }, { "docid": "1f35ac9a862047faf8da1922d22ebf70", "score": "0.6315333", "text": "public function getRequestInstance() {\n\t\tif($this->requestInstance !== null)\n\t\t\treturn $this->requestInstance;\n\n\t\t$request = new Request();\n\t\t$request->setPath($_SERVER['REQUEST_URI']);\n\t\t$request->setMethod($_SERVER['REQUEST_METHOD']);\n\n\t\t$this->requestInstance = $request;\n\n\t\treturn $this->requestInstance;\n\t}", "title": "" }, { "docid": "7388af5232a09f2bcd29b642bc322ed9", "score": "0.6296145", "text": "public function createRequest(string $method, string|UriInterface $uri = 'GET', array $headers = [], string|StreamInterface|null $body = null, string $version = '1.1'): RequestInterface\n {\n return new Request(method: $method, uri: $uri, headers: $headers, body: $body, version: $version);\n }", "title": "" }, { "docid": "3316cd7d644ffd1e480f69cdc5299ea0", "score": "0.6294448", "text": "public function getRequestFactory()\n\t{\n\t\treturn $this->request_factory;\n\t}", "title": "" }, { "docid": "d60fe468653151334a724f5a6f3f8566", "score": "0.62865776", "text": "public static function getRequest() : \\codename\\core\\request {\r\n if(!(static::$instances['request'] ?? false)) {\r\n $classname = \"\\\\codename\\\\core\\\\request\\\\\" . self::getRequesttype();\r\n static::$instances['request'] = new $classname();\r\n }\r\n return static::$instances['request'];\r\n }", "title": "" }, { "docid": "b6bd9e071c259b105b53dfd36b0f2ad2", "score": "0.6283252", "text": "public function __construct(Request $request)\n {\n $this->http_codes = $this->http_status_codes();\n\n // Init security library object\n $this->securityLibObj = new SecurityLib(); \n\n // Init LaboratoryTests Model Object\n $this->laboratoryTestsObj = new LaboratoryTests();\n\n // Init exception library object\n $this->exceptionLibObj = new ExceptionLib();\n\n // Init exception library object\n $this->dateTimeLibObj = new DateTimeLib(); \n\n // Init exception library object\n $this->utilityLibObj = new UtilityLib(); \n\n }", "title": "" }, { "docid": "6927538be80abd4906079ae81aeeaef0", "score": "0.6276118", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "f53a70a83548c53e3f4e041be039a60b", "score": "0.6275897", "text": "public function __construct(Request $request)\n\t{\n\t\t$this->request = $request;\n\n\t\t$this->query=$request->get(\"query\");\n\t}", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" }, { "docid": "4adc8cb28ac1cc39ff301b128eaabe9c", "score": "0.62747574", "text": "public function __construct(Request $request)\n {\n $this->request = $request;\n }", "title": "" } ]
b5a77778e22f92b13445fe8f67c2e6fc
API connection to auth user
[ { "docid": "45773ed505673ff7b09e852c7a403d89", "score": "0.0", "text": "static public function login ($login, $password)\n {\n $client = new GuzzleHttp\\Client();\n try {\n $res = $client->request('GET', 'http://azurix.pl:8080/auth/login?login='.$login.'&password='.$password);\n $res = json_decode($res->getBody(), true);\n if ($res['id'] > 0) {\n // User with this login && password exist\n // Create session with user credentials\n Session::put([\n 'logged_in' => true,\n 'id' => $res['id'],\n 'login' => $res['login'],\n 'authLvl' => $res['authLvl'],\n ]);\n return 200;\n } else {\n // Bad credentials login/pass\n return 401;\n }\n } catch (GuzzleHttp\\Exception\\GuzzleException $e) {\n // No API response\n return 404;\n }\n\n }", "title": "" } ]
[ { "docid": "8548487f839db074c0f0dbacc42ece16", "score": "0.7145298", "text": "public function uac_auth();", "title": "" }, { "docid": "6e0839786002e752f18d1e46b92966b1", "score": "0.70697796", "text": "abstract public function auth();", "title": "" }, { "docid": "58d5f047436df76461cbdb6a8f90eab9", "score": "0.6880724", "text": "private function authenticate() {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$this->user->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n $this->outputJSON($response, 200);\n exit;\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $this->user->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n $this->outputJSON($response, 200);\n exit;\n }\n }", "title": "" }, { "docid": "b6ab2b143977d4bf1d009f7d2834194b", "score": "0.6773884", "text": "public function __construct()\n {\n $this->user_api = auth('api')->user();\n }", "title": "" }, { "docid": "9338df6dc1ee02cd3db4c2ce96552d0c", "score": "0.67528576", "text": "public function doAuth(){\n \t}", "title": "" }, { "docid": "8c6b3be8ca3ab91875079d09ef4e61dc", "score": "0.66964775", "text": "function authGet()\n{\n}", "title": "" }, { "docid": "8c6b3be8ca3ab91875079d09ef4e61dc", "score": "0.66964775", "text": "function authGet()\n{\n}", "title": "" }, { "docid": "d5b9cc666adcec06981e4ba298fb1c7f", "score": "0.6685737", "text": "public function auth()\n\t{\n\t\t$response = array( 'result' => 1 );\n\t\treturn $this->outputJSON( $response );\n\t}", "title": "" }, { "docid": "2baf0bac66b40236af0a9a94695c31d6", "score": "0.6592894", "text": "function api_method($access) {\n if (!$access->isValid) {\n Access::error(100, \"Authentication required\");\n }\n if (!isset($_GET['user_id'])) {\n Access::error(2, 'Required parameter user_id missing');\n }\n $user_id = $_GET['user_id'];\n $user = Database::get()->querySingle('SELECT id, username, expires_at > NOW() FROM user\n WHERE id = ?d', $user_id);\n if (!$user) {\n Access::error(3, \"User with id '$user_id' not found\");\n }\n $login_url = $GLOBALS['urlServer'] . 'modules/auth/sso.php?user=' . urlencode($user->username) .\n '&token=' . token_generate(\"login user={$user->username}\", true);\n header('Content-Type: application/json');\n echo json_encode(['url' => $login_url], JSON_UNESCAPED_UNICODE);\n exit();\n}", "title": "" }, { "docid": "b5948c3f023c3f1fd626354a69fc7ea3", "score": "0.65861106", "text": "public function auth()\n {\n $this->auth_url = $this->system->auth_url.'?'.http_build_query([\n 'client_id' => $this->system->client_id,\n 'redirect_uri' => $this->system->redirect_uri,\n 'response_type' => 'code',\n 'scope' => '',\n 'access_type' => '',\n //'principal' => '[email protected]',\n //'entitlement' => 'dsv-user:gdpr',\n ]);\n\n // Redirect to authorization endpoint\n header('Location: '.$this->auth_url);\n\n exit;\n }", "title": "" }, { "docid": "2dd917c1468354190273730de078baa7", "score": "0.65811944", "text": "public function auth()\n\t{\n\t\tRequest::auth( $this->settings->account_management_key, '' );\n\t}", "title": "" }, { "docid": "f817bb9ebb0dc9ed179bd5c424bcdec0", "score": "0.65229106", "text": "private function authenticate() { if (!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendErrorResponse(401, \"Unauthorized\");\n }\n\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n\n $identity = new UserIdentity($username, $password);\n if (!$identity->authenticate()) {\n $this->_sendErrorResponse(401, $this->_authenticateErrorCode($identity->errorCode));\n } else {\n $this->_sendResponse(200, CJSON::encode(array(\"success\" => true, \"account-id\" => $identity->id, \"account-name\" => $identity->name)));\n }\n }", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.64966214", "text": "public function authenticate();", "title": "" }, { "docid": "b1ef42a93c75c36b58fe87bd1ab1cd9f", "score": "0.64851326", "text": "private function makeSimpleAuth()\n {\n\n }", "title": "" }, { "docid": "31c6c4c54410083e49dc93d15eff10a5", "score": "0.6448379", "text": "public function globalAuth() {\n }", "title": "" }, { "docid": "6988885528284abc353dd4309d2c22b2", "score": "0.64353466", "text": "private function authAcc()\n {\n $oauth = new OAuth(null, false);\n $oauth->setOAuthdUrl('http://vjf-dev.cis.fiu.edu:6284', $base='/auth');\n $oauth->initialize('8boH6TCiWWz3GAUDAN6jXtZ1Hg4', '1VWCLveBtnwmIqhM_SJZvjxmjDs');\n $oauth->redirect('fiu', '/SeniorPortal/index.php/Site/GetResult');\n }", "title": "" }, { "docid": "e144e7fece84eadc3b60ad9f9c598445", "score": "0.6417937", "text": "private function authenticateUser(): void\n {\n $loginData = [\n 'user' => $this->rocketChatUser,\n 'password' => $this->rocketChatPassword,\n ];\n\n $response = $this->getClient()->request(\n 'POST',\n 'login',\n [\n 'body' => json_encode($loginData),\n ]\n );\n\n if ($response->getStatusCode() !== self::HTTP_OK) {\n $this->output->writeln('Could\\'nt establish connection, please check your credentials');\n } else {\n $responseBody = (array)json_decode($response->getBody()->getContents(), true);\n\n $this->userId = $responseBody['data']['userId'];\n $this->authToken = $responseBody['data']['authToken'];\n }\n }", "title": "" }, { "docid": "20c9ce29048a33a15c52245958d20d07", "score": "0.6361452", "text": "function authenticate() {\r\n\t// Getting request headers\r\n\t$headers = apache_request_headers ();\r\n\t$response = array ();\r\n\t$app = \\Slim\\Slim::getInstance ();\r\n\t\r\n\t// Verifying Authorization Header\r\n\tif (isset ( $headers ['Authorization'] )) {\r\n\t\t\r\n\t\t// get the api key\r\n\t\t$api_key = $headers ['Authorization'];\r\n\t\t// validating api key\r\n\t\tif ($api_key != API_KEY) {\r\n\t\t\t// api key is not present in users table\r\n\t\t\t$response [\"error\"] = true;\r\n\t\t\t$response [\"message\"] = \"Access Denied. Invalid Api key\";\r\n\t\t\techoRespnse ( 401, $response );\r\n\t\t\t$app->stop ();\r\n\t\t}\r\n\t} else {\r\n\t\t// api key is missing in header\r\n\t\t$response [\"error\"] = true;\r\n\t\t$response [\"message\"] = \"Api key is misssing\";\r\n\t\techoRespnse ( 400, $response );\r\n\t\t$app->stop ();\r\n\t}\r\n}", "title": "" }, { "docid": "82db7957d6b789b7e18ab54f46b1d4fb", "score": "0.6326811", "text": "function authenticate() {\n\t\t$this->validate_required_params('username', 'password');\n\t\t\n\t\t$authenticate_dao = $this->dao_factory->get_users_dao();\n\t\t$user = $authenticate_dao->get_user($this->request->params);\n\t\t\n\t\tif ($user == false) {\n\t\t\t$this->response->send_error('401', \"Invalid user credentials\");\n\t\t}\n\t\t\n\t\tif ($authenticate_dao->validate_password($user, $this->request->params['password'])) {\n\t\t\t$session_id = $this->authentication->create_session_id($user);\n\t\t\t\n\t\t\t$this->response->send_json(array(\n\t\t\t\t\t'user' => array(\n\t\t\t\t\t\t'id' => $user->ID\n\t\t\t\t\t),\n\t\t\t\t\t'session_id' => $session_id\n\t\t\t\t));\n\t\t} else {\n\t\t\t$this->response->send_error('401', \"Invalid user credentials\");\n\t\t}\n\t}", "title": "" }, { "docid": "7b6ad89d82265217dc4636d16f57a8f6", "score": "0.6325638", "text": "public function auth()\n {\n $curl = curl_init();\n $headers = array(\n \"POST HTTP/1.0\",\n \"Content-type: application/json\"\n );\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_HEADER, 1);\n curl_setopt($curl, CURLOPT_URL, $this->configuration['UrlLogin']);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n curl_setopt($curl, CURLOPT_COOKIEJAR, $this->pathToCookieFile);\n\n curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode(array(\n 'UserName' => $this->configuration['Login'],\n 'UserPassword' => $this->configuration['Password'],\n 'SolutionName' => 'TSBpm',\n 'TimeZoneOffset' => '-120',\n 'Language' => 'Ru-ru')));\n\n $response = curl_exec($curl);\n curl_close($curl);\n ob_clean();\n\n return $response;\n }", "title": "" }, { "docid": "cddeaa03493138b1c131f064d5d7fe76", "score": "0.63167244", "text": "public function authenticateUser()\n {\r\n \treturn $this->fetchResponse('users/authenticate_user', 'GET', \n \t\t\tarray('o' => $this->responseFormat,));\n }", "title": "" }, { "docid": "89979d4c13c526d4ca56592db73c00d1", "score": "0.631606", "text": "public function apiConnect(){\n\t\t\t \n\t\t\t$this->link = curl_init();\n\t\t\tcurl_setopt($this->link, CURLOPT_URL, $this->apiurl_base . $this->login_url);\n\t\t\tcurl_setopt($this->link, CURLOPT_HEADER, true);\n\t\t\tcurl_setopt($this->link, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($this->link, CURLOPT_POST, 1);\n\t\t\tcurl_setopt($this->link, CURLOPT_POSTFIELDS, \"user={$this->username}&pass={$this->password}\");\n\t\t\t\n\t\t\t$response = curl_exec($this->link);\n\t\t\t$err = curl_errno($this->link);\n\t\t\t$errmsg = curl_error($this->link);\n\t\t\t$header = curl_getinfo($this->link);\n\t\t\t\n\t\t\t$header_size = $header['header_size'];\n\t\t\t$content_length = $header['download_content_length'];\n\t\t\t$header = substr($response, 0, $header_size);\n\t\t\t$body = substr($response, $header_size, $content_length);\n\t\t\tlist($v1,$v2,$v3,$v4) = explode(':',$response);\n\t\t\t$this->cookie = $v4;\n\t\t\t$this->apiSetCookie($v4);\n\t\t\treturn json_decode($body);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "f2c2f0ad2670970be939ab23e8ccfc49", "score": "0.63036805", "text": "public function auth( IRequestInfo $requestInfo );", "title": "" }, { "docid": "04fdcf25d31f852b183b8d43d79f742b", "score": "0.62993395", "text": "public function auth($system_id, $userInput);", "title": "" }, { "docid": "6233462f6454a6a6d463e51dacb7671b", "score": "0.62973094", "text": "private function authenticate() {\n\t\t// define http basic authentication hash\n\t\t$url\t\t= sprintf(\"%s/%s/authenticate\",$this->url,$this->endPoint);\n\t\t$headers\t= array(sprintf(\"Authorization: Basic %s==\",base64_encode(sprintf(\"%s:%s\",$this->username,$this->password))));\n\t\t$postFields\t= array('deviceID' => $this->getDeviceID());\n\n\t\t// perform authenticate call\n\t\t$curl\t= curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $postFields);\n\t\tcurl_setopt($curl, CURLOPT_USERAGENT, sprintf(\"GSCF-PHPClient version %s\",$this->version));\n\n\t\t// fetch result\n\t\t$json\t= curl_exec($curl);\n\n\t\t// check status code\n\t\t$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n\t\t// close curl\n\t\tcurl_close($curl);\n\n\t\t// check result\n\t\tif ($status == 401) {\n\t\t\tthrow new Exception(sprintf(\"password for user '%s' is invalid (%s) or user is not authorized to use the api at %s (has ROLE_CLIENT been assigned to the user?\",$this->username,str_repeat(\"*\",strlen($this->password)),$this->url));\n\t\t} elseif ($status == 404) {\n\t\t\tthrow new Exception(sprintf(\"the server appears to be down at %s\",$this->url));\n\t\t} elseif ($status == 409) {\n\t\t\t// decode json\n\t\t\t$obj\t= json_decode($json);\n\t\t\tthrow new Exception(sprintf(\"%s\",$obj->{'error'}));\n\t\t} elseif ($status <> 200) {\n\t\t\tthrow new Exception(sprintf(\"server replied with an unexpected status code %d\",$status));\n\t\t} else {\n\t\t\t// decode json\n\t\t\t$obj\t= json_decode($json);\n\n\t\t\t// store token and sequence locally\n\t\t\t$this->token\t= $obj->{'token'};\n\t\t\t$this->sequence\t= $obj->{'sequence'};\n\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "adc30df01f129dbbffa334b2bd2d2080", "score": "0.6283475", "text": "public function requestAuth() {\n $authUrl = $this->provider->getAuthorizationUrl();\n\n $this->server->clear();\n $this->server->redirect($authUrl);\n $this->server->end();\n }", "title": "" }, { "docid": "5743b7f11efb61c638f41d3c8e879e05", "score": "0.6278163", "text": "abstract public function authenticate();", "title": "" }, { "docid": "4374c7240c6a63af474ceec4b7fc708e", "score": "0.627621", "text": "function authAPI($login, $mdp) {\r\n // initialiser le client URL\r\n $unCurl = initCurl(LOGIN);\r\n // Préciser le Content-Type\r\n curl_setopt($unCurl,CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\r\n // Préciser le type de requête HTTP : POST\r\n curl_setopt($unCurl, CURLOPT_POST, true);\r\n // créer le tableau des données à envoyer par POST\r\n $champsPost = array(\r\n '_username' => $login,\r\n '_password' => $mdp\r\n );\r\n // Créer la chaine url encodée selon la RFC1738 à partir du tableau de paramètres séparés par le caractère &\r\n $trame = http_build_query($champsPost, '', '&');\r\n // Ajouter les paramètres\r\n curl_setopt($unCurl, CURLOPT_POSTFIELDS, $trame);\r\n // Envoyer la requête\r\n $reponse = curl_exec($unCurl);\r\n // convertir la chaîne encodée JSON en une variable PHP\r\n $retour = json_decode($reponse, false);\r\n // récupérer le status\r\n $resultStatus = curl_getinfo($unCurl);\r\n // vérifier si le jeton a été obtenu\r\n if ($resultStatus['http_code'] == 200) {\r\n // dans ce cas le retour est un objet qui expose la propriété token\r\n $laReponse = (object) [\r\n 'code' => $resultStatus['http_code'],\r\n 'token' => $retour->token ];\r\n } \r\n else {\r\n // dans ce cas le retour est un objet qui expose les propriétés code et message\r\n $laReponse = $retour;\r\n }\r\n // fermer la session\r\n curl_close($unCurl);\r\n // retourner la réponse\r\n return $laReponse;\r\n}", "title": "" }, { "docid": "0ce6ef2f8bbc50734fdbeb883749e8ce", "score": "0.627228", "text": "public function auth(){\n $user = User::factory()->create();\n \n $data = [\n 'email'=>$user->email,\n 'password'=>'password'\n ];\n \n $response = $this->json('POST','/api/token', $data, [])\n ->assertJsonStructure([\n 'token'\n ]);\n\n return [\n 'token'=>$response['token'],\n 'user_id'=>$user->id\n ];\n }", "title": "" }, { "docid": "52fb8f6dc1838ef345cb9dcc71156b28", "score": "0.6269615", "text": "public function authendicate(){\n\t\t$this->api->add_to_response('status',true);\n\t\t$this->api->send_200_response();\n\t}", "title": "" }, { "docid": "6a61c32ae38bfa5c1e2d9f1867db870f", "score": "0.62680113", "text": "public function me ()\n {\n return response ()->json (auth ('api')->user ());\n }", "title": "" }, { "docid": "ad11fd2e79c04a94ab83f7143b5d10b1", "score": "0.62652975", "text": "function route_user_auth() {\n // https://yourdomain.com/wp-json/me-auth-example/user/auth\n register_rest_route( $this->api_namespace, '/user/auth', array(\n 'methods' => WP_REST_Server::CREATABLE,\n 'args' => array(\n 'email' => array(\n 'type' => 'string',\n 'required' => true,\n 'default' => ''\n ),\n 'password' => array(\n 'type' => 'string',\n 'required' => true,\n 'default' => ''\n )\n ),\n 'permission_callback' => function() { return true; },\n 'callback' => function( $request ) {\n $email = $request->get_param( 'email' );\n $password = $request->get_param( 'password' );\n\n // user validation\n if ( empty( $email ) || ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {\n return new WP_Error( 'user_auth', 'Invalid email.', array( 'status' => 400 ) );\n }\n if ( empty( $password ) ) {\n return new WP_Error( 'user_auth', 'Invalid password.', array( 'status' => 400 ) );\n }\n\n // find user in database\n global $wpdb;\n $hash_pass = md5( $password );\n $find_user = $wpdb->get_results(\n \"SELECT user_id, fullname FROM {$wpdb->prefix}me_auth_example_users WHERE email = '{$email}' AND password = '{$hash_pass}'\"\n );\n if ( $wpdb->last_error != '' ) {\n return new WP_Error( 'user_auth', 'Failed to find user.', array( 'status' => 400 ) );\n }\n if ( empty( $find_user ) ) {\n return new WP_Error( 'user_auth', 'Invalid email/password.', array( 'status' => 400 ) );\n }\n\n // create token\n $generated_token = $this->generate_token( array(\n 'uid' => md5( $find_user[0]->user_id ),\n 'sub' => $find_user[0]->user_id,\n 'iss' => $email,\n 'name' => $find_user[0]->fullname\n ) );\n\n // return response\n return rest_ensure_response( $generated_token );\n }\n ) );\n }", "title": "" }, { "docid": "9f91d6b8c8d48632b93d9165e7c605fd", "score": "0.6256792", "text": "public function auth() {\n try {\n $user = $this->authenticate();\n } catch (IncorrectCredentialsException $e) {\n $user = false;\n }\n $this->set(array(\n 'user' => $user,\n '_serialize' => array('user')\n ));\n }", "title": "" }, { "docid": "502ed3dc2006b486fb07b1008431a257", "score": "0.6251037", "text": "public function connect(Request $request)\n\t{\n\t\tif (!empty($user = User::where('email', $request->email)->with('userType')->first()))\n\t\t{\n\t\t\tif ($user->status != 'ACTIVE')\n\t\t\t\tabort(400, \"Compte inactif ou invalide.\");\n\n\t\t\tif (Auth::check())\n\t\t\t\tAuth::logout();\n\n\t\t\tif (Hash::check($request->password, $user->password) || $request->api)\n\t\t\t{\n\t\t\t\t$oauth_client = DB::table('oauth_clients')->select('id', 'secret', 'name')->where('name', \"Bobby\")->first();\n\t\t\t\t//recherche d'information d'ancien token genere.\n\t\t\t\t$oauth_access = DB::table('oauth_access_tokens')->select('id', 'user_id', 'expires_at')->where([\n\t\t\t\t\t'user_id' => $user->id,\n\t\t\t\t\t'revoked' => 0\n\t\t\t\t])->first();\n\n\t\t\t\tif (empty($oauth_access))\n\t\t\t\t{\n\t\t\t\t\t$http = new guzzleClient();\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (!$request->api)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Recuperation du token de session par une connection classique.\n\t\t\t\t\t\t\t$response = $http->post(url('/oauth/token'), [\n\t\t\t\t\t\t\t\t'form_params' => [\n\t\t\t\t\t\t\t\t\t'grant_type' => 'password',\n\t\t\t\t\t\t\t\t\t'client_id' => $oauth_client->id,\n\t\t\t\t\t\t\t\t\t'client_secret' => (string)$oauth_client->secret,\n\t\t\t\t\t\t\t\t\t'username' => (string)$user->email,\n\t\t\t\t\t\t\t\t\t'password' => (string)$request->password,\n\t\t\t\t\t\t\t\t\t'scope' => ''\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t\t$user->refresh_token = json_decode((string)$response->getBody(), true)['refresh_token'];\n\t\t\t\t\t\t\t$user->api_token = json_decode((string)$response->getBody(), true)['access_token'];\n\t\t\t\t\t\t\t$user->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tokenStr = $user->createToken('Api connect')->accessToken;\n\t\t\t\t\t\t\t$user->api_token = $tokenStr;\n\t\t\t\t\t\t\t$user->save();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClientException $e) { abort(400, \"Creation de votre token d'acces impossible:(\" . $e->getResponse()->getBody() . ')'); }\n\t\t\t\t}\n\t\t\t\t//Mise a jour du token a la reconnection si token plus valid\n\t\t\t\telse if (!empty($oauth_access) && Carbon::parse($oauth_access->expires_at)->diff(Carbon::now())->d <= 1)\n\t\t\t\t{\n\t\t\t\t\t$http = new guzzleClient();\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$response = $http->post(url('/oauth/token'), [\n\t\t\t\t\t\t\t'form_params' => [\n\t\t\t\t\t\t\t\t'grant_type' => 'refresh_token',\n\t\t\t\t\t\t\t\t'refresh_token' => (string)$user->refresh_token,\n\t\t\t\t\t\t\t\t'client_id' => $oauth_client->id,\n\t\t\t\t\t\t\t\t'client_secret' => (string)$oauth_client->secret,\n\t\t\t\t\t\t\t\t'scope' => ''\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t]);\n\t\t\t\t\t\t$user->refresh_token = json_decode((string)$response->getBody(), true)['refresh_token'];\n\t\t\t\t\t\t$user->api_token = json_decode((string)$response->getBody(), true)['access_token'];\n\t\t\t\t\t\t$user->save();\n\t\t\t\t\t} catch (ClientException $e) { abort(400, \"Rafraichissement de votre token d'acces impossible\"); }\n\t\t\t\t}\n\t\t\t\tCookie::forget('API-TOKEN');\n\t\t\t\tsetcookie('API-TOKEN', $user->api_token);\n\t\t\t\tAuth::login($user, true);\n\n\t\t\t\tabort(200, $user->api_token);\n\t\t\t}\n\t\t}\n\t\tabort(400, \"E-mail ou mot de passe invalide.\");\n\t}", "title": "" }, { "docid": "93555bd133e07a14d909a9a60625c59d", "score": "0.6248168", "text": "public function doAuth(){\t\n \n \n \n\t\t\t\t\n\t\tif( @$this->req['_user_'] != \"\" && $this->req['_key_'] != \"\" ){ \n \n if( @$this->req['_admin_'] == true ){\n \n if( @$this->req['_user_'] == \"demo\" && @$this->req['_key_'] == \"demo\" ){\n \n return json_encode( array(\"response\"=>\"SUCCESS\", \"data\"=>array(\"message\"=>\"Success! <br> Loging you in!\", \"command\"=>\"\" ) ) ); \n \n }else{\n \n return json_encode( array(\"response\"=>\"ERROR\", \"data\"=>array(\"message\"=>\"Oops! <br> Please make sure you are using the correct credentials! \", \"command\"=>\"\" ) ) );\n \n }\n \n }\n\t\t\n\t\t\t$isUser = $this->connection->num_rows(\"SELECT * FROM users WHERE ( _key_ = '\".$this->sanitize( $this->crypto->makePass($this->req['_key_']) ).\"' AND _user_ = '\".$this->sanitize( $this->req['_user_'] ).\"' ) OR ( _index_ = '\".$this->sanitize( $this->req['_user_'] ).\"' AND _key_ = '\".$this->sanitize( $this->crypto->makePass($this->req['_key_']) ).\"' ) \");\n\t\t\t\t\t\t\n\t\t\tif($isUser == 1):\n\t\t\t\t$_SESSION['login45'] = @$this->sanitize($this->req['_user_']);\n\t\t\t\tif( $_SESSION['login45'] ):\n\t\t\t\t\treturn json_encode( array(\"response\"=>\"SUCCESS\", \"data\"=>array(\"message\"=>\"Success! <br> Loging you in!\", \"command\"=>\"\" ) ) );\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\treturn json_encode( array(\"response\"=>\"ERROR\", \"data\"=>array(\"message\"=>\"Login Failed! <br> Username or Password is incorrect <br> Please make sure that you are registered for this service\", \"command\"=>\"\" ) ) );\n\t\t\tendif;\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\treturn json_encode( array(\"response\"=>\"ERROR\", \"data\"=>array(\"message\"=>\"Error. <br> Incomplete set of credentials supplied.\", \"command\"=>\"\" ) ) );\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "4a1382e1cd52a66765967882103b01ce", "score": "0.6234799", "text": "public function __construct()\r\n {\r\n header(\"Expires: Sat, 07 Apr 1979 05:00:00 GMT\");\r\n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\r\n header(\"Cache-Control: no-store, no-cache, must-revalidate\");\r\n header(\"Cache-Control: post-check=0, pre-check=0\", false);\r\n header(\"Pragma: no-cache\");\r\n header('Content-Type: application/json');\r\n \r\n // make sure request contains the user security identifier \r\n if(!isset($_POST['sid']))\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Missing SID. Please request an API user account.\"),\"400 Bad Request\"); \r\n }\r\n \r\n // make sure some data was passed in\r\n if(!isset($_POST['payload']) || trim($_POST['payload']) == \"\")\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Missing payload. Request does not include any information.\"),\"400 Bad Request\"); \r\n }\r\n \r\n // make sure the request is signed\r\n if(!isset($_POST['signature']))\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Unsigned Request. Please include Hashed Message Authentication Code.\"),\"403 Forbidden\"); \r\n }\r\n \r\n // look up user (do this on every request incase account status has changed)\r\n $this->user = ORM::for_table('api_accounts')->where('sid',$_POST['sid'])->find_one();\r\n if(!$this->user)\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Invalid SID. The given value does not belong to a known user.\"),\"403 Forbidden\"); \r\n }\r\n \r\n // if user has white-listed an IP address (or addresses), make sure they are using it.\r\n if($this->user->valid_ip_list != \"\")\r\n {\r\n $ips = explode(\",\", $this->user->valid_ip_list);\r\n if(!in_array($_SERVER['REMOTE_ADDR'], $ips))\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Requesting IP address not assoicated with given user.\"),\"403 Forbidden\"); \r\n }\r\n }\r\n \r\n // make sure user's account has access to the API\r\n if($this->user->active != 1)\r\n {\r\n $this->reply(array(\"ERROR\"=>\"This user is not currently authorized to access the API.\"),\"403 Forbidden\"); \r\n }\r\n\r\n // check that the signature matches the user\r\n $this->users_key = decrypt($this->user->api_key);\r\n $expected = base64_encode(hash_hmac(hash_algo, print_r($_POST['payload'],true), $this->users_key ));\r\n \r\n if($_POST['signature'] !== $expected)\r\n {\r\n $this->reply(array(\"ERROR\"=>\"Invalid HMAC signature. Please refer to documentation for proper hashing method.\"),\"403 Forbidden\"); \r\n }\r\n \r\n $_POST['payload'] = json_decode($_POST['payload'],true); // (parm 2 = \"true\" to keep it an assoc array)\r\n\t}", "title": "" }, { "docid": "545788d85806f5e6d5d59bc5ca2ebbea", "score": "0.62345624", "text": "public function me()\n {\n\n return response()->json(auth('api')->user());//(1)\n }", "title": "" }, { "docid": "e32c628e6d1e12bda62cc70dc9f625c1", "score": "0.62324345", "text": "function require_auth($ulti, $app, $appuser) {\n\t$path = \"/auth/request\";\n\t$data = \"application=\" . $app . \"&user=\" . $appuser;\n\t\n\t$json = post($ulti, $path, $data);\n\nprint_r($json);\t\n\t$id = json_decode($json)->{'id'};\n\t$key = json_decode($json)->{'key'};\n\treturn array ( $id, $key );\n}", "title": "" }, { "docid": "a1b6a5da8df5c8794ee65cf7e7922522", "score": "0.6217836", "text": "public function auth()\n {\n global $db;\n if(isset($this->s_username) && isset($this->s_password) )\n {\n $s_query = \"SELECT `p_id`, `p_password` FROM `permissions` WHERE `p_username` = '\".addslashes($this->s_username).\"'\";\n $h_sqlres = $db->fetchAssoc($s_query);\n if(isset($h_sqlres['data'][0]['p_password']) && $this->s_password === $h_sqlres['data'][0]['p_password'])\n {\n $this->b_auth = true;\n $this->i_id = $h_sqlres['data'][0]['p_id'];\n }\n else\n $obj_response = new \\utility\\responseController(array(\"Error\" => \"Authentication failed\"), 405);\n }\n else\n $obj_response = new \\utility\\responseController(array(\"Error\" => \"Incomplete Request\"), 405);\n }", "title": "" }, { "docid": "d29361191adcfc8ea8288237b3a996c4", "score": "0.6211453", "text": "public function __construct() {\n\t\t\t$api = new Concur_Authentication();\n\t\t\t$api->create_authenticationtoken();\n\t\t\t\n\t\t\tif ($api->response['server']['error']) {\n\t\t\t\techo json_encode($api->response);\n\t\t\t\texit;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0baf275cf720ad578bcd0275c97bd4f9", "score": "0.6198874", "text": "private function doLogin() {\n $this->client = new Client($this->url);\n $this->cookiePlugin = new CookiePlugin(new ArrayCookieJar());\n $this->client->addSubscriber($this->cookiePlugin);\n $this->post($this->services.\"/user/login.json\", array(\"Accept\" => \"application/json\"), array(\n \"username\" => $this->username,\n \"password\" => $this->password\n ), \"json\"\n );\n }", "title": "" }, { "docid": "51d1fd2921bb03f5b52c262c40032935", "score": "0.61926365", "text": "public function getCurrentlyAuthenticatedUser()\n {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/api/self';\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Authorization' => sprintf('Bearer %1$s', Configuration::$oAuthAccessToken)\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::get($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n return $response->body;\n }", "title": "" }, { "docid": "e0399757f28dde8edf82ed4364e12af8", "score": "0.61834955", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $operationalUserManagement = new OperationalUserManagement();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$operationalUserManagement->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $currunt_user_id;\n // get user primary key id\n $currunt_user_id = $operationalUserManagement->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "bcc9c7a1d0c399eb0b2ad08a717ea071", "score": "0.61663353", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $operationalUserManagement = new OperationalUserManagement();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$operationalUserManagement->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $currunt_user_id;\n // get user primary key id\n $currunt_user_id = $operationalUserManagement->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.6135014", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.6135014", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.6135014", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.6135014", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.6135014", "text": "public function getUser();", "title": "" }, { "docid": "f196a8ce4ef28cf48cd06568a1915975", "score": "0.61310107", "text": "function auth_get () {\n\t\t\n\t\tif(!$this->get('sid') && !$this->get('token')) $this->response(NULL, 400);\n\t\t\n\t\tif ($this->get('sid')) $this->db->where('sid',$this->get('sid'));\n\t\telse $this->db->where('token',$this->get('token'));\n\t\t\n\t\t\n\t\t$q = $this->db->get('auth');\n\t\t$data = $q->row_array();\n\t\t\n\t\tif ($data) $this->response($data, 200);\n\t\telse $this->response(array('error' => 'Authorization session not found.'), 404);\n\t}", "title": "" }, { "docid": "5d3af14a6b55a9a2f9b49432fc6d7248", "score": "0.6129152", "text": "protected function auth() { return $this->_auth(); }", "title": "" }, { "docid": "0325296a3540597ec05512307b4ee5de", "score": "0.6119522", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n \n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n \n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $user_id;\n // get user primary key id\n $user = $db->getUserId($api_key);\n if ($user != NULL)\n $user_id = $user[\"id\"];\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "523dd74531a3cc247219da816ac642ff", "score": "0.6109204", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $user_id;\n // get user primary keR23y id\n $user_id = $db->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "42cc90824be67e0c6324f35bb0d9b98d", "score": "0.60858905", "text": "public static function auth()\n {\n parent::auth();\n\n static::updateAuthResources();\n }", "title": "" }, { "docid": "d6376daedbfb0257975f2b9c7c00447f", "score": "0.60782987", "text": "public function login() {\n if ( Auth::check()) {\n return $this->apiTransformer->successResponse(Auth::user());\n }\n return $this->apiTransformer->errorResponse('Unauthorized Access.', ApiJsonTransformer::HTTP_UNAUTHORIZED);\n }", "title": "" }, { "docid": "725b855f558470a1d79029da60d963ae", "score": "0.60770446", "text": "public function auth() {\n $a = base64_decode( substr($_SERVER[\"REMOTE_USER\"],6)) ;\n if ($a) {\n list($name, $password) = explode(':', $a);\n $_SERVER['PHP_AUTH_USER'] = $name;\n $_SERVER['PHP_AUTH_PW'] = $password;\n }\n\n if (isset($_SERVER['PHP_AUTH_USER'])) {\n $auth_user = $_SERVER['PHP_AUTH_USER'];\n $auth_pwd = $_SERVER['PHP_AUTH_PW'];\n }\n\n if (!isset($auth_user)) {\n header('WWW-Authenticate: Basic realm=\"Flitsfiets secure environment\"');\n header('HTTP/1.0 401 Unauthorized');\n $this->quitWithMessage('Sorry, you have no access.');\n } else {\n\n $this->log(\"Authenticating user with credentials \". $auth_user .\" AND \". $auth_pwd);\n $user = $_ENV[\"AUTH_USER\"];\n $password = $_ENV[\"AUTH_PWD\"];\n if ($user == $auth_user && $password == $auth_pwd) {\n $this->authenticated = true;\n } else {\n header('WWW-Authenticate: Basic realm=\"Flitsfiets secure environment\"');\n header('HTTP/1.0 401 Unauthorized');\n $this->quitWithMessage('Sorry, you have no access.');\n }\n }\n }", "title": "" }, { "docid": "6e8d2dcbbd8946c3bc80ea99b4739170", "score": "0.6072434", "text": "abstract public function authenticated();", "title": "" }, { "docid": "ac36f0f148519e43db9c7db18496ccc2", "score": "0.6064283", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response['error_id'] = 401;\n $response['error_title'] = 'Invalid Api key';\n $response['error_message'] = 'Access Denied. Invalid Api key';\n // echo json response\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $db->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response['error_id'] = 400;\n $response['error_title'] = 'Missing Api Key';\n $response['error_message'] = 'Api key is misssing';\n // echo json response\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "e4220ff9cabde675869f19e4209e953d", "score": "0.60621345", "text": "abstract protected function authenticate();", "title": "" }, { "docid": "b14fe9592ade72bf4343fc64b9ed77a1", "score": "0.60613257", "text": "public function userGet()\n {\n $ostObj = $this->instantiateOSTKYCSDKForV2Api();\n $userService = $ostObj->services->user;\n $params = array();\n $params['id'] = getenv('USER_ID');\n $response = $userService->get($params)->wait();\n $this->isSuccessResponse($response);\n }", "title": "" }, { "docid": "600ad0924ad62d7778613caf5e99908c", "score": "0.60593563", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $db->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "600ad0924ad62d7778613caf5e99908c", "score": "0.60593563", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $db->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "997a2b0f569df78127bbde6b2d7640b2", "score": "0.6051253", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n $app = \\Slim\\Slim::getInstance();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Authorization'];\n $user_type = $headers['User_Type'];\n // validating api key\n if (!$db->isValidApiKey($api_key, $user_type)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n echoRespnse(401, $response);\n $app->stop();\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $db->getUserId($api_key, $user_type);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n echoRespnse(400, $response);\n $app->stop();\n }\n}", "title": "" }, { "docid": "312e4acf20e44486ba7bdef8f48c2542", "score": "0.605035", "text": "public function login()\n {\n\n if ( !$user = Auth::guard('api')->getProvider()->retrieveById( request('id') ) ) {\n return response()->json(['error' => 'Usuário não encontrado'], 404);\n }\n\n $credentials = request(['id', 'password']);\n\n if (! $token = Auth::guard('api')->attempt($credentials)) {\n return response()->json(['error' => 'Senha Incorreta'], 400);\n }\n\n return $this->respondWithToken($token);\n }", "title": "" }, { "docid": "d39bfbf11027c0b54de04851c1353fbc", "score": "0.60493875", "text": "private function requestHttpAuth()\r\n {\r\n header('WWW-Authenticate: Basic realm=\"'.$this->getRealm().'\"');\r\n header('HTTP/1.0 401 Unauthorized');\r\n }", "title": "" }, { "docid": "91df6c9676e726e1dcba0e27a171cfad", "score": "0.60406566", "text": "public function __construct()\n\t{\n\t\tif (!isset($_SESSION))\n\t\t\tsession_start();\n\n\t\t//Require the config\n\t\trequire_once(ACCOUNT_CONFIG_PATH);\n\n\t\t//Load vars from config\n\t\tif (!empty($api))\n\t\t\t$this->api = $api;\n\t\tif (!empty($links))\n\t\t\t$this->links = $links;\n\t\tif (!empty($lang))\n\t\t\t$this->lang = $lang;\n\t\tif (!empty($config))\n\t\t\tself::$config = $config;\n\n\t\t//Connect if the user isset\n\t\t$db = new Database();\n\t\tif ( !empty($database['user']) ) \n\t\t\t$db->connect( $database );\n\n\t\t//This will help for some cookies.\n\t\tob_start();\n\n\t\t//Check if user is loogged or not\n\t\tif ( $this->session('logged') )\n\t\t\t$this->logged = TRUE;\n\n\t\t//Check for cookies and login if cookies were found\n\t\tif (!$this->logged) {\n\t\t\t\n\t\t\tif( !empty($_COOKIE['_account_user']) and !empty($_COOKIE['_account_pass'])) {\n\t\t\t\t$data = array(\n\t\t\t\t\t\t'user' => $_COOKIE['_account_user'],\n\t\t\t\t\t\t'password' => $_COOKIE['_account_pass'],\n\t\t\t\t\t\t'encrypt' => FALSE\n\t\t\t\t\t);\n\t\t\t\tif ($this->login($data)) \n\t\t\t\t\tredirect($_SERVER['PHP_SELF']);\n\t\t\t\telse {\n\t\t\t\t\t$this->set_cookie('_account_user', '');\n\t\t\t\t\t$this->set_cookie('_account_pass', '');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if (!empty($_COOKIE['_account_oauth'])) {\n\n\t\t\t\t$cookie = $this->xss( $_COOKIE['_account_oauth'] );\n\t\t\t\t$cookie = explode('|', $cookie);\n\n\t\t\t\tif (!empty($cookie[0]) and !empty($cookie[1])) {\n\t\t\t\t\tif ($this->login( array( 'oauth' => $cookie[0], 'uid' => $cookie[1])))\n\t\t\t\t\t\tredirect($_SERVER['PHP_SELF']);\n\t\t\t\t\telse $this->set_cookie('_account_oauth', '');\n\t\t\t\t}\n\t\t\t\telse $this->set_cookie('_account_oauth', '');\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "597334d725996b3b7b1e308e56e4e477", "score": "0.6039696", "text": "public function authenticate()\n {\n if (!$this->token->authenticated())\n {\n $this->json->add('success', false);\n $this->json->add('errors', $this->token->getErrors());\n }\n else\n {\n $this->json->add('success', true);\n $this->json->add('user_name', $this->token->getUser()->name);\n }\n \n $this->json->render(); \n }", "title": "" }, { "docid": "21f77c18790bc7fa7758088b29f1479e", "score": "0.60235006", "text": "function authenticate(\\Slim\\Route $route) {\n // Getting request headers\n $headers = apache_request_headers();\n\n $app = \\Slim\\Slim::getInstance();\n \n // Verifying Authorization Header\n if (isset($headers['Token'])) {\n $db = new DbHandler();\n\n // get the api key\n $api_key = $headers['Token'];\n // validating api key\n if (!$db->isValidApiKey($api_key)) {\n // api key is not present in users table\n echoStatus(UNAUTHORIZED);\n $app->stop();\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $db->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n echoStatus(BAD_REQUEST);\n $app->stop();\n }\n}", "title": "" }, { "docid": "9acce3027872ad204e85939addb8b9b7", "score": "0.60220665", "text": "public function getAuth() {\n return response()->json([\"data\" => \"TEST_AUTH\"], 200);\n }", "title": "" }, { "docid": "13319ca917d9b12380af68cc8ed4fc12", "score": "0.6012214", "text": "protected function initAuthentication() {}", "title": "" }, { "docid": "ddf581b847e9a8331e134ad6413d9e4b", "score": "0.60000145", "text": "public function authenticate()\n {\n $this->initialize();\n\n $result = ApiClient::loginUser(array(\n 'username' => $this->getIdentity(),\n 'password' => $this->getCredential(),\n 'clientId' => $this->getClientId(),\n 'clientSecret' => $this->getClientSecret(),\n )); \n\n if (array_key_exists('access_token', $result) && !empty($result['access_token'])) {\n\n $session = new Container('NoteOauthSession');\n $session->setExpirationSeconds($result['expires_in']);\n $session->accessToken = $result['access_token'];\n\n // $session->getManager()->getConfig()->getGcMaxlifetime();\n // $session->getManager()->getConfig()->getCookieLifetime();\n // exit;\n\n $hydrator = new ClassMethods();\n $user = $hydrator->hydrate(ApiClient::getUser($this->getIdentity()), new UserEntity());\n\n $response = new Result(Result::SUCCESS, $user, array('Authentication successful'));\n } else {\n $response = new Result(Result::FAILURE, NULL , array('Invalid credentials'));\n }\n\n return $response;\n }", "title": "" }, { "docid": "8d8854c80afe33eb1c5050a00207e1ac", "score": "0.5998652", "text": "public function authUser()\n {\n return response()->json( auth()->user() );\n }", "title": "" }, { "docid": "def4da1c68acb6e9ce4b6eb7a52cb06a", "score": "0.59966797", "text": "public function auth() {\n\t\t$query = $this->request->query;\t\t\n\t\tif (!empty($query['key'])) {\n\t\t\t// check key\n\t\t\t$key = $this->Key->get($query['key']);\n\t\t\tif (!empty($key)) {\n\t\t\t\t// check user\n\t\t\t\t$user = $this->User->auth($this->request->data);\n\t\t\t\tif (!empty($user)) {\n\t\t\t\t\t// check token\n\t\t\t\t\t$token = $this->Token->check(\n\t\t\t\t\t\t$this->request->data['email'], \n\t\t\t\t\t\t$query['key'],\n\t\t\t\t\t\tConfigure::read('Security.tokenValidityTime')\n\t\t\t\t\t);\n\t\t\t\t\tif (!empty($token)) {\n\t\t\t\t\t\t$this->response->statusCode(200);\n\t\t\t\t\t\t$user = $user['User'];\n\t\t\t\t\t\tunset($user['password']);\n\t\t\t\t\t\t$this->Cookie->write('Auth.token', $token);\n\t\t\t\t\t\t$this->set(array(\n\t\t\t\t\t\t\t'user' => $user,\n\t\t\t\t\t\t\t'token' => $token,\n\t\t\t\t\t\t\t'_serialize' => array('user', 'token')\n\t\t\t\t\t\t));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// can't get or generate a token\n\t\t\t\t\t\t$this->response->statusCode(400);\n\t\t\t\t\t\t$errors = $this->Token->validationErrors;\n\t\t\t\t\t\t$this->set(array(\n\t\t\t\t\t\t\t'errors' => $errors,\n\t\t\t\t\t\t\t'_serialize' => array('errors')\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// user not found\n\t\t\t\t\t$this->response->statusCode(401);\n\t\t\t\t\t$errors = $this->User->validationErrors;\n\t\t\t\t\t$this->set(array(\n\t\t\t\t\t\t'errors' => $errors,\n\t\t\t\t\t\t'_serialize' => array('errors')\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// unknown key\n\t\t\t\t$this->response->statusCode(400);\n\t\t\t\t$errors = array('key' => 'Unknown key.');\n\t\t\t\t$this->set(array(\n\t\t\t\t\t'errors' => $errors,\n\t\t\t\t\t'_serialize' => array('errors')\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t// no key in parameters\n\t\t\t$this->response->statusCode(400);\n\t\t\t$errors = array('key' => 'Parameter key is required.');\n\t\t\t$this->set(array(\n\t\t\t\t'errors' => $errors,\n\t\t\t\t'_serialize' => array('errors')\n\t\t\t));\t\t\n\t\t}\n }", "title": "" }, { "docid": "7541b3f1db8bd606c2378e6bc47ccd3b", "score": "0.5994132", "text": "function odoo_api($method, $url, $username, $password)\n {\n $provider = new \\League\\OAuth2\\Client\\Provider\\GenericProvider([\n 'clientId' => '31YQM64hD3BYeqIfJjSaxbEQ0YXwFB',\n 'clientSecret' => 'h4XxZlkzjzQNbwHHkbX0EMJG9PBR65',\n 'redirectUri' => 'https://dev.berdikari-persero.com',\n 'urlAuthorize' => 'https://dev.berdikari-persero.com/api/authentication/oauth2/authorize',\n 'urlAccessToken' => 'https://dev.berdikari-persero.com/api/authentication/oauth2/token',\n 'urlResourceOwnerDetails' => ''\n ]);\n\n try {\n $accessToken = $provider->getAccessToken('password', [\n 'username' => $username,\n 'password' => $password \n ]);\n $request = $provider->getAuthenticatedRequest(\n $method,\n $url,\n $accessToken\n );\n\n $client = new \\GuzzleHttp\\Client();\n $response = $client->send($request);\n $rawBody = $response->getBody()->getContents();\n \n return $rawBody;\n } catch (\\League\\OAuth2\\Client\\Provider\\Exception\\IdentityProviderException $e) {\n exit($e->getMessage());\n }\n }", "title": "" }, { "docid": "f7e7dc30e5d6dfc5b2336949ce1ea115", "score": "0.5983237", "text": "public function index()\n {\n try {\n $authenticatedUser = Auth::user();\n return Api::response(200, 'user success loaded', ['user' => $authenticatedUser]);\n } catch (\\Exception $th) {\n return Api::response(401, 'token expired');\n }\n }", "title": "" }, { "docid": "ecd8086afa1a8b4d6be0bf07fe1994b8", "score": "0.59761363", "text": "public function me()\n {\n return response()->json(auth('api')->user());\n }", "title": "" }, { "docid": "ecd8086afa1a8b4d6be0bf07fe1994b8", "score": "0.59761363", "text": "public function me()\n {\n return response()->json(auth('api')->user());\n }", "title": "" }, { "docid": "ecd8086afa1a8b4d6be0bf07fe1994b8", "score": "0.59761363", "text": "public function me()\n {\n return response()->json(auth('api')->user());\n }", "title": "" }, { "docid": "67576afd3bb7d57871819cbcd5146e38", "score": "0.59732276", "text": "public function check_authorization_uri_to_obtain_user_info_for_logged_user()\n {\n $this->json('GET','/api/v1/relationships/user')->assertStatus(401);\n // This URL is public all users can obtain is own user info\n $this->signIn($user = create(User::class),'api');\n $this->json('GET','/api/v1/relationships/user')->assertStatus(200);\n $this->json('GET','/api/v1/relationships/user/'. $user->id)->assertStatus(200);\n }", "title": "" }, { "docid": "90a888bd1bb4fd4f07febaae0b81572d", "score": "0.59729236", "text": "function authenticate(\\Slim\\Route $route){\n\t// Get request headers\n\t$headers = apache_request_headers();\n\t$response = array();\n\t$app = \\Slim\\Slim::getInstance();\n\n\t// Verify Authorization Header\n\tif(isset($headers['Authorization'])){\n\t\t$db = new DbHandler();\n\n\t\t// Get api key\n\t\t$api_key = $headers['Authorization'];\n\n\t\t// Validate api key\n\t\tif (!$db->isValidApiKey($api_key)) {\n\t\t\t// api key is not present in table\n\t\t\t$response[\"error\"] = true;\n\t\t\t$response[\"message\"] = \"Access Denied. Invalid Api key\";\n\t\t\techoResponse(401,$response);\n\t\t\t$app->stop();\n\t\t}else{\n\t\t\t\tglobal $user_id;\n\t\t\t\t// get user id\n\t\t\t\t$user = $db->getUserID($api_key);\n\t\t\t\tif ($user != NULL) {\n\t\t\t\t\t$user_id = $user[\"id\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t$response[\"error\"] = true;\n\t\t$response[\"message\"] = \"Api key is missing\";\n\t\techoResponse(400, $response);\n\t\t$app->stop();\n\t}\n}", "title": "" }, { "docid": "701188f0197a8e3e6a986ea9565d9d45", "score": "0.59712505", "text": "function login() {\n \n $request = \\Slim\\Slim::getInstance()->request();\n $data = json_decode($request->getBody());\n \n try {\n \n $db = getDB();\n $userData ='';\n $sql = \"SELECT user_id, name, email, username, type, address, surname FROM users WHERE (username=:username or email=:username) and password=:password \";\n $stmt = $db->prepare($sql);\n $stmt->bindParam(\"username\", $data->username, PDO::PARAM_STR);\n $password=hash('sha256',$data->password);\n $stmt->bindParam(\"password\", $password, PDO::PARAM_STR);\n $stmt->execute();\n $mainCount=$stmt->rowCount();\n $userData = $stmt->fetch(PDO::FETCH_OBJ);\n \n if(!empty($userData))\n {\n $user_id=$userData->user_id;\n $userData->token = apiToken($user_id);\n }\n \n $db = null;\n if($userData){\n $userData = json_encode($userData);\n echo '{\"userData\": ' .$userData . '}';\n } else {\n echo '{\"error\":{\"text\":\"Bad request wrong username and password\"}}';\n }\n\n \n }\n catch(PDOException $e) {\n echo '{\"error\":{\"text\":'. $e->getMessage() .'}}';\n }\n}", "title": "" }, { "docid": "c7bb19fb9c24b6e471e927e00ef29dda", "score": "0.5970369", "text": "public function authenticate() {\n if ( isset($_POST['auth']['username']) && isset($_POST['auth']['password']) ) {\n $username = $_POST['auth']['username'];\n $password = md5($_POST['auth']['password']);\n $depth = eval('return ( isset(' . get_class($this) . '::' . Rpd::$c['rapid']['controllerAuthVar'] . ') ? ' . get_class($this) . '::' . Rpd::$c['rapid']['controllerAuthVar'] . ' : 1 );');\n $user = R::findOne('users', 'username = ? AND password = ? AND is_active = ? AND depth <= ?', array($username, $password, true, $depth));\n if ( $user->id ) {\n $this->authenticated = true;\n $_SESSION['user'] = $user->getProperties();\n $_SESSION['current_version'] = Rapid::getCurrentVersion(true);\n Rpd::a('USER', $user);\n } else {\n $this->authenticated = false;\n Rpd::a('AUTH_FAIL', true);\n }\n } else if ( isset($_POST['auth']['logout']) ) {\n $this->authenticated = false;\n unset($_SESSION['user']);\n } else $this->authenticated = false;\n }", "title": "" }, { "docid": "81077a2ead09a349edc6cefac1f6f9f1", "score": "0.59597164", "text": "function authenticate($conn);", "title": "" }, { "docid": "3161e237d9fe6b8c0037fbd8860de657", "score": "0.5956922", "text": "public function requestAction() {\n // This creates a request object that contains the methods\n // get|post|put|patch|del|me to perform API requests\n // thanks to the credentials stored in the session\n $request_object = $this->oauth->auth('google');\n \n // This performs a request on the unified user info endpoint\n // to get his name, email and avatar, regardless of the provider's\n // implementation\n $me = $request_object->me(array(\n 'name',\n 'email',\n 'avatar'\n ));\n\n $json = new JsonModel($me);\n return $json;\n }", "title": "" }, { "docid": "6d75a8e0495b1654e0a4e2d793521edf", "score": "0.59501725", "text": "public function authenticatedUser()\n {\n $data = $this->apiAuthenticatorService->getUser();\n return response()\n ->json($this->apiAuthenticatorService->setTransformer(new AuthTransformer())->transformItem($data));\n }", "title": "" }, { "docid": "f8a795b8c2420f87a9f413fbf6f92636", "score": "0.5945609", "text": "public function getAuthUser() : JsonResponse\n {\n if (!$user = JWTAuth::parseToken()->authenticate()) {\n return response()->json(['error' => true,'message' => 'user_not_found'], 404);\n }\n return response()->json(compact('user'));\n }", "title": "" }, { "docid": "5e8e1ba0c3a151a30381b033e0d8e6ef", "score": "0.5938239", "text": "function api_user() {\n\t\t$aid = get_account_id();\n\t\t$channel = get_app()->get_channel();\n\t\t\n\t\tif(($aid) && (x($_REQUEST,'channel'))) {\n\n\t\t\t// Only change channel if it is different than the current channel\n\n\t\t\tif($channel && x($channel,'channel_address') && $channel['channel_address'] != $_REQUEST['channel']) {\n\t\t\t\t$c = q(\"select channel_id from channel where channel_address = '%s' and channel_account_id = %d limit 1\",\n\t\t\t\t\tdbesc($_REQUEST['channel']),\n\t\t\t\t\tintval($aid)\n\t\t\t\t);\n\t\t\t\tif((! $c) || (! change_channel($c[0]['channel_id'])))\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\t\t\t\n\t\tif ($_SESSION[\"allow_api\"])\n\t\t\treturn local_channel();\n\t\treturn false;\n\t}", "title": "" }, { "docid": "aae95e6f73f945df0bc93a6e40dbd512", "score": "0.593755", "text": "private function ambiguosAuth()\n {\n\n }", "title": "" }, { "docid": "ff07dc246ef16a7e24b7226d607399b5", "score": "0.5936581", "text": "public static function getUser();", "title": "" }, { "docid": "0b196355f8a2bfc35b16471c0f73467e", "score": "0.59356135", "text": "public function test_auth_request_returns_proper_value()\n {\n $user = new CanGuardRouteTestUser();\n $user->forceFill([\n 'name' => 'test',\n 'email' => '[email protected]',\n 'password' => '[email protected]',\n ]);\n $user->save();\n $api_key = ApiKey::make($user);\n $api_key->save();\n\n // Define the route to hit\n $this->app['router']\n ->middleware('auth.apikey')\n ->get(__FUNCTION__, ['uses' => function (Request $request) {\n return json_encode($request->user());\n }]);\n\n // Hit the route\n $response = $this\n ->withHeader('X-Authorization', $api_key->key)\n ->get(__FUNCTION__ . '?foo=bar');\n\n $response->assertStatus(200);\n\n $responseUser = $response->json();\n\n $this->assertSame(data_get($responseUser, 'id'), $user->id);\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "3ac3171436eb685c8ddb5478978b374f", "score": "0.0", "text": "public function show(Notification $notification)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "e5152a75698da8d87238a93648112fcf", "score": "0.72897154", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->fetch($resource_name, $cache_id, $compile_id, true);\n }", "title": "" }, { "docid": "87649d98f1656cc542e5e570f7f9fd1f", "score": "0.6616427", "text": "public function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t\t$this->setHeaderData();\n\t\t\tparent::display($resource_name, $cache_id, $compile_id);\n\t\t}", "title": "" }, { "docid": "b08b6bb501370e4c42f069ea734388a0", "score": "0.64993453", "text": "public function get($resource);", "title": "" }, { "docid": "dd518b422828ccdfc7b932a34e62225d", "score": "0.6273607", "text": "public function show(Resource $resource)\n {\n return response()->json($resource);\n \n }", "title": "" }, { "docid": "51a1c3499847de81938cf22e3e336bf2", "score": "0.62220424", "text": "public function getAction()\n {\n \t/**\n \t * @todo handle error cases and return an error, return valid users ondly\n \t */\n \t$id = $this->_request->getParam('id');\n \t$result = $this->_table->find($id);\n \t$this->view->resource = $result->current();\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155763", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "04d35d47081d101fff17d30acb1f2178", "score": "0.6141969", "text": "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(SugarAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "title": "" }, { "docid": "556fa9c7c8b0bbfca3848834f795e687", "score": "0.6119021", "text": "public function displayAction($id)\n { }", "title": "" }, { "docid": "0243c17e457a131b89a485445f1cee26", "score": "0.60701436", "text": "public function show()\n {\n $this->getView($this->view_name);\n }", "title": "" }, { "docid": "f0d6bc8f87110dac3699808a11a93b8f", "score": "0.6056663", "text": "public function render()\n {\n $this->bindResource($this->resource);\n return parent::render();\n }", "title": "" }, { "docid": "66bedfeb611b91813c98a7e106a95902", "score": "0.5966627", "text": "private function displayImageResource($image) {\n if($image) {\n if($image->getExtension() == 'jpg' || $image->getExtension() == 'jpeg') {\n header('Content-Type: image/jpeg');\n imagejpeg($image->getResource(), null, 100);\n }\n else if($image->getExtension() == 'png') {\n header('Content-Type: image/png');\n imagepng($image->getResource(), null, 9);\n }\n else if($image->getExtension() == 'gif') {\n header('Content-Type: image/gif');\n imagegif($image->getResource(), null, 100);\n }\n }\n }", "title": "" }, { "docid": "d8bcb4a6a484fbd4595bf60c13751c5f", "score": "0.5916333", "text": "public function display()\n {\n $this->_getAdapter()->display();\n }", "title": "" }, { "docid": "df778faf9f0b4d88cab1a7ccf83e7502", "score": "0.59093356", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $url = $em->getRepository('KtIoWebInterfaceBundle:Url')->find($id);\n\n if (!$url)\n throw $this->createNotFoundException();\n\n // TODO check we own this url\n return $this->render(\n 'KtIoWebInterfaceBundle:Url:show.html.twig',\n array('url' => $url)\n );\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "4e4b4802386aefba7de0e06d94dac1a8", "score": "0.5861693", "text": "public function viewResources($resourceid='')\n {\n $resourceid = db::escapechars($resourceid);\n \n $sql = \"SELECT * FROM kidschurchresources ORDER BY resourceName ASC\";\n $resources = db::returnallrows($sql);\n if(count($resources) > 0){\n $resourceOutput = \"<table class=\\\"memberTable\\\"><tr><th>ID</th><th>Name</th><th>Description</th><th>Type</th><th>Quantity</th><th>Task</th></tr>\";\n foreach($resources as $resource){\n if($resource['resourceID'] == $resourceid){\n $resourceOutput .= \"<tr class=\\\"highlight\\\">\";\n }\n else{\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"<td>\".$resource['resourceID'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceName'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceDescription'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceType'].\"</td>\";\n $resourceOutput .= \"<td>\".$resource['resourceQuantity'].\"</td>\";\n $resourceOutput .= \"<td> \n <a href=\\\"index.php?mid=431&action=edit&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"runbutton\\\">Edit</a>\n <a href=\\\"index.php?mid=430&action=remove&resourceID=\".$resource['resourceID'].\"\\\" class=\\\"delbutton\\\">Remove</a>\n </td>\";\n $resourceOutput .= \"<tr>\";\n }\n $resourceOutput .= \"</table>\";\n }\n else{\n $resourceOutput = \"<p>There are no resources stored at present.</p>\";\n }\n return $resourceOutput;\n }", "title": "" }, { "docid": "8c23114005d84f0741705b7da9ef9695", "score": "0.58511454", "text": "public function list_display($resource){\n\t\techo(\"<table border='1' >\\n<tr>\");\n\t\tforeach($this->list_headers as $head){\n\t\t\techo(\"<th>$head</th>\\n\");\n\t\t}\n\t\tif($this->ed_flag){\n\t\t\techo(\"<th colspan='2'>Admin</th>\\n\");\n\t\t}\n\t\techo(\"</tr>\");\n\t\twhile($row = mysql_fetch_array($resource)){\n\t\t\t\techo(\"<tr>\\n\");\n\t\t\t\tforeach($row as $key => $value) {\n\t\t\t\t$row[$key] = stripslashes($value);\n\t\t\t}\n\t\t\tforeach($this->list_table_cols as $val) {\n\t\t\t\techo(\"<td valign='top'>$row[$val]</td>\");\n\t\t\t}\n\t\t\tif($this->ed_flag){\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Edit</a></td>\\n\"); //Adds Edit button to end of display table\n\t\t\t\techo(\"<td valign='top'><a href=attendance.php?id={$row[$this->ID]}>Delete</a></td>\\n\"); //Adds Delete button to end of display table\n\t\t\t}\n\t\t}\n\t\techo(\"</tr>\\n</table>\");\n\t}", "title": "" }, { "docid": "bebff39922dfa3f37a3d7a6997a89e2f", "score": "0.5843188", "text": "function show()\n\t{\n\t\t$this->postObject->display();\n\t}", "title": "" }, { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.5841994", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "8aae95d60d936382831b42a40edb3397", "score": "0.5824328", "text": "public function show()\r\n\t{\r\n\t\techo $this->template;\r\n\t}", "title": "" }, { "docid": "7c5c6f9fff24e84ba0d3b00444a0acc7", "score": "0.58195084", "text": "public function resolveForDisplay($resource, $attribute = null)\n {\n if (empty($this->value)) {\n $this->value = null;\n }\n\n try {\n $file = new GenericFile($this->value);\n\n $path = FileCache::get($file, function ($file, $path) {\n return basename($path);\n });\n\n $url = vsprintf('%s/%s', [\n 'nova-vendor/skydiver/nova-cached-images',\n $path\n ]);\n\n $value = url($url);\n } catch (\\Throwable $th) {\n $value = 'remote image not found';\n }\n\n $this->value = $value;\n }", "title": "" }, { "docid": "2f33e89741ba0a19b898dc9a1f9026fc", "score": "0.5811495", "text": "public function showResource($value, bool $justOne = false);", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.58112013", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "baf449cd82447c0bffb577fe732c4f2b", "score": "0.57953733", "text": "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::add('error', 'msg_info', array('message' => Kohana::message('gw', 'event.view.not_allowed'), 'is_persistent' => FALSE, 'hash' => Text::random($length = 10)));\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "title": "" }, { "docid": "ef3fb32b359d85e91687f25572082d98", "score": "0.57948667", "text": "public function display()\r\n {\r\n\r\n echo $this->get_display();\r\n\r\n }", "title": "" }, { "docid": "f7584132221ad89383b2964e2bd53fe5", "score": "0.57916236", "text": "public function show(Request $request, $id)\n {\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])){\n $resource = $request->session()->get('resources')[$id];\n \n $data = [];\n $data['resource']= $resource;\n return view('resource.show', $data);\n }\n return redirect('resource');\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.5781528", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "21604cc50e9ca2b999b8c59635c9346b", "score": "0.5777744", "text": "protected function _resource($data, $name)\r\n {\r\n $data = get_resource_type($data);\r\n $this->_renderNode('Resource', $name, $data);\r\n }", "title": "" }, { "docid": "b5cf19a61f4df8b352f4c5245148ed8c", "score": "0.57745427", "text": "public function show()\n\t{\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f18ebc5f8b08ddef340fa4f0d3eeea2f", "score": "0.5751132", "text": "public static function show() {\n\t\treturn static::$instance->display();\n\t}", "title": "" }, { "docid": "e6492f335ada5179a4fe15779fa54555", "score": "0.5746491", "text": "public function show($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "6ad29c72212e149d40619613cbacfe13", "score": "0.5712024", "text": "protected function addResourceShow(string $name, string $base, string $controller, array $options): RouteContract\n {\n $uri = $this->getResourceUri($name, $options) . '/{' . $base . '}';\n\n $action = $this->getResourceAction($name, $controller, 'show', $options);\n\n return $this->router->get($uri, $action);\n }", "title": "" }, { "docid": "61a627e0c8c8b3a47cc8487387ee35b2", "score": "0.57057", "text": "public function show($id)\n\t{\n\t\t//No need for showing\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "98910c6c774dc1299639c448306ea157", "score": "0.5694748", "text": "public function show($id)\n {\n $this->crud->hasAccessOrFail('show');\n\n // set columns from db\n $this->crud->setFromDb();\n\n // cycle through columns\n foreach ($this->crud->columns as $key => $column) {\n // remove any autoset relationship columns\n if (array_key_exists('model', $column) && array_key_exists('autoset', $column) && $column['autoset']) {\n $this->crud->removeColumn($column['name']);\n }\n }\n\n // get the info for that entry\n $this->data['entry'] = $this->crud->getEntry($id);\n $this->data['crud'] = $this->crud;\n $this->data['title'] = trans('bcrud::crud.preview').' '.$this->crud->entity_name;\n\n // remove preview button from stack:line\n $this->crud->removeButton('preview');\n $this->crud->removeButton('delete');\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getShowView(), $this->data);\n }", "title": "" }, { "docid": "851cd390daf8f79de66a294538711bfd", "score": "0.5691463", "text": "public function view(HTTPRequest $request)\n {\n $id = $request->param('ID');\n if ($display = Display::get_by_id($id)) {\n return $this->renderPresentation($display);\n }\n\n return $this->httpError(404);\n }", "title": "" }, { "docid": "89380f02c69f1ed066b5443620b90407", "score": "0.568851", "text": "public function show($id)\n\t{ \n \t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
a9af96b0928f2713535039d97eeb4d33
Processes an IMS/QTI manifest file: store links to new files to be able to transform them into the questions text
[ { "docid": "d913ca19791331a1c8282c524c9150ee", "score": "0.6788922", "text": "function qtiProcessManifest($filePath)\n{\n $xml = simplexml_load_file($filePath);\n $course = api_get_course_info();\n $sessionId = api_get_session_id();\n $courseDir = $course['path'];\n $sysPath = api_get_path(SYS_COURSE_PATH);\n $exercisesSysPath = $sysPath . $courseDir . '/document/';\n $webPath = api_get_path(WEB_CODE_PATH);\n $exercisesWebPath = $webPath . 'document/document.php?' . api_get_cidreq() . '&action=download&id=';\n $links = array(\n 'manifest' => array(),\n 'system' => array(),\n 'web' => array(),\n );\n $tableDocuments = Database::get_course_table(TABLE_DOCUMENT);\n $countResources = count($xml->resources->resource->file);\n for ($i=0; $i < $countResources; $i++) {\n $file = $xml->resources->resource->file[$i];\n $href = '';\n foreach ($file->attributes() as $key => $value) {\n if ($key == 'href') {\n if (substr($value, -3, 3) != 'xml') {\n $href = $value;\n }\n }\n }\n if (!empty($href)) {\n $links['manifest'][] = (string) $href;\n $links['system'][] = $exercisesSysPath . strtolower($href);\n $specialHref = Database::escape_string(preg_replace('/_/', '-', strtolower($href)));\n $specialHref = preg_replace('/(-){2,8}/', '-', $specialHref);\n\n $sql = \"SELECT iid FROM \" . $tableDocuments . \" WHERE c_id = \" . $course['real_id'] . \" AND session_id = $sessionId AND path = '/\" . $specialHref . \"'\";\n $result = Database::query($sql);\n $documentId = 0;\n while ($row = Database::fetch_assoc($result)) {\n $documentId = $row['iid'];\n }\n $links['web'][] = $exercisesWebPath . $documentId;\n }\n }\n return $links;\n}", "title": "" } ]
[ { "docid": "2f972a05c6307d116f157a5df4fac085", "score": "0.59166366", "text": "function import_exercise($file)\n{\n global $exercise_info;\n global $element_pile;\n global $non_HTML_tag_to_avoid;\n global $record_item_body;\n // used to specify the question directory where files could be found in relation in any question\n global $questionTempDir;\n global $resourcesLinks;\n\n $baseWorkDir = api_get_path(SYS_ARCHIVE_PATH) . 'qti2';\n\n if (!is_dir($baseWorkDir)) {\n mkdir($baseWorkDir, api_get_permissions_for_new_directories(), true);\n }\n\n $uploadPath = '/';\n\n // set some default values for the new exercise\n $exercise_info = array();\n $exercise_info['name'] = preg_replace('/.zip$/i', '', $file);\n $exercise_info['question'] = array();\n $element_pile = array();\n\n // create parser and array to retrieve info from manifest\n $element_pile = array(); //pile to known the depth in which we are\n //$module_info = array (); //array to store the info we need\n\n // if file is not a .zip, then we cancel all\n\n if (!preg_match('/.zip$/i', $file)) {\n\n return 'UplZipCorrupt';\n }\n\n // unzip the uploaded file in a tmp directory\n if (!get_and_unzip_uploaded_exercise($baseWorkDir, $uploadPath)) {\n\n return 'UplZipCorrupt';\n }\n\n // find the different manifests for each question and parse them.\n $exerciseHandle = opendir($baseWorkDir);\n //$question_number = 0;\n $file_found = false;\n $operation = false;\n $result = false;\n $filePath = null;\n $resourcesLinks = array();\n\n // parse every subdirectory to search xml question files and other assets to be imported\n // The assets-related code is a bit fragile as it has to deal with files renamed by Chamilo and it only works if\n // the imsmanifest.xml file is read.\n while (false !== ($file = readdir($exerciseHandle))) {\n if (is_dir($baseWorkDir . '/' . $file) && $file != \".\" && $file != \"..\") {\n // Find each manifest for each question repository found\n $questionHandle = opendir($baseWorkDir . '/' . $file);\n // Only analyse one level of subdirectory - no recursivity here\n while (false !== ($questionFile = readdir($questionHandle))) {\n if (preg_match('/.xml$/i', $questionFile)) {\n $isQti = isQtiQuestionBank($baseWorkDir . '/' . $file . '/' . $questionFile);\n if ($isQti) {\n $result = qti_parse_file($baseWorkDir, $file, $questionFile);\n $filePath = $baseWorkDir . $file;\n $file_found = true;\n } else {\n $isManifest = isQtiManifest($baseWorkDir . '/' . $file . '/' . $questionFile);\n if ($isManifest) {\n $resourcesLinks = qtiProcessManifest($baseWorkDir . '/' . $file . '/' . $questionFile);\n }\n }\n }\n }\n } elseif (preg_match('/.xml$/i', $file)) {\n $isQti = isQtiQuestionBank($baseWorkDir . '/' . $file);\n if ($isQti) {\n $result = qti_parse_file($baseWorkDir, '', $file);\n $filePath = $baseWorkDir . '/' . $file;\n $file_found = true;\n } else {\n $isManifest = isQtiManifest($baseWorkDir . '/' . $file);\n if ($isManifest) {\n $resourcesLinks = qtiProcessManifest($baseWorkDir . '/' . $file);\n }\n }\n\n }\n }\n\n if (!$file_found) {\n\n return 'NoXMLFileFoundInTheZip';\n }\n\n if ($result == false) {\n\n return false;\n }\n\n $doc = new DOMDocument();\n $doc->load($filePath);\n\n // 1. Create exercise.\n $exercise = new Exercise();\n $exercise->exercise = $exercise_info['name'];\n if (!empty($exercise_info['description'])) {\n $exercise->updateDescription($exercise_info['description']);\n }\n\n $exercise->save();\n $last_exercise_id = $exercise->selectId();\n if (!empty($last_exercise_id)) {\n // For each question found...\n foreach ($exercise_info['question'] as $question_array) {\n //2. Create question\n $question = new Ims2Question();\n $question->type = $question_array['type'];\n if (empty($question->type)) {\n // If the type was not provided, assume this is a multiple choice, unique answer type (the most basic)\n $question->type = MCUA;\n }\n $question->setAnswer();\n $description = '';\n if (strlen($question_array['title']) < 50) {\n $question->updateTitle(formatText(strip_tags($question_array['title'])) . '...');\n } else {\n $question->updateTitle(formatText(substr(strip_tags($question_array['title']), 0, 50)));\n $description .= $question_array['title'];\n }\n if (!empty($question_array['description'])) {\n $description .= $question_array['description'];\n }\n $question->updateDescription($description);\n\n $question->save($last_exercise_id);\n $last_question_id = $question->selectId();\n //3. Create answer\n $answer = new Answer($last_question_id);\n $answer->new_nbrAnswers = count($question_array['answer']);\n $totalCorrectWeight = 0;\n $j = 1;\n $matchAnswerIds = array();\n foreach ($question_array['answer'] as $key => $answers) {\n if (preg_match('/_/', $key)) {\n $split = explode('_', $key);\n $i = $split[1];\n } else {\n $i = $j;\n $j++;\n $matchAnswerIds[$key] = $j;\n }\n // Answer\n $answer->new_answer[$i] = formatText($answers['value']);\n // Comment\n $answer->new_comment[$i] = isset($answers['feedback']) ? formatText($answers['feedback']) : null;\n // Position\n $answer->new_position[$i] = $i;\n // Correct answers\n if (in_array($key, $question_array['correct_answers'])) {\n $answer->new_correct[$i] = 1;\n } else {\n $answer->new_correct[$i] = 0;\n }\n $answer->new_weighting[$i] = $question_array['weighting'][$key];\n if ($answer->new_correct[$i]) {\n $totalCorrectWeight += $answer->new_weighting[$i];\n }\n }\n $question->updateWeighting($totalCorrectWeight);\n $question->save($last_exercise_id);\n $answer->save();\n }\n\n // delete the temp dir where the exercise was unzipped\n my_delete($baseWorkDir . $uploadPath);\n return $last_exercise_id;\n }\n\n return false;\n}", "title": "" }, { "docid": "a2a1b14cef79afe8b4e0bd7e04678f76", "score": "0.56616074", "text": "function createimsmanifest($circle1_files, $learnpath_id)\r\n{\r\n\tglobal $_course, $LPname, $expdir, $LPnamesafe;\r\n\t//$tbl_learnpath_main, $tbl_learnpath_chapter, $tbl_learnpath_item, \r\n\t$tbl_learnpath_main = Database :: get_course_table(TABLE_LEARNPATH_MAIN);\r\n\t$tbl_learnpath_item = Database :: get_course_table(TABLE_LEARNPATH_ITEM);\r\n\t$tbl_learnpath_chapter = Database :: get_course_table(TABLE_LEARNPATH_CHAPTER);\r\n\r\n\tinclude_once ('../metadata/md_funcs.php'); // RH: export metadata\r\n\r\n\t//1.1 header\r\n\t/*\r\n\t\t$header='<?xml version=\"1.0\" encoding=\"UTF-8\"?><manifest identifier=\"'.$LPnamesafe.'\" xmlns=\"http://www.imsglobal.org/xsd/imscp_v1p1\" xmlns:imsmd=\"http://www.imsglobal.org/xsd/imsmd_v1p2\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.imsglobal.org/xsd/imscp_v1p1 imscp_v1p1.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 imsmd_v1p2.xsd\" version=\"IMS CP 1.1.3\">'.\"\\n\";\r\n\t*/\r\n\r\n\t//1.2\r\n\t//charset should be dependent on content\r\n\t$mycharset = 'ISO-8859-1';\r\n\t$header = '<?xml version=\"1.0\" encoding=\"'.$mycharset.'\"?>'.\"\\n<manifest identifier='\".$LPnamesafe.\"' version='1.1'\\n xmlns='http://www.imsproject.org/xsd/imscp_rootv1p1p2'\\n xmlns:adlcp='http://www.adlnet.org/xsd/adlcp_rootv1p2'\\n xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\\n xsi:schemaLocation='http://www.imsproject.org/xsd/imscp_rootv1p1p2 imscp_rootv1p1p2.xsd\\n http://www.imsglobal.org/xsd/imsmd_rootv1p2p1 imsmd_rootv1p2p1.xsd\\n http://www.adlnet.org/xsd/adlcp_rootv1p2 adlcp_rootv1p2.xsd'>\\n\";\r\n\r\n\t$org .= xmltagwrite('metadata', 'open');\r\n\t$org .= \" \".xmltagwrite('schema', 'full', 'ADL SCORM');\r\n\t$org .= \" \".xmltagwrite('schemaversion', 'full', '1.2');\r\n\t$org .= xmltagwrite('metadata', 'close');\r\n\r\n\t$defaultorgname = 'default_org';\r\n\r\n\t$attributes[0][0] = 'default';\r\n\t$attributes[1][0] = $defaultorgname;\r\n\t$org .= xmltagwrite('organizations', 'open', $attributes);\r\n\r\n\t$attributes[0][0] = 'identifier';\r\n\t$attributes[1][0] = $defaultorgname;\r\n\t$org .= \" \".xmltagwrite('organization', 'open', $attributes);\r\n\r\n\t$org .= \" \".xmltagwrite('title', 'full', $LPname);\r\n\r\n\t//items list\r\n\t$i = 0;\r\n\t$previous_item_id = '00';\r\n\twhile ($circle1_files[0][$i])\r\n\t{\r\n\t\t//check whether we are in the border of two chapters\r\n\t\t//if (!$desc=strpos($circle1_files[2][$i],'scription')) { //this is is needed if the descriptions are exported to file\r\n\r\n\t\t$sql = \"SELECT * FROM $tbl_learnpath_item WHERE (id=\".$circle1_files[2][$i].\")\";\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\t$parent_item_id = $row['parent_item_id'];\r\n\r\n\t\tif ($parent_item_id != $previous_item_id)\r\n\t\t{\r\n\t\t\t//we create the item tag for the chapter (without indifierref)\r\n\t\t\t$sql2 = \"SELECT * FROM $tbl_learnpath_chapter WHERE (id=\".$parent_item_id.\")\";\r\n\t\t\t$result2 = api_sql_query($sql2, __FILE__, __LINE__);\r\n\t\t\t$row2 = mysql_fetch_array($result2);\r\n\t\t\t$chapter_name = $row2['chapter_name'];\r\n\r\n\t\t\t$attributes = '';\r\n\t\t\t$attributes[0][] = 'identifier';\r\n\t\t\t$attributes[1][] = 'chapter_'.$row2['id'];\r\n\t\t\t$attributes[0][] = 'isvisible';\r\n\t\t\t$attributes[1][] = '1';\r\n\t\t\tif ($previous_item_id != '00')\r\n\t\t\t{\r\n\t\t\t\t$org .= \" \".xmltagwrite('item', 'close');\r\n\t\t\t}\r\n\r\n\t\t\t$org .= \" \".xmltagwrite('item', 'open', $attributes);\r\n\t\t\t$org .= \" \".xmltagwrite('title', 'full', $chapter_name);\r\n\r\n\t\t\tif ($row2['chapter_description'] != '')\r\n\t\t\t{\r\n\t\t\t\t//chapter description\r\n\t\t\t\t$attributes = '';\r\n\t\t\t\t$attributes[0][] = 'identifier';\r\n\t\t\t\t$attributes[1][] = 'chapter_'.$row2['id'].'_desc';\r\n\t\t\t\t$attributes[0][] = 'isvisible';\r\n\t\t\t\t$attributes[1][] = '1';\r\n\t\t\t\t$org .= \" \".xmltagwrite('item', 'open', $attributes);\r\n\t\t\t\t$org .= \" \".xmltagwrite('title', 'full', ' '.$row2['chapter_description']);\r\n\t\t\t\t$org .= \" \".xmltagwrite('item', 'close');\r\n\t\t\t}\r\n\t\t}\r\n\t\t$previous_item_id = $parent_item_id;\r\n\t\t//}\r\n\r\n\t\t$attributes = ''; //item output\r\n\t\t$attributes[0][] = 'identifier';\r\n\t\t$attributes[1][] = 'item_'.$circle1_files[2][$i];\r\n\t\t$attributes[0][] = 'identifierref';\r\n\t\t$attributes[1][] = 'item_ref_'.$circle1_files[2][$i];\r\n\t\t$attributes[0][] = 'isvisible';\r\n\t\t$attributes[1][] = '1';\r\n\t\t$org .= \" \".xmltagwrite('item', 'open', $attributes);\r\n\t\t$org .= \" \".xmltagwrite('title', 'full', $circle1_files[1][$i]);\r\n\r\n\t\tif ($row['prereq_id'] != '')\r\n\t\t{ //item prerequisites\r\n\t\t\t$attributes = '';\r\n\t\t\t$attributes[0][] = 'type';\r\n\t\t\t$attributes[1][] = 'aicc_script';\r\n\t\t\t$org .= \" \".xmltagwrite('adlcp:prerequisites', 'open', $attributes, \"no_linebreak\");\r\n\t\t\tif ($row['prereq_type'] == 'i')\r\n\t\t\t{\r\n\t\t\t\t$org .= 'item_'.$row['prereq_id'];\r\n\t\t\t}\r\n\t\t\tif ($row['prereq_type'] == 'c')\r\n\t\t\t{\r\n\t\t\t\t$org .= 'chapter_'.$row['prereq_id'];\r\n\t\t\t}\r\n\t\t\t$org .= xmltagwrite('adlcp:prerequisites', 'close', $attributes);\r\n\t\t}\r\n\r\n\t\tif ($row['description'] != '')\r\n\t\t{\r\n\t\t\t//item description\r\n\t\t\t$attributes = '';\r\n\t\t\t$attributes[0][] = 'identifier';\r\n\t\t\t$attributes[1][] = 'item_'.$circle1_files[2][$i].'_desc';\r\n\t\t\t$attributes[0][] = 'isvisible';\r\n\t\t\t$attributes[1][] = '1';\r\n\t\t\t$org .= \" \".xmltagwrite('item', 'open', $attributes);\r\n\t\t\t$org .= \" \".xmltagwrite('title', 'full', ' '.$row['description']);\r\n\t\t\t$org .= \" \".xmltagwrite('item', 'close');\r\n\t\t}\r\n\r\n\t\t$mds = new mdstore(TRUE); // RH: export metadata; if no table, create it\r\n\t\tif (($mdt = $mds->mds_get($row['item_type'].'.'.$row['item_id'])))\r\n\t\t\tif (($mdo = strpos($mdt, '<metadata>')) && ($mdc = strpos($mdt, '</metadata>')))\r\n\t\t\t\t$org .= \" \".substr($mdt, $mdo, $mdc - $mdo +11).\"\\n\";\r\n\r\n\t\t$org .= \" \".xmltagwrite('item', 'close');\r\n\t\t$i ++;\r\n\t}\r\n\r\n\tif ($circle1_files)\r\n\t{\r\n\t\t$org .= \" \".xmltagwrite('item', 'close');\r\n\t} //not needed in case of a blank path\r\n\t$org .= \" \".xmltagwrite('organization', 'close');\r\n\t$org .= xmltagwrite('organizations', 'close');\r\n\t$org .= xmltagwrite('resources', 'open');\r\n\r\n\t//resources list\r\n\t$i = 0;\r\n\twhile ($circle1_files[0][$i])\r\n\t{\r\n\t\t$attributes = '';\r\n\t\t$attributes[0][] = 'identifier';\r\n\t\t$attributes[1][] = 'item_ref_'.$circle1_files[2][$i];\r\n\t\t$attributes[0][] = 'type';\r\n\t\t$attributes[1][] = 'webcontent';\r\n\t\t$attributes[0][] = 'adlcp:scormtype';\r\n\t\t$attributes[1][] = 'sco';\r\n\t\t$attributes[0][] = 'href';\r\n\t\t$attributes[1][] = $circle1_files[0][$i];\r\n\t\t$org .= \" \".xmltagwrite('resource', 'open', $attributes);\r\n\r\n\t\t$org .= \" \".xmltagwrite('metadata', 'open');\r\n\t\t$org .= \" \".xmltagwrite('schema', 'full', 'ADL SCORM');\r\n\t\t$org .= \" \".xmltagwrite('schemaversion', 'full', '1.2');\r\n\t\t$org .= \" \".xmltagwrite('metadata', 'close');\r\n\r\n\t\t$attributes = '';\r\n\t\t$attributes[0][] = 'href';\r\n\t\t$attributes[1][] = $circle1_files[0][$i];\r\n\t\t$org .= \" \".xmltagwrite('file', 'open', $attributes);\r\n\r\n\t\t$org .= \" \".xmltagwrite('resource', 'close');\r\n\t\t$i ++;\r\n\t}\r\n\r\n\t$org .= xmltagwrite('resources', 'close');\r\n\t$org .= xmltagwrite('manifest', 'close');\r\n\t$manifest = $header.$org;\r\n\r\n\texporttofile('imsmanifest.xml', 'Manifest file', '0', $manifest);\r\n}", "title": "" }, { "docid": "970cd74d008b2acdf4a36e5654c014d5", "score": "0.54461986", "text": "function exportprocess() {\n\n global $CFG;\n $courseid = $this->course->id;\n\n // create a directory for the exports (if not already existing)\n if (!$export_dir = make_upload_directory($this->question_get_export_dir().'/'.$this->filename)) {\n error( get_string('cannotcreatepath','quiz',$export_dir) );\n }\n $path = $CFG->dataroot.'/'.$this->question_get_export_dir().'/'.$this->filename;\n\n // get the questions (from database) in this category\n // $questions = get_records(\"question\",\"category\",$this->category->id);\n $questions = get_questions_category( $this->category );\n \n notify(\"Exporting \".count($questions).\" questions.\");\n $count = 0;\n\n // create the imsmanifest file\n $smarty =& $this->init_smarty();\n $this->add_qti_info($questions);\n \n // copy files used by the main questions to the export directory\n $result = $this->handle_questions_media($questions, $path, $courseid);\n if ($result !== true) {\n notify(implode(\"<br />\", $result));\n }\n \n $manifestquestions = $this->objects_to_array($questions);\n $manifestid = str_replace(array(':', '/'), array('-','_'), \"question_category_{$this->category->id}---{$CFG->wwwroot}\");\n $smarty->assign('externalfiles', 1);\n $smarty->assign('manifestidentifier', $manifestid);\n $smarty->assign('quiztitle', \"question_category_{$this->category->id}\");\n $smarty->assign('quizinfo', \"All questions in category {$this->category->id}\");\n $smarty->assign('questions', $manifestquestions);\n $smarty->assign('lang', $this->lang);\n $smarty->error_reporting = 99;\n $expout = $smarty->fetch('imsmanifest.tpl');\n $filepath = $path.'/imsmanifest.xml';\n if (empty($expout)) {\n error(\"Unkown error - empty imsmanifest.xml\");\n }\n if (!$fh=fopen($filepath,\"w\")) {\n error(\"Cannot open for writing: $filepath\");\n }\n if (!fwrite($fh, $expout)) {\n error(\"Cannot write exported questions to $filepath\");\n }\n fclose($fh);\n\n // iterate through questions\n foreach($questions as $question) {\n \n // results are first written into string (and then to a file)\n $count++;\n echo \"<hr /><p><b>$count</b>. \".stripslashes($question->questiontext).\"</p>\";\n $expout = $this->writequestion( $question , null, true, $path) . \"\\n\";\n $expout = $this->presave_process( $expout );\n \n $filepath = $path.'/'.$this->get_assesment_item_id($question) . \".xml\";\n if (!$fh=fopen($filepath,\"w\")) {\n error(\"Cannot open for writing: $filepath\");\n }\n if (!fwrite($fh, $expout)) {\n error(\"Cannot write exported questions to $filepath\");\n }\n fclose($fh);\n \n }\n\n // zip files into single export file\n zip_files( array($path), \"$path.zip\" );\n\n // remove the temporary directory\n remove_dir( $path );\n \n return true;\n }", "title": "" }, { "docid": "b5a2ec69fa3afc85e0158dde18847851", "score": "0.5311718", "text": "function qti_parse_file($exercisePath, $file, $questionFile)\n{\n global $non_HTML_tag_to_avoid;\n global $record_item_body;\n global $questionTempDir;\n\n $questionTempDir = $exercisePath . '/' . $file . '/';\n $questionFilePath = $questionTempDir . $questionFile;\n\n if (!($fp = fopen($questionFilePath, 'r'))) {\n Display::addFlash(Display::return_message(get_lang('Error opening question\\'s XML file'), 'error'));\n\n return false;\n } else {\n $data = fread($fp, filesize($questionFilePath));\n }\n\n //parse XML question file\n //$data = str_replace(array('<p>', '</p>', '<front>', '</front>'), '', $data);\n $data = ChamiloApi::stripGivenTags($data, array('p', 'front'));\n $qtiVersion = array();\n $match = preg_match('/ims_qtiasiv(\\d)p(\\d)/', $data, $qtiVersion);\n $qtiMainVersion = 2; //by default, assume QTI version 2\n if ($match) {\n $qtiMainVersion = $qtiVersion[1];\n }\n\n //used global variable start values declaration :\n\n $record_item_body = false;\n $non_HTML_tag_to_avoid = array(\n \"SIMPLECHOICE\",\n \"CHOICEINTERACTION\",\n \"INLINECHOICEINTERACTION\",\n \"INLINECHOICE\",\n \"SIMPLEMATCHSET\",\n \"SIMPLEASSOCIABLECHOICE\",\n \"TEXTENTRYINTERACTION\",\n \"FEEDBACKINLINE\",\n \"MATCHINTERACTION\",\n \"ITEMBODY\",\n \"BR\",\n \"IMG\"\n );\n\n $question_format_supported = true;\n\n $xml_parser = xml_parser_create();\n xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, false);\n if ($qtiMainVersion == 1) {\n xml_set_element_handler($xml_parser, 'startElementQti1', 'endElementQti1');\n xml_set_character_data_handler($xml_parser, 'elementDataQti1');\n } else {\n xml_set_element_handler($xml_parser, 'startElementQti2', 'endElementQti2');\n xml_set_character_data_handler($xml_parser, 'elementDataQti2');\n }\n if (!xml_parse($xml_parser, $data, feof($fp))) {\n // if reading of the xml file in not successful :\n // set errorFound, set error msg, break while statement\n $error = xml_get_error_code();\n Display::addFlash(\n Display::return_message(\n get_lang('Error reading XML file') . sprintf('[%d:%d]', xml_get_current_line_number($xml_parser), xml_get_current_column_number($xml_parser)),\n 'error'\n )\n );\n\n return false;\n }\n\n //close file\n fclose($fp);\n if (!$question_format_supported) {\n Display::addFlash(\n Display::return_message(\n get_lang(\n 'Unknown question format in file %file',\n array(\n '%file' => $questionFile,\n )\n ),\n 'error'\n )\n );\n\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "dd2287eaa69d1fe7f87578f83d01c00f", "score": "0.52800447", "text": "public function parseConfig($main,$filename,$feedattrs,$item=array()) {\r\n\t\t\t/* if item is given, it's a reparsing for overwriting data from an auphonic-episode */\r\n\t\t\t\r\n\t\t\t$mime = $main->get('mimetypes');\r\n\t\t\tif (is_array($item) && count($item)==0) \r\n\t\t\t{ \r\n\t\t\t\tforeach ($main->get('itemattr') as $var) $item[$var]=\"\";\r\n\t\t\t} \r\n\t\t\t$thisattr = \"\";\r\n\t\t\t\r\n\t\t\t$item['audiofiles']=array();\r\n\t\t\t$slug = basename($filename,\".epi\");\r\n\t\t\t\r\n\t\t\t$fh = fopen($filename,'r');\r\n\t\t\t\r\n\t\t\twhile (!feof($fh)) {\r\n\t\t\t\t\r\n\t\t\t\t$uline = fgets($fh);\r\n\t\t\t\t$line = trim($uline);\r\n\t\t\t\t\r\n\t\t\t\t/* continue if comment or empty line. except for article attribute */\r\n\t\t\t\tif ( ( $line==\"\" && $thisattr!=\"article\") || substr($line,0,2)==\"#:\") continue;\r\n\t\t\t\t\r\n\t\t\t\tif ($line==\"---end---\")\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tif (substr($line,-1)==\":\" && ( in_array(substr($line,0,-1),$main->get('itemattr')) || in_array(substr($line,0,-1),$feedattrs['audioformats']) )) {\r\n\t\t\t\t\r\n\t\t\t\t\t/* new attribute starts */\r\n\t\t\t\t\r\n\t\t\t\t\t$thisattr = substr($line,0,-1);\r\n\t\t\t\t\t$item[$thisattr]=\"\";\r\n\t\t\t\t\r\n\t\t\t\t} elseif ($thisattr==\"chapters\") {\r\n\t\t\t\t\r\n\t\t\t\t\t/* a chapter line */\r\n\t\t\t\t\t/* no link or image atm */\r\n\t\t\t\t\t/* will have to separate with | or because of title attribute, which might contain white space */\r\n\t\t\t\t\t#((\\d+:)?(\\d\\d?):(\\d\\d?)(?:\\.(\\d+))?) ([^<>\\r\\n]{3,}) ?(<([^<>\\r\\n]*)>\\s*(<([^<>\\r\\n]*)>\\s*)?)?\\r?\r\n\t\t\t\t\t# thanks, Simon Waldherr. You saved my brain here! :)\r\n\t\t\t\t\t\r\n\t\t\t\t\tpreg_match('#((\\d+:)?(\\d\\d?):(\\d\\d?)(?:\\.(\\d+))?) ([^<>\\r\\n]{3,}) ?(<([^<>\\r\\n]*)>\\s*(<([^<>\\r\\n]*)>\\s*)?)?\\r?#',$line,$chapreg );\r\n\t\t\t\t\r\n\t\t\t\t\t$chap = array('start'=>'','title'=>'','image'=>'','href'=>'');\r\n\t\t\t\t\t$item['chapters']=[];\r\n\t\t\t\t\tif (isset($chapreg[1]) && isset($chapreg[6])) {\r\n\t\t\t\t\t\t$chap['start'] = $chapreg[1];\t\r\n\t\t\t\t\t\t$chap['title'] = trim($chapreg[6]);\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif (isset($chapreg[8])) {\r\n\t\t\t\t\t\t\t$chap['href']=$chapreg[8];\r\n\t\t\t\t\t\t\tif (isset($chapreg[10])) {\r\n\t\t\t\t\t\t\t\t$chap['image']=$chapreg[10];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$item['chapters'][]=$chap;\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} elseif (in_array($thisattr,$feedattrs['audioformats'])) {\r\n\t\t\t\t\r\n\t\t\t\t\t/* configured audio formats */\r\n\t\t\t\t\t/* only audioformats allowed, that are configured in feed.cfg */\r\n\t\t\t\t\t\r\n\t\t\t\t\t$audio = explode ( \" \",$line );\r\n\t\t\t\t\r\n\t\t\t\t\tif (!array_key_exists($thisattr,$mime)) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t/* mimetype not found in presets */\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (count($audio)==3) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t/* maybe it's in the .epi? */\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$mimetype = $audio[2];\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t/* fallback. hmpf */\r\n\t\t\t\t\t\t\t$mimetype = \"audio/mpeg\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t/* everything went better than expected */\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$mimetype = $mime[$thisattr];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (count($audio)>1) {\r\n\t\t\t\t\t\t/* that's great: length of file is given */\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$item[$thisattr] = array ( 'link' => $audio[0] , 'length' => $audio[1] , 'type' => $mimetype);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t/* boooh! get your metadata right! */\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$item[$thisattr] = array ( 'link' => $audio[0] , 'length' => 0, 'type' => $mimetype );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$item['audiofiles'][$thisattr]=$item[$thisattr];\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* this is an attribute which may have linebreaks. append line to current attribute */\r\n\t\t\t\t\tif ($thisattr!=\"\" && $thisattr!=\"article\") $item[$thisattr] .= ($item[$thisattr]!=\"\") ? \"\\n\".$line : $line;\r\n\t\t\t\t\tif ($thisattr == \"article\") $item[$thisattr] .= ($item[$thisattr]!=\"\") ? \"\\n\".$uline : $uline;\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($feedattrs['mediabaseurl']!=\"\") {\r\n\t\t\t\t\r\n\t\t\t\tforeach ($feedattrs['audioformats'] as $format) \r\n\t\t\t\t{\r\n\t\t\t\t\tif ($feedattrs['mediabasepath']!=\"\") {\r\n\t\t\t\t\t\t$localfile = $feedattrs['mediabasepath'].\"/\".$slug.\".\".$format;\r\n\t\t\t\t\t\tif (!file_exists($localfile)) continue;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$localfile = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (array_key_exists($format,$mime)) {\r\n\t\t\t\t\t\t$mimetype = $mime[$format];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$mimetype = \"audio/mpeg\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (isset($item['audiofiles'][$format])) {\r\n\t\t\t\t\t\t$audiofilename = basename($item['audiofiles'][$format]['link'],\".\".$format);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$audiofilename = $slug;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$item[$format] = array ('link' => $feedattrs['mediabaseurl'].$audiofilename.\".\".$format , 'length' => $localfile!=\"\" ? filesize($localfile) : 0, 'type' => $mimetype);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$item['audiofiles'][$format] = $item[$format];\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfclose($fh);\r\n\t\t\treturn $item;\r\n\t\t}", "title": "" }, { "docid": "4ecae797a204abced3bed26b557b582f", "score": "0.51882607", "text": "function isQtiManifest($filePath)\n{\n $data = file_get_contents($filePath);\n if (!empty($data)) {\n $match = preg_match('/imsccv(\\d)p(\\d)/', $data);\n if ($match) {\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "a1755d7b37a72cd21a7add59e02e67e8", "score": "0.5118878", "text": "public function generateManifestFile() {\n $filecount = 0;\n\n $iterator = new \\RecursiveDirectoryIterator($this->appPath,\\RecursiveDirectoryIterator::SKIP_DOTS);\n $files = new \\RecursiveCallbackFilterIterator($iterator, [$this,'manifestFilter']);\n\n //Get the files we need to work with.\n\n foreach( $files as $file) {\n //if ($file->getFilename()[0] === '.') continue;\n \n //hash the file\n $F = new PHPAntSignerFile($file);\n array_push($this->files, $F);\n }\n\n //Now that we have a list of files that are include with this app, let's generate the manifest.xml file.\n\n $name = $this->getAppMeta($this->appPath . '/app.php','custom','/(class) ([a-zA-Z0-9_]*) {0,}(extends){0,1} [a-zA-Z0-9_-].*/');\n if(is_null($name)) throw new Exception(\"Could not parse class name from file $this->appPath to determine app name for manifest file.\", 1);\n \n $namespace = $this->getAppMeta($this->appPath . '/app.php','custom','/(namespace) (.*);/');\n if(is_null($namespace)) throw new Exception(\"Could not parse namespace from file $this->appPath to determine app namespace!\", 1);\n $app = new \\SimpleXMLElement('<app/>');\n \n $app->addAttribute('name',$name);\n $app->addAttribute('namespace',$namespace);\n\n //Loop through the files, and add each one to the manifest file.\n foreach($this->files as $file) {\n $child = $app->addChild('file');\n $name = $child->addChild('name',$file);\n $hash = $child->addChild('hash',$file->gethash());\n }\n\n $manifestPath = $this->appPath . '/manifest.xml';\n\n //Format XML to save indented tree rather than one line\n $dom = new \\DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($app->asXML());\n \n $dom->save($manifestPath);\n\n return $manifestPath;\n\n }", "title": "" }, { "docid": "10e8b0abe33dd032d4203363d242933c", "score": "0.49756908", "text": "function expand_intent($script_line) {\nif ((strpos(strtolower(trim($script_line)),'tagui ') === 0) or (strtolower(trim($script_line)) == 'tagui')) {\n$params = trim(substr(trim($script_line).\" \",1+strpos(trim($script_line).\" \",\" \"))); if ($params == \"\")\ndie(\"ERROR - filename missing for step \" . trim($script_line) . \"\\n\");\nelse if (!file_exists(abs_file($params)))\ndie(\"ERROR - file not found for step \" . trim($script_line) . \"\\n\");\nelse {$expanded_intent = \"\"; $temp_input_file = fopen(abs_file($params),'r'); if ($temp_input_file == false)\ndie(\"ERROR - cannot open file for step \" . trim($script_line) . \"\\n\");\nwhile(!feof($temp_input_file)) {$expanded_intent .= expand_intent(fgets($temp_input_file));} fclose($temp_input_file);\nreturn $expanded_intent;}} else return rtrim($script_line) . \"\\n\";}", "title": "" }, { "docid": "7b92a1d23a07dabfdc299c72cb796d35", "score": "0.48583496", "text": "function apps_request_manifest_image_process(&$manifest) {\n foreach ($manifest['apps'] as $id => &$app) {\n if (isset($app['logo'])) {\n $logo = apps_retrieve_app_image($id, $app['logo'], t(\"@name Logo\", array('@name' => $app['name'])));\n $app['logo'] = !empty($logo) ? $logo : FALSE;\n }\n\n if (isset($app['screenshots'])) {\n foreach ($app['screenshots'] as $index => $url) {\n $name = isset($app['name']) ? $app['name'] : $manifest['name'];\n $screenshot = apps_retrieve_app_image($id, $url, t(\"@name Screenshot @index\", array('@name' => $name, '@index' => $index)));\n\n if (!empty($screenshot)) {\n $app['screenshots'][$index] = $screenshot;\n }\n else {\n unset($app['screenshots'][$index]);\n }\n }\n }\n }\n\n}", "title": "" }, { "docid": "3a3feff2f6bfe96cb26d76f64665fff9", "score": "0.4855141", "text": "private function parseManifest(DOMDocument $dom): array {\r\n\t\t$res = array();\r\n\t\tforeach ($dom->documentElement->getElementsByTagName('resources')[0]->getElementsByTagName('resource') as $resource) {\r\n\t\t\t$type = $resource->getAttribute(\"type\");\r\n\t\t\tif ($type === 'imsqti_item_xmlv2p1') { // TODO: further item types\r\n\t\t\t\t$res[$resource->getAttribute(\"identifier\")] = $resource->getAttribute(\"href\");\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "8810884983848d4f731423f75b4a5e32", "score": "0.48063463", "text": "private function getMasterM3u8($url) {\n $lines = file($url, FILE_IGNORE_NEW_LINES);\n $baseUri = '';\n if (preg_match(\"#^https?://[^/]+(/.*\\.ism/)[^/]*\\.m3u8#\", $url, $m)) {\n $baseUri = $m[1];\n }\n // Structurate the manifest\n $steps = array('header', 'extXSessionKey', 'audio', 'subs', 'variants', 'keyframes');\n $manifest = array(\n 'header' => array(),\n 'extXSessionKey' => array(),\n 'audio' => array(),\n 'subs' => array(),\n 'variants' => array(),\n 'keyframes' => array(),\n );\n $stepId = 0;\n $nbLines = count($lines);\n for ($i=0; $i<$nbLines; $i++) {\n $line = $lines[$i];\n switch (true) {\n case (preg_match(\"%^#EXT-X-SESSION-KEY:.*%\", $line, $m)):\n $stepId = 1;\n $manifest[$steps[$stepId]][] = $line;\n break; \n case (preg_match(\"%^# AUDIO groups%\", $line)):\n $stepId = 2;\n //$manifest[$steps[$stepId]][] = $lines[++$i];\n break; \n case (preg_match(\"%^# SUBTITLES groups%\", $line)):\n $stepId = 3;\n //$manifest[$steps[$stepId]][] = $lines[++$i];\n break; \n case (preg_match(\"%^# variants%\", $line)):\n $stepId = 4;\n //$manifest[$steps[$stepId]][] = $lines[++$i];\n break; \n case (preg_match(\"%^# keyframes%\", $line)):\n $stepId = 5;\n //$manifest[$steps[$stepId]][] = $lines[++$i];\n break; \n case (preg_match(\"%^#EXT-X-.*,URI=\\\"([^\\\"]+)\\\"%\", $line, $m)):\n $newUri = $baseUri . $m[1];\n $newLine = str_replace($m[1], $newUri, $line); // Patch URI to use absolute original URI\n $manifest[$steps[$stepId]][] = $newLine;\n break;\n case (preg_match(\"%^#EXT-X-STREAM-INF:.*,RESOLUTION=%\", $line) && isset($lines[$i+1])):\n $newLine = $baseUri . $lines[$i+1];\n $manifest[$steps[$stepId]][] = $line;\n $manifest[$steps[$stepId]][] = $newLine;\n $i++;\n break;\n default:\n if (empty($line))\n break; // forget empty lines\n $manifest[$steps[$stepId]][] = $line;\n break;\n }\n }\n // var_dump($manifest); die;\n return $manifest;\n \n }", "title": "" }, { "docid": "64b370e50485edf00d46a23df190fe20", "score": "0.47797617", "text": "function generateContents(&$pfm)\n{\n // refresh the contents\n $pfm->generateContents();\n\n // refresh the filelist\n $filelist = $pfm->getFilelist(true);\n\n // foreach script in the scripts dir, remove the baseinstalldir and as an install-as\n foreach ($filelist as $file_details) {\n $file = $file_details['attribs'];\n\n if ($file['role'] === 'script') {\n\n $installed_as = false;\n if (isset($pfm->_packageInfo['phprelease']['filelist']['install'])) {\n foreach (getList($pfm->_packageInfo['phprelease']['filelist']['install']) as $install) {\n if ($install['attribs']['name'] === $file['name']) {\n $installed_as = true;\n }\n }\n }\n\n if (!$installed_as) {\n $path_parts = pathinfo($file['name']);\n $pfm->addInstallAs($file['name'], $path_parts['basename']);\n }\n\n if ($file['baseinstalldir'] !== '') {\n // clear the baseinstalldir\n $pfm->setFileAttribute($file['name'], 'baseinstalldir', '');\n }\n }\n }\n}", "title": "" }, { "docid": "4eabef32fbb1b9bb33b1dc0a54ecf98c", "score": "0.47215128", "text": "protected function createManifest()\n {\n // Creates SHA hashes for all files in package\n $this->SHAs['pass.json'] = sha1($this->JSON);\n $hasicon = false;\n foreach ($this->files as $name => $path) {\n if (strtolower($name) == 'icon.png') {\n $hasicon = true;\n }\n $this->SHAs[$name] = sha1(file_get_contents($path));\n }\n\n if ( !$hasicon) {\n $this->sError = 'Missing required icon.png file.';\n $this->clean();\n\n return false;\n }\n\n $manifest = json_encode((object)$this->SHAs);\n\n return $manifest;\n }", "title": "" }, { "docid": "a670b80a1ecaf61dfe9106dea7e6731c", "score": "0.47158152", "text": "protected function manifest()\n\t{\n\t\tif( \\IPS\\IN_DEV === FALSE AND isset( \\IPS\\Data\\Store::i()->manifest ) )\n\t\t{\n\t\t\t$output = \\IPS\\Data\\Store::i()->manifest;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$manifest = json_decode( \\IPS\\Settings::i()->manifest_details, TRUE );\n\n\t\t\t$output\t= array(\n\t\t\t\t'scope'\t\t\t\t=> '/',\n\t\t\t\t'name'\t\t\t\t=> \\IPS\\Settings::i()->board_name,\n\t\t\t\t'theme_color'\t\t=> \\IPS\\Theme::i()->settings['header']\n\t\t\t);\n\n\t\t\tforeach( $manifest as $k => $v )\n\t\t\t{\n\t\t\t\tif( $v )\n\t\t\t\t{\n\t\t\t\t\t$output[ $k ] = $v;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$homeScreen = json_decode( \\IPS\\Settings::i()->icons_homescreen, TRUE ) ?? array();\n\n\t\t\tforeach( $homeScreen as $k => $v )\n\t\t\t{\n\t\t\t\tif( mb_strpos( $k, 'android' ) !== FALSE )\n\t\t\t\t{\n\t\t\t\t\tif( !isset( $output['icons'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$output['icons']\t= array();\n\t\t\t\t\t}\n\n\t\t\t\t\t$file = \\IPS\\File::get( 'core_Icons', $v['url'] );\n\n\t\t\t\t\t$output['icons'][] = array(\n\t\t\t\t\t\t'src'\t=> (string) $file->url,\n\t\t\t\t\t\t'type'\t=> \\IPS\\File::getMimeType( $file->originalFilename ),\n\t\t\t\t\t\t'sizes'\t=> $v['width'] . 'x' . $v['height']\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\\IPS\\Data\\Store::i()->manifest = $output;\n\t\t}\n\n\t\t$cacheHeaders\t= ( \\IPS\\IN_DEV !== true AND \\IPS\\Theme::designersModeEnabled() !== true ) ? \\IPS\\Output::getCacheHeaders( time(), 86400 ) : array();\n\t\t\n\t\t\\IPS\\Output::i()->sendOutput( json_encode( $output, JSON_PRETTY_PRINT ), 200, 'application/manifest+json', $cacheHeaders );\n\t}", "title": "" }, { "docid": "0022f34f322d3443a5f83c1ef16d56d3", "score": "0.4713672", "text": "public function parseAuphonic($main,$filename,$feedattrs) {\r\n\t\t\t\t\t\t\r\n\t\t\t$mime = $main->get('mimetypes');\r\n\t\t\tforeach ($main->get('itemattr') as $var) $item[$var]=\"\";\r\n\t\t\t\r\n\t\t\t$thisattr = \"\";\r\n\t\t\t\r\n\t\t\t$prod = json_decode(str_replace(\"\\\\r\", \"\\\\n\", file_get_contents($filename)));\r\n\t\t\tif ($prod===false) return false;\r\n\t\t\t\r\n\t\t\t$item['title'] = $prod->metadata->title;\r\n\t\t\t$item['description'] = strip_tags($prod->metadata->subtitle);\r\n\t\t\t$item['article'] = $prod->metadata->summary;\r\n\t\t\tif (isset($prod->metadata->location)) {\r\n \t\t\t if (isset($prod->metadata->location->latitude) && isset($prod->metadata->location->longitude)) { \r\n \t\t\t $item['location']['latitude'] = $prod->metadata->location->latitude;\r\n \t\t\t $item['location']['longitude'] = $prod->metadata->location->longitude;\r\n \t\t\t }\r\n \t\t}\t\r\n\t\t\t$item['duration'] = $prod->length_timestring;\r\n\t\t\t$item['date']= date('r',strtotime($prod->change_time));\r\n\t\t\t\r\n\t\t\tforeach ($prod->chapters as $chapter) {\r\n\t\t\t\t$chap = array('start'=>$chapter->start,'title'=>$chapter->title,'image'=>'','href'=>'');\r\n\t\t\t\tif (isset($chapter->url)) $chap['href'] = $chapter->url;\r\n\t\t\t\t// images in chapters are located on auphonics server. no chance to get them :(\r\n\t\t\t\t// if (isset($chapter->image)) $chap['image'] = $chapter->image;\r\n\t\t\t\t$item['chapters'][]=$chap;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (isset($prod->multi_input_files) && $item['chapters']!=\"\") {\r\n\t\t\t\tforeach ($prod->multi_input_files as $mif) {\r\n\t\t\t\t\tif ($mif->type=='intro') {\r\n\t\t\t\t\t\tforeach ($item['chapters'] as $key=>$chap) $item['chapters'][$key]['start'] = strftime(\"%H:%M:%S\",strtotime($chap['start']) + $mif->input_length);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$services = array();\r\n\t\t\tforeach ($prod->outgoing_services as $service) {\r\n\t\t\t\t// only services with a base_url work...\r\n\t\t\t\tif (isset($service->base_url) && $service->base_url!=\"\") {\r\n\t\t\t\t\tif (substr($service->base_url,-1)=='/')\r\n\t\t\t\t\t\t$services[$service->uuid]=$service->base_url;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$services[$service->uuid]=$service->base_url.'/';\r\n\t\t\t\t}\r\n\t\t\t\tif ($service->type==\"amazons3\") $services[$service->uuid] = 'http://'.$service->bucket.'.s3.amazonaws.com/';\r\n\t\t\t}\r\n\t\t\t$item['audiofiles']=array();\r\n\t\t\r\n\t\t\tforeach ($prod->output_files as $output) {\r\n\t\t\t\t\r\n\t\t\t\tif (count($output->outgoing_services)==0) continue;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$service = \"\";\r\n\t\t\t\t// Check if this services exists\r\n\t\t\t\tforeach ($output->outgoing_services as $oservice) {\r\n\t\t\t\t\tif (array_key_exists($oservice,$services)) {\r\n\t\t\t\t\t\t$service = $oservice;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($service==\"\") continue;\r\n\t\t\t\t\r\n\t\t\t\tif ($output->format==\"image\") $item['image']=$services[$service].$output->filename;\r\n\t\t\t\tif (in_array($output->ending,$feedattrs['audioformats'])) {\r\n\t\t\t\t\t$mimetype = (array_key_exists($output->ending,$mime) ? $mime[$output->ending] : \"application/octet\");\r\n\t\t\t\t\t$item[$output->ending] = array ( 'link' => $services[$service].$output->filename, 'length' => $output->size , 'type'=> $mimetype );\r\n\t\t\t\t\t$item['audiofiles'][$output->ending]=$item[$output->ending];\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t# replace attributes by tags, starting with _\r\n\t\t\t# eg: _date:2013-12-17 10:00:00\r\n\t\t\t\r\n\t\t\tforeach ($prod->metadata->tags as $key=>$tag) {\r\n\t\t\t\t$tag = trim($tag);\r\n\t\t\t\tif (substr($tag,0,1)==\"_\" && strpos($tag,':')!==false) {\r\n\t\t\t\t\t$tagname = substr($tag,1,strpos($tag,':')-1);\r\n\t\t\t\t\t$tagval = trim(substr($tag,strpos($tag,':')+1));\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tif (in_array($tagname,$main->get('itemattr'))) {\r\n\t\t\t\t\t\t$item[$tagname]=$tagval;\r\n\t\t\t\t\t\tunset($prod->metadata->tags[$key]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$item['keywords'] = implode(\",\",$prod->metadata->tags);\r\n\t\t\treturn $item;\r\n\t\t}", "title": "" }, { "docid": "84de4e608fc52f1414593c6143282134", "score": "0.4699743", "text": "public static function list_input_files($experiment)\n{\n $applicationInputs = Utilities::get_application_inputs($experiment->applicationId);\n\n $experimentInputs = $experiment->experimentInputs;\n\n\n //showing experiment inputs in the order defined by the admins.\n $order = array();\n foreach ($experimentInputs as $index => $input)\n {\n $order[$index] = $input->inputOrder;\n }\n array_multisort($order, SORT_ASC, $experimentInputs);\n \n foreach ($experimentInputs as $input)\n {\n $matchingAppInput = null;\n\n foreach($applicationInputs as $applicationInput)\n {\n if ($input->name == $applicationInput->name)\n {\n $matchingAppInput = $applicationInput;\n }\n }\n //var_dump($matchingAppInput);\n\n if ($matchingAppInput->type == DataType::URI)\n {\n $explode = explode('/', $input->value);\n echo '<p><a target=\"_blank\"\n href=\"' . URL::to(\"/\") . \"/../../\" . Constant::EXPERIMENT_DATA_ROOT . $explode[sizeof($explode)-2] . '/' . $explode[sizeof($explode)-1] . '\">' .\n $explode[sizeof($explode)-1] . '\n <span class=\"glyphicon glyphicon-new-window\"></span></a></p>';\n }\n elseif ($matchingAppInput->type == DataType::STRING)\n {\n echo '<p>' . $input->name . ': ' . $input->value . '</p>';\n }\n }\n}", "title": "" }, { "docid": "82877d6a17f1c1324e10ee0931426981", "score": "0.46756566", "text": "private function parseMdFiles()\n {\n foreach ($this->sections as $section) {\n $this->section = $section;\n\n $data = $this->parseOneFile();\n }\n }", "title": "" }, { "docid": "3a0a0f8325d4dd323ef46acf0ac77eb2", "score": "0.46652502", "text": "function step3_process()\n{\n\t// TIP: if no code is added here, the installer will simply extract the archive\n\t// into the install directory.\n\t\n\t// TIP: install code is made of Installatron commands. some examples:\n\t// move $this->mv('FROM','TO');\n\t// copy $this->cp('FROM','TO');\n\t// remove (delete) $this->rm('FILE_OR_DIR');\n\t// chmod $this->chmod('FILE_OR_DIR',0777);\n\t// edit file (regex) $this->sr('FILE','#REGEX#\",\"REPLACE_WITH\");\n\t// ...see all the commands at: http://www.installatron.com/sdk_commands\n\t\n\t// TIP: Installatron has a lot of useful variables. some examples:\n\t// install url $this->url\n\t// install path $this->path\n\t// database host $this->db_host\n\t// database host $this->db_host\n\t// database name $this->db_name\n\t// database username $this->db_user\n\t// database password $this->db_pass\n\t// table prefix $this->db_prefix\n\t// ...see all the variables at: http://www.installatron.com/sdk_commands\n\t\n\t// TIP: you can add as many steps as you need\n\t// TIP: you can remove these comments if you don't need them.\n\t }", "title": "" }, { "docid": "6201cb85acd81fbe34579d3ae15ba966", "score": "0.4605689", "text": "private function processCopy() {\n\t$manifestPathArray = $this->_manifest->getPathArray();\n\t$processedArray = [];\n\n\tforeach ($manifestPathArray as $source) {\n\t\t// Allow referenced file to exist in either APPROOT or GTROOT, while\n\t\t// prefering the APPROOT's version if file exists in both locations.\n\t\t$sourcePathArray = [\n\t\t\tAPPROOT . $source,\n\t\t\tGTROOT . $source,\n\t\t];\n\t\t$sourcePath = null;\n\t\tforeach ($sourcePathArray as $sp) {\n\t\t\tif(file_exists($sp)) {\n\t\t\t\t$sourcePath = $sp;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// If sourcePath is null at this point, the source file can't be found.\n\t\t// Do not throw an exception though - treat it as it would in a static\n\t\t// website; the browser will show a 404 error in the console.\n\t\tif(is_null($sourcePath)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$destination = $this->_manifest->getFingerprintPath($source);\n\t\t$destinationPath = APPROOT . \"/www\" . $destination;\n\t\t$destinationPath = ClientSideCompiler::renameSource($destinationPath);\n\n\t\t$processed = ClientSideCompiler::process($sourcePath);\n\t\tif(!is_dir(dirname($destinationPath))) {\n\t\t\tmkdir(dirname($destinationPath), 0775, true);\n\t\t}\n\t\tfile_put_contents($destinationPath, $processed);\n\n\t\t$ext = pathinfo($destinationPath, PATHINFO_EXTENSION);\n\n\t\t// if there's a sass sourcemap file, copy that too\n\t\tif($ext === \"css\" && file_exists($sourcePath . \".map\")) {\n\t\t\tcopy(\"{$sourcePath}.map\", APPROOT . \"/www{$destination}.map\");\n\t\t}\n\n\t\tif(!isset($processedArray[$ext])) {\n\t\t\t$processedArray[$ext] = array();\n\t\t}\n\t\t$processedArray[$ext][] = $destinationPath;\n\t}\n}", "title": "" }, { "docid": "b979b25c3ef13bedbb64d21a95f2bece", "score": "0.45880467", "text": "function sharedresources_parse_metadata(&$metadata, &$metadatadefines, $upath, $options) {\n\n static $sortorder = 0; // An absolute counter for ordering file in inputlist, based on metadata analysis.\n\n $authorized = array('file', 'category', 'section', 'visible', 'title',\n 'shortname', 'description', 'keywords', 'language',\n 'authors', 'contributors', 'documenttype', 'documentnature',\n 'pedagogictype', 'difficulty', 'guidance');\n\n $hl = array_shift($metadata);\n while ($hl && preg_match('/^(\\s|\\/\\/|#|$)/', $hl)) {\n $hl = array_shift($metadata);\n }\n\n if ($options['encoding'] != 'UTF-8') {\n $hl = utf8_encode($hl);\n }\n\n $header = explode(';', chop($hl));\n $linesize = count($header);\n\n if ($header[0] != 'file') {\n echo \"First field name must be file. This metadata file is malformed. Skipping all metadata.\";\n return;\n }\n\n $unauthorized = array();\n foreach ($header as $column) {\n if (!in_array($column, $authorized)) {\n $unauthorized[] = $column;\n }\n }\n\n if ($unauthorized) {\n echo \"Unauthorized columns in file header: \".implode(', ', $unauthorized);\n return;\n }\n\n $i = 1;\n foreach ($metadata as $l) {\n if (preg_match('/^(\\s|\\/\\/|#|$)/', $l)) {\n continue; // Skip comments, empty lines.\n }\n $l = chop($l);\n\n $line = explode(';', $l);\n $linecount = count($line);\n if ($linecount != $linesize) {\n $state = ($linecount < $linesize) ? -1 : 1;\n echo \"Bad count in $path at line \".($i + 1).\" ($state): ignoring...<br/>\\n$l\\n\";\n $i++;\n continue;\n }\n\n $j = 0;\n $mtd = array();\n $mtd['sortorder'] = $sortorder++;\n foreach ($line as $field) {\n if (!$j) {\n // First field is filename.\n $filename = $field;\n $urealpath = $upath.'/'.$filename;\n $urealpath = str_replace('\\\\', '/', $urealpath);\n if (!file_exists($urealpath)) {\n $message = \"File $urealpath not in archive. Be carefull file names need NOT HAVE extended chars.\";\n $message .= \" This is NOT reductible by php programming.\";\n mtrace($message);\n }\n }\n\n $mtd[$header[$j]] = $field;\n $j++;\n }\n\n $metadatadefines[$upath.'/'.$filename] = $mtd;\n $i++;\n }\n}", "title": "" }, { "docid": "c8af42023fefa90bc0a4a82a4a7004ca", "score": "0.45750976", "text": "function process_intent($intent_type, $script_line) {\nswitch ($intent_type) {\ncase \"url\": return url_intent($script_line); break;\ncase \"tap\": return tap_intent($script_line); break;\ncase \"rtap\": return rtap_intent($script_line); break;\ncase \"dtap\": return dtap_intent($script_line); break;\ncase \"hover\": return hover_intent($script_line); break;\ncase \"type\": return type_intent($script_line); break;\ncase \"select\": return select_intent($script_line); break;\ncase \"read\": return read_intent($script_line); break;\ncase \"show\": return show_intent($script_line); break;\ncase \"upload\": return upload_intent($script_line); break;\ncase \"down\": return down_intent($script_line); break;\ncase \"receive\": return receive_intent($script_line); break;\ncase \"echo\": return echo_intent($script_line); break;\ncase \"save\": return save_intent($script_line); break;\ncase \"dump\": return dump_intent($script_line); break;\ncase \"write\": return write_intent($script_line); break;\ncase \"load\": return load_intent($script_line); break;\ncase \"snap\": return snap_intent($script_line); break;\ncase \"table\": return table_intent($script_line); break;\ncase \"wait\": return wait_intent($script_line); break;\ncase \"live\": return live_intent($script_line); break;\ncase \"ask\": return ask_intent($script_line); break;\ncase \"keyboard\": return keyboard_intent($script_line); break;\ncase \"mouse\": return mouse_intent($script_line); break;\ncase \"check\": return check_intent($script_line); break;\ncase \"test\": return test_intent($script_line); break;\ncase \"frame\": return frame_intent($script_line); break;\ncase \"popup\": return popup_intent($script_line); break;\ncase \"api\": return api_intent($script_line); break;\ncase \"run\": return run_intent($script_line); break;\ncase \"dom\": return dom_intent($script_line); break;\ncase \"js\": return js_intent($script_line); break;\ncase \"r\": return r_intent($script_line); break;\ncase \"py\": return py_intent($script_line); break;\t\ncase \"vision\": return vision_intent($script_line); break;\ncase \"timeout\": return timeout_intent($script_line); break;\ncase \"code\": return code_intent($script_line); break;\ndefault: echo \"ERROR - \" . current_line() . \" cannot understand step \" . $script_line . \"\\n\";}}", "title": "" }, { "docid": "ac5c5b8271448bcbde0dfbff710cb25b", "score": "0.457017", "text": "public function validate()\n {\n $this->manifestWarnings = [] + $this->loadIssues['warning'];\n $this->manifestErrors = [] + $this->loadIssues['error'];\n if ($this->algorithm == 'md5') {\n $this->addWarning(\"This manifest is MD5, you should use setAlgorithm('sha512') to upgrade.\");\n }\n foreach ($this->hashes as $path => $hash) {\n $fullPath = $this->bag->makeAbsolute($path);\n $fullPath = $this->cleanUpAbsPath($fullPath);\n $this->validatePath($path, $fullPath);\n if (file_exists($fullPath)) {\n $calculatedHash = strtolower($this->calculateHash($fullPath));\n $hash = strtolower($hash);\n if ($hash !== $calculatedHash) {\n $this->addError(\"{$path} calculated hash ({$calculatedHash}) does not match manifest \" .\n \"({$hash})\");\n }\n }\n }\n }", "title": "" }, { "docid": "60dab906e0b492a4d8c0247a7ab65eb6", "score": "0.45689616", "text": "public static function transformManifest(&$json, $manifest, $parentCollection=NULL) {\n // Find contained items\n $containedItems = get_db()->getTable('Item')->findBy(array('collection_id' => $manifest->id));\n $currentContainedItem = 0;\n // Replace top-level URI\n $json['@id'] = IiifApiBridge_Util_Uri::build(IiifApiBridge_Util_Uri::MANIFEST, $manifest->id, NULL);\n // Add belongsTo attribute\n $root = get_option('iiifapibridge_api_root') . '/';\n $topName = get_option('iiifapibridge_api_top_name');\n if (!empty($parentCollection) || !empty($topName)) {\n $json['within'] = empty($parentCollection) ? (empty($topName) ? '' : IiifApiBridge_Util_Uri::topCollection()) : IiifApiBridge_Util_Uri::build(IiifApiBridge_Util_Uri::COLLECTION, NULL, $parentCollection->id, $root);\n }\n // For each seqnum => sequence\n foreach ($json['sequences'] as $seqnum => &$sequence) {\n // Change JSON ID to recommended form, id=item.collection_id, name=seqnum\n $sequence['@id'] = IiifApiBridge_Util_Uri::build(IiifApiBridge_Util_Uri::SEQUENCE, $manifest->id, $seqnum);\n // For each canvas in the sequence\n foreach ($sequence['canvases'] as &$canvas) {\n // Find the corresponding item\n do {\n $canvasItem = $containedItems[$currentContainedItem++];\n } while ($canvasItem->hasElementText('IIIF Item Metadata', 'Display as IIIF?') && $canvasItem->getElementTexts('IIIF Item Metadata', 'Display as IIIF?')[0]->text === 'Never');\n // Transform it\n self::transformCanvas($canvas, $canvasItem);\n }\n }\n // Remove search services\n if (!empty($json['services'])) {\n for ($i = 0; $i < count($json['services']); $i++) {\n $service = $json['services'][$i];\n if (self::__stringStartsWith($service['profile'], 'http://iiif.io/api/search/')) {\n unset($json['services'][$i--]);\n }\n }\n }\n }", "title": "" }, { "docid": "0781b8704b695df315987db2b07663d9", "score": "0.45610306", "text": "public function importFiles() {\n\t\t$this->copyRecursive(t3lib_extMgm::extPath('introduction', $this->sourceDirectory), PATH_site);\n\t\t$this->fixPermissions(t3lib_extMgm::extPath('introduction', $this->sourceDirectory), PATH_site);\n\t}", "title": "" }, { "docid": "56edeabb03e047e69f8e4b43e5fdf5fc", "score": "0.45602477", "text": "function quiz_decode_content_links ($content,$restore) {\n \n global $CFG;\n \n $result = $content;\n \n //Link to the list of quizs\n \n $searchstring='/\\$@(QUIZINDEX)\\*([0-9]+)@\\$/';\n //We look for it\n preg_match_all($searchstring,$content,$foundset);\n //If found, then we are going to look for its new id (in backup tables)\n if ($foundset[0]) {\n //print_object($foundset); //Debug\n //Iterate over foundset[2]. They are the old_ids\n foreach($foundset[2] as $old_id) {\n //We get the needed variables here (course id)\n $rec = backup_getid($restore->backup_unique_code,\"course\",$old_id);\n //Personalize the searchstring\n $searchstring='/\\$@(QUIZINDEX)\\*('.$old_id.')@\\$/';\n //If it is a link to this course, update the link to its new location\n if($rec->new_id) {\n //Now replace it\n $result= preg_replace($searchstring,$CFG->wwwroot.'/mod/quiz/index.php?id='.$rec->new_id,$result);\n } else { \n //It's a foreign link so leave it as original\n $result= preg_replace($searchstring,$restore->original_wwwroot.'/mod/quiz/index.php?id='.$old_id,$result);\n }\n }\n }\n\n //Link to quiz view by moduleid\n\n $searchstring='/\\$@(QUIZVIEWBYID)\\*([0-9]+)@\\$/';\n //We look for it\n preg_match_all($searchstring,$result,$foundset);\n //If found, then we are going to look for its new id (in backup tables)\n if ($foundset[0]) {\n //print_object($foundset); //Debug\n //Iterate over foundset[2]. They are the old_ids\n foreach($foundset[2] as $old_id) {\n //We get the needed variables here (course_modules id)\n $rec = backup_getid($restore->backup_unique_code,\"course_modules\",$old_id);\n //Personalize the searchstring\n $searchstring='/\\$@(QUIZVIEWBYID)\\*('.$old_id.')@\\$/';\n //If it is a link to this course, update the link to its new location\n if($rec->new_id) {\n //Now replace it\n $result= preg_replace($searchstring,$CFG->wwwroot.'/mod/quiz/view.php?id='.$rec->new_id,$result);\n } else {\n //It's a foreign link so leave it as original\n $result= preg_replace($searchstring,$restore->original_wwwroot.'/mod/quiz/view.php?id='.$old_id,$result);\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "572df28b97090ebeed613c4a402fd826", "score": "0.4553831", "text": "public function parseForm() {\n // ### Your e-mail (below) will be used only for contacting you in case there will be any problems. It will not be displayed online. ###\n // \n // Month: \n // Title of the theme: \n // File name shortcut: \n // Designer: \n // E-mail: \n // URL: \n // Country: \n //\n // Resolutions of my wallpapers (please mark available resolutions with [x]):\n // \n // [ ] 320x480 [ ] 640x480 [ ] 800x480 [ ] 800x600 [ ] 1024x768 \n // [ ] 1024x1024 [ ] 1152x864 [ ] 1280x720 [ ] 1280x800 [ ] 1280x960 \n // [ ] 1280x1024 [ ] 1400x1050 [x] 1440x900 [ ] 1600x1200 [ ] 1680x1050\n // [ ] 1680x1200 [ ] 1920x1080 [x] 1920x1200 [ ] 1920x1440 [ ] 2560x1440\n // \n // [ ] With calendar [ ] Without calendar\n // \n // [ ] .jpg [ ] .png\n //\n // Description: \n \n \n // Preparing the structure that will hold the\n // parsed data.\n $form_data = array();\n $form_data['info'] = array();\n $form_data['wallpapers'] = array();\n $form_data['wallpapers']['resolutions'] = array();\n \n // Retrieve all the entire file line by line.\n // and put it in an array.\n $array_of_lines = file($this->path_to_form_file);\n \n /* \n * The description parsed from the file.\n * This structure is out of the loop just\n * in case the description is written on\n * multiple lines.\n */\n $multi_line_description = array();\n \n // Let's loop on the retrieved lines.\n foreach ($array_of_lines as $line_num => $line) {\n // All lines begins by a tab. Let's remove it.\n $cleaned_line = trim($line);\n \n // From line 3 to line 9, we have basic information\n // about the artist.\n if ($line_num >= 3 && $line_num <= 9) {\n \n // Each piece of information is splitted as follows:\n // <type>: <value>\n $exploded_line = explode(':', $cleaned_line);\n \n // Hence, the type is the first element in\n // the array of token.\n $info_type = strtolower(str_replace(' ', '-', array_shift($exploded_line)));\n $info_value = implode(':', $exploded_line);\n \n // Finally, we put all of this into our\n // main structure.\n $form_data['info'][$info_type] = trim($info_value);\n \n // From line 13 to 16, we have the different\n // wallpaper resolutions available.\n } else if ($line_num >= 13 && $line_num <= 16) { // Wallpapers Resolutions\n \n // Each resolutions are separated by a tab.\n $exploded_line = explode(\"\\t\", $cleaned_line);\n \n // We loop through all resolution to get which\n // ones are available.\n foreach($exploded_line as $resolution) {\n \n // If it's not available, we ignore it.\n if(substr($resolution, 0, 3) == '[ ]') {\n continue;\n // but if it's available, we add the resolution\n // to our structure.\n } else {\n $form_data['wallpapers']['resolutions'][] = str_replace(substr($resolution, 0, 4), '', $resolution);\n }\n }\n \n // At line 18, we got whether or not there are\n // wallpapers versions with calendars.\n } else if ($line_num == 18) { \n $match = array();\n \n $regexp = '/\\[ *([ x]) *\\] (With) calendar[ ]+\\[ *([ x]) *\\] (Without) calendar/';\n \n // We look both for the x and the suffix\n // -out, discriminatin between the\n // two possibilities.\n if (preg_match($regexp, $cleaned_line, $match)) {\n \n $with_calendar = False;\n $without_calendar = False;\n\n if (count($match) == 5) { // If everything went right, we'll always have 5 matches\n $with_calendar = ($match[1] == \"x\" && $match[2] == \"With\");\n $without_calendar = ($match[3] == \"x\" && $match[4] == \"Without\");\n }\n\n if ($with_calendar && $without_calendar) {\n $form_data['wallpapers']['calendar'] = 'both';\n } else if ($with_calendar && !$without_calendar) {\n $form_data['wallpapers']['calendar'] = 'calendar-only';\n } else if (!$with_calendar && $without_calendar) {\n $form_data['wallpapers']['calendar'] = 'no-calendar-only';\n }\n }\n \n // At line 20, we have got the file formats.\n // (Either PNG of JPEG.)\n } else if ($line_num == 20) {\n $match = array();\n \n $regexp = '/\\[ *x *\\] (.png|.jpg)/';\n \n // We look both for the x and the suffix\n // -out, discriminating between the\n // two possibilities.\n if (preg_match($regexp, $cleaned_line, $match)) {\n\n if (count($match) > 1) {\n $form_data['wallpapers']['format'] = $match[1];\n } else {\n $form_data['wallpapers']['format'] = '.png';\n }\n }\n \n // At line 22 and beyond, we have a\n // short description of the work. \n } else if ($line_num >= 22) {\n \n // As before, description is formated this way:\n // description: <multi-line description>\n \n // First line, let's explode the line\n // and remove \"description:\"\n if ($line_num == 22) {\n $exploded_line = explode(':', $cleaned_line);\n \n // Remove \"description\".\n array_shift($exploded_line);\n \n // Turn the array back into string\n // and add it to our multi-line array.\n $multi_line_description[] = implode(':', $exploded_line);\n \n // Next lines\n } else {\n $multi_line_description[] = $cleaned_line;\n }\n }\n }\n \n // Concatenate all the lines of the description into a single string.\n $form_data['info']['description'] = implode(' ', $multi_line_description);\n \n return $form_data;\n }", "title": "" }, { "docid": "307a5cb8b7bcf21078e3b5c7e3d7599a", "score": "0.45446357", "text": "public function writeManifest()\n {\n if ($this->shouldRecompile()) {\n $this->writeManifestFile($this->compiled);\n }\n }", "title": "" }, { "docid": "1028cb2f638379a210aacf91474d4b55", "score": "0.45284063", "text": "function handle_questions_media(&$questions, $path, $courseid) {\n global $CFG;\n $errors = array();\n foreach ($questions as $key=>$question) {\n \n // todo: handle in-line media (specified in the question text)\n if (!empty($question->image)) {\n $location = $questions[$key]->image;\n $questions[$key]->mediaurl = $this->flatten_image_name($location);\n if (!@copy(\"{$CFG->dataroot}/$courseid/$location\", \"$path/{$questions[$key]->mediaurl}\")) {\n $errors[] = \"Failed to copy {$CFG->dataroot}/$courseid/$location to $path/{$questions[$key]->mediaurl}\";\n }\n if (empty($question->mediamimetype)) {\n $questions[$key]->mediamimetype = mimeinfo('type', $question->image);\n }\n }\n }\n \n return empty($errors) ? true : $errors;\n}", "title": "" }, { "docid": "ef4dcfcbfe3ed8edb86f9b5248e7d915", "score": "0.44974017", "text": "public function parse($id, $importrun_id, $dir, $file, $has_labels)\n {\n // Instantiate variables for Metadata processing\n $metadata_block = array();\n $metadata = array();\n $metadata_types = array();\n\n // We set the filename to be foldername + basename\n $filename = basename(dirname($file)).DIRECTORY_SEPARATOR.basename($file);\n $linenumber = 0;\n\n $handle = fopen($file, 'r');\n if ($handle) {\n while (($line = fgets($handle)) !== false) {\n ++$linenumber;\n\n // Don't process empty lines, but empty the metadata block\n if (trim($line) == '') {\n $metadata_block = array();\n continue;\n }\n\n // A metadata line in a plain-text file looks like:\n // ##META text genre = newspaper\n // which we should map to:\n // $type $name $value\n if (substr($line, 0, 6) === '##META') {\n $parts = array_map('trim', explode('=', $line));\n if (count($parts) == 1) {\n $msg = 'Metadata line not properly separated';\n $this->CI->importlog_model->add_log($importrun_id, LogLevel::Warn, $msg, $filename, $linenumber);\n continue;\n }\n\n $specs = array_map('trim', explode(' ', $parts[0])); // => everything before the first '=', separated by spaces\n $value = trim(substr($line, strpos($line, '=') + 1)); // => everything after the first '='\n\n if (count($specs) !== 3) {\n $msg = 'No proper metadata specification';\n $this->CI->importlog_model->add_log($importrun_id, LogLevel::Warn, $msg, $filename, $linenumber);\n continue;\n }\n\n $type = $specs[1];\n $name = $specs[2];\n\n if (!MetadataType::isValidValue($type)) {\n $msg = 'Unknown metadata type \"'.$type.'\"';\n $this->CI->importlog_model->add_log($importrun_id, LogLevel::Warn, $msg, $filename, $linenumber);\n continue;\n }\n\n // If we haven't had any metadata with this name yet, add an empty array of values\n if (!isset($metadata[$name])) {\n $metadata[$name] = array();\n $metadata_types[$name] = $type;\n }\n // If this name was not yet present in this block, reset the metadata for this field\n elseif (!in_array($name, $metadata_block)) {\n $metadata[$name] = array();\n array_push($metadata_block, $name);\n }\n\n // If no value has been provided, remove the name from the metadata array\n if (empty($value)) {\n unset($metadata[$name]);\n }\n // Otherwise, add the value to the metadata array\n else {\n array_push($metadata[$name], $value);\n }\n } else {\n ++$id;\n\n $this->split_label($id, $line, $has_labels, $label, $in);\n\n $xml_string = $this->call_alpino($in);\n\n // Write the result to an XML document, add a proper label and set metadata\n $xml = new DOMDocument();\n $xml->loadXML($xml_string);\n $this->add_label($xml, $label);\n $this->add_metadata($xml, $metadata, $metadata_types);\n $xml->save($dir.'/'.$id.'.xml');\n\n // We are now in a text block, empty the metadata block\n $metadata_block = array();\n }\n }\n\n fclose($handle);\n\n return $id;\n } else {\n echo 'Error opening file.';\n }\n }", "title": "" }, { "docid": "b3b7ec553cfcd7b3d7b16262aa326f7f", "score": "0.44793424", "text": "function copyfiles() \n {\n\n // Identify install path\n \t\n $install_path = $this->getSourcePath().DS.'base'; \n \n // Load manifest from install path\n \n $manifestFilename = $install_path.DS.'manifest.xml'; \n $manifest = VManifest::getInstance(); \n $result = $manifest->load($manifestFilename);\n if (VWP::isWarning($result)) {\n return $result;\n } \n \n // Setup path mapping\n \n if (empty($this->app_id)) {\n $fmapping = array(\n \"base\"=>\"theme\", \n \"setup\"=>\"setup\",\n ); \t\n } else {\n $fmapping = array(\n \"base\"=>\"application\",\n \"library\"=>\"library\",\n \"setup\"=>\"setup\",\n );\n }\n\n // Build file list\n \n $files = array();\n $ver = implode(\".\",$this->version()); \n $folders = $manifest->getFolders($ver); \n \n foreach($folders as $type=>$flist) {\n $cur_folder_id = $fmapping[$type];\n if (!isset($files[$cur_folder_id])) {\n $files[$cur_folder_id] = array();\n }\n \n $cur_offset_path = false; // used for app modules\n foreach($flist as $fname) { \n array_push($files[$cur_folder_id],array($cur_offset_path,$fname));\n } \n }\n \n // Install files\n \n return $this->install_files($files);\n }", "title": "" }, { "docid": "fabd4b6c476dd0fde934055ddc62f10f", "score": "0.44791973", "text": "public function createManifests(){\n //only update manifests when in dev\n if(!$this->kernel->isDebug()){\n foreach($this->config['local']['assets'] as $extension=>$assetsArray){\n $this->generateFileHash($extension,$remake=true);\n }\n return;\n }\n\n $currentRequest = $this->requestStack->getCurrentRequest();\n\n //manifest source\n $manifestRoot = __DIR__.'/Resources/manifests';\n $publicRoot = __DIR__.'/Resources/public';\n $manifestSrcs = array(\n \"pageAssets\" => $manifestRoot . '/pageAssets.json',\n \"assetHashes\" => $manifestRoot . '/assetHashes.json',\n );\n $manifests = array();\n //create files if they don't exist\n foreach($manifestSrcs as $manifestKey=>$manifestSrc){\n if(!file_exists($manifestSrc)){\n touch($manifestSrc);\n }\n $manifests[$manifestKey] = json_decode(file_get_contents($manifestSrc),true);\n }\n $origManifests = $manifests;\n\n //reset the pageAssets manifest data for this page, we are recreating it here\n $manifests['pageAssets'][$currentRequest->get(\"_route\")] = array();\n foreach($this->config['local']['assets'] as $extension=>$assetsArray){\n $this->generateFileHash($extension,$remake=true);\n //this this asset set path - e.g. 123456ab.css\n $path = $this->getLocalAssetPath($extension);\n\n //set the manifest array for the asset hashes and what files it will contain\n //key will simply be the file name\n $manifests['assetHashes'][$this->fileHashes[$extension]] = array(\n \"src\"=>$assetsArray,\n \"dest\"=>\"$extension\",\n \"includeBower\"=>$this->config['local']['includeBower']\n );\n\n //set the pageAssets so we know that's the file we want to use for the page\n //this will be the path including bundles/bwassets/$extension/file.$extension\n $manifests['pageAssets'][$currentRequest->get(\"_route\")][$extension] = $this->fileHashes[$extension];\n }\n\n //check through pageAssets to see al the hashes that are being used\n //delete all files that are no longer used and remove them from the manifest for gulp to create\n //find out all hashes that are being used now\n $allUsedHashes = array();\n foreach($manifests['pageAssets'] as $pageKey=>$pageAssets){\n foreach($pageAssets as $ext=>$pageAsset){\n $allUsedHashes[] = $pageAsset;\n }\n }\n //check manifest that gulp will use to create files\n foreach($manifests['assetHashes'] as $assetsKey=>$assetsArray){\n if(!in_array($assetsKey,$allUsedHashes)){\n //remove from the manifest - gulp will process this manifest and recreate the revisions manifest\n //the revisions manifest will no longer have this file in it, so in revisions cleanup the file fill be deleted\n unset($manifests['assetHashes'][$assetsKey]);\n }\n }\n //update all the manifest files\n foreach($manifestSrcs as $manifestKey=>$manifestSrc){\n if($origManifests[$manifestKey]!==$manifests[$manifestKey]){\n @file_put_contents($manifestSrc,json_encode($manifests[$manifestKey],JSON_PRETTY_PRINT));\n\n if($manifestKey=='assetHashes'){\n //if coonfig set to run gulp on page load, and the manifest keys have changed, and there are some asset hashes for this page - then we run gulp for the file hashes on this page\n if($this->config['local']['gulpOnLoad'] && sizeof($this->fileHashes[$extension])>0){\n $exec = 'gulp -f=\"'.join('\" -f=\"',$this->fileHashes).'\"';\n //die($exec);\n exec($exec);\n }\n }\n }\n }\n\n \n }", "title": "" }, { "docid": "48f512adf2cf15b77b657dd7612ab956", "score": "0.44697592", "text": "public function readMeta() {\r\n\r\n //\tMeta File\r\n $fileData = @json_decode($this->app['files']->get($this->modulePath($this->app['laravel-modules']->getConfig('meta_file')), true));\r\n\r\n //\tCheck Data\r\n if ($fileData) {\r\n\r\n //\tStore Meta Data\r\n $this->version = (isset($fileData->version) ? $fileData->version : \"alpha\");\r\n $this->moduleName = (isset($fileData->name) ? $fileData->name : $this->name);\r\n $this->moduleDescription = (isset($fileData->description) ? $fileData->description : $this->name);\r\n $this->order = (isset($fileData->order) ? $fileData->order : 0);\r\n $this->locked = (isset($fileData->locked) ? (bool)intval($fileData->locked) : false);\r\n\r\n //\tStore Dependency\r\n $dependency = array();\r\n if (isset($fileData->dependsOn)) {\r\n foreach ($fileData->dependsOn as $dKey => $dVer)\r\n $dependency[$dKey] = $dVer;\r\n }\r\n $this->dependsOn = $dependency;\r\n\r\n //\tMetadata\r\n $metaData = array();\r\n\r\n //\tLoop Each Metadata\r\n foreach ($fileData as $key => $val) {\r\n\r\n //\tStore Metadata\r\n $metaData[$key] = (is_object($val) ? (array) $val : $val);\r\n }\r\n\r\n //\tStore Meta Data Instance\r\n $this->metaData = $metaData;\r\n } else {\r\n\r\n //\tSet Invalid\r\n $this->is_valid = false;\r\n }\r\n }", "title": "" }, { "docid": "b5f4e6f6487bcaf4149930f497a4cc5e", "score": "0.44640526", "text": "private function getAbsManifest(array $fileInfo): array\n {\n Assert::assertTrue($fileInfo['isSliced']);\n\n return [\n 'is_sliced' => $fileInfo['isSliced'],\n 'region' => $fileInfo['region'],\n 'container' => $fileInfo['absPath']['container'],\n 'name' => $fileInfo['isSliced'] ? $fileInfo['absPath']['name'] . 'manifest' : $fileInfo['absPath']['name'],\n 'credentials' => [\n 'sas_connection_string' => $fileInfo['absCredentials']['SASConnectionString'],\n 'expiration' => $fileInfo['absCredentials']['expiration'],\n ],\n ];\n }", "title": "" }, { "docid": "d367f3b58f6e2e905e23912611d5c499", "score": "0.44638216", "text": "private function _setManifestAndCache($manifest): void {\n $this->setManifest($manifest);\n\n $pool = Cache::getPool();\n\n $item = $pool->getItem('dpkg/hash');\n $item->set(md5_file($this->_path));\n $pool->save($item);\n\n $item = $pool->getItem('dpkg/manifest');\n $item->set($manifest);\n $pool->save($item);\n }", "title": "" }, { "docid": "02f415a7520fc1d82feedf3f321bb923", "score": "0.44407693", "text": "function process($content='', $type='', $conf=array())\t{\r\n\t\t$this->conf = $conf;\r\n\r\n\t\t$this->out = array();\r\n\t\t$this->out['fields'] = array();\r\n\t\t$this->meta = array();\r\n\t\t$this->iptc = array();\r\n\t\t$this->info['exec'] = 'perl';\r\n\r\n\t\t// TS PAGE-Config\r\n\t\t$page_id = $this->conf['meta']['fields']['pid'];\r\n\t\t$this->service_conf = t3lib_BEfunc::getModTSconfig($page_id,'tx_exiftool_sv1');\r\n\r\n\t\t$this->service_conf['properties']['exiftoolparams'] = mb_strlen($this->service_conf['properties']['exiftoolparams']) > 0?$this->service_conf['properties']['exiftoolparams']:' -S -iptc:all ';\r\n\t\t$this->info['params'] = ' '.t3lib_extMgm::extPath('exiftool').'exiftool/exiftool '.$this->service_conf['properties']['exifparams'].' ';\r\n\r\n\t\t$match = $this->service_conf['properties']['match.'];\r\n// t3lib_div::debug('exiftool'.$page_id);\r\n// t3lib_div::debug($this->service_conf);\r\n\t\tif($inputFile = $this->getInputFile()) {\r\n\t\t\t$cmd = t3lib_exec::getCommand($this->info['exec']).$this->info['params'].' \"'.$inputFile.'\"';\r\n\t\t\t$output = array();\r\n\t\t\t$ret = -1;\r\n\t\t\texec($cmd, $output, $ret);\r\n\t\t\tif (1 == $this->service_conf['properties']['debug']) {\r\n\t\t\t\t$this->devlog('Unparsed Meta-Data', 0, $output);\r\n\t\t\t}\r\n\r\n\t\t\tif ($ret != 0) {\r\n\t\t\t\t// TODO: do some magick error handling - however?\r\n\t\t\t\t$this->devlog('exec return error', 3, $ret);\r\n\t\t\t}\r\n\t\t\t$t3lib_cs = t3lib_div::makeInstance(\"t3lib_cs\");\r\n\t\t\t$this->service_conf['properties']['fileCharset'] = $t3lib_cs->parse_charset($this->service_conf['properties']['fileCharset']);\r\n\t\t\t// check if charset is known by TYPO3\r\n\t\t\tif (false === array_search($this->service_conf['properties']['fileCharset'], $t3lib_cs->synonyms)) {\r\n\t\t\t\t// TODO: error handling\r\n\t\t\t\t$this->devlog('unknown charset', 2, $this->service_conf['properties']['fileCharset']);\r\n\t\t\t\t$this->service_conf['properties']['fileCharset'] = 'utf-8';\r\n\t\t\t}\r\n\r\n// TODO: Character Conversion!\r\n\t\t\t// character conversion, before postProcess,\r\n\t\t\t// so we could compare fields in database with fields\r\n\t\t\t// from our metadata\r\n\t\t\t// $t3lib_cs->convArray($this->iptc, $service_conf['properties']['fromCharset'], $this->conf['wantedCharset'], true);\r\n\t\t\t// $t3lib_cs->convArray($this->out['fields'], $service_conf['properties']['fromCharset'], $this->conf['wantedCharset'], true);\r\n\t\t\t$t3lib_cs->convArray($output, $this->service_conf['properties']['fileCharset'], $this->conf['wantedCharset'], true);\r\n\r\n\t\t\t$outputArray = array();\r\n\t\t\tforeach ($output as $str) {\r\n\t\t\t\t// exiftool gives us \"editstatus : value of editstatus\"\r\n\t\t\t\t// so we have to split at the first \":\" and trim than\r\n\t\t\t\t$key = mb_strtolower(trim(mb_substr($str, 0, mb_strpos($str,':'))));\r\n\t\t\t\t$value = trim(mb_substr($str,mb_strpos($str,':')+1));\r\n\t\t\t\t$outputArray[$key] = $value;\r\n\t\t\t}\r\n\t\t\t// TODO: check internal Vars - they are not used correctly\r\n\t\t\tif (!is_array($match)) { return false; }\r\n\t\t\tforeach ($match as $field => $exiftag) {\r\n\t\t\t\tif ('.' == mb_substr($field,-1,1)) {\r\n\t\t\t\t\t// we can do things like:\r\n\t\t\t\t\t// abstract = description\r\n\t\t\t\t\t// abstract.1 = abstract\r\n\t\t\t\t\t// abstract.2 = something else\r\n\t\t\t\t\t//\r\n\t\t\t\t\t// abstract.1 should only be processed after \"abstract\"\r\n\t\t\t\t\t// if \"abstract\" exists, we should skip all \"abstract.x\" because they\r\n\t\t\t\t\t// are processed right after \"abstract\"\r\n\t\t\t\t\tif (isset($match[mb_substr($field,0,-1)])) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// if \"abstract\" does not exists, we should create it,\r\n\t\t\t\t\t// so \"abstract.x\" will be processed too\r\n\t\t\t\t\t$field = mb_substr($field,0,-1);\r\n\t\t\t\t\t$exiftag = '';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// via PAGE-TS setting we can define in which field\r\n\t\t\t\t// the value should be stored\r\n\t\t\t\t$this->iptc[$field] = (!isset($outputArray[mb_strtolower($exiftag)]))?'':''.$outputArray[mb_strtolower($exiftag)];\r\n\t\t\t\t// If there is no default Config, or empty content, test for other\r\n\t\t\t\t// fields. f.e. no IPTC data, but EXIF or XMP\r\n\t\t\t\tif (0 == mb_strlen($this->iptc[$field]) && isset($match[$field.'.'])) {\r\n\t\t\t\t\t$i = 1;\r\n\t\t\t\t\twhile (0 == mb_strlen($this->iptc[$field]) && isset($match[$field.'.'][$i])) {\r\n\t\t\t\t\t\t// f.e.\r\n\t\t\t\t\t\t// abstract = description\r\n\t\t\t\t\t\t// abstract.1 = abstract\r\n\t\t\t\t\t\t// abstract.2 = something else\r\n\t\t\t\t\t\t$this->iptc[$field] = (!isset($outputArray[mb_strtolower($match[$field.'.'][$i])]))?'':''.$outputArray[mb_strtolower($match[$field.'.'][$i])];\r\n\t\t\t\t\t\t$i++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->out['fields'][$field] = $this->iptc[$field];\r\n\t\t\t}\r\n\t\t\t// TODO: conversion of Informations, f.e. Date, Keywords etc.\r\n\t\t\t// TODO: build hook\r\n\r\n\t\t\t$this->postProcess();\r\n\t\t\t$this->out['fields']['meta']['iptc'] = $this->iptc;\r\n// t3lib_div::debug($this->out['fields']);\r\n\t\t\tif (1 == $this->service_conf['properties']['debug']) {\r\n\t\t\t\t$this->devlog('Parsed Meta-Data', 0, $this->out['fields']);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->errorPush(T3_ERR_SV_NO_INPUT, 'No or empty input.');\r\n\t\t}\r\n\t\treturn $this->getLastError();\r\n\t}", "title": "" }, { "docid": "f7f06c2702ee36c1d0027a28fe738bce", "score": "0.44391063", "text": "private function extractRules()\n {\n // Keep in mind we don't support recursive directories (or cache the results)\n $possibleModels = glob(Strata::getSRCPath() . \"Model\" . DIRECTORY_SEPARATOR . \"*.php\");\n $this->batchModelFileRegistrationAttempt((array)$possibleModels);\n\n $possibleTaxonomies = glob(Strata::getSRCPath() . \"Model\" . DIRECTORY_SEPARATOR . \"Taxonomy\" . DIRECTORY_SEPARATOR . \"*.php\");\n $this->batchTaxonomyFileRegistrationAttempt((array)$possibleTaxonomies);\n }", "title": "" }, { "docid": "996f0f623d714f42d6bf9ea3b81f9933", "score": "0.44109085", "text": "function extract()\r\n\t{\r\n\t\tif ( !$this->is_phx )\r\n\t\t{\r\n\t\t\tforeach ( $this->package_files as $package_file )\r\n\t\t\t{\r\n\t\t\t\t$fp = fopen($package_file, 'rb');\r\n\t\t\t\tif ( $fp )\r\n\t\t\t\t{\r\n\t\t\t\t\t$package_string = fread($fp, filesize($package_file));\r\n\t\t\t\t}\r\n\t\t\t\tfclose($fp);\r\n\t\t\t\t\r\n\t\t\t\t$this->files[] = unserialize($package_string);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->files[] = unserialize(PHX_STREAM);\r\n\t\t}\r\n\t\t\r\n\t\tif ( $this->_decodeFiles() )\r\n\t\t\tif ($this->writeFiles() )\r\n\t\t\t{\r\n\t\t\t\t$this->_do();\r\n\t\t\t\t$this->_cleanup();\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse return false;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "title": "" }, { "docid": "20988f2f6fc55fa562009753f6e77998", "score": "0.4403214", "text": "private function _embedTags()\n {\n MusicTugHelper::log(\"Going to embed tags\");\n\n $shell = null;\n $inPath = $this->_path[trackAbs];\n $outPath = $this->_path[trackAbs] . '.tags.' . $this->_config[trackExt];\n $meta = MusicTugHelper::formatMeta($this->_stream[tags][meta], $this->_config[trackExt]);\n \n if ($this->_config[trackExt] == 'm4a') {\n $shell = 'AtomicParsley.exe \"' . $inPath . '\" ' . $meta . ' --output \"' . $outPath . '\"';\n } else {\n $shell = 'ffmpeg.exe -i \"' . $inPath . '\" -acodec copy ' . $meta . ' \"' . $outPath . '\" -y';\n }\n if ($shell AND $meta) {\n $this->_execShell($shell);\n }\n\n if (is_file($outPath)) {\n unlink($inPath);\n rename($outPath, $inPath);\n }\n }", "title": "" }, { "docid": "7bbe3e11acf35e5a08905e951736ab3c", "score": "0.4387208", "text": "private function processXMLFile($fileName,$pathFrag='') { \n\t\t if ($this->symbiotaClassPath!=null) {\n\t\t\t $foundSchema = false;\n\t\t\t $xml = XMLReader::open($this->sourcePathBase.$pathFrag.$fileName);\n\t\t\t if($xml->read()) {\n\t\t\t\t\t// $this->logOrEcho($fileName.\" first node: \". $xml->name);\n\t\t\t\t\tif ($xml->name==\"DataSet\") {\t \n\t\t\t\t\t\t $xml = XMLReader::open($this->sourcePathBase.$pathFrag.$fileName);\n\t\t\t\t\t\t $lapischema = $this->serverRoot . \"/collections/admin/schemas/lapi_schema_v2.xsd\";\n\t\t\t\t\t\t $xml->setParserProperty(XMLReader::VALIDATE, true);\n\t\t\t\t\t\t if (file_exists($lapischema)) { \n\t\t\t\t\t\t\t $isLapi = $xml->setSchema($lapischema);\n\t\t\t\t\t\t } \n\t\t\t\t\t\t else { \n\t\t\t\t\t\t\t $this->logOrEcho(\"\\tERROR: Can't find $lapischema\");\n\t\t\t\t\t\t }\n\t\t\t\t\t\t // $this->logOrEcho($fileName.\" valid lapi xml:\" . $xml->isValid() . \" [\" . $isLapi . \"]\");\n\t\t\t\t\t\t if ($xml->isValid() && $isLapi) {\n\t\t\t\t\t\t\t // File complies with the Aluka/LAPI/GPI schema\n\t\t\t\t\t\t\t $this->logOrEcho('Processing GPI batch file: '.$pathFrag.$fileName);\n\t\t\t\t\t\t\t if (class_exists('GPIProcessor')) { \n\t\t\t\t\t\t\t\t\t$processor = new GPIProcessor();\n\t\t\t\t\t\t\t\t\t$result = $processor->process($this->sourcePathBase.$pathFrag.$fileName);\n\t\t\t\t\t\t\t\t\t$foundSchema = $result->couldparse;\n\t\t\t\t\t\t\t\t\tif (!$foundSchema || $result->failurecount>0) {\n\t\t\t\t\t\t\t\t\t\t$this->logOrEcho(\"\\tERROR: Errors processing $fileName: $result->errors.\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t else { \n\t\t\t\t\t\t\t\t\t// fail gracefully if this instalation isn't configured with this parser.\n\t\t\t\t\t\t\t\t\t$this->logOrEcho(\"\\tERROR: SpecProcessorGPI.php not available.\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\telseif ($xml->name==\"rdf:RDF\") { \n\t\t\t\t\t\t // $this->logOrEcho($fileName.\" has oa:\" . $xml->lookupNamespace(\"oa\"));\n\t\t\t\t\t\t // $this->logOrEcho($fileName.\" has oad:\" . $xml->lookupNamespace(\"oad\"));\n\t\t\t\t\t\t // $this->logOrEcho($fileName.\" has dwcFP:\" . $xml->lookupNamespace(\"dwcFP\"));\n\t\t\t\t\t\t $hasAnnotation = $xml->lookupNamespace(\"oa\");\n\t\t\t\t\t\t $hasDataAnnotation = $xml->lookupNamespace(\"oad\");\n\t\t\t\t\t\t $hasdwcFP = $xml->lookupNamespace(\"dwcFP\");\n\t\t\t\t\t\t // Note: contra the PHP xmlreader documentation, lookupNamespace\n\t\t\t\t\t\t // returns the namespace string not a boolean.\n\t\t\t\t\t\t if ($hasAnnotation && $hasDataAnnotation && $hasdwcFP) {\n\t\t\t\t\t\t\t // File is likely an annotation containing DarwinCore data.\n\t\t\t\t\t\t\t $this->logOrEcho('Processing RDF/XML annotation file: '.$pathFrag.$fileName);\n\t\t\t\t\t\t\t if (class_exists('NEVPProcessor')) { \n\t\t\t\t\t\t\t\t\t$processor = new NEVPProcessor();\n\t\t\t\t\t\t\t\t\t$result = $processor->process($this->sourcePathBase.$pathFrag.$fileName);\n\t\t\t\t\t\t\t\t\t$foundSchema = $result->couldparse;\n\t\t\t\t\t\t\t\t\tif (!$foundSchema || $result->failurecount>0) {\n\t\t\t\t\t\t\t\t\t\t$this->logOrEcho(\"\\tERROR: Errors processing $fileName: $result->errors.\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else { \n\t\t\t\t\t\t\t\t\t// fail gracefully if this instalation isn't configured with this parser.\n\t\t\t\t\t\t\t\t\t$this->logOrEcho(\"\\tERROR: SpecProcessorNEVP.php not available.\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\tif ($foundSchema>0) { \n\t\t\t\t\t\t$this->logOrEcho(\"Proccessed $pathFrag$fileName, records: $result->recordcount, success: $result->successcount, failures: $result->failurecount, inserts: $result->insertcount, updates: $result->updatecount.\");\n\t\t\t\t\t\tif($this->keepOrig){\n\t\t\t\t\t\t\t$oldFile = $this->sourcePathBase.$pathFrag.$fileName;\n\t\t\t\t\t\t\t$newFileName = substr($pathFrag,strrpos($pathFrag,'/')).'orig_'.time().'.'.$fileName;\n\t\t\t\t\t\t\tif(!file_exists($this->targetPathBase.$this->targetPathFrag.'orig_xml')){\n\t\t\t\t\t\t\t\tmkdir($this->targetPathBase.$this->targetPathFrag.'orig_xml');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!rename($oldFile,$this->targetPathBase.$this->targetPathFrag.'orig_xml/'.$newFileName)){\n\t\t\t\t\t\t\t\t$this->logOrEcho(\"\\tERROR: unable to move (\".$fileName.\") \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t } \n\t\t\t\t\t\t else {\n\t\t\t\t\t\t\tif(!unlink($oldFile)){\n\t\t\t\t\t\t\t\t$this->logOrEcho(\"\\tERROR: unable to delete file (\".$fileName.\") \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\telse { \n\t\t\t\t\t\t $this->logOrEcho(\"\\tERROR: Unable to match \".$pathFrag.$fileName.\" to a known schema.\");\n\t\t\t\t\t}\n\t\t\t } \n\t\t\t else { \n\t\t\t\t\t$this->logOrEcho(\"\\tERROR: XMLReader couldn't read \".$pathFrag.$fileName);\n\t\t\t }\n\t\t }\n\t}", "title": "" }, { "docid": "03319edb6b245cf4bfbc67859ca7e3bc", "score": "0.43770778", "text": "function usp_set_plugin_meta($links, $file) {\n\t$plugin = plugin_basename(__FILE__);\n\n\t// create link\n\tif ($file === $plugin) {\n\t\t$view_details_msg = esc_html__(\"View Details\", \"ultimate-subscribe-pro\");\n\t\treturn array_merge(\n\t\t\t$links,\n\t\t\t[\"<a href=\\\"admin.php?page=subscribepro_forms\\\">$view_details_msg</a>\"]\n\t\t);\n\t}\n\n\treturn $links;\n}", "title": "" }, { "docid": "1c2b2103ffc2ae30afd730882ba21039", "score": "0.4362278", "text": "function createManifest() {\n\t\t$manifestDoc = new DOMDocument('1.0', 'UTF-8');\n\t\t$root = $manifestDoc->createElement('manifest:manifest');\n\t\t$root->setAttribute('xmlns:manifest', 'urn:oasis:names:tc:opendocument:xmlns:manifest:1.0');\n\t\t$root->setAttribute('office:version', \"1.1\");\n\t\t$manifestDoc->appendChild($root);\n\n\t\t$fileEntryRoot = $manifestDoc->createElement('manifest:file-entry');\n\t\t$fileEntryRoot->setAttribute('manifest:media-type', 'application/vnd.oasis.opendocument.text');\n\t\t$fileEntryRoot->setAttribute('manifest:full-path', '/');\n\t\t$root->appendChild($fileEntryRoot);\n\n\t\t$fileEntryContent = $manifestDoc->createElement('manifest:file-entry');\n\t\t$fileEntryContent->setAttribute('manifest:media-type', 'text/xml');\n\t\t$fileEntryContent->setAttribute('manifest:full-path', 'content.xml');\n\t\t$root->appendChild($fileEntryContent);\n\n\t\t$fileEntryStyles = $manifestDoc->createElement('manifest:file-entry');\n\t\t$fileEntryStyles->setAttribute('manifest:media-type', 'text/xml');\n\t\t$fileEntryStyles->setAttribute('manifest:full-path', 'styles.xml');\n\t\t$root->appendChild($fileEntryStyles);\n\n\t\t$fileEntryMeta = $manifestDoc->createElement('manifest:file-entry');\n\t\t$fileEntryMeta->setAttribute('manifest:media-type', 'text/xml');\n\t\t$fileEntryMeta->setAttribute('manifest:full-path', 'meta.xml');\n\t\t$root->appendChild($fileEntryMeta);\n\n\t\t$this->manifest = $manifestDoc;\n\t}", "title": "" }, { "docid": "aedf3de9022b40c14313b4165be05197", "score": "0.43507755", "text": "public function writeFreshManifest()\n {\n $this->writeManifestFile($this->manifest = []);\n }", "title": "" }, { "docid": "bcacb0a55d146b87954d362891d0825b", "score": "0.43491036", "text": "function scholar_batch_ingest_ris_document($filename, $collection_pid, $content_model_pid, array &$context) {\n module_load_include('inc', 'bibutils', 'Batch');\n module_load_include('inc', 'bibutils', 'Bibutils');\n // This code removes ^M characters that are present in exported Refworks files\n // which don't show up as new lines in linux.\n $initial_ris = file_get_contents($filename);\n $cleaned_ris = str_replace(\"\\x0D\", \"\\n\", trim($initial_ris));\n $initial_file = fopen($filename, 'w');\n fwrite($initial_file, $cleaned_ris);\n fclose($initial_file);\n \n if (empty($context['sandbox'])) {\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['total'] = bibutils_batch_get_number_ris_records($filename);\n }\n \n $temp_file_dir = file_directory_path(); // Changed the temp dir so that the files can be accessed\n $mods_filename = file_create_filename('mods.xml', $temp_file_dir);\n $ris_filename = file_create_filename('ris.txt', $temp_file_dir);\n $record = bibutils_batch_get_ris_record($filename); // Get Single RIS Record\n $file = fopen($ris_filename, 'w');\n fwrite($file, $record);\n fclose($file);\n \n if (Bibutils::Convert($ris_filename, 'RIS', $mods_filename, 'MODS')) {\n $ris_url = file_directory_path() . '/ris.txt';\n scholar_batch_ingest_mods($mods_filename, $collection_pid, $content_model_pid, array('RIS' => $ris_url));\n }\n // Remove the files.\n// unlink($ris_filename);\n// unlink($mods_filename);\n $context['sandbox']['progress']++;\n if ($context['sandbox']['progress'] != $context['sandbox']['total'] && $context['sandbox']['total'] != 0) {\n $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['total'];\n }\n}", "title": "" }, { "docid": "c11842e415b4919a2c5235360b8ef430", "score": "0.43360445", "text": "private function _fix_media_urls($manifest, &$result){\n //log_message('debug', 'going to fix media urls');\n if (isset($manifest) && $manifest !== FALSE)\n {\n foreach ($result->xpath('/root/form/descendant::*[@src]') as $el)\n {\n $src = (string) $el['src'];\n $el['src'] = '';\n foreach ( $manifest->mediaFile as $m )\n {\n if ($src == $m->filename)\n {\n $el['src'] = $m->downloadUrl;\n break;\n }\n } \n }\n foreach ( $manifest->mediaFile as $m )\n {\n if ($m->filename == 'form_logo.png')\n {\n $logo = $result->form->section[0]->addChild('img');\n $logo->addAttribute('src', $m->downloadUrl);\n $logo->addAttribute('alt', 'form logo');\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "93b25852b64b375b587c00175bf08791", "score": "0.43084845", "text": "public function getMetaData(){\n if(!file_exists($this->fileName)){\n echo \"Error! {$this->fileName} does not exist.<br />\";\n return false;\n }\n if(!is_readable($this->fileName)){\n echo \"Error! Could not read the file. Check the file permissions.<br />\";\n return false;\n }\n $f = @fopen($this->fileName,\"rb\");\n if(!$f){\n echo \"Unknown Error! Could not read the file.<br />\";\n return;\n }\n $signature = fread($f,3);\n if($signature != \"FLV\"){\n echo \"Error! Wrong file format.\";\n return false;\n }\n $this->metaData[\"version\"] = ord(fread($f,1));\n $this->metaData[\"size\"] = filesize($this->fileName);\n\n $flags = ord(fread($f,1));\n $flags = sprintf(\"%'04b\", $flags);\n $this->typeFlagsAudio = substr($flags, 1, 1);\n $this->typeFlagsVideo = substr($flags, 3, 1);\n\n for ($i=0; $i < 4; $i++) {\n $this->metaData[\"headersize\"] += ord(fread($f,1)) ;\n }\n\n $this->buffer = fread($f, 400);\n fclose($f);\n if(strpos($this->buffer, \"onMetaData\") === false){\n echo \"Error! No MetaData Exists.\";\n return false;\n }\n\n foreach($this->metaData as $k=>$v){\n $this->parseBuffer($k);\n }\n return $this->metaData;\n }", "title": "" }, { "docid": "f5a785204aab768bc6201c71e276ed33", "score": "0.42970613", "text": "public function parseassetsAction()\n {\n $dirname = $this->getRequest()->getParam('dirname');\n\n $files = new RecursiveIteratorIterator(\n new RecursiveDirectoryiterator($dirname)\n );\n\n $allowed_exts = ['jpg', 'jpeg', 'png', 'gif', 'tiff', 'tif', 'mov', 'mp4', 'm4v'];\n $image_exts = ['jpg', 'jpeg', 'png', 'gif', 'tiff', 'tif'];\n $video_exts = ['mov', 'mp4', 'm4v'];\n\n $partIdArr = array();\n\n foreach ($files as $file) {\n if (!in_array(strtolower($file->getExtension()), $allowed_exts)) {\n continue;\n }\n\n $videoType = null;\n $picType = null;\n $assetType = null;\n\n $path = $file->getPath();\n $fileName = $file->getFilename();\n $fullPath = $file->getPathname();\n $size = $file->getSize();\n $mtime = $file->getMTime();\n $ext = strtolower($file->getExtension());\n\n if (in_array(strtolower($file->getExtension()), $image_exts)) {\n $assetType = 'picture';\n } elseif (in_array(strtolower($file->getExtension()), $video_exts)) {\n $assetType = 'video';\n }\n\n $finfo = finfo_open(FILEINFO_MIME);\n $mimeArr = explode(';', finfo_file($finfo, $fullPath));\n $mime = $mimeArr[0];\n finfo_close($finfo);\n\n $partTmpArr = explode('.', $fileName);\n $partArr = explode('_', $partTmpArr[0]);\n//var_dump($fileName);\n//exit;\n//print_r($partArr);exit; \n \n if ($assetType == 'picture') {\n if (!is_array($partArr) || count($partArr) < 3) {\n continue;\n }\n\n $partNumber = $partArr[0];\n $picType = strtoupper($partArr[1]);\n\n if ($picType != 'P01' && $picType != 'P03' && $picType != 'P04' && $picType != 'P05' && $picType != 'P06' && $picType != 'P07') {\n continue;\n }\n\n $resolution = strtoupper($partArr[2]);\n \n if(isset($partArr[3]))\n {\n \t$sequence = $partArr[3];\n }\n else\n {\n \t$sequence = 1;\n }\n \n \n /*\n if (preg_match('/_/', $resolution)) {\n $resArr = explode('_', $resolution);\n $resolution = $resArr[0];\n $sequence = $resArr[1];\n } else {\n $sequence = 1;\n }\n */\n \n\n $dimensions = getimagesize($fullPath);\n } elseif ($assetType == 'video') {\n\n }\n\n $part = $this->partService->getPartByPartNumber($partNumber);\n\n if (null != $part) {\n if (!in_array($part->getPartId(), $partIdArr)) {\n $partIdArr[] = $part->getPartId();\n }\n\n $stat = array(\n 'size' => $size,\n 'mime' => $mime,\n 'ext' => $ext,\n );\n\n if ($assetType == 'picture') {\n $stat['filetype'] = 'partimage';\n $stat['width'] = $dimensions[0];\n $stat['height'] = $dimensions[1];\n } elseif ($assetType == 'video') {\n $stat['filetype'] = 'partvideo';\n }\n\n $hashPath = 'library/products/parts/'.$fileName;\n $hash = strtr(base64_encode($hashPath), '+/=', '-_.');\n $hash = rtrim($hash, '.');\n $hash = 'l1_'.$hash;\n\n $asset = $this->assetService->getAssetPrototype();;\n $asset = $this->assetService->saveFile('library/products/parts', $fileName, $stat, $hash);\n\n if ($asset instanceof AssetInterface) {\n $ingest_asset_command = 'mv \"' . $fullPath . '\" \"' . realpath(__DIR__ . '/../../../../../public/assets/library/products/parts') . '/' . $fileName . '\"';\n shell_exec($ingest_asset_command);\n } else {\n // Error creating asset\n continue;\n }\n\n $amazonName = null;\n\n if (!$this->partAssetService->duplicateCheck($part, $asset)) {\n $partAsset = $this->partAssetService->create($part, $asset, $amazonName, $picType, $sequence, $assetType, $videoType);\n }\n }\n\n $this->partAssetService->flushObject();\n }\n\n $this->cleanUpAmazon($partIdArr);\n }", "title": "" }, { "docid": "624038d06b80ca1e20e3aeab43253a9e", "score": "0.42855793", "text": "function PreProcessItemData()\n {\n array_push\n (\n $this->ItemDataFiles,\n \"Data.Certificate.php\"\n );\n }", "title": "" }, { "docid": "6f2f2ac490ce527d9c7460609b34ffa3", "score": "0.42706487", "text": "protected function after_execute() {\n // Add choice related files, no need to match by itemname (just internally handled context)!\n $this->add_related_files('mod_via', 'intro', null);\n $this->add_related_files('mod_via', 'content', null);\n }", "title": "" }, { "docid": "ea1b213ba88150f8d03c616297d3e0a6", "score": "0.42552942", "text": "public function addFile(): void\n {\n // Add all attributes associated with file\n }", "title": "" }, { "docid": "68debed77b1efb8a458807a3e9e37801", "score": "0.42529818", "text": "public function process() {\n if (!$assetsList = $this->assetsGetList()) {\n // todo\n return;\n }\n\n foreach ($assetsList as $item) {\n // add a check\n $content = file_get_contents($item);\n $test = $this->local_docroot . str_replace($this->base_url .'/'. $this->remote_docroot, '', $item);\n\n // dir doesn't exist, make it\n if (!is_dir(dirname($test))) {\n mkdir(dirname($test), 0755, true);\n }\n\n file_put_contents($test, $content);\n echo AssetsLoaderLogs::status($test);\n }\n }", "title": "" }, { "docid": "434c3edf695425e2d1bc57ce843fdd8a", "score": "0.42484376", "text": "protected function identifyLink($Excerpt)\n {\n $Excerpt = parent::identifyLink($Excerpt);\n $actions = array();\n $command = '';\n $config = self::$grav['config'];\n $base_url = trim($config->get('system.base_url_relative'));\n $base_url_full = trim($config->get('system.base_url_absolute'));\n\n // if this is a link\n if (isset($Excerpt['element']['attributes']['href'])) {\n\n $url = parse_url(htmlspecialchars_decode($Excerpt['element']['attributes']['href']));\n\n // if there is no host set but there is a path, the file is local\n if (!isset($url['host']) && isset($url['path'])) {\n\n $markdown_url = $url['path'];\n $not_relative_urls = ['/','http://','https://'];\n $valid = true;\n\n // make sure the url is relative\n foreach ($not_relative_urls as $needle) {\n if (strpos($markdown_url, $needle) === 0) {\n $valid = false;\n break;\n }\n }\n\n // if it is a valid relative url being the transformation\n if ($valid) {\n\n $relative_path = rtrim($base_url, '/') . $this->page->route();\n\n // If this is a 'real' filepath clean it up\n if (file_exists($this->page->path().'/'.$markdown_url)) {\n $relative_path = rtrim($base_url, '/') .\n preg_replace('/\\/([\\d]+.)/', '/',\n str_replace(PAGES_DIR, '/', $this->page->path()));\n $markdown_url = preg_replace('/^([\\d]+.)/', '',\n preg_replace('/\\/([\\d]+.)/', '/', $markdown_url));\n }\n\n // else its a relative path already\n $newpath = array();\n $paths = explode('/', $markdown_url);\n\n // remove the updirectory references (..)\n foreach ($paths as $path) {\n if ($path == '..') {\n $relative_path = dirname($relative_path);\n } else {\n $newpath[] = $path;\n }\n }\n\n // build the new url\n $new_url = $relative_path . '/' . implode('/', $newpath);\n\n // set the new url back on the Excerpt\n $Excerpt['element']['attributes']['href'] = $new_url;\n }\n }\n }\n\n // if this is an image\n if (isset($Excerpt['element']['attributes']['src'])) {\n\n $alt = isset($Excerpt['element']['attributes']['alt']) ? $Excerpt['element']['attributes']['alt'] : '';\n $title = isset($Excerpt['element']['attributes']['title']) ? $Excerpt['element']['attributes']['title'] : '';\n\n //get the url and parse it\n $url = parse_url(htmlspecialchars_decode($Excerpt['element']['attributes']['src']));\n\n // if there is no host set but there is a path, the file is local\n if (!isset($url['host']) && isset($url['path'])) {\n // get the media objects for this page\n $media = $this->page->media();\n\n // if there is a media file that matches the path referenced..\n if (isset($media->images()[$url['path']])) {\n // get the medium object\n $medium = $media->images()[$url['path']];\n\n // if there is a query, then parse it and build action calls\n if (isset($url['query'])) {\n parse_str($url['query'], $actions);\n }\n\n // loop through actions for the image and call them\n foreach ($actions as $action => $params) {\n // as long as it's not an html, url or ligtbox action\n if (!in_array($action, ['html','url','lightbox'])) {\n call_user_func_array(array(&$medium, $action), explode(',', $params));\n }\n }\n\n // Get the URL for regular images, or an array of bits needed to put together\n // the lightbox HTML\n if (!isset($actions['lightbox'])) {\n $src = $medium->url();\n } else {\n $src = $medium->lightboxRaw();\n }\n\n // set the src element with the new generated url\n if (!isset($actions['lightbox']) && !is_array($src)) {\n $Excerpt['element']['attributes']['src'] = $src;\n } else {\n\n // Create the custom lightbox element\n $Element = array(\n 'name' => 'a',\n 'attributes' => array('rel' => $src['a_rel'], 'href' => $src['a_url']),\n 'handler' => 'element',\n 'text' => array(\n 'name' => 'img',\n 'attributes' => array('src' => $src['img_url'], 'alt' => $alt, 'title' => $title)\n ),\n );\n\n // Set the lightbox element on the Excerpt\n $Excerpt['element'] = $Element;\n }\n }\n }\n }\n return $Excerpt;\n }", "title": "" }, { "docid": "4eb8d8b01465a940773841b89a5a8e7e", "score": "0.42449513", "text": "function validate_process_sources($pid)\n {\n $errors=Array();\n $wf_procname= $this->getOne('select wf_normalized_name from '.GALAXIA_TABLE_PREFIX.'processes where wf_p_id=?', array($pid));\n \n $query = 'select * from '.GALAXIA_TABLE_PREFIX.'activities where wf_p_id=?';\n $result = $this->query($query, array($pid));\n while($res = $result->fetchRow()) { \n $actname = $res['wf_normalized_name'];\n $source = GALAXIA_PROCESSES.SEP.$wf_procname.SEP.'code'.SEP.'activities'.SEP.$actname.'.php';\n if (!file_exists($source)) {\n $errors[] = tra('source code file for activity %1 is not avaible', $actname);\n continue;\n }\n $fp = fopen($source,'r');\n if (!$fp)\n {\n $errors[] = tra('source code for activity %1 is not avaible', $actname); \n }\n else\n {\n $data='';\n while(!feof($fp)) \n {\n $data.=fread($fp,8192);\n }\n fclose($fp);\n }\n if($res['wf_type']=='standalone') {\n if(strstr($data,'$instance')) {\n $errors[] = tra('Activity %1 is standalone and is using the $instance object', $res['wf_name']);\n } \n }\n else \n {\n if($res['wf_type']=='view') \n {\n if(strstr($data,'$instance->set')) \n {\n $errors[] = tra('Activity %1 is view and is using the $instance object in write mode', $res['wf_name']);\n }\n }\n else \n { // for all others than standalone or view ...\n if($res['wf_is_interactive']=='y') \n {\n if(!strstr($data,'$instance->complete()')) \n {\n $errors[] = tra('Activity %1 is interactive so it must use the $instance->complete() method', $res['wf_name']);\n }\n } \n else \n { // not interactive ...\n if(strstr($data,'$instance->complete()')) \n {\n $errors[] = tra('Activity %1 is non-interactive so it must not use the $instance->complete() method', $res['wf_name']);\n }\n }\n if($res['wf_type']=='switch') \n {\n if(!strstr($data,'$instance->setNextActivity(')) \n {\n $errors[] = tra('Activity %1 is switch so it must use $instance->setNextActivity($actname) method', $res['wf_name']);\n }\n }\n }\n } \n }\n return $errors;\n }", "title": "" }, { "docid": "f078832ea9d411d2ae38efc78a5f62bb", "score": "0.42400166", "text": "function addLogicHooksFile($directory,$fileContents){\r\n\t$logicHooksFile = \"\r\n\t// Do not store anything in this file that is not part of the array or the hook version. This file will\t\r\n\t// be automatically rebuilt in the future. \r\n \t\\$hook_version = 1; \r\n\t\\$hook_array = Array(); \r\n\t// position, file, function \r\n\t\\$hook_array['after_save'] = Array(); \r\n\t\\$hook_array['after_save'][] = Array(1, 'INSERT_INTO_PM_ENTRY_TABLE', 'modules/PM_ProcessManager/insertIntoPmEntryTable.php','insertIntoPmEntryTable', 'setPmEntryTable'); \r\n\t\\$hook_array['after_delete'] = Array(); \r\n\t\\$hook_array['after_delete'][] = Array(1, 'INSERT_INTO_PM_ENTRY_TABLE', 'modules/PM_ProcessManager/insertIntoPmEntryTable.php','insertIntoPmEntryTable', 'setPmEntryTable'); \r\n?>\";\t\r\n\r\n\t//Add the entry for Process Manager to the End of the File\r\n\t\t$fp = fopen($directory, 'r+');\r\n\t\t$str = \"\";\r\n\t\twhile(1)\r\n\t\t\t{\r\n\t\t\t\t//read line\r\n\t\t\t\t$line = fgets($fp);\r\n\t\t\t\t//if end of file reached then stop reading anymore\r\n\t\t\t\tif($line == null)break;\r\n\t\t\t\t\r\n\t\t\t\t//Do first replacement\r\n\t\t\t\tif(preg_match(\"/\\?>/\", $line))\r\n\t\t\t\t{\r\n\t\t\t\t\t$new_line = preg_replace(\"/\\?>/\",$logicHooksFile,$line);\r\n\t\t\t\t\t$str .= $new_line;\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t//set file content to a string\r\n\t\t\t\t\t$str .= $line;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\trewind($fp);\r\n\tfclose($fp);\t\t\r\n\t$handle = fopen($directory, 'w');\r\n\tfwrite($handle, $str);\t\t\r\n\tfclose($handle); \r\n}", "title": "" }, { "docid": "488690effc5c04b5223b2cddaa4cab76", "score": "0.42353266", "text": "public function verifyApp() {\n $results = [];\n\n //2. Verify the files all have matching hashes.\n $integrityOK = $this->verifySignature();\n \n if(!$integrityOK) $results[$this->appPath . '/manifest.xml'] = \"INVALID SIGNATURE\";\n\n $app = simplexml_load_file($this->appPath . '/manifest.xml');\n foreach($app->file as $file) {\n $filename = (string)$file->name;\n if(sha1_file($file->name) !== (string)$file->hash) {\n $results[$filename] = \"HASH FAILURE\";\n //print \"There was a problem with $file->name. Hashes do not match the manifest.\" . PHP_EOL;\n $integrityOK = false;\n } else {\n $results[$filename] = \"OK\";\n }\n }\n\n \n $results['integrityOK'] = $integrityOK;\n return $results;\n }", "title": "" }, { "docid": "8aaa8f7ea9673dcb4c2b5d739098cd9a", "score": "0.42316654", "text": "function update_xml_metadump_pbcore($resource)\n\t{\n\t# Updates the XML metadata dump file when the resource has been altered.\n\tglobal $xml_metadump,$xml_metadump_pbcore_map;\n\tif (!$xml_metadump || $resource < 0) {return true;} # Only execute when configured and when not a template\n\t\n\t$path=dirname(get_resource_path($resource,true,\"pre\",true)) . \"/metadumpCombined.xml\";\n\thook(\"before_update_xml_metadump\");\n\tif (file_exists($path)){$wait=unlink($path);}\n\n\t$f=fopen($path,\"w\");\n\tfwrite($f,\"<?xml version=\\\"1.0\\\"?>\\n\");\n\tfwrite($f,\"<pbcoreDescriptionDocument xmlns=\\\"http://www.pbcore.org/PBCore/PBCoreNamespace.html\\\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xsi:schemaLocation=\\\"http://www.pbcore.org/PBCore/PBCoreNamespace.html https://raw.githubusercontent.com/WGBH/PBCore_2.1/master/pbcore-2.1.xsd\\\" >\\n\\n\");\n\n \t$data=get_resource_field_data($resource,false,false); # Get field data ignoring permissions\n\t$dateType=$data[17];\n\t$IdentifierSource2=$data[5];\n\t$proxyFilename=$data[15];\n\t$preservationFilename=$data[32];\n\t$physicalFormat=$data[18];\n \n# asset info\n \tfor ($n=0;$n<count($data);$n++)\n\t \t{\n\t \t# Value processing\n\t \t$value=$data[$n][\"value\"];\n\t \tif (substr($value,0,1)==\",\") {$value=substr($value,1);} # Checkbox lists / dropdowns; remove initial comma\n\t \t$value=trim($value,\" ,\\t\\n\\r\\0\\x0B\");\n\n\t\t#write beginning\n\t\tif ($value !='')\n\t\t\t{\n\t\t\tif ($data[$n][\"name\"]==\"uniqueID\" || $data[$n][\"name\"]==\"IdentifierSource2\" || $data[$n][\"name\"]==\"Identifier2\" || $data[$n][\"name\"]==\"itemTitle\" || $data[$n][\"name\"]==\"assetType\" || $data[$n][\"name\"]==\"subject\" || $data[$n][\"name\"]==\"description\" || $data[$n][\"name\"]==\"epsID\" || $data[$n][\"name\"]==\"programName\" || $data[$n][\"name\"]==\"contributor\" || $data[$n][\"name\"]==\"rightsStatement\" || $data[$n][\"name\"]==\"publisher\" || $data[$n][\"name\"]==\"ancillaryMaterials\" || $data[$n][\"name\"]==\"\n\t\t\tCoverage\" || $data[$n][\"name\"]==\"temporalCoverage\" || $data[$n][\"name\"]==\"relatedIDs\")\n\t\t\t\t{\n\t\t\t\tif ($data[$n][\"name\"]==\"uniqueID\")\n\t\t\t\t\t{\n\t\t\t\t\t# pbcorePublisher\n\t\t\t\t\tfwrite($f,\"<pbcoreIdentifier source=\\\"KBOO\\\">kboo_\" . htmlspecialchars($value) . \"</pbcoreIdentifier>\\n\");\n\t\t\t\t\t}\n\t\t\t\tif ($data[$n][\"name\"]==\"Identifier2\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"<pbcoreIdentifier source=\\\"\" . $IdentifierSource2[\"value\"] . \"\\\">\" . htmlspecialchars($value) . \"</pbcoreIdentifier>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"publisher\")\n\t\t\t\t\t{\n\t\t\t\t\t# pbcorePublisher\n\t\t\t\t\tfwrite($f,\"<pbcorePublisher>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\" .htmlspecialchars($value). \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n</pbcorePublisher>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"relatedIDs\")\n\t\t\t\t\t{\n\t\t\t\t\t# pbcoreRelation relatedIDs\n\t\t\t\t\tfwrite($f,\"<pbcoreRelation>\\n\\t<pbcoreRelationType>References</pbcoreRelationType>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]]. \">\");\n\t\t\t\t\tfwrite($f,htmlspecialchars($value). \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n</pbcoreRelation>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"epsID\")\n\t\t\t\t\t{\n\t\t\t\t\t# pbcoreRelation epsID\n\t\t\t\t\tfwrite($f,\"<pbcoreRelation>\\n\\t<pbcoreRelationType>References</pbcoreRelationType>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]]. \">\");\n\t\t\t\t\tfwrite($f,htmlspecialchars($value). \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n</pbcoreRelation>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"programName\")\n\t\t\t\t\t{\n\t\t\t\t\t# pbcoreRelation epsID\n\t\t\t\t\tfwrite($f,\"<pbcoreRelation>\\n\\t<pbcoreRelationType>Is Part Of</pbcoreRelationType>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]]. \">\");\n\t\t\t\t\tfwrite($f,htmlspecialchars($value). \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n</pbcoreRelation>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"subject\")\n\t\t\t\t\t{\n\t\t\t\t\t# subjects\n\t\t\t\t\t$subjectArray = preg_split(\"/[,]+/\", $value);\n\t\t\t\t\tforeach ($subjectArray as $subject_value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$subject_value = trim($subject_value,\" \");\n\t\t\t\t\t\tfwrite($f,\"<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" subjectType=\\\"keyword\\\" subjectTypeSource=\\\"KBOO topic terms\\\">\" . htmlspecialchars($subject_value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"contributor\")\n\t\t\t\t\t{\n\t\t\t\t\t# pbcorePublisher\n\t\t\t\t\t$contributorsArray = preg_split(\"/[,]+/\", $value);\n\t\t\t\t\tforeach ($contributorsArray as $contributor_value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$contributor_name = strtok($contributor_value,\"(\");\n\t\t\t\t\t\t$contributor_name=trim($contributor_name,\" \");\n\t\t\t\t\t\t$contributor_role = strrchr($contributor_value,\"(\");\n\t\t\t\t\t\tif ($contributor_role != '')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$contributor_role=trim($contributor_role,\" ()\");\n\t\t\t\t\t\t\tfwrite($f,\"<pbcoreContributor>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\" . htmlspecialchars($contributor_name) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\\t<contributorRole>\" . htmlspecialchars($contributor_role) . \"</contributorRole>\\n</pbcoreContributor>\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tfwrite($f,\"<pbcoreContributor>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\" . htmlspecialchars($contributor_name) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n</pbcoreContributor>\\n\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"ancillaryMaterials\")\n\t\t\t\t\t{\n\t\t\t\t\t# ancillaryMaterials\n\t\t\t\t\tfwrite($f,\"<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" annotationType=\\\"Ancillary Materials\\\">\".htmlspecialchars($value). \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"spatialCoverage\")\n\t\t\t\t\t{\n\t\t\t\t\t# spatial coverage\n\t\t\t\t\t$spatialArray = preg_split(\"/[,]+/\", $value);\n\t\t\t\t\tforeach ($spatialArray as $spatial_value)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$spatial_value = trim($spatial_value,\" \");\n\t\t\t\t\t\tfwrite($f,\"<pbcoreCoverage>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" source=\\\"local\\\">\" . htmlspecialchars($spatial_value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\\t<coverageType>spatial</coverageType>\\n</pbcoreCoverage>\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"temporalCoverage\")\n\t\t\t\t\t{\n\t\t\t\t\t# temporal coverage\n\t\t\t\t\tfwrite($f,\"<pbcoreCoverage>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]].\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\\t<coverageType>temporal</coverageType>\\n</pbcoreCoverage>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"rightsStatement\")\n\t\t\t\t\t{\n\t\t\t\t\t# temporal coverage\n\t\t\t\t\tfwrite($f,\"<pbcoreRightsSummary>\\n\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]].\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n</pbcoreRightsSummary>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"itemTitle\" || $data[$n][\"name\"]==\"assetType\" || $data[$n][\"name\"]==\"description\")\n\t\t\t\t\t{\n\t\t\t\t\t# additional PBCore fields\n\t\t\t\t\tfwrite($f,\"<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]].\">\");\n\t\t\t\t\tfwrite($f,htmlspecialchars($value));\n\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\telseif ($data[$n][\"name\"]==\"description\")\n\t\t\t{\n\t\t\tfwrite($f,\"<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]].\"/>\\n\");\n\t\t\t}\n\t \t}\n\n# proxy file instantiation\n\tif ($proxyFilename[\"value\"] !='')\n\t\t{\n\t\tfwrite($f,\"<pbcoreInstantiation>\\n\");\n\t\tfor ($n=0;$n<count($data);$n++)\n\t\t\t{\n\t\t\t# Value processing\n\t\t\t$value=$data[$n][\"value\"];\n\t\t\tif (substr($value,0,1)==\",\") {$value=substr($value,1);} # Checkbox lists / dropdowns; remove initial comma\n\t\t\t$value=trim($value,\" ,\\t\\n\\r\\0\\x0B\");\n\n\t\t\t#write beginning\n\t\t\tif ($value !=''){\n\t\t\t\n\t\t\t\tif ($data[$n][\"name\"]==\"proxyFilename\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" source=\\\"KBOO\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\tfwrite($f,\"\\t<instantiationDigital>audio/mpeg3</instantiationDigital>\\n\");\n\t\t\t\t\tfwrite($f,\"\\t<instantiationLocation>A:/_final</instantiationLocation>\\n\");\n\t\t\t\t\tfwrite($f,\"\\t<instantiationMediaType>Sound</instantiationMediaType>\\n\");\n\t\t\t\t\tfwrite($f,\"\\t<instantiationGenerations>Copy</instantiationGenerations>\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"durationDigital\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tfwrite($f,\"</pbcoreInstantiation>\\n\");\n\t\t}\n\n# preservation file instantiation\n\tif ($preservationFilename[\"value\"] !='')\n\t\t{\t\n\t\tfwrite($f,\"<pbcoreInstantiation>\\n\");\n\t\tfor ($n=0;$n<count($data);$n++)\n\t\t\t{\n\t\t\t# Value processing\n\t\t\t$value=$data[$n][\"value\"];\n\t\t\tif (substr($value,0,1)==\",\") {$value=substr($value,1);} # Checkbox lists / dropdowns; remove initial comma\n\t\t\t$value=trim($value,\" ,\\t\\n\\r\\0\\x0B\");\n\n\t\t\tif ($value !='')\n\t\t\t\t{\n\t\t\t\tif ($data[$n][\"name\"]==\"dateDigitized\" || $data[$n][\"name\"]==\"preservationFilename\" || $data[$n][\"name\"]==\"checksumValue\" || $data[$n][\"name\"]==\"fileLocation\" || $data[$n][\"name\"]==\"filesize\" || $data[$n][\"name\"]==\"channelConfigDigital\" || $data[$n][\"name\"]==\"sampleRate\" || $data[$n][\"name\"]==\"bitDepth\" || $data[$n][\"name\"]==\"durationDigital\" || $data[$n][\"name\"]==\"audioTimeStart\" || $data[$n][\"name\"]==\"checksumValue\" || $data[$n][\"name\"]==\"digitalQC\")\n\t\t\t\t\t{\n\t\t\t\t\tif ($data[$n][\"name\"]==\"checksumValue\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" source=\\\"md5\\\">\");\n\t\t\t\t\t\tfwrite($f,htmlspecialchars($value));\n\t\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\telseif ($data[$n][\"name\"]==\"filesize\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<instantiationMediaType>Sound</instantiationMediaType>\\n\");\n\t\t\t\t\t\tfwrite($f,\"\\t<instantiationGenerations>Master: preservation</instantiationGenerations>\\n\");\n\t\t\t\t\t\t$filesizeArray = preg_split(\"/\\s+/\", $value);\n\t\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]]. \" unitsOfMeasure=\\\"\" . $filesizeArray[1] . \"\\\">\");\n\t\t\t\t\t\tfwrite($f,htmlspecialchars($filesizeArray[0]));\n\t\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\telseif ($data[$n][\"name\"]==\"sampleRate\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<instantiationEssenceTrack>\\n\\t\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" unitsOfMeasure=\\\"kHz\\\">\");\n\t\t\t\t\t\tfwrite($f,trim(htmlspecialchars($value),\", kHz\"));\n\t\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\telseif ($data[$n][\"name\"]==\"bitDepth\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]]. \">\");\n\t\t\t\t\t\tfwrite($f,trim(htmlspecialchars($value),\", bits\"));\n\t\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\");\n\t\t\t\t\t\tfwrite($f,\"\\n\\t</instantiationEssenceTrack>\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\telseif ($data[$n][\"name\"]==\"digitalQC\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]]. \" annotationType=\\\"digital QC notes\\\">\");\n\t\t\t\t\t\tfwrite($f,htmlspecialchars($value));\n\t\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\telseif ($data[$n][\"name\"]==\"preservationFilename\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" source=\\\"filename\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\telseif ($data[$n][\"name\"]==\"dateDigitized\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" dateType=\\\"created\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\tfwrite($f,\"\\t<instantiationDigital>audio/x-wav</instantiationDigital>\\n\");\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tfwrite($f,\"</pbcoreInstantiation>\\n\");\n\t\t}\n\n# physical instantiation\n\tif ($physicalFormat[\"value\"] !='')\n\t\t{\n\t\tfwrite($f,\"<pbcoreInstantiation>\\n\");\n\t\tfor ($n=0;$n<count($data);$n++)\n\t\t\t{\n\t\t\t# Value processing\n\t\t\t$value=$data[$n][\"value\"];\n\t\t\tif (substr($value,0,1)==\",\") {$value=substr($value,1);} # Checkbox lists / dropdowns; remove initial comma\n\t\t\t$value=trim($value,\" ,\\t\\n\\r\\0\\x0B\");\n\n\t\t\t#write beginning\n\t\t\tif ($value !=''){\n\t\t\t\tif ($data[$n][\"name\"]==\"uniqueID\" || $data[$n][\"name\"]==\"date\" || $data[$n][\"name\"]==\"storageLocation\" || $data[$n][\"name\"]==\"physicalFormat\" || $data[$n][\"name\"]==\"generations\" || $data[$n][\"name\"]==\"condition\" || $data[$n][\"name\"]==\"notesOnCasing\" || $data[$n][\"name\"]==\"durationPhysical\" || $data[$n][\"name\"]==\"channelConfigPhysical\") \n\t\t\t\t{\n\t\t\t\tif ($data[$n][\"name\"]==\"uniqueID\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" source=\\\"KBOO\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"date\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" dateType=\\\"\" . trim($dateType[\"value\"],\",\") . \"\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"notesOnCasing\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" annotationType=\\\"written notes on casing\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\telseif ($data[$n][\"name\"]==\"condition\")\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \" annotationType=\\\"physical condition\\\">\" . htmlspecialchars($value) . \"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\tfwrite($f,\"\\t<\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\");\n\t\t\t\t\tfwrite($f,htmlspecialchars($value));\n\t\t\t\t\tfwrite($f,\"</\" . $xml_metadump_pbcore_map[$data[$n][\"name\"]] . \">\\n\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t}\n\t\tfwrite($f,\"</pbcoreInstantiation>\\n\");\n\t\t}\n\n\tfwrite($f,\"</pbcoreDescriptionDocument>\\n\");\n\tfclose($f);\n\thook(\"after_update_xml_metadump\");\n\t//chmod($path,0777); // fixme - temporarily make world readable/writable until we have better solution for file permissions\n\t}", "title": "" }, { "docid": "fd76cae686d06e1cbc96ea80d46cae4b", "score": "0.42282984", "text": "public function install() {\n $elementTable = get_db()->getTable('Element');\n // Add File type metadata elements\n $file_metadata = insert_element_set_failsafe(array(\n 'name' => 'IIIF File Metadata',\n 'description' => '',\n 'record_type' => 'File'\n ), array(\n array('name' => 'Original @id', 'description' => ''),\n array('name' => 'JSON Data', 'description' => ''),\n ));\n set_option('iiifitems_file_element_set', $file_metadata->id);\n set_option('iiifitems_file_atid_element', $elementTable->findByElementSetNameAndElementName('IIIF File Metadata', 'Original @id')->id);\n set_option('iiifitems_file_json_element', $elementTable->findByElementSetNameAndElementName('IIIF File Metadata', 'JSON Data')->id);\n }", "title": "" }, { "docid": "93a85e5202fc0e8af1cc14e3f9e9dff3", "score": "0.42097306", "text": "function extensions_installation(){\n require_once SYSTEM_MODULES_PATH.'filesystem.php';\n $files = scandir(EXTENSIONS_PATH);\n array_shift($files); // remove .\n array_shift($files); // remove ..\n $f_l = count($files);\n for ($i=0;$i<$f_l;$i++){ // loop by extensions\n $ex = explode ('.', $files[$i]);\n if (strcmp(mb_strtolower($ex[count($ex)-1]),\"json\")==0){\n $file_url = EXTENSIONS_PATH . $files[$i];\n $json = file_get_contents($file_url);\n $json = unpack_data($json);\n if (!$json)\n return false;\n $order = $json['order'];\n // var_dump($order);\n for ($i=0;$i<count($order);$i++){ // loop by order\n switch($order[$i]){\n case 'files': // module sources creation\n foreach ($json['files'] as $url_module => $value) {\n if (!file_put_contents(RCMS_ROOT_PATH.$url_module, $value['text'])){\n // echo \"!put contents: \".RCMS_ROOT_PATH.$url_module;\n return false;\n }\n switch($value['rights']){ // set rights on module\n case 'r':\n @chmod(RCMS_ROOT_PATH.$url_module, 0444);\n break;\n case 're':\n @chmod(RCMS_ROOT_PATH.$url_module, 0555);\n break;\n case 'rwe':\n @chmod(RCMS_ROOT_PATH.$url_module, 0777);\n break;\n case 'rw':\n @chmod(RCMS_ROOT_PATH.$url_module, 0666);\n break;\n case 'we':\n @chmod(RCMS_ROOT_PATH.$url_module, 0333);\n break; \n }\n }\n break;\n case 'installer': // brocess of installation\n if (!file_put_contents(EXTENSIONS_PATH.\"install.php\", $json['installer'])) // temp install script creation\n return false;\n require_once EXTENSIONS_PATH.\"install.php\";\n eval(\"install_packet_\".get_ext_name($file_url).\"();\");\n rcms_delete_files(EXTENSIONS_PATH.\"install.php\");\n break;\n case 'sql': \n $sql_arr = $json['sql'];\n require_once ENGINE_PATH.\"api.mysql.php\";\n $sql = new MySQLDB();\n for ($q=0;$q<count($q);$q++){\n $sql->query($sql_arr[$q]);\n }\n break;\n }\n }\n // echo EXTENSIONS_PATH.$files[$i];\n rcms_delete_files(EXTENSIONS_PATH.$files[$i]); // delete json-file of installed extension after intallation\n }\n }\n return true;\n }", "title": "" }, { "docid": "6beabe6e091a3850f75636c1e668f141", "score": "0.42069715", "text": "public function testMalformedManifest()\n\t{\n\t\t$this->expectException(ManifestException::class);\n\t\t$this->expectExceptionMessage(\n\t\t\t\"manifest file not found or malformed '\"\n\t\t\t. dirname(__DIR__)\n\t\t\t. \"/config/../manifests/test/manifest/Load/Malformed/manifest.\"\n\t\t\t. config::getInstance()->getManifestFormat() \n\t\t\t. \"'\"\n\t\t);\n\t\tModelManager::getInstance()->getInstanceModel('Test\\Load\\Malformed');\n\t}", "title": "" }, { "docid": "3359f180a6d2bf10c34434bacf131e81", "score": "0.4201901", "text": "abstract protected function extractData($fileContents);", "title": "" }, { "docid": "77a5cf4bdb6d7a8299d9b8d8840c242c", "score": "0.42018366", "text": "function _voip_event_get_event_info_files($xmlrpc_server, $user_info, $event_info) {\n $event_extension_number = $event_info['number'];\n\t\n // get the event extension info (with associated audio files) \n $r = voip_extension_get_info($xmlrpc_server, $user_info, $event_extension_number);\n if ($r['error_code'] != VOIP_SUCCESS) {\n return $r;\n }\n $extension_info = $r['extension_info'];\n\n $event_info['extension_info'] = $extension_info;\n \n // get the audio recording of the event location\n if ($event_info['nid_audio_location']) {\n $basename = asa_get_audio_file($xmlrpc_server, $user_info, array('nid' => $event_info['nid_audio_location']));\n if (($basename == -1) || ($basename === 0)) {\n $rc['error_code'] = VOIP_PROCESSING_FAILURE;\n $rc['error_msg'] = \"Error retrieving audio location file: \" . eh_error_msg();\n return $rc;\n } \n // create a new entry in extension_info for the file\n $event_info['file_audio_location'] = $basename;\n }\n \n // get the extension info of the event organizer\n if (isset($event_info['organizer_extension_number'])) {\n // (20080609) $organizer_extension_number = $event_info['organizer_extension_number'];\n $organizer_extension_number = $event_info['author_extension_number'];\n $r = voip_extension_get_info($xmlrpc_server, $user_info, $organizer_extension_number);\n if ($r['error_code'] != VOIP_SUCCESS) {\n return $r;\n }\n $event_info['organizer_extension_info'] = $r['extension_info'];\n }\n \n $rc = array();\n $rc['error_code'] = VOIP_SUCCESS;\n $rc['event_info'] = $event_info;\n return $rc;\n}", "title": "" }, { "docid": "7841c3c0e1c579361123ce96fcd589e9", "score": "0.42012885", "text": "function populate_reqs() {\n $reqs = array();\n $file_handle = fopen( REQS_FILE , \"r\" );\n \n while ( !feof($file_handle) ) {\n $line = fgets( $file_handle );\n $req = new Requirement( $line );\n $reqs[] = $req;\n }\n\n fclose( $file_handle );\n return $reqs;\n\n}", "title": "" }, { "docid": "96132d982be786d890976a8386b57847", "score": "0.42005074", "text": "private static function readManifest($handle)\n {\n $size = unpack('V', self::read($handle, 4));\n $size = $size[1];\n\n $raw = self::read($handle, $size);\n\n // ++ start skip: API version, global flags, alias, and metadata\n $count = unpack('V', substr($raw, 0, 4));\n $count = $count[1];\n\n $aliasSize = unpack('V', substr($raw, 10, 4));\n $aliasSize = $aliasSize[1];\n $raw = substr($raw, 14 + $aliasSize);\n\n $metaSize = unpack('V', substr($raw, 0, 4));\n $metaSize = $metaSize[1];\n\n $offset = 0;\n $start = 4 + $metaSize;\n // -- end skip\n\n $manifest = array(\n 'files' => array(),\n 'flags' => 0\n );\n\n for ($i = 0; $i < $count; $i++) {\n $length = unpack('V', substr($raw, $start, 4));\n $length = $length[1];\n $start += 4;\n\n $path = substr($raw, $start, $length);\n $start += $length;\n\n $file = unpack(\n 'Vsize/Vtimestamp/Vcompressed_size/Vcrc32/Vflags/Vmetadata_length',\n substr($raw, $start, 24)\n );\n\n $file['path'] = $path;\n $file['crc32'] = sprintf('%u', $file['crc32'] & 0xffffffff);\n $file['offset'] = $offset;\n\n $offset += $file['compressed_size'];\n $start += 24 + $file['metadata_length'];\n\n $manifest['flags'] |= $file['flags'] & self::MASK;\n\n $manifest['files'][] = $file;\n }\n\n return $manifest;\n }", "title": "" }, { "docid": "6e996eb0ee4cb77782fde84b5bad7698", "score": "0.41887096", "text": "function pmproeewe_plugin_row_meta($links, $file) {\r\n\tif(strpos($file, 'pmpro-extra-expiration-warning-emails.php') !== false)\r\n\t{\r\n\t\t$new_links = array(\r\n\t\t\t'<a href=\"' . esc_url('http://www.paidmembershipspro.com/add-ons/plus-add-ons/extra-expiration-warning-emails-add-on/') . '\" title=\"' . esc_attr( __( 'View Documentation', 'pmpro' ) ) . '\">' . __( 'Docs', 'pmpro' ) . '</a>',\r\n\t\t\t'<a href=\"' . esc_url('http://paidmembershipspro.com/support/') . '\" title=\"' . esc_attr( __( 'Visit Customer Support Forum', 'pmpro' ) ) . '\">' . __( 'Support', 'pmpro' ) . '</a>',\r\n\t\t);\r\n\t\t$links = array_merge($links, $new_links);\r\n\t}\r\n\treturn $links;\r\n}", "title": "" }, { "docid": "81e480440520951f4caf0b14a10e0160", "score": "0.41848803", "text": "function init_files($filename, $href, $type_in)\n\t{\n\t\tglobal $base_url;\n\t\tglobal $dom;\n\t\tglobal $xml;\n\t\tglobal $xml_file_name;\n\t\tglobal $xml_href;\n\t\tglobal $type;\n\t\t\n\t\t//return \"Error check: \".$base_url;\n\t\t\n\t\t$xml_file_name = $base_url.$filename;\n\t\t$xml_href = $href;\n\t\t$type = $type_in;\n\t\t\n\t\t// test for file\n\t\tif(!is_file($xml_file_name))\n\t\t\treturn \"The RSS file does not exist at \".$xml_file_name;\n\t\t\n\t\t// load file as simpleXML\n\t\t$xml = simplexml_load_file($xml_file_name);\n\t\t\n\t\t$dom = new DOMDocument('1.0');\n\t\t$dom->preserveWhiteSpace = false;\n\t\t$dom->formatOutput = true;\n\t\t$dom->loadXML($xml->asXML());\n\t\t\n\t\t//echo $dom->saveXML();\n\t\t\n\t\t// success!!\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "2f82e14948b8be5fd965e502a4b8377d", "score": "0.41848594", "text": "private function _get_manifest_url($xml_url)\n {\n return false;\n// //check if there is a manifest using ODK Aggregate's url convention \n// if (strrpos($xml_url, '/formXml?') > 0)\n// {\n// $manifest_url = str_replace('/formXml?', '/xformsManifest?', $xml_url);\n// log_message('debug', 'guessed manifest url: '.$manifest_url);\n// //$manifest = new DomDocument;\n// //$manifest->load($manifest_url);\n// }\n// //if (!isset($manifest) || !$manifest)\n// else\n// {\n// $manifest_url = FALSE;\n// }\n// return $manifest_url;\n// //else \n// //{\n// // $manifest = simplexml_import_dom($manifest);\n// //log_message('debug', 'manifest: '.$manifest->asXML());\n// //}\n }", "title": "" }, { "docid": "4b882018c4c4009f7ddfe47d18c470a2", "score": "0.41846684", "text": "protected function test_files()\n\t{\n\t\t$error = false;\n\t\t$found_umil = false;\n\t\tif (sizeof($this->validator->xsl_files) > 0)\n\t\t{\n\t\t\tforeach ($this->validator->xsl_files as $file)\n\t\t\t{\n\t\t\t\t$md5 = md5_file($this->validator->temp_dir . $file);\n\n\t\t\t\tif (!in_array($md5, $this->valid_md5_xsl))\n\t\t\t\t{\n\t\t\t\t\t$error = true;\n\t\t\t\t\t$this->push_error(mpv::ERROR_WARNING, 'MODIFIED_XSL', $file, array($md5, $this->valid_md5_xsl[0]));\n\t\t\t\t}\n\t\t\t\telse if ($md5 != $this->valid_md5_xsl[0]) // Note, newest MD5 for xsl should be the first!\n\t\t\t\t{\n\t\t\t\t\t$error = true;\n\t\t\t\t\t$this->push_error(mpv::ERROR_FAIL, 'OLD_XSL', $file, array($md5));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($this->validator->package_files as $file)\n\t\t\t{\n\t\t\t\tif (strpos($file, 'license.txt') !== false)\n\t\t\t\t{\n\t\t\t\t\t$md5 = md5_file($this->validator->temp_dir . $file);\n\n\t\t\t\t\tif (!in_array($md5, $this->license_md5))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->push_error(mpv::ERROR_FAIL, 'LICENSE_MD5', $file, array($md5, implode(', ',$this->license_md5)));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$tmp = explode('/', $file);\n\n\t\t\t\tif (isset($tmp[sizeof($tmp) - 2]) && isset($tmp[sizeof($tmp) - 1]) && $tmp[sizeof($tmp) - 2] == 'umil' && $tmp[sizeof($tmp) - 1] == 'umil.php')\n\t\t\t\t{\n\t\t\t\t\t$md5 = md5_file($this->validator->temp_dir . $file);\n\n\t\t\t\t\tif ($found_umil)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->push_error(mpv::ERROR_WARNING, 'POSSIBLE_TWO_UMIL', null, array($file, $found_umil));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!defined('IN_PHPBB'))\n\t\t\t\t\t{\n\t\t\t\t\t\tdefine('IN_PHPBB', true);\n\t\t\t\t\t}\n\t\t\t\t\tinclude ($this->validator->temp_dir . $file);\n\n\t\t\t\t\tif (!defined('UMIL_VERSION'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->push_error(mpv::ERROR_FAIL, 'NO_UMIL_VERSION', $file);\n\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\telse if (version_compare(UMIL_VERSION, mpv::get_current_version('umil'), '<'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->push_error(mpv::ERROR_FAIL, 'UMIL_OUTDATED', $file);\n\n\t\t\t\t\t\t// Check to see if the md5 still exists\n\t\t\t\t\t\tif (isset($this->valid_md5_umil[UMIL_VERSION]) && $this->valid_md5_umil[UMIL_VERSION] != $md5)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Invalid MD5 for version as well :)\n\t\t\t\t\t\t\t$this->push_error(mpv::ERROR_WARNING, 'INCORRECT_UMIL_MD5', $file);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (!isset($this->valid_md5_umil[UMIL_VERSION]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->push_error(mpv::ERROR_FAIL, 'UNKNOWN_VERSION_UMIL', $file);\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->valid_md5_umil[UMIL_VERSION] != $md5)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->push_error(mpv::ERROR_WARNING, 'INCORRECT_UMIL_MD5', $file);\n\t\t\t\t\t}\n\t\t\t\t\t$found_umil = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4aa18bc64d037d7b135ef7a23de5d30f", "score": "0.41759443", "text": "private static function addfiles()\n {\n self::wp_predefined();\n\n // WP Advanced Facebook hooks\n self::wp_hooks();\n\n }", "title": "" }, { "docid": "f3c1b2d2ccf45dd78b260ce7f0cda3d2", "score": "0.41603085", "text": "function install($basepath='')\r\n{\r\n\tglobal $db, $db_type, $pun_config;\r\n\t//include PUN_ROOT.'include/attach/attach_incl.php';\r\n\r\n\t//first check so that the path seems reasonable\r\n\tif(!((substr($basepath,0,1) == '/' || substr($basepath,1,1) == ':') && substr($basepath,-1) == '/'))\r\n\t\terror('The pathname specified doesn\\'t comply with the rules set. Go back and make sure that it\\'s the complete path, and that it ends with a slash and that it either start with a slash (example: \"/home/username/attachments/\", on *nix servers (unix, linux, bsd, solaris etc.)) or a driveletter (example: \"C:/webpages/attachments/\" on windows servers)');\r\n\r\n\t// create the neccessary tables\t\r\n\t\t// create the files table\r\n\t\t$db->query(\"CREATE TABLE IF NOT EXISTS `\".$db->prefix.\"attach_2_files` (\r\n\t\t`id` int(10) unsigned NOT NULL auto_increment,\r\n\t\t`owner` int(10) unsigned NOT NULL default '0',\r\n \t\t`post_id` int(10) unsigned NOT NULL default '0',\r\n \t\t`filename` varchar(255) NOT NULL default 'error.file',\r\n \t\t`extension` varchar(64) NOT NULL default 'error.file',\r\n \t\t`mime` varchar(64) NOT NULL default '',\r\n \t\t`location` text NOT NULL,\r\n \t\t`size` int(10) unsigned NOT NULL default '0',\r\n \t\t`downloads` int(10) unsigned NOT NULL default '0',\r\n \t\tUNIQUE KEY `id` (`id`))\") or error('Unable to add table \"attach_2_files\" to database', __FILE__, __LINE__, $db->error());\r\n\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// create the rules table\r\n\t\t$db->query(\"CREATE TABLE IF NOT EXISTS `\".$db->prefix.\"attach_2_rules` (\r\n \t\t`id` int(10) unsigned NOT NULL auto_increment,\r\n \t\t`forum_id` int(10) unsigned NOT NULL default '0',\r\n \t\t`group_id` int(10) unsigned NOT NULL default '0',\r\n \t\t`rules` int(10) unsigned NOT NULL default '0',\r\n \t\t`size` int(10) unsigned NOT NULL default '0',\r\n \t\t`per_post` tinyint(4) NOT NULL default '1',\r\n \t\t`file_ext` text NOT NULL,\r\n \t\tUNIQUE KEY `id` (`id`))\") or error('Unable to add table \"attach_2_rules\" to database', __FILE__, __LINE__, $db->error());\r\n\r\n\t//ok path could be correct, try to make a subfolder :D\r\n\t$newname = attach_generate_pathname($basepath);\r\n\tif(!attach_create_subfolder($newname,$basepath))\r\n\t\terror('Unable to create new subfolder with name \"'.$newname.'\", make sure php has write access to that folder!',__FILE__,__LINE__);\r\n\t\r\n\t\t\r\n\t// ok, add the stuff needed in the config cache\r\n\t$attach_config = array(\t'attach_always_deny'\t=>\t'html\"htm\"php\"php3\"php4\"exe\"com\"bat',\r\n\t\t\t\t\t\t\t'attach_basefolder'\t\t=>\t$basepath,\r\n\t\t\t\t\t\t\t'attach_create_orphans'\t=>\t'1',\r\n\t\t\t\t\t\t\t'attach_cur_version'\t=>\t'2.0.1',\r\n\t\t\t\t\t\t\t'attach_icon_folder'\t=>\t'img/attach/',\r\n\t\t\t\t\t\t\t'attach_icon_extension'\t=>\t'txt\"doc\"pdf\"wav\"mp3\"ogg\"avi\"mpg\"mpeg\"png\"jpg\"jpeg\"gif',\r\n\t\t\t\t\t\t\t'attach_icon_name'\t\t=>\t'text.png\"doc.png\"doc.png\"audio.png\"audio.png\"audio.png\"video.png\"video.png\"video.png\"image.png\"image.png\"image.png\"image.png',\r\n\t\t\t\t\t\t\t'attach_max_size'\t\t=>\t'2000',\r\n\t\t\t\t\t\t\t'attach_subfolder'\t\t=>\t$newname,\r\n\t\t\t\t\t\t\t'attach_use_icon'\t\t=>\t'1');\r\n\t\r\n\tforeach($attach_config AS $key => $value)\r\n\t{\r\n\t\t$db->query(\"INSERT INTO \".$db->prefix.\"config (conf_name, conf_value) VALUES ('$key', '\".$db->escape($value).\"')\") or error('Unable to add column \"'.$key.'\" to config table', __FILE__, __LINE__, $db->error());\r\n\t}\r\n\r\n\t// and now, update the cache...\r\n\t\r\n\trequire_once PUN_ROOT.'include/cache.php';\r\n\tgenerate_config_cache();\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n/*\r\n\tDO MOD INSTALLATION HERE\r\n\r\n\tHere's an example showing how to run different queries depending on $db_type.\r\n\tNOTE: This is just an example! Replace it with whatever queries your mod needs to run.\r\n\r\n\tswitch ($db_type)\r\n\t{\r\n\t\tcase 'mysql':\r\n\t\tcase 'mysqli':\r\n\t\t\t$db->query(\"ALTER TABLE \".$db->prefix.\"some_table ADD some_column TINYINT(1) NOT NULL DEFAULT 1\") or error('Unable to add column \"some_column\" to table \"some_table\"', __FILE__, __LINE__, $db->error());\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\t$db->query('ALTER TABLE \".$db->prefix.\"some_table ADD some_column INT(10) NOT NULL DEFAULT 1') or error('Unable to add column \"some_column\" to table \"some_table\"', __FILE__, __LINE__, $db->error());\r\n\t\t\tbreak;\r\n\t}\r\n*/\r\n}", "title": "" }, { "docid": "13c638c4ebe0d2e37de29d9e746238fa", "score": "0.41548428", "text": "function _mw_adminimize_filter_plugin_meta( $links, $file ) {\n\n\t/* create link */\n\tif ( FB_ADMINIMIZE_BASENAME === $file ) {\n\t\tarray_unshift(\n\t\t\t$links,\n\t\t\tsprintf( '<a href=\"options-general.php?page=%s\">%s</a>', FB_ADMINIMIZE_BASENAME, esc_attr__( 'Settings' ) )\n\t\t);\n\t}\n\n\treturn $links;\n}", "title": "" }, { "docid": "d761a7d2fbdb2feacdabaa86b548732f", "score": "0.4149635", "text": "abstract protected function addFileEntry(string $value);", "title": "" }, { "docid": "c630f981c81005fe4b0bcd1abe359c59", "score": "0.4146088", "text": "private function updatePdfMetadata(): void\n {\n $pdfMetadataInfos = $this->preparePdfMetadata();\n $this->pdfWriter->setPdfMetadataInfos($pdfMetadataInfos);\n\n $xmp = simplexml_load_file(PathUtils::combinePathWithFile(OrderSettings::getAssetDirectory(), 'orderx_extension_schema.xmp'));\n\n $descNodes = $xmp->xpath('rdf:Description');\n $descNode = $descNodes[0];\n\n $descNode->children('fx_1_', true)->{'ConformanceLevel'} = strtoupper($this->getXmlAttachmentXmpName());\n\n $descDcNodes = $descNode->children('dc', true);\n $descDcNodes->title->children('rdf', true)->Alt->li = $pdfMetadataInfos['title'];\n $descDcNodes->creator->children('rdf', true)->Seq->li = $pdfMetadataInfos['author'];\n $descDcNodes->description->children('rdf', true)->Alt->li = $pdfMetadataInfos['subject'];\n\n $descPdfNodes = $descNode->children('pdf', true);\n $descPdfNodes->{'Producer'} = 'FPDF';\n\n $descXmpNodes = $descNode->children('xmp', true);\n $descXmpNodes->{'CreatorTool'} = sprintf('Order-X PHP library %s by HorstOeko', OrderPackageVersion::getInstalledVersion());\n $descXmpNodes->{'CreateDate'} = $pdfMetadataInfos['createdDate'];\n $descXmpNodes->{'ModifyDate'} = $pdfMetadataInfos['modifiedDate'];\n\n $this->pdfWriter->addMetadataDescriptionNode($descNode->asXML());\n }", "title": "" }, { "docid": "712f9abb98e3d3774d3a8bd99142fec0", "score": "0.41456458", "text": "protected function loadFile()\n {\n $this->hashes = [];\n $this->resetLoadIssues();\n $fullPath = $this->bag->makeAbsolute($this->filename);\n if (file_exists($fullPath)) {\n $fp = fopen($fullPath, \"rb\");\n $lineCount = 0;\n while (!feof($fp)) {\n $lineCount += 1;\n $line = fgets($fp);\n $line = $this->bag->decodeText($line);\n $line = trim($line);\n if (empty($line)) {\n continue;\n }\n if (preg_match(\"~^(\\w+)\\s+\\*?(.*)$~\", $line, $matches)) {\n $hash = $matches[1];\n $originalPath = $matches[2];\n if (substr($originalPath, 0, 2) == \"./\") {\n $this->addLoadWarning(\"Line {$lineCount} : Paths SHOULD not be relative\");\n }\n $path = $this->cleanUpRelPath($originalPath);\n // Normalized path in lowercase (for matching)\n $lowerNormalized = $this->normalizePath($path);\n if (array_key_exists($path, $this->hashes)) {\n $this->addLoadError(\"Line {$lineCount} : Path {$originalPath} appears more than once in \" .\n \"manifest.\");\n } elseif ($this->matchNormalizedList($lowerNormalized)) {\n $this->addLoadWarning(\"Line {$lineCount} : Path {$originalPath} matches another file when \" .\n \"normalized for case and characters.\");\n } else {\n $this->hashes[$path] = $hash;\n $this->addToNormalizedList($lowerNormalized);\n }\n }\n }\n fclose($fp);\n }\n }", "title": "" }, { "docid": "5d89bc37633d0b9a105710e034cf5a83", "score": "0.4143538", "text": "function load_questions($path) {\n\t$sqlite = $_SESSION['sqlite'];\n\n\t$problem_array = get_data_from_tsv($path);\n\t$problem_count = count($problem_array);\n\t$prob_row=array_values($problem_array[0]);\n\t$course=$prob_row[0];\n\t$version=$prob_row[1];\n\t\n\tfor($i=2;$i<$problem_count;$i++) {\n\t\t$prob_row= array_values($problem_array[$i]);\n\t\t$problem_resource = $prob_row[0];\n\t\t$problem_qn = $prob_row[1];\n\t\t$problem_pt = $prob_row[2];\n\t\t$insert = \"insert into question (resource_id, question_id, part) values ('$problem_resource','$problem_qn','$problem_pt');\";\n\t\t\n $sqlite->query($insert) or die($sqlite->error . \"<br> $insert\");\n\t\t\n\t $lastid = $sqlite->lastInsertRowID();\n\t\t\n\t\tfor($j=3;$j<count($prob_row);$j++) {\n\t\t\tif(!$prob_row[$j]==\"\") {\n\t\t\t\t$insert = \"insert into question_skill (q_key, skill_id) values ('$lastid', '$prob_row[$j]');\";\n\t\t\t\t\n\t\t\t\t$sqlite->query($insert) or die(\"Looks like something broke (what do you expect from code written in an airplane by a guy with a philosophy degree?). <b>Make sure your tabs are ordered correctly!</b>: \" . $sqlite->error . \"<br> $insert \");\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "870b96dd2b5bf9df60ad5e329b1ca4d0", "score": "0.41389775", "text": "public function add_plugin_meta_links( $links, $file ) {\r\n\t\tif ( ! defined( 'WPHB_BASENAME' ) || WPHB_BASENAME !== $file ) {\r\n\t\t\treturn $links;\r\n\t\t}\r\n\r\n\t\tif ( defined( 'WPHB_WPORG' ) && WPHB_WPORG ) {\r\n\t\t\t$links[] = '<a href=\"https://wordpress.org/support/plugin/hummingbird-performance/reviews/#new-post\" target=\"_blank\" title=\"' . esc_attr__( 'Rate Hummingbird', 'wphb' ) . '\">' . esc_html__( 'Rate Hummingbird', 'wphb' ) . '</a>';\r\n\t\t\t$links[] = '<a href=\"https://wordpress.org/support/plugin/hummingbird-performance/\" target=\"_blank\" title=\"' . esc_attr__( 'Support', 'wphb' ) . '\">' . esc_html__( 'Support', 'wphb' ) . '</a>';\r\n\t\t} else {\r\n\t\t\tif ( isset( $links[2] ) && false !== strpos( $links[2], 'project/wp-hummingbird' ) ) {\r\n\t\t\t\t$links[2] = sprintf(\r\n\t\t\t\t\t'<a href=\"%s\" target=\"_blank\">%s</a>',\r\n\t\t\t\t\t'https://premium.wpmudev.org/project/wp-hummingbird/',\r\n\t\t\t\t\t__( 'View details', 'wphb' )\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t$links[] = '<a href=\"https://premium.wpmudev.org/get-support/\" target=\"_blank\" title=\"' . esc_attr__( 'Premium Support', 'wphb' ) . '\">' . esc_html__( 'Premium Support', 'wphb' ) . '</a>';\r\n\t\t}\r\n\r\n\t\t$links[] = '<a href=\"https://premium.wpmudev.org/roadmap/\" target=\"_blank\" title=\"' . esc_attr__( 'Roadmap', 'wphb' ) . '\">' . esc_html__( 'Roadmap', 'wphb' ) . '</a>';\r\n\r\n\t\t$links[] = '<a class=\"wphb-stars\" href=\"https://wordpress.org/support/plugin/hummingbird-performance/reviews/#new-post\" target=\"_blank\" rel=\"noopener noreferrer\" title=\"' . esc_attr__( 'Rate our plugin', 'wphb' ) . '\">\r\n\t\t\t\t\t<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span>\r\n\t\t\t\t\t</a>';\r\n\r\n\t\techo '<style>.wphb-stars span,.wphb-stars span:hover{color:#ffb900}.wphb-stars span:hover~span{color:#888}</style>';\r\n\r\n\t\treturn $links;\r\n\t}", "title": "" }, { "docid": "5515f91ab696995e2f7c4bb2af6c4768", "score": "0.41351795", "text": "function add_launchlink($llx, $lly, $urx, $ury, $filename) {}", "title": "" }, { "docid": "46c06e3deb0dff8146acc34d725ff1c0", "score": "0.41349968", "text": "public function extractMetaFile($src, $target )\n {\n\n SFilesystem::touchFileFolder($src);\n\n if ($this->mainResource) {\n $this->mainResource->extractTo($target, array($src));\n } else {\n $this->resource->extractTo($target, array($src));\n }\n\n }", "title": "" }, { "docid": "431d4f54a5663fd08353847b26095323", "score": "0.41349915", "text": "function apps_manifest($server) {\n $manifests = &drupal_static(__FUNCTION__);\n require_once DRUPAL_ROOT . '/includes/install.inc';\n if (empty($manifests[$server['name']]) && !isset($manifests[$server['name']]['error'])) {\n\n // Get the manifest for apps for this server\n $manifest = apps_request_manifest($server);\n\n //if there is an error with the manifest jump out now\n if (isset($manifest['error'])) {\n return $manifest;\n }\n $modules = system_rebuild_module_data();\n $apps = array();\n foreach($manifest['apps'] as $machine_name => $app) {\n $current_app_module = isset($modules[$machine_name]) ? $modules[$machine_name] : FALSE;\n $app['enabled'] = $current_app_module && $current_app_module->status;\n $app['incompatible'] = FALSE;\n $app['installed'] = (bool) $current_app_module;\n $app['dep_installed'] = TRUE;\n $app['disabled'] = $current_app_module && empty($current_app_module->status) && $current_app_module->schema_version > SCHEMA_UNINSTALLED;\n $app['featured'] = isset($manifest['featured app']) && ($machine_name == $manifest['featured app']);\n $app['server'] = $server;\n $app['dependencies'] = isset($app['dependencies']) ? $app['dependencies'] : array();\n $app['libraries'] = isset($app['libraries']) ? $app['libraries'] : array();\n // Add info to dependencies\n foreach($app['dependencies'] as $name_version => $downloadable) {\n //Parse dep versions\n $version = drupal_parse_dependency($name_version);\n $name = $version['name'];\n\n //check status of modules\n $current = isset($modules[$name]) ? $modules[$name] : FALSE;\n $incompatible = $current ? (bool) drupal_check_incompatibility($version, $current->info['version']) : FALSE;\n $installed = (bool) $current;\n $enabled = $current && $current->status;\n $status = $incompatible ? APPS_INCOMPATIBLE : (!$installed ? APPS_INSTALLABLE : ($enabled ? APPS_ENABLED : APPS_DISABLED));\n\n if($status == APPS_INCOMPATIBLE) {\n //if any one module is incompatible then the app is incompatible\n $app['incompatible'] = TRUE;\n }\n if($status == APPS_INSTALLABLE) {\n //if any one module is installable then we are not installed yet\n $app['dep_installed'] = FALSE;\n }\n //rebuild dep with new data\n $info = array(\n 'downloadable' => $downloadable,\n 'version' => $version,\n 'status' => $status,\n 'incompatible' => $incompatible,\n 'enabled' => $enabled,\n 'installed' => $installed,\n );\n unset($app['dependencies'][$name_version]);\n $app['dependencies'][$version['name']] = $info;\n }\n if (isset($app['libraries'])) {\n $profile = variable_get('install_profile', 'standard');\n $profile_path = drupal_get_path('profile', $profile);\n foreach($app['libraries'] as $name_version => $downloadable) {\n $info = array(\n 'downloadable' => $downloadable,\n 'version' => array('name'=>$name_version),\n 'status' => APPS_INSTALLABLE,\n 'incompatible' => 0,\n 'enabled' => 0,\n 'installed' => is_dir(DRUPAL_ROOT . \"/sites/all/libraries/$name_version\") || is_dir($profile_path . \"/libraries/$name_version\"),\n );\n $app['libraries'][$name_version] = $info;\n }\n }\n $app['status'] = $app['incompatible'] ? APPS_INCOMPATIBLE : (!$app['installed'] || !$app['dep_installed'] ? APPS_INSTALLABLE : ($app['enabled'] ? APPS_ENABLED : APPS_DISABLED));\n $apps[$machine_name] = $app;\n }\n //override json apps with our enhanced apps\n apps_add_app_info($apps);\n $manifest['apps'] = $apps;\n $manifests[$server['name']] = $manifest;\n }\n return $manifests[$server['name']];\n}", "title": "" }, { "docid": "c3167fe5d1798d590b71a94c29976f90", "score": "0.41340816", "text": "public function saveManifest()\n {\n if (empty($this->manifest)) {\n return false;\n }\n\n return fn_put_contents($this->theme_path . '/' . THEME_MANIFEST, json_encode($this->manifest));\n }", "title": "" }, { "docid": "75c9035293edaa23010eb22d5a5e5c97", "score": "0.41278294", "text": "protected function _loadItemInfo()\n {\n if( null === $this->_itemTypes )\n {\n $manifest = Zend_Registry::get('Engine_Manifest');\n if( null === $manifest )\n {\n throw new Engine_Api_Exception('Manifest data not loaded!');\n }\n $this->_itemTypes = array();\n foreach( $manifest as $module => $config )\n {\n if( !isset($config['items']) ) continue;\n foreach( $config['items'] as $key => $value )\n {\n if( is_numeric($key) ) {\n $this->_itemTypes[$value] = array(\n 'module' => $module,\n 'moduleInflected' => self::inflect($module),\n );\n } else {\n $this->_itemTypes[$key] = $value;\n $this->_itemTypes[$key]['module'] = $module;\n $this->_itemTypes[$key]['moduleInflected'] = self::inflect($module);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "44fb672c2d4c3775b744b31555594cc4", "score": "0.41272157", "text": "function process_amex($target_file_path, $file_type)\n{\n\t$file_handler = fopen($target_file_path, \"r\");\n\t\n\tif ($file_handler === FALSE)\n\t{\n\t\tprint error_response_json(\"There was an error reading the file. Please contact the server administrator about this.\");\n\t\texit;\n\t}\n\t\n\t$transactions_json_array = array();\n\t$accounts_json_array = array();\n\t\n\t$transactions_meta_string = \"TRANSACTION ID\\t(ACCOUNT NUMBER)\";\n\t$accounts_meta_string = \"NAME\\t(ACCOUNT NUMBER)\";\n\t\n\t$actual_file_type = \"\";\n\t\n\tswitch ($file_type)\n\t{\n\t\tcase \"amexGL1025\":\n\t\t\t// read the file line by line\n\t\t\twhile (!feof($file_handler))\n\t\t\t{\n\t\t\t\t$line = fgets($file_handler);\n\t\t\t\t\n\t\t\t\t// if the record is type 0 - header\n\t\t\t\tif ($line[0] == \"0\")\n\t\t\t\t{\n\t\t\t\t\t// read the file type\n\t\t\t\t\t$actual_file_type = \"amex\" . trim(substr($line, 27, 7), \" \");\n\t\t\t\t\t\n\t\t\t\t\t// check the file type\n\t\t\t\t\tif ($file_type != $actual_file_type)\n\t\t\t\t\t{\n\t\t\t\t\t\tprint error_response_json(\"Wrong file type.\");\n\t\t\t\t\t\texit_script($file_handler, $target_file_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// extract the transaction information from the relevant records (type 1)\n\t\t\t\tif ($line[0] == \"1\")\n\t\t\t\t{\n\t\t\t\t\t$transaction_json = get_transaction1025($line, $transactions_meta_string);\n\t\t\t\t\tarray_push($transactions_json_array, $transaction_json);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"amexGL1205\":\n\t\t\t// read the file line by line\n\t\t\twhile (!feof($file_handler))\n\t\t\t{\n\t\t\t\t$line = fgets($file_handler);\n\t\t\t\t\n\t\t\t\t// if the record is type 0 - header\n\t\t\t\tif ($line[0] == \"0\")\n\t\t\t\t{\n\t\t\t\t\t// read the file type\n\t\t\t\t\t$actual_file_type = \"amex\" . trim(substr($line, 27, 7), \" \");\n\t\t\t\t\t\n\t\t\t\t\t// check the file type\n\t\t\t\t\tif ($file_type != $actual_file_type)\n\t\t\t\t\t{\n\t\t\t\t\t\tprint error_response_json(\"Wrong file type.\");\n\t\t\t\t\t\texit_script($file_handler, $target_file_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// extract the transaction information from the relevant records (type 1)\n\t\t\t\tif ($line[0] == \"1\")\n\t\t\t\t{\n\t\t\t\t\t$account_json = get_account1205($line, $accounts_meta_string);\n\t\t\t\t\tarray_push($accounts_json_array, $account_json);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"amexTMKD\":\n\t\t\t// read the file line by line\n\t\t\twhile (!feof($file_handler))\n\t\t\t{\n\t\t\t\t$line = fgets($file_handler);\n\t\t\t\t\n\t\t\t\t// extract the transaction information from the relevant records (type F)\n\t\t\t\tif ($line[15] == \"F\")\n\t\t\t\t{\n\t\t\t\t\t$transaction_json = get_transactionTKMD($line, $transactions_meta_string);\n\t\t\t\t\tarray_push($transactions_json_array, $transaction_json);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"amexGL1080\":\n\t\t\t// read the file line by line\n\t\t\twhile (!feof($file_handler))\n\t\t\t{\n\t\t\t\t$line = fgets($file_handler);\n\t\t\t\t\n\t\t\t\t// if the record is type 0 - header\n\t\t\t\tif ($line[0] == \"0\")\n\t\t\t\t{\n\t\t\t\t\t// read the file type\n\t\t\t\t\t$actual_file_type = \"amex\" . trim(substr($line, 27, 7), \" \");\n\t\t\t\t\t\n\t\t\t\t\t// check the file type\n\t\t\t\t\tif ($file_type != $actual_file_type)\n\t\t\t\t\t{\n\t\t\t\t\t\tprint error_response_json(\"Wrong file type.\");\n\t\t\t\t\t\texit_script($file_handler, $target_file_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// extract the transaction information from the relevant records (type 1)\n\t\t\t\tif ($line[0] == \"1\")\n\t\t\t\t{\n\t\t\t\t\t// the file handler needs to be passed because the function reads \"nested\" records\n\t\t\t\t\t$transaction_json = get_transaction1080($line, $file_handler, $transactions_meta_string);\n\t\t\t\t\tarray_push($transactions_json_array, $transaction_json);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"amexKR1025\":\n\t\t\t// read the file line by line\n\t\t\twhile (!feof($file_handler))\n\t\t\t{\n\t\t\t\t$line = fgets($file_handler);\n\t\t\t\t\n\t\t\t\t// if the record is type 0 - header\n\t\t\t\tif ($line[0] == \"0\")\n\t\t\t\t{\t\n\t\t\t\t\t// read the file type\n\t\t\t\t\t$actual_file_type = \"amex\" . trim(substr($line, 22, 2), \" \") . trim(substr($line, 25, 4), \" \");\n\t\t\t\t\t\n\t\t\t\t\t// check the file type\n\t\t\t\t\tif ($file_type != $actual_file_type)\n\t\t\t\t\t{\n\t\t\t\t\t\tprint error_response_json(\"Wrong file type.\");\n\t\t\t\t\t\texit_script($file_handler, $target_file_path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if the record is either an account without transactions or a transaction\n\t\t\t\tif ($line[0] == \"1\" || $line[0] == \"2\")\n\t\t\t\t{\n\t\t\t\t\t$account_json = get_accountKR1025($line, $file_handler, $accounts_meta_string);\n\t\t\t\t\tarray_push($accounts_json_array, $account_json);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"amexKR1205\":\n\t\t\t// read the file line by line\n\t\t\twhile (!feof($file_handler))\n\t\t\t{\n\t\t\t\t$line = fgets($file_handler);\n\t\t\t\t\n\t\t\t\t// if the record contains accounts\n\t\t\t\tif ($line[0] == \"2\")\n\t\t\t\t{\n\t\t\t\t\t$account_json = get_accountKR1205($line, $accounts_meta_string);\n\t\t\t\t\tarray_push($accounts_json_array, $account_json);\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\tfclose($file_handler);\n\t\n\t// delete the file as it's no longer needed\n\tif (!unlink($target_file_path))\n\t{\n\t\tprint error_response_json(\"There was an error handling the file. Please contact the server administrator about this.\");\n\t\texit;\n\t}\n\t\n\t$result_json_array = array(\n\t\t\"Error\" => \"\",\n\t\t\"Accounts\" => $accounts_json_array,\n\t\t\"AccountsMeta\" => $accounts_meta_string,\n\t\t\"Transactions\" => $transactions_json_array,\n\t\t\"TransactionsMeta\" => $transactions_meta_string\n\t);\n\t\n\t$result_json = json_encode($result_json_array);\n\t\n\treturn $result_json;\n}", "title": "" }, { "docid": "9cae5fd32efedba1469f94097124e32a", "score": "0.41245586", "text": "protected function after_execute_module() {\n //$this->add_related_files('format_slides', 'activity_icon');\n }", "title": "" }, { "docid": "6d94a9dfe742c208c8efe42aaae882ef", "score": "0.41150466", "text": "public function &getManifest()\n {\n if (empty($this->manifest)) {\n if (file_exists($this->theme_path . '/' . THEME_MANIFEST)) {\n $manifest_path = $this->theme_path . '/' . THEME_MANIFEST;\n\n $ret = json_decode(fn_get_contents($manifest_path), true);\n } elseif (file_exists($this->theme_path . '/' . THEME_MANIFEST_INI)) {\n $ret = parse_ini_file($this->theme_path . '/' . THEME_MANIFEST_INI);\n } else {\n $ret = array();\n }\n\n if ($ret) {\n $this->manifest = $ret;\n }\n }\n\n if (!empty($this->manifest)) {\n // Backward compatibility\n if (isset($this->manifest['logo'])) {\n $this->manifest['theme'] = $this->manifest['logo'];\n }\n if (empty($this->manifest['mail'])) {\n $this->manifest['mail'] = $this->manifest['theme'];\n }\n }\n\n return $this->manifest;\n }", "title": "" }, { "docid": "7a3cf488f13d3e4aca27d3b776f9f8f8", "score": "0.40983227", "text": "public function testReleasesGetIosManifest()\n {\n }", "title": "" }, { "docid": "a65cb1511fae804aa6baa0dabeb45313", "score": "0.40966526", "text": "protected function define_question_plugin_structure() {\n $pluginname = $this->pluginname;\n $qtype = question_bank::get_qtype($pluginname);\n $paths = array();\n\n // If this qtype uses question_answers, add them.\n //if ($qtype->use_answers()) {\n $this->add_question_question_answers($paths);\n //}\n\n // Add own qtype stuff.\n $extraquestionfields = $qtype->extra_question_fields();\n if (is_array($extraquestionfields)) {\n $elename = $pluginname;\n $elepath = $this->get_pathfor(\"/{$pluginname}\"); // we used get_recommended_name() so this works\n $paths[] = new restore_path_element($elename, $elepath);\n }\n\n /*$extraanswerfields = $qtype->extra_answer_fields();\n if (is_array($extraanswerfields)) {\n //TODO restore extra answer table.\n }*/\n // And we return the interesting paths.\n return $paths;\n }", "title": "" }, { "docid": "35dc48d991344122b4a705c82703c71c", "score": "0.40960795", "text": "abstract protected function extractFromFile($file);", "title": "" }, { "docid": "3cfb8799749aadcf3d0654148eea82ac", "score": "0.40947556", "text": "function dfcg_plugin_meta( $links, $file ) {\n \n\t// Check we're only adding links to this plugin\n\tif( $file == DFCG_FILE_NAME ) {\n\t\n\t\t// Create DCG links\n\t\t$settings = sprintf( '<a href=\"%s\">%s</a>', 'admin.php?page=' . DFCG_FILE_HOOK, __( 'Settings', DFCG_DOMAIN ) );\n\t\t$quick = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', DFCG_HOME . 'quick-start-guide/', __( 'Quick Start Guide', DFCG_DOMAIN ) );\n\t\t$config = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', DFCG_HOME . 'configuration-guide/', __( 'Configuration Guide', DFCG_DOMAIN ) );\n\t\t$faq = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', DFCG_HOME . 'faq/', __( 'FAQ', DFCG_DOMAIN ) );\n\t\t$docs = sprintf( '<a href=\"%s\" target=\"_blank\">%s</a>', DFCG_HOME . 'documentation/', __( 'Documentation', DFCG_DOMAIN ) );\n\t\t\n\t\treturn array_merge(\n\t\t\t$links,\n\t\t\tarray( $settings, $quick, $config, $faq, $docs )\n\t\t\t\n\t\t);\n\t}\n \n\treturn $links;\n}", "title": "" }, { "docid": "317ab82d237b12a9a56ee6d40fd55319", "score": "0.409177", "text": "public function onAfterInitialise()\n\t{\n\t\t// Do we have uploaded files?\n\t\t$input = $this->input->files;\n\n\t\t$ref = new ReflectionProperty($input, 'data');\n\t\t$ref->setAccessible(true);\n\t\t$filesHash = $ref->getValue($input);\n\n\t\tif (empty($filesHash))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$extraInfo = '';\n\n\t\tforeach ($filesHash as $key => $temp_descriptor)\n\t\t{\n\t\t\tif (is_array($temp_descriptor) && !array_key_exists('tmp_name', $temp_descriptor))\n\t\t\t{\n\t\t\t\t$descriptors = $temp_descriptor;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$descriptors[] = $temp_descriptor;\n\t\t\t}\n\n\t\t\tunset($temp_descriptor);\n\n\t\t\tforeach ($descriptors as $descriptor)\n\t\t\t{\n\t\t\t\t$files = array();\n\n\t\t\t\tif (is_array($descriptor['tmp_name']))\n\t\t\t\t{\n\t\t\t\t\tforeach ($descriptor['tmp_name'] as $key => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\t'name' => $descriptor['name'][$key],\n\t\t\t\t\t\t\t'type' => $descriptor['type'][$key],\n\t\t\t\t\t\t\t'tmp_name' => $descriptor['tmp_name'][$key],\n\t\t\t\t\t\t\t'error' => $descriptor['error'][$key],\n\t\t\t\t\t\t\t'size' => $descriptor['size'][$key],\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$files[] = $descriptor;\n\t\t\t\t}\n\n\t\t\t\tforeach ($files as $fileDescriptor)\n\t\t\t\t{\n\t\t\t\t\t$tempNames = $fileDescriptor['tmp_name'];\n\t\t\t\t\t$intendedNames = $fileDescriptor['name'];\n\n\t\t\t\t\tif (!is_array($tempNames))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tempNames = array($tempNames);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!is_array($intendedNames))\n\t\t\t\t\t{\n\t\t\t\t\t\t$intendedNames = array($intendedNames);\n\t\t\t\t\t}\n\n\t\t\t\t\t$len = count($tempNames);\n\n\t\t\t\t\tfor ($i = 0; $i < $len; $i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$tempName = array_shift($tempNames);\n\t\t\t\t\t\t$intendedName = array_shift($intendedNames);\n\n\t\t\t\t\t\t$extraInfo = \"File descriptor :\\n\";\n\t\t\t\t\t\t$extraInfo .= print_r($fileDescriptor, true);\n\t\t\t\t\t\t$extraInfo .= \"\\n\";\n\n\t\t\t\t\t\t// 1. Null byte check\n\t\t\t\t\t\tif (strstr($intendedName, \"\\u0000\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraInfo .= \"Block reason: null byte\\n\";\n\n\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// 2. PHP-in-extension check\n\t\t\t\t\t\t$explodedName = explode('.', $intendedName);\n\t\t\t\t\t\t$explodedName = array_reverse($explodedName);\n\n\t\t\t\t\t\t// 2a. File extension is .php\n\t\t\t\t\t\tif ((count($explodedName) > 1) && (strtolower($explodedName[0]) == 'php'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraInfo .= \"Block reason: file extension is .php\\n\";\n\n\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// 2a. File extension is php.xxx\n\t\t\t\t\t\tif ((count($explodedName) > 2) && (strtolower($explodedName[1]) == 'php'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraInfo .= \"Block reason: file extension is in the form of .php.xxx\\n\";\n\n\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// 2b. File extensions is php.xxx.yyy\n\t\t\t\t\t\tif ((count($explodedName) > 3) && (strtolower($explodedName[2]) == 'php'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$extraInfo .= \"Block reason: file extension is in the form of .php.xxx.yyy\\n\";\n\n\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// 3. Contents scanner\n\t\t\t\t\t\t$fp = @fopen($tempName, 'r');\n\n\t\t\t\t\t\tif ($fp !== false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Initialise\n\t\t\t\t\t\t\t$data = '';\n\t\t\t\t\t\t\t$extension = strtolower($explodedName[0]);\n\t\t\t\t\t\t\t$possibleFileForShortTagSyntax = in_array($extension, array(\n\t\t\t\t\t\t\t\t'inc', 'phps', 'class', 'php3', 'php4', 'txt', 'dat', 'tpl', 'tmpl'\n\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t// Process the file in 128Kb chunks\n\t\t\t\t\t\t\twhile (!feof($fp))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Read 128Kb and add it to the existing data (the last 4 bytes of the previous scan)\n\t\t\t\t\t\t\t\t$buffer = @fread($fp, 131072);\n\t\t\t\t\t\t\t\t$data .= $buffer;\n\n\t\t\t\t\t\t\t\t// Do we have a regular PHP tag?\n\t\t\t\t\t\t\t\tif (stristr($buffer, '<?php'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$extraInfo .= \"Block reason: file contains PHP open tag\\n\";\n\n\t\t\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Do we have a (possibly concealed) PHAR file?\n\t\t\t\t\t\t\t\tif (strstr($buffer, '__HALT_COMPILER'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$extraInfo .= \"Block reason: file is a possibly concealed PHAR file\\n\";\n\n\t\t\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If we have text file which may have the short tag (<?) in it...\n\t\t\t\t\t\t\t\tif ($possibleFileForShortTagSyntax)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// ...do I have a short tag?\n\t\t\t\t\t\t\t\t\tif (strstr($buffer, '<?'))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$extraInfo .= \"Block reason: file contains PHP short tag\\n\";\n\n\t\t\t\t\t\t\t\t\t\t$this->exceptionsHandler->blockRequest('uploadshield', null, $extraInfo);\n\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Keep the last 4 bytes of data to make sure we can catch partial strings.\n\t\t\t\t\t\t\t\t$data = substr($data, -14);\n\n\t\t\t\t\t\t\t\t// WARNING: Do NOT try seek to an earlier position! Here's how it all works.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// We just need to keep the last four bytes in $data so we can append the next 128Kb.\n\t\t\t\t\t\t\t\t// This way if the start of the tag is in the previous block and the rest is in the next\n\t\t\t\t\t\t\t\t// 128Kb block we can still scan it. The value 14 is not random. __HALT_COMPILER is 15 characters\n\t\t\t\t\t\t\t\t// and the longest string we're trying to detect. If it existed in this block we'd have\n\t\t\t\t\t\t\t\t// already found it and blocked it. Therefore the only possibility is that this block\n\t\t\t\t\t\t\t\t// ended in any of the first 14 characters of that substring.\n\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t// Do NOT seek to an earlier file position. It would be a rather silly thing to do.\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfclose($fp);\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}", "title": "" }, { "docid": "0298254cf1b9d29ba79452ce29ed2d93", "score": "0.4083238", "text": "function Miniblog_addUrls()\r\n{\r\n\tglobal $pth, $u, $cl, $h, $l, $c, $f, $plugin_tx;\r\n\r\n $posts = json_decode(file_get_contents($pth['folder']['content'].'miniblog/miniblog.php'), true);\r\n if ($posts) {\r\n foreach ($posts as $folder => $postings) {\r\n foreach ($postings as $post => $postdata) {\r\n if (isset($postdata['publish']) && $postdata['publish'] && $postdata['publish'] != 'false') {\r\n $h[] = $u[] = $plugin_tx['miniblog']['single-file_blogname_in_url'] . '/' . $folder . '/' . $post;\r\n //$c[] = $f == 'sitemap' ? '#CMSimple hide#' : '';\r\n $l[] = 1;\r\n //if ($f == 'sitemap') $cl ++;\r\n }\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "2c7a19ad1d3637518778dfeabffd67e4", "score": "0.4077756", "text": "public function postMigrateActivities(){\n\t\t//Writing tab data in flat file\n\t\tperform_post_migration_activities();\n\t\t\n\t\t//rename the migration file and folder\n\t\t$renamefile = uniqid(rand(), true);\n\t\t\t\t\n\t\tif(!@rename(\"migrate/\", $renamefile.\"migrate/\")) {\n\t\t\tif (@copy (\"migrate/\", $renamefile.\"migrate/\")) {\n\t\t\t\t@unlink(\"migrate/\");\n\t\t\t} \n\t\t}\n\t}", "title": "" }, { "docid": "bf4f528a77a532ff25d1d619b80dea8a", "score": "0.40761808", "text": "public function process()\n {\n\t\tif (is_dir($this->dir)) {\n\t\t\tif ($dh = opendir($this->dir)) {\n\t\t\t\twhile (($file = readdir($dh))) {$files[] = $file;}\n\t\t\t\t//natcasesort($files);\n\t\t\t\tforeach($files as $file) {\n\t\t\t\t\tif (is_dir($this->dir.$file)) {\n\t\t\t\t\t\t$stat = stat($this->dir.$file);\n\t\t\t\t\t\t//$fdate = date(\"M d, Y H:i:s\", $stat[9]);\t\n\t\t\t\t\t\t$fdate = date($this->modx->getOption('manager_date_format') .' - '. $this->modx->getOption('manager_time_format'), $stat[9]);\t\n\t\t\t\t\t\t$filename = htmlentities($file,ENT_QUOTES);\n\t\t\t\t\t\tif ( ($filename != \".\") && ($filename != \"..\") ) $this->eas[] = array('title' => $filename,'date' => $fdate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tclosedir($dh);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $this->modx->error->failure($this->modx->lexicon('elementarchive_err_dir_nf1').' '.$this->dir.' '.$this->modx->lexicon('elementarchive_err_dir_nf2') );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn $this->modx->error->failure($this->modx->lexicon('elementarchive_err_invalid_folder').' - '.$this->dir);\n\t\t}\n\t\treturn $this->outputArray($this->eas,count($this->eas));\n\t}", "title": "" }, { "docid": "2a114c96ebc9c7ff8068d2a210fd3be8", "score": "0.40728742", "text": "function setRSSFile($set,$name){\n if (file_exists($set)) return \" <link rel=\\\"alternate\\\" type=\\\"application/rss+xml\\\" title=\\\"\".$name.\"\\\" href=\\\"\".$set.\"\\\" />\\n\";\n }", "title": "" }, { "docid": "7c965c0f33259e35ea9e2ebccf363fbb", "score": "0.4072508", "text": "public function endManifest()\n {\n $this->endManifest .= '</manifest>';\n }", "title": "" }, { "docid": "94a9724ec056a0da4b6162e957e2debc", "score": "0.4070239", "text": "public function run()\n {\n $jsonData = json_decode(file_get_contents(__DIR__ . '/archive.json'), true);\n foreach($jsonData as $question){\n Archive::create($question);\n }\n }", "title": "" }, { "docid": "d357dd54f1e7853079e67b9a90219108", "score": "0.40664864", "text": "final public function manifest()\n\t{\t\t\n\t\tif ( isset($this->xml) )\n\t\t\treturn $this->xml;\n\n\t\t$manifestFile = $this->manifestPath();\n\t\t\t\n\t\tif ( !JFile::exists($manifestFile) ) \n\t\t\tthrow new Exception(\"Extension doesn't have manifest file {$this->path}\");\n\t\telse\n\t\t\treturn ($this->xml = new SimpleXMLElement(JFile::read($manifestFile)));\n\t}", "title": "" }, { "docid": "d08a1015305f94b10019044628646f6d", "score": "0.40648043", "text": "public function willMakeUpdateManifest();", "title": "" }, { "docid": "29ceb6b05da83181c7c6da74eca9aa87", "score": "0.40638068", "text": "public function setManifest(array $rows): void {\n $this->_manifest = $rows;\n }", "title": "" }, { "docid": "142931fc780c81d850f4cec65e76f95f", "score": "0.40598676", "text": "public function loadManifest(): array\n {\n $this->manifest = [];\n\n // The service manifest is a file containing a JSON representation of every\n // service provided by the application and whether its provider is using\n // deferred loading or should be eagerly loaded on each request to us.\n if ($this->files->exists($this->manifestPath)) {\n return $this->manifest = $this->files->getRequire($this->manifestPath);\n }\n\n return $this->manifest;\n }", "title": "" }, { "docid": "16420d3602d86b21d641491db93328f8", "score": "0.4054886", "text": "public function parse()\n {\n $path = $this->getPath();\n $iterator = new DirectoryIterator($path);\n\n $resources = array();\n\n foreach ($iterator as $file) {\n if ($file->isDot() || substr($file->getFilename(), -4) != '.php') {\n continue;\n }\n\n require_once $file->getPathname();\n\n $reflectionFile = new Zend_Reflection_File($file->getPathname());\n foreach($reflectionFile->getClasses() as $class) {\n if (!$class->getDocblock()->hasTag('zfa_resource')) {\n throw new ZFAdminCli_Acl_Exception_ResourceNotSpecified(\n sprintf(\n 'Class %s does not have a resource name! Specify one using @zfa_resource tag.',\n $class->getName()\n )\n );\n }\n\n $classInfo = array();\n \n $resource = $class->getDocblock()->getTag('zfa_resource')->getDescription();\n if (!$resource) {\n throw new ZFAdminCli_Acl_Exception_ResourceNotSpecified(\n sprintf(\n 'Class %s does not have a resource name! Specify one using @zfa_resource tag.',\n $class->getName()\n )\n );\n }\n\n\t\t\t\t$parts = preg_split('/[\\s]+/', $resource);\n\t\t\t\tif (count($parts) > 1) {\n\t\t\t\t\t$resource = $parts[0];\n\t\t\t\t\tunset($parts[0]);\n\t\t\t\t\t$description = implode(' ', $parts);\n\t\t\t\t} else {\n\t\t\t\t\t$description = '';\n\t\t\t\t}\n\n $classInfo['resource'] = $resource;\n $classInfo['description'] = $description;\n $classInfo['name'] = $class->getName();\n $classInfo['methods'] = array();\n\n foreach ($class->getMethods() as $method) {\n if (substr($method->getName(), -6) == 'Action') {\n if (!$method->getDocblock()->hasTag('zfa_privilege')) {\n throw new ZFAdminCli_Acl_Exception_PrivilegeNotSpecified(\n sprintf(\n 'Privilege missing for action %s in class %s! Specify it using @zfa_privilege tag',\n $method->getName(),\n $class->getName()\n )\n );\n }\n\n $privilege = $method->getDocblock()->getTag('zfa_privilege')->getDescription();\n if (!$privilege) {\n throw new ZFAdminCli_Acl_Exception_PrivilegeNotSpecified(\n sprintf(\n 'Privilege missing for action %s in class %s! Specify it using @zfa_privilege tag',\n $method->getName(),\n $class->getName()\n )\n );\n }\n\n\t\t\t\t\t\t$parts = preg_split('/[\\s]+/', $privilege);\n\t\t\t\t\t\tif (count($parts) > 1) {\n\t\t\t\t\t\t\t$privilege = $parts[0];\n\t\t\t\t\t\t\tunset($parts[0]);\n\t\t\t\t\t\t\t$description = implode(' ', $parts);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$description = '';\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t$classInfo['methods'] []= array(\n 'name' => $method->getName(),\n 'privilege' => $privilege,\n 'description' => $description,\n );\n }\n }\n\n $resources []= $classInfo;\n }\n }\n\n return $resources;\n }", "title": "" }, { "docid": "6de1216ef814406432a68427a4c586c2", "score": "0.40534943", "text": "function copy_files($fs, $contextid, $oldid, $newid, $text, $type, $component, $filearea) {\n $filenames = get_image_filenames($text);\n foreach ($filenames as $filename) {\n\n $parsedfilenameurl = parse_url($filename)[\"path\"];\n if (isset($parsedfilenameurl)) {\n $filename = $parsedfilenameurl;\n }\n\n $file = $fs->get_file($contextid, 'question', $type, $oldid, '/', $filename);\n if ($file) {\n $newfile = new stdClass();\n $newfile->component = $component;\n $newfile->filearea = $filearea;\n $newfile->itemid = $newid;\n if (!$fs->get_file($contextid, $newfile->component, $newfile->filearea, $newfile->itemid, '/', $filename)) {\n $fs->create_file_from_storedfile($newfile, $file);\n }\n }\n }\n}", "title": "" }, { "docid": "473fd666ad3fc0f934d8377fe22bd445", "score": "0.4048662", "text": "public function testUpdateArtworkFileTags()\n {\n }", "title": "" } ]
b85509a9f7285d8fe8e46c4a4db26a7e
Get connection's initial data.
[ { "docid": "71d950b3ca305372b781149b68257238", "score": "0.71192294", "text": "public function initialData($connection_id);", "title": "" } ]
[ { "docid": "bcbd20eb6f650303cb0c25e77b402068", "score": "0.7134367", "text": "protected function getInitData()\n {\n return $this->initData;\n }", "title": "" }, { "docid": "1c78e4e5018831e74b57806ffb13dcd0", "score": "0.66507244", "text": "public function getInitialDataMap()\n {\n return $this->initialDataMap;\n }", "title": "" }, { "docid": "e4047a5de2a7b076e9875afe0eff4533", "score": "0.6625029", "text": "public function connect()\n {\n return $this->data;\n }", "title": "" }, { "docid": "f0f692e512bca5456c67f19f9fc50c0c", "score": "0.6385107", "text": "private static function getData($connection)\n {\n return static::$connections->offsetGet($connection);\n }", "title": "" }, { "docid": "0b1195624a0949860cf6d2e56c41b471", "score": "0.617848", "text": "public function connect()\n {\n $this->data->generateData($this);\n return $this->data;\n }", "title": "" }, { "docid": "4a89d5fa5902a8a5ef261e5913b3f522", "score": "0.6106548", "text": "public function getData()\n {\n $this->initialize();\n return $this->data;\n }", "title": "" }, { "docid": "b081f5b7f42007fe0bf69ef00d05c817", "score": "0.60209423", "text": "private function getConnectionData(ConnectionInterface $connection)\n {\n return $this->connections->offsetGet($connection);\n }", "title": "" }, { "docid": "fd7a4a4a9b8948ed686a896f29ce9d8a", "score": "0.5941831", "text": "function initData() {\n\t\t$journal =& Request::getJournal();\n\t\t$this->_data = $journal->getSettings();\n\t}", "title": "" }, { "docid": "0cfdd7ed74a08bee4c916650f0a97e32", "score": "0.59356904", "text": "public function get_data()\n {\n return $this->get_configuration();\n }", "title": "" }, { "docid": "97e50d7f5e8e98f4a4540f0df432a296", "score": "0.58846736", "text": "function get_data() {\n\treturn core::init();\n}", "title": "" }, { "docid": "88c58cf4bfa320dfc54e94491e8389f7", "score": "0.5758586", "text": "public function getDefaultData()\n {\n }", "title": "" }, { "docid": "a899828cafae95ad74daaf248bc94e7c", "score": "0.5736109", "text": "public function data() { return $this->_m_data; }", "title": "" }, { "docid": "1c3902776c06c488af40154e850bc11f", "score": "0.57350767", "text": "public function data()\n { $djatokaConn = new Djatoka_Net();\n $djatokaConn->connect($this->url());\n return $djatokaConn->content();\n }", "title": "" }, { "docid": "7ac79cf9369c00bf1f759ee4acf86b9e", "score": "0.5732169", "text": "final public function getData() {\r\n return $this->_data;\r\n }", "title": "" }, { "docid": "94bb87a65f2e4289808ab7b1ff6477bf", "score": "0.5727577", "text": "public function getSocketData();", "title": "" }, { "docid": "b27996359508a7fe41f3324639ad2290", "score": "0.5720917", "text": "public function getInitial()\n {\n return $this->initial;\n }", "title": "" }, { "docid": "605c021bb702851047245a43507ddc86", "score": "0.57146025", "text": "public function get_data()\n {\n return $this->get_default_property(self::PROPERTY_DATA);\n }", "title": "" }, { "docid": "8f12312f4c6a3593a3b86d22c7fa103f", "score": "0.5712641", "text": "protected function getBaseData()\n {\n return [\n 'terminalId' => $this->getTerminalId(),\n 'secret' => $this->getSecret(),\n 'currency' => $this->getCurrency()\n ];\n }", "title": "" }, { "docid": "2593111943801330e592214c3fdaaaac", "score": "0.56942236", "text": "function __getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "15ff75fbf7110af1afd89b567227af0c", "score": "0.5688186", "text": "protected function _getInitial()\n {\n return array();\n }", "title": "" }, { "docid": "ca46145edc500410d6facb0982c56cc5", "score": "0.568707", "text": "public function getDefaultData()\n {\n return null;\n }", "title": "" }, { "docid": "2e12d98c1bd50c197d140ce8dc1ab507", "score": "0.56789017", "text": "function data() {\r\n return $this->_data;\r\n }", "title": "" }, { "docid": "3a1717092eb284221e8609dda8ec3b62", "score": "0.56774056", "text": "protected function getData()\r\n {\r\n if($this->_data===null)\r\n $this->loadData();\r\n return $this->_data;\r\n }", "title": "" }, { "docid": "efa41de6b06fd8be16c5ff44787e3759", "score": "0.56769466", "text": "function getData() { return $this->_data; }", "title": "" }, { "docid": "9514e1b59e78036412b0b66c3a883fa4", "score": "0.56605166", "text": "public function initConnection();", "title": "" }, { "docid": "434e1a865d0cbbc6e80f03fb5c4eb271", "score": "0.56597984", "text": "function getServer_data() {\n return $this->server_data;\n }", "title": "" }, { "docid": "931579dd239aa2fb99fcbad702346769", "score": "0.56459665", "text": "function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "fbc490f0bdf4f3839b7870cf13181a4f", "score": "0.5645169", "text": "function getData() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "48a5548af855fcbae9b6ce82f1683699", "score": "0.5644474", "text": "public function getDataInicio(){\n\t\t\treturn $this->dataInicio;\n\t\t}", "title": "" }, { "docid": "5627e1ca94b0727fb2162cad863b5901", "score": "0.56386316", "text": "function getData() {\r\n\t\treturn $this->data;\r\n\t}", "title": "" }, { "docid": "1c1a0bb6801cabe16e5c7b0911f14e2f", "score": "0.56363094", "text": "public static function connectionArgs()\n {\n return Connection::connectionArgs();\n }", "title": "" }, { "docid": "a6e0cae07d063a5c89687f7463450bb0", "score": "0.56331205", "text": "public function defaultData();", "title": "" }, { "docid": "f7cc677042e4655b6cf1c3f0f5d1e775", "score": "0.5631326", "text": "public function get_base_data()\n {\n }", "title": "" }, { "docid": "f7cc677042e4655b6cf1c3f0f5d1e775", "score": "0.5629169", "text": "public function get_base_data()\n {\n }", "title": "" }, { "docid": "f35c967a23a381e7a7589cdda10552a5", "score": "0.5621721", "text": "public function getDefaultData(): array;", "title": "" }, { "docid": "3a2fc567e680d9cbd0876536e19039bc", "score": "0.5614997", "text": "public function data() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "d63f0439394bc1c38d7a5577443b9d7a", "score": "0.56131387", "text": "protected function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "d63f0439394bc1c38d7a5577443b9d7a", "score": "0.56131387", "text": "protected function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "d63f0439394bc1c38d7a5577443b9d7a", "score": "0.56131387", "text": "protected function getData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "25315358313cd77afbe055e07d6478c8", "score": "0.56120116", "text": "public function data() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "c23bcc80401409101f4a3ac8969fc1e0", "score": "0.5602159", "text": "public function getDataPrepared ();", "title": "" }, { "docid": "8ec78554b20109eafa76ae649b9cdd4b", "score": "0.55994296", "text": "public function data() {\n return $this->_data;\n }", "title": "" }, { "docid": "6df94549d98ec833d06cca986832bd80", "score": "0.5584541", "text": "public function get_data() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "2c8aeb9c5d3a63b2c8ccb83340a92341", "score": "0.5582861", "text": "public function getData() {\r\n return $this->_data;\r\n }", "title": "" }, { "docid": "3a313e74349abf00ff531a4f3d5867a5", "score": "0.55820966", "text": "public function getInitial();", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a619d347ad9d87605aeed4a47e001fd1", "score": "0.5576061", "text": "public function getData() {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "95c36ff24e77b04c0ffe2845638eff8c", "score": "0.5575529", "text": "public function getInitData()\n {\n $data = array();\n if (sizeof($this->attributes) > 0) {\n $data[\"attrs\"] = $this->attributes;\n }\n if (sizeof($this->templates) > 0) {\n $data[\"templates\"] = $this->templates;\n }\n return json_encode($data);\n }", "title": "" }, { "docid": "9f5408f6a7d2af0698c8d569a86ce701", "score": "0.5575347", "text": "public function getData()\n {\n return $this->get(self::DATA_);\n }", "title": "" }, { "docid": "5d011e8d705a77d600ea09c20a5be8a0", "score": "0.55696243", "text": "public function data()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "02089e702613ea4dfdfbc697220b4742", "score": "0.5568762", "text": "public function getData() {\n return $this->_data;\n }", "title": "" }, { "docid": "f7d6d871f11f6106a72548aa34fd283f", "score": "0.55684954", "text": "public function getData() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "f7d6d871f11f6106a72548aa34fd283f", "score": "0.55684954", "text": "public function getData() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "f7d6d871f11f6106a72548aa34fd283f", "score": "0.55684954", "text": "public function getData() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "3afdb412c79fba9f97da2c3186cca1d9", "score": "0.5565194", "text": "public function GetDataIni()\n {\n return $this->dataInicio;\n }", "title": "" }, { "docid": "4782d0006a6a67dd1e18c9622231d96d", "score": "0.55635124", "text": "public function getData() {\n\t\treturn ($this->data != NULL) ? $this->data : array(); \t\n\t}", "title": "" }, { "docid": "2d9d220924c9e11a80dc7207e329e655", "score": "0.55600095", "text": "public function GetData()\r\t{\r\t\treturn $this->data;\r\t}", "title": "" }, { "docid": "858a36c3baf39c611874e036c1646d89", "score": "0.55573225", "text": "public function get_data() {\n\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "38811d042a93ac0544ec3cb493c7566a", "score": "0.55535865", "text": "public function getData()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "38811d042a93ac0544ec3cb493c7566a", "score": "0.55535865", "text": "public function getData()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "38811d042a93ac0544ec3cb493c7566a", "score": "0.55535865", "text": "public function getData()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "38811d042a93ac0544ec3cb493c7566a", "score": "0.55535865", "text": "public function getData()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "38811d042a93ac0544ec3cb493c7566a", "score": "0.55535865", "text": "public function getData()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "e1a4b488188c28479e787d6378cf0504", "score": "0.55499226", "text": "function getData()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "12e6d99cba7f254b666763dac1514c77", "score": "0.5547225", "text": "public function getData()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "c4a915ae59852a14d2f9eba90f7cec44", "score": "0.5546499", "text": "public function getData() {\n\t\treturn $this -> data;\n\t}", "title": "" }, { "docid": "829f00023b24448f17b2410908611fe0", "score": "0.554621", "text": "function initData() {\n\t\tif (isset($this->subscriptionId)) {\n\t\t\t$subscriptionDao = &DAORegistry::getDAO('SubscriptionDAO');\n\t\t\t$subscription = &$subscriptionDao->getSubscription($this->subscriptionId);\n\n\t\t\tif ($subscription != null) {\n\t\t\t\t$this->_data = array(\n\t\t\t\t\t'userId' => $subscription->getUserId(),\n\t\t\t\t\t'typeId' => $subscription->getTypeId(),\n\t\t\t\t\t'dateStart' => $subscription->getDateStart(),\n\t\t\t\t\t'dateEnd' => $subscription->getDateEnd(),\n\t\t\t\t\t'membership' => $subscription->getMembership(),\n\t\t\t\t\t'domain' => $subscription->getDomain(),\n\t\t\t\t\t'ipRange' => $subscription->getIPRange()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->subscriptionId = null;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d7f050bd0b0d5411260f301d9381f091", "score": "0.55443174", "text": "public function getData()\n {\n $this->setMode('C');\n $data = $this->setupSendACHTrans();\n\n return $data;\n }", "title": "" }, { "docid": "1046c12948b3f117cfe714f1ef3630bc", "score": "0.55308574", "text": "public function getData() {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "d71abc35b1fb78de3e18ca866df9fbd1", "score": "0.55267596", "text": "public function raw_data ()\n {\n return $this->raw_data;\n }", "title": "" }, { "docid": "02b91ef60140026d242a7c4ab5fa4516", "score": "0.5526193", "text": "public function data()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "7e4d13b149f6aa9ec58a37d86f6227eb", "score": "0.55245245", "text": "public function data() {\n\t\tif ( $this->_confirm_data_ready() ) {\n\t\t\tif ( is_array( $this->_map_data ) ) {\n\t\t\t\treturn $this->_map_data;\n\t\t\t} else {\n\t\t\t\treturn array();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "25cb593c2e9ea4171edbdb85332be7a8", "score": "0.5519032", "text": "public function getData()\r\n\t{\r\n\t\treturn $this->_data;\r\n\t}", "title": "" }, { "docid": "cbe4782eb67fdd70e48c7ec78ffe28ad", "score": "0.55181146", "text": "public function getData()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "title": "" }, { "docid": "cbe4782eb67fdd70e48c7ec78ffe28ad", "score": "0.55181146", "text": "public function getData()\r\n\t{\r\n\t\treturn $this->data;\r\n\t}", "title": "" }, { "docid": "8ea64b596be4ebe560ef76d796100cf9", "score": "0.551648", "text": "public function getData() {}", "title": "" }, { "docid": "8ea64b596be4ebe560ef76d796100cf9", "score": "0.551648", "text": "public function getData() {}", "title": "" }, { "docid": "8ea64b596be4ebe560ef76d796100cf9", "score": "0.551648", "text": "public function getData() {}", "title": "" }, { "docid": "8ea64b596be4ebe560ef76d796100cf9", "score": "0.551648", "text": "public function getData() {}", "title": "" }, { "docid": "c3ee4f19952c19bfabe435075fe4c50c", "score": "0.55110407", "text": "public function getData() {\n\t\treturn $this->cfg->data;\n\t}", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.55085135", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.55085135", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.55085135", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.55085135", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "b29bba727a73af249429d4bcc20bccff", "score": "0.55085135", "text": "public function getData() {\n return $this->data;\n }", "title": "" }, { "docid": "0cbeceeb10f658a557f4f153b63bddbf", "score": "0.5507765", "text": "function initData() {\n\t\tif (isset($this->referralId)) {\n\t\t\t$referralDao =& DAORegistry::getDAO('ReferralDAO');\n\t\t\t$referral =& $referralDao->getReferral($this->referralId);\n\n\t\t\tif ($referral != null) {\n\t\t\t\t$this->_data = array(\n\t\t\t\t\t'name' => $referral->getName(null), // Localized\n\t\t\t\t\t'status' => $referral->getStatus(),\n\t\t\t\t\t'url' => $referral->getUrl()\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\t$this->referralId = null;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cb66896fc3d150639e41bf82ceae5ed3", "score": "0.5500818", "text": "function getData()\n\t{\n\t\t// Lets load the data if it doesn't already exist\n\t\tif (empty( $this->_data ))\n\t\t{\n $query = $this->_buildQuery();\n $limitstart = $this->getState('limitstart');\n $limit = $this->getState('limit');\n $this->_data = $this->_getList( $query,$limitstart,$limit );\n\t\t}\n\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "bc1390cc61a79cc95ee4c0291a2748cb", "score": "0.5500579", "text": "public function get_data()\n {\n return $this->m_data;\n }", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "75cbc34b3e8203a089a678d5fe21386b", "score": "0.5500339", "text": "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "title": "" } ]
0dcf163b45ff71f51a4c67cf03589727
Ensures an IP address is both a valid IP address and does not fall within a private network range.
[ { "docid": "aeff919323169aaa31daad8516dfa0b8", "score": "0.7181282", "text": "function validate_ip($ip) {\n\n\tif (strtolower($ip) === 'unknown')\n\t\treturn false;\n\n\t// Generate IPv4 network address\n\t$ip = ip2long($ip);\n\n\t// If the IP address is set and not equivalent to 255.255.255.255\n\tif ($ip !== false && $ip !== -1) {\n\t\t// Make sure to get unsigned long representation of IP address\n\t\t// due to discrepancies between 32 and 64 bit OSes and\n\t\t// signed numbers (ints default to signed in PHP)\n\t\t$ip = sprintf('%u', $ip);\n\n\t\t// Do private network range checking\n\t\tif ($ip >= 0 && $ip <= 50331647)\n\t\t\treturn false;\n\t\tif ($ip >= 167772160 && $ip <= 184549375)\n\t\t\treturn false;\n\t\tif ($ip >= 2130706432 && $ip <= 2147483647)\n\t\t\treturn false;\n\t\tif ($ip >= 2851995648 && $ip <= 2852061183)\n\t\t\treturn false;\n\t\tif ($ip >= 2886729728 && $ip <= 2887778303)\n\t\t\treturn false;\n\t\tif ($ip >= 3221225984 && $ip <= 3221226239)\n\t\t\treturn false;\n\t\tif ($ip >= 3232235520 && $ip <= 3232301055)\n\t\t\treturn false;\n\t\tif ($ip >= 4294967040)\n\t\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" } ]
[ { "docid": "a310e4633c3d5e744b763441eaf4731a", "score": "0.74426275", "text": "function validate_internal_ip_address($value) {\n if (!filter_var($value, FILTER_VALIDATE_IP)) {\n throw new Carbon_Validator_ValidationError(\"Please enter valid IP address. \");\n }\n $pieces = explode('.', $value);\n\n if (count($pieces) !== 4) {\n throw new Carbon_Validator_ValidationError(\"Your IP should have exactly 4 numbers. \");\n }\n\n if (intval($pieces[0]) !== 192 || intval($pieces[1]) !== 168) {\n throw new Carbon_Validator_ValidationError(\"Your IP address should start with 192.168 \");\n }\n\n return true;\n}", "title": "" }, { "docid": "fe5c969cbf17a1044ad22d261339cd44", "score": "0.74023414", "text": "public function testInvalidCidrForInvalidAddress(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Range must be in valid IP/CIDR format, invalid address.');\n\n $instance = new IPRange();\n $instance->validate('2001:abcd::0010', '2001:abcdf::0010/29');\n }", "title": "" }, { "docid": "0c422b1bc8c181a0b7cbcb16c0fa2c1c", "score": "0.71415204", "text": "function validate_ip($ip) {\n\tif (strtolower($ip) === 'unknown')\n\treturn false;\n\n\t// generate ipv4 network address\n\t$ip = ip2long($ip);\n\n\t// if the ip is set and not equivalent to 255.255.255.255\n\tif ($ip !== false && $ip !== -1) {\n\t\t// make sure to get unsigned long representation of ip\n\t\t// due to discrepancies between 32 and 64 bit OSes and\n\t\t// signed numbers (ints default to signed in PHP)\n\t\t$ip = sprintf('%u', $ip);\n\t\t// do private network range checking\n\t\tif ($ip >= 0 && $ip <= 50331647) return false;\n\t\tif ($ip >= 167772160 && $ip <= 184549375) return false;\n\t\tif ($ip >= 2130706432 && $ip <= 2147483647) return false;\n\t\tif ($ip >= 2851995648 && $ip <= 2852061183) return false;\n\t\tif ($ip >= 2886729728 && $ip <= 2887778303) return false;\n\t\tif ($ip >= 3221225984 && $ip <= 3221226239) return false;\n\t\tif ($ip >= 3232235520 && $ip <= 3232301055) return false;\n\t\tif ($ip >= 4294967040) return false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "cbb61076dd90f4459834e7ec4f6048ef", "score": "0.71373427", "text": "function validip($ip)\n{\n\t$ip = ip2long($ip);\n\tif (empty($ip) || $ip == '-1') {\n\t\treturn false;\n\t}\n\t// reserved IANA IPv4 addresses\n\t// http://www.iana.org/assignments/ipv4-address-space\n\t$reserved_ips = array(\n\t\tarray(\n\t\t\t'0',\n\t\t\t'50331647'\n\t\t), // '0.0.0.0','2.255.255.255'\n\t\tarray(\n\t\t\t'167772160',\n\t\t\t'184549375'\n\t\t), // '10.0.0.0','10.255.255.255'\n\t\tarray(\n\t\t\t'2130706432',\n\t\t\t'2147483647'\n\t\t), // '127.0.0.0','127.255.255.255'\n\t\tarray(\n\t\t\t'-1442971648',\n\t\t\t'-1442906113'\n\t\t), // '169.254.0.0','169.254.255.255'\n\t\tarray(\n\t\t\t'-1408237568',\n\t\t\t'-1407188993'\n\t\t), // '172.16.0.0','172.31.255.255'\n\t\tarray(\n\t\t\t'-1073741312',\n\t\t\t'-1073741057'\n\t\t), // '192.0.2.0','192.0.2.255'\n\t\tarray(\n\t\t\t'-1062731776',\n\t\t\t'-1062666241'\n\t\t), // '192.168.0.0','192.168.255.255'\n\t\tarray(\n\t\t\t'-256',\n\t\t\t'-1'\n\t\t) // '255.255.255.0','255.255.255.255'\n\t);\n\n\tforeach ($reserved_ips as $r) { // $r[0] = min, $r[1] = max\n\t\tif (($ip >= $r[0]) && ($ip <= $r[1])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "234aff2bcf5cc8e125ac92b16b89c3c3", "score": "0.7133883", "text": "public static function validate_ip($ip) {\n\t\tif (strtolower($ip) === 'unknown'){\n\t\t\treturn false;\n\t\t}\n\t\t// generate ipv4 network address\n\t\t$ip = ip2long($ip);\n\n\t\t// if the ip is set and not equivalent to 255.255.255.255\n\t\tif ($ip !== false && $ip !== -1) {\n\t\t\t// make sure to get unsigned long representation of ip\n\t\t\t// due to discrepancies between 32 and 64 bit OSes and\n\t\t\t// signed numbers (ints default to signed in PHP)\n\t\t\t$ip = sprintf('%u', $ip);\n\t\t\t// do private network range checking\n\t\t\tif ($ip >= 0 && $ip <= 50331647){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 167772160 && $ip <= 184549375){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 2130706432 && $ip <= 2147483647){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 2851995648 && $ip <= 2852061183){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 2886729728 && $ip <= 2887778303){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 3221225984 && $ip <= 3221226239){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 3232235520 && $ip <= 3232301055){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($ip >= 4294967040){ \n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "486df7dce1fedc9c2e66ebc49538bf14", "score": "0.71044815", "text": "function verify_ipaddress(&$ipaddress)\n\t{\n\t\tif ($ipaddress == '')\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if (preg_match('#^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$#', $ipaddress, $octets))\n\t\t{\n\t\t\tfor ($i = 1; $i <= 4; $i++)\n\t\t\t{\n\t\t\t\tif ($octets[\"$i\"] > 255)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fb6224bde24f68397ab9eeb43c9c95ef", "score": "0.70984226", "text": "function validate_ip($ip) {\n if (strtolower($ip) === 'unknown')\n return false;\n\n // generate ipv4 network address\n $ip = ip2long($ip);\n\n // if the ip is set and not equivalent to 255.255.255.255\n if ($ip !== false && $ip !== -1) {\n // make sure to get unsigned long representation of ip\n // due to discrepancies between 32 and 64 bit OSes and\n // signed numbers (ints default to signed in PHP)\n $ip = sprintf('%u', $ip);\n // do private network range checking\n if ($ip >= 0 && $ip <= 50331647)\n return false;\n if ($ip >= 167772160 && $ip <= 184549375)\n return false;\n if ($ip >= 2130706432 && $ip <= 2147483647)\n return false;\n if ($ip >= 2851995648 && $ip <= 2852061183)\n return false;\n if ($ip >= 2886729728 && $ip <= 2887778303)\n return false;\n if ($ip >= 3221225984 && $ip <= 3221226239)\n return false;\n if ($ip >= 3232235520 && $ip <= 3232301055)\n return false;\n if ($ip >= 4294967040)\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "f2d5b1d22f7ba53cbaba5eab03957bfa", "score": "0.7065695", "text": "public function ValidateIPAddress( )\n\t\t{\n\t\t\tif( !array_key_exists( 'REMOTE_ADDR', $_SERVER ) )\n\t\t\t{\n\t\t\t\tthrow new Exception( 'Missing remote address.' );\n\t\t\t}\n\t\t\t\n\t\t\t$Remote = ip2long( $_SERVER[ 'REMOTE_ADDR' ] );\n\t\t\t\n\t\t\t// https://api.github.com/meta\n\t\t\t$Addresses =\n\t\t\t[\n\t\t\t\t[ '192.30.252.0', 22 ],\n\t\t\t\t[ '185.199.108.0', 22 ],\n\t\t\t\t[ '140.82.112.0', 20 ],\n\t\t\t];\n\t\t\t\n\t\t\tforeach( $Addresses as $CIDR )\n\t\t\t{\n\t\t\t\t$Base = ip2long( $CIDR[ 0 ] );\n\t\t\t\t$Mask = pow( 2, ( 32 - $CIDR[ 1 ] ) ) - 1;\n\t\t\t\t\n\t\t\t\tif( $Base === ( $Remote & ~$Mask ) )\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "0a59719318da980d56be8cd6b2f010b7", "score": "0.7030295", "text": "function validate_ip_address($ip_addr)\r\n{\r\n if (preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\", $ip_addr))\r\n {\r\n //now all the intger values are separated\r\n $parts = explode(\".\", $ip_addr);\r\n //now we need to check each part can range from 0-255\r\n foreach ($parts as $ip_parts)\r\n {\r\n if (intval($ip_parts) > 255 || intval($ip_parts) < 0)\r\n return false; //if number is not within range of 0-255\r\n\r\n }\r\n return true;\r\n }\r\n else\r\n return false; //if format of ip address doesn't matches\r\n}", "title": "" }, { "docid": "a0a6c69382af769409e3a1842b43ee08", "score": "0.70263743", "text": "public function validate_ip($ip) \n {\n if (strtolower($ip) === 'unknown')\n return false;\n // generate ipv4 network address\n $ip = ip2long($ip);\n // if the ip is set and not equivalent to 255.255.255.255\n if ($ip !== false && $ip !== -1) {\n // make sure to get unsigned long representation of ip\n // due to discrepancies between 32 and 64 bit OSes and\n // signed numbers (ints default to signed in PHP)\n $ip = sprintf('%u', $ip);\n // do private network range checking\n if ($ip >= 0 && $ip <= 50331647) return false;\n if ($ip >= 167772160 && $ip <= 184549375) return false;\n if ($ip >= 2130706432 && $ip <= 2147483647) return false;\n if ($ip >= 2851995648 && $ip <= 2852061183) return false;\n if ($ip >= 2886729728 && $ip <= 2887778303) return false;\n if ($ip >= 3221225984 && $ip <= 3221226239) return false;\n if ($ip >= 3232235520 && $ip <= 3232301055) return false;\n if ($ip >= 4294967040) return false;\n }\n return true;\n }", "title": "" }, { "docid": "bda71a53608208687ab4e2964e5bb1cb", "score": "0.69635844", "text": "public function testGetMessageForNotInRangeIp(): void\n {\n $instance = new IPRange();\n $instance->validate('2001:abcd::0009', '2001:abcd::0010/125');\n\n $this->assertSame('Received ip is not in (2001:abcd::0010/125) range', $instance->getMessage());\n }", "title": "" }, { "docid": "26db4e38c83e6b63a9d58d3c211cb9c1", "score": "0.6952646", "text": "public function testIsIpOnInvalid() {\n\t\t$invalidIp = array('100');\n\t\t$invalidIp2 = array('1000.10.10.1');\n\n\t\t$this->assertFalse($this->SeoAppModel->isIp($invalidIp));\n\t\t$this->assertFalse($this->SeoAppModel->isIp($invalidIp2));\n\t}", "title": "" }, { "docid": "aa1f53df27567be064fdf02609bf66dc", "score": "0.69256276", "text": "public function validateIpAddress($ip_addr)\r\n {\r\n if(preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\",$ip_addr))\r\n {\r\n //now all the intger values are separated\r\n $parts=explode(\".\",$ip_addr);\r\n //now we need to check each part can range from 0-255\r\n foreach($parts as $ip_parts)\r\n {\r\n if(intval($ip_parts)>255 || intval($ip_parts)<0)\r\n return false; //if number is not within range of 0-255\r\n }\r\n return true;\r\n }\r\n else\r\n return false; //if format of ip address doesn't matches\r\n }", "title": "" }, { "docid": "b67c1df39443c9807d8d7fd360824d0a", "score": "0.69205123", "text": "function validIPAddress($ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP,\n FILTER_FLAG_IPV4 |\n FILTER_FLAG_IPV6 |\n FILTER_FLAG_NO_PRIV_RANGE |\n FILTER_FLAG_NO_RES_RANGE) === false) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "e073029df2e415d58d689b1bab5e1270", "score": "0.68286353", "text": "function is_valid_ip($ip)\r\n {\r\n $ip = explode('.', $ip);\r\n if(count($ip) != 4) return false;\r\n for($i=0;$i<4;$i++)\r\n if(!is_numeric($ip[$i]) || $ip[$i] > 255) return false;\r\n return true;\r\n }", "title": "" }, { "docid": "fc97e47b2361b49c734510f20dcdc6bb", "score": "0.68206704", "text": "function ip_valid ( $ips )\n{\n\tif ( isset( $ips ) ) {\n\t\t$ip = ip_first ( $ips );\n\t\t$ipnum = ip2long ( $ip );\n\t\tif ( $ipnum !== -1 && $ipnum !== false && ( long2ip ( $ipnum ) === $ip ) ) {\n\t\t\tif ( ( $ipnum < 167772160 || $ipnum > 184549375 ) && // Not in 10.0.0.0/8\n\t\t\t( $ipnum < - 1408237568 || $ipnum > - 1407188993 ) && // Not in 172.16.0.0/12\n\t\t\t( $ipnum < - 1062731776 || $ipnum > - 1062666241 ) ) // Not in 192.168.0.0/16\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "a77ae0614a547ac8cf9bbaa3e5b27737", "score": "0.6780002", "text": "private function validateIpAddress()\n {\n if (Request::isAuthorized()) {\n return;\n }\n\n try {\n if (!Request::isGitHub()) {\n header('HTTP/1.1 403 Forbidden');\n echo 'Sorry, your IP address (' . Request::getIpAddress() . ') isn\\'t authorized. 🙁';\n exit;\n }\n } catch (Exception $e) {\n header('HTTP/1.1 500 Internal Server Error');\n echo $e->getMessage();\n exit;\n }\n }", "title": "" }, { "docid": "f0da966ce3a49a11f5e29bbc316bb7fc", "score": "0.6716653", "text": "function is_valid($ip)\n{\n return filter_var($ip, FILTER_VALIDATE_IP) !== FALSE;\n}", "title": "" }, { "docid": "29f644868cbfb2622b6ca18a07d1d5a4", "score": "0.671077", "text": "function validate_ip($ip)\n{\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "e806446d40c12170b07bde2ca3db9770", "score": "0.66846794", "text": "public static function validateIpAddress($ip_addr){\n\t\tif(preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\",$ip_addr)){\n\t\t\t$parts=explode(\".\",$ip_addr);\n\t\t\tforeach($parts as $ip_parts){\n\t\t\t\tif(intval($ip_parts)>255 || intval($ip_parts)<0) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b140f01c61560840d6889e18f22d173d", "score": "0.66810584", "text": "public function testGetMessageForInvalidIp(): void\n {\n $instance = new IPRange();\n $instance->validate('2001:abcdf::0010', '2001:abcd::0010/125');\n\n $this->assertSame('Received value is not a valid ip address', $instance->getMessage());\n }", "title": "" }, { "docid": "ef8055a53033f1be8eaa339ed22bec62", "score": "0.66673005", "text": "function isIP($IP2Check): bool\n{\n return !(filter_var($IP2Check, FILTER_VALIDATE_IP) === false);\n}", "title": "" }, { "docid": "44a92e75e2db667e0cad78709cbc3848", "score": "0.66613173", "text": "function validate_ip( $ip ) {\n if( filter_var( $ip, FILTER_VALIDATE_IP, \n FILTER_FLAG_IPV4 |\n FILTER_FLAG_NO_PRIV_RANGE |\n FILTER_FLAG_NO_RES_RANGE \n ) === false ) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "78d4beeef81c48c29ea8bb6f14b0d427", "score": "0.6619365", "text": "public static function checkIPValidRange( $ipAddress ){\n\t\t\tglobal $wpdb;\n\n\t\t\tif( is_multisite() ){\n\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t/*\n\t\t\t\t\tGets IP ranges\n\t\t\t\t*/\n\t\t\t\t$ipRanges = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT * \n\t\t\t\t\t FROM \".$wpdb->prefix.\"wps_ip_ranges\n\t\t\t\t\t WHERE blog_id = '%d'\",\n\t\t\t\t\t $currentBlogID\n\t\t\t\t), ARRAY_A );\n\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t/*\n\t\t\t\t\tGets IP ranges\n\t\t\t\t*/\n\t\t\t\t$ipRanges = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_ip_ranges\", ARRAY_A );\n\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t\tLoops through all of the IP Ranges\n\t\t\t\tto see if the ip address is within\n\t\t\t\trange.\n\t\t\t*/\n\t\t\tforeach($ipRanges as $ipRange){\n\t\t $min = ip2long($ipRange['start_ip']);\n \t\t$max = ip2long($ipRange['end_ip']);\n \t\t$needle = ip2long($ipAddress); \n\n \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n \t\t\treturn true;\n \t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tReturns false if the ip is not in range.\n\t\t\t*/\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "bff141e6ce998162e8ad378b41ef2143", "score": "0.6611289", "text": "function phpwhois_validip($ip)\n{\n\n\tif (empty($ip))\n\t\treturn false;\n\t\n\tif ((ip2long($ip) == -1) or (ip2long($ip) === false))\n\t\treturn false;\n\t\t\n\t$reserved_ips = array (\n\t\t\tarray('0.0.0.0','2.255.255.255'),\n\t\t\tarray('10.0.0.0','10.255.255.255'),\n\t\t\tarray('127.0.0.0','127.255.255.255'),\n\t\t\tarray('169.254.0.0','169.254.255.255'),\n\t\t\tarray('172.16.0.0','172.31.255.255'),\n\t\t\tarray('192.0.2.0','192.0.2.255'),\n\t\t\tarray('192.168.0.0','192.168.255.255'),\n\t\t\tarray('255.255.255.0','255.255.255.255')\n\t\t\t);\n\t\t\t\n\tforeach ($reserved_ips as $r)\n\t\t{\n\t\t$min = ip2long($r[0]);\n\t\t$max = ip2long($r[1]);\n\t\tif ((ip2long($ip) >= $min) && (ip2long($ip) <= $max)) return false;\n\t\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "dc107d1449ba6d3ec4e64b8973a9980e", "score": "0.6588635", "text": "public static function validateIP($ipaddr) {\n\t\t// TODO: check for reserved ranges\n\t\t$nval = inet_pton($ipaddr);\n\t\tif( $nval === false ) {\n\t\t\tthrow new InvalidIPException(\"Address $ipaddr invalid.\");\n\t\t}\n\t}", "title": "" }, { "docid": "58f0999e20cb8e38c9255dfd1ce2959e", "score": "0.6587475", "text": "public function valid()\n {\n return filter_var($this->address, FILTER_VALIDATE_IP) !== false;\n }", "title": "" }, { "docid": "f23a5ee4d4dc3ecf19c9cd691fcf3471", "score": "0.65740865", "text": "public function testIsIpOnValid() {\n\t\t$validIp = array('192.168.1.1');\n\t\t$nonArrayIp = '10.100.0.1';\n\n\t\t$this->assertTrue($this->SeoAppModel->isIp($validIp));\n\t\t$this->assertTrue($this->SeoAppModel->isIp($nonArrayIp));\n\t}", "title": "" }, { "docid": "254e6b4197b0ed2e22d00ca4c466852e", "score": "0.65376306", "text": "function check_ip_in_range( $ip, $cidr_ranges ) {\n\n // Check if given IP is inside a IP range with CIDR format\n $ip = ip2long( $ip );\n if ( ! is_array( $cidr_ranges ) ) {\n $cidr_ranges = array( $cidr_ranges );\n } \n \n foreach ( $cidr_ranges as $cidr_range ) {\n list( $subnet, $mask ) = explode( '/', $cidr_range );\n if ( ( $ip & ~( ( 1 << ( 32 - $mask ) ) - 1 ) ) == ip2long( $subnet ) ) { \n return true;\n }\n }\n\n return false;\n\n}", "title": "" }, { "docid": "4d658fe1bd280abd6a9e3db5109ffa58", "score": "0.6518301", "text": "function validate_ip($ip)\n {\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "24a7eea799fe1824b2fe72d4eca8803d", "score": "0.6518116", "text": "public static function ipAddressValidation()\n {\n $hostIpAddress = Yii::$app->request->getRemoteIp();\n if(Yii::$app->user->identity->getId()==1 || $hostIpAddress==\"::1\"){\n return true;\n }\n $hostQuery = \"SELECT ipw_id FROM ava_ip_address_whitelist WHERE ipw_ip_address like '\".$hostIpAddress.\"' limit 1\";\n $hostData = commonComponent::getQueryResults($hostQuery);\n if(count($hostData)>0){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2d5f86866db56799a388930792438338", "score": "0.63604486", "text": "function ip_in_range($ip, $ip_cond)\n{\n if (strpos($ip_cond, '/') === false) {\n // no netmask\n return $ip == $ip_cond;\n }\n list($net, $mask) = explode('/', $ip_cond);\n $ip_long = ip2long($ip);\n if ($ip_long === false || $ip_long == -1) { // PHP4 returns -1, PHP5 returns 'false'\n warn(\"ip_in_range() invalid ip detected. [$ip]\");\n return false;\n }\n $net_long = ip2long($net);\n if ($net_long === false || $net_long == -1) {\n warn(\"ip_in_range() invalid net detected. [$net]\");\n return false;\n }\n if (!is_numeric($mask)) {\n $mask = mask_to_bitnum($mask);\n }\n $mask = ~((1 << (32 - $mask)) - 1);\n $ip_filtered = $ip_long & $mask;\n return $net_long == $ip_filtered;\n}", "title": "" }, { "docid": "5bf5c9d6557c00132e608416d5d08412", "score": "0.6355221", "text": "public static function isPublic( $ip ) {\n\t\t$n = self::toUnsigned( $ip );\n\t\tif ( !$n ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// ip2long accepts incomplete addresses, as well as some addresses\n\t\t// followed by garbage characters. Check that it's really valid.\n\t\tif( $ip != long2ip( $n ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tstatic $privateRanges = false;\n\t\tif ( !$privateRanges ) {\n\t\t\t$privateRanges = array(\n\t\t\t\tarray( '10.0.0.0', '10.255.255.255' ), # RFC 1918 (private)\n\t\t\t\tarray( '172.16.0.0', '172.31.255.255' ), # \"\n\t\t\t\tarray( '192.168.0.0', '192.168.255.255' ), # \"\n\t\t\t\tarray( '0.0.0.0', '0.255.255.255' ), # this network\n\t\t\t\tarray( '127.0.0.0', '127.255.255.255' ), # loopback\n\t\t\t);\n\t\t}\n\n\t\tforeach ( $privateRanges as $r ) {\n\t\t\t$start = self::toUnsigned( $r[0] );\n\t\t\t$end = self::toUnsigned( $r[1] );\n\t\t\tif ( $n >= $start && $n <= $end ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7be681525210e146e0a6eaafc17f6a0d", "score": "0.63403094", "text": "public function checkBadips()\n {\n global $xoopsConfig;\n if ($xoopsConfig['enable_badips'] == 1 && isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] != '') {\n foreach ($xoopsConfig['bad_ips'] as $bi) {\n if (!empty($bi) && preg_match('/' . $bi . '/', $_SERVER['REMOTE_ADDR'])) {\n exit();\n }\n }\n }\n unset($bi, $bad_ips, $xoopsConfig['badips']);\n }", "title": "" }, { "docid": "bd2736e9b2cf8e32ceaf0b6e0803a28e", "score": "0.63240075", "text": "public function checkNonusedIP($ip)\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\t\t//Check for validity of IP address\n\t\tif (!$this->checkIP($ip))\n\t\t\treturn(false);\n\n\t\t//Check if it is non existing\n\t\tif (CClientLister::IPexists($ip))\n\t\t{\n\t\t\t$this->addErrorMessage(\"$I18N_ip_exists ($ip)\");\n\t\t\treturn(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$CIPRangesO = new CIPRanges();\n\t\t\tif (!$CIPRangesO->checkNotInRange($ip))\n\t\t\t{\n\t\t\t\t$this->addErrorMessage($CIPRangesO->popErrorMessagesHTML());\n\t\t\t\treturn(false);\n\t\t\t}\n\t\t}\n\n\t\treturn(true);\n\t}", "title": "" }, { "docid": "44c391e77fe875235c9cf8ee9ba9a9f6", "score": "0.62635404", "text": "public function validate_ip($ip)\n\t{\n\t if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {\n\t return false;\n\t }\n\t return true;\n\t}", "title": "" }, { "docid": "ca19a81bfb696c83afc36fe7ae8c8b32", "score": "0.62577623", "text": "public function validate_ip($entry)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! Network_Utils::is_valid_ip($entry))\n return lang('network_ip_invalid');\n }", "title": "" }, { "docid": "6f9152216c7cd849fd9a412a60aed05b", "score": "0.62113833", "text": "function ip_in_network($ip, $net_addr, $net_mask){ \n\t if($net_mask <= 0){ return false; } \n\t $ip_binary_string = sprintf(\"%032b\",ip2long($ip)); \n\t $net_binary_string = sprintf(\"%032b\",ip2long($net_addr)); \n\t return (substr_compare($ip_binary_string,$net_binary_string,0,$net_mask) === 0); \n\t}", "title": "" }, { "docid": "f11f14e25b1e267d7ce846f2a1fea81b", "score": "0.6211136", "text": "public static function validateIP($ip) {\n return filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);\n }", "title": "" }, { "docid": "b4b7c6ea627bdc7cb894f6b3012f9268", "score": "0.6207726", "text": "public function test_rule_valid_ip()\n\t{\n\t\t$this->assertTrue($this->run_rule('valid_ip', ''));\n\t\t$this->assertTrue($this->run_rule('valid_ip', '127.0.0.1'));\n\t\t$this->assertTrue($this->run_rule('valid_ip[ipv4]', '127.0.0.1'));\n\t\t$this->assertTrue($this->run_rule('valid_ip', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\t\t$this->assertTrue($this->run_rule('valid_ip[ipv6]', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\n\t\t$this->assertFalse($this->run_rule('valid_ip[ipv4]', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\t\t$this->assertFalse($this->run_rule('valid_ip[ipv6]', '127.0.0.1'));\n\t\t$this->assertFalse($this->run_rule('valid_ip', 'H001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\t\t$this->assertFalse($this->run_rule('valid_ip', '127.0.0.259'));\n\t}", "title": "" }, { "docid": "35f5607a7fc032f7389cb57318fd8ca2", "score": "0.6166986", "text": "function lz_valid_ip($ip){\n\t\n\t// IPv6\n\tif(lz_valid_ipv6($ip)){\n\t\treturn true;\n\t}\n\t\n\t// IPv4\n\tif(!ip2long($ip) || !lz_valid_ipv4($ip)){\n\t\treturn false;\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "fb21748c70b17ab61aa026907e9451ab", "score": "0.61666024", "text": "function isIpAllowed() {\r\n\treturn true;\r\n}", "title": "" }, { "docid": "90cfd72a33fc7161e7b152297807e6b2", "score": "0.6164498", "text": "public function testValidateIPFail()\n {\n $res = $this->controller->validateIP(\"123\");\n $this->assertContains(\"not a valid\", $res);\n }", "title": "" }, { "docid": "f6ec5659e5abc4bfd1808ac825c3d2fd", "score": "0.61563367", "text": "public function validate_right_source_ip($entry)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! Network_Utils::is_valid_ip($entry))\n return lang('network_ip_invalid');\n if (! Network_Utils::is_private_ip($entry))\n return lang('network_ip_invalid');\n\n }", "title": "" }, { "docid": "174aa9a57e0529037611d0232cd0316b", "score": "0.6149031", "text": "private static function validateIp($ip)\n {\n /*if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {\n return false;\n }*/\n return true;\n }", "title": "" }, { "docid": "0f4d43ecd37f670ff700be2cfa288f8a", "score": "0.61194354", "text": "function ip_check_mask ($ip, $net_addr, $net_mask=null) {\r\n\t\tif(strpos($net_addr, '/') !== FALSE) {\r\n\t\t\tlist($net_addr, $net_mask) = explode('/', $net_addr);\r\n\t\t}\r\n\r\n\t\t// process $net_mask = 255.255.255.0\r\n\t\tif(strpos($net_mask, '.') !== FALSE) {\r\n\t\t\t$long = ip2long($net_mask);\r\n\t\t\t$net_mask = 32-log(($long ^ -1)+1,2);\r\n\t\t}\r\n\t\t\r\n\t\t// \r\n\t\tif($net_mask <= 0){ return false; }\r\n\t\r\n\t\t$ip_binary_string = sprintf(\"%032b\",ip2long($ip));\r\n\t\t$net_binary_string = sprintf(\"%032b\",ip2long($net_addr));\r\n\t\r\n\t\treturn substr_compare($ip_binary_string, $net_binary_string, 0, $net_mask) === 0;\r\n\t}", "title": "" }, { "docid": "1de60313196d5bb4798fde3cfc72420d", "score": "0.61140776", "text": "function check_dhcp_range($if_ipaddr, $if_subnet, $range_from, $range_to) {\n\t$input_errors = array();\n\t$subnet_start = (ip2long($if_ipaddr) & gen_subnet_mask_long($if_subnet));\n\t$subnet_end = (ip2long($if_ipaddr) | (~gen_subnet_mask_long($if_subnet)));\n\t\n\t$rangefrom = ip2long($range_from);\n\t$rangeto = ip2long($range_to);\n\t$ifip = ip2long($if_ipaddr);\n\t\n\tif (($rangefrom < $subnet_start) || ($rangefrom > $subnet_end) ||\n\t ($rangeto < $subnet_start) || ($rangeto > $subnet_end))\n\t\t$input_errors[] = \"The specified range lies outside of the current subnet.\";\n\t\n\tif ($rangefrom > $rangeto)\n\t\t$input_errors[] = \"The range is invalid (start address higher than end address).\";\n\t\n\tif (($rangefrom == $subnet_start) || ($rangeto == $subnet_end))\n\t\t$input_errors[] = \"The network address (\" . long2ip($subnet_start) . \") or the broadcast address (\" . long2ip($subnet_end) . \") cannot be used in the range.\";\n\t\n\tif ($ifip >= $rangefrom && $ifip <= $rangeto)\n\t\t$input_errors[] = \"The interface's IP address cannot be included in the range.\";\n\t\n\treturn $input_errors;\n}", "title": "" }, { "docid": "b1f1bbcd66e23bbb881f45f20a453447", "score": "0.6090939", "text": "function ipCIDRCheck( $IP, $CIDR ) {\n list ($net, $mask) = split ( \"/\", $CIDR );\n\n $ip_net = ip2long( $net );\n $ip_mask = ~((1 << (32 - $mask)) - 1);\n\n $ip_ip = ip2long( $IP );\n\n $ip_ip_net = $ip_ip & $ip_mask;\n\n return ($ip_ip_net == $ip_net);\n}", "title": "" }, { "docid": "cc335be64030c121884edc025779d1a6", "score": "0.6087468", "text": "public function validateIpn(){\n // TODO: validate\n }", "title": "" }, { "docid": "93bd58d39db1731b55fea892c0fd2223", "score": "0.60746855", "text": "public function validate_ip($ip)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n // TODO: tighten this up\n if (!(preg_match(\"/^([0-9\\.\\-]*)$/\", $ip)))\n return lang('network_ip_invalid');\n }", "title": "" }, { "docid": "1325c011aef35a8ce1e34ba34ab159e5", "score": "0.6052454", "text": "function isIPv4($IP2Check): bool\n{\n return !(filter_var($IP2Check, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === false);\n}", "title": "" }, { "docid": "3c3e1ec5b3099e3f10c535c581d4a0d9", "score": "0.60267717", "text": "#[@test, @expect('lang.FormatException')]\n public function illegalAddress() {\n new Inet6Address('::ffffff:::::a');\n }", "title": "" }, { "docid": "d4322caf75442f26abcd6fac09e9e341", "score": "0.60253936", "text": "public function testIPAddressInvalidArgumentExceptionIsInvalidArgumentException()\n {\n self::expectException(InvalidArgumentException::class);\n self::expectExceptionMessage('This is an IPAddressInvalidArgumentException.');\n\n throw new IPAddressInvalidArgumentException('This is an IPAddressInvalidArgumentException.');\n }", "title": "" }, { "docid": "2813a9f704db961fd3c3bc156b0da4bf", "score": "0.6023756", "text": "public function testDenyIpAddress()\n {\n self::setUpFirewallOff();\n\n $ipAddress = $this->getServiceManager()->get('Config')['zoop']['test']['ipAddress'];\n $firewall = $this->getServiceManager()\n ->get('zoop.pyro.firewall');\n $firewall->deny($ipAddress);\n\n $this->assertTrue($firewall->isDenied($ipAddress));\n }", "title": "" }, { "docid": "cbe3ae17b505880b0cb09c0d0c24c8fa", "score": "0.602195", "text": "public function validateIPorURL($string)\n {\n return (filter_var($string, FILTER_VALIDATE_IP) xor filter_var($string, FILTER_VALIDATE_URL));\n }", "title": "" }, { "docid": "ac7e260c7081b3ecb16281abcbc670f5", "score": "0.6015097", "text": "public function isIp();", "title": "" }, { "docid": "e5c96304a48202140f5ebd81a684393c", "score": "0.60102683", "text": "#[@test]\n public function notInSubnet() {\n $this->assertFalse(create(new Inet6Address('::1'))->inSubnet(new Network(new Inet6Address('::0101'), 120)));\n }", "title": "" }, { "docid": "425f0cdea1172c1122490accaf810bb8", "score": "0.60038155", "text": "public static function is_private(mixed $ip): bool {\n\t\t$ipi = self::toInteger($ip);\n\t\tforeach (self::$private_addresses as $address) {\n\t\t\tif ($ipi >= $address[1] && $ipi <= $address[2]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8d90567c163fc8e9ec3913e388c5ba30", "score": "0.5997177", "text": "private function ipaddressFilter(array $input)\n {\n if (filter_var($input[1], FILTER_VALIDATE_IP)) {\n return true;\n }\n $this->newValidationError($input);\n }", "title": "" }, { "docid": "f68183e0ba323ba7958f4ce091d6a885", "score": "0.5969484", "text": "public function block_ip_addrs()\n\t{\n\t\t/* No reason to do anything if no IP addresses have been redlisted */\n\t\t$option_check = trim( $this->options['ip_addrs'] );\n\n\t\tif( ! empty( $option_check ) )\n\t\t{\n\t\t\t/* Create an array of the IP addresses */\n\t\t\t$ips = explode(\"\\n\", $this->options['ip_addrs'] );\n\n\t\t\tforeach( $ips as $ip )\n\t\t\t{\n\t\t\t\t$ip = trim( $ip );\n\n\t\t\t\tif( $ip == $_SERVER['REMOTE_ADDR'] )\n\t\t\t\t{\n\t\t\t\t\tif( $this->debug )\n\t\t\t\t\t{\n\t\t\t\t\t\tdie( $this->lang['debug_ip_address'] . $_SERVER['REMOTE_ADDR'] );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6577f2c88d9818d20d47a3d6cf744b12", "score": "0.5965937", "text": "public function valid_address($address)\n {\n global $config;\n \n // 95 characters\n if(strlen($address) !== 95) return FALSE;\n \n // Start with 4\n if($address[0] != '4') return FALSE;\n \n // Second character can only be a number (0-9) or letters A or B\n if( ! in_array($address[1],array_merge(array_map(function($v){\n return (string) $v;\n },range(0,9)),array('A','B')))) return FALSE;\n \n // The string can only be alphanumeric characters\n if( ! ctype_alnum($address)) return FALSE; \n \n // Can not send to self\n if($address == $config['asset'][$this->id]['address']) return FALSE;\n \n return TRUE;\n }", "title": "" }, { "docid": "23a11bfdb8064be0cddb6bf64dd730a2", "score": "0.59635913", "text": "function fn_is_inet_ip($ip, $is_int = false)\n{\n if ($is_int) {\n $ip = long2ip($ip);\n }\n $_ip = explode('.', $ip);\n\n return\n ($_ip[0] == 10 ||\n ($_ip[0] == 172 && $_ip[1] >= 16 && $_ip[1] <= 31) ||\n ($_ip[0] == 192 && $_ip[1] == 168) ||\n ($_ip[0] == 127 && $_ip[1] == 0 && $_ip[2] == 0 && $_ip[3] == 1) ||\n ($_ip[0] == 255 && $_ip[1] == 255 && $_ip[2] == 255 && $_ip[3] == 255))\n ? false : true;\n}", "title": "" }, { "docid": "3f6a70864564b217f74dbf587c367cef", "score": "0.5962026", "text": "static function isIPInNet( $ipaddress, $network, $mask = 24 )\n {\n $lnet = ip2long( $network );\n $lip = ip2long( $ipaddress );\n $binnet = str_pad( decbin( $lnet ), 32, '0', STR_PAD_LEFT );\n $firstpart = substr( $binnet, 0, $mask );\n $binip = str_pad( decbin( $lip ), 32, '0', STR_PAD_LEFT );\n $firstip = substr( $binip, 0, $mask );\n return( strcmp( $firstpart, $firstip ) == 0 );\n }", "title": "" }, { "docid": "1fee9c7fc10586ae41f1191ded3016a3", "score": "0.59493417", "text": "static function is_sub_IP($range, $ip){\r\n\t \t\r\n\t \t$array_range \t= explode('.', $range);\r\n\t \t$array_ip \t\t= explode('.', $ip);\r\n\t \t\r\n\t \tfor ($i = 0; $i<count($array_range); $i++){\r\n\t \t\t\r\n\t\t \tif (strstr($array_range[$i], '/'))\r\n\t\t \t\t$parts[] = explode('/', $array_range[$i]);\r\n\t\t \telse \r\n\t\t \t\t$parts[] = $array_range[$i];\r\n\t\t \t\t\r\n\t\t \tif (is_array($parts[$i])){\r\n\t\t \t\tif ((int)$parts[$i][0] <= (int)$array_ip[$i] && (int)$parts[$i][1] >= (int)$array_ip[$i])\r\n\t\t \t\t\tcontinue;\r\n\t\t \t\telse \r\n\t\t \t\t\treturn FALSE;\r\n\t\t \t}elseif (is_string($parts[$i])) {\r\n\t\t \t\tif ($parts[$i] == $array_ip[$i])\r\n\t\t \t\t\tcontinue;\r\n\t\t \t\telse \r\n\t\t \t\t\treturn FALSE;\r\n\t\t \t}\r\n\t\t \t\r\n\t \t}\r\n \t\r\n \t return TRUE;\r\n \t\r\n }", "title": "" }, { "docid": "245b89d3dcbc47fd15b5a90af25eb3b8", "score": "0.59432465", "text": "function ipORcidr($field, $value, array $params) {\r\n foreach ($value as $ip){\r\n $valid = isIPv4($ip) || isIPv4cidr($ip) || isIPv6($ip) || isIPv6cidr($ip);\r\n if (!$valid) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "b9c305cf4f3051edc4a6021aa00e1310", "score": "0.59374213", "text": "function isIP($ip, $type = FILTER_FLAG_IPV4, $exludePrivAndRes = false)\n{\n // Check if the value is falsy\n if (empty($ip)) {\n return false;\n }\n\n $type = strtolower($type);\n\n switch ($type) {\n case 'ipv4':\n $type = FILTER_FLAG_IPV4;\n break;\n\n case 'ipv6':\n $type = FILTER_FLAG_IPV6;\n break;\n\n default:\n $type = FILTER_FLAG_IPV4;\n break;\n }\n\n // Check the default value is boolean\n is_bool($exludePrivAndRes) || $exludePrivAndRes = false;\n\n if ($exludePrivAndRes) {\n // Use bitwise OR when excluding the private and reserved address ranges\n $type |= FILTER_FLAG_NO_PRIV_RANGE;\n $type |= FILTER_FLAG_NO_RES_RANGE;\n }\n\n return (bool) filter_var($ip, FILTER_VALIDATE_IP, $type);\n}", "title": "" }, { "docid": "db5aced5dcc2e2c8ca77b4d7287a0091", "score": "0.5933358", "text": "public function validate_ip_address( $ip_address ) { // Declare \\Markguyver\\LivefyreImporter\\Helper\\Validation->validate_ip_address() function\n\t\t\treturn $this->filter_string_variable( $ip_address, \\FILTER_VALIDATE_IP );\n\t\t}", "title": "" }, { "docid": "8ecd73a576fcbb72f6cdfd8137d9ca00", "score": "0.5927539", "text": "function check_ip(string $ip): bool\n{\n if (filter_var($ip, FILTER_VALIDATE_IP)) {\n $result = true;\n } else {\n $result = false;\n }\n return $result;\n}", "title": "" }, { "docid": "79bb25a3ebcec933d0460f64c0044a9b", "score": "0.5924006", "text": "public function testInvalidCidrForEmptySuffix(string $range): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Range must be in valid IP/CIDR format, empty bits for suffix.');\n\n $instance = new IPRange();\n $instance->validate('2001:abcd::0010', $range);\n }", "title": "" }, { "docid": "67b33745a98cfb17de88d69fd6cb27d8", "score": "0.5890279", "text": "public function testGetCorrectIpInput()\n {\n $testIPv6 = \"fe80::fc6c:65db:a743:60a7\";\n $res1 = $this->controller->validateIpInput($testIPv6);\n $this->assertContains('The IP-address ' . '<p style=\"color:#69a542; font-weight: 900;\">' . $testIPv6 . '</p>' .\n ' is a valid IPv6 IP-address.', $res1);\n\n $testIPv4 = \"192.168.56.1\";\n $res2 = $this->controller->validateIpInput($testIPv4);\n $this->assertContains('The IP-address ' . '<p style=\"color:#69a542; font-weight: 900;\">' . $testIPv4 . '</p>' .\n ' is a valid IPv4 IP-address.', $res2);\n }", "title": "" }, { "docid": "7bad39216d3fd5e4fdf9e40acd92526c", "score": "0.58672243", "text": "protected function ip_rule($data) {\n return (filter_var($data, FILTER_VALIDATE_IP) !== false);\n }", "title": "" }, { "docid": "b10d89ea2a41448ce6d59c39dadc5e84", "score": "0.58570147", "text": "public function validate($ip)\r\n {\r\n $flags = FILTER_FLAG_IPV4;# | FILTER_FLAG_IPV6;\r\n if (filter_var($ip, FILTER_VALIDATE_IP, $flags) === false) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "c84805bd853e002db724bef46302ad2c", "score": "0.5848048", "text": "function ip_in_net($network, $ip)\n{\n @list( $net, $mask) = explode('/', $network);\n if(!$mask) $mask=32;\n $bmask = (pow(2,$mask)-1) << (32-$mask);\n $bnet = ip2long($net) & $bmask;\n if( ( ip2long($ip) & $bmask ) === $bnet ) return(1);\n return(0);\n}", "title": "" }, { "docid": "2454be13b5ed223e97890762aa9d3f3f", "score": "0.58416605", "text": "private function _validateIP() {\n \n if(!$this->data->getIp()){\n if(isset($_SERVER[\"REMOTE_ADDR\"])){\n $this->data->setIp($_SERVER[\"REMOTE_ADDR\"]);\n }else{\n $this->data->setIp($this->_getRemoteIp());\n }\n }\n }", "title": "" }, { "docid": "da33b73c37c52e56249738bb8f5e1d46", "score": "0.5840693", "text": "public function testTheIPRule()\n\t{\n\t\t$input = array('ip' => '192.168.1.1');\n\t\t$rules = array('ip' => 'ip');\n\t\t$this->assertTrue(Validator::make($input, $rules)->valid());\n\n\t\t$input['ip'] = '192.111';\n\t\t$this->assertFalse(Validator::make($input, $rules)->valid());\n\t}", "title": "" }, { "docid": "1d7afe04988784ede9170443b68b7277", "score": "0.58326554", "text": "function validIp($ip) {\n\treturn (eregi(\"^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$\",$ip)) ? true : false ;\n}", "title": "" }, { "docid": "46789d031ced2f9feac4d052e19247c2", "score": "0.5831364", "text": "function is_ipaddr($var) {\r\n\tif (!is_string($var))\r\n\t\treturn FALSE;\r\n\treturn filter_var($var, FILTER_VALIDATE_IP);\r\n}", "title": "" }, { "docid": "b12c9787bf813663695c88640dd3484a", "score": "0.5808089", "text": "public function isValid($value, $context = array())\n {\n $result = true;\n\n $ranges = explode('|', $value);\n\n foreach ($ranges as $range) {\n if (($sep = strpos($range, '-')) !== false) {\n $range = IpFactory::rangeFromBoundaries(substr($range, 0, $sep), substr($range, $sep + 1));\n\n } else {\n $range = IpFactory::rangeFromString($range);\n }\n if (! $range instanceof RangeInterface) {\n $result = false;\n break;\n }\n }\n\n if (!$result) {\n $this->_error(self::ERROR_INVALID_IP);\n }\n\n return $result;\n }", "title": "" }, { "docid": "1f33a3333e66ec7fca022437ae5d1bcf", "score": "0.5788223", "text": "public static function isIp($mVal)\r\n\t{\r\n\t\treturn filter_var($mVal, FILTER_VALIDATE_IP) !== false;\r\n\t}", "title": "" }, { "docid": "a3e7a4519f0871244d95d1e1b2111b73", "score": "0.5768238", "text": "public function find_invalid_addresses () {\n \t// init\n \t$false = array();\n\t\t// find unique ids\n\t\t$ids = $this->find_unique_subnetids ();\n\t\tif ($ids===false)\t\t\t\t\t\t\t\t\t\t{ return false; }\n\t\t// validate\n\t\tforeach ($ids as $id) {\n\t\t\tif ($this->verify_subnet_id ($id->subnetId)===0) {\n\t\t\t\t$false[] = $this->fetch_subnet_addresses ($id->subnetId);\n\t\t\t}\n\t\t}\n\t\t// return\n\t\treturn isset($false) ? $false : false;\n\t}", "title": "" }, { "docid": "0691f12230ca29f8a80444c38740cc10", "score": "0.5751099", "text": "public function ipAddressIsValid($ipToCheck)\n {\n return (filter_var($ipToCheck, FILTER_VALIDATE_IP))? true : false ;\n }", "title": "" }, { "docid": "91998860524c300a9454422e070ff8db", "score": "0.5730537", "text": "function isIp($ip)\n{ \n if(filter_var($url,FILTER_VALIDATE_IP)) { \n return true; \n } else { \n return false; \n } \n}", "title": "" }, { "docid": "af0e4679f0ee1dfe0579bf8cd99de550", "score": "0.5714247", "text": "public function checkIPRange($firstIp, $lastIp)\n\t{\n\t\t$ret = true;\n\n\t\t//Check both IPs\n\t\t$ret &= $this->checkIP($firstIp);\n\t\t$ret &= $this->checkIP($lastIp);\n\n\t\t//If at least one IP is incorrect => return\n\t\tif (!$ret)\n\t\t\treturn(false);\n\n\t\t//Check, if the first IP is \"bigger\" than the last IP => error\n\t\tif (ip2longSafe($firstIp) > ip2longSafe($lastIp))\n\t\t{\n\t\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\t\t$this->addErrorMessage($I18N_IPRangeInvalid.\" ($firstIp - $lastIp)\");\n\t\t\treturn(false);\n\t\t}\n\n\t\treturn(true);\n\t}", "title": "" }, { "docid": "a38b4a011ec671343083cab19cf31cdb", "score": "0.5714101", "text": "public static function isIPAddress($value)\n\t{\n\t\t$pattern = \"/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i\";\n\t\tif (preg_match($pattern, $value))\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "fd8c1a4e08be75dd8a1e798b1289bfb5", "score": "0.57032335", "text": "#[@test]\n public function differentIPsShouldBeDifferent() {\n $this->assertNotEquals(new Inet6Address('::1'), new Inet6Address('::fe08'));\n }", "title": "" }, { "docid": "668d42ca4dcfddd9a85bf90d8c30d459", "score": "0.56670934", "text": "static function validate() {\n\n\t\tglobal $allowed;\n\n\t\tglobal $redirect;\n\n\t\t$ipcheck = new IPCheck($allowed);\n\n\t\t$check = $ipcheck->checkIPs();\n\n\t\tif (!$check) {\n\n\t\t\theader('Location:' . $redirect);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ceb1a4de2c039a9892fd57089028797c", "score": "0.56602603", "text": "protected static function ipInRange($ip, $range)\n {\n if (strpos($range, '/') == false) {\n $range .= '/32';\n }\n // $range is in IP/CIDR format eg 127.0.0.1/24\n list( $range, $netmask ) = explode('/', $range, 2);\n $rangeDecimal = ip2long($range);\n $IPDecimal = ip2long($ip);\n $wildcardDecimal = pow(2, ( 32 - $netmask)) - 1;\n $netmaskDecimal = ~ $wildcardDecimal;\n return ( ( $IPDecimal & $netmaskDecimal ) == ( $rangeDecimal & $netmaskDecimal ) );\n }", "title": "" }, { "docid": "57c6a4ee49dea3f0eab07e2d72ab8c8f", "score": "0.56600404", "text": "function isAllowed($ip){\n if(in_array($ip, MW_IP_WHITELIST)) {\n\t\tif(MW_DEBUG == True){echo \"\\nIP is in whitelist\\n\";}\n return true;\n }\n\n foreach(MW_IP_WHITELIST as $i){\n $wildcardPos = strpos($i, \"*\");\n // Check if the ip has a wildcard\n if($wildcardPos !== false && substr($ip, 0, $wildcardPos) . \"*\" == $i) {\n if(MW_DEBUG == True){echo \"\\nIP $ip in wildcard\\n\";}\n\t\t\treturn true;\n }\n if(str_contains($i,\"/\")){\n if(ipCIDRCheck ($ip, $i)){\n\t\t\t if(MW_DEBUG == True){echo \"\\nIP $ip in CIDR $i\\n\";}\n return true;\n }\n }\n }\n\tif(MW_DEBUG == True){echo \"\\nIP $ip not in whitelist\\n\";}\n return false;\n}", "title": "" }, { "docid": "9ded4ee0cf86c3f34d8b5a81a6c7b12a", "score": "0.5658391", "text": "public function is_blocked_ip() {\n // get the IP address for the current user\n $ip = $this->input->ip_address();\n print_r($ip);\n die();\n\n // if the IP address is not valid, ip_address() will return ‘0.0.0.0’\n \n // // sanitary check\n // if ($ip == '0.0.0.0') {\n // return FALSE;\n // }\n\n // $query = $this->db->get_where('ip_blocked', array('ip' => $ip), 1);\n\n\t\t// return ($query->num_rows() === 1);\n }", "title": "" }, { "docid": "2315e250e02b647e556055b8ba92cd1b", "score": "0.56515", "text": "static public function ipv4_in_range($ip, $range) {\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n\n return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n\n return false;\n }\n\n }", "title": "" }, { "docid": "e299059456ecac823c25771844fbc1a1", "score": "0.56440187", "text": "public function validate_left_source_ip($entry)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (! Network_Utils::is_valid_ip($entry)) \n return lang('network_ip_invalid');\n if (! Network_Utils::is_private_ip($entry))\n return lang('network_ip_invalid');\n if (! Network_Utils::is_valid_local_ip($entry))\n return lang('static_vpn_invalid_local_ip');\n\n\n }", "title": "" }, { "docid": "e1adb463e4fdcd0aaef38dff09a79c23", "score": "0.56388086", "text": "public static function checkCIDRMatch(string $ip, string $range){\n\t\t\tif (strpos($range, \"/\") !== false){\n\t\t\t\tlist($subnet, $bits) = explode('/', $range);\n\t\t\t\tif ($bits === null || $bits === \"\") {\n\t\t\t\t\t$bits = 32;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$bits = 32;\n\t\t\t\t$subnet = &$range;\n\t\t\t}\n\t\t\t$ip = ip2long($ip);\n\t\t\t$subnet = ip2long($subnet);\n\t\t\t$mask = -1 << (32 - $bits);\n\t\t\t$subnet &= $mask; // nb: in case the supplied subnet wasn't correctly aligned\n\t\t\treturn ($ip & $mask) == $subnet;\n\t\t}", "title": "" }, { "docid": "145328d3ebbc5d269d77113f6cb0bab3", "score": "0.5631754", "text": "public function validateIp()\n {\n if ($this->ipAddress) {\n if (filter_var($this->ipAddress, FILTER_VALIDATE_IP)) {\n $this->valid = true;\n if (filter_var($this->ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n $this->message = \"$this->ipAddress är en giltig IPv4 adress\";\n $this->host = gethostbyaddr($this->ipAddress);\n } elseif (filter_var($this->ipAddress, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {\n $this->message = \"$this->ipAddress är en giltig IPv6 adress\";\n }\n } else {\n $this->message = \"$this->ipAddress är inte en giltig IP adress\";\n }\n }\n return $this->getInfo();\n }", "title": "" }, { "docid": "b4a173436263daca4806cf9a05c0808b", "score": "0.56273955", "text": "public function isPublicIp($ip) {\n $ip = ip2long($ip);\n\t\treturn (0 != ($ip & 4278190080)) // 0.0.0.0/8\n\t\t\t&& (2130706432 != ($ip & 4278190080)) // 127.0.0.0/8\n\t\t\t&& (3232235520 != ($ip & 4294901760)) // 192.168.0.0/16\n\t\t\t&& (2886729728 != ($ip & 4293918720)) // 172.16.0.0/12\n\t\t\t&& (167772160 != ($ip & 4278190080)) // 10.0.0.0/8\n\t\t\t&& (2851995648 != ($ip & 4294901760)) // 169.254.0.0/16\n\t\t\t&& (1681915904 != ($ip & 4290772992)) // 100.64.0.0/10\n\t\t\t&& (3221225472 != ($ip & 4294967288)) // 192.0.0.0/29\n\t\t\t&& (3221225984 != ($ip & 4294967040)) // 192.0.2.0/24\n\t\t\t&& (3227017984 != ($ip & 4294967040)) // 192.88.99.0/24\n\t\t\t&& (3323068416 != ($ip & 4294836224)) // 198.18.0.0/15\n\t\t\t&& (3325256704 != ($ip & 4294967040)) // 198.51.100.0/24\n\t\t\t&& (3405803776 != ($ip & 4294967040)) // 203.0.113.0/24\n\t\t\t&& (3758096384 != ($ip & 4026531840)) // 224.0.0.0/4\n\t\t\t&& (4026531840 != ($ip & 4026531840));// 240.0.0.0/4\n }", "title": "" }, { "docid": "e7e8d574915014a42defb582ce0b2349", "score": "0.5622013", "text": "#[@test]\n public function isNotLoopbackAddress() {\n $this->assertFalse(create(new Inet6Address('::2'))->isLoopback());\n }", "title": "" }, { "docid": "dd92979f249a9ffec8dd404906c1a6b1", "score": "0.56211627", "text": "public function isIp($url = null) {\n\t\tif (!$url) {\n\t\t\tthrow new \\Exception('Domain was not passed (isIp).');\n\t\t}\n\t\t$parts = $this->urlParts($url);\n\t\tif (filter_var($parts['host'], FILTER_VALIDATE_IP)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "4018e8554a24eb2a8ef67cfe12460448", "score": "0.56173605", "text": "public function hasIp(): bool;", "title": "" }, { "docid": "92579390d7a2d3b64dffd19406b9bda2", "score": "0.5615807", "text": "private function validateIP($value)\n {\n // Initialize\n $bReturn = null;\n\n // Validates\n $pValidator = new \\Foundation\\Type\\Complex\\CIp($value);\n\n if ($pValidator->isValid()) {\n if ($this->_bOptionIP) {\n // IP address is allowed\n $this->_Value = $pValidator->getValue();\n $this->_sPunycode = $this->_Value;\n $bReturn = true;\n } else {\n // IP address is not allowed\n $bReturn = false;\n }\n }\n\n unset($pValidator);\n\n return $bReturn;\n }", "title": "" }, { "docid": "d62340d29211800763d5940af073a448", "score": "0.5613529", "text": "public function isInRangeWithInvalidRange()\n {\n $this->expectException(DomainException::class);\n $currentDateTime = new \\DateTime('now');\n $startDateTime = new \\DateTime('next year');\n $endDateTime = new \\DateTime('last year');\n DateTime::isInRange($currentDateTime, $startDateTime, $endDateTime);\n }", "title": "" }, { "docid": "5f4eb8cb8e562ef691a95a5f21bfb556", "score": "0.5612502", "text": "function checkIP($ip=null){\n\t\tif(empty($ip)){$ip=$_SERVER['REMOTE_ADDR'];}\n\t\tglobal $auto_restrict;\n\n\t\tif (isset($auto_restrict[\"banned_ip\"][$ip])){\n\t\t\tif ($auto_restrict[\"banned_ip\"][$ip]['nb']<$auto_restrict['max_security_issues_before_ban']){return true;} // below max login fails \n\t\t\telse if ($auto_restrict[\"banned_ip\"][$ip]['date']>=@date('U')){return false;} // active banishment \n\t\t\telse if ($auto_restrict[\"banned_ip\"][$ip]['date']<@date('U')){remove_banned_ip($ip);return true;} // old banishment \n\t\t\treturn false;\n\t\t}else{return true;}// ip is ok\n\t}", "title": "" } ]
2a0de06a033d82b36aa26408b2919b2b
Is all players offline?
[ { "docid": "b8eb560dc02d2302f418d4d6ecb41024", "score": "0.8334436", "text": "public function isAllFPlayersOffline() : bool\n {\n return count($this->getPlayersWhereOnline(true)) == 0;\n }", "title": "" } ]
[ { "docid": "8ae80c87b6c263a8178b32602d6a8eb8", "score": "0.7209056", "text": "public function isFactionConsideredOffline() : bool\n {\n return $this->isAllFPlayersOffline();\n }", "title": "" }, { "docid": "1d2f384f2b860e0d4ce535d9d3051615", "score": "0.71166295", "text": "public function isAnyFPlayersOnline() : BOOL\n {\n return !$this->isAllFPlayersOffline();\n }", "title": "" }, { "docid": "b9fb5519b10672eaf9c0c6ff045456fd", "score": "0.6746332", "text": "public function isOnline();", "title": "" }, { "docid": "0f6f8d622ccdcde6fa735243c759aeb9", "score": "0.6537532", "text": "public function isOnline(){\n return Cache::has('user-is-online'. $this->id);\n }", "title": "" }, { "docid": "6fe9337b7f3b1a35fe34e2bc28cde290", "score": "0.6534657", "text": "public function isOnline(){\n return Cache::has('user-is-online-' .$this->id);\n }", "title": "" }, { "docid": "c1c8ae3b6909bc418dc379caa2b5c685", "score": "0.6430685", "text": "public function isFactionConsideredOnline() : BOOL\n {\n return !$this->isFactionConsideredOffline();\n }", "title": "" }, { "docid": "b63d8be98f22858fee48ca4c1ebd8596", "score": "0.6415567", "text": "public function syncPlayers ()\n {\n try\n {\n $pQuery = new QuerySAMPServer (LVP :: GAMESERVER_IP, LVP :: GAMESERVER_PORT, 0, 500000);\n $aPlayers = $pQuery -> getDetailedPlayers ();\n $nPlayers = count ($aPlayers);\n \n if ($nPlayers == 0)\n {\n // Sure?\n $aPlayers = $pQuery -> getDetailedPlayers ();\n $nPlayers = count ($aPlayers);\n }\n }\n catch (QueryServerException $pException)\n {\n return false;\n }\n \n $db = $this->Database;\n\n $oldPlayers = $this->m_aPlayers;\n\n $this->clearPlayers();\n \n foreach ($aPlayers as $aPlayerInfo)\n {\n $nId = $aPlayerInfo ['PlayerID'];\n\n // Check if we know the player already.\n if (isset($oldPlayers[$nId])) {\n // Yep we do. Put him back.\n $this->m_aPlayers[$nId] = $oldPlayers[$nId];\n }\n\n $this -> setPlayerKey ($nId, 'Nickname', $aPlayerInfo ['Nickname']);\n \n if ($this -> getPlayerKey ($nId, 'JoinTime') === 0)\n {\n $this -> setPlayerKey ($nId, 'JoinTime', time ());\n }\n \n if ($this -> getPlayerKey ($nId, 'Level') === 0)\n {\n $pResult = $db -> query (\n 'SELECT u.user_id\n FROM lvp_mainserver.users_nickname n\n LEFT JOIN lvp_mainserver.users u ON u.user_id = n.user_id\n LEFT JOIN lvp_mainserver.users_mutable m ON m.user_id = u.user_id\n WHERE n.nickname = \"' . $db->escape($aPlayerInfo['Nickname']) . '\"');\n \n if ($pResult !== false && $pResult -> num_rows > 0)\n {\n list ($nProfileId) = $pResult -> fetch_row ();\n $pResult -> free ();\n $this -> getPlayer ($nId) -> fetchInformation ($db, $nProfileId);\n }\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "b4fbcda1c036113b04eecb04b03680ef", "score": "0.6301359", "text": "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->getAuthIdentifier());\n }", "title": "" }, { "docid": "fadbce18fc4148b5663678b87afcd1a3", "score": "0.6284318", "text": "public function playerOnline();", "title": "" }, { "docid": "a9230a266215ba22c75bf9a4032019da", "score": "0.6282463", "text": "public function isOnline(): bool\n {\n return $this->online;\n }", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.62049764", "text": "public function isAvailable();", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.62049764", "text": "public function isAvailable();", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.62049764", "text": "public function isAvailable();", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.62049764", "text": "public function isAvailable();", "title": "" }, { "docid": "bbc92089413efda147faacbc0ca9ab55", "score": "0.6194247", "text": "public function isOnline()\n\t{\n\t\tif (!$this->lastActivity) {\n\t\t\t$this->online = false;\n\t\t} else {\n\t\t\t$now = new \\DateTime();\n\t\t\t$interval = $now->getTimestamp() - $this->lastActivity->getTimestamp();\n\t\t\t$this->online = (bool) ($interval <= 45);\n\t\t}\n\t}", "title": "" }, { "docid": "f01ac153c593f7600f9bdfa25b7c5f0e", "score": "0.61884725", "text": "public function isOnline() {\n return $this->online;\n }", "title": "" }, { "docid": "2c0b7a196d63f8e6697311a4231e50e0", "score": "0.61026925", "text": "public static function isAvailable();", "title": "" }, { "docid": "ba4421871cc9a6e930a6bef349991118", "score": "0.60728014", "text": "public function isOnline(): bool {\n $onlineUsers = self::getOnlineUsers();\n\n foreach ($onlineUsers as $user) {\n if ($user->getUserName() == $this->getUsername()) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "59797a2212647c2c60c6d602879d1f01", "score": "0.6063945", "text": "public function isAvailable(): bool;", "title": "" }, { "docid": "92bd44e70b30774235f84b62b7920097", "score": "0.6063478", "text": "public static function isAvailable(): bool;", "title": "" }, { "docid": "fd54cebc2ddceb0c0c6d3c6cbf7d6a89", "score": "0.6045731", "text": "public function isOnline()\n {\n $query = 'SELECT * FROM '. rex::getTablePrefix() .'d2u_courses_courses AS courses '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_locations AS locations '\n .'ON courses.location_id = locations.location_id '\n .'WHERE locations.location_category_id = '. $this->location_category_id .' '\n .\"AND courses.online_status = 'online' \"\n .'AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .') ';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n return $result->getRows() > 0 ? true : false;\n }", "title": "" }, { "docid": "f121c29f38051482a30610d67ece1dd0", "score": "0.60103154", "text": "public static function is_online() {\n return checkdnsrr('collabmed.net', 'ANY');\n }", "title": "" }, { "docid": "893f9bc1921a89deddcecfdbdd58416b", "score": "0.59950745", "text": "public function isAvailable(){\n if(count(AttendancePasswords::all()) == 0){\n return false;\n }else if(count(AttendancePasswords::where('status', 'Waiting')->get()) == 0){\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "51a2de635e405a1977a052966f774d1e", "score": "0.5906741", "text": "function isIntern(){\n \treturn $this->getEmpStatus() == 3 ? true : false;\n }", "title": "" }, { "docid": "41d4d8acdeddefd52fd5a246100f33d7", "score": "0.58907825", "text": "public function isAvailable()\n {\n return $this->count > 0;\n }", "title": "" }, { "docid": "5bf3c5423faaf9eb5fda840803d4b603", "score": "0.5889873", "text": "abstract public function isAvailable();", "title": "" }, { "docid": "c52099d997c05fc2b732cc7d62297c60", "score": "0.5888935", "text": "public function isPlayoff()\n {\n return $this->playoff()->count() > 0;\n }", "title": "" }, { "docid": "8d20b30c29b920b41b2e3d5254ae2adb", "score": "0.58712226", "text": "function checkPlayers() {\n\n global $idleTime;\n \n $query = new query(\"SELECT name, date_part('epoch', lastoptime) as lasttime FROM people \n\t\t\t\t\t\tWHERE logintime IS NOT NULL AND type != 'agent'\");\n while ($query->next_rec()) {\n if (time() - $query->field('lasttime') > $idleTime) {\n $idler = $query->field('name');\n db_write(\"UPDATE people SET logintime = NULL WHERE name= '$idler'\");\n }\n } \n}", "title": "" }, { "docid": "5d32c3bd2972c2ccba2b6abc1e5c0df4", "score": "0.5857395", "text": "public function isAvailable()\n {\n return $this->getNumOfWorkers() < $this->booth->getWorkerLimit();\n }", "title": "" }, { "docid": "3baac8e06eb047cb22ebe8ba99acd433", "score": "0.58487976", "text": "public function saveAllPlayers(): void\n {\n $players = $this->server->getOnlinePlayers();\n foreach($players as $player)\n {\n $this->savePlayer($player, false);\n }\n }", "title": "" }, { "docid": "75a01465a8c0d23cca2758a26ad287ee", "score": "0.58339226", "text": "protected function isUrlOnline()\n {\n // Throw Exception if url is not available to machine\n return true;\n }", "title": "" }, { "docid": "e4295ae41ac50e6c0437654f35023a79", "score": "0.5817543", "text": "public function isAvailable()\n {\n return true;\n }", "title": "" }, { "docid": "6949d784fc9da7ce80fb1e2590cf54ab", "score": "0.5811466", "text": "public function getAllActivePlayers();", "title": "" }, { "docid": "5d3b9fa8a125e241a3512a887ab71962", "score": "0.57920384", "text": "public function isBlacklisted(): bool;", "title": "" }, { "docid": "d5c90fcfd5ea4c5f37aca71655ec36bb", "score": "0.5779472", "text": "public function checkPlayers()\n\t{\n\t\t// Joueurs selectionnées\n\t\t$values = $_POST;\n\t\tforeach($values as $key=>$value)\n\t\t{\n\t\t\t$stroke = explode('_', $key);\n\t\t\tif ($stroke[0] != 'jqg') continue;\n\t\t\t$players[] = $stroke[2];\n\t\t}\n\t\tif (!empty($players) )\n\t\t{\n\t\t\t$present = Bn::getValue('check');\n\t\t\t$q = new Bn_query('player', '_team');\n\t\t\tif ($present) $q->setValue('play_ispresent', YES);\n\t\t\telse $q->setValue('play_ispresent', NO);\n\t\t\t$q->addWhere('play_id IN (' . implode(',', $players) . ')');\n\t\t\t$q->updateRow();\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bc0c6ddcfffa458bc2c5773c5062db2e", "score": "0.5778524", "text": "public function hasOnlineSessionInstances()\n {\n return $this->online_session_instances !== null;\n }", "title": "" }, { "docid": "ea728538d373cef28be5a3c977c65d1f", "score": "0.57719046", "text": "public static function isAvailable()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "03d759b51ab577b8cc7e46570b871979", "score": "0.57661206", "text": "public function isOnline()\n {\n if ($this->isOnline === null) {\n if ($this->getUid() === 0) {\n $this->isOnline = true;\n }\n // the storage is not marked as online for a longer time\n if ($this->storageRecord['is_online'] == 0) {\n $this->isOnline = false;\n }\n if ($this->isOnline !== false) {\n // all files are ALWAYS available in the frontend\n if (TYPO3_MODE === 'FE') {\n $this->isOnline = true;\n } else {\n // check if the storage is disabled temporary for now\n $registryObject = GeneralUtility::makeInstance(Registry::class);\n $offlineUntil = $registryObject->get('core', 'sys_file_storage-' . $this->getUid() . '-offline-until');\n if ($offlineUntil && $offlineUntil > time()) {\n $this->isOnline = false;\n } else {\n $this->isOnline = true;\n }\n }\n }\n }\n return $this->isOnline;\n }", "title": "" }, { "docid": "41594bce1e2563b9f6cd4689c6c09fe6", "score": "0.5753279", "text": "public function isAvailable ()\n {\n $ticketsMapper = new Application_Model_Mapper_TicketsMapper();\n $tickets = $ticketsMapper->fetchAllBySeatId($this->getId());\n return empty($tickets);\n }", "title": "" }, { "docid": "065f43dd377b70a8d2f08fca2d3dc71b", "score": "0.5737978", "text": "public function onlineStatus();", "title": "" }, { "docid": "70e8aa2c2ece56b185f9a3b10fd5324f", "score": "0.57087964", "text": "public function isAvailable()\n {\n if($this->getTransitTime()) { return $this->getTransitTime() === 1 ? true : false; }\n else { return true;}\n }", "title": "" }, { "docid": "dd4d5755dd55e51f69743a3218721eb1", "score": "0.5698236", "text": "public function isAvailable() {\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "77802b78d20cfa0357896e91db720289", "score": "0.56963336", "text": "abstract protected function isAvailable();", "title": "" }, { "docid": "3e2eb88f76a73706192317425158f114", "score": "0.5682443", "text": "public static function isSiteOffline() {\r\n\t\treturn self::$siteOffline;\r\n\t}", "title": "" }, { "docid": "7273e9b322dc9a5f787a4ce5aec7888e", "score": "0.5672066", "text": "public function isIdle(): bool\n {\n return $this->idleWorkers->count() > 0 || $this->workers->count() === 0;\n }", "title": "" }, { "docid": "f9c004a1956409dc72a2366cfac76dc7", "score": "0.5661531", "text": "function bf_is_online() {\n\n\t\tif ( bf_is_localhost() ) {\n\n\t\t\t$test = wp_remote_get( 'http://api.wordpress.org/core/version-check/1.7/' );\n\n\t\t\treturn ! is_wp_error( $test );\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a1c8f47469981723bc7287d21e41be15", "score": "0.5658913", "text": "public function getAllPlayers();", "title": "" }, { "docid": "20fc5f269964149954700c48135917a6", "score": "0.5656445", "text": "public function isIdle()\n {\n return $this->status_id === CampaignStatus::idle()->first()->id;\n }", "title": "" }, { "docid": "325c4061252008b6a8287bebf992c1e5", "score": "0.5656334", "text": "public function allOnline()\n {\n return $this->cache\n ->tags($this->entityName, 'global')\n ->remember(\"{$this->locale}.{$this->entityName}.allOnline\", $this->cacheTime,\n function () {\n return $this->repository->allOnline();\n }\n );\n }", "title": "" }, { "docid": "7ac178b62dfa1434e558bac949b6d4bc", "score": "0.5646828", "text": "public function is_available();", "title": "" }, { "docid": "7ac178b62dfa1434e558bac949b6d4bc", "score": "0.5646828", "text": "public function is_available();", "title": "" }, { "docid": "cb3042309ea41d24ab08976bf91c9572", "score": "0.563521", "text": "public function available() {\r\n $qry = $this->_db->prepare(\"SELECT * FROM `users` WHERE `username` = ? OR `email` = ?;\");\r\n $qry->execute(array($this->_username,$this->_email));\r\n if ($qry->rowCount() > \"0\") {\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "38e71aafe7289e0412653ca129d12c45", "score": "0.56307447", "text": "public function hasPending() {\n\t\t$response = Cache::read('server_response', 'updates');\n\t\tif (!empty($response)) {\n\t\t\tif ($response['success'] && $response['response']['updates']) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9a04cbb60aa580c4fb23100f4470f0b3", "score": "0.56112856", "text": "public function isOnline() {\n //get the current time\n $now = date('H:i:s');\n\n //get today's opening hours/times\n $openingHours = $this->_getOpeningHoursForToday();\n $startTime = $openingHours['StartTime'];\n $endTime = $openingHours['EndTime'];\n\n //work out whether the current time is within the opening hours\n if ((empty($openingHours)) || ($now > $endTime) || ($now < $startTime)) {\n $open = false;\n } else {\n $open = true;\n }\n return $open;\n }", "title": "" }, { "docid": "b917458d5af989dc563f8a2677847e0d", "score": "0.5604336", "text": "public function isAvailable()\n\t{\n\t\tif (in_array($this->cipher, $this->getAll()))\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e2f18a7e0f6d7bd4ea1e71bcc99f7015", "score": "0.55889857", "text": "public function isOnline()\n {\n // A valid value in cache means that the device is online\n if($this->_cache['_expiration'] > YAPI::GetTickCount()) return true;\n\n // Check that the function is available without throwing exceptions\n $yreq = YAPI::funcRequest($this->_className, $this->_func, '');\n if($yreq->errorType != YAPI_SUCCESS) {\n return false;\n }\n // save result in cache anyway\n $loadval = $yreq->result;\n $loadval['_expiration'] = YAPI::GetTickCount() + YAPI::$defaultCacheValidity;\n $this->_cache = $loadval;\n\n return true;\n }", "title": "" }, { "docid": "e04a21a391e127cfc360a24ac12881cd", "score": "0.5586188", "text": "function GameStatus(){\n\t\t\t$ret = false;\n\n\t\t\tif($fp = @fsockopen($this->getIP(1),$this->getPort('game'),$errno,$errstr,1)){\n\t\t\t\t$ret\t=\t'<span class=\"badge badge-pill badge-success text-white\">Online</span>';\n\t\t\t\tfclose($fp);\n\t\t\t}else{\n\t\t\t\t$ret\t=\t'<span class=\"badge badge-pill badge-danger text-white\">Offline</span>';\n\t\t\t}\n\n\t\t\treturn $ret;\n\t\t}", "title": "" }, { "docid": "3e7c9204ac0f54c4a108b6e3730b72c3", "score": "0.5562885", "text": "public function isBlacklisted();", "title": "" }, { "docid": "a6314bdd8aadb95733d18e9f7789b8e5", "score": "0.5562405", "text": "public static function status() {\n try {\n return self::create()->ping() === '+PONG';\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "dd65ca69c19c2fade6b7aa07a173d4e5", "score": "0.55593616", "text": "public function isPlayerConnected()\n\t{\n\t\treturn SessionTool::getInstance()->issetParameter(AuthenticationTool::SESSION_PLAYER_ID);\n\t}", "title": "" }, { "docid": "8e436617f12a18173783e6e3f9bd463f", "score": "0.55562156", "text": "public function isInUse() {\r\n\t\treturn $this->get('inuse') == 1;\r\n\t}", "title": "" }, { "docid": "e6abf9a9bffd5e8ecf60bdfa08e08623", "score": "0.55551463", "text": "function isOnline($username) {\n $query = mysql_query('SELECT is_online FROM ' . SQL_PREFIX . 'users WHERE username=\\'' . mysql_real_escape_string($username) . '\\'');\n \n $result = mysql_fetch_assoc($query);\n return $result['is_online'];\n }", "title": "" }, { "docid": "9fad30706e3f8c622f707ffb4ef08f19", "score": "0.5548982", "text": "public function hasConnection()\n {\n\n $stats = $this->memcache->getStats();\n\n if( isset( $stats[ Settings::getSetting('memcache_address') . ':' . Settings::getSetting('memcache_port') ] ) == false )\n {\n\n return false;\n }\n\n if( $stats[ Settings::getSetting('memcache_address') . ':' . Settings::getSetting('memcache_port') ]['uptime'] > 1 )\n {\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "6117cf66806237a90f4a0ea97a0fc8cb", "score": "0.55151445", "text": "public function PingableFolders() {\n foreach ($this->collections as $folderid => $spa) {\n if ($spa->GetPingableFlag() == true) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "ad314ae70971b9b5351d8baa6a87e1d0", "score": "0.55044353", "text": "public function getAllPlayersCount(){\n return count($this->getAllPlayers());\n }", "title": "" }, { "docid": "a9b79a2c41e21592e1daaa32f2704f9e", "score": "0.5504061", "text": "function checkAreWinners()\n\t{\n\t\tif (isset($this->curr_game)) {\n\t\t\t$query = \"select count(*) as n from pkr_game_win where idtable=\".$this->curr_table.\" and game=\".$this->curr_game;\n\t\t\t$n = $GLOBALS['mydb']->select($query);\n\t\t\t$n = $n[0][\"n\"];\n\t\t\t\n\t\t\tif ($n>0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t} else\n\t\t\treturn false;\n\t\t\n\t}", "title": "" }, { "docid": "f919001276698955471a6d4ae2038e64", "score": "0.54970956", "text": "public function isUserAuthorisationisedOfflineAccess()\n {\n if ((int)$this->runtime_data->application->parameters->offline_switch == 1) {\n if ($this->runtime_data->user->authorised_for_offline_access == 1) {\n } else {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "17a137157fc0b533fdbaf911d47fae67", "score": "0.54952574", "text": "public function hasWon()\n {\n if ($this->currentPlayer->getScore() >= 100) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "70fd38566c05ba9bdbd982ac8e2f16a3", "score": "0.5477935", "text": "function IsPlayerConnected($playerid) {\n \n}", "title": "" }, { "docid": "cb5f7681f43c60a2d48e44353b647655", "score": "0.5475256", "text": "function get_online_list($socket, $data){\r\n\tglobal $player_array;\r\n\tforeach($player_array as $player){\r\n\t\t$socket->write('addUser`'.$player->name.'`'.$player->group.'`'.$player->active_rank.'`'.(count($player->hat_array)-1));\r\n\t}\r\n}", "title": "" }, { "docid": "4873e285577567878ce3f0d1225105bf", "score": "0.54664", "text": "public function isOpen() {\n if (mysqli_ping($this->connectionId)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "78d3f1de8ea3b2a671fe039ad79a5786", "score": "0.5461745", "text": "private function checkNumberOfPlayers()\n {\n $playerCount = $this->getPlayerCount();\n\n if ($playerCount < $this->players) {\n $this->addError('players', 'Not all players have joined yet!');\n }\n\n return $playerCount == $this->players;\n }", "title": "" }, { "docid": "8fd0e229a249d6b9ed5c2971f933eccd", "score": "0.5456566", "text": "public function isNotFull(){\n $isFull = false;\n $nbRegistrationsMax = $this->getNbRegistrationsMax();\n $nbRegistrations = $this->getParticipants()->count();\n\n if($nbRegistrations<$nbRegistrationsMax){\n $isFull = true;\n }\n else{\n $isFull = false;\n }\n\n return $isFull;\n }", "title": "" }, { "docid": "8b70499c57fe2eb3d334fd89d6971b6e", "score": "0.54428005", "text": "public function hasAnySessions() {\n return count($this->listAllServerUrls()) > 0;\n }", "title": "" }, { "docid": "14bb32c174580ab8d6fc2ee438faab07", "score": "0.54387015", "text": "public function remoteServerAvailable()\n\t\t\t{\n\t\t\treturn ($this->remServer);\t\t\t\n\t\t\t}", "title": "" }, { "docid": "35218f4caffe25f9e996e8414451f951", "score": "0.5435846", "text": "public function getOnlineUsers()\n {\n \t$users;\n \t// $this->send($this->readSock,)\n }", "title": "" }, { "docid": "69c1efdc207b99606ac5a84a2bea4062", "score": "0.54302037", "text": "function WhoIsOnline( $now ) {\n\t\t$res = mysql_query(\n \"SELECT\n name\n FROM\n users\n WHERE\n (lastactive + INTERVAL 5 MINUTE) > '$now';\"\n );\n\t\t\n\t\t$online = array();\n while ( $onl = mysql_fetch_array( $res ) ) {\n $online[] = $onl;\n }\n \n return $online;\n\t}", "title": "" }, { "docid": "5ea2c29c4c204395c8e963d339072a23", "score": "0.5425949", "text": "public function hasBeenUsed()\n {\n return $this->admin_id !== null\n && $this->workspace_id !== null\n && $this->members_invited >= $this->members_limit;\n }", "title": "" }, { "docid": "d51595eec3967d89b9c50dc494488330", "score": "0.5425405", "text": "public function is_connected()\n {\n return mysqli_ping($this->m_connection);\n }", "title": "" }, { "docid": "16023ee57397993976390dc1f13093f1", "score": "0.5424553", "text": "function userOffline(){\n global $session, $db;\n $query = \"UPDATE users SET isActive='0' WHERE id='{$session->user_id}'\";\n $db->query($query);\n}", "title": "" }, { "docid": "bc4f7cfb9a6436d638f5785df6266133", "score": "0.5422058", "text": "function getNbOnlinePlayers()\r\n{\r\n\t$res = countOnlinePlayers();\r\n\treturn $res['nbPlayers'];\r\n}", "title": "" }, { "docid": "dc9fbdf3acbfafea914198308406f4d6", "score": "0.54216605", "text": "public function isPermanentCrewIngame ()\n {\n foreach ($this -> m_aPlayers as $pPlayer)\n {\n if ($pPlayer ['Level'] >= LVP :: LEVEL_ADMINISTRATOR)\n {\n return true;\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "51f8a4ddcc9b39cbe9571cd55104307d", "score": "0.54140997", "text": "public function is_connected()\n {\n return (\n count($_SESSION) > 0\n );\n }", "title": "" }, { "docid": "6f035797741bff076ca7a0bd531a5b74", "score": "0.541025", "text": "public function isAvailable()\n\t{\n\t\treturn $this->available;\n\t}", "title": "" }, { "docid": "1ce47e31a77fa2ae36bcffcdc088573d", "score": "0.5408192", "text": "public function isAvailable()\n {\n return ! empty($this->pickers);\n }", "title": "" }, { "docid": "97d0f00998e482fb4f4c918013cf524a", "score": "0.5403877", "text": "public function isAvailable() {\n return $this->isAvailable;\n }", "title": "" }, { "docid": "0011626c69350c2389b0b4fd2b0addb2", "score": "0.54021496", "text": "public function hasEveryPlayerCardsSituated() : bool\n {\n foreach ($this->players as $player) {\n if (false === $this->hasPlayerCardsSituated($player)) {\n return false;\n }\n }\n \n return true;\n }", "title": "" }, { "docid": "30a3f79dd9de29203686e3703cc35894", "score": "0.5397705", "text": "public function isAvailable($name)\n {\n return in_array($name, $this->getSprinkleNames());\n }", "title": "" }, { "docid": "579d02a66af4a38c920f246fb75bd739", "score": "0.53855366", "text": "function reportStatus() {\n\t\t$db = DB::getConnection();\n\n\t\t// delete offline users\n\t\t$sql = \"DELETE FROM Online\n\t\t\t\tWHERE DATE_ADD(st_date, INTERVAL 2 MINUTE) < NOW()\";\n\t\t$db->exec($sql);\n\n\t\t// update online status\n\t\t$username = $db->quote($this->username);\n\t\t$sql = \"REPLACE INTO Online\n\t\t\t\t(st_username, st_ip, st_date) VALUES ('$username', '{$this->ip}', NOW())\";\n\t\t$db->exec($sql);\n\n\t\t$this->_checkVotes();\n\t}", "title": "" }, { "docid": "d53bcab16b0aa55b002e5b73e37034e4", "score": "0.537851", "text": "public function ping()\n {\n $accounts = $this->getAccounts();\n\n if ( ! $accounts) {\n Log::error('[AWEBER] Error pinging.');\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "bc961ea38fde582720a76aeaa68afe1a", "score": "0.53690535", "text": "public static function is_needed() {\n\t\treturn amp_should_use_new_onboarding();\n\t}", "title": "" }, { "docid": "837242ccfa48be87a56a87b091dc05d3", "score": "0.53670776", "text": "public function isOnline($email){\n }", "title": "" }, { "docid": "2d5a2162a87b9b02bf87f73acb8bd83e", "score": "0.5359901", "text": "public function isPending();", "title": "" }, { "docid": "c32836c6c3b809cef2f533a939a441ec", "score": "0.53580666", "text": "function checkIsAllIn()\n\t{\n\t\t//$query = \"select CASE t.type WHEN 0 THEN p.virtual_money WHEN 1 THEN p.money END as mypot from pkr_table t, pkr_tablecash p where p.idtable=\".$this->curr_table.\" and p.idplayer=\".$this->curr_player.\" and p.idplayer not in (select player from pkr_subpost where game=\".$this->curr_game.\" and isallin = 1)\";\n\t\t$query = \"select virtual_money from pkr_tablecash where idtable=\".$this->curr_table.\" and idplayer=\".$this->curr_player.\" and idplayer not in (select player from pkr_subpost where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\" and isallin = 1)\";\n\t\t$m = $GLOBALS['mydb']->select($query);\n\t\t\n\t\tif (isset($m)) {\n\t\t\t$m = $m[0][\"virtual_money\"];\n\t\t\n\t\t\tif (floor($m) <= 0)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "8c866e4239f73e28b5dbf1c3347d84eb", "score": "0.53541124", "text": "public function isFull() {\n return ($this->maxuseraccounts != '') && ($this->countMembers() >= $this->maxuseraccounts);\n }", "title": "" }, { "docid": "8115610c24816602dcc5b9e33b742a7c", "score": "0.5353925", "text": "public function isComplete(){\n if ($this->teams->count() >= $this->max_teams) return true;\n else return false;\n }", "title": "" }, { "docid": "5f34e415ef423d61827903509cc3c8f6", "score": "0.5347827", "text": "public function isAvailable()\n {\n return $this->available;\n }", "title": "" }, { "docid": "67031a5b3dcf26d62ba9ab3439064045", "score": "0.53409266", "text": "public function checkAllTeamsHaveBeenAssigned()\n {\n return $this->tournament->number_of_teams == $this->tournament->teams()->count();\n }", "title": "" }, { "docid": "4b30fa0f1d1357fb92b05ac51a9bcef9", "score": "0.533439", "text": "public function hasWildPokemonsList()\n {\n return $this->wild_pokemons !== null;\n }", "title": "" }, { "docid": "e6e469f24a0380b34c54fda4e0b544ed", "score": "0.5332972", "text": "public function getOnlinePlayers()\n\t{\n\t\treturn $this->getCharacters(columns(\"characters\", array(\"guid\", \"account\", \"name\", \"race\", \"class\", \"gender\", \"level\", \"zone\"), $this->realmId), array(column(\"characters\", \"online\", false, $this->realmId) => 1));\n\t}", "title": "" } ]
9fa02d475d145351688919cc4d53871f
Performs a DELETE on the database, given a RegistrasiPesertaDidik or Criteria object OR a primary key value.
[ { "docid": "69fd68a5e957844175adb8468b33dfaf", "score": "0.66444236", "text": "public static function doDelete($values, PropelPDO $con = null)\n {\n if ($con === null) {\n $con = Propel::getConnection(RegistrasiPesertaDidikPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);\n }\n\n if ($values instanceof Criteria) {\n // invalidate the cache for all objects of this type, since we have no\n // way of knowing (without running a query) what objects should be invalidated\n // from the cache based on this Criteria.\n RegistrasiPesertaDidikPeer::clearInstancePool();\n // rename for clarity\n $criteria = clone $values;\n } elseif ($values instanceof RegistrasiPesertaDidik) { // it's a model object\n // invalidate the cache for this single object\n RegistrasiPesertaDidikPeer::removeInstanceFromPool($values);\n // create criteria based on pk values\n $criteria = $values->buildPkeyCriteria();\n } else { // it's a primary key, or an array of pks\n $criteria = new Criteria(RegistrasiPesertaDidikPeer::DATABASE_NAME);\n $criteria->add(RegistrasiPesertaDidikPeer::REGISTRASI_ID, (array) $values, Criteria::IN);\n // invalidate the cache for this object(s)\n foreach ((array) $values as $singleval) {\n RegistrasiPesertaDidikPeer::removeInstanceFromPool($singleval);\n }\n }\n\n // Set the correct dbName\n $criteria->setDbName(RegistrasiPesertaDidikPeer::DATABASE_NAME);\n\n $affectedRows = 0; // initialize var to track total num of affected rows\n\n try {\n // use transaction because $criteria could contain info\n // for more than one table or we could emulating ON DELETE CASCADE, etc.\n $con->beginTransaction();\n \n $affectedRows += BasePeer::doDelete($criteria, $con);\n RegistrasiPesertaDidikPeer::clearRelatedInstancePool();\n $con->commit();\n\n return $affectedRows;\n } catch (PropelException $e) {\n $con->rollBack();\n throw $e;\n }\n }", "title": "" } ]
[ { "docid": "8c8873b1586de58214ef499c656c6cc4", "score": "0.71042347", "text": "abstract public function deleteByPk($primaryKey);", "title": "" }, { "docid": "74d5c24a161ce9227e32b0a7db328339", "score": "0.69675076", "text": "public function delete()\n\t{\n\t\t$table = $this->table();\n\t\t$table->delete($table->getAdapter()->quoteInto('id = ?', $this->_id));\n\t\t// titik dan table diurus oleh foreign constraint postgresql\n\t\t// lastly: update durasi cb\n\t\tself::updateDurasi($this->_cbOperasionalId);\n\t}", "title": "" }, { "docid": "5735208bd72f6da57a7d1ec8ecf41320", "score": "0.6942324", "text": "public function delete($convenio);", "title": "" }, { "docid": "9570efd5aee22a6ef7a4083e66933bc4", "score": "0.6921609", "text": "public function delete(){\n\t\tif(!isset($this->{$this->primary}))\n\t\tthrow new \\InvalidArgumentException(\"No value found for key $this->primary\");\n\t\t$this->sqlDelete = str_replace(['{delete}','{primary}'],[$this->table,$this->primary],$this->sqlDelete);\n\t\t$this->pdo = DB::getInstance();\n\t\t$stmt = $this->pdo->prepare($this->sqlDelete);\n\t\t$stmt->bindParam(':primary',$this->{$this->primary},$this->pdoType(gettype($this->{$this->primary})));\n\t\t$return = $stmt->execute();\n\t\t$this->errorInfo = $stmt->errorInfo();\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "89fa5eece0f62576fb7c1f70397f151e", "score": "0.69053143", "text": "public function delete($tipo_pantalla){\r\n $idTipo_Pantalla=$tipo_pantalla->getIdTipo_Pantalla();\n\r\n try {\r\n $sql =\"DELETE FROM `tipo_pantalla` WHERE `idTipo_Pantalla`='$idTipo_Pantalla'\";\r\n return $this->insertarConsulta($sql);\r\n } catch (SQLException $e) {\r\n throw new Exception('Primary key is null');\r\n }\r\n }", "title": "" }, { "docid": "2e0eb9f153e94db67b50b7011cbd3d77", "score": "0.6894806", "text": "public function deletePersona(){\n #Se guarda la consulta en una variable\n $sql = \"DELETE FROM persona WHERE id = ?\";\n #se guardan los parametros (datos recogidos) en una variable,como un arreglo\n $params = array($this->idPersona);\n #Retorna el estado que devuelve el metodo executeRow \n return Database::executeRow($sql, $params);\n }", "title": "" }, { "docid": "3807fc61771f142d75c114615033a1c7", "score": "0.684992", "text": "public function delete($criteria);", "title": "" }, { "docid": "2e6737fd411eac5d602965d849215722", "score": "0.6782789", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getCubosTiposId() === null) {\n $this->_logger->log('The value for CubosTiposId cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'cubosTiposId = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getCubosTiposId())\n );\n }", "title": "" }, { "docid": "cf630b44f51470c65f825f9a79f8cd95", "score": "0.67445064", "text": "function deleteBy($conditions, $operador=\"and\") {\n try {\n\n $sql = \"DELETE FROM \" . $this->tableName . \" WHERE \";\n\n foreach ($conditions as $key => $value) {\n $sql .= $key . \" = :\" . $key . \" \" . $operador . \" \";\n }\n\n $sql = substr($sql, 0, strlen($sql) - strlen($operador . \" \"));\n $stmt = $this->connection->prepare($sql);\n\n // & no $value para passar como referencia\n foreach ($conditions as $key => &$value) {\n $stmt->bindParam($key, $value, PDO::PARAM_STR);\n }\n\n $result = $stmt->execute();\n $e = $stmt->errorInfo();\n \n if ($stmt->errorInfo()[0] != 0) {\n throw new Exception();\n }\n\n return $result;\n } catch (PDOException $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "45708c2f34d207aeba7e0fe1affa01ae", "score": "0.6735283", "text": "public function delete()\n\t{\n\t\t$table = $this->table();\n\t\t$table->delete($table->getAdapter()->quoteInto('id = ?', $this->_id));\n\t\t// titik dan table diurus oleh foreign constraint postgresql\n\t\t// lastly: update durasi cb\n\t\tstatic::updateDurasi($this->_cbId);\n\t}", "title": "" }, { "docid": "dbf520ab5dde0c4bf6ef2edb8e9b6290", "score": "0.6674189", "text": "function delete($data){\r\n\t\t// query delete dari kode_produk yang dipilih\r\n $sql = \"DELETE FROM distro WHERE kode_produk=$data\";\r\n\r\n\t\treturn $this->execute($sql);\r\n }", "title": "" }, { "docid": "2e54bedf7d98d7bb38a055607fb4b339", "score": "0.6663657", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getContribuyenteId() === null) {\n $this->_logger->log('The value for ContribuyenteId cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'contribuyenteId = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getContribuyenteId())\n );\n }", "title": "" }, { "docid": "8e37b6a79a53fcd898344bb5f0a280af", "score": "0.6656756", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getMunicipioId() === null) {\n $this->_logger->log('The value for MunicipioId cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'municipioId = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getMunicipioId())\n );\n }", "title": "" }, { "docid": "d178a394a495c398be2955939aebf7d7", "score": "0.6586371", "text": "public function delete()\n {\n $this->beforeDelete();\n if (empty($this->searchCondition)) {\n throw new \\Exception('Primary key is empty');\n }\n if (!empty($this->softDelete) && is_array($this->softDelete)) {\n $this->dbConnection->update(\n $this->table,\n $this->softDelete,\n $this->searchCondition\n );\n } else {\n $this->dbConnection->delete(\n $this->table,\n $this->searchCondition\n );\n }\n $this->afterDelete();\n }", "title": "" }, { "docid": "35a70ecd59171e593f64d919f04d4360", "score": "0.6585962", "text": "public function delete($salud_pension){\n $id=$salud_pension->getId();\n\n try {\n $sql =\"DELETE FROM `salud_pension` WHERE `id`='$id'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "title": "" }, { "docid": "5bb29e2d62ce3e5fe8c24e5be4a6f6d1", "score": "0.65831447", "text": "public function delete() {\n\t\tglobal $database;\n\n\t\t$pk_string = static::$pk_field;\n\n\t\t$delete_query = \"DELETE FROM \" . static::$db_table . \" WHERE {$pk_string} = :{$pk_string}\";\n\t\t// $delete_query .= \" LIMIT 1 OFFSET 0\";\n\n\t\t$prepared_query = $database->pgsql_ob->prepare($delete_query);\n\n\t\t$prepared_query->bindValue(\":{$pk_string}\", $this->$pk_string);\n\n\t\t$prepared_query->execute();\n\n\t\treturn $prepared_query->rowCount() == 1 ? true : false;\n\t\t\n\t}", "title": "" }, { "docid": "fa6f3b58316dd13adda6529f43fa2d9f", "score": "0.65414286", "text": "public function delete() {\r\n\t\t\tif (isset($this->{static::primaryKey()})) {\r\n\t\t\t\t$dbh->query(\r\n\t\t\t\t\t\"DELETE FROM \".\r\n\t\t\t\t\tstatic::dbtable().\r\n\t\t\t\t\t\" WHERE \".\r\n\t\t\t\t\tstatic::primaryKey().\r\n\t\t\t\t\t\" = :id\"\r\n\t\t\t\t);\r\n\t\t\t\t$stmt->bindParam(\r\n\t\t\t\t\t':id', \r\n\t\t\t\t\t$this->{static::primaryKey()}, \r\n\t\t\t\t\tPDO::PARAM_INT\r\n\t\t\t\t);\r\n\t\t\t\t$stmt->execute();\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "ec9ac51a6808101d636a4cfc0b0503e6", "score": "0.6540553", "text": "public function delete()\n {\n\n $deleteUser = $this->dbconnexion->connexion->prepare('DELETE FROM fiche_personne INNER JOIN membre ON fiche_personne.id_perso = membre.id_fiche_perso WHERE id_perso = :id_perso');\n $deleteUser->bindParam(':id_perso', $_SESSION['id'], PDO::PARAM_STR);\n $deleteUser->execute();\n\n }", "title": "" }, { "docid": "61580876941b9967e2f7051931376124", "score": "0.65111893", "text": "public function delete($pedido_prov){\n $idpedido_prov=$pedido_prov->getIdpedido_prov();\n\n try {\n $sql =\"DELETE FROM `pedido_prov` WHERE `idpedido_prov`='$idpedido_prov'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "title": "" }, { "docid": "d9ed7abc1ecb6467f48be1d16fdb0154", "score": "0.6508253", "text": "public function delete(){\n $conexion = new Database();\n\t\t\n\t\tif ($this->codigo){\n $sql = 'DELETE FROM CAU_USUARIOS WHERE codigo = ?';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->codigo );\n\t\t\t$conexion->execute();\n }\n }", "title": "" }, { "docid": "eb75ae2f305aba3d5c4ac3868cfddad8", "score": "0.64983636", "text": "public function deleteByPk($pk){ \t\r\n \tif($row = $this->get($pk)){\r\n \t\t$row -> delete();\r\n \t\treturn true;\r\n \t}\r\n \treturn false;\r\n }", "title": "" }, { "docid": "4bf3fa347ee41e762e041581d33ba6d9", "score": "0.64928615", "text": "public function deleteRowByPrimaryKey()\r\n {\r\n if (!$this->getId())\r\n throw new Exception('Primary Key does not contain a value');\r\n return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());\r\n }", "title": "" }, { "docid": "20ce48c1c0796e242ca702edd3a9b1a1", "score": "0.6490557", "text": "public function delete($codPhysio)\r\n {\r\n $stmt = $this->db->prepare(\"DELETE from consulta_fisio WHERE id_consulta = '$codPhysio'\");\r\n $stmt->execute();\r\n }", "title": "" }, { "docid": "636c4a4038b5de6c63d4d7b31cd3401f", "score": "0.64891547", "text": "public function deleteBy(array $criteria = [], $operator = null);", "title": "" }, { "docid": "ffd11fd27fda5e48d7c1a5e9be4b30c3", "score": "0.6479091", "text": "public function deleteById($primaryKey)\n {\n // Generate the query and store it\n $query = sprintf('DELETE FROM %s WHERE %s = :value', $this->table, $this->primaryKey);\n\n // Bind the parameters and store them\n $parameters = [\n 'value' => $primaryKey\n ];\n\n // Execute the query\n // ? No need to return as deleting a record\n $this->query($query, $parameters);\n }", "title": "" }, { "docid": "e63f02dd33e93775c7ad890513461dd9", "score": "0.6446366", "text": "public function deleteBy($criteria, $params = false)\n {\n $query = $this->model->query();\n \n /*== FILTER ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;\n \n if (isset($filter->field))//Where field\n $field = $filter->field;\n }\n \n /*== REQUEST ==*/\n $model = $query->where($field ?? 'id', $criteria)->first();\n $model ? $model->delete() : false;\n }", "title": "" }, { "docid": "a95a251bba7e18cff952c09482c1626d", "score": "0.64303166", "text": "public function _dbDelete()\n\t{\n\t\t$keys = array_keys($this->data);\n\t\t$id_n = $keys[0];\n\t\t$id_v = $this->$keys[0];\n\t\t$table_name = Config::$map_tables[$this->model_type];\n\t\t$sql = \"DELETE FROM $table_name WHERE $id_n = $id_v\";\n\t\t\n\t\t$this->db->exec($sql);\n\t}", "title": "" }, { "docid": "644b48d7200f434a5f3665fb14041016", "score": "0.6417745", "text": "public function deleteRowByPrimaryKey()\n {\n if (!$this->getId())\n throw new Exception('Primary Key does not contain a value');\n return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());\n }", "title": "" }, { "docid": "644b48d7200f434a5f3665fb14041016", "score": "0.6417745", "text": "public function deleteRowByPrimaryKey()\n {\n if (!$this->getId())\n throw new Exception('Primary Key does not contain a value');\n return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());\n }", "title": "" }, { "docid": "644b48d7200f434a5f3665fb14041016", "score": "0.6417745", "text": "public function deleteRowByPrimaryKey()\n {\n if (!$this->getId())\n throw new Exception('Primary Key does not contain a value');\n return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());\n }", "title": "" }, { "docid": "644b48d7200f434a5f3665fb14041016", "score": "0.6417745", "text": "public function deleteRowByPrimaryKey()\n {\n if (!$this->getId())\n throw new Exception('Primary Key does not contain a value');\n return $this->getMapper()->getDbTable()->delete('id = '.$this->getId());\n }", "title": "" }, { "docid": "2db840f6e15679a0ea5ef330e7a35c52", "score": "0.6406983", "text": "public function cekForDelete($organisasi_id);", "title": "" }, { "docid": "c1a4cd51b49f91dffdc42c1239f6157c", "score": "0.63961416", "text": "public function delete()\n {\n $data2 = [$this->getData()[0]];\n if ($this->UsuariosModel->delete($data2)){\n $this->get();\n } else {\n echo \"Ocurrio un error al eliminar el registro\";\n }\n \n }", "title": "" }, { "docid": "21a6ba0962bd236b11ccd0f740437c9d", "score": "0.6391199", "text": "public function delete()\n\t{\n\t\t$primary_key = self::getPrimaryKey();\n\t\t$table = self::getTableNameInternal();\n\t\t$id = $this->$primary_key;\n\t\treturn db_delete($table)\n\t\t\t->condition($primary_key, $id)\n\t\t\t->execute();\n\t}", "title": "" }, { "docid": "8f067b956b8bae3cdf091ba66cd62d31", "score": "0.6375115", "text": "function __delete_record() {\n\t\t$keys = self::__pk();\n\t\t$table = self::__table();\n\n\t\tforeach($keys AS $field) {\n\t\t\t$request[] = \"{$field} = :{$field}\";\n\t\t\t$execut_values[':'.$field] = $this->{$field};\n\t\t}\n\n\t\tD::$db->exec(\"DELETE FROM {$table} WHERE \".implode(' AND ', $request).\" LIMIT 1\", $execut_values);\n\t}", "title": "" }, { "docid": "07d4f2f03b0aed7607e31f46b7009786", "score": "0.6373672", "text": "function DELETE($id_pembayaran)\n {\n\n // perintah DELETE data\n mysqli_query($this->con, \"delete from pembayaran where id_pembayaran='$id_pembayaran'\");\n }", "title": "" }, { "docid": "880b12a5c7d603269158dc3701afc3b8", "score": "0.63681644", "text": "public function delete($idVenta);", "title": "" }, { "docid": "dc419f65a5106c6ccc6f14e401d5f0d1", "score": "0.63578534", "text": "public function delete($id_acht);", "title": "" }, { "docid": "f99a167f9c963126a7bc3d59e3e6c6fc", "score": "0.63558286", "text": "public function delete($lecturaevotranspiracion){\n $idlecturaEvotranspiracion=$lecturaevotranspiracion->getIdlecturaEvotranspiracion();\n\n try {\n $sql =\"DELETE FROM `lecturaevotranspiracion` WHERE `idlecturaEvotranspiracion`='$idlecturaEvotranspiracion'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "title": "" }, { "docid": "e33eb9f53b4d20e1f7028e6b8d69d2d2", "score": "0.6354235", "text": "public function delete($row);", "title": "" }, { "docid": "d320176fb2209d1fdfb0ae3a79e26895", "score": "0.63522524", "text": "public function delete($id_reservacion);", "title": "" }, { "docid": "93c0171379ad596c911e124be9dbd6d7", "score": "0.6346023", "text": "public function delete(){\r\n $sql_statement = \"DELETE FROM \".$this->table.\" WHERE id = ? \";\r\n return $this->executeQuery( $sql_statement, 'i', array($this->id), true );\r\n }", "title": "" }, { "docid": "e5adacf32fdab7a18001cb31745eb2e8", "score": "0.63334584", "text": "public function delete($model_or_id);", "title": "" }, { "docid": "c3f785a4bb5a7a484375fdc22449b508", "score": "0.63311267", "text": "public function delete()\n {\n $db = Application::getInstance()->databaseConnection()->pdo();\n\n $stmt = $db->prepare('DELETE FROM ' . static::$table . ' WHERE ' . $this->idColumn . ' = ' . $this->{$this->idColumn});\n $stmt->execute();\n }", "title": "" }, { "docid": "b0b674bcecbd8c030a8ba1435739c8f8", "score": "0.63237673", "text": "public static function doDelete($values, PropelPDO $con = null)\n {\n if ($con === null) {\n $con = Propel::getConnection(EspecialidadPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);\n }\n\n if ($values instanceof Criteria) {\n // rename for clarity\n $criteria = clone $values;\n } elseif ($values instanceof Especialidad) { // it's a model object\n // create criteria based on pk values\n $criteria = $values->buildPkeyCriteria();\n } else { // it's a primary key, or an array of pks\n $criteria = new Criteria(EspecialidadPeer::DATABASE_NAME);\n $criteria->add(EspecialidadPeer::ID, (array) $values, Criteria::IN);\n }\n\n // Set the correct dbName\n $criteria->setDbName(EspecialidadPeer::DATABASE_NAME);\n\n $affectedRows = 0; // initialize var to track total num of affected rows\n\n try {\n // use transaction because $criteria could contain info\n // for more than one table or we could emulating ON DELETE CASCADE, etc.\n $con->beginTransaction();\n\n // cloning the Criteria in case it's modified by doSelect() or doSelectStmt()\n $c = clone $criteria;\n EspecialidadPeer::doOnDeleteSetNull($c, $con);\n\n // Because this db requires some delete cascade/set null emulation, we have to\n // clear the cached instance *after* the emulation has happened (since\n // instances get re-added by the select statement contained therein).\n if ($values instanceof Criteria) {\n EspecialidadPeer::clearInstancePool();\n } elseif ($values instanceof Especialidad) { // it's a model object\n EspecialidadPeer::removeInstanceFromPool($values);\n } else { // it's a primary key, or an array of pks\n foreach ((array) $values as $singleval) {\n EspecialidadPeer::removeInstanceFromPool($singleval);\n }\n }\n\n $affectedRows += BasePeer::doDelete($criteria, $con);\n EspecialidadPeer::clearRelatedInstancePool();\n $con->commit();\n\n return $affectedRows;\n } catch (PropelException $e) {\n $con->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "60f29abf648caf2c034d2b79261efc5b", "score": "0.63199586", "text": "public function delete() {\n $where=\"\";\n $params=array();\n\n if(!empty($this->wheres)){\n for($i=0;$i<count($this->wheres);$i++){\n $where=$this->wheres[$i][\"field\"].\n $this->wheres[$i][\"operator\"].\":\".\n $this->wheres[$i][\"field\"];\n $params[\":\".$this->wheres[$i][\"field\"]]= $this->wheres[$i][\"value\"];\n if($i!=count($this->wheres)-1){\n $where.=\" AND \";\n }\n }\n }\n\n $ps=\"DELETE FROM $this->table WHERE $where\";\n\n\n $connection = PdoConnection::getInstance();\n return $connection->delete($ps,$params);\n }", "title": "" }, { "docid": "e2e10f6f711eaeeb736094443b638fc4", "score": "0.6311308", "text": "public function delete($id_rekap_nilai){\n\t\t$sql = 'DELETE FROM cbt_rekap_nilai WHERE id_rekap_nilai = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id_rekap_nilai);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "b4e6995ed541c5dd284912d56083c9b5", "score": "0.63102835", "text": "public function delete($primaryKey = NULL)\r\n\t{\r\n\t\tif (is_null($primaryKey))\r\n\t\t{\r\n\t\t\t$primaryKey = $this->getPrimaryKey();\r\n\t\t}\r\n\r\n\t\t$this->id = $primaryKey;\r\n\r\n\t\t// Удаляем слово, относящиеся к полю\r\n\t\t$this->admin_word->delete();\r\n\r\n\t\treturn parent::delete($primaryKey);\r\n\t}", "title": "" }, { "docid": "b7dc8a800d99d8157c9a3e59e43be2ff", "score": "0.62980145", "text": "public static function doDelete($values, PropelPDO $con = null)\n {\n if ($con === null) {\n $con = Propel::getConnection(ActividadPersJuridicaPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);\n }\n\n if ($values instanceof Criteria) {\n // invalidate the cache for all objects of this type, since we have no\n // way of knowing (without running a query) what objects should be invalidated\n // from the cache based on this Criteria.\n ActividadPersJuridicaPeer::clearInstancePool();\n // rename for clarity\n $criteria = clone $values;\n } elseif ($values instanceof ActividadPersJuridica) { // it's a model object\n // invalidate the cache for this single object\n ActividadPersJuridicaPeer::removeInstanceFromPool($values);\n // create criteria based on pk values\n $criteria = $values->buildPkeyCriteria();\n } else { // it's a primary key, or an array of pks\n $criteria = new Criteria(self::DATABASE_NAME);\n // primary key is composite; we therefore, expect\n // the primary key passed to be an array of pkey values\n if (count($values) == count($values, COUNT_RECURSIVE)) {\n // array is not multi-dimensional\n $values = array($values);\n }\n foreach ($values as $value) {\n $criterion = $criteria->getNewCriterion(ActividadPersJuridicaPeer::ACTIVIDAD_ID, $value[0]);\n $criterion->addAnd($criteria->getNewCriterion(ActividadPersJuridicaPeer::PERSONA_JURIDICA_ID, $value[1]));\n $criteria->addOr($criterion);\n // we can invalidate the cache for this single PK\n ActividadPersJuridicaPeer::removeInstanceFromPool($value);\n }\n }\n\n // Set the correct dbName\n $criteria->setDbName(self::DATABASE_NAME);\n\n $affectedRows = 0; // initialize var to track total num of affected rows\n\n try {\n // use transaction because $criteria could contain info\n // for more than one table or we could emulating ON DELETE CASCADE, etc.\n $con->beginTransaction();\n \n $affectedRows += BasePeer::doDelete($criteria, $con);\n ActividadPersJuridicaPeer::clearRelatedInstancePool();\n $con->commit();\n\n return $affectedRows;\n } catch (PropelException $e) {\n $con->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "7ef228a02e3ea53c8a96d738726bb983", "score": "0.6286543", "text": "public function delete(){\r\n self::$operation = \"Delete\";\r\n $sql = 'delete from '.static::$tableName.' where id =' .$this->id;\r\n $this->runQuery($sql);\r\n }", "title": "" }, { "docid": "402fab401f482994b6045b9d104cfd4c", "score": "0.62831205", "text": "public function delete($data){\n\n\t\ttry{\n\t\t\t$this->db->beginTransaction();\n\n\t\t\t$linkPrimaryValue = NULL;\n\t\t\t$primaryFieldsSQL = array();\n\t\t\tforeach($this->fields as $field){\n\t\t\t\t// If this is a primary field\n\t\t\t\tif($field->isPrimary()){\n\t\t\t\t\t// If this is the 1st primary value, save it for the linkTable stuff below\n\t\t\t\t\tif(sizeof($primaryFieldsSQL) == 0) $linkPrimaryValue = $data[ $field->name ];\n\t\t\t\t\t// Add this field to the list for the final SQL\n\t\t\t\t\t$primaryFieldsSQL[ $field->toSqlSnippet() ] = $data[ $field->name ];\n\t\t\t\t}\n\n\t\t\t\t// If this field uses a linkTable (many-to-many) then we need to delete the links as well\n\t\t\t\tif($field->usesLinkTable()){\n\t\t\t\t\t$linkedTo = $field->linkedTo;\n\t\t\t\t\t$db = isset($linkedTo['dbConnection']) ? db::get($linkedTo['dbConnection']) : $this->db;\n\t\t\t\t\t$linkTable = isset($linkedTo['linkTable']) ? $linkedTo['linkTable'] : '';\n\t\t\t\t\t$linkLocalField = isset($linkedTo['linkLocalField']) ? $linkedTo['linkLocalField'] : '';\n\t\t\t\t\t$deleteLinkSQL = sprintf('DELETE FROM `%s` WHERE `%s`=?',\n\t\t\t\t\t\t$db->escape($linkTable),\n\t\t\t\t\t\t$db->escape($linkLocalField));\n\t\t\t\t\t$deleteLinkSTMT = $db->query($deleteLinkSQL, array($linkPrimaryValue));\n\t\t\t\t\tif($deleteLinkSTMT->errorCode()){\n\t\t\t\t\t\terrorHandle::newError(__METHOD__.\"() SQL Error! ({$deleteLinkSTMT->errorCode()}:{$deleteLinkSTMT->errorMsg()})\", errorHandle::HIGH);\n\t\t\t\t\t\tthrow new Exception('Internal database error!', self::ERR_SYSTEM);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Now delete the record itself\n\t\t\t$sql = sprintf('DELETE FROM `%s` WHERE %s LIMIT 1',\n\t\t\t\t$this->dbTable,\n\t\t\t\timplode(' AND ', array_keys($primaryFieldsSQL)));\n\t\t\t$stmt = $this->db->query($sql, array_values($primaryFieldsSQL));\n\t\t\tif($stmt->errorCode()){\n\t\t\t\terrorHandle::newError(__METHOD__.\"() SQL Error! ({$stmt->errorCode()}:{$stmt->errorMsg()})\", errorHandle::HIGH);\n\t\t\t\tthrow new Exception('Internal database error!', self::ERR_SYSTEM);\n\t\t\t}\n\n\t\t\t$this->db->commit();\n\t\t}catch(Exception $e){\n\t\t\t$this->db->rollback();\n\t\t\t$this->formError($e->getMessage(), errorHandle::ERROR);\n\t\t\treturn $e->getCode();\n\t\t}\n\n\t\treturn self::ERR_OK;\n\t}", "title": "" }, { "docid": "67eb09150f1212c625be430e11da44fc", "score": "0.62762237", "text": "public function delete() {\n $this->query = \"DELETE FROM {$this->query}\";\n self::run($this->query, $this->params);\n }", "title": "" }, { "docid": "6c12f6aef56339cce7d379cea4351f12", "score": "0.6260143", "text": "function DELETE ($id_pembayaran)\n\t\t{\n\t\t\t//perintah DELETE data\n\t\t\tmysqli_query($this->con,\"delete from pembayaran where id_pembayaran='$id_pembayaran'\");\n\t\t}", "title": "" }, { "docid": "6804abef392e400cf89f27a48f6ace62", "score": "0.6253049", "text": "public function delete($data)\n {\n $this->db->where('id', $data['id']);\n $this->db->delete('lacak', $data);\n }", "title": "" }, { "docid": "003ab55c6a31d93cbdeb56d42a7c78d6", "score": "0.6251637", "text": "public function eliminarContactoProveedor($condiciones ) {\r\n \r\n \t$this->pdo->beginTransaction();\t\r\n\r\n\r\n\t$r1 = $this->pdo->_delete('tr026_contacto_proveedor', $condiciones);\r\n\t\r\n\tif($r1)\r\n\t\t\t{$this->pdo->commit(); return true;}\r\n\telse\t\t\r\n\t\t\t{$this->pdo->rollback(); return \"Error : 1= \".$r1;\t }\r\n }", "title": "" }, { "docid": "d24c33b5aad2d58dba1bf269f71279f5", "score": "0.625101", "text": "function deleteConsumo($p_idConsumo)\n {\n\n $deleteCliente = 'DELETE FROM consumo where id_consumo = :idConsumo';\n $stmt2 = $this->conDB->Prepare($deleteCliente);\n $stmt2->bindParam(':idConsumo', $p_idConsumo, PDO::PARAM_INT);\n $stmt2->Execute();\n\n }", "title": "" }, { "docid": "0c7e236e6f3c1c2b04e96c350fbbafbd", "score": "0.6248005", "text": "function deleteVehicle($idVehicle)\n{\n $connexion = getConnexion();\n $request = $connexion->prepare(\"DELETE FROM `vehicules` WHERE `vehicules`.`idVehicule` = :idVehicle \");\n $request->bindParam(':idVehicle', $idVehicle, PDO::PARAM_INT);\n $request->execute();\n return true;\n}", "title": "" }, { "docid": "6ea80831b5b5192f9f2c1f3b8fff17f1", "score": "0.62474984", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getId() === null) {\n $this->_logger->log('The value for Id cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'id = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getId())\n );\n }", "title": "" }, { "docid": "6ea80831b5b5192f9f2c1f3b8fff17f1", "score": "0.62474984", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getId() === null) {\n $this->_logger->log('The value for Id cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'id = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getId())\n );\n }", "title": "" }, { "docid": "6ea80831b5b5192f9f2c1f3b8fff17f1", "score": "0.62474984", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getId() === null) {\n $this->_logger->log('The value for Id cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'id = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getId())\n );\n }", "title": "" }, { "docid": "6ea80831b5b5192f9f2c1f3b8fff17f1", "score": "0.62474984", "text": "public function deleteRowByPrimaryKey()\n {\n if ($this->getId() === null) {\n $this->_logger->log('The value for Id cannot be null in deleteRowByPrimaryKey for ' . get_class($this), \\Zend_Log::ERR);\n throw new \\Exception('Primary Key does not contain a value');\n }\n\n return $this->getMapper()->getDbTable()->delete(\n 'id = ' .\n $this->getMapper()->getDbTable()->getAdapter()->quote($this->getId())\n );\n }", "title": "" }, { "docid": "fb3e1cde6b1cfcb50b1cdcc1091a6685", "score": "0.624626", "text": "public function deleteRecord() {\n\t\t$db = getPDOInstance();\n\n\t\t$query = oci_parse($db, FamilyDoctor::DELETE);\n\n\t\toci_bind_by_name($query, \":patient_id\", $this->patient_id);\n\t\toci_bind_by_name($query, \":doctor_id\", $this->doctor_id);\n\t\t\n\t\toci_execute($query);\n\t}", "title": "" }, { "docid": "ce9bdc986f6127b8b7e83d6c19b2011f", "score": "0.6238944", "text": "public function delete()\n\t{\n\t\t$sql = 'DELETE FROM ' . $this->table . ' WHERE ' . $this->id . ' = :' . $this->id . ' LIMIT 1;';\n\t\t$input_parameters[':' . $this->id] = $this->record[$this->id];\n\n\t\treturn $this->db->execute($sql, $input_parameters);\n\t}", "title": "" }, { "docid": "c5ad7eab096f782fb749243d1a9ec463", "score": "0.62387764", "text": "function delete($cond_att,$cond_val = null) {\n \n $req = self::$db->prepare(\"DELETE FROM $this->table WHERE $cond_att = ?\");\n\n $req->execute(array($cond_val));\n\n $req->closeCursor();\n }", "title": "" }, { "docid": "f629b355c4f9e8513d7382013db4f2aa", "score": "0.62367225", "text": "public static function doDelete($values, PropelPDO $con = null)\n {\n if ($con === null) {\n $con = Propel::getConnection(JadwalPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);\n }\n\n if ($values instanceof Criteria) {\n // invalidate the cache for all objects of this type, since we have no\n // way of knowing (without running a query) what objects should be invalidated\n // from the cache based on this Criteria.\n JadwalPeer::clearInstancePool();\n // rename for clarity\n $criteria = clone $values;\n } elseif ($values instanceof Jadwal) { // it's a model object\n // invalidate the cache for this single object\n JadwalPeer::removeInstanceFromPool($values);\n // create criteria based on pk values\n $criteria = $values->buildPkeyCriteria();\n } else { // it's a primary key, or an array of pks\n $criteria = new Criteria(JadwalPeer::DATABASE_NAME);\n // primary key is composite; we therefore, expect\n // the primary key passed to be an array of pkey values\n if (count($values) == count($values, COUNT_RECURSIVE)) {\n // array is not multi-dimensional\n $values = array($values);\n }\n foreach ($values as $value) {\n $criterion = $criteria->getNewCriterion(JadwalPeer::SEKOLAH_ID, $value[0]);\n $criterion->addAnd($criteria->getNewCriterion(JadwalPeer::SEMESTER_ID, $value[1]));\n $criterion->addAnd($criteria->getNewCriterion(JadwalPeer::ID_RUANG, $value[2]));\n $criterion->addAnd($criteria->getNewCriterion(JadwalPeer::HARI, $value[3]));\n $criteria->addOr($criterion);\n // we can invalidate the cache for this single PK\n JadwalPeer::removeInstanceFromPool($value);\n }\n }\n\n // Set the correct dbName\n $criteria->setDbName(JadwalPeer::DATABASE_NAME);\n\n $affectedRows = 0; // initialize var to track total num of affected rows\n\n try {\n // use transaction because $criteria could contain info\n // for more than one table or we could emulating ON DELETE CASCADE, etc.\n $con->beginTransaction();\n \n $affectedRows += BasePeer::doDelete($criteria, $con);\n JadwalPeer::clearRelatedInstancePool();\n $con->commit();\n\n return $affectedRows;\n } catch (PropelException $e) {\n $con->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "8503d2b6dc79cbe61b9e9536247800ba", "score": "0.62327594", "text": "public function delete()\n\t{\n\t\tif (empty($this->primary_key) || empty($this->table_name))\n\t\t\tdie('cannot uset class Table without tablename and primary key setted');\n\n\t\t$pk_getter = \"get_\".$this->primary_key;\n\n\t\t$query = \"delete from `\".$this->table_name.\"`\".\n\t\t\"where `\".$this->primary_key.\"`='\".$this->$pk_getter().\"'\";\n\t\n\t\tdbQuery($query);\n\t}", "title": "" }, { "docid": "d16955d9047cd674608a1376193c0614", "score": "0.6232126", "text": "public function rimuoviElementi($idCliente, $codDisco, $mysqli){\r\n\r\n $query = \"DELETE FROM `Carrello` WHERE `idCompratore` ='\". $idCliente . \"' AND `codDisco` = '\" . $codDisco .\"'\";\r\n\r\n Database::lanciaQuery($query, $mysqli);\r\n\r\n \r\n}", "title": "" }, { "docid": "1331cef0ef140e0122bf04f9e2bc458e", "score": "0.62165487", "text": "public function delete($idPersona, $idSede){\r\n\t\t$sql = 'DELETE FROM sedes_has_directores WHERE id_persona = ? AND id_sede = ? ';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($idPersona);\n\t\t$sqlQuery->setNumber($idSede);\n\r\n\t\treturn $this->executeUpdate($sqlQuery);\r\n\t}", "title": "" }, { "docid": "144b5d903baf3418531faf8f23894670", "score": "0.62155396", "text": "public function delete()\n {\n static::getCollection()\n ->deleteOne([self::INTERNAL_PRIMARY_KEY => $this->_id]);\n }", "title": "" }, { "docid": "8db931918b74e4d136108ad8e9e5b6eb", "score": "0.6212251", "text": "public function delete() {\n\n // exclusão\n $this->adicionaCampos();\n parent::delete();\n if ($this->result) $this->clear();\n\n // retorno\n return $this->result;\n\n }", "title": "" }, { "docid": "8db931918b74e4d136108ad8e9e5b6eb", "score": "0.6212251", "text": "public function delete() {\n\n // exclusão\n $this->adicionaCampos();\n parent::delete();\n if ($this->result) $this->clear();\n\n // retorno\n return $this->result;\n\n }", "title": "" }, { "docid": "8db931918b74e4d136108ad8e9e5b6eb", "score": "0.6212251", "text": "public function delete() {\n\n // exclusão\n $this->adicionaCampos();\n parent::delete();\n if ($this->result) $this->clear();\n\n // retorno\n return $this->result;\n\n }", "title": "" }, { "docid": "8db931918b74e4d136108ad8e9e5b6eb", "score": "0.6212251", "text": "public function delete() {\n\n // exclusão\n $this->adicionaCampos();\n parent::delete();\n if ($this->result) $this->clear();\n\n // retorno\n return $this->result;\n\n }", "title": "" }, { "docid": "8db931918b74e4d136108ad8e9e5b6eb", "score": "0.6212251", "text": "public function delete() {\n\n // exclusão\n $this->adicionaCampos();\n parent::delete();\n if ($this->result) $this->clear();\n\n // retorno\n return $this->result;\n\n }", "title": "" }, { "docid": "8db931918b74e4d136108ad8e9e5b6eb", "score": "0.6212251", "text": "public function delete() {\n\n // exclusão\n $this->adicionaCampos();\n parent::delete();\n if ($this->result) $this->clear();\n\n // retorno\n return $this->result;\n\n }", "title": "" }, { "docid": "f5322c364abfb1514c16af9e8aa15d9e", "score": "0.62052804", "text": "function delete(){\n\n // SQL query to delete given record\n $query = \"DELETE FROM {$this->tableName} WHERE id=:id\";\n \n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // Santize and bind property\n $this->id = parent::sanitize($this->id);\n $stmt->bindParam(\":id\", $this->id);\n \n // Execute query\n if($stmt->execute()){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "91eb7521c64974172f068fc7b0cf6fe2", "score": "0.6201074", "text": "function delete($params)\n\t{\n\t\t$params = $this->buildParams($params);\n\t\tif(!$params) return false;\n\n\t\t$where = '';\n\t\t$args = array(\n\t\t\t'script' => $this->script,\n\t\t\t'primary_field' => $params['primary_field'],\n\t\t\t'primary_field_data' => $params['primary_field_data']\n\t\t);\n\t\t\n\t\tif($params['field'])\n\t\t{\n\t\t\t$where = \"AND field_data = :field \";\n\t\t\tif( $params['field_data'] && $params['field_data'] != \"NULL\" )\n\t\t\t{\n\t\t\t\t$args['field'] = $params['field_data'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$args['field'] = null;\n\t\t\t}\n\t\t}//end if\n\t\t\n\t\tif($params['flag'])\n\t\t{\n\t\t\t$where .= \"AND flag = :flag \";\n\t\t\tif( $params['flag'] && $params['flag'] != \"NULL\" )\n\t\t\t{\n\t\t\t\t$args['flag'] = $params['flag'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$args['flag'] = null;\n\t\t\t}\n\t\t}//end if\n\n\t\t$sql = \"DELETE FROM {$this->table['utility']} \n\t\t WHERE script = :script\n\t\t AND primary_field = :primary_field\n\t\t AND primary_field_data = :primary_field_data\n\t\t $where\";\n\t\treturn $this->db->Execute($sql, $args);\n\t}", "title": "" }, { "docid": "0814abf8dde9a8066f54be6e9996f4f5", "score": "0.6199828", "text": "public function delete(){\n\t\t//Llama al metodo estatico de borrar y le pasa el id del objeto actual\n\t\tself::__delete($this->id);\n\t}", "title": "" }, { "docid": "01b529cd5d5f462f3fd8c3efeecd5a49", "score": "0.6198738", "text": "function delete($cond){ \n\t\t$this->db->where($cond);\n\t\t$query = $this->db->delete('pengguna');\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "13a4d2a15f0136af1fbdfb0e5e41f329", "score": "0.61972874", "text": "public function delete($codigoinsumo);", "title": "" }, { "docid": "53d0b251ad74d81a55068a7f4af24324", "score": "0.6195861", "text": "public function delete() {\n\t\t$dbh = static::getInstance();\t\t\n\t\t$sth = $dbh->prepare(\"DELETE FROM \" . static::$table . \" WHERE \" . \n\t\t\tstatic::$id_name . \" = :id\");\n\t\t$sth->bindValue(\":id\", $this->{$class::$id_name});\n\t\treturn $sth->execute();\n\t}", "title": "" }, { "docid": "eb8e4df8935486846c6568c7809c5f8f", "score": "0.61947465", "text": "public final function delete(){\n $this->clearData();\n $this->where = $this->prepareCondition(func_get_args(),'AND');\n $this->lastQuery = \"DELETE FROM {$this->table} WHERE {$this->where}\";\n return $this->app['DB']->query($this->lastQuery);\n }", "title": "" }, { "docid": "47d0be3614546a9025c0b667488f2494", "score": "0.6193642", "text": "function delete()\n {\n $class = get_called_class();\n $query = \"DELETE FROM \" . static::$tableName . \" WHERE \" . static::$primaryKey . \"=:id LIMIT 1\";\n $statement = Connection::make(App::get('config')['database'])->prepare($query);\n $statement->execute(array(':id' => $this->columns[static::$primaryKey]));\n }", "title": "" }, { "docid": "00791bc4efbe3a7af20d91f034a81561", "score": "0.6191953", "text": "public static function delete($primaryKey): void\n\t{\n\t\tstatic::query()\n\t\t\t->deleteFrom(static::$table)\n\t\t\t->where(static::$primaryKey, $primaryKey)\n\t\t\t->run();\n\t}", "title": "" }, { "docid": "950fa807f51321bb7d05cc93ed0113bb", "score": "0.6191925", "text": "public function delete($areacomun){\n $idAreaComun=$areacomun->getIdAreaComun();\n\n try {\n $sql =\"DELETE FROM `areacomun` WHERE `idAreaComun`='$idAreaComun'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "title": "" }, { "docid": "f8e59848494b4ea247769f76a8ffbc95", "score": "0.6191226", "text": "function DELETE ($id_petugas)\n\t\t{\n\t\t\t//perintah DELETE data\n\t\t\tmysqli_query($this->con,\"delete from petugas where id_petugas='$id_petugas'\");\n\t\t}", "title": "" }, { "docid": "f373936ced8b57f99194bb6ed9fb609f", "score": "0.6190342", "text": "public function delete($id, string $primaryKey = 'id');", "title": "" }, { "docid": "578d2a916602fc3a0523d6852ed8d52d", "score": "0.61863387", "text": "public function delete()\n {\n try {\n $sql = 'DELETE FROM '.static::$tableName.' WHERE id = ?';\n $result = $this->db->prepare($sql);\n $result->bindValue(1, $this->id, PDO::PARAM_INT);\n $result->execute();\n } catch (Exception $e) {\n die('Error removing from database.');\n }\n }", "title": "" }, { "docid": "e88c9825433eb5497a1984a785762d21", "score": "0.6185598", "text": "function doDelete()\n {\n global $ilDB;\n\n $ilDB->manipulate(\n \"DELETE FROM rep_robj_xfrf_data WHERE \" .\n \" id = \" . $ilDB->quote($this->getId(), \"integer\")\n );\n }", "title": "" }, { "docid": "a52e22ba4fa59d4e59ca9dba0e11c17f", "score": "0.6185174", "text": "public function delete($id_usuario);", "title": "" }, { "docid": "c644367a7b08de7f8ad3e0f9d4630a80", "score": "0.618405", "text": "public function delete()\n {\n $key = $this->getKey();\n $repo = static::defaultRepo();\n $repo->beforeDelete($this);\n $repo->deleteByPrimaryKey($key);\n $repo->afterDelete($this);\n return Result::success('Record deleted', [ 'type' => Result::TYPE_DELETE ]);\n }", "title": "" }, { "docid": "39771314c26e8ee15373dcc026718124", "score": "0.61824775", "text": "public function delete($cod_documento){\r\n $sql = \"DELETE FROM PONENCIA WHERE cod_documento=\".$cod_documento;\r\n pg_Exec($this->conexion, $sql);\r\n }", "title": "" }, { "docid": "ac60682126818a68c88dcc7671ed33fb", "score": "0.61804885", "text": "public function delete($data)\n {\n $this->db->where('id', $data['id']);\n $this->db->delete('car', $data);\n }", "title": "" }, { "docid": "b09de2c415d2c2b0bad538422421dfee", "score": "0.6176336", "text": "public function delete($entity, $data = null);", "title": "" }, { "docid": "eb1345d4d5a63970efc8e2ccbba06113", "score": "0.61758405", "text": "public function deleteById(int $PersonneId): bool;", "title": "" }, { "docid": "6433862ecba520e4f93045962e7529f6", "score": "0.6173522", "text": "public function delete($usuario_has_hojaruta){\n $usuario_idusuario=$usuario_has_hojaruta->getUsuario_idusuario()->getIdusuario();\n$hojaRuta_idhojaRuta=$usuario_has_hojaruta->getHojaRuta_idhojaRuta()->getIdhojaRuta();\n\n try {\n $sql =\"DELETE FROM `usuario_has_hojaruta` WHERE `usuario_idusuario`='$usuario_idusuario' AND`hojaRuta_idhojaRuta`='$hojaRuta_idhojaRuta'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "title": "" }, { "docid": "82f6f70cf097d7d4e0eea278da3e2362", "score": "0.61715955", "text": "public function delete($moo){\n $primary = $this->primary;\n if(isset($moo->$this->primary)){\n $q = \"DELETE FROM \".$this->table.\" WHERE \".$this->fields[$this->primary].\" = '\".$moo->$primary.\"'\";\n query($q);\n } \n }", "title": "" }, { "docid": "9989891c728ea07b3aee5764a5410de4", "score": "0.6170333", "text": "public function delete($fundacion){\n $idFundacion=$fundacion->getIdFundacion();\n\n try {\n $sql =\"DELETE FROM `fundacion` WHERE `idFundacion`='$idFundacion'\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "title": "" }, { "docid": "a30f06685da94f5b08189b6db3c477ee", "score": "0.6163756", "text": "public function deleteContacto(ContactoInterface $trabajo);", "title": "" }, { "docid": "9568e3a84e648eba54f936714a6a2298", "score": "0.6159998", "text": "public function delete(){\n\t\t$this->db->delete($this::DB_TABLE, array(\n\t\t\t$this::DB_TABLE_PK => $this->{$this::DB_TABLE_PK},\n\t\t));\n\t\tunset($this->{$this::DB_TABLE_PK});\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9b47c918056858ef14b85bd8a41414c1", "score": "0.7020616", "text": "public function showAction(Humanresource $humanresource)\n {\n $deleteForm = $this->createDeleteForm($humanresource);\n\n return $this->render('humanresource/show.html.twig', array(\n 'humanresource' => $humanresource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "aef322cbfb19d79a77dc0e74e6e7bc96", "score": "0.67904377", "text": "public function showAction()\n {\n $config = $this->getConfiguration();\n\n $view = $this\n ->view()\n ->setTemplate($config->getTemplate('show.html'))\n ->setTemplateVar($config->getResourceName())\n ->setData($this->findOr404())\n ;\n\n return $this->handleView($view);\n }", "title": "" }, { "docid": "fb41f4ccc0d7db950d06ac1a19456fa2", "score": "0.67305946", "text": "public function actionView() {\n $id = isset($_GET['id']) ? (int)($_GET['id']) : 0;\n $this->menu=array_merge($this->menu, \n array(\n array('label'=>Yii::t('cms','Update this Resource'), 'url'=>array('update','id'=>$id),'linkOptions'=>array('class'=>'button')),\n array('label'=>Yii::t('cms','View this Resource'), 'url'=>array('view','id'=>$id),'linkOptions'=>array('class'=>'button'))\n )\n );\n $model_name = \"Resource\";\n $id = isset($_GET['id']) ? (int)$_GET['id'] : 0;\n $model = GxcHelpers::loadDetailModel($model_name, $id);\n $this->render('view', array(\n \"model\" => $model\n ));\n }", "title": "" }, { "docid": "ab30516f6991bb772fd61ae9fec2439c", "score": "0.6560534", "text": "public function show(project_resource $project_resource)\n {\n //\n }", "title": "" }, { "docid": "243cb80d371f620d93edb23fd4a5ec6c", "score": "0.65553087", "text": "public function showAction()\n {\n \ttry {\n \t\t$requestId = $this->getRequest()->getParam('id');\n \t\t$this->view->entity = $this->_service->findById($requestId);\n\n \t} catch(Svs_Service_Exception $e){\n \t\tthrow $e;\n \t}\n\n\t\t$this->view->partialName = sprintf(\n\t\t\t'partials/%s-show.phtml', $this->_controller\n\t\t);\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/show', null, true);\n }", "title": "" }, { "docid": "6ad7532d4e18e95bb51cb89fd46c6f3e", "score": "0.64986944", "text": "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "title": "" }, { "docid": "cfa7e3b5483e85906491eaedb4b1f7af", "score": "0.6410644", "text": "abstract public function render($resource_name);", "title": "" }, { "docid": "99db7dc2adb2a8f31daaf5823ce99e3e", "score": "0.63273495", "text": "public function testDisplayResourceViaShowMethod()\n\t{\n\t\t$this->stub->show();\n\n\t\t$refl = new \\ReflectionObject($this->stub);\n\t\t$attributes = $refl->getProperty('attributes');\n\t\t$attributes->setAccessible(true);\n\n\t\t$attrib = $attributes->getValue($this->stub);\n\n\t\t$this->assertTrue($attrib['visible']);\n\t}", "title": "" }, { "docid": "1b1f2555033be5c6cba96c89cae71c6c", "score": "0.62645876", "text": "public function show(Role_resource $role_resource)\n {\n //\n }", "title": "" }, { "docid": "a5d61876efad2a8ab6e7897e60e10aa5", "score": "0.6230868", "text": "public function show($id)\n {\n // Showing each items\n // Use resource controller\n }", "title": "" }, { "docid": "37fd3e719ea9cbc59455081cf591c629", "score": "0.61330074", "text": "public function serve($resource)\n { \n $resource = ($resource !== '') ? $resource : $this->defaultResource;\n $file = $this->viewsLocation.$resource;\n\n if (!file_exists($file))\n {\n throw new \\Exception(\"The {$resource} was not found in {$this->viewsLocation} directory!\");\n }\n\n $loader = new \\Twig_Loader_Filesystem(VIEW_PATH);\n $twig = new \\Twig_Environment($loader, array(\n 'cache' => Config::get('app.debug') ? false : CACHE_PATH.'/resource'\n ));\n\n $template = $twig->loadTemplate($resource);\n $this->render($template->display(Config::all()));\n }", "title": "" }, { "docid": "cca5b6bb346929960196841d06bdbc25", "score": "0.6132742", "text": "protected function callView($resource)\n {\n $collection = $this->getTableName($resource);\n $modelName = $this->getModelName($resource);\n\n if ($this->confirm(\"Do you want me to create views for this $modelName resource? [yes|no]\"))\n {\n foreach(['index', 'show', 'create', 'edit'] as $viewName)\n {\n $viewName = \"{$collection}.{$viewName}\";\n\n $this->call('generate:view', compact('viewName'));\n }\n }\n }", "title": "" }, { "docid": "ae6dfcef42246fa0bc047caa2a2e6abf", "score": "0.61027944", "text": "protected function callView($resource)\n\t{\n\t\t$collection = $this->getTableName($resource);\n\t\t$modelName = $this->getModelName($resource);\n\t\t$controllerName = $this->getControllerName($resource);\n\n\t\tif ($this->confirm(\"Do you want me to create views for this $modelName resource? [yes|no]\"))\n\t\t{\n\t\t\tforeach(['index', 'show', 'create', 'edit', 'form'] as $viewName)\n\t\t\t{\n\t\t\t\t$this->call('generate:view', [\n\t\t\t\t\t'viewName' => \"{$collection}.{$viewName}\",\n\t\t\t\t\t'--templatePath' => Config::get(\"generators::config.scaffold_view_\" . $viewName . \"_template_path\"),\n\t\t\t\t\t'controllerName' => $controllerName\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b39bdad40da5bd2a2191db02238d9733", "score": "0.6039017", "text": "public function show(Resource $resource)\n {\n\n // dd(TvValue::where('tv_id', 1)->with('tv')->get()->toArray());\n\n return new ResourceResource($resource);\n\n // return new ResourceResource(\n // Resource::with(['tvValues.tv'])->first()\n // );\n\n\n // return new ResourceResource(\n // Resource::with(['template.tvs', 'template.tvs.value' => function ($q) use ($resource) {\n // $q->where('resource_id', $resource->id); //only one value per tv/resource\n // }])->first()\n // );\n }", "title": "" }, { "docid": "152bd291ac464c8a798a231a537e9077", "score": "0.60048014", "text": "public function showOneResourceAction($slug) {\n $em = $this->getDoctrine()->getEntityManager();\n //get post repo\n $postRepo = $em->getRepository('ObjectsInternJumpBundle:Post');\n\n //Get post\n $post = $postRepo->findOneBy(array('slug' => $slug));\n\n\n return $this->render('ObjectsInternJumpBundle:Internjump:showPost.html.twig', array(\n 'post' => $post,\n ));\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "3fc6717f13f13fb78e83472976fc5aa9", "score": "0.59865093", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0];\n $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "062227a9dd94ad374ca6ff7a63acf1a7", "score": "0.59584326", "text": "public function show(Dispenser $dispenser)\n {\n return ( new DispenserResource( $dispenser ) );\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "daadc4514b755545abb9a973d9012f93", "score": "0.5950686", "text": "public function show(ShowRequest $request, Resource $resource)\n {\n $lastRecord = $resource->records()->orderBy('created_at','DESC')->first();\n\n $lastRecord = $lastRecord ? $lastRecord->created_at->diffForHumans() : 'Nothing recorded';\n\n $cacheKey = \"records.{$resource->id}.\".$request->startDate().\"-\".$request->endDate();\n\n $resource = Cache::remember($cacheKey, config('records.cache_time'), function () use ($request, $resource) {\n return $resource->withRecordsWithinDateRange($request->startDate(), $request->endDate());\n });\n\n $stats = generate_stats_from_records($resource->records);\n\n return view('resources.show', compact('resource', 'stats', 'lastRecord'));\n }", "title": "" }, { "docid": "ea2959468f0e3360f355a0256dc44f05", "score": "0.5925876", "text": "function display()\n\t{\n\t\t$this->checkVideoAccess();\n\t\t$document\t= JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\n\t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n\t\t$view\t\t= $this->getView( $viewName , '' , $viewType );\n\t\t\n\t\techo $view->get( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "efc877d628950b2a2648f5399003fe71", "score": "0.5917996", "text": "public function show(Ressource $resource)\n {\n\n return new RessourceR($resource);\n }", "title": "" }, { "docid": "b1ee0604513ee408dcac8ed18b24df7f", "score": "0.5912762", "text": "public function showResource($name)\n {\n $options = Config::get('laravel-swagger::getResourceOptions');\n $resourceName = \"/\" . str_replace(\"-\", \"/\", $name);\n\n $excludedPath = Config::get('laravel-swagger::excludedPath');\n $swagger = new Swagger($this->getPaths(), $excludedPath);\n\n if (Config::get('laravel-swagger::cache') && Cache::has('resource_'.$resourceName)) {\n $resource = Cache::get('resource_'.$resourceName);\n } else {\n if (!in_array($resourceName, $swagger->getResourceNames())) {\n App::abort(404, 'Resource not found');\n }\n\n // Pet demo uses the main laravel-swagger route.\n if ($resourceName == '/petdemo') {\n $options['defaultBasePath'] = route('swagger-index');\n }\n\n $resource = $swagger->getResource($resourceName, $options);\n }\n\n if (Config::get('laravel-swagger::cache') && !Cache::has('resource_'.$resourceName)) {\n Cache::put('resource_'.$resourceName, $resource, $this->getExpireAt());\n }\n\n return $resource;\n }", "title": "" }, { "docid": "b2c60065169a03f2b724e99c8fee9b74", "score": "0.5906451", "text": "public function actionShow()\n {\n $this->render('show');\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d9715e516ec25a4b15c08b2ae6252c4e", "score": "0.58607095", "text": "public function showAction()\n {\n $this->writeSession(); // avoid session write timing bug\n\n // Special case: proxy a full URL:\n $proxy = $this->params()->fromQuery('proxy');\n if (!empty($proxy)) {\n return $this->proxyUrl($proxy);\n }\n\n // Default case -- use image loader:\n $this->getLoader()->loadImage(\n // Legacy support for \"isn\" param which has been superseded by isbn:\n $this->params()->fromQuery('isbn', $this->params()->fromQuery('isn')),\n $this->params()->fromQuery('size'),\n $this->params()->fromQuery('contenttype'),\n $this->params()->fromQuery('title'),\n $this->params()->fromQuery('author'),\n $this->params()->fromQuery('callnumber'),\n $this->params()->fromQuery('issn'),\n $this->params()->fromQuery('oclc'),\n $this->params()->fromQuery('upc')\n );\n return $this->displayImage();\n }", "title": "" }, { "docid": "6d542b39d2ff1e3695538d5d13932255", "score": "0.58599764", "text": "public function controlResource()\n\t{\n\t\t$resourcePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t\n\t\tswitch($resourcePage->get('resourceAction'))\n\t\t{\n\t\t\tcase 'incrementDownloadsCount':\n\t\t\t\t$data=$this->incrementDownloads();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'getResourcePage':\n\t\t\t\t$data=$this->getResourcePage();\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase 'rateResource':\n\t\t\t\t$userSession = \\Utility\\Singleton::getInstance('\\Control\\Session');\n\t\t\t\t\n\t\t\t\tif ($userSession->isLoggedIn())\n\t\t\t\t{\n\t\t\t\t\t$data=$this->rateResource();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tprint 'Error. The user is not logged in but is still trying to rate a resource.';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'getResource_StaticPage':\n\t\t\t\t$resourcePage->assign('templateToDisplay', \"resourcePage.tpl\");\n\t\t\t\t$this->getResourcePage(); // sets the tpl variables ! \n\t\t\t\t$data = $resourcePage->fetch(\"main.tpl\"); // shows the page\n\t\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\treturn $data;\t\t\t\n\t}", "title": "" }, { "docid": "da151f1828a47e20ce9db9b1ce95d89d", "score": "0.58439523", "text": "public function showTaskResource($id=null) {\n\t\t$this->Evaluation->id = $id;\n\t\tif (!$this->Evaluation->exists()) {\n\t\t\tthrow new NotFoundException(__('Invalid evaluation'));\n\t\t}\n\n\t\t$this->Evaluation->recursive = 2; // also load the article record\n\t\t$this->set('evaluation', $this->Evaluation->read(null, $id));\n\n\t\t$this->layout = 'plain';\n\t}", "title": "" }, { "docid": "6e3b046d6dcd2e90f1b5e167dfd4e8e6", "score": "0.5836942", "text": "public function show($id_resource)\n {\n try{\n \n $resource =Resource::find($id_resource);\n if (!$resource) {\n return response()->json(['No existe el recurso'],404);\n }\n return response()->json(['datos' => $resource],200);\n\n }catch(\\Exception $e){\n \n Log::critical(\"no esta creado el recurso: {$e->getCode()} , {$e->getLine()} , {$e->getMessage()}\");\n return response('Algo esta mal',500);\n }\n }", "title": "" }, { "docid": "2258aee65ba455bc0aef378f3fccd130", "score": "0.5827746", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "d3013ca304fc4179240841ba87242e61", "score": "0.582286", "text": "public function show($id)\n {\n $employee=Employee::find($id);\n return view('human_resources.show',compact('employee'));\n }", "title": "" }, { "docid": "58526873a63ddff4b306282ce5155a89", "score": "0.58138895", "text": "public static function output($resource)\r\n\t{\r\n\t\tif (isset(self::$_resources[$resource])) {\r\n\t\t\t$res =& self::$_resources[$resource];\r\n\r\n\t\t\tif (function_exists('getInternalResource') && $data = getInternalResource($res['data'])) {\r\n\t\t\t\t$filename = self::$embedding_file;\r\n\t\t\t} else {\r\n\t\t\t\t$filename = $res['data'];\r\n\t\t\t}\r\n\r\n\t\t\t// use last-modified time as etag; etag must be quoted\r\n\t\t\t$etag = '\"' . filemtime($filename) . '\"';\r\n\r\n\t\t\t// check headers for matching etag; if etag hasn't changed, use the cached version\r\n\t\t\tif (isset($_SERVER['HTTP_IF_NONE_MATCH']) && $_SERVER['HTTP_IF_NONE_MATCH'] == $etag) {\r\n\t\t\t\theader('HTTP/1.0 304 Not Modified');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\theader('Etag: ' . $etag);\r\n\r\n\t\t\t// cache file for at most 30 days\r\n\t\t\theader('Cache-control: max-age=2592000');\r\n\r\n\t\t\t// output resource\r\n\t\t\theader('Content-type: ' . $res['mime']);\r\n\r\n\t\t\tif (isset($data)) {\r\n\t\t\t\tif (isset($res['base64'])) {\r\n\t\t\t\t\techo base64_decode($data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo $data;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treadfile($filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "772f1899391cdde388ff0797a9ac90ba", "score": "0.57871646", "text": "public function displayTask()\n\t{\n\t\t// Set the page title\n\t\t$this->_buildTitle(null);\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway(null);\n\n\t\t$this->view\n\t\t\t->set('cloud', new Cloud())\n\t\t\t->set('config', $this->config)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "e07dd1ea2c7998471ba1119365afd467", "score": "0.57825226", "text": "private function setShowResource($url, $route, $controller)\n {\n return $this->setResource($url, $route, $controller, 'show');\n }", "title": "" }, { "docid": "58b9e5811b41a6e1eb8525e2193c6ee8", "score": "0.57782406", "text": "public function show(Information $information)\n\t{\n\t}", "title": "" }, { "docid": "765678d75db620af12e826ffe74dec55", "score": "0.57683015", "text": "public function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "6c8e2d2ef5316837594a71f6d09c8fe4", "score": "0.5745173", "text": "public function displayTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$resource = Request::getInt('resource', 0);\n\n\t\tif (!$resource)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('No resource ID provided.') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\tif ($resource < 1 || substr($resource, 0, 4) == '9999')\n\t\t{\n\t\t\t$row = Entry::blank();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row = Entry::oneOrFail($resource);\n\t\t}\n\t\t$row->set('id', $resource);\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Allow for temp resource uploads\n\t\tif (!$row->get('created') || $row->get('created') == '0000-00-00 00:00:00')\n\t\t{\n\t\t\t$row->set('created', Date::format('Y-m-d 00:00:00'));\n\t\t}\n\n\t\t$path = $row->filespace() . DS . 'media';\n\n\t\t$folders = array();\n\t\t$docs = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Loop through all files and separate them into arrays of images, folders, and other\n\t\t\t$dirIterator = new \\DirectoryIterator($path);\n\n\t\t\tforeach ($dirIterator as $file)\n\t\t\t{\n\t\t\t\tif ($file->isDot())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$name = $file->getFilename();\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t{\n\t\t\t\t\t$folders[$path . DS . $name] = $name;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isFile())\n\t\t\t\t{\n\t\t\t\t\tif (('cvs' == strtolower($name))\n\t\t\t\t\t || ('.svn' == strtolower($name)))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$docs[$path . DS . $name] = $name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tksort($folders);\n\t\t\tksort($docs);\n\t\t}\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('resource', $resource)\n\t\t\t->set('row', $row)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('path', $path)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "66e03ced3a1ae0b6545066542c4db145", "score": "0.5740594", "text": "public function show($id)\n {\n // NOT CURRENTLY IN USE\n }", "title": "" }, { "docid": "a5c4f542acf75c65ff05c5578f254411", "score": "0.57365245", "text": "public function show($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "50906964816f826e5e97434e93a5e9fd", "score": "0.5725398", "text": "public static function build_resource_display($resource)\n {\n return !empty($resource->alias_id)\n ? (\n !empty($resource->alias->display)\n ? $resource->alias->display\n : (\n get_class($resource->alias->reference) == 'RrSection'\n ? $resource->alias->reference->humanized\n : (\n $resource->alias->reference->link_id\n ? $resource->alias->reference->external_link->display\n : $resource->alias->reference->current_content->name\n )\n )\n )\n : (\n !empty($resource->link_id)\n ? $resource->external_link->display\n : $resource\n );\n }", "title": "" }, { "docid": "59b0e1aa7962f363403756316247fa6c", "score": "0.5725074", "text": "public function show($id)\n {\n // NOT IN USE\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "db750b3e511e63d406ae28df64eaaebe", "score": "0.57234067", "text": "public function show()\n {\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d19dcc73e037825dd6d81eb43124c737", "score": "0.57209426", "text": "public function displayPublic(Event $event): void\n {\n $view = $event->getTarget();\n $resource = $view->resource;\n echo $view->annotations($resource);\n }", "title": "" }, { "docid": "92da845f2b45c1c27facc3d1b2652f6e", "score": "0.5720476", "text": "public function show($id)\n {\n // ????\n }", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "32724d56295205b19aa68b02a906dfe2", "score": "0.5716713", "text": "public function display()\n {\n echo c\\L::USER . $this->user . BR .\n c\\L::ACTION . $this->action . BR .\n c\\L::ID . $this->identifier->getId() . BR .\n c\\L::ASSET_TYPE . $this->identifier->getType() . BR .\n c\\L::DATE . date_format( $this->date_time, 'Y-m-d H:i:s' ) . BR . HR;\n \n return $this;\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "6b211039d8016aee0608335163b8aa27", "score": "0.5691084", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DataBaseBundle:Sitio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Sitio entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DataBaseBundle:Sitio:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "a485ce56c900259dcc8e330d7c451818", "score": "0.5685515", "text": "public function show($id)\n\t{\n\t\t$subResourceDetail = $this->subResourceDetailRepository->find($id);\n\n\t\tif(empty($subResourceDetail))\n\t\t{\n\t\t\tFlash::error('SubResourceDetail not found');\n\n\t\t\treturn redirect(route('subResourceDetails.index'));\n\t\t}\n\n\t\treturn view('subResourceDetails.show')->with('subResourceDetail', $subResourceDetail);\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
53c6e046b6bf8f18b5eda649d0f8e9a6
schemaFields returns array of all field names
[ { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.82011956", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" } ]
[ { "docid": "e062719ce03c2115a23ea67afaae58c7", "score": "0.78711283", "text": "public static function getFieldsNames()\n {\n return array();\n }", "title": "" }, { "docid": "0de46b7b38f55e10a11301c44ff54fee", "score": "0.7590405", "text": "public function fields(): array\n {\n return $this->schema->getLookupFields();\n }", "title": "" }, { "docid": "bfde1ea904faf751bfe118ba39dc9fb4", "score": "0.75654507", "text": "function get_field_names() {\n\t\treturn array_keys( $this->fields );\n\t}", "title": "" }, { "docid": "0e4ebb1e3c4951bc3fd27446dd872625", "score": "0.7456002", "text": "public function getFieldNames()\n {\n return array_keys($this->field_definitions);\n }", "title": "" }, { "docid": "572a124a15ddcdca9eebf52ee05d26f7", "score": "0.7445506", "text": "public function getFieldNames()\n\t{\n\t\treturn array_keys($this->_fields);\n\t}", "title": "" }, { "docid": "ac7c2511f11d4dfb44b99965f3475682", "score": "0.7423672", "text": "protected function getFormFields(): array\n {\n $table = $this->resourceModel->getTable();\n $columns = array_flip(\\Schema::getColumnListing($table));\n $fillable = $this->resourceModel->getFillable();\n\n $columns = array_only($columns, $fillable);\n\n foreach ($columns as $name => $val){\n $columns[$name] = \\DB::connection()->getDoctrineColumn($table, $name)->getType()->getName();\n }\n\n return $columns;\n }", "title": "" }, { "docid": "c3daa9bb5b3985606a6995f4850780e2", "score": "0.74138814", "text": "public function fields(): array\n {\n return array_keys($this->_fields);\n }", "title": "" }, { "docid": "e762a02e129a2494addebb67d8bfaa57", "score": "0.7395457", "text": "public static function GetFieldsNameArray () {\r\n $fields = static::GetFields();\r\n $a = array();\r\n foreach ( $fields as $field ) {\r\n $a[] = $field->name;\r\n }\r\n return $a;\r\n }", "title": "" }, { "docid": "a0cdd5f91814bd5f47e8b233a9e42070", "score": "0.7393044", "text": "public function getFieldsNames(): array\n {\n $namesArray = [];\n\n foreach ($this->getFields() as $field) {\n $namesArray[] = $field->getName();\n }\n\n return $namesArray;\n }", "title": "" }, { "docid": "ce543b3d65160383ed16a693bb1d0963", "score": "0.73824567", "text": "public function getFieldNames() : array;", "title": "" }, { "docid": "c205ebfb55d0567fad45f9d3b1931a7a", "score": "0.73557764", "text": "public function get_serialized_fields() {\n $out = array();\n $schema = $this->get_schema();\n foreach ($schema['fields'] as $field => $info) {\n if (!empty($info['serialize'])) {\n $out[] = $field;\n }\n }\n return $out;\n }", "title": "" }, { "docid": "5f70451e7676204608de35287c620f2b", "score": "0.7348559", "text": "public final function _listFields()\n\t{\n\t\t$field_names = array();\n\t\twhile ($field = mysqli_fetch_field($this->_result))\n\t\t{\n\t\t\t$field_names[] = $field->name;\n\t\t}\n\n\t\treturn $field_names;\n\t}", "title": "" }, { "docid": "22a62ba56c5c28d91410277bf91b8af9", "score": "0.73276114", "text": "public function getFieldNames()\n {\n return array_keys($this->fieldMappings);\n }", "title": "" }, { "docid": "f282ad4093c161eedd39db2c50b8c7f3", "score": "0.73092425", "text": "public function list_fields()\n {\n $field_names = [];\n for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) {\n // Might trigger an E_WARNING due to not all subdrivers\n // supporting getColumnMeta()\n $field_names[$i] = @$this->result_id->getColumnMeta($i);\n $field_names[$i] = $field_names[$i]['name'];\n }\n\n return $field_names;\n }", "title": "" }, { "docid": "44ec8ed8950f697997cb6e19a3efc935", "score": "0.7290655", "text": "public function getFieldNames() : array \n\t{\n\t\t$fieldNames = [];\n\t\tforeach (sqlsrv_field_metadata( $this->resultID ) as $offset => $field) {\n\t\t\t$fieldNames[] = $field['Name'];\n\t\t}\n\n\t\treturn $fieldNames;\n\t}", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7288699", "text": "public function getFields();", "title": "" }, { "docid": "cde733d27f7e6c1e7e976e48d8fab562", "score": "0.7278228", "text": "public function fields()\n\t{\n\t\tforeach ($this->_data as $key => $value)\n\t\t\t$fields[] = $this->_table_name.'.'.$key;\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "ec2cfec94aca392799c8676bb2643138", "score": "0.7260275", "text": "public function getAllFields()\n {\n $allFields = $this->fieldTypes->get();\n return $allFields;\n }", "title": "" }, { "docid": "0a97ce82b160790ad760482059b897a5", "score": "0.7259514", "text": "public static function getFields();", "title": "" }, { "docid": "074b5d5dba967e2f4a785c86f8415cc2", "score": "0.7257445", "text": "function get_fields_list(){\n global $conn;\n \n $fields = [];\n $sql = \"SELECT `column_name` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='\" . constant('DB_NAME') . \"' AND `TABLE_NAME`='\" . $this->table_name . \"';\";\n \n $query_rs = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($query_rs)) {\n $fields[] = $row['column_name'];\n }\n\n return $fields;\n }", "title": "" }, { "docid": "726c80c42bb1af340c21db8641612b9e", "score": "0.7250179", "text": "public function get_fields()\n\t{\n\t\treturn array_keys( $this->fields );\n\t}", "title": "" }, { "docid": "f40989eaa58917404f5e72eaa510bfe4", "score": "0.7233741", "text": "public function getIncludedSchemaFields()\n {\n return array(\n 'store' => 'string',\n 'order_increment_id' => 'varchar',\n 'external_order_id' => 'varchar'\n );\n }", "title": "" }, { "docid": "a4f2d64af7355dcf144da22f00180b79", "score": "0.7215358", "text": "public function getFields(): array\n {\n return $this->all();\n }", "title": "" }, { "docid": "53cde549e1545df5d5f13e4fd973a2ff", "score": "0.72013146", "text": "function field_names() {\n $arr = array();\n foreach ( array_keys( $this->attributes ) as $field ) {\n if ($field != $this->primary_key) {\n $arr[] = $field;\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "e6d3d29ae5dcf318520e8329021431f2", "score": "0.71856385", "text": "public function names()\n {\n return array_keys($this->_fields);\n }", "title": "" }, { "docid": "c479ea4685df5c078564792ae16ebfbd", "score": "0.7180268", "text": "function getFieldObjects_fromSchema($schema) {\r\n $fields = [];\r\n foreach ($schema as $name => $fieldSchema) {\r\n if (!is_array($fieldSchema)) { continue; } // fields are stored as arrays, other entries are table metadata\r\n $fieldSchema['name'] = $name;\r\n $field = createFieldObject_fromSchema($fieldSchema);\r\n if (!$field) { continue; }\r\n $fields[] = $field;\r\n }\r\n return $fields;\r\n}", "title": "" }, { "docid": "25a3de6a55a40fc24c019a882ed10033", "score": "0.71692824", "text": "public function getFields() : array;", "title": "" }, { "docid": "17ac49b460a7e75efb95433e8e6081f5", "score": "0.71613955", "text": "public function getFields()\n {\n return [];\n }", "title": "" }, { "docid": "34c765af891d04484fa4bd106e4754ac", "score": "0.7141898", "text": "public function getFieldnames()\n\t{\n\t\treturn $this->fieldnames;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.713698", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.713698", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.713698", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "a832e938d7e42d14f2e061737743762e", "score": "0.71368706", "text": "private function _Get_Fields () {\n\t\treturn array_keys(self::Database(null,false,false));\n\t}", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.7112378", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.7112378", "text": "public function getFields(): array;", "title": "" }, { "docid": "7ce7a04e7b38f96cefa095955a2ecd7b", "score": "0.7112378", "text": "public function getFields(): array;", "title": "" }, { "docid": "f4cfa44a37aba5f561f621bad91649f9", "score": "0.7110431", "text": "public function getFields () {\n /** @var array $a */\n $a = @$this->_result['response']['data'][0]['fieldData'];\n return @array_keys($a);\n }", "title": "" }, { "docid": "aca88ed169f55de39a48bc1304e894d9", "score": "0.7104115", "text": "protected function listFields() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "02e4ee64ac247f7338a22a821dfdc9cf", "score": "0.708436", "text": "public function getDefinedFields()\n {\n // field names are taken from the fields array\n // if the element value is an array, we assume the key is the\n // field name; otherwise, we assume the value is the field name.\n $fields = array();\n foreach ($this->fields as $key => $value) {\n $fields[] = is_array($value) ? $key : $value;\n }\n\n return $fields;\n }", "title": "" }, { "docid": "e3097b7a536d672b6655d3c1ae2c4e57", "score": "0.7081192", "text": "public function list_fields()\n {\n $field_names = array();\n $this->result_id->field_seek(0);\n while ($field = $this->result_id->fetch_field())\n {\n $field_names[] = $field->name;\n }\n\n return $field_names;\n }", "title": "" }, { "docid": "ff1d609db161578c28d253b875299817", "score": "0.70710945", "text": "public static function fields()\n {\n return array_keys(CriteriaOption::validations());\n }", "title": "" }, { "docid": "ee58352aa0e203c05c3691a1a47d4228", "score": "0.70642203", "text": "function GetFieldsList()\n\t{\n\t\tglobal $dal_info;\n\t\treturn array_keys( $dal_info[ $this->infoKey ] );\n\t}", "title": "" }, { "docid": "9e9eb9d43ec27f5b8878b38a3f4666ef", "score": "0.7056612", "text": "protected function _datasourceFields() {\n $fields = get_object_vars($this);\n foreach ($fields as $key => $value) {\n if (in_array($key, array('_datasourceName', '_relations', '_errors', '_query', '_daoName'))) {\n unset($fields[$key]);\n } else {\n $fields[ltrim($key, '_')] = $fields[$key];\n unset($fields[$key]);\n }\n }\n return array_keys($fields);\n }", "title": "" }, { "docid": "30170dba3fea9bb967114f5a5070fc71", "score": "0.70482713", "text": "public function getFields()\n {\n $this->fields = array_keys( $this->dataSet ); \n return $this->fields;\n }", "title": "" }, { "docid": "fbb1d381d5cde6de5f27fc163b4ca2a4", "score": "0.70450515", "text": "public function getDbFields();", "title": "" }, { "docid": "87199bbbc08a347969164aaf0b9038d8", "score": "0.70374256", "text": "public function getFields ()\n {\n if ( empty($this->results) )\n return array();\n\n return array_keys( $this->results[0] );\n }", "title": "" }, { "docid": "b6ede642a4c7e03bbacdb2353a1a12ff", "score": "0.70033014", "text": "public function getFields()\n {\n // defined fields appear first, ad-hoc fields appear last (keys from the values array)\n return array_unique(array_merge($this->getDefinedFields(), array_keys($this->values)));\n }", "title": "" }, { "docid": "c7da32275ee3b9d909b93675ed1fd43d", "score": "0.7000528", "text": "public function fields()\n {\n return array();\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.69944304", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.69944304", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "2a092b3dc8ed7652c1f49ae5b1f6ac6f", "score": "0.69944304", "text": "public function getFields(): array\n {\n return $this->fields;\n }", "title": "" }, { "docid": "4a7c21d785d0686ff4ae12e59d980d2a", "score": "0.6983966", "text": "protected function getFields()\n\t{\n\t\tif($this->fieldArray == null)\n\t\t{\n\t\t\t$start = microtime(true);\n\t\t\t$results = $this->wpdb->get_results('SHOW columns FROM '.$this->getTable());\n\t\t\t$GLOBALS['DB_MODELS_DEBUG'][] = ['SHOW columns FROM '.$this->getTable(), microtime(true) - $start, false];\n\t\t\tforeach($results as $field)\n\t\t\t{\n\t\t\t\tif(strtolower($field->Key) == 'pri') $this->primaryKey = $field->Field;\n\t\t\t\t$this->fieldArray[] = $field->Field;\n\t\t\t}\n\t\t}\n\t\treturn $this->fieldArray;\n\t}", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.69803166", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.69803166", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.69803166", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.69803166", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.69803166", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "bdaa3030cea54b44e25196d7612faee8", "score": "0.69803166", "text": "public function fields()\n {\n return [];\n }", "title": "" }, { "docid": "400679c389f76290989b45912ffc0956", "score": "0.6969269", "text": "public function fields(): array\n {\n $field = $this->getConfig('fields');\n if (!$this->getConfig('aliasField')) {\n return $field;\n }\n\n $repository = $this->manager()->getRepository();\n if (!$repository instanceof Table) {\n return $field;\n }\n\n $return = [];\n foreach ($field as $fld) {\n $return[] = $repository->aliasField($fld);\n }\n\n return $return;\n }", "title": "" }, { "docid": "b7fbfe144ca9c1d034bb7ebf8120f86a", "score": "0.6949272", "text": "public abstract function getFields();", "title": "" }, { "docid": "31a096d299192ce10947f8ac0c2f2567", "score": "0.69491374", "text": "public function getFieldNames()\n {\n }", "title": "" }, { "docid": "f579e2f57e5335e0f5f989d09ec38006", "score": "0.69023573", "text": "public function getFieldsList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "b0e60f3f61c18758d86f40b8fff86908", "score": "0.68984556", "text": "public function getFields() : array {\n\n\t\t\treturn $this->fields;\n\t\t}", "title": "" }, { "docid": "1314851b12bb80f14093e6121f85231b", "score": "0.6887848", "text": "private function getAllTableFields()\n {\n $connection = $this->searchQuery->getConnection();\n $tableName = $this->searchQuery->getMainTable();\n $fields = $connection->describeTable($tableName);\n\n return $fields;\n }", "title": "" }, { "docid": "494eaea9423abd96bd0679b8da8b78cb", "score": "0.6887587", "text": "public static function availableFields()\n {\n return [];\n }", "title": "" }, { "docid": "6dc1779d8c185dba42aa6ed5966b6546", "score": "0.6880984", "text": "public function getFields() {\n\t\treturn array_merge(array('_id', '_rev'), static::$_fields, array('type'));\n\t}", "title": "" }, { "docid": "90ea7bf35a9c8ea5b38eccf3fee3f208", "score": "0.68631965", "text": "public static function getFields () {\n\t\tif (static::$fields === null) {\n\t\t\t$table = static::$table;\n\t\t\treturn static::$fields = static::$Db->query(\"DESCRIBE `$table`\", \\PDO::FETCH_COLUMN, 0)->fetchAll();\n\t\t}\n\n\t\treturn static::$fields;\n\t}", "title": "" }, { "docid": "9bf8874be7b8cf85a9894c83b2d6aa93", "score": "0.6854908", "text": "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 }", "title": "" }, { "docid": "98356e810c09bcfa37d9a8497b42d244", "score": "0.6852413", "text": "public function getFieldsForExport()\n {\n return array_keys($this->describeTable());\n }", "title": "" }, { "docid": "6b2e18dd63f78d8e6f5a1a63623fb14d", "score": "0.6847824", "text": "public function fields(): array\n {\n $fields = parent::fields();\n\n $modelSchema = $this->getPivotModelSchema();\n $accessor = $this->relation->getPivotAccessor();\n $typename = 'Create'.$modelSchema->typename().'Input';\n\n $fields = array_merge($fields, [\n $accessor => $this->registry->field($typename)->nullable(),\n ]);\n\n Utils::invariant(\n count($fields) > 0,\n 'There are no fields defined for '.class_basename($this->model)\n );\n\n return $fields;\n }", "title": "" }, { "docid": "0dc73fc1f8886ebd204d9f786cd25194", "score": "0.68361473", "text": "public function getFieldsTypesNames()\n {\n return $this->_fields_types_names;\n }", "title": "" }, { "docid": "5dfba84419ff1ca71c9737c2c36e46c2", "score": "0.68152964", "text": "public function getFields(): array\n {\n return [];\n }", "title": "" }, { "docid": "3ee6f92aa5c4e322ec279b5ab9aded7d", "score": "0.681021", "text": "public function fields(): array\n {\n $fields = $this->modelSchema->getSearchableFields()->map(function (Field $field) {\n return $this->registry->field($this->registry->boolean())->nullable();\n });\n\n $relations = $this->modelSchema->getSearchableRelationFields()->map(function (EloquentField $field) {\n $searchTypeName = $field->getName().'Search';\n\n return $this->registry->field($searchTypeName)->nullable();\n });\n\n return $fields->merge($relations)->toArray();\n }", "title": "" }, { "docid": "531c507501b8db22d31bf8f21cb9886f", "score": "0.6808829", "text": "public function get_fields();", "title": "" }, { "docid": "158be1a069912e646b550b86f360c4a1", "score": "0.6787493", "text": "public function fields()\n {\n return $this->db->list_fields($this->_table);\n }", "title": "" }, { "docid": "79cbe4e85f2a64618d07b0c99d6ea880", "score": "0.6786066", "text": "function getExistingFieldsArray() {\n\t\t$sql = \"SHOW COLUMNS FROM \" . $this->name();\n\t\t$result = $this->_db->queryF($sql);\n\t\twhile ($existing_field = $this->_db->fetchArray($result)) {\n\t\t\t$fields[$existing_field['Field']] = $existing_field['Type'];\n\t\t\tif ($existing_field['Null'] != \"YES\") {\n\t\t\t\t$fields[$existing_field['Field']] .= \" NOT NULL\";\n\t\t\t}\n\t\t\tif ($existing_field['Extra']) {\n\t\t\t\t$fields[$existing_field['Field']] .= \" \" . $existing_field['Extra'];\n\t\t\t}\n\t\t\tif (!($existing_field['Default'] === NULL) && ($existing_field['Default'] || $existing_field['Default'] == '' || $existing_field['Default'] == 0)) {\n\t\t\t\t$fields[$existing_field['Field']] .= \" default '\" . $existing_field['Default'] . \"'\";\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "e3d3962ff58340133a9cb49ae042e81b", "score": "0.67798483", "text": "public function getFields()\n {\n if (!static::$fields) {\n $fields = static::getFieldsFromTableStructure();\n\n static::$fields = $fields;\n }\n\n return static::$fields;\n }", "title": "" }, { "docid": "16ebb4ea80e60599a8e3d1f9051de011", "score": "0.6768174", "text": "public function getFieldsArray()\n {\n $fields = [];\n\n foreach ($this->fields as $field) {\n $fields[$field->getKey()] = $field->getValue();\n }\n\n return $fields;\n }", "title": "" }, { "docid": "292c9ee4a29f936ca833c2edb6c0ed1a", "score": "0.67644227", "text": "public function db_fields() {\n if ($this->_db_fields === null) {\n $this->_db_fields = array();\n $class = new \\ReflectionClass($this);\n foreach ($class->getProperties(\\ReflectionProperty::IS_PUBLIC |\n \\ReflectionProperty::IS_PROTECTED) as $field) {\n if (!$field->isStatic()) {\n $this->_db_fields[] = $field->name;\n }\n }\n }\n return $this->_db_fields;\n }", "title": "" }, { "docid": "10f9609d443fcb024ecee0f5a6012258", "score": "0.67611146", "text": "public function getFieldNames()\n {\n if (empty($this->fieldNames)) {\n $this->fieldNames = array();\n\n $fields = $this->exportFieldNames();\n foreach ($fields as $field) {\n $this->fieldNames[$field['export_field_name']] = 1;\n }\n\n $metadata = $this->getMetadata();\n foreach ($metadata as $field) {\n if ($field['field_type'] === 'file') {\n $this->fieldNames[$field['field_name']] = 1;\n }\n };\n }\n\n return $this->fieldNames;\n }", "title": "" }, { "docid": "8439ba1b61c18720e035189c5b8e6125", "score": "0.67604303", "text": "public function getFieldList()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "d6e17a1ba2b8d12a2756ad043e7355ca", "score": "0.67524153", "text": "protected static function getFieldsFromTableStructure()\n {\n $db = static::getStaticAdapter()->getDb();\n $statement = $db->query(\"DESCRIBE \".static::getTableName());\n $result = $statement->execute();\n\n $fields = [];\n foreach ($result as $column) {\n if (strpos($column['Type'], '(') !== false) {\n $type = substr($column['Type'], 0, strpos($column['Type'], '('));\n } else {\n $type = $column['Type'];\n }\n if (in_array($type, ['int', 'mediumint'])) {\n $type = 'integer';\n } else if (in_array($type, ['timestamp', 'datetime'])) {\n $type = 'datetime';\n } else {\n // FIXME: need mapping for more types here\n $type = 'string';\n }\n\n $fields[$column['Field']] = $type;\n }\n\n return $fields;\n }", "title": "" }, { "docid": "5b9c5e3bc2b5ae529a95b3e96e855d5d", "score": "0.6751002", "text": "public function getSchemaColumns(): array;", "title": "" }, { "docid": "16e7ffea0f831d8aa1a11eb1d09acb65", "score": "0.67480403", "text": "public function getFields(): array\n {\n $fields = [];\n\n foreach ($this->getNodes() as $node) {\n if ($node instanceof AbstractNode) {\n $fields = \\array_merge($fields, $node->getFields());\n } else if ($node instanceof Command) {\n $fields[] = $node->getField();\n }\n }\n\n return \\array_unique($fields);\n }", "title": "" }, { "docid": "ef0c6f6e59abf565053e4ccde7a35d05", "score": "0.673046", "text": "public function getFields()\n {\n if (empty($this->tableFields)) {\n $this->getTableInfo();\n }\n\n return $this->tableFields;\n }", "title": "" }, { "docid": "f227074ca517612825c53c67853f5a96", "score": "0.6728782", "text": "public function getFieldDefinitions()\n {\n return $this->fields;\n }", "title": "" }, { "docid": "c2637a7e23965f5742648c6e76f1a3be", "score": "0.6723525", "text": "public function fields()\n {\n return [\n 'id' => [\n 'type' => Type::nonNull(Type::id()),\n 'description' => 'The id of the account'\n ],\n 'user_id' => [\n 'type' => Type::nonNull(Type::id()),\n 'description' => 'The user foreign key'\n ],\n 'username' => [\n 'type' => Type::nonNull(Type::string()),\n 'description' => 'The username'\n ],\n ];\n }", "title": "" }, { "docid": "2cfaace797c43d8fd373ed77af0e932c", "score": "0.6716651", "text": "public function getFieldKeys(): array\n {\n return $this->fieldKeys;\n }", "title": "" }, { "docid": "8abba8d3f5bd5cd28eab4be8ae73afc4", "score": "0.66927934", "text": "function getFieldsName();", "title": "" }, { "docid": "d4a8247b4f7f08a945e51f38193d12cf", "score": "0.6690628", "text": "public function getFields()\n\t{\n\t\treturn $this->aFields;\n\t}", "title": "" }, { "docid": "d70834463015bc2ab74d90efaa1e05c2", "score": "0.66823083", "text": "public function fields()\n {\n return array(\n 'firstname' => array(\n 'table_alias' => 'c',\n 'use_tables' => array(\n 'c.clients',\n ),\n ),\n 'client_surname' => array(\n 'table_alias' => 'c',\n 'db_field' => 'surname',\n 'use_tables' => array(\n 'c.clients',\n ),\n ),\n 'office' => array(\n 'table_alias' => 'o',\n 'use_tables' => array(\n 'c.clients',\n 'o.offices',\n ),\n ),\n 'emails' => array(\n 'column_expr' => 'GROUP_CONCAT(e.email)',\n 'use_tables' => array(\n 'c.clients',\n 'e.emails',\n ),\n ),\n 'application_date' => array(\n 'table_alias' => 'l',\n 'db_field' => 'date_created',\n 'type' => 'date',\n 'operators' => array('>=', '<=', 'LIKE', 'NOT LIKE'),\n 'use_tables' => array(\n 'c.clients',\n 'l.log',\n ),\n ),\n 'invalid_table_field' => array(\n 'table_alias' => 'inv',\n 'use_tables' => array(\n 'inv.no_table'\n ),\n ),\n );\n }", "title": "" }, { "docid": "7e889cae270c8b193b1f1630e5dc736c", "score": "0.6679133", "text": "public function getFieldtypes()\n {\n return $this->fieldtypes;\n }", "title": "" } ]
577a03e3f83081172a04cdbaf6919076
Gets a repository for ACL privileges
[ { "docid": "89d80b1e57ac86315d7282dfebb75dfc", "score": "0.62609756", "text": "public function getPrivilegeRepository()\n {\n return new $this->privilegeRepositoryClass($this);\n }", "title": "" } ]
[ { "docid": "f4da1d091512c103543ff98d0442fa49", "score": "0.62712437", "text": "public function getAcl()\n\t{\n\n\t\t//throw new \\Exception(\"something\");\n\n\t\tif (!isset($this->persistent->acl)) {\n\n\t\t\t$acl = new AclList();\n\n\t\t\t$acl->setDefaultAction(Acl::DENY);\n\n\t\t\t//Register roles\n\t\t\t$roles = array(\n\t\t\t\t'guests' => new Role('Guests'),\n\t\t\t\t'users' => new Role('Users'),\n\t\t\t\t'admins' => new Role('Admins'),\n\t\t\t);\n\t\t\tforeach ($roles as $role) {\n\t\t\t\t$acl->addRole($role);\n\t\t\t}\n\n\t\t\t//Паблик но ложим куку\n\n\t\t\t$publicResources = array(\n\t\t\t\t'login' => array('*'),\n\t\t\t\t'krpano' => array('*'),\n\t\t\t\t'index' => array('*'),\n\t\t\t\t'ajax' => array('*'),\n\t\t\t\t'place' => array('*'),\n\t\t\t\t'error' => array('*'),\n\t\t\t\t'auth' => array('*'),\n\t\t\t);\n\n\n\t\t\t//закрытые\n\t\t\t$privateResources = array(\n\t\t\t\t'index' => array('planing','focus'),\n\t\t\t);\n\n\t\t\t// TODO:пройтись и прописать отдельно права для каждого модуля/контроллера\n\n\t\t\t//закрытые админские\n\t\t\t$adminResources = array(\n\t\t\t\t'adminpanel' => array('*'),\n\t\t\t);\n\n\t\t\tforeach ($publicResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\tforeach ($privateResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\tforeach ($adminResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\t//по умолчанию всем даем \n\t\t\tforeach ($roles as $role) {\n\t\t\t\tforeach ($publicResources as $resource => $actions) {\n\t\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t\t$acl->allow($role->getName(), $resource, $action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Grant acess to private area to role Users\n\t\t\tforeach ($privateResources as $resource => $actions) {\n\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t$acl->allow('Users', $resource, $action);\n\t\t\t\t\t$acl->allow('Admins', $resource, $action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach ($adminResources as $resource => $actions) {\n\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t$acl->allow('Admins', $resource, $action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->persistent->acl = $acl;\n\t\t\n\t\t}\n\n\t\treturn $this->persistent->acl;\n\t}", "title": "" }, { "docid": "6003e53da0816221cfd592a64a18dc62", "score": "0.6254512", "text": "public function getRepository();", "title": "" }, { "docid": "6003e53da0816221cfd592a64a18dc62", "score": "0.6254512", "text": "public function getRepository();", "title": "" }, { "docid": "383ab2895445ce27da976aab90c71c23", "score": "0.6191158", "text": "public function getRepositoryInfo();", "title": "" }, { "docid": "c44c6765e5ce132dbbf0e251177c5407", "score": "0.6141012", "text": "public function getAcl()\n\t{\n\t\tif (!isset($this->persistent->acl)) {\n\n\t\t\t$acl = new AclList();\n\n\t\t\t$acl->setDefaultAction(Acl::DENY);\n\n\t\t\t// Register roles\n\t\t\t$roles = [\n\t\t\t\t'users' => new Role(\n\t\t\t\t\t'Users',\n\t\t\t\t\t'Member privileges, granted after sign in.'\n\t\t\t\t),\n\t\t\t\t'guests' => new Role(\n\t\t\t\t\t'Guests',\n\t\t\t\t\t'Anyone browsing the site who is not signed in is considered to be a \"Guest\".'\n\t\t\t\t)\n\t\t\t];\n\n\t\t\tforeach ($roles as $role) {\n\t\t\t\t$acl->addRole($role);\n\t\t\t}\n\n\t\t\t//Private area resources\n\t\t\t$privateResources = [\n\t\t\t\t'transaction' => ['consulttransaction', 'detailtransaction', 'reports', 'consulttransactionclient', 'consultTransactionProgressClient', 'consultTransactionProgress','reportsCommerce' ,'reportsCommerceValue', 'reportsCommerceClient'],\n\t\t\t\t'client' => ['servicesPayBuy','indexClient', 'reservationsProgressClient', 'checkReservationsClient', 'historyClient' , 'detailReserveClient', 'mySpacesClient', 'reportsClient', 'editClient'],\n\t\t\t\t'commerce' => ['servicesPayBuy','indexCommerce','manageaccount'],\n\t\t\t\t'address' => ['index', 'delete', 'addAddress', 'detail', 'favorite'],\n\t\t\t\t'service' => ['index', 'payorbuy', 'acceptcashcommerce'],\n\t\t\t\t'cellar' => ['detailCellar' , 'listCellar' , 'deleteCellar' , 'addCellar'],\n\t\t\t\t'partner' => ['addCellar' , 'editCellar' , 'detailCellarPartner' , 'editCellarPartner' , 'deleteCellar'],\n\t\t\t\t'quotation' => ['quotationCellar' , 'reservationCellar' , 'billingCellar', 'quotationTruck', 'billingTruck'],\n\t\t\t\t'transaction' => ['reportsToday' , 'reportsLastDay' , 'reportsLastMonth'],\n\t\t\t];\n\t\t\t\n\t\t\tforeach ($privateResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\t//Public area resources\n\t\t\t$publicResources = [\n\t\t\t\t'index' => ['index', 'terms', 'developers', 'business', 'buyers', 'setLanguage', 'support', 'withUs', 'checkout', 'layout', 'supportIndex', 'investment', 'transport', 'storage', 'logistics', 'operation', 'commerce', 'management', 'fulfillment', 'distribution', 'prueba', 'almabox', 'quienessomos', 'cobertura', 'responsabilidadsocial', 'certificaciones', 'seaports', 'contactenos', 'glosario', 'vinculacion', 'acuerdo', 'proteccion', 'reorganizacionempresarial', 'auction'],\n\t\t\t\t'cellar' => ['detailCellar' , 'listCellar' , 'deleteCellar' , 'addCellar'],\n\t\t\t\t'transport' => ['listTransport', 'detailTransport'],\n\t\t\t\t'partner' => ['addCellar' , 'editCellar' , 'detailCellarPartner' , 'editCellarPartner' , 'deleteCellar'],\n\t\t\t\t'client' => ['detailReserveClient'],\n\t\t\t\t'quotation' => ['quotationCellar' , 'reservationCellar' , 'billingCellar', 'quotationTruck'],\n\t\t\t\t'transaction' => ['reportsToday' , 'reportsLastDay' , 'reportsLastMonth'],\n\t\t\t\t'errors' => ['show401', 'show404', 'show500'],\n\t\t\t\t'session' => ['index', 'registerClient', 'loginClient', 'editClient', 'forgotPasswordClient', 'changePasswordClient', 'facebook', 'google', 'end', 'editCommerce', 'registerCommerce'],\n\t\t\t\t'request' => ['checkout'],\n\t\t\t\t'register' => ['index', 'requestwithdrawal','register', 'support', 'integrationdata', 'integrationoptions', 'checkwithdrawal', 'supporttechnical'],\t\t\t\t\t\n\t\t\t\t'asamblea' => ['index'],\n\t\t\t];\n\n\t\t\tforeach ($publicResources as $resource => $actions) {\n\t\t\t\t$acl->addResource(new Resource($resource), $actions);\n\t\t\t}\n\n\t\t\t//Grant access to public areas to both users and guests\n\t\t\tforeach ($roles as $role) {\n\t\t\t\tforeach ($publicResources as $resource => $actions) {\n\t\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t\t$acl->allow($role->getName(), $resource, $action);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Grant access to private area to role Users\n\t\t\tforeach ($privateResources as $resource => $actions) {\n\t\t\t\tforeach ($actions as $action){\n\t\t\t\t\t$acl->allow('Users', $resource, $action);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//The acl is stored in session, APC would be useful here too\n\t\t\t$this->persistent->acl = $acl;\n\t\t}\n\n\t\treturn $this->persistent->acl;\n\t}", "title": "" }, { "docid": "9e7c185fe7eacd614a02862a726a226e", "score": "0.60711807", "text": "function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }", "title": "" }, { "docid": "27f302529ae3f03193070ee3993d4f27", "score": "0.5994208", "text": "abstract protected function getRepos();", "title": "" }, { "docid": "4cf16de508a0d4e5d1c06627e6e21bfe", "score": "0.5929716", "text": "public function getAccessControlList()\r\n\t{\r\n\t\t$dacl = new Dacl();\r\n\r\n\t\t// By default allow authenticated users to access a controller\r\n\t\t$dacl->allowGroup(UserEntity::GROUP_USERS);\r\n\r\n\t\treturn $dacl;\r\n\t}", "title": "" }, { "docid": "3613538d2ad6ffd968a11d2cfdc31e2d", "score": "0.58924097", "text": "public function getAcl()\n {\n\n if (!isset($this->persistent->acl)) {\n\n $acl = new AclList();\n\n $acl->setDefaultAction(Enum::DENY);\n\n $dbRoles = Role::find();\n $dbResources = Resource::find();\n $dbACLItems = Accesscontrollist::find();\n\n // Register roles\n foreach($dbRoles as $dbRole) {\n $acl->addRole($dbRole->getRole());\n }\n\n foreach($dbResources as $dbResource) {\n $dbActions = $dbResource->getAction();\n $actions[] = null;\n foreach($dbActions as $dbAction) {\n $actions[] = $dbAction->getAction();\n }\n $acl->addComponent($dbAction->getResource(),$actions);\n }\n\n foreach ($dbACLItems as $ACLItem){\n $acl->allow($ACLItem->getRole(), $ACLItem->getResource(), $ACLItem->getAction());\n }\n\n //The acl is stored in the session\n $this->persistent->acl = $acl;\n }\n\n return $this->persistent->acl;\n }", "title": "" }, { "docid": "82095ecacac7f20291e4e051527b7fef", "score": "0.58695465", "text": "public function getRepository()\n {\n }", "title": "" }, { "docid": "5e73ab62f6da08c4a98fe0a883a5bb09", "score": "0.58525676", "text": "protected function _getAcl()\n {\n return \\Zend_Registry::getInstance()->Acl;\n }", "title": "" }, { "docid": "46d3ebd5bf1abbdf589acac6301e9483", "score": "0.5812605", "text": "public function getAcl()\n {\n\n if (! $this->acl)\n $this->acl = $this->env->getAcl();\n \n return $this->acl;\n \n }", "title": "" }, { "docid": "6cce91c327e09c673108bab12dd5342e", "score": "0.57810056", "text": "public static function getAcl()\n {\n return self::getProperty(self::ACL);\n }", "title": "" }, { "docid": "9427da16de1154505a69641e36ad2cb7", "score": "0.5743311", "text": "function getAcl() {\n\n $acls = array(\n \"/secret\" => array(\"member\"),\n \"/moresecret\" => array(\"member\",\"subscribe\")\n );\n\n return $acls;\n}", "title": "" }, { "docid": "4ec73c1e4997f9062b67aed84c472684", "score": "0.57337165", "text": "protected function getAcl(): AclList\n {\n if (isset($this->persistent->acl)) {\n return $this->persistent->acl;\n }\n\n $acl = new AclList();\n $acl->setDefaultAction(Enum::DENY);\n\n // Register roles\n $roles = [\n 'admin' => new Role(\n 'admin',\n 'Dapat mengakses seluruh sistem'\n ),\n 'user' => new Role(\n 'user',\n 'Dapat mengakses Produk dan pencarian produk'\n ),\n 'umum' => new Role(\n 'umum',\n 'Tidak memiliki hak akses ke dalam sistem'\n )\n ];\n\n foreach ($roles as $role) {\n $acl->addRole($role);\n }\n\n // admin\n $adminprivateResources = [\n 'produk' => ['index', 'tambah', 'cari', 'list', 'edit', 'update', 'hapus'],\n 'Produk' => ['index', 'tambah', 'cari', 'list', 'edit', 'update', 'hapus'],\n 'admin' => ['index', 'tambah', 'editprofile', 'listuser', 'hapususer', 'cariuser', 'edituser', 'updateuser', 'tambahuser', 'registeruser', 'listproduk', 'cariproduk', 'tambahproduk', 'editproduk', 'updateproduk', 'hapusproduk'],\n 'Session' => ['index', 'login', 'logout'],\n 'signup' => ['index', 'register', 'list', 'edit', 'update', 'cari', 'hapus'],\n ];\n foreach ($adminprivateResources as $resource => $actions) {\n $acl->addComponent(new Component($resource), $actions);\n }\n \n // user\n $userprivateResources = [\n 'produk' => ['cari', 'list', 'detail', 'tambahwish', 'listwish', 'hapuswish'],\n 'signup' => ['edit', 'update'],\n ];\n foreach ($userprivateResources as $resource => $actions) {\n $acl->addComponent(new Component($resource), $actions);\n }\n\n //Public area resources\n $publicResources = [\n 'index' => ['index'],\n 'home' => ['index'],\n 'produk' => ['detail'],\n 'error' => ['notFound', 'serverError'],\n 'Session' => ['index','produk', 'login', 'logout'],\n 'signup' => ['index', 'register'],\n ];\n foreach ($publicResources as $resource => $actions) {\n $acl->addComponent(new Component($resource), $actions);\n }\n\n //Grant access to public areas to both master and admins\n foreach ($roles as $role) {\n foreach ($publicResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow($role->getName(), $resource, $action);\n }\n }\n }\n\n foreach ($userprivateResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow('user', $resource, $action);\n }\n }\n\n foreach ($adminprivateResources as $resource => $actions) {\n foreach ($actions as $action) {\n $acl->allow('admin', $resource, $action);\n }\n }\n\n //The acl is stored in session, APC would be useful here too\n $this->persistent->acl = $acl;\n\n return $acl;\n }", "title": "" }, { "docid": "4dd4d13d55bd02f4b3fe39c7f7de686f", "score": "0.5730968", "text": "public function getAcl(){\n if( !$this->acl ){\n $this->setAcl();\n }\n\n return $this->acl;\n }", "title": "" }, { "docid": "2ace1339dc13776507e6c7a32c36b2af", "score": "0.57099926", "text": "public function getCacheRepository();", "title": "" }, { "docid": "ae07f3e2688230e00145907b797c305f", "score": "0.56963384", "text": "public function getRepository($name);", "title": "" }, { "docid": "06caaa0779a7bdbb881c28592deeb70e", "score": "0.5690762", "text": "public function getAcl() {\n return $this->acl;\n }", "title": "" }, { "docid": "45c75b7836520247706d54c9ca1f015c", "score": "0.56645906", "text": "public function getRepositories();", "title": "" }, { "docid": "07df775a287da90a43890711d9d9c97a", "score": "0.5642042", "text": "public function asRepository();", "title": "" }, { "docid": "29c61eca4b4a4acf728d0fcf747f8e9c", "score": "0.5623624", "text": "public static function acl() {\n\t\treturn $GLOBALS['current_user']->getAcl();\n\t}", "title": "" }, { "docid": "685ae25ae25e8fc2148a9328115a1dfa", "score": "0.56230915", "text": "public static function aclm() {\n\t\treturn $GLOBALS['current_user']->getAclManager();\n\t}", "title": "" }, { "docid": "0a2910a5a43b9d6762f12dbb7c0b55ee", "score": "0.5621088", "text": "public function getAccessControl() { }", "title": "" }, { "docid": "ab4e5d77c7405dc93fec2106855edf1a", "score": "0.5592603", "text": "public function repository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "6dd3900d19ca8cc1a81e5541635a86f9", "score": "0.55917466", "text": "function rdf_admin_repositories() {\n $header = array(t('Name'), t('Statements'), t('Mutable'), t('Module'), array('data' => t('Operations'), 'colspan' => '2'));\n\n $rows = array();\n foreach (rdf_get_repositories() as $name => $info) {\n $mutable = !empty($info['mutable']) && $name != 'default'; // FIXME\n $rows[] = array(\n l($info['title'], 'admin/settings/rdf/repositories/'. $info['module'] .'/edit/'. $name,\n array('attributes' => array('title' => @$info['dc:description']))),\n $name == 'system' ? t('n/a') : (empty($info['statements']) ? '-' : number_format($info['statements'])),\n !empty($info['mutable']) ? t('Yes') : t('No'),\n $info['module'],\n !$mutable ? '' : l(t('edit'), 'admin/settings/rdf/repositories/'. $info['module'] .'/edit/'. $name),\n !$mutable ? '' : l(t('delete'), 'admin/settings/rdf/repositories/'. $info['module'] .'/delete/'. $name),\n );\n }\n\n return theme('table', $header, $rows);\n}", "title": "" }, { "docid": "eb49c356aa092bf868273e618e2a323c", "score": "0.55891144", "text": "public function getRepository($name=false);", "title": "" }, { "docid": "76927baee3655efc9460ab4b71427839", "score": "0.5586189", "text": "public function getAclCapabilities();", "title": "" }, { "docid": "bad704d9f67fc17c6e0061c6e9d3226f", "score": "0.5573046", "text": "public function get(?AclDto $aclDto): AclManagerInterface;", "title": "" }, { "docid": "20d70539445fc960691c5e740a18eed9", "score": "0.5562753", "text": "function get_acl($acl_id) {\n\t$acl = db_select('acl', 'sa')->fields('sa')\n\t\t->condition('sa.id', $acl_id)\n\t\t->execute()\n\t\t->fetch();\n\treturn $acl;\n}", "title": "" }, { "docid": "b0e3f74114f04fb1c95243a2fcf73eaf", "score": "0.5521417", "text": "public function getRights();", "title": "" }, { "docid": "98be46b708ee7633ae324e1c110059c1", "score": "0.5516724", "text": "public function acl($module_id){\n\t\t\t\treturn $this->crud->read('SELECT * FROM _permission WHERE role_id=:rid AND module_id=:mid',array(':rid'=>$this->result['role_id'],':mid'=>$module_id),'assoc');\n\t}", "title": "" }, { "docid": "ef89ba108be6130c7532b7c8aadf3bed", "score": "0.551599", "text": "public function getRepositoryForPath($path);", "title": "" }, { "docid": "0394ba127612b70422797c13a7028e56", "score": "0.54648715", "text": "public function getRepository()\n {\n return $this->_repository;\n }", "title": "" }, { "docid": "7b062eb0efa0d7b9cc7f627ff80ecc9d", "score": "0.54604316", "text": "public function repository(): Repository;", "title": "" }, { "docid": "990c111f509d5edd352a5f557739c399", "score": "0.54526097", "text": "public function roles(): Repository\n {\n return $this->hasManyThrough('Neoflow\\\\CMS\\\\Model\\\\RoleModel', 'Neoflow\\\\CMS\\\\Model\\\\RolePermissionModel', 'permission_id', 'role_id');\n }", "title": "" }, { "docid": "bc76e1cdb8b5237e650028e55919ae36", "score": "0.5433691", "text": "private function _repository()\n {\n return $this->doctrine->getRepository($this->repository_name);\n }", "title": "" }, { "docid": "bc76e1cdb8b5237e650028e55919ae36", "score": "0.5433691", "text": "private function _repository()\n {\n return $this->doctrine->getRepository($this->repository_name);\n }", "title": "" }, { "docid": "8a7177b0a729615638d987b37e036723", "score": "0.54158705", "text": "public function listOwn() {\n\t\treturn $this->request('/user/repos');\n\t}", "title": "" }, { "docid": "bf16c00b4312811eb3effd94c48013c1", "score": "0.5406687", "text": "public function getRepository()\n {\n return $this->getMondongo()->getRepository('DoubanCelebrity');\n }", "title": "" }, { "docid": "976b8fc1626bf82a219032866a045789", "score": "0.53974926", "text": "function newRepo($payload)\n{\n\tglobal $_config;\n\n\tif(in_array($payload->repository->name, $_config->auth_repos))\n\t{\n\t\treturn array(\n\t\t\t\"name\" => $payload->repository->name,\n\t\t\t\"full_name\" => $payload->repository->full_name,\n\t\t\t\"private\" => $payload->repository->private,\n\t\t\t\"users\" => array(newUser($payload))\n\t\t);\n\t}\n\telse\n\t\tdie(\"Repo not authorized to be added.\");\n}", "title": "" }, { "docid": "b2a2ac6bad38a044d8ca0d61b3e0bc31", "score": "0.5396788", "text": "public function getRepository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "b2a2ac6bad38a044d8ca0d61b3e0bc31", "score": "0.5396788", "text": "public function getRepository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "b2a2ac6bad38a044d8ca0d61b3e0bc31", "score": "0.5396788", "text": "public function getRepository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "b2a2ac6bad38a044d8ca0d61b3e0bc31", "score": "0.5396788", "text": "public function getRepository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "b2a2ac6bad38a044d8ca0d61b3e0bc31", "score": "0.5396788", "text": "public function getRepository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "b2a2ac6bad38a044d8ca0d61b3e0bc31", "score": "0.5396788", "text": "public function getRepository()\n {\n return $this->repository;\n }", "title": "" }, { "docid": "ff002c7c9c250baea95f0138b925f7cf", "score": "0.5360554", "text": "public function provides()\n {\n return array('acl');\n }", "title": "" }, { "docid": "969766f8b35d817bca754c825a77559d", "score": "0.5345998", "text": "function get_repository($name) {\n\treturn WordPress::get('dataManager')->getRepository($name);\n}", "title": "" }, { "docid": "1eec177d7f5c212b520cf621eeafd5db", "score": "0.5331498", "text": "public function checkAccess($repository);", "title": "" }, { "docid": "7bf405fcd1b65a0b92742e8224bd7cca", "score": "0.5315955", "text": "public function getRepo() : Object\n {\n if ($this->hasRepo()) {\n return $this->repositoryObject;\n }\n }", "title": "" }, { "docid": "4f64a0cdd5360a12e175db23d9fd4d4c", "score": "0.53148353", "text": "protected function _initAcl()\n {\n $this->bootstrap('database');\n $db = $this->getResource('database');\n if (!$db) {\n return;\n }\n $acl = new Core_Model_Acl;\n $acl->init();\n $this->bootstrap('view');\n $view = $this->getResource('view');\n $view->acl = $acl;\n Zend_Registry::set('acl', $acl);\n return $acl;\n }", "title": "" }, { "docid": "15fb23a4ef76005f6ff571b9e7ffbc1a", "score": "0.53137213", "text": "private function getRepository()\n {\n return 'repository';\n }", "title": "" }, { "docid": "c047668532a02027294cf052b98af0d3", "score": "0.53105515", "text": "private function repository()\n {\n return TableRegistry::getTableLocator()->get('Prefs.Preferences');\n }", "title": "" }, { "docid": "9399f905ed6e05b5ac28425843d601a2", "score": "0.52997583", "text": "public function getRepository()\r\n {\r\n return $this->getManager()->getRepository('Shopware\\Models\\Article\\Article');\r\n }", "title": "" }, { "docid": "8542d9818a8c77cc53058939697f8d3c", "score": "0.52585953", "text": "function get_accessory($id) {\n return $this->db->get_where('accessories', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "5fedee259fed4cc9fd42c6d868cf7f6c", "score": "0.5253406", "text": "abstract public function getPrivileges();", "title": "" }, { "docid": "2be4bcf2e1617614b3f67481b80ca988", "score": "0.5251872", "text": "protected function getRepositories()\n {\n $mandango = $this->getMandango();\n\n if (null === $this->repositories)\n {\n $this->repositories = array();\n foreach (sfFinder::type('file')->name('*Repository.php')->prune('Base')->in(sfConfig::get('sf_lib_dir').'/model/mandango') as $file)\n {\n $this->repositories[] = $mandango->getRepository(str_replace('Repository.php', '', basename($file)));\n }\n }\n\n return $this->repositories;\n }", "title": "" }, { "docid": "a446bfa6c60bd758daf0dc12d286edca", "score": "0.52511907", "text": "public function getRepositories() {\n return $this->withCache('repositories', strtotime('+1 hour'), function () {\n return $this->loadRepositories();\n });\n }", "title": "" }, { "docid": "d3d527742a5f25ec8e6b6f9109bf13ed", "score": "0.5250047", "text": "public function getPermissions() {\n\t\t$permissions = array('certs' => array(),\n\t\t\t'eventdetails' => array(),\n\t\t\t'events' => array(),\n\t\t\t'eventfilters' => array(),\n\t\t\t'sensorconfigs' => array(),\n\t\t\t'sensorimages' => array(),\n\t\t\t'sensors' => array(),\n\t\t\t'sensorstatus' => array(),\n\t\t\t'divisions' => array(),\n\t\t\t'users' => array(),\n 'contacts' => array(),\n\t\t\t'services' => array(),\n\t\t\t'settings' => array(),\n 'stats' => array(),\n 'state' => array());\n\t\tswitch($this->role) {\n\t\t\tcase $this::ROLE_ADMIN:\n\t\t\t\tarray_push($permissions['divisions'], 'create', 'update', 'delete');\n\t\t\t\tarray_push($permissions['users'], 'create', 'update', 'delete');\n array_push($permissions['settings'], 'create', 'update', 'delete');\n array_push($permissions['sensorimages'], 'create', 'update', 'delete', 'download');\n array_push($permissions['services'], 'create', 'update', 'delete');\n\t\t\tcase $this::ROLE_MANAGER:\n\t\t\t\tarray_push($permissions['certs'], 'create', 'delete');\n\t\t\t\tarray_push($permissions['events'], 'update', 'delete');\n\t\t\t\tarray_push($permissions['eventfilters'], 'create', 'update', 'delete');\n\t\t\t\tarray_push($permissions['sensorconfigs'], 'create', 'update', 'delete');\n\t\t\t\tarray_push($permissions['sensorimages'], 'download');\n\t\t\t\tarray_push($permissions['sensors'], 'create', 'update', 'delete', 'downloadConfig');\n\t\t\t\tarray_push($permissions['users'], 'all', 'get');\n array_push($permissions['contacts'], 'create', 'update', 'delete');\n\t\t\tcase $this::ROLE_OBSERVER:\n\t\t\t\tarray_push($permissions['certs'], 'all', 'get');\n\t\t\t\tarray_push($permissions['eventdetails'], 'get');\n\t\t\t\tarray_push($permissions['events'], 'all', 'get', 'getByLastID');\n\t\t\t\tarray_push($permissions['eventfilters'], 'get');\n\t\t\t\tarray_push($permissions['sensorconfigs'], 'all', 'get');\n\t\t\t\tarray_push($permissions['sensorimages'], 'all', 'get');\n\t\t\t\tarray_push($permissions['sensors'], 'all', 'get');\n\t\t\t\tarray_push($permissions['divisions'], 'all', 'get');\n array_push($permissions['contacts'], 'all', 'get');\n\t\t\t\tarray_push($permissions['sensorstatus'], 'get');\n\t\t\t\tarray_push($permissions['services'], 'get');\n\t\t\t\tarray_push($permissions['settings'], 'all', 'get');\n array_push($permissions['stats'], 'get');\n\t\t\tcase $this::ROLE_GUEST:\n array_push($permissions['state'], 'get');\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $permissions;\n\t}", "title": "" }, { "docid": "0c0c1304f8d1133c5a2f363f1f9febec", "score": "0.52483237", "text": "public function getRepositoryRoot();", "title": "" }, { "docid": "dfd00708407259469afbabf2a49f7108", "score": "0.5243651", "text": "public function loadAcl()\n {\n $acl = Mage::getModel('api/acl');\n $adapter = $this->_getReadAdapter();\n\n Mage::getSingleton('api/config')->loadAclResources($acl);\n\n $rolesArr = $adapter->fetchAll(\n $adapter->select()\n ->from($this->getTable('api/role'))\n ->order(array('tree_level', 'role_type'))\n );\n $this->loadRoles($acl, $rolesArr);\n\n $rulesArr = $adapter->fetchAll(\n $adapter->select()\n ->from(array('r'=>$this->getTable('api/rule')))\n ->joinLeft(\n array('a'=>$this->getTable('api/assert')),\n 'a.assert_id=r.assert_id',\n array('assert_type', 'assert_data')\n ));\n $this->loadRules($acl, $rulesArr);\n return $acl;\n }", "title": "" }, { "docid": "225c4311730c7c910cd78bb469c49c0e", "score": "0.5241068", "text": "public function role(): Repository\n {\n return $this->belongsTo('Neoflow\\\\CMS\\\\Model\\\\RoleModel', 'role_id');\n }", "title": "" }, { "docid": "2ff6ebe3e757b6aec0b24d3e0941a2a5", "score": "0.5238598", "text": "public function getRepositories() {\r\n\t\tif ($this->_repositories === null) {\r\n\t\t\t$this->_repositories = new CAttributeCollection();\r\n\t\t\t$directories = AFileHelper::findDirectories(Yii::getPathOfAlias(\"packages.ypm.repositories\"),array(\r\n\t\t\t\t\"level\" => 0,\r\n\t\t\t));\r\n\t\t\tforeach($directories as $dir) {\r\n\t\t\t\tif (file_exists($dir.\"/repository.json\")) {\r\n\t\t\t\t\t$repo = APackageRepository::load(basename($dir));\r\n\t\t\t\t\tif (is_object($repo)) {\r\n\t\t\t\t\t\t$this->_repositories->add($repo->name,$repo);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $this->_repositories;\r\n\t}", "title": "" }, { "docid": "80a135be73c50c6a1c36aae3fd016141", "score": "0.52284074", "text": "public function getRepository(): GroupRepositoryInterface;", "title": "" }, { "docid": "b742a46e339e0c2210fd17d21634569d", "score": "0.5226171", "text": "public function index()\n {\n return PermissionResource::collection($this->repo->paginate(10));\n }", "title": "" }, { "docid": "2c5f5d7f1fd3256855ca86263be0ba91", "score": "0.5216505", "text": "public static function access_list () {\n\t\t$acl = self::acl ();\n\t\t$resources = $acl->resources ();\n\t\t$access = array ('public' => __ ('Public'));\n\t\tforeach ($resources as $key => $value) {\n\t\t\tif (strpos ($key, 'content/') === 0) {\n\t\t\t\t$resource = str_replace ('content/', '', $key);\n\t\t\t\t$access[$resource] = __ (ucfirst ($resource));\n\t\t\t}\n\t\t}\n\t\treturn $access;\n\t}", "title": "" }, { "docid": "aacd9f448d32979c2f2f558c5607ec97", "score": "0.5215239", "text": "public static function getACL()\n {\n $frontParam = Zend_Controller_Front::getInstance()->getParam(self::REGISTRY_KEY);\n\n if ($frontParam instanceof Zend_Acl) {\n return $frontParam;\n } elseif (Zend_Registry::isRegistered(self::REGISTRY_KEY)) {\n return Zend_Registry::get(self::REGISTRY_KEY);\n } else {\n throw new Zym_Acl_Exception('Cannot access the acl via the '\n . 'front controller or the registry.');\n }\n }", "title": "" }, { "docid": "dbc2e87bc8034256e626e1d16b1ccebf", "score": "0.52083147", "text": "public static function acl ($acl = null) {\n\t\tif ($acl !== null) {\n\t\t\tself::$acl = $acl;\n\t\t}\n\n\t\tif (self::$acl === null) {\n\t\t\tself::$acl = new Acl (conf ('Paths', 'access_control_list'));\n\t\t}\n\n\t\treturn self::$acl;\n\t}", "title": "" }, { "docid": "abf38fdec8c9588b9fdc6864632f7457", "score": "0.51943564", "text": "protected function makeRepo()\n {\n return new DepotRepository(\n new Depot,\n new UserRepository(new User())\n );\n }", "title": "" }, { "docid": "f58b9239ab457d3aaf9c9d22a57f0660", "score": "0.5173955", "text": "public function getPrivileges();", "title": "" }, { "docid": "06d772bae3a8fb000c2dd7f1a6878c5f", "score": "0.5168563", "text": "public static function getACL(DB_IConnection_1 $db = NULL)\n\t{\n\t\tif (!self::$acl instanceof ECash_ACL)\n\t\t{\n\t\t\tself::$acl = self::getFactory()->getACL($db);\n\t\t\tself::$acl->setSystemId(self::getSystemId());\n\t\t}\n\t\t\n\t\treturn self::$acl;\n\t}", "title": "" }, { "docid": "b6db39b3d87211726cce15b4a5990a3e", "score": "0.5164582", "text": "function getRepo() {\n\t\treturn get_gedcom_value('REPO', 1, $this->gedrec, '', false);\n\t}", "title": "" }, { "docid": "a82d704e0c8c1c5f729d94b3dace3cdc", "score": "0.5161022", "text": "private function getRepository()\n\t{\n\t\tif (!$this->repository) {\n\t\t\t$this->repository = $this->fromEntity->getMapper()->getRepository(get_class($this->fromEntity));\n\t\t}\n\t\t\n\t\treturn $this->repository;\n\t}", "title": "" }, { "docid": "b8e40ecdd0bf91629f0c6cfff02dbc39", "score": "0.51589674", "text": "static private function get_rights()\n {\n $rights = array();\n\n foreach (Auth_ORM::instance()->get_user()->roles->find_all() as $role)\n {\n foreach ($role->rights->find_all() as $right)\n {\n $rights[strtolower($right->module->name)][$right->value] = TRUE;\n }\n }\n\n return $rights;\n }", "title": "" }, { "docid": "3238d5d12cd3a72e9bad360f89e042df", "score": "0.5155756", "text": "public function getAccessControlList() : array;", "title": "" }, { "docid": "8132783186dcfa7016d4ae38e9eda40f", "score": "0.51436174", "text": "abstract protected function getRepoInfo($repo);", "title": "" }, { "docid": "a34b341fa5ba73c33ef76f9073626706", "score": "0.51409984", "text": "public function getAcl()\n\t{\n\t\tif (null === $this->_acl) {\n\t\t\t$this->_acl = new Zend_Acl();\n\t\t}\n\t\treturn $this->_acl;\n\t}", "title": "" }, { "docid": "327832d943a28cbd4e9b6f19dffb0d59", "score": "0.5107089", "text": "function getAllRepositoryTypes($a_incl_adm = false)\n\t{\n\t\t$types = array_keys($this->obj_data);\n\t\t\n\t\tforeach ($types as $type)\n\t\t{\n\t\t\tif ($this->isAllowedInRepository($type) &&\n\t\t\t\t(!$this->isAdministrationObject($type) || $a_incl_adm))\n\t\t\t{\n\t\t\t\t$rbactypes[] = $type;\n\t\t\t}\n\t\t}\n\n\t\treturn $rbactypes ? $rbactypes : array();\n\t}", "title": "" }, { "docid": "c0972b76d7d626080730406e00d987b2", "score": "0.5095799", "text": "protected function getRepository()\n {\n return $this->getEntityManager()->getRepository('BlueBearCmsBundle:Content');\n }", "title": "" }, { "docid": "adb259cbd79f25e64be53b43bdb828af", "score": "0.5084661", "text": "public function getRepository($entityName);", "title": "" }, { "docid": "d6e9f1e548f202479f9fcab58349443c", "score": "0.5082926", "text": "public function getRepositories()\n {\n return $this->repositories;\n }", "title": "" }, { "docid": "d88c98b43e31e562f8d7ad7588b68086", "score": "0.50796044", "text": "public function getResources($repo, $page = 1) {\n if (!$this->_checkSession()) return null;\n\n $headers = array('X-ArchivesSpace-Session: ' . $this->session['token']);\n $response = $this->_request($this->config['endpoint'] . '/repositories/' . $repo . '/resources', array(\n 'page' => $page,\n 'page_size' => 100\n ), $headers);\n if ($response['status'] != 200 ) return null;\n\n return json_decode($response['body'], true);\n }", "title": "" }, { "docid": "5cb9d4e650b9da8dd3048bfdbd70303e", "score": "0.5079046", "text": "public function getContributors($role);", "title": "" }, { "docid": "7bd439ff7418785a3e13dd317dc41737", "score": "0.5078334", "text": "public function createRepository();", "title": "" }, { "docid": "e1eaf8ee41399dbe552c821d8cae7d3f", "score": "0.50745034", "text": "public function getScopeRepository(): ScopeRepositoryInterface;", "title": "" }, { "docid": "39429e9d7fc54bd618200985b84db3b7", "score": "0.5070984", "text": "private function getAccessAuthRoleAdmin() {\n $entityClass = 'SIGE\\SecurityManagerBundle\\Entity\\NomencladorSeguridad';\n $allNomenData = $this->container->get('sige.class.handler')->all($entityClass, \"\",false)->getData();\n $entityClass = 'SIGE\\SecurityManagerBundle\\Entity\\Accion';\n $allActionsData = $this->container->get('sige.class.handler')->all($entityClass, \"\",false)->getData();\n $auth = array();\n foreach ($allNomenData as $nomen) {\n $nameNomen = $nomen->getNombreNomenclador(); \n if (count($allActionsData) > 0) { \n foreach ($allActionsData as $action) {\n $auth[] = $nameNomen . \"_\" . $action->getAccion();\n }\n }\n }\n return $auth;\n }", "title": "" }, { "docid": "ceeac6fa539c633f63b9c8bc5c996279", "score": "0.507081", "text": "abstract public function getPermissions();", "title": "" }, { "docid": "dc073ce13500d733c3295d65eb9af79f", "score": "0.5056164", "text": "protected static function getFacadeAccessor()\n {\n return 'acl';\n }", "title": "" }, { "docid": "43002ea104bba4bbe21e8c91962a8e1d", "score": "0.5054908", "text": "public function getRepositories()\n {\n $token = Config::getInstance()->get('phpci.github.token');\n\n if (!$token) {\n die(json_encode(null));\n }\n\n $cache = Cache::getCache(Cache::TYPE_APC);\n $rtn = $cache->get('phpci_github_repos');\n\n if (!$rtn) {\n $orgs = $this->makeRequest('/user/orgs', array('access_token' => $token));\n\n $params = array('type' => 'all', 'access_token' => $token);\n $repos = array();\n $repos['user'] = $this->makeRequest('/user/repos', $params);\n\n\n foreach ($orgs as $org) {\n $repos[$org['login']] = $this->makeRequest('/orgs/'.$org['login'].'/repos', $params);\n }\n\n $rtn = array();\n foreach ($repos as $repoGroup) {\n foreach ($repoGroup as $repo) {\n $rtn['repos'][] = $repo['full_name'];\n }\n }\n\n $cache->set('phpci_github_repos', $rtn);\n }\n\n return $rtn;\n }", "title": "" }, { "docid": "8c9f98bd7dbeef0b5bd620131b4775a1", "score": "0.5040559", "text": "public function getRepository(): \\Doctrine\\ORM\\EntityRepository;", "title": "" }, { "docid": "d4f7435f982b88dc213ef57051ce214c", "score": "0.5038967", "text": "public static function getAcl()\n\t{\n\t\treturn self::getActions();\n\t}", "title": "" }, { "docid": "04fb758ce24cbe777fef93c56dc4a48f", "score": "0.5025973", "text": "public function getOrgsWithAccess($id) {\n\t\t$sg = $this->find('first', array(\n\t\t\t'conditions' => array('SharingGroup.id' => $id),\n\t\t\t'recursive' => -1,\n\t\t\t'fields' => array('id', 'org_id'),\n\t\t\t'contain' => array(\n\t\t\t\t'SharingGroupOrg' => array('fields' => array('id', 'org_id')),\n\t\t\t\t'SharingGroupServer' => array('fields' => array('id', 'server_id', 'all_orgs')),\n\t\t\t)\n\t\t));\n\t\tif (empty($sg)) return array();\n\t\t// if the current server is marked as \"all orgs\" in the sharing group, just return true\n\t\tforeach ($sg['SharingGroupServer'] as $sgs) {\n\t\t\tif ($sgs['server_id'] == 0) {\n\t\t\t\tif ($sgs['all_orgs']) return true;\n\t\t\t}\n\t\t}\n\t\t// return a list of arrays with all organisations tied to the SG.\n\t\t$orgs = array();\n\t\tforeach ($sg['SharingGroupOrg'] as $sgo) {\n\t\t\t$orgs[] = $sgo['org_id'];\n\t\t}\n\t\treturn $orgs;\n\t}", "title": "" }, { "docid": "3a6927fd942363d308c8343779d9bc5c", "score": "0.50231177", "text": "public function getAccessLevel($mask, $permission = null);", "title": "" }, { "docid": "12e03546d265b4a32a4dff1086e9a790", "score": "0.50221634", "text": "private function getAccessGrid()\n {\n $annotationReader = new AnnotationReader();\n\n // Load all registered bundles\n $bundles = $this->container->getParameter('kernel.bundles');\n\n foreach ($bundles as $name => $class) {\n\n $namespaceParts = explode('\\\\', $class);\n // Remove class name\n array_pop($namespaceParts);\n $bundleNamespace = implode('\\\\', $namespaceParts);\n $rootPath = $this->container->get('kernel')->getRootDir().'/../src/';\n $controllerDir = $rootPath.$bundleNamespace.'/Controller';\n\n // Skip vendor bundles and bundles without controllers\n if(!file_exists($controllerDir)){\n continue;\n }\n\n $files = scandir($controllerDir);\n foreach ($files as $file) {\n list($filename, $ext) = explode('.', $file);\n if ($ext != 'php') continue;\n\n $class = $bundleNamespace.'\\\\Controller\\\\'.$filename;\n $reflectedClass = new \\ReflectionClass($class);\n\n // Read class annotation\n $classAnnotation = $annotationReader->getClassAnnotation($reflectedClass, 'StaffBundle\\Annotation\\KXSecureClass');\n if($classAnnotation instanceof KXSecureClass){\n $class = $classAnnotation->getTitle();\n }\n\n foreach ($reflectedClass->getMethods() as $reflectedMethod) {\n\n // The annotations\n $annotations = $annotationReader->getMethodAnnotations($reflectedMethod);\n foreach($annotations as $annotation){\n if($annotation instanceof KXSecureAction){\n $kxAccessGrid[$class] = empty($kxAccessGrid[$class]) ? [] : $kxAccessGrid[$class];\n // Ignore annotation if it already included\n foreach($kxAccessGrid[$class] as $item){\n if($item->getRole() == $annotation->getRole()){\n continue(2);\n }\n }\n\n $kxAccessGrid[$class][] = $annotation;\n }\n }\n }\n }\n }\n\n return $kxAccessGrid;\n }", "title": "" }, { "docid": "74da8b06aa3f2215556061afa8929b54", "score": "0.5012869", "text": "public function cargarModalRoleAccess() \n\t{\n\t\t\theader(\"Content-Type: text/plain; charset=utf-8\"); //Para evitar problemas de acentos\n\t\t\t\n\t\t\t$data['information'] = FALSE;\n\t\t\t$data['linkList'] = FALSE;\n\t\t\t$data[\"idPermiso\"] = $this->input->post(\"idPermiso\");\t\n\t\t\t\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$arrParam = array(\n\t\t\t\t\"columnOrder\" => \"menu_name\",\n\t\t\t\t\"menuState\" => 1\n\t\t\t);\n\t\t\t$data['menuList'] = $this->general_model->get_menu($arrParam);\n\t\t\t\n\t\t\t$arrParam = array();\n\t\t\t$data['roles'] = $this->general_model->get_roles($arrParam);\n\t\t\t\n\t\t\tif ($data[\"idPermiso\"] != 'x') {\n\t\t\t\t$arrParam = array(\"idPermiso\" => $data[\"idPermiso\"]);\n\t\t\t\t$data['information'] = $this->general_model->get_role_access($arrParam);\n\t\t\t\t\n\t\t\t\t//busca lista de links para el menu guardado\n\t\t\t\t$arrParam = array(\"idMenu\" => $data['information'][0]['fk_id_menu']);\n\t\t\t\t$data['linkList'] = $this->general_model->get_links($arrParam);\n\t\t\t}\n\t\t\t\n\t\t\t$this->load->view(\"role_access_modal\", $data);\n }", "title": "" }, { "docid": "cd83a4ebe560412f91b523d9a10905b0", "score": "0.50090617", "text": "public function getRepositoryApi() {\n if(!isset($this->apis['repository']))\n $this->apis['repository'] = new ApiRepository($this);\n return $this->apis['repository'];\n }", "title": "" }, { "docid": "5f6b18b25c47fecc4d6eb752f373e819", "score": "0.5007071", "text": "public function getAuthority() {\n\t}", "title": "" }, { "docid": "60db6e8da360bd6ee97e00a05016de8e", "score": "0.49955502", "text": "protected abstract function getPermissions();", "title": "" }, { "docid": "3c3a84636307dda77ba74ea57db40df1", "score": "0.4986865", "text": "public function repositories()\n {\n return $this->hasMany('App\\Models\\Repository');\n }", "title": "" } ]
5667179cd76f3a0ccb258ba1b9c14d20
Generate template with given file
[ { "docid": "adfbc153199cf08fa24287101e7a9d32", "score": "0.0", "text": "protected function addImageToTemplate(\\Isotope\\Template $objTemplate, $strType, array $arrFile)\n {\n $objTemplate->setData($this->arrData);\n $objTemplate->type = $strType;\n $objTemplate->product_id = $this->product_id;\n $objTemplate->file = $arrFile;\n $objTemplate->src = $arrFile[$strType];\n $objTemplate->size = $arrFile[$strType . '_size'];\n $objTemplate->alt = $arrFile['alt'];\n $objTemplate->title = $arrFile['desc'];\n\n switch ($this->anchor) {\n case 'reader':\n $objTemplate->hasLink = ($this->href != '');\n $objTemplate->link = $this->href;\n break;\n\n case 'lightbox':\n list($link, $rel) = explode('|', $arrFile['link'], 2);\n\n $objTemplate->hasLink = true;\n $objTemplate->link = $link ? : $arrFile['lightbox'];\n $objTemplate->attributes = ($link ? ($rel ? ' data-lightbox=\"' . $rel . '\"' : ' target=\"_blank\"') : ' data-lightbox=\"product' . $this->product_id . '\"');\n break;\n\n default:\n $objTemplate->hasLink = false;\n break;\n }\n }", "title": "" } ]
[ { "docid": "2769c25c570e52f095d6ff4efea19ffe", "score": "0.78187776", "text": "function template()\n\t{\n\t\t$file = get('template', segment(3, null));\n\n\t\tif (!$file) exit;\n\n\t\t$file = 'template/'.$file.'.mustache';\n\n\t\tif (!file_exists($file)) exit;\n\n\t\t$file = file_get_contents($file);\n\t\techo $file;\n\t}", "title": "" }, { "docid": "b9e6b9d55b81b479926785709dd0a976", "score": "0.7348343", "text": "public function generate($file)\n {\n $filename = $file['filename'];\n $template = $file['template'];\n // Add user defined parameters\n if (array_key_exists('parameters', $file)) {\n foreach($file['parameters'] as $k => $v) {\n $this->parameters[$k] = $v;\n }\n }\n // change filename if overwrite is true\n if (true === $this->container->getParameter('avro_generator.overwrite')) {\n $this->renderFile($template, $filename);\n } else {\n $filename1 = 'Temp/split/'.$this->parameters['entity'].'/'.$filename;\n $filename2 = 'Temp/src/'.$filename;\n $this->renderFile($template, $filename1);\n $this->renderFile($template, $filename2);\n }\n $this->executeManipulators($file);\n }", "title": "" }, { "docid": "e63d715bf697aa05e29b4c9266e1b3dd", "score": "0.7325255", "text": "public function generate()\n {\n return $this->template($this->directory, $this->fileName, $this->flag);\n }", "title": "" }, { "docid": "853b902c8da8e0a765089de2f0b8641f", "score": "0.7279347", "text": "function template($file, $data = [])\n{\n $template = new Template(config());\n\n return $template\n ->setFile($file)\n ->render($data);\n}", "title": "" }, { "docid": "3038d771d8fba158ebf38c9e2220140e", "score": "0.7224154", "text": "abstract public function getTemplateFile();", "title": "" }, { "docid": "1410da6214f85e2f70b98a1ad306cba7", "score": "0.70128083", "text": "private function getFileTemplate($templateFilePath,$params = []) {\n if (file_exists($templateFilePath)) {\n $latte = new \\Latte\\Engine;\n\n $latte->onCompile[] = function ($latte){\n $set = new \\Latte\\Macros\\MacroSet($latte->getCompiler());\n $set->addMacro('src', NULL, NULL, 'echo \\'src=\"\\'.\\Nette\\Templating\\Helpers::dataStream(file_get_contents(%node.word)).\\'\"\\'');\n $set->addMacro('stylesheet', 'echo \\'<style type=\"text/css\">\\'.file_get_contents(%node.word).\\'</style>\\'');\n $set->addMacro('dumper', 'echo \\Tracy\\Dumper::toHtml(%node.word)');\n };\n\n $params['basePath'] = realpath(__DIR__);\n $template = $latte->renderToString($templateFilePath,$params);\n return $template;\n\n } else {\n throw new \\Nette\\FileNotFoundException('Requested template file is not exist.');\n }\n }", "title": "" }, { "docid": "e5852cfc05ab9ea67a275a68f778e0b5", "score": "0.7005507", "text": "function papi_template( $file, $values = array() ) {\n\treturn _papi_template( $file, $values );\n}", "title": "" }, { "docid": "0998215095b4ab5079a801b9ee23f8db", "score": "0.6993832", "text": "public function templateFile() {\n return KIRBY_SITE_ROOT_TEMPLATES . DS . $this->template() . '.php';\n }", "title": "" }, { "docid": "f64618ad8c95ff063c5d39060ebf2bef", "score": "0.69311327", "text": "function get_template($file, $atts) {\n extract($atts);\n ob_start();\n include($file);\n return ob_get_clean();\n }", "title": "" }, { "docid": "0a98bea59dfa543b14ac4fd263f73e0d", "score": "0.69227827", "text": "public function loadTemplate(string $file) {\n\t\t$Automad = $this;\n\n\t\tif (is_readable($file)) {\n\t\t\tob_start();\n\t\t\tinclude $file;\n\t\t\t$output = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t} else {\n\t\t\t$template = Str::stripStart($file, AM_BASE_DIR . AM_DIR_PACKAGES);\n\t\t\t$title = $this->Context->get()->get(AM_KEY_TITLE);\n\t\t\t$url = $this->Context->get()->get(AM_KEY_URL);\n\t\t\t$output = \"<h1>Template $template for page $title ($url) is missing!</h1><h2>Make sure you have selected an existing template for this page!</h2>\";\n\t\t}\n\n\t\t// Strip comments before return.\n\t\treturn preg_replace('/(' . preg_quote(AM_DEL_COMMENT_OPEN) . '.*?' . preg_quote(AM_DEL_COMMENT_CLOSE) . ')/s', '', $output);\n\t}", "title": "" }, { "docid": "ee1c6f25a01b974be683f895c96380bb", "score": "0.682936", "text": "public function renderFile($template, $filename)\n {\n if (strpos($template, ':')) {\n $arr = explode(\":\", $template);\n $template = $this->container->get('kernel')->getBundle($arr[0])->getPath().'/'.$arr[1];\n }\n $filename = $this->parameters['bundlePath'].$filename;\n // replace any placeholders in the filename\n $filename = str_replace(\n array(\n '{{ entity }}',\n '{{ entityCC }}',\n '{{ bundleVendor }}',\n '{{ bundleName }}',\n '{{ bundleCoreName }}'\n ), array(\n array_key_exists('entity', $this->parameters) ? $this->parameters['entity'] : '',\n array_key_exists('entityCC', $this->parameters) ? $this->parameters['entityCC'] : '',\n array_key_exists('bundleVendor', $this->parameters) ? $this->parameters['bundleVendor'] : '',\n array_key_exists('bundleName', $this->parameters) ? $this->parameters['bundleName'] : '',\n array_key_exists('bundleCoreName', $this->parameters) ? ucFirst($this->parameters['bundleCoreName']) : ''\n ),\n $filename\n );\n if (!is_dir(dirname($filename))) {\n mkdir(dirname($filename), 0777, true);\n }\n $this->output->write(sprintf('Generating %s: ', str_replace($this->parameters['bundlePath'], \"\", $filename)));\n try {\n $twig = new \\Twig_Environment(new \\Twig_Loader_Filesystem(array(__DIR__.'/../Templates', '/', $this->container->get('kernel')->getRootDir())), array(\n 'debug' => true,\n 'cache' => false,\n 'strict_variables' => true,\n 'autoescape' => false,\n ));\n $twig->addExtension(new GeneratorExtension());\n file_put_contents($filename, $twig->render($template, $this->parameters));\n $this->output->writeln('<info>Ok</info>');\n } catch (\\RuntimeException $e) {\n $this->output->writeln(array(\n '<error>Fail</error>',\n $e->getMessage(),\n ''\n ));\n }\n }", "title": "" }, { "docid": "ce19b7e6cbb85e4bd82b4a7077ade4db", "score": "0.6820061", "text": "function template($file, $partialType = [], $data = [])\n{\n if(!is_string($partialType)) {\n $data = $partialType;\n $partialType = null;\n }\n\n $template = new Template(config());\n\n if(is_string($partialType)) {\n $template->setPartialType($partialType);\n }\n\n return $template\n ->setFile($file)\n ->setData($data)\n ->render();\n}", "title": "" }, { "docid": "25146aead1f6891617e4c94bce5d30e6", "score": "0.6741848", "text": "function generateTemplates()\n {\n $dwt_location = UNL_DWT::$options['dwt_location'];\n if (!file_exists(UNL_DWT::$options['dwt_location'])) {\n include_once 'System.php';\n System::mkdir(array('-p', UNL_DWT::$options['dwt_location']));\n }\n if (!file_exists(UNL_DWT::$options['tpl_location'])) {\n include_once 'System.php';\n System::mkdir(array('-p', UNL_DWT::$options['tpl_location']));\n }\n foreach ($this->templates as $this->template) {\n $dwt = file_get_contents($dwt_location.$this->template);\n $dwt = $this->scanRegions($dwt);\n\n $sanitizedName = $this->sanitizeTemplateName($this->template);\n //Write out the .tpl file?\n if (strpos(UNL_DWT::$options['tpl_location'], '%s') !== false) {\n $outfilename = sprintf(UNL_DWT::$options['tpl_location'], $sanitizedName);\n } else {\n $outfilename = UNL_DWT::$options['tpl_location'].\"/{$sanitizedName}.tpl\";\n }\n $this->debug(\"Writing {$sanitizedName} to {$outfilename}\",\n 'generateTemplates');\n $fh = fopen($outfilename, \"w\");\n fputs($fh, $dwt);\n fclose($fh);\n }\n }", "title": "" }, { "docid": "010bba7f04f265f18dd015310f7a4a0b", "score": "0.6713507", "text": "public function generate()\n {\n $oathinfo = pathinfo($this->_outSourceFile);\n\n $classTemplate = new Template(\n sprintf(\n '%s%stemplate%s'.$oathinfo['filename'].'.tpl',\n __DIR__,\n DIRECTORY_SEPARATOR,\n DIRECTORY_SEPARATOR\n )\n );\n\n $testsuites = $this->getTestsuites($this->_modules);\n $modules = $this->getModules($this->_modules);\n\n $classTemplate->setVar(\n [\n 'testsuites' => $testsuites,\n 'modules' => $modules,\n 'moduleDir' => $this->_sourcePath,\n 'testClassName' => $this->_outClassName['className'],\n 'date' => date('Y-m-d'),\n 'time' => date('H:i:s')\n ]\n );\n\n return $classTemplate->render();\n }", "title": "" }, { "docid": "f533bc1c2ac94b9e8de8bd93a8668822", "score": "0.6702727", "text": "public function createFile() {\n $path = $this->getFilePath();\n $stock = $this->getDecorator() ? \"Decorator\" : $this->getContentType();\n $content = file_get_contents(SilverSmith::get_script_dir() . \"/code/lib/structures/$stock.bedrock\");\n $template = new BedrockTemplate($content);\n $template->bind($this); \n $new_content = str_replace(\"[?php\", \"<?php\", $template->render());\n $fh = fopen($path, \"w\");\n fwrite($fh, $new_content);\n fclose($fh);\n }", "title": "" }, { "docid": "f7ece88349ad800e4ae751dc3918ae60", "score": "0.6689776", "text": "public function setTemplate( $file ) {\n $this->setFile( $file );\n }", "title": "" }, { "docid": "8d44096c65c3662a8a2b3d239bc98446", "score": "0.6685158", "text": "function sanTemplate($filename, $title='')\n {\n return $this->LoadTemplate($filename, $title);\n }", "title": "" }, { "docid": "2d769ae9ee925a8afea17d920e91d1c6", "score": "0.6676559", "text": "abstract protected function getTemplateFile(): string;", "title": "" }, { "docid": "e0d5b6b50853d8cd9f58aeba761d4c7f", "score": "0.66600055", "text": "public function getFile(String $filename) {\n // Check if requested filename contains the .tpl extension and ommit it.\n if(substr($filename, -4) == \".tpl\")\n $filename = substr($filename, 0, -4);\n \n $contents = \"\";\n \n // Check if template file exists and fetch its contents.\n if(file_exists($this->getDirPath() . \"/\" . $filename . \".tpl\")) {\n $contents = file_get_contents($this->getDirPath() . \"/\" . $filename . \".tpl\");\n }\n \n // Process all template tags {{ template_tag }}\n foreach ($this->tags as $id => $content) {\n if(is_string($content)) {\n $contents = str_replace(\"{{ \" . $id . \" }}\", $content, $contents);\n } else if(is_array($content)) {\n $list = \"<ul>\";\n foreach ($content as $item) {\n $list .= \"<li>\" . $item . \"</li>\";\n }\n $list .= \"</ul>\";\n $contents = str_replace(\"{{ \" . $id . \" }}\", $list, $contents);\n }\n }\n \n // Process all function tags {% function_tag %}\n foreach ($this->ftags as $id => $content) {\n $contents = str_replace(\"{% \" . $id . \" %}\", $content, $contents);\n }\n \n // Process include function tags (filename is relative to template's directory and is without extension) {% include=\"filename\" %}\n if(preg_match_all(\"/{% include=\\\"(.*)\\\" %}/\", $contents, $matches, PREG_PATTERN_ORDER)) {\n for ($m = 0; $m < count($matches[0]); $m++) {\n if(file_exists($this->getDirPath() . \"/\" . $matches[1][$m] . \".tpl\")) {\n $contents = str_replace($matches[0][$m], file_get_contents($this->getDirPath() . \"/\" . $matches[1][$m] . \".tpl\"), $contents);\n }\n }\n }\n \n // Process title function tags {% title %}\n $title = array_key_exists(\"title\", $this->route_info) ? $this->route_info['title'] : \"Untitled Page\";\n $contents = str_replace(\"{% title %}\", $title, $contents);\n \n // Template file does not exist, return empty string.\n return $contents;\n }", "title": "" }, { "docid": "5410630503a21aac1ecb9ea5eb180929", "score": "0.6658339", "text": "public function generateFile();", "title": "" }, { "docid": "0b6b6faec61437cf2c14cdd5fdd94658", "score": "0.66347337", "text": "private function generateFile($file, $data)\n\t{\n\t\tif (file_exists($file))\n {\n\t\t\textract($data);\n\n\t\t\t// start buffering\n\t\t\tob_start();\n\n\t\t\t// include the view file\n\t\t\trequire $file;\n\n\t\t\t// get current buffer contents and delete current output buffer\n\t\t\treturn ob_get_clean();\n\t\t}\n\t\telse\n throw new Exception('View: File '.$file.' not found !');\n\t}", "title": "" }, { "docid": "3e8b4b1d9b62a2a6bd88683276086a43", "score": "0.6585727", "text": "function setTemplate( $file = null )\r\r\n\t{\r\r\n\t\t$this->templaterFile = $file;\r\r\n\t\t$this->handle = fopen($this->templaterFile, \"r\");\r\r\n\t}", "title": "" }, { "docid": "878d6d1b157badfe153c1efdbb8b3fd6", "score": "0.6503681", "text": "function _build_template( $template_file, $cache_time )\n{\n\t$template = $this->_get_template_filename( $template_file ) ;\n\treturn $this->build_cache_by_cache_id(\n\t\t$this->_cache_id, $template, $cache_time, $this->_DEBUG_FORCE );\n}", "title": "" }, { "docid": "0971bab09c514466b05ec8af831ba00e", "score": "0.64864326", "text": "function template(){\n\t\t\t$this->loadresource('/tpl/', '.html');\n\t\t}", "title": "" }, { "docid": "b1911505d2116202fb2f0355f2a6ecd6", "score": "0.6464083", "text": "function getTemplateFile( $__tmplFile, array $__tmplData = [ ] ) {\n\n\t$__tmplFile = apply_filters(\n\t\t'gpt-template',\n\t\tGPT_PATH . \"views/$__tmplFile.php\",\n\t\t$__tmplFile,\n\t\t$__tmplData\n\t);\n\n\tif ( $__tmplFile && file_exists( $__tmplFile ) ) {\n\t\textract( $__tmplData, EXTR_SKIP );\n\t\trequire $__tmplFile;\n\t}\n}", "title": "" }, { "docid": "69f7b0b56029336dec3c0030ce589e7c", "score": "0.64638716", "text": "public function getTemplate($file)\n\t{\n\t\t// Load template contents\n\t\t$template = file_get_contents(BLUPATH_LANGUAGE.'/email/'.$file.'.htm');\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "6da84978b4ed79fbb53793cacf3bd09d", "score": "0.6448942", "text": "function template_path($file, $data = [])\n{\n\treturn sage('blade')->compiledPath($file, $data);\n}", "title": "" }, { "docid": "b7562e1cb8963963084c18529963bdef", "score": "0.64377475", "text": "function Template($filename = null) {\n\t\tif ($filename != null) {\n\t\t\t$this->setTemplateFile($filename);\n\t\t}\n\t}", "title": "" }, { "docid": "b373e8333e8e02da0372eda9f9f94e96", "score": "0.6436645", "text": "public function buildTemplate()\n {\n\n if (!$this->tmpFolder)\n $this->tmpFolder = PATH_GW.'tmp/latext/'.Webfrap::tmpFolder().'/';\n\n SFilesystem::mkdir($this->tmpFolder);\n\n $this->tpl->buildIndexTemplate();\n $this->tpl->savePage($this->tmpFolder.$this->texFile.'.tex');\n\n }", "title": "" }, { "docid": "8be1fe2a08b7f0d38401eb1f99b600bf", "score": "0.64317757", "text": "public static function templateFromFile($name){\r\n self::init();\r\n \r\n if(file_exists(self::$template_dir . $name . '.tpl')){\r\n $file = $name . '.tpl';\r\n }\r\n else{\r\n throw new Exception('No template found ' . $name .'.tpl from ' . self::$template_dir, E_USER_ERROR);\r\n }\r\n if (!self::$instance->getLoader() instanceof Twig_Loader_Filesystem) {\r\n self::$instance->setLoader(new Twig_Loader_Filesystem(self::$template_dir));\r\n } \r\n return self::$instance->loadTemplate($file);\r\n }", "title": "" }, { "docid": "66fddb6db9b597d17aad948177682e9c", "score": "0.6423145", "text": "public function buildFromTemplates()\n {\n\t $bits = func_get_args();\n\t $content = \"\";\n\t foreach( $bits as $bit )\n\t {\n\t\t \n\t\t if( strpos( $bit, 'views/' ) === false )\n\t\t {\n\t\t\t $bit = PUBLIC_PATH . 'views/' . $this->registry->getSetting('view') . '/templates/' . $bit;\n\t\t }\n\t\t if( file_exists( $bit ) == true )\n\t\t {\n\t\t\t $content .= file_get_contents( $bit );\n\t\t }\n\t\t \n\t }\n\t $this->page->setContent( $content );\n }", "title": "" }, { "docid": "12a7e6d702d3dd16c777711e2bcb29fb", "score": "0.6410375", "text": "function writeTemplate($filename, $template) {\n\tglobal $temp_start, $temp_stop;\n\tfile_put_contents($filename, $temp_start . \n\t\t\t\t\t\t\t\t\t\tjson_encode($template, JSON_PRETTY_PRINT) . \n\t\t\t\t\t\t\t\t\t\t$temp_stop);\n}", "title": "" }, { "docid": "ded08c7357f0605898a42ae6aba152bf", "score": "0.64078575", "text": "function setTemplateFile($filename) {\n\t\t$application = &CoreFactory::getApplication();\n if (file_exists($application->registry->get(\"Path\") . $filename)) {\n \t$this->setTemplate(file_get_contents($application->registry->get(\"Path\") . $filename));\n } else if (file_exists($filename)) {\n\t\t\t$this->setTemplate(file_get_contents($filename));\n\t\t} else {\n\t\t\ttrigger_error(\"Unable to open template file '\" . realpath($filename) . \"', file not found\");\n\t\t}\n\t}", "title": "" }, { "docid": "bbcae7f435d5641f4bf6a045241b22ec", "score": "0.6400018", "text": "public static function template()\r\n {\r\n ob_start();\r\n include('templates/main.tpl');\r\n $template = ob_get_clean();\r\n return $template;\r\n }", "title": "" }, { "docid": "06c4e5eb56b5327a438a9ae6ca70f220", "score": "0.6393704", "text": "function template_path($file, $data = [])\n{\n return sage('blade')->compiledPath($file, $data);\n}", "title": "" }, { "docid": "5da0d0d11d93b19e783c31f452b50e03", "score": "0.639077", "text": "static public function TEMPLATE(Student $student, $file = null)\n {\n \\bloc\\view::removeRenderers();\n \\bloc\\view::$edit = false;\n $zip = new \\ZipArchive;\n $data = [\n 'empty' => null,\n 'code' => base64_encode($student['@name']),\n 'id' => $student['@id'],\n 'student' => $student,\n 'domain' => DOMAIN,\n 'cdn' => getenv('MODE') === 'local' ? DOMAIN : \"{$_SERVER['REQUEST_SCHEME']}://cdn.thirty.cc\",\n ];\n $trimmable = strlen(\"<?xml version=\\\"1.0\\\"?>\\n\");\n $template = 'data/template';\n $zip->open($file, \\ZIPARCHIVE::OVERWRITE);\n \n $snippet = \"Rename this file and make into something useful ;)\\n\\n\";\n // make a folder for class work and studies\n foreach ($student->section->schedule as $date) {\n if ($date['status'] == 'holiday') continue;\n $format = $date['object']->format('m-d-Y');\n $snippet .= \"<li><a href=\\\"./{$format}/index.html\\\">{$date['date']}</a></li>\\n\";\n $dir = '/studies/'.$format;\n // $zip->addEmptyDir($dir);\n \n $view = new \\bloc\\view(\"{$template}/layout.html\");\n $view->body = \"{$template}/notes.html\";\n\n $zip->addFromString(\"{$dir}/index.html\", substr($view->render(array_merge($data, [\n 'title' => 'Notes ' . $date['datetime'],\n 'resource' => $format,\n ])), $trimmable));\n \n $zip->addFromString(\"{$dir}/{$format}.css\", \"/* {$format} Stylesheet */\");\n $zip->addFromString(\"{$dir}/{$format}.js\", \"// {$format} JS */\"); \n }\n \n $zip->addFromString(\"/studies/TODO.txt\", $snippet);\n \n $quotes = new \\bloc\\DOM\\Document('data/quotes');\n $xpath = new \\DomXpath($quotes);\n // Add a file for each project\n foreach ($student->projects->list as $project) {\n $title = $project['project']->title;\n $view = new \\bloc\\view(\"{$template}/layout.html\");\n if ($title != 'final') {\n $view->body = \"{$template}/project.html\";\n\n $dir = \"/{$title}/\";\n $readme = \"# Notes for {$title} project\\n\\n## TODO\\n{$project['project']['criterion']}\\n\\nLook at the dates below: I urge you to use them to create an outline and journal your agenda, project-manage goals, note technical difficulties and jot ideas.\";\n $readme .= \"\\n\\n## Log\\n\" . implode(\"\\n\", array_map(function($date) {\n return $date->format('l F jS, Y');\n }, iterator_to_array(new \\DatePeriod($project['schedule']['object'], new \\DateInterval('P1D') ,$project['due']['object']))));\n } else {\n $view->body = \"{$template}/abstract.html\";\n $dir = \"/\";\n $readme = \"# This is your main readme file\\n\\nAnd this is where you tell me about your everything that happened with this class, this project, and this semester. [Markdown format](https://en.wikipedia.org/wiki/Markdown) is appreciated\";\n }\n\n $zip->addFromString(\"{$dir}index.html\", substr($view->render(array_merge($data, [\n 'description' => $project['project']['criterion'],\n 'quote' => $xpath->query(\"//quote[@for='{$title}']\")->item(0),\n 'title' => $title,\n 'resource' => $title,\n ])), $trimmable));\n \n $zip->addFromString(\"/{$dir}/README.txt\", $readme);\n $zip->addFromString(\"/src/css/{$title}.css\", \"/*\\n{$title} StyleSheet TODO:\\n - [ ] copy list from course outline\\n*/\");\n $zip->addFromString(\"/src/js/{$title}.js\", \"/*\\n{$title} JavaScript TODO:\\n - [ ] copy list from course outline\\n*/\");\n }\n\n // add media\n foreach (glob(PATH.'data/template/media/*.*') as $file) {\n $zip->addFile($file, '/assets/'.basename($file));\n }\n \n // add global src files\n $zip->addFile(PATH.'data/template/src/global.css', '/src/css/global.css');\n $zip->addFile(PATH.'data/template/src/global.js', '/src/js/global.js');\n \n $zip->close();\n return $file;\n }", "title": "" }, { "docid": "ae450f4172bbff8ffdea058f80015f6b", "score": "0.6379092", "text": "public function generate($data)\n\t{\n\t\t// specific part of the view\n\t\t$content = $this->generateFile($this->_file, $data);\n\n\t\t// template\n\t\t$view = $this->generateFile('views/template.php', array('t' => $this->_t, 'content' => $content, 'pseudo' => $this->_pseudo, 'errorMsg' => $this->_errorMsg));\n\n\t\techo $view;\n\t}", "title": "" }, { "docid": "b0c1e0dd88fa3c8efb7f38df088eadba", "score": "0.6377881", "text": "public function getTemplateFile() {\n return 'security/user/create.tpl';\n }", "title": "" }, { "docid": "4320fc109d1382cfe25ef267087c3a5e", "score": "0.63662475", "text": "protected function getTemplate() {\n $file = $this->component['path'] . $this->component['template'];\n return (file_exists($file)) ? file_get_contents($file) : '';\n }", "title": "" }, { "docid": "0a44c712602d252c91841fb098cdcafa", "score": "0.6358987", "text": "public function get_template( $file ) {\n\t\t\treturn wapu_core()->get_template( 'shortcodes/' . $this->tag . '/' . $file );\n\t\t}", "title": "" }, { "docid": "49e31934158709650c8c9482939dcb2e", "score": "0.630251", "text": "public function render_file($template_file) {\n return $this->render($template_file);\n }", "title": "" }, { "docid": "dc43d35ee6dcaba2eeac87b8464b9634", "score": "0.6296923", "text": "public function load($file)\n {\n try {\n if (isset($file) && file_exists($this->path . $file)) {\n $this->template = file_get_contents($this->path . $file);\n } else {\n throw new gException(\"Could not load template file\");\n }\n } catch (gException $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "1c40dcb7f0b558f9c556073727396130", "score": "0.6291165", "text": "public function generate($datas)\n\t{\n\t\t$content= $this->generateFile($this->_file, $datas); \n\t\t$view= $this->generateFile('View/template.php', array('content'=>$content));\n\n\t\t\n\t\techo $view;\n\n\t}", "title": "" }, { "docid": "646d4c139d5311ef67035aab0fb67a0a", "score": "0.6289708", "text": "function apply_template($filepath) {\n\n // place values array directly in scope\n // ($t? let's try to be more verbose please :-) )\n //\n $t = &$this->values;\n\n ob_start();\n include($filepath);\n $contents = ob_get_contents();\n ob_end_clean();\n return $contents;\n\n }", "title": "" }, { "docid": "a95be096bcb45d8798fc6cb900ef7b5c", "score": "0.6238126", "text": "protected function generateViewFile($sourceFile,$viewFile)\n {\n if (substr($sourceFile, strlen($this->fileExtension) * -1) === $this->fileExtension) {\n if ($this->jade == null)\n $this->init();\n\n $data = $this->jade->render($sourceFile);\n } else {\n $data = file_get_contents($sourceFile);\n }\n file_put_contents($viewFile, $this->prepend[0] . $data);\n }", "title": "" }, { "docid": "a3f5af7e59c76c34d375b7efb632f509", "score": "0.62346965", "text": "public function renderToFile($template, $target_location, array $data = [], array $settings = []);", "title": "" }, { "docid": "d0002644ddabfa806d2ca28966528c20", "score": "0.62274677", "text": "public function runCreateTemplate():void {\n\n # Check if app\n if($this->router[\"Type\"] == \"app\"){\n\n # Copy template\n File::copy(\"@crazyphp_root/resources/Environment/Template/App/template.hbs\", Router::getAppPath().$this->router[\"Name\"].\"/template.hbs\");\n\n }\n\n }", "title": "" }, { "docid": "144aa4e301833bda79f16bfa83b18fbc", "score": "0.62216824", "text": "public function GetTemplateFile()\n { return $this->template_file; }", "title": "" }, { "docid": "8da4528715f110e55593bc14030258a3", "score": "0.62078303", "text": "public function render() {\n include('templates/' . $this->templateStyle . '/' . $this->fileName . '.php');\n }", "title": "" }, { "docid": "a031bd533506dcadd9810cfd2f7d2ed1", "score": "0.62056047", "text": "public function __makeTemplate()\n {\n $html = <<<HTML\n<div></div>\nHTML;\n $tpl = \\Dom\\Loader::load($html);\n // OR FOR A FILE\n //$tpl = \\Dom\\Loader::loadFile($this->getTemplatePath().'/public.xtpl');\n return $tpl;\n }", "title": "" }, { "docid": "4e927340360fa9db682e65a101d26098", "score": "0.62025607", "text": "abstract protected function generateViewFile($sourceFile,$viewFile);", "title": "" }, { "docid": "4e927340360fa9db682e65a101d26098", "score": "0.62025607", "text": "abstract protected function generateViewFile($sourceFile,$viewFile);", "title": "" }, { "docid": "c88ee49573d985045ad0b0de2a346b76", "score": "0.6201281", "text": "function setTemplate(array $filename): self;", "title": "" }, { "docid": "3aa0110248c1dc3ad3689eff03878760", "score": "0.61947143", "text": "public function setFile($file)\n {\n $distFile = $file . '.dist';\n if (file_exists($file)) {\n $this->template = file_get_contents($file);\n }\n else if (file_exists($distFile)) {\n $this->template = file_get_contents($distFile);\n }\n else {\n throw new \\InvalidArgumentException(\n 'Template file could not be loaded.'\n );\n }\n }", "title": "" }, { "docid": "827d036b6feeffd87c0b1ba8685a81a9", "score": "0.61844623", "text": "function readTemplateFile($template_file = '')\n {\n return $this->_template->readTemplate($template_file);\n }", "title": "" }, { "docid": "fe08578605692b1c9893c36c21699cc9", "score": "0.6181193", "text": "function renderTemplate($fileName, &$tplArgs, $ignoreInheritance = False, &$renderedBlocks = NULL) {\n\n $iterator = new ArrayIterator(file(TEMPLATES_DIR.'/'.$fileName));\n\n if (!$renderedBlocks)\n $renderedBlocks = array();\n\n $parent = NULL;\n $tmp = renderLineArray($iterator, $tplArgs, $renderedBlocks, $parent);\n $str = $tmp[0];\n if ($ignoreInheritance || !$parent)\n return $str;\n\n return renderTemplate($parent, $tplArgs, $ignoreInheritance, $renderedBlocks);\n}", "title": "" }, { "docid": "e0b4cb93db4f81a15c0241a669133cd1", "score": "0.6157062", "text": "public function getTemplateFile()\n {\n return $this->template;\n }", "title": "" }, { "docid": "5a290512a5f986c2f55222d0b26aa50b", "score": "0.615555", "text": "function CreateFromTemplate($Template){\n $result = file_get_contents($Template);\n $result = str_replace('{d_type}',DOC_TYPE, $result);\n $meta_tag = $this->Return_Meta(); \n \n foreach ($meta_tag as $key=>$value) {\n $result = str_replace('{'.$key.'}', $value, $result);\n }\n foreach($this->Return_CSS() as $value){\n $result = str_replace('</head>',$value.BK.\"</head>\".BK, $result);\n }\n foreach($this->Return_JS() as $value){\n $result = str_replace('</head>',$value.BK.\"</head>\".BK, $result);\n } \n $result = ($this->head_scr=='' ? $result : str_replace('</head>','<script type=\"text/javascript\">'.$this->head_scr.BK.\"</script>\".BK.\"</head>\".BK, $result));\n $result = ($this->body_doc=='' ? $result : str_replace('</body>',$this->body_doc.BK.\"</body>\".BK, $result));\n print $result;\n }", "title": "" }, { "docid": "5c8bf3a0d59dac3b73c63054ce0f1bdb", "score": "0.61515796", "text": "function tdlReadTemplate($filepath) \r\n{\r\n $templatecontent = file_get_contents($filepath);\r\n\r\n $designrelpath = Ef_Config::get('f_design_relpath'); \r\n $baserelpath = Ef_Config::get('f_base_relpath');\r\n \r\n $newcontent = str_replace('%designrelpath%', $designrelpath, $templatecontent);\r\n $newcontent = str_replace('%baserelpath%', $baserelpath, $newcontent); \r\n return $newcontent;\t\t\r\n\r\n}", "title": "" }, { "docid": "765b8b4782adee40c0ec4b112469431c", "score": "0.6150475", "text": "protected function generateViewFile($sourceFile,$viewFile)\n\t{\n\t\tstatic $regexRules=array(\n\t\t\t'<%=?\\s*(.*?)\\s*%>',\t\t// PHP statements or expressions\n\t\t\t'<\\/?(com|cache|clip):([\\w\\.]+)\\s*((?:\\s*\\w+\\s*=\\s*\\'.*?(?<!\\\\\\\\)\\'|\\s*\\w+\\s*=\\s*\".*?(?<!\\\\\\\\)\"|\\s*\\w+\\s*=\\s*\\{.*?\\})*)\\s*\\/?>', // component tags\n\t\t\t'<!---.*?--->',\t// template comments\n\t\t);\n\t\t$this->_sourceFile=$sourceFile;\n\t\t$this->_input=file_get_contents($sourceFile);\n\t\t$n=preg_match_all('/'.implode('|',$regexRules).'/msS',$this->_input,$matches,PREG_SET_ORDER|PREG_OFFSET_CAPTURE);\n\t\t$textStart=0;\n $this->_output=\"<?php /* source file: $sourceFile */ ?>\\n\";\n\t\tfor($i=0;$i<$n;++$i)\n\t\t{\n\t\t\t$match=&$matches[$i];\n\t\t\t$str=$match[0][0];\n\t\t\t$matchStart=$match[0][1];\n\t\t\t$matchEnd=$matchStart+strlen($str)-1;\n\n\t\t\tif($matchStart>$textStart)\n\t\t\t\t$this->_output.=substr($this->_input,$textStart,$matchStart-$textStart);\n\t\t\t$textStart=$matchEnd+1;\n\n\t\t\tif(strpos($str,'<com:')===0)\t// opening component tag\n\t\t\t{\n\t\t\t\t$type=$match[3][0];\n\t\t\t\tif($str[strlen($str)-2]!=='/') // open tag\n\t\t\t\t\t$this->_output.=$this->processBeginWidget($type,$match[4][0],$match[2][1]);\n\t\t\t\telse\n\t\t\t\t\t$this->_output.=$this->processWidget($type,$match[4][0],$match[2][1]);\n\t\t\t}\n\t\t\telseif(strpos($str,'</com:')===0)\t// closing component tag\n\t\t\t\t$this->_output.=$this->processEndWidget($match[3][0],$match[2][1]);\n\t\t\telseif(strpos($str,'<cache:')===0)\t// opening cache tag\n\t\t\t{\n\t\t\t\t$id=$match[3][0];\n\t\t\t\tif($str[strlen($str)-2]!=='/') // open tag\n\t\t\t\t\t$this->_output.=$this->processBeginCache($id,$match[4][0],$match[2][1]);\n\t\t\t\telse\n\t\t\t\t\t$this->_output.=$this->processCache($id,$match[4][0],$match[2][1]);\n\t\t\t}\n\t\t\telseif(strpos($str,'</cache:')===0)\t// closing cache tag\n\t\t\t\t$this->_output.=$this->processEndCache($match[3][0],$match[2][1]);\n\t\t\telseif(strpos($str,'<clip:')===0)\t// opening clip tag\n\t\t\t{\n\t\t\t\t$id=$match[3][0];\n\t\t\t\tif($str[strlen($str)-2]!=='/') // open tag\n\t\t\t\t\t$this->_output.=$this->processBeginClip($id,$match[4][0],$match[2][1]);\n\t\t\t\telse\n\t\t\t\t\t$this->_output.=$this->processClip($id,$match[4][0],$match[2][1]);\n\t\t\t}\n\t\t\telseif(strpos($str,'</clip:')===0)\t// closing clip tag\n\t\t\t\t$this->_output.=$this->processEndClip($match[3][0],$match[2][1]);\n\t\t\telseif(strpos($str,'<%=')===0)\t// expression\n\t\t\t\t$this->_output.=$this->processExpression($match[1][0],$match[1][1]);\n\t\t\telseif(strpos($str,'<%')===0)\t// statement\n\t\t\t\t$this->_output.=$this->processStatement($match[1][0],$match[1][1]);\n\t\t}\n\t\tif($textStart<strlen($this->_input))\n\t\t\t$this->_output.=substr($this->_input,$textStart);\n\n\t\tfile_put_contents($viewFile,$this->_output);\n\t}", "title": "" }, { "docid": "c29cc5f51d29b1faaf06af2154cac4b6", "score": "0.61481535", "text": "protected function generateViewFile($sourceFile,$viewFile)\n\t{\n\t\tstatic $regexRules=array(\n\t\t\t'<%=?\\s*(.*?)\\s*%>',\t\t// PHP statements or expressions\n\t\t\t'<\\/?(com|cache|clip):([\\w\\.]+)\\s*((?:\\s*\\w+\\s*=\\s*\\'.*?(?<!\\\\\\\\)\\'|\\s*\\w+\\s*=\\s*\".*?(?<!\\\\\\\\)\"|\\s*\\w+\\s*=\\s*\\{.*?\\})*)\\s*\\/?>', // component tags\n\t\t\t'<!---.*?--->',\t// template comments\n\t\t);\n\t\t$this->_sourceFile=$sourceFile;\n\t\t$this->_input=file_get_contents($sourceFile);\n\t\t$n=preg_match_all('/'.implode('|',$regexRules).'/msS',$this->_input,$matches,PREG_SET_ORDER|PREG_OFFSET_CAPTURE);\n\t\t$textStart=0;\n\t\t$this->_output=\"<?php /* source file: $sourceFile */ ?>\\n\";\n\t\tfor($i=0;$i<$n;++$i)\n\t\t{\n\t\t\t$match=&$matches[$i];\n\t\t\t$str=$match[0][0];\n\t\t\t$matchStart=$match[0][1];\n\t\t\t$matchEnd=$matchStart+strlen($str)-1;\n\n\t\t\tif($matchStart>$textStart)\n\t\t\t\t$this->_output.=substr($this->_input,$textStart,$matchStart-$textStart);\n\t\t\t$textStart=$matchEnd+1;\n\n\t\t\tif(strpos($str,'<com:')===0)\t// opening component tag\n\t\t\t{\n\t\t\t\t$type=$match[3][0];\n\t\t\t\tif($str[strlen($str)-2]!=='/') // open tag\n\t\t\t\t\t$this->_output.=$this->processBeginWidget($type,$match[4][0],$match[2][1]);\n\t\t\t\telse\n\t\t\t\t\t$this->_output.=$this->processWidget($type,$match[4][0],$match[2][1]);\n\t\t\t}\n\t\t\telseif(strpos($str,'</com:')===0)\t// closing component tag\n\t\t\t\t$this->_output.=$this->processEndWidget($match[3][0],$match[2][1]);\n\t\t\telseif(strpos($str,'<cache:')===0)\t// opening cache tag\n\t\t\t{\n\t\t\t\t$id=$match[3][0];\n\t\t\t\tif($str[strlen($str)-2]!=='/') // open tag\n\t\t\t\t\t$this->_output.=$this->processBeginCache($id,$match[4][0],$match[2][1]);\n\t\t\t\telse\n\t\t\t\t\t$this->_output.=$this->processCache($id,$match[4][0],$match[2][1]);\n\t\t\t}\n\t\t\telseif(strpos($str,'</cache:')===0)\t// closing cache tag\n\t\t\t\t$this->_output.=$this->processEndCache($match[3][0],$match[2][1]);\n\t\t\telseif(strpos($str,'<clip:')===0)\t// opening clip tag\n\t\t\t{\n\t\t\t\t$id=$match[3][0];\n\t\t\t\tif($str[strlen($str)-2]!=='/') // open tag\n\t\t\t\t\t$this->_output.=$this->processBeginClip($id,$match[4][0],$match[2][1]);\n\t\t\t\telse\n\t\t\t\t\t$this->_output.=$this->processClip($id,$match[4][0],$match[2][1]);\n\t\t\t}\n\t\t\telseif(strpos($str,'</clip:')===0)\t// closing clip tag\n\t\t\t\t$this->_output.=$this->processEndClip($match[3][0],$match[2][1]);\n\t\t\telseif(strpos($str,'<%=')===0)\t// expression\n\t\t\t\t$this->_output.=$this->processExpression($match[1][0],$match[1][1]);\n\t\t\telseif(strpos($str,'<%')===0)\t// statement\n\t\t\t\t$this->_output.=$this->processStatement($match[1][0],$match[1][1]);\n\t\t}\n\t\tif($textStart<strlen($this->_input))\n\t\t\t$this->_output.=substr($this->_input,$textStart);\n\n\t\tfile_put_contents($viewFile,$this->_output);\n\t}", "title": "" }, { "docid": "b2c32456f7f5cb090de84c5b75b5aebe", "score": "0.6129938", "text": "function rex_generateTemplate($template_id)\n{\n global $REX;\n\n $sql = rex_sql::factory();\n $qry = 'SELECT * FROM ' . $REX['TABLE_PREFIX'] . 'template WHERE id = ' . $template_id;\n $sql->setQuery($qry);\n\n if ($sql->getRows() == 1) {\n $templatesDir = rex_template::getTemplatesDir();\n $templateFile = rex_template::getFilePath($template_id);\n\n $content = $sql->getValue('content');\n foreach ($REX['VARIABLES'] as $var) {\n $content = $var->getTemplate($content);\n }\n if (rex_file::put($templateFile, $content) !== false) {\n return true;\n } else {\n trigger_error('Unable to generate template ' . $template_id . '!', E_USER_ERROR);\n\n if (!is_writable()) {\n trigger_error('directory \"' . $templatesDir . '\" is not writable!', E_USER_ERROR);\n }\n }\n } else {\n trigger_error('Template with id \"' . $template_id . '\" does not exist!', E_USER_ERROR);\n }\n\n return false;\n}", "title": "" }, { "docid": "45a265f6505da53b06543076caeca875", "score": "0.61280596", "text": "protected function getTemplateFileName()\n {\n return __FILE__;\n }", "title": "" }, { "docid": "6c41b6026474ef7a01adcc42dde78150", "score": "0.6123302", "text": "function compile_template_file($filename, $resolve_path = true)\r\n{\r\n\tglobal $tag_dictionary;\n\t\n\tif($resolve_path)\n\t{\r\n\t\tif(!$sourcefile = resolve_template_source_file_name($filename))\n\t\t\terror('template file not found', \n\t\t\t\t\t\t__FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \n\t\t\t\t\t\tarray('file' => $filename));\n\t}\n\telse\n\t\t$sourcefile = $filename;\n\t\t\r\n\t$destfile = resolve_template_compiled_file_name($sourcefile, TMPL_INCLUDE);\r\n\t\r\n\tif (empty($sourcefile))\r\n\t{\r\n\t\terror('MISSINGFILE2', __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, array('srcfile' => $filename));\r\n\t} \r\n\r\n\t$code =& new codewriter();\r\n\t$code->set_function_prefix(md5($destfile));\r\n\r\n\t$tree =& new root_compiler_component();\r\n\t$tree->source_file = $sourcefile;\r\n\r\n\t$sfp =& new source_file_parser($sourcefile, $tag_dictionary);\r\n\t$sfp->parse($tree);\r\n\t\r\n\t$tree->prepare();\r\n\r\n\t$render_function = $code->begin_function('(&$dataspace)');\r\n\t$tree->generate($code);\r\n\t$code->end_function();\r\n\r\n\t$construct_function = $code->begin_function('(&$dataspace)');\r\n\t$tree->generate_constructor($code);\r\n\t$code->end_function();\r\n\r\n\t$code->write_php('$GLOBALS[\\'template_render\\'][$this->codefile] = \\'' . $render_function . '\\';');\r\n\t$code->write_php('$GLOBALS[\\'template_construct\\'][$this->codefile] = \\'' . $construct_function . '\\';');\r\n\r\n\twrite_template_file($destfile, $code->get_code());\r\n}", "title": "" }, { "docid": "779d29c1aa2c1f197505c7fa70fd1475", "score": "0.61227715", "text": "public function template() {\n\n if (is_array($this -> data)) {\n extract($this -> data);\n }\n\n if (file_exists($this -> themeDir . '/' . $this -> template)) {\n include ($this -> themeDir . '/' . $this -> template);\n }\n\n }", "title": "" }, { "docid": "54631fe97a87315ea71c2add0e4128fe", "score": "0.61196554", "text": "function generate ( $contentView, $templateView, $data = null )\n {\n include $templateView;\n }", "title": "" }, { "docid": "6d7b77684967a1f597c4c68c200fb707", "score": "0.6107755", "text": "public function getTemplateFile() {\n return 'source/update.tpl';\n }", "title": "" }, { "docid": "6553ee5b8b517902e851ec1b17879902", "score": "0.61025506", "text": "public function render(){\n \t$this->prepareModules();\n \t$this->prepareSources();\n \t$this->prepareRenderer();\n \t\n \t// get the template and replace the strings\n $template = file_get_contents($this->templateFile);\n \n $template = $this->replaceMarkup($template);\n $template = $this->addIncludes($template);\n $template = str_replace('{title}', $this->title, $template);\n return $template;\n }", "title": "" }, { "docid": "5d19ee9abdc8c3ffad1d6661a2dd0933", "score": "0.6091811", "text": "public function intendedTemplateFile() {\n return KIRBY_SITE_ROOT_TEMPLATES . DS . $this->intendedTemplate() . '.php';\n }", "title": "" }, { "docid": "3ba7be569dff6f96d199b5d87fd9874b", "score": "0.607651", "text": "public function setTemplateFile($fname) {\n if (!file_exists($fname)) {\n throw new AutoloadBuilderException(\"Template '$fname' not found.\", AutoloadBuilderException::TemplateNotFound);\n }\n $this->template = file_get_contents($fname);\n }", "title": "" }, { "docid": "9689666c34b5da6db589429e439aefdb", "score": "0.6067684", "text": "public function addTemplate($n)\r\n\t{\r\n\t\t$fh = fopen($n,'r');\r\n\t\t$templateContent = fread($fh,filesize($n));\r\n\t\tfclose($fh);\r\n\r\n\t\t// the following makes a big assumption that the original template file name contains no quotes\r\n\t\t$startQ = strpos($templateContent,\"\\\"\")+1;\r\n\t\t$endQ = strpos($templateContent,\"\\\"\",$startQ);\r\n\t\t$name = substr($templateContent,$startQ,$endQ-$startQ);\r\n\t\t$tJSON = json_decode(substr($templateContent,$endQ+2,strlen($templateContent)-($endQ+4)),true);\r\n\r\n\t\t$this->templates[$name] = $tJSON;\r\n\t}", "title": "" }, { "docid": "ead8db7cd455a0e1236c90ecd9bf72ed", "score": "0.6063846", "text": "function use_template($template){\n $template_doc = sprintf(\"views/%s.php\", $template);\n return $template_doc;\n}", "title": "" }, { "docid": "3601c0d4c5e785e904e8e293362a01c2", "score": "0.60577446", "text": "public function template(string $filePath, string $char = 'UTF-8')\r\n {\r\n static $template;\r\n $template = $template ?? new \\X\\Util\\Template();\r\n self::html($template->load($filePath, $this->data));\r\n }", "title": "" }, { "docid": "c550287e3868a7edd7ddd5f1987dc9d8", "score": "0.6057423", "text": "public function load_template() {\n $file = $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n $exists = file_exists($file);\n if ($exists) {\n ob_start();\n require($file);\n $output = ob_get_contents();\n ob_end_clean();\n return $output;\n } else {\n throw new InvalidArgumentException('could not find template');\n }\n }", "title": "" }, { "docid": "59c1301acd9376d8a860d9ce92925293", "score": "0.6046372", "text": "public function loadTemplate(){ \n\t\t$tpl = $this->template; \n\t\t$file = $this->path . DIRECTORY_SEPARATOR . $tpl . '.php'; \n\t\t$exists = file_exists($file); \n\n\t\tif ($exists){ \n\t \n\t\t\t//Buffer output (you can even stack those)\n\t\t\tob_start(); \n \n \t\t\tinclude $file; \n\t\t\t$output = ob_get_contents(); \n\n\t\t\tob_end_clean(); \n \n\t\t\treturn $output; \n\t\t} \n\t\telse { \n\t\t\tdie('Template file does not exist!');\n\t\t} \n\t}", "title": "" }, { "docid": "14edb8069b08593dc715fda93d09585e", "score": "0.6033799", "text": "protected function generateViewFile( $sourceFile, $viewFile ) {\n\t\t// set smarty settings\n\t\t$this->setSmartySettings();\n\t\t\n\t\treturn $this->_smarty->fetch($sourceFile);\n }", "title": "" }, { "docid": "c1e8a0570be375976abc975d6bb75c4c", "score": "0.6012368", "text": "public function render_template($file) {\n\t\t$this->custom_template_partial = $file;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "727fa3fce09f001b6c91f8279b918525", "score": "0.6011635", "text": "function run(){\r\n include config('template_path').'/template.php';\r\n}", "title": "" }, { "docid": "92a5a08959d4bade3a672b3ed01d2f5f", "score": "0.601113", "text": "public static function make($file)\n {\n\n }", "title": "" }, { "docid": "2f628019120f72750992f05e8ec31de7", "score": "0.6005207", "text": "protected function loadTemplate($file = '') {\r\n if (!is_file($file)) { return ''; }\r\n \r\n try {\r\n ob_start();\r\n include $file;\r\n return ob_get_clean();\r\n } catch (Exception $e) {\r\n throw new InvalidArgumentException('An error occured while processing the requested page.', 0,\r\n new Exception('Unable to load indicated template: ' . $file . '.', 0, $e));\r\n }\r\n }", "title": "" }, { "docid": "b1ae4b5e0f3dcdba1490ffea13408644", "score": "0.60010225", "text": "public function parse($file = null) {\n if (!$file) {\n \t$file = $this->_file;\n }\n if (!file_exists(\"{$this->_templateDir}/$file\")) {\n \techo \"<b>Template Error:</b> Template file not found, or template directory not set {$this->_templateDir}/$file\";\n \texit;\n }\n $file = \"{$this->_templateDir}/$file\";\n\n\t\t// check to see if the variables have been set\n\t\t$this->_checkForInitializedVars();\n\t\t\n extract($this->_vars); // Extract the _vars to local namespace\n ob_start(); // Start output buffering\n if (!empty($this->_plugins)) {\t// plugins added to the template for processing\n \tforeach ($this->_plugins as $fnc=>$val) {\t// Include the functions specified by the plugin\n \t\t$fnc = \"{$this->_pluginsDir}/$fnc\";\n \t\tinclude_once ($fnc);\n \t}\n }\n include($file); // Include the file\n $this->_xhtml = ob_get_contents(); // Get the contents of the buffer\n ob_end_clean(); // End buffering and discard\n }", "title": "" }, { "docid": "be12b0f836f7f987514bc34fc608ffb1", "score": "0.5994826", "text": "function readTemplate($filename) {\n\tglobal $temp_start, $temp_stop;\n\t$str = file_get_contents($filename,true);\n\t\n\t//Revove the file start, stop and control characters\n\t$str = str_replace($temp_start, \"\", $str);\n\t$str = str_replace($temp_stop, \"\", $str);\n\t$str = preg_replace( '/[^[:print:]]/', '',$str);\n\t$str = stripslashes($str);\n\t\n\t//Decode the object\n\t$json = json_decode($str);\n\t\n\t//Return the template\n\treturn $json;\n}", "title": "" }, { "docid": "c1dc5cefcc31d83d13039db34fbbbe49", "score": "0.5990453", "text": "function _template($template){\n \t $xhtml = '';\n if ( ! empty($template) && $template != '_' ) {\n \t $file = dirname(realpath(__FILE__)) . '/PraizedXHTML/' . $template . '.php';\n \t if ( file_exists($file) )\n \t require($file);\n \t }\n \t return $xhtml;\n \t}", "title": "" }, { "docid": "71b0aa5ece5a73a87f45c5568a8b6e73", "score": "0.5982705", "text": "private static function renderTemplate(string $__file__, array $data): string\n {\n ob_start();\n extract($data);\n include $__file__;\n return ob_get_clean();\n }", "title": "" }, { "docid": "89476e630e7043f0b576cec2f5221f01", "score": "0.59809434", "text": "public function template()\n\t{\n\t}", "title": "" }, { "docid": "1ea6a254825256adf2d7681dcc1d3f67", "score": "0.5977522", "text": "protected function populateTemplate()\n {\n $content = view(\\Config::get('pdfwriter')['pdf_blade_files'] . '.' . $this->template, ['record'=> $this->data])->render();\n\n return $content;\n }", "title": "" }, { "docid": "c8b158f3f358b70b23d7f9f6ec76a373", "score": "0.5975654", "text": "function template(){\n\t\tset_time_limit(0);\n\t\t\n\t\t$exporter = new DatabaseExporter($_SESSION['dbi']);\n\t\t$exporter->createTemplate();\n\t\t\n\t\t$_SESSION['db_filename'] = \"Chemical_Database_Template.xlsx\";\n\t\trequire(TEMPLATES_PATH.\"administration_download.php\");\n\t}", "title": "" }, { "docid": "c4c66d8e92927ea249beb3bda2453ec0", "score": "0.59725994", "text": "protected function get_template() {\n\t\treturn 'seeder.mustache';\n\t}", "title": "" }, { "docid": "c7ca9c7ba7dbfc05a580700f3f8e3a2a", "score": "0.59703344", "text": "public function getTemplate() {\n return $this->getFile();\n }", "title": "" }, { "docid": "146ba7bcce2dc5708cca3b733ff5dd6d", "score": "0.5969396", "text": "function callTemplate($file, $array = array()){\n $mustache_options = array('extension' => EXT_MU_TPL);\n $m = new Mustache_Engine(array(\n 'loader' => new Mustache_Loader_FilesystemLoader(FOLD_TEMPLATE, $mustache_options),\n ));\n\n\t$user = new user();\n\t$c = $user->userConnected();\n\t$connected = false;\n\tif($c['id'] > 0){\n\t\t$connected = true;\n\t}\n\t\n\t$listMuseeFavoris = 0;\n\t$pseudo = \"invité\";\n\tif($connected){\n\t\t$musee = new musee();\n\t\t$listMuseeFavoris = sizeof($musee->museeFavoris($c['id']));\n\t\t$pseudo = $c['nom'];\n\t}\n\telse{\n\n\t}\n\t\n $array = array_merge($array, array('URL' => URL_PORTAL, 'PSEUDO_HEADER' => $pseudo, 'NB_MUSEE_HEADER_LIKE' => $listMuseeFavoris, 'USER_CONNECT' => $connected));\n\n echo $m->render($file, $array);\n}", "title": "" }, { "docid": "6115c1e7fc75f2eea63ec89c0178e3d6", "score": "0.5969166", "text": "protected function getTemplate($tmplFile=NULL){\r\n //Since widgets have no subviews, the template simply echoes the array of html content strings.\r\n $this->template = new Template($this->html,$tmplFile);\r\n }", "title": "" }, { "docid": "7d9c584b4f500f2f70d09ca5c082602b", "score": "0.59515005", "text": "function produceRenderableFromFile($path, Context $context) {\n if (contains($path, '..')) throw new SecurityException(\"No .. allowed\");\n if (endsWith($path, '.php')) {\n $iface = 'SpareParts\\\\Template\\\\Renderable';\n $absPath = $context->baseDir . '/' . $path;\n if (!is_readable($absPath)) throw new NoSuchTemplate($path);\n require_once $absPath;\n $all = Reflection\\getClassesDefinedInFile($absPath);\n $impls = array_filter($all,\n function($cls) use($iface) { return Reflection\\implementsInterface($cls, $iface); });\n if (count($impls) == 0) {\n throw new InvalidArgumentException(\"No implementations of $iface are \" .\n \"defined in file '{$path}'\");\n } else if (count($impls) > 1) {\n throw new InvalidArgumentException(\"Multpile implementations of $iface are defined \" .\n \"in file '{$path}''\");\n } else {\n return new ExpandedTemplate($absPath, current($impls));\n }\n } else if (endsWith($path, '.diet-php')) {\n return compileFile($path, $context);\n } else {\n throw new InvalidArgumentException(\n \"Given \\$path did not have extension `.php` nor `.diet-php`\");\n }\n}", "title": "" }, { "docid": "6cb23ec833bb98dcda6e3897506d176c", "score": "0.593225", "text": "function _loadTemplate($directory, $filename)\n\t{\n\t\tglobal $mainframe, $Itemid, $option;\n\n\t\tif ($mainframe->getCfg('legacy'))\n\t\t{\n\t\t\tglobal $task, $_VERSION, $my, $cur_template, $database, $acl;\n\n\t\t\t//For backwards compatibility extract the config vars as globals\n\t\t\t$registry =& JFactory::getConfig();\n\t\t\tforeach (get_object_vars($registry->toObject()) as $k => $v) {\n\t\t\t\t$name = 'mosConfig_'.$k;\n\t\t\t\t$$name = $v;\n\t\t\t}\n\t\t}\n\n\t\t$contents = '';\n\n\t\t//Check to see if we have a valid template file\n\t\tif ( file_exists( $directory.DS.$filename ) )\n\t\t{\n\t\t\t//store the file path\n\t\t\t$this->_file = $directory.DS.$filename;\n\n\t\t\t//get the file content\n\t\t\tob_start();\n\t\t\t?><jdoc:tmpl name=\"document\" autoclear=\"yes\" unusedvars=\"ignore\"><?php\n\t\t\t\trequire_once($directory.DS.$filename );\n\t\t\t?></jdoc:tmpl><?php\n\t\t\t$contents = ob_get_contents();\n\t\t\tob_end_clean();\n\t\t}\n\n\t\t// Add the option variable to the template\n\t\t$this->_engine->addVar('document', 'option', $option);\n\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "5f5621981f052c41527260b4557b1872", "score": "0.5927625", "text": "function _parseTemplate($directory, $file = 'index.php')\n\t{\n\t\t$contents = $this->_loadTemplate( $directory, $file);\n\t\t$this->_engine->readTemplatesFromInput( $contents, 'String' );\n\n\t\t// Parse the template INI file if it exists for parameters and insert\n\t\t// them into the template.\n\t\tif (is_readable( $directory.DS.'params.ini' ) )\n\t\t{\n\t\t\t$content = file_get_contents($directory.DS.'params.ini');\n\t\t\t$params = new JParameter($content);\n\t\t\t$this->_engine->addVars( 'document', $params->toArray(), 'param_');\n\t\t}\n\n\t\t// Try to find a favicon by checking the template and root folder\n\t\t$path = $directory . DS;\n\t\t$dirs = array( $path, JPATH_BASE . DS );\n\t\tforeach ($dirs as $dir )\n\t\t{\n\t\t\t$icon = $dir . 'favicon.ico';\n\t\t\tif (file_exists( $icon ))\n\t\t\t{\n\t\t\t\t$path = str_replace( JPATH_BASE . DS, '', $dir );\n\t\t\t\t$path = str_replace( '\\\\', '/', $path );\n\t\t\t\t$this->addFavicon( JURI::base() . $path . 'favicon.ico' );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a10f7eb0e3c6b76f310c79ecd1c9d068", "score": "0.5925928", "text": "public function getFile(string $file): string {\n return $this->core->component('file')->getFile('dashboard/template/' . $file . '.html');\n }", "title": "" }, { "docid": "6b27bb79e766986ed9e88f8ab3b038a4", "score": "0.5922772", "text": "private function renderTemplate($templateFile)\n {\n include(sprintf(\"%s/%s\", $this->getTemplateDir(), $templateFile));\n }", "title": "" }, { "docid": "cc0f6b860710a31f68f09c49efcae9c7", "score": "0.5921644", "text": "function render_template( /*$template, $variables*/)\n {\n ob_start();\n\n foreach (func_get_args()[1] as $key => $value) {\n ${$key} = $value;\n }\n\n include func_get_args()[0];\n\n return ob_get_clean();\n }", "title": "" }, { "docid": "f6f9189034dd865f1c7e9738ebe61b8a", "score": "0.59135854", "text": "public function SetTemplateFile($file)\n {\n $this->SetTemplateName( is_string($file) ? get_file_name($file) : null );\n return $this->template_file = $file;\n }", "title": "" }, { "docid": "34df573abc8121703f0d15d7053db87b", "score": "0.58997303", "text": "public function create()\r\n\t{\r\n\t\t$loader = new \\Twig\\Loader\\FilesystemLoader('src/View');\r\n\t\t\t$twig = new \\Twig\\Environment($loader);\r\n\t\t\t$template = $twig->load('create.html');\r\n\r\n\t\t\t$parametros = array();\r\n\t\t\t\r\n\t\t\t$conteudo = $template->render($parametros);\r\n\t\t\techo $conteudo;\r\n\t}", "title": "" }, { "docid": "6b63c66745994541b7003cbcc312489e", "score": "0.58974564", "text": "protected function render() {\n\n\t\t// Generate configuration files\n\t\t$view = new Template(\"Resources/Private/Template/ServerConfig/$this->fileName\");\n\n\t\tif ($this->fileName == 'conf.py') {\n\t\t\t$view->set('version', $this->extensionVersion);\n\t\t\t$view->set('extensionName', $this->extensionName);\n\t\t}\n\t\tOutput::write($view->fetch());\n\t}", "title": "" }, { "docid": "2c9e9c231be42cfa6f8a175b0d26152a", "score": "0.58945495", "text": "function includeTemplate($file,$parameter,$return=false)\r\n{\r\n\t$filename_configure\t\t=\tPATH_TEMPLATE.$file.'.php';\r\n\t\r\n\tif(@file_exists($filename_configure))\r\n\t{\r\n\t\tinclude_once $filename_configure;\r\n\t\t\r\n\t\tif($return) return $HTML;\r\n\t\t\r\n\t}else{\r\n\t\techo 'Arquivo includeTemplate <b>'.$filename_configure.'</b> Não encontrado';\r\n\t\texit();\r\n\t}\r\n\t \r\n}", "title": "" } ]
9e19e25d197846ecf5d516cd2a3828ed
Lists all Band entities.
[ { "docid": "4b70eee4672525f2b3993a9ad37ee6fa", "score": "0.0", "text": "public function accueilAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $template = ($this->container->get('request')->isXmlHttpRequest())?\"accueil_content\":\"accueil\";\n \n $bands = $em->getRepository('CdsBandBundle:Band')->findNewBands();\n $tags = $em->getRepository('CdsBandBundle:Tag')->getTags();\n \n return $this->render('CdsBandBundle:Band:'.$template.'.html.twig', array(\n 'bands' => $bands,\n \t\t'tags' => $tags,\n \t\t\t'select' => 'new'\n ));\n }", "title": "" } ]
[ { "docid": "69c11f66434e4f9a641d4ab42a3dfb4c", "score": "0.62562525", "text": "public function list(){\n $brands = $this->model->latest()->get();\n\n return BrandResource::collection($brands);\n }", "title": "" }, { "docid": "3d1cad257a4ec0a0bb5ce40bde35cf18", "score": "0.617648", "text": "public function index()\n {\n return new BranchResourceCollection(Brand::all());\n }", "title": "" }, { "docid": "0ddf245bb0c4a52923f5c0e2973925f8", "score": "0.6112612", "text": "function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = BranchPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }", "title": "" }, { "docid": "bb8a316f9161743da2f398ed262e4218", "score": "0.60574484", "text": "public function index()\n {\n \n $brands = Brand::all();\n\n return $brands;\n }", "title": "" }, { "docid": "7fdaf68dd5275543eddb5bbe9ee7ecd5", "score": "0.60525715", "text": "public function index()\n {\n $brands = Brand::filter()->paginate();\n\n return BrandResource::collection($brands);\n }", "title": "" }, { "docid": "f6e5f28a4e96c1626be89c8b7b15ffe6", "score": "0.59802955", "text": "public function all()\n {\n if (!$this->isLogged()) exit;\n\n $this->oUtil->oBeranda = $this->oModel->getAll();\n\n $this->oUtil->getView('beranda');\n }", "title": "" }, { "docid": "65032fa8070b856641f25181967314ae", "score": "0.5979455", "text": "public function all ()\n {\n return $this->entity->get(['*']);\n }", "title": "" }, { "docid": "0fd8a94f2ccfaf79d6570d91f2a3ea35", "score": "0.5905329", "text": "public function index()\n {\n $bands = Band::all();\n\n return view('musician-list', compact('bands'));\n }", "title": "" }, { "docid": "099298408f2e818a3ac01a0e313e0f4d", "score": "0.58910626", "text": "public function getAll(Board $board);", "title": "" }, { "docid": "18935d7d157fc3fc4943b7ddd2a4476d", "score": "0.58905053", "text": "public function all()\n {\n return $this->entity->get();\n }", "title": "" }, { "docid": "6ce52e49bc589a8eb0492ca9337403b7", "score": "0.58816606", "text": "public function fetchBankLists()\n {\n $endpoint = 'disbursements/banks';\n $headers = ['Content-Type' => 'application/json'];\n $payloads = [];\n\n return $this->httpClient->get($endpoint, $payloads, $headers);\n }", "title": "" }, { "docid": "5098c07fdd84e7f27c87ef9b4bb8139b", "score": "0.5863867", "text": "static public function show_all(){\n $bands = DB::table('bands')->select(DB::raw('bands.*, GROUP_CONCAT(DISTINCT rockers.alias SEPARATOR \", \") AS members'))\n ->leftJoin('memberships', 'bands.id', '=', 'memberships.band_id')\n ->leftJoin('rockers', 'rockers.id', '=', 'memberships.rocker_id')\n ->groupBy('bands.id')\n ->get();\n return $bands;\n }", "title": "" }, { "docid": "b94ef3505da39cb4130532d834e3be02", "score": "0.583241", "text": "public function listAll(){\n return $this->findAll();\n }", "title": "" }, { "docid": "8a2543353e1ee2dae88a1cd7df9968d3", "score": "0.57920593", "text": "public function index()\n {\n $companybankdetails = CompanyBankDetail::active()->latest()->get();\n \n return CompanyBankDetailResource::collection($companybankdetails);\n }", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.5790694", "text": "public function getAll();", "title": "" }, { "docid": "85b0f70c27659834283b21c560d540a1", "score": "0.5771103", "text": "public function index()\n {\n return Auction::all();\n }", "title": "" }, { "docid": "b200412396708d868131f16f20164d93", "score": "0.5767357", "text": "public function getAll()\n\t{\n\t\t//...\n\t}", "title": "" }, { "docid": "cce39a55c6a123effe37166af13ce3fc", "score": "0.57614475", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "cce39a55c6a123effe37166af13ce3fc", "score": "0.57614475", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "b354c0d08c043f433a4e475f48f0e10a", "score": "0.5760689", "text": "public function getAll() {}", "title": "" }, { "docid": "65c48a6e8db82cb7c37a7f4da10f51e9", "score": "0.5746454", "text": "public function listing()\n {\n return $this->doctrineRepository->findAll();\n }", "title": "" }, { "docid": "a246f47d3a7aa05879068da09277f196", "score": "0.5745995", "text": "public function getAll(){}", "title": "" }, { "docid": "91374f7c57c1e40ea55268160dd48145", "score": "0.571861", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('PopolitineroDefaultBundle:Hub')->findAll();\n $barycenter = $em->getRepository('PopolitineroDefaultBundle:Hub')->getBarycenter();\n return array('entities' => $entities, 'barycenter' => $barycenter);\n }", "title": "" }, { "docid": "e9c22f746a72261376dd3e1918fbb846", "score": "0.57153", "text": "public static function getAll() { }", "title": "" }, { "docid": "3689874541ed4bbc5858dc8f6695aed0", "score": "0.5696239", "text": "public function index()\n {\n $barang = Barang::all();\n\n return BarangResource::collection($barang);\n }", "title": "" }, { "docid": "024ccd64c4d6dcfe41d25eeaa57631e6", "score": "0.569433", "text": "public function getAll()\n {\n return $this->getRepository()->findAll();\n }", "title": "" }, { "docid": "b3002ffdca77085e05c201d4c8cb1e99", "score": "0.56931674", "text": "public function showList()\n\t{\n\t\t$query_params = $this->getQueryParams();\n\n\t\t// Get all biblio entities that match our query string params\n\t\t$query = new EntityFieldQuery();\n\t\t$query->entityCondition('entity_type', 'biblio');\n\t\tforeach ($query_params as $field => $value) {\n\t\t\t$query->fieldCondition($field, 'value', $value, 'like');\n\t\t}\n\n\t\t$result = reset($query->execute());\n\n\t\t// Create an array of IDs from the result\n\t\tforeach ($result as $entity_data) {\n\t\t\t$this->data['document_ids'][] = $entity_data->bid;\n\t\t}\n\n\t\t$this->outputJSON();\n\t}", "title": "" }, { "docid": "09c33cb9ef102801ed1ed9a536b22405", "score": "0.5679326", "text": "public function bands()\n {\n return $this->hasMany('App\\Http\\Models\\Band','category_id');\n }", "title": "" }, { "docid": "9e8c57c6c1654c44793ad7fa1d3db181", "score": "0.56636274", "text": "public function actionIndex()\n {\n $searchModel = new BranchesSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.5658686", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.5658686", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.5658686", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.5658686", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "1199bde9fefb5f77410fe322648d5f41", "score": "0.5657204", "text": "public function getAll()\n {\n return DB::table('branches')->get()->all();\n }", "title": "" }, { "docid": "e274c7788f27bab014f7efc79a68c4a7", "score": "0.5648948", "text": "public function index()\n {\n $brand = Brand::orderBy('id', 'DESC')->get();\n return BrandResource::collection($brand);\n }", "title": "" }, { "docid": "4b7e6274be9b20a14e2065b2c1b45584", "score": "0.56331956", "text": "public function getAll()\n {\n $objects = $this->getRepository()->findAll();\n return Api::render($objects, $this->getDefaultListSerializerGroup());\n }", "title": "" }, { "docid": "35af5924df98efe85c30fb282de3d6cf", "score": "0.5626133", "text": "public function showAll()\n {\n return $this->repo->getAll();\n }", "title": "" }, { "docid": "74c1d487cff8a74f1193c2f472d06e57", "score": "0.56150854", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Blurb::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68ea350c6b039c5015fa5bee831a7f9d", "score": "0.5610499", "text": "public function all()\n {\n return BedType::all();\n }", "title": "" }, { "docid": "828fa63f223e081c2e33ac1cee981572", "score": "0.5609098", "text": "public function index()\n {\n $entity = Entity::all();\n return EntityResource::collection($entity);\n }", "title": "" }, { "docid": "62c2626ac46a57ebea020fc827430810", "score": "0.56087655", "text": "public function getAll()\n {\n return $this->getRepository()->retrieveAll();\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.5588169", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.5588169", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.5588169", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.5588169", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.5588169", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.5588169", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "d77caf78f77461106a807308f6648393", "score": "0.5587775", "text": "public function index()\n {\n $invbrands = InvBrand::getAllInvBrand();\n return InvBrandResource::collection($invbrands);\n\n }", "title": "" }, { "docid": "aa1e9e42cf55403b386c15c165567483", "score": "0.558138", "text": "public static function getAll()\n {\n }", "title": "" }, { "docid": "71c29457adfbab42caa91bf28a7028b1", "score": "0.55745304", "text": "public function listAll() {\n\t\treturn $this->staticListRepository->findAll();\n\t}", "title": "" }, { "docid": "6af5e74c5f502668eb6909b664053f20", "score": "0.5569345", "text": "public function getAll()\n {\n $homeworldsCollection = DB::table($this->tableName)->get();\n $homeworlds = $homeworldsCollection->map(function ($item) {\n return new HomeworldEntity(get_object_vars($item));\n });\n return $homeworlds->toArray();\n }", "title": "" }, { "docid": "4c8b7b382bb36303b08758bdc301dc06", "score": "0.55528903", "text": "public function listBrands()\n {\n $brands = Brand::all();\n\n return $brands;\n }", "title": "" }, { "docid": "ce600bd362946b9c417e7d81540ca73c", "score": "0.55504805", "text": "public function listAll() {\n\t\treturn $this->partyRepository->findAll();\n\t}", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.5547843", "text": "public static function getAll();", "title": "" }, { "docid": "fc2bad41ef2b8062527a8eddc34208d2", "score": "0.5547843", "text": "public static function getAll();", "title": "" }, { "docid": "d0d200645c6081bab486812bcf4d53b8", "score": "0.55443394", "text": "public function get_all()\n {\n }", "title": "" }, { "docid": "d0d200645c6081bab486812bcf4d53b8", "score": "0.5544304", "text": "public function get_all()\n {\n }", "title": "" }, { "docid": "5ba7c5a3725efb0b6e7226fcc8cc7e71", "score": "0.5542162", "text": "public function showAll()\n {\n return Item::all();\n }", "title": "" }, { "docid": "c742b5bcff01dcb014c9bceca42a23d6", "score": "0.5530127", "text": "public function all()\n {\n return SiteCurrency::all();\n }", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.55199146", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "d635f14290671ce196fb5a15dbfb6c9b", "score": "0.5518771", "text": "public function listNewBandsAction()\n {\n \t$em = $this->getDoctrine()->getManager(); \n \t\n \t$bands = $em->getRepository('CdsBandBundle:Band')->findNewBands();\n \t$tags = $em->getRepository('CdsBandBundle:Tag')->getTags();\n \t\n \t$template = ($this->container->get('request')->isXmlHttpRequest())?\"/List:bands\":\":accueil\";\n \treturn $this->render('CdsBandBundle:Band'.$template.'.html.twig', array(\n \t\t\t'bands' => $bands,\n \t\t\t'tags' => $tags,\n \t\t\t'select' => 'new'\n \t));\n }", "title": "" }, { "docid": "31c8590f350f6a6b7e678b7572501f66", "score": "0.55072904", "text": "public function getAllBrands()\n {\n $sentencia = $this->getDb()->prepare(\"SELECT * FROM marcas ORDER BY nombre_marca\"); // prepara la consulta\n $sentencia->execute(); // ejecuta\n $brands = $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $brands;\n }", "title": "" }, { "docid": "48a1fcb421586ab20167ea99a6023385", "score": "0.5505896", "text": "public static function getAll(){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ae97997a3c76f9f5b6046ab21c26694b", "score": "0.5484507", "text": "public function index()\n {\n return Channel::all();\n }", "title": "" }, { "docid": "2aeb343e32020cd39c3e78258c9bc29a", "score": "0.54746497", "text": "abstract public function getAll();", "title": "" }, { "docid": "31f851b4c9f2a7317aaf7f21cf4f122d", "score": "0.5460278", "text": "public function index() {\n $this->data = $this->Sample->findAllByBusinessId($this->client_id);\n }", "title": "" }, { "docid": "ef807c6bc7887ff8db943d7df13b6b3a", "score": "0.5458696", "text": "public function getAll(){\r\n\t\t$sql=\"select * from bureau\";\r\n\t\treturn $this->_db->query($sql);\r\n\t}", "title": "" }, { "docid": "f2a3b56587d6b35f60c4387d7258f67a", "score": "0.54547817", "text": "public function getAll()\n {\n return $this->_model->all();\n }", "title": "" }, { "docid": "15df0f74ded7e74b4f500110fba68eba", "score": "0.545376", "text": "public function get_all() {}", "title": "" }, { "docid": "15df0f74ded7e74b4f500110fba68eba", "score": "0.545376", "text": "public function get_all() {}", "title": "" }, { "docid": "567b81a1d255263f5b01417b42935bad", "score": "0.5449694", "text": "public function index()\n {\n $banos = Banos::all();\n\n return $banos;\n }", "title": "" }, { "docid": "d12a51e6e1641d5fc265356cb1c1e6f3", "score": "0.5448339", "text": "public function getAll()\n {\n return $this->model\n ->get();\n }", "title": "" }, { "docid": "a6e9a0ff6dad76bd426086471f5a1c9c", "score": "0.5434176", "text": "public function list_all();", "title": "" }, { "docid": "d6d74f016b7418f3eeb3f0c005f97cfb", "score": "0.54284877", "text": "public function index()\n {\n return App\\Subbreddit::all();\n }", "title": "" }, { "docid": "b045c5d4464bc7e5f4f49cc2896bd532", "score": "0.5426555", "text": "public function getAll()\n {\n return $this->boatroom_service->getAll();\n }", "title": "" }, { "docid": "e872291c5f08c878e3e1070b5b608d90", "score": "0.54249066", "text": "public function index()\n {\n return $this->repository->all();\n }", "title": "" }, { "docid": "e872291c5f08c878e3e1070b5b608d90", "score": "0.54249066", "text": "public function index()\n {\n return $this->repository->all();\n }", "title": "" }, { "docid": "2cba623e264fb22a6d0ae6ae72c0f107", "score": "0.5424846", "text": "public function branch_list(){\n\t\t$this->layout = 'panel_layout';\n\t\t$this->set('title', 'Branch List');\n\t\t$this->Branch->unBindModel(array(\n\t\t'belongsTo' => array(\n 'Organization',\n 'Region'\n ),\n\t\t'hasMany' => array(\n 'Loan'\n ),\n\t\t\t\t));\n\t\t$branch_list= $this->Branch->find('all',array('conditions'=>array('Branch.organization_id'=>$this->Auth->user('organization_id'))));\n\t\t$this->set('branch_list', $branch_list);\n\t\t//pr($branch_list); die;\n\t}", "title": "" }, { "docid": "156e0d4f28d08c204e4fcfa7e8de1db1", "score": "0.54243404", "text": "public static function get_all()\n {\n }", "title": "" }, { "docid": "c142756ed7fa67cbabfac227ff2d23d2", "score": "0.5416799", "text": "public function index()\n {\n return Models::with('Labels')->where('id', '<>', 4)->get()->toArray();\n }", "title": "" }, { "docid": "7bc3d5e09501deaf5313e6aa50d81984", "score": "0.54164356", "text": "public function getAll()\n {\n return $this->findBy([], ['created' => 'DESC']);\n }", "title": "" }, { "docid": "b52a076f3d1f97ea229090732ed12bb7", "score": "0.5414596", "text": "public function index()\n {\n $brands = Brand::all();\n\n return response([ 'brands' => PhoneShopResource::collection($brands), 'message' => 'Brands retrieved successfully'], 200);\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.54053324", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" } ]
84836277c6f6812be7aa3c5192ea620b
Method to set the value of field farmerCropId
[ { "docid": "7fc57cf8f8edac0afffb257ffebd609a", "score": "0.61630726", "text": "public function setFarmerCropId($farmerCropId)\n {\n $this->farmerCropId = $farmerCropId;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "7829c8518216b10ed7ad8df03188f16d", "score": "0.76164955", "text": "public function getFarmerCropId()\n {\n return $this->farmerCropId;\n }", "title": "" }, { "docid": "fca669fd5787cf31ff116c1f9c56ab76", "score": "0.60887873", "text": "public function setCropParams($cropParams)\n {\n $this->cropParams = $cropParams;\n }", "title": "" }, { "docid": "24c91f66ff2657b5232ca6e56473323e", "score": "0.53887165", "text": "public function set_image_crop($image_crop)\n {\n $this->image_crop = $image_crop;\n }", "title": "" }, { "docid": "6eb06923fef6eac1f671d0c87e7b2b42", "score": "0.5382372", "text": "public function setCropToMax(){\n $pathnameParts = explode(DIRECTORY_SEPARATOR,$this->fileName);\n $fileName = end($pathnameParts);\n $transformedFilePath = str_replace($fileName,'1_'.$fileName,$this->fileName);\n $cmd = $this->ffmpegPath.' -i '.$this->fileName.' -vf crop=\"'.$this->width.':'.$this->height.'\" '.$transformedFilePath;\n shell_exec($cmd);\n rename($transformedFilePath,$this->fileName);\n return $this;\n }", "title": "" }, { "docid": "b6424958a7b1dad1aa7ad5f69e83d09e", "score": "0.53488386", "text": "function setImageID( $value )\r\n {\r\n $this->ImageID = $value;\r\n }", "title": "" }, { "docid": "2dfb7e4bec0b9ae0efda093c5f26f090", "score": "0.52399546", "text": "function setId($value)\n {\n $this->contract_id=$value;\n }", "title": "" }, { "docid": "0968c0c9dbf4bf401668306aa53035a5", "score": "0.51730984", "text": "public function setId_recette($id_recette)\n {\n $id_recette = (int) $id_recette;\n $this->_id_recette = $id_recette;\n }", "title": "" }, { "docid": "42d7be16729c0e8eb8a948534a005896", "score": "0.50883853", "text": "public function setAllowCrop(bool $value = true): self\r\n {\r\n $this->extras['allow_crop'] = $value;\r\n return $this;\r\n }", "title": "" }, { "docid": "8bb1874e041a2647de07b1136ba234eb", "score": "0.50735664", "text": "public function setIdVillage($idVillage)\n {\n $this->idVillage = (int)$idVillage;\n }", "title": "" }, { "docid": "f07d243767ba024fd5af6fe27f78d01b", "score": "0.5060341", "text": "public function setCardHolderId($value)\n {\n return $this->setParameter('cardHolderID', $value);\n }", "title": "" }, { "docid": "f07d243767ba024fd5af6fe27f78d01b", "score": "0.5060341", "text": "public function setCardHolderId($value)\n {\n return $this->setParameter('cardHolderID', $value);\n }", "title": "" }, { "docid": "820e51b306ed39529c1acaea8b3f2797", "score": "0.50582117", "text": "public function setCityID($value){\n\t\t$this->city_id = $value;\t\n\t}", "title": "" }, { "docid": "b841d78e9343aa2732bb59f3a9ec50dc", "score": "0.5036598", "text": "public function updateCrop(array $properties, $field_value, CropType $crop_type);", "title": "" }, { "docid": "50bfac710f184c6a0cc5963b717f2dd4", "score": "0.50168294", "text": "function setId($value){\n\t\t$this->id = $value;\n\t}", "title": "" }, { "docid": "17cdee28a54cce558f63e899c84f8cb9", "score": "0.50128746", "text": "function setId($value)\n {\n $this->detail_id=$value;\n }", "title": "" }, { "docid": "3c959e7242633efd6fc121488762efe3", "score": "0.5001081", "text": "public function setImageId($value) \n {\n $this->_fields['ImageId']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "3c959e7242633efd6fc121488762efe3", "score": "0.5001081", "text": "public function setImageId($value) \n {\n $this->_fields['ImageId']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "f82eb5e555de554718ac8f72f32c5050", "score": "0.49923337", "text": "public function setIdCarrito($idCarrito){\n $this->idCarrito = $idCarrito;\n }", "title": "" }, { "docid": "890f128fdcffcde17c38961c911af730", "score": "0.49465773", "text": "public function setCardId(string $value) { return $this->set('cardId', $value); }", "title": "" }, { "docid": "7fdd323142b343d4a741301e0ae44696", "score": "0.49253863", "text": "function setDirectorFileId($directorFileId) {\n\t\treturn $this->setData('directorFileId', $directorFileId);\n\t}", "title": "" }, { "docid": "f24a0085e42dcaadf8634fdd5b83d956", "score": "0.48981804", "text": "public function setBetterCrop($bool)\n {\n $this->betterCrop = $bool;\n return $this;\n }", "title": "" }, { "docid": "c46b884c57da6071d3e7af8d54ee4e8d", "score": "0.48777255", "text": "public function getCroppedImage(ImageCropDataModel $imageCrop);", "title": "" }, { "docid": "7b2dbe7b523c320c3bc5b9625b5c48a1", "score": "0.48707333", "text": "public function setIdPerro($IdPerro)\n\t{\n\t\t$this->IdPerro = $IdPerro;\n\t}", "title": "" }, { "docid": "9c7fe608dcede832df53676393d6c6ee", "score": "0.48441142", "text": "public function setPromoterIdAttribute(?int $value): void\n {\n if (!empty($value)) {\n $this->attributes['promoter_id'] = $value;\n } else {\n $this->attributes['promoter_id'] = null;\n }\n }", "title": "" }, { "docid": "7f5de3ce8af0cf02de0c6affb2988957", "score": "0.48162928", "text": "protected function setId($value)\n {\n $this->_id = (int)$value;\n }", "title": "" }, { "docid": "6a63662b55352061a2cfb0eb6b0d7526", "score": "0.47826824", "text": "public function setCoverAttribute($value)\n {\n $value = explode('/', $value);\n\n $this->attributes['cover'] = $value[0];\n }", "title": "" }, { "docid": "983104fa6b6967244d690ab8011ed376", "score": "0.47597846", "text": "function setSwimmerId($id)\n {\n $this->__swimmerid = $id ;\n }", "title": "" }, { "docid": "03e42fdd7cce2f4c0fc4a39899a8a1e7", "score": "0.47569624", "text": "public function setWardId($value){\n\t\t$this->wardId = $value;\n\t}", "title": "" }, { "docid": "b63c65b8093db53bd2466a311ec992ff", "score": "0.47540277", "text": "public function testSetIdCarteAppelRec() {\n\n $obj = new Banques();\n\n $obj->setIdCarteAppelRec(\"idCarteAppelRec\");\n $this->assertEquals(\"idCarteAppelRec\", $obj->getIdCarteAppelRec());\n }", "title": "" }, { "docid": "4d6f15e536dcbf0171bfabac59ae677c", "score": "0.4747089", "text": "public function setId($value)\n {\n $this->id=$value;\n }", "title": "" }, { "docid": "3c5d4bcbd1f4da86d250839a7de44dd0", "score": "0.47457904", "text": "function setSwimmerId($id)\n {\n $this->__swimmer_id = $id ;\n }", "title": "" }, { "docid": "6560ca483938930962b4cce83c2d2500", "score": "0.47396085", "text": "public function setImageId(?string $value): void {\n $this->getBackingStore()->set('imageId', $value);\n }", "title": "" }, { "docid": "ce81062308266ad1d4e87227ab48a424", "score": "0.4718188", "text": "public function setOriginId(?string $value): void {\n $this->getBackingStore()->set('originId', $value);\n }", "title": "" }, { "docid": "ddf6d04730b585c729b5cc30f69f67cd", "score": "0.47080553", "text": "public function setLibraryId() {\n\t$this->id = Model::getInstance()->getLibraryId();\n}", "title": "" }, { "docid": "0e8d939f84765d632b386ebcdd393b10", "score": "0.47063318", "text": "function setCopyedFileId($copyedFileId) {\n\t\treturn $this->setData('copyedFileId', $copyedFileId);\n\t}", "title": "" }, { "docid": "2ea776eedfd180c1a2beab4e13fe01cc", "score": "0.46959215", "text": "function setEditorFileId($editorFileId) {\n\t\treturn $this->setData('editorFileId', $editorFileId);\n\t}", "title": "" }, { "docid": "1dbf2f841e0e6bf97d85fcfaeba7c749", "score": "0.4692735", "text": "public function setIdCargo($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->id_cargo !== $v) {\n\t\t\t$this->id_cargo = $v;\n\t\t\t$this->modifiedColumns[] = SfGuardUserProfilePeer::ID_CARGO;\n\t\t}\n\n\t\tif ($this->aTsurCargos !== null && $this->aTsurCargos->getIdCargo() !== $v) {\n\t\t\t$this->aTsurCargos = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ee4c4b6024e9b0eb889d96e309694439", "score": "0.46591556", "text": "public function setId($value)\n {\n $this->id = $value;\n }", "title": "" }, { "docid": "cdb00556bee1a74a1340dc369506bb84", "score": "0.46483538", "text": "function setPictureId($picture_id = 0)\n\t{\n\t\tif ($picture_id >= 0)\n\t\t{\n\t\t\t$this->picture_or_definition_id = $picture_id;\n\t\t}\n\t}", "title": "" }, { "docid": "5132bb79e64e0a9fe9147dd662ea87e3", "score": "0.4628379", "text": "public function getFarmerId()\n {\n return $this->farmerId;\n }", "title": "" }, { "docid": "6cf48590c040d9d40c628d418e866508", "score": "0.46234536", "text": "public function setVenueIdAttribute(?int $value): void\n {\n if (!empty($value)) {\n $this->attributes['venue_id'] = $value;\n } else {\n $this->attributes['venue_id'] = null;\n }\n }", "title": "" }, { "docid": "ebfd81061a63dbae05cc103c86f9c63a", "score": "0.4614823", "text": "public function setVCard($vCard);", "title": "" }, { "docid": "1b3a226d0d171a09207b99fd855c5dd9", "score": "0.46108678", "text": "function setId($data)\n {\n $this->id = $data;\n }", "title": "" }, { "docid": "1f58cc9e6dc252234bdfab30611cb5ca", "score": "0.4609494", "text": "function setEditablePromoCodeID($epmid)\n {\n// if ($this->isCorrectPromoCodeId($epmid))\n// {\n $this->editablePromoCodeID = $epmid;\n// }\n }", "title": "" }, { "docid": "6a484dc5444f67b274bc13dfc8b9076f", "score": "0.46092293", "text": "public function setIdProvSedeIdAttribute($input)\n {\n $this->attributes['id_prov_sede_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "3035f0afa0d4c7fd28343fd8599acbe6", "score": "0.46036965", "text": "function crop($crop_x, $crop_y, $crop_width, $crop_height) \r\n {\r\n $this->command['crop'] = \"-crop {$crop_width}x{$crop_height}+{$crop_x}+{$crop_y}\";\r\n }", "title": "" }, { "docid": "4e10b82f796216e621e7f190661dd74e", "score": "0.45979863", "text": "public function set($id, $data, $opt=0);", "title": "" }, { "docid": "dcfebea3098146754e1f7a12c81cc922", "score": "0.4596609", "text": "public function setIdChef($idChef)\n {\n $this->idChef = (int)$idChef;\n }", "title": "" }, { "docid": "289667748f85350efa2974859a96d4de", "score": "0.45936054", "text": "public function setImgId($id): void\n {\n $this->imgId = (int)$id;\n }", "title": "" }, { "docid": "9ee30f0bd4212c7904f7faf5f9b5b42b", "score": "0.45907244", "text": "function setGalleyId($galleyId) {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn $this->setId($galleyId);\n\t}", "title": "" }, { "docid": "d01456ed2ffcdf584b5c731900c7f970", "score": "0.4590688", "text": "function setId($id)\n {\n $this->__id = $id ;\n }", "title": "" }, { "docid": "2ee8435b881a7404e37d004635015f3f", "score": "0.45744467", "text": "function setViewerID( $viewerID ) \n {\n $this->setValueByFieldName( 'viewer_id', $viewerID );\n }", "title": "" }, { "docid": "f407cb6835113cc9ac2545e3f3efd953", "score": "0.45659077", "text": "public function set_id ($id){\n $this->id = (int) $id;\n }", "title": "" }, { "docid": "e33505debc128c870d0d4f2d65250f8c", "score": "0.4562143", "text": "public function Crop($id) {\n\t\t$sql = \"DELETE FROM crops WHERE id=$.id\";// not sure if \"id=$id\" is correct or \"id=.$id\" O_o i'm a little bit confused here (#1)\n\t\t$result = $GLOBALS['DB_Conn']->query($sql);\n\t\treturn $result; // True if success, False if not\n\t}", "title": "" }, { "docid": "196b17e96a87e7ef98b9bd598df76ce4", "score": "0.45519257", "text": "static public function croppingValue($cropping) {\n\t\treturn ImageSizerEngine::croppingValue($cropping);\n\t}", "title": "" }, { "docid": "0c48dddd5d85b01294dadccce2f411b6", "score": "0.45481524", "text": "public function setParentReferenceId($value) {\n $this->_parentReferenceId = $value; \n }", "title": "" }, { "docid": "1c7ae887cf18ec95ab339663ae018f6c", "score": "0.45439625", "text": "public function setId($_id){\n\t\t\t$this->id=$_id;\n\t}", "title": "" }, { "docid": "5a0799387b5fe8fde322d225ab96d0c8", "score": "0.45420256", "text": "public function setBuildId($value)\n {\n $this->validateNotNull('BuildId', $value);\n $this->validateInt('BuildId', $value);\n\n if ($this->data['build_id'] === $value) {\n return;\n }\n\n $this->data['build_id'] = $value;\n\n $this->setModified('build_id');\n }", "title": "" }, { "docid": "d6ffa0be98fccc07ce1d1a9fec0b3021", "score": "0.45308307", "text": "public function setID($id)\r\n {\r\n }", "title": "" }, { "docid": "4494ebb0686b0b1a3cd8fae85e37f675", "score": "0.4518544", "text": "function setCompanyId($value) {\n return $this->setFieldValue('company_id', $value);\n }", "title": "" }, { "docid": "fd074c9e16270355682bb9bd17db9518", "score": "0.4515589", "text": "public function setId($id){\n\t if(filter_var($id, FILTER_VALIDATE_INT)){\n //valore id valido\n $this->id = $id;\n }\n\t}", "title": "" }, { "docid": "d10b50560777203da1db14f7f522837d", "score": "0.45004869", "text": "function setId($id) { $this->id = $id; }", "title": "" }, { "docid": "5dd29682a3db53e62be96c33460a8a20", "score": "0.44896325", "text": "public function applyCrop(array $properties, $field_value, CropType $crop_type);", "title": "" }, { "docid": "44975c44f2e77ddcc7364a41b3a10323", "score": "0.4489581", "text": "function setId($id) {\n $this->id = $id;\n }", "title": "" }, { "docid": "e9b62ef50f0762127e9a8987f78fbdd8", "score": "0.44891882", "text": "function setCopyeditorId($copyeditorId) {\n\t\treturn $this->setData('copyeditorId', $copyeditorId);\n\t}", "title": "" }, { "docid": "4a622ed8dcc838634b8f63f936e4bef8", "score": "0.44888887", "text": "public function set_reader_id( $reader_id )\n{\n $this->reader_id = $reader_id;\n}", "title": "" }, { "docid": "c1b2ca7400169fc31e2ee8afe8f09f69", "score": "0.44860354", "text": "public function setID($id)\n {\n }", "title": "" }, { "docid": "98f9a1420a31ad09ee72ff49819b920b", "score": "0.44776154", "text": "protected function redimensionaCrop()\r\n\t{\r\n\t\t// calcula posicionamento do crop\r\n\t\t$this->calculaPosicaoCrop();\r\n\r\n\t\t// cria imagem de destino temporária\r\n\t\t$this->img_temp\t= imagecreatetruecolor( $this->nova_largura, $this->nova_altura );\r\n\r\n\t\t// adiciona cor de fundo à nova imagem\r\n\t\t$this->preencheImagem();\r\n\r\n\t\timagecopyresampled( $this->img_temp, $this->img, -$this->posicao_crop[0], -$this->posicao_crop[1], 0, 0, $this->posicao_crop[2], $this->posicao_crop[3], $this->largura, $this->altura );\r\n\r\n\t\t$this->img\t= $this->img_temp;\r\n\t}", "title": "" }, { "docid": "da94077881d0438754f96f0fb86b2a14", "score": "0.44768915", "text": "function setDefinitionId($definition_id = 0)\n\t{\n\t\tif ($definition_id >= 0)\n\t\t{\n\t\t\t$this->picture_or_definition_id = $definition_id;\n\t\t}\n\t}", "title": "" }, { "docid": "709d4a6018641c40b5431149efe6f1d6", "score": "0.447365", "text": "function set_id($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "5f30ee8247545e8a699edc12ade008e9", "score": "0.4469081", "text": "public function setId($value)\n {\n $this->role_id=$value;\n }", "title": "" }, { "docid": "e1500e948aaa7dd4575f8469f45dad74", "score": "0.44690108", "text": "function testSetBrandId()\n {\n //Arrange\n $name = \"nike\";\n $id = 4;\n $test_brand = new Brand($name,$id);\n //Act\n $test_brand->setBrandId(5);\n $result = $test_brand->getBrandId();\n //Assert\n $this->assertEquals(5, $result);\n }", "title": "" }, { "docid": "14513e534ac76be45b15d94a67f50896", "score": "0.44648907", "text": "function set_id($id){\n\t\t$this->id = $id;\n\t}", "title": "" }, { "docid": "259689bac1a4b84bee1c00f48cf4fe25", "score": "0.44620714", "text": "public function setAssetId($value)\n {\n $this->_assetId = $value;\n }", "title": "" }, { "docid": "644415b16a55852591534b911ba8de5c", "score": "0.4461848", "text": "public function setIdCampus($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->id_campus !== $v) {\n\t\t\t$this->id_campus = $v;\n\t\t\t$this->modifiedColumns[] = TbcursoversaoPeer::ID_CAMPUS;\n\t\t}\n\n\t\tif ($this->aTbcampus !== null && $this->aTbcampus->getIdCampus() !== $v) {\n\t\t\t$this->aTbcampus = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "596e2a4bc0e98907b758fbd5a85aacde", "score": "0.44575432", "text": "public function testSetAndGetId(){\n $id = 1;\n $this->recipe->setId($id);\n $this->assertEquals($this->recipe->getId(), $id);\n }", "title": "" }, { "docid": "1585fa0deed228c57414b781cc1ea188", "score": "0.44556016", "text": "public function set_partner_region_id($id)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter('partner_region_id', $id);\n }", "title": "" }, { "docid": "4c86f5dd0b07ea2d6c0fa1289c197cc1", "score": "0.4454989", "text": "final function setFact_id($value) {\n\t\treturn $this->setFactId($value);\n\t}", "title": "" }, { "docid": "d53e8fcccbcb5e31b7c6416f1bacb03f", "score": "0.44533148", "text": "function setId($id)\n\t{\n\t\t// Set a_option id and wipe data\n\t\t$this->_id\t\t= $id;\n\t\t$this->_data\t= null;\n\t}", "title": "" }, { "docid": "804ee6b451826795830cbfb0cea26014", "score": "0.44523627", "text": "public function setIdCliente($idCliente){\r\n\t\t$this->idCliente = $idCliente;\r\n\t}", "title": "" }, { "docid": "b552a1288e75d235d30547053ff7f59a", "score": "0.4450878", "text": "public function setFileId(?int $fileId){\n $this->fileId = $fileId;\n }", "title": "" }, { "docid": "61b4ce6b6d29613bff469ccfe1ee3dd4", "score": "0.44474486", "text": "function setPhotoSet($key='', $id='', $offset=0) {\n\t\t$this->set_key = $key;\n\t\t$this->set_id = $id;\n\t\t$this->set_offset = $offset;\n\t}", "title": "" }, { "docid": "bb9939cba5a4522fd3cc91dc4600ec15", "score": "0.44425058", "text": "public function setId ($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "166d3821f283f70fe3adcdc221140822", "score": "0.44389808", "text": "public function testSetIdCarteAppelEnv() {\n\n $obj = new Banques();\n\n $obj->setIdCarteAppelEnv(\"idCarteAppelEnv\");\n $this->assertEquals(\"idCarteAppelEnv\", $obj->getIdCarteAppelEnv());\n }", "title": "" }, { "docid": "125219f0e3fec18478a0d0fd12b1a6ed", "score": "0.44349658", "text": "public function setidMotivo($Valor){\r\n $this->idMotivo = trim($Valor);\r\n }", "title": "" }, { "docid": "ba35b18a6afde3f3bc4e824457a5e056", "score": "0.44332087", "text": "public function setId($id) {\n \t$this->id = $id;\n }", "title": "" }, { "docid": "b729a768ba96aec474e74eeffb5ce55c", "score": "0.4430664", "text": "public function set_id_concurso($id_concurso){\n\t\t$this->id_concurso=$id_concurso;\n\t}", "title": "" }, { "docid": "160ebbbd4ef144442a8e0eb40bfd4b06", "score": "0.44252655", "text": "public function setID($id){\n $this->id = $id;\n }", "title": "" }, { "docid": "a8f67265d3ec76dfa7ae6cd7074f2d30", "score": "0.44216552", "text": "public function testSetIdCarteAppelEnv2() {\n\n $obj = new Banques();\n\n $obj->setIdCarteAppelEnv2(\"idCarteAppelEnv2\");\n $this->assertEquals(\"idCarteAppelEnv2\", $obj->getIdCarteAppelEnv2());\n }", "title": "" }, { "docid": "cc9e4f5ab4f65e9d75222e01cf524929", "score": "0.44185147", "text": "function setEditorId($editorId) {\n\t\treturn $this->setData('editorId', $editorId);\n\t}", "title": "" }, { "docid": "e5d289b71b6d3b67263af716034f74d8", "score": "0.44168943", "text": "public function updateCropProperties(Crop $crop, array $crop_properties);", "title": "" }, { "docid": "b12e1bf1b88f1c9a9ca8b97c85ec72ab", "score": "0.4414509", "text": "public function crop(): AcetoneApi\n {\n $this->options['fg_opt'] = 'crop';\n\n return $this;\n }", "title": "" }, { "docid": "c726b7c446e887f5328316b21cba23a4", "score": "0.44139817", "text": "public function setID($id){\n\t\t\t$this->id = $id;\n\t\t}", "title": "" }, { "docid": "2e1ac66def748c7982cd1fb8ffb21d76", "score": "0.441096", "text": "public function setID($id){\n\n $this->_id=$id;\n\n }", "title": "" }, { "docid": "49ef04fa273ddc329f568501ec1fceaa", "score": "0.4410646", "text": "function setCodigoProducto($id_producto)\r\n\t{\r\n\t\t$this->id_producto = $id_producto;\r\n\t}", "title": "" }, { "docid": "bcf050412c0a738f446e0661db142583", "score": "0.44084653", "text": "public function setPerfiles_id($perfiles_id){\n $this->perfiles_id = $perfiles_id;\n }", "title": "" }, { "docid": "e4a51a4ab757bf47ce03e795971cb294", "score": "0.44003063", "text": "public function setById($id, $val);", "title": "" }, { "docid": "ed8e9da9d91f27c5e9768cb9a68b880f", "score": "0.43984377", "text": "public function & SetId ($id);", "title": "" }, { "docid": "d0de1007daed3ab25c3b86cfe6808035", "score": "0.4396685", "text": "public function setPatientId($value){\n\t\t$this->patientId = $value;\n\t}", "title": "" }, { "docid": "0bd117d07a14519dd578da9876a4cefa", "score": "0.43953517", "text": "function setPageViewID( $value )\r\n {\r\n $this->PageViewID = $value;\r\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2edeb22d4c4777753cec1553c085d56b", "score": "0.0", "text": "public function create()\n {\n $users = Users::all();\n $diadiem = DiaDiem::all();\n return view('users.create',['users'=>$users,'diadiem'=>$diadiem]);\n }", "title": "" } ]
[ { "docid": "342bff56b62a745961c012a3ac82c12a", "score": "0.78761816", "text": "public function create()\n {\n return view('admin.resource.add');\n }", "title": "" }, { "docid": "0f0380ef896e8b1a4af511fb039fe879", "score": "0.7760756", "text": "public function create()\n\t{\n $config = $this->getFormData();\n $config['submit'] = route('app.resources.create');\n $config['title_name'] = trans('app.adminCreate');\n\n return view('admin.adminForm', $config);\n\t}", "title": "" }, { "docid": "6c38527badbdce8b6b216794aa375cb3", "score": "0.76253194", "text": "public function actionCreate()\n\t{\t\t \n\t\t$this->render('resource_create');\n\t}", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "242a7cb221f0fcd944a681fe88c407cd", "score": "0.758405", "text": "public function create()\n {\n return view('Admin.ourresource.create');\n\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "6b956805f751faa8511a724099e60375", "score": "0.75421274", "text": "public function create()\n {\n return view('manager.resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "a5965dde1f081c94296e801e6c603bf5", "score": "0.7453085", "text": "public function create()\n {\n \n $resourceTypes = ResourceTypes::getResourceTypeList();\n return view('admin.resources.create')->with('resourceTypes', $resourceTypes);\n \n }", "title": "" }, { "docid": "242700e7542efa06d08edc5984b0a155", "score": "0.737826", "text": "public function create()\n {\n return view ('form');\n }", "title": "" }, { "docid": "de323787673e065c237bffd0e406bc4a", "score": "0.73594564", "text": "public function create()\n {\n\n return view(\"form\");\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "7d107bfef62a964a62e6cab8ee6f69b7", "score": "0.7329499", "text": "public function create() {\n return view('forms::create');\n }", "title": "" }, { "docid": "dd9fd892621ec1d56e7ab98a0de05edb", "score": "0.7309871", "text": "public function create()\n {\n $entity = $this->model;\n\n $relationshipOptions = $this->getModelRelationshipData();\n\n $fields = $this->getFormFields();\n $title = $this->getFormTitle();\n $route = $this->getRoute();\n $bladeLayout = $this->bladeLayout;\n\n return view('crud-forms::create',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "82fc0d08b2c5c77ba23e8e4650269a74", "score": "0.7246853", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName() . '.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['module'] = $this->module;\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return template('form', $this->data, $this->module->getName());\n }", "title": "" }, { "docid": "443ec0ef783ddb885e44582de73c662e", "score": "0.7235326", "text": "public function create()\n\t{\n $mode = \"create\";\n return $this->showForm('create');\n\t}", "title": "" }, { "docid": "43bb6b172a2f963c4f3b6d2948331c7b", "score": "0.7217289", "text": "public function create()\n {\n return view('createForm');\n }", "title": "" }, { "docid": "fbc59fca75b99a403174397ba5d8d285", "score": "0.7216552", "text": "public function create()\n {\n $modelClass = $this->modelClass;\n $model = new $modelClass;\n $model->fill(Input::all());\n $view = View::make(\n $this->getViewName('create'),\n compact('model') + array(\n 'pageTitle' => 'Cadastrar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'create');\n return $this->beforeRenderForm($view, $model);\n\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "162ece72aeff2332b943711b91bbb0cd", "score": "0.72039485", "text": "public function create()\n {\n\n $model = $this->repository->getNew();\n $this->document->breadcrumbs([\n trans('ecommerce::default.'.$this->codename.'.index') => admin_route('ecommerce.'.$this->codename.'.index'),\n trans('ecommerce::default.'.$this->codename.'.create') => '',\n ]);\n\n $this->document->page->title(\n trans('ecommerce::default.'.$this->codename.'.index')\n .' > '\n .trans('ecommerce::default.'.$this->codename.'.create')\n );\n\n return view('ecommerce::'.$this->codename.'.form', [\n 'model' => $model,\n 'target' => 'ecommerce.'.$this->codename.'.store',\n 'codename' => $this->codename,\n 'repository' => $this->repository,\n ]);\n }", "title": "" }, { "docid": "ae7f980d6b32481951f3c9b739cad405", "score": "0.7199489", "text": "public function create()\n {\n return view(\"konsumen.form\");\n }", "title": "" }, { "docid": "69bd3270f11ddfa5b575696d29a4add6", "score": "0.71814996", "text": "public function create()\n {\n\n return view('shift.form_create');\n }", "title": "" }, { "docid": "0529bd22c7b669b06d0917bb468bcd97", "score": "0.716538", "text": "public function create() {\n\t\t$this->authorize('create', $this->repo->model());\n\t\treturn view($this->view . 'form', $this->repo->getPreRequisite(), $this->repo->getBasicPreRequisite());\n\n\t}", "title": "" }, { "docid": "d7dfab79c6b07da6e5e0913e8540eeb9", "score": "0.7157242", "text": "public function create()\n {\n return view('dashboard.forms.create');\n }", "title": "" }, { "docid": "cdccf0772168a4c3198ad8229762752f", "score": "0.7155322", "text": "public function create()\n {\n return $this->view('form');\n }", "title": "" }, { "docid": "b53b216bb126e4de0f5a98bea729535e", "score": "0.71506757", "text": "public function newAction()\n {\n $this->view->form = new \\BarangForm(null, ['edit' => true]);\n }", "title": "" }, { "docid": "d6aa2e924016ff1dae18f8f678fe212a", "score": "0.7145264", "text": "public function create()\n\t{\n\t\t$form = new Form;\n\t\t$allow_tabs = array('create');\n\t\t$tab = 'create';\n\t\treturn View::make('backend.forms.create', compact('form', 'allow_tabs', 'tab'));\n\t}", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "1dcbdf778b346aa6793b44e6dbdc0ed3", "score": "0.71093065", "text": "public function create()\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n return view('layouts.create')->with(compact('forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "e764b1be55fc315cb37574f6c835bc08", "score": "0.7105658", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "f62dd87066b4faf01871596fb587ea88", "score": "0.7074242", "text": "public function create()\n {\n return view('template.product.form_create');\n }", "title": "" }, { "docid": "ccd8c86bf091e74199a4226d7941ad10", "score": "0.7057411", "text": "public function newAction()\n {\n $entity = new Supplier();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AcmeSetupBundle:Supplier:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "d152222964aa1bb46555c71d1b40a042", "score": "0.70524913", "text": "public static function newForm() {\n self::check_admin();\n $abilities = Ability::allAbilities();\n View::make('suunnitelmat/new_species.html', array('abilities' => $abilities));\n }", "title": "" }, { "docid": "a5da52bd87409b9af679915f54a22668", "score": "0.70512646", "text": "public function create()\n {\n if(!Auth::user()->hakAkses($this->hakAkses['add'])){\n $this->authorize('forceFail');\n }\n $class = $this->getResourceModel();\n $kategori = Kategori::get();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'kategoriList' => $kategori,\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b20c44fdc751207aaea30b2a981f6a0d", "score": "0.7047574", "text": "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('concepto/concepto_new');\n\n\t}", "title": "" }, { "docid": "956b2245921b775d19eaa349523daabc", "score": "0.7040791", "text": "public function create()\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "6785b7a8807f193c101c96ffd2379b91", "score": "0.70223033", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('resources.create') ;//转向资源服务器注册页面\n\t}", "title": "" }, { "docid": "f576188dbc8ae5f6631165826f306b3b", "score": "0.70178926", "text": "public function create()\n {\n return view(\"{$this->viewPath}.create\", [\n 'title' => trans('main.add') . ' ' . trans('main.medicalforms'),\n ]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "aeb469b25992f994059bfd2f69df4c25", "score": "0.7014434", "text": "public function create()\n {\n return view('admin.service.form');\n }", "title": "" }, { "docid": "55d25b23118347b43838f0584440d7bc", "score": "0.7013096", "text": "public function create()\n {\n return view('resturants::create');\n }", "title": "" }, { "docid": "d466d099f3186e4452b5ebba7c196cf6", "score": "0.70112854", "text": "public function create()\n {\n return view('design/form');\n }", "title": "" }, { "docid": "7c7e2891f4af9318822aa65308553f78", "score": "0.7010465", "text": "public function create()\n {\n return view('pages.superAdmin.minerba.form');\n }", "title": "" }, { "docid": "ca18b8d268ff390165b891429ae27a70", "score": "0.70104074", "text": "public function create()\n\t{\n\t\treturn view('admin.alergenosForm');\n\t}", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "8786022d988565af6dda1dead367404f", "score": "0.7004673", "text": "public function create()\n {\n return view('patal.form');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "ed1d0f0eb0fcdbf172b956b19927920e", "score": "0.6997593", "text": "public function create()\n {\n $class = $this->getModelClassFromRoute();\n if (method_exists($class, 'newDefault')) {\n $object = $class::newDefault(request()->input('parent_id'));\n } else {\n $object = new $class;\n }\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules();\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "1bfdf35b31b995ec54621f89216a2f60", "score": "0.69961935", "text": "public function create()\n {\n // Hacia el formulario\n return view('Catalogo.registro'); // La del formulario\n }", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "875a928015f9ba1940490c7d9dfd8a9c", "score": "0.69916135", "text": "public function create()\n {\n // return view('presensi.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "b544fbb7e499f8abdc514265eaa72c80", "score": "0.6990788", "text": "public function create(){\n return View('salonists.addForm');\n }", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "b383bd109b3b044055bbdeced7efa8e7", "score": "0.6983602", "text": "public function create()\n {\n return view('leite.form');\n }", "title": "" }, { "docid": "67d0fea7e3e0bbada82422aa97f9be53", "score": "0.6977097", "text": "function showCreateForm(){\n return view('admin.Direktori.Koorsek.create');\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "176f4e5ee5bb1d8842d9ba4652636fd5", "score": "0.69725794", "text": "public function create()\n {\n $route = action($this->getActionRoute('store'), $this->action_url_params);\n\n $form = $this->createService->createForm($route);\n\n return view($this->templateAdd, [\n 'form' => $form,\n 'title' => $this->getTitle('create'),\n 'module_title' => $this->getTitle('index'),\n 'controller' => $this->getController(),\n ]);\n }", "title": "" }, { "docid": "2c0ef64bd4ac157d6004a7d4b574de6f", "score": "0.6966141", "text": "public function create()\n {\n // restituisco la view del form\n return view('products.create');\n }", "title": "" }, { "docid": "2643780d203b8c752744e38942ce260d", "score": "0.69652045", "text": "public function create()\n {\n $book = new Book();\n $book->load('authorList.details');\n $book->load('publisher');\n $actionRoute = 'books.saveNew';\n $pageTitle = 'Books - New';\n return view('books._books_form', compact('book', 'actionRoute', 'pageTitle'));\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "cb7c11c08e93409d4584dc81a4310a7e", "score": "0.695854", "text": "public function getCreate()\n {\n return view('pages.form.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "faab52446786eb57de6d45ef5c9751a9", "score": "0.6954935", "text": "public function create()\n {\n $countries = Country::all();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('cities.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949657", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "07b43788dfee25823f1bfa779101007b", "score": "0.69488627", "text": "public function create()\n {\n return view('hrm::create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "7e9a15ef80239f891446dfc2d6f5483e", "score": "0.69416964", "text": "public function create()\r\n {\r\n $form=[\r\n \"value\" => \"add\",\r\n \"name\" => \"Add Person\",\r\n \"submit\" => \"Save\"\r\n ];\r\n\r\n return view('person/form',compact('form'));\r\n }", "title": "" }, { "docid": "291a5c3487f9cfc359ff3c6584319cba", "score": "0.69416463", "text": "public function backCreateAction()\n {\n $options['domain'] = Constants::BACK;\n $options['type'] = Constants::FORM_CREATE;\n \n // parameter used to filter and show only the resources that belong to the logged organization\n $options['organization'] = $this->get('security.context')->getToken()->getUser()->getId();\n \n $resource = new Resource();\n $form = $this->createForm(new ResourceType(), $resource, $options);\n \n $request = $this->getRequest();\n \n if ($request->getMethod() == 'POST')\n {\n $form->bindRequest($request);\n\n if ($form->isValid())\n {\n $em = $this->getDoctrine()->getEntityManager();\n \n $dateStartLock = $resource->getDateStartLock();\n $dateEndLock = $resource->getDateEndLock();\n \n // it is supposed that a locked period takes full days\n if ($dateStartLock) $dateStartLock->setTime(0, 0, 0);\n if ($dateEndLock) $dateEndLock->setTime(23, 59, 59);\n \n $em->persist($resource);\n $em->flush();\n\n return $this->redirect($this->generateUrl('back_resource_read', array('id' => $resource->getId())));\n }\n } \n\n return $this->render('PFCDTourismBundle:Back/Resource:create.html.twig', array(\n 'resource' => $resource,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "7a30ea5382a9dccea0e45dd1992baee9", "score": "0.6940094", "text": "public function create()\n {\n return view ('riwayat.create');\n }", "title": "" }, { "docid": "247a32ac1bdaf7bc58b7ca130d237b9c", "score": "0.6936969", "text": "public function create()\n {\n //\n return view('admin.concept.create');\n }", "title": "" }, { "docid": "812e658b540562d8e395333553c52241", "score": "0.6934265", "text": "public function create()\n {\n return view('rekening.add');\n }", "title": "" }, { "docid": "680ca688d269a5dc28ed1ec460cb5137", "score": "0.69331574", "text": "public function create()\n {\n return view('harian.create');\n }", "title": "" }, { "docid": "8250d2da73f4073c78bd103641c0eaeb", "score": "0.6925077", "text": "public function create() {\n $title = 'Cadastro Professor';\n return view('professor.create', compact('title'));\n }", "title": "" }, { "docid": "dbe0d9d5c58ac6a21b5fb5512e594696", "score": "0.69249064", "text": "public function create()\n {\n return view('lijst.create');\n }", "title": "" }, { "docid": "a917cc1c921d761746db4cf9f3e12a3a", "score": "0.6924233", "text": "public function create()\n {\n return view($this->options['route-views'].\"save\")\n ->with('options', $this->options)\n ->with('typeForm', 'create');\n }", "title": "" }, { "docid": "35452bee2b2408494a78f76b38ce24ce", "score": "0.6923358", "text": "public function create()\n {\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\n 'route_path' => $this->route,'form' => $this->form) );\n }", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "d7102125563abfe0d8b4c4534cc7ed82", "score": "0.6914158", "text": "public function create()\n {\n $this->array['action'] = 'create';\n \n $this->parameters_to_create_edit();\n\n return $this->show_view('create-edit', $this->array);\n }", "title": "" }, { "docid": "d7a4baeb06d3d8108dc3b6b8cf2d22f0", "score": "0.6906848", "text": "public function newAction()\n {\n global $config;\n\n if(empty($this->crumbs->crumbs['new']['label']))\n $this->crumbs->add('New', '/', 'New', false); \n\n $form = new AcademicyearsForm(new Academicyears(), array('new' => true));\n $this->view->setVar(\"form\", $form);\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "08b863cf334fdb6d69bfe339f48ba738", "score": "0.689754", "text": "public function create()\n {\n $outlet = new Outlet;\n $isCreate = true;\n return view('outlet.form', compact('outlet', 'isCreate'));\n }", "title": "" }, { "docid": "f75befff50f97c865afe13ee1e94f3b1", "score": "0.6896097", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->propertyForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "b3b948e870ae293f1e987afea2e063f7", "score": "0.6891714", "text": "public function create()\n {\n return view('panel.warehouse-management.warehouse-rack.form-create');\n }", "title": "" } ]
6ed5a2998399666b7c90d923044fb2a1
Get the console command options.
[ { "docid": "9c8068359b9dabb640ebadfc58e82ba7", "score": "0.0", "text": "protected function getOptions()\n {\n return array(\n array('example', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),\n );\n }", "title": "" } ]
[ { "docid": "46bcab41d65b6e750324d923586ca802", "score": "0.79306257", "text": "public function getCommandOptions()\n\t{\n\t\treturn $this->commandOptions;\n\t}", "title": "" }, { "docid": "9c6f8602f6cb152a7e48d19dc0614bf9", "score": "0.7744165", "text": "protected function getOptions()\n {\n return [\n ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name']\n ];\n }", "title": "" }, { "docid": "1eadfac2399a142bd4b5c73f891b38db", "score": "0.766381", "text": "protected function getOptions()\n {\n return array_merge([\n ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned.', 'command:name'],\n ], parent::getOptions());\n }", "title": "" }, { "docid": "31c72349512f3e2e98d7a7bc6b2e3e80", "score": "0.7605724", "text": "public function getCommandOptions(): array;", "title": "" }, { "docid": "e7910cf9021b92d17e8fe4cb203207f9", "score": "0.7560868", "text": "protected function getOptions()\n {\n return [\n [\n 'command',\n null,\n InputOption::VALUE_OPTIONAL,\n 'The terminal command that should be assigned.',\n 'command:name',\n ],\n [\n 'module',\n 'module',\n InputOption::VALUE_REQUIRED,\n 'Put the generated files inside of a module folder.',\n ],\n ];\n }", "title": "" }, { "docid": "e4bd658794b5242a9a74f7e41cd51787", "score": "0.75072926", "text": "public function options() {\n //require_api( 'logging_api.php' );\n\n $project_id=helper_get_current_project();\n #echo \"project_id=$project_id<br>\";\n $options = $this->getAvailableCommands($project_id);\n //log_event(LOG_FILTERING, \"options() project_id=\".$project_id);\n\n //log_event(LOG_FILTERING, \"options = \". var_export($options, true));\n return $options;\n }", "title": "" }, { "docid": "212d32b59ae564eaff521ed192243542", "score": "0.74943274", "text": "protected function _get_options() {\r\n\t\t\r\n\t\t$options = array();\r\n\t\t\r\n\t\t// Scan command line attributes for allowed arguments\r\n\t\tforeach((array) $_SERVER['argv'] as $k => $arg) {\r\n\t\t\tlist($arg, $value) = explode('=', $arg);\r\n\t\t if(substr($arg, 0, 2) == '--' && isset($this->options[substr($arg, 2)])) {\r\n\t\t $this->options[substr($arg, 2)] = true;\r\n\t\t $this->optiondata[substr($arg, 2)] = $value;\r\n\t\t $options[] = substr($arg, 2);\r\n\t\t }\r\n\t\t}\r\n\t\t\r\n\t\treturn $options;\r\n\t}", "title": "" }, { "docid": "4643a21a567ac1184cb059a2e28ce4f4", "score": "0.747314", "text": "protected function getOptions()\n {\n return [\n ['nostatus', '-nostatus', InputOption::VALUE_OPTIONAL, 'Run without git status command'],\n ['issue', '-issue', InputOption::VALUE_OPTIONAL, 'GitHub issue no'],\n ['compare', '-compare', InputOption::VALUE_OPTIONAL, 'If you execute github compare, add this option'],\n ];\n }", "title": "" }, { "docid": "a0fcb3767b884fafedabfbc85b9fdcaa", "score": "0.74343723", "text": "protected function getOptions()\n {\n return [\n ['command', null, InputOption::VALUE_REQUIRED],\n ['connection', null, InputOption::VALUE_OPTIONAL],\n ];\n }", "title": "" }, { "docid": "103f60e4bedc8aabab293a5ce76c2136", "score": "0.73226553", "text": "public static function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "96159131a6e84095901eef5894a556f8", "score": "0.7315689", "text": "public function getOptions()\n {\n return Statute::getOptions();\n }", "title": "" }, { "docid": "2f0226afcb21304454eef363d607348d", "score": "0.72552", "text": "protected function getOptions()\n {\n return $this->input->getOptions();\n }", "title": "" }, { "docid": "5f08ab9538038c586b587e7d9662b952", "score": "0.7234611", "text": "public static function get_options(){\n\n\t\treturn self::$options;\n\n\t}", "title": "" }, { "docid": "ed841f46b2a8a4dc3f6dbb6601e41c8c", "score": "0.7214965", "text": "protected function getOptions()\n {\n return [\n ['direction', 'd', InputOption::VALUE_OPTIONAL, 'The direction of ordering.', 'asc'],\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ];\n }", "title": "" }, { "docid": "43500c93336606ba026847f3e74d52f5", "score": "0.72037786", "text": "public static function getOptions(): array\n {\n return static::$options;\n }", "title": "" }, { "docid": "502942d1d29ebc665020777c74451e43", "score": "0.7183522", "text": "protected function getOptions()\n {\n return [\n [\n 'editor-cmd',\n null,\n InputOption::VALUE_OPTIONAL,\n 'Open file with this command upon creation.'\n ]\n ];\n }", "title": "" }, { "docid": "9c9ea766b3bcb6c204896cd2ccd19373", "score": "0.71799725", "text": "protected function getOptions()\n {\n $options = [\n [\n 'write-sql',\n null,\n InputOption::VALUE_NONE,\n 'The path to output the migration SQL file instead of executing it.'\n ],\n [\n 'dry-run',\n null,\n InputOption::VALUE_NONE,\n 'Execute the migration as a dry run.'\n ],\n [\n 'query-time',\n null,\n InputOption::VALUE_NONE,\n 'Time all the queries individually.'\n ]\n ];\n\n return array_merge(parent::getOptions(), $options);\n }", "title": "" }, { "docid": "691c91e033746d327702b66bc6f4a427", "score": "0.7159308", "text": "protected function getOptions()\n {\n return [\n ['timeout', null, InputOption::VALUE_OPTIONAL, 'The process timeout.', null],\n ];\n }", "title": "" }, { "docid": "1a334cb57889f6e27dabc992a164d6a7", "score": "0.7140503", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.7137", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "5516e7c5af25c8c1f28062f1d6ca82fe", "score": "0.71190935", "text": "public function getOptions()\n {\n $options = parent::getOptions();\n\n $options[] = ['module', 'M', InputOption::VALUE_OPTIONAL, 'The module where the command should be created.'];\n\n return $options;\n }", "title": "" }, { "docid": "5516e7c5af25c8c1f28062f1d6ca82fe", "score": "0.71190935", "text": "public function getOptions()\n {\n $options = parent::getOptions();\n\n $options[] = ['module', 'M', InputOption::VALUE_OPTIONAL, 'The module where the command should be created.'];\n\n return $options;\n }", "title": "" }, { "docid": "c95c1efaeee2a0113db1b3f3159b24fe", "score": "0.71176624", "text": "protected function getOptions()\r\n {\r\n return [\r\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to seed'],\r\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\r\n ];\r\n }", "title": "" }, { "docid": "a7ed6f66d79669197b9be172a44a6d4a", "score": "0.71123016", "text": "public static function get_options() {\n\t\t$options = json_decode( get_option( 'envascout_options' ), true );\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "baf0b86033d2ca254bf6b03a697bf99e", "score": "0.710945", "text": "public function getOptions();", "title": "" }, { "docid": "6e624da3564e651bbb61ff8ef632b133", "score": "0.71087766", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Overwrite existing files with generated ones.'],\n [\n 'model',\n null,\n InputOption::VALUE_OPTIONAL,\n 'Define which model name to use, otherwise the singular controller name is used.'\n ],\n ['translated', 't', InputOption::VALUE_NONE, 'Generate translation ready files.'],\n ];\n }", "title": "" }, { "docid": "1f5725e4c570743bafbc0f4ec94fe163", "score": "0.70777416", "text": "protected function getOptions()\n {\n return [\n ['unit', null, InputOption::VALUE_NONE, 'Runs unit tests.'],\n ['location', null, InputOption::VALUE_OPTIONAL, 'Which modules location to use.'],\n ];\n }", "title": "" }, { "docid": "a2c86f48060f1e6062c1439384577129", "score": "0.70759434", "text": "protected function getOptions()\n {\n return [\n ['database', 'd', InputOption::VALUE_OPTIONAL, 'Sets the database connection to use for migration'],\n\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production'],\n\n ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run'],\n\n ['step', null, InputOption::VALUE_NONE, 'Force the migrations to be run so they can be rolled back individually'],\n\n ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run'],\n ];\n }", "title": "" }, { "docid": "77d90e1e7c1774e3081e120d4fc72313", "score": "0.70704544", "text": "protected function getOptions()\n {\n return array(\n array('host', null, InputOption::VALUE_OPTIONAL, 'The host address to serve the application on.', 'localhost'),\n\n array('port', null, InputOption::VALUE_OPTIONAL, 'The port to serve the application on.', 8000),\n );\n }", "title": "" }, { "docid": "e59265b0d70c8ebad9243c13bbd261d0", "score": "0.70684665", "text": "public static function getOptions(): array;", "title": "" }, { "docid": "59e18dc8745b02bb42ed2eb9e42a463e", "score": "0.7067551", "text": "public static function get_opts( ) {\n\t\treturn self::$opts;\n\t}", "title": "" }, { "docid": "46a447dc2344a8496550a07c8d68eed6", "score": "0.70631355", "text": "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "46a447dc2344a8496550a07c8d68eed6", "score": "0.70631355", "text": "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "dd80c05bc1649f1c16df0051095110a9", "score": "0.70549434", "text": "public function getOptions () {}", "title": "" }, { "docid": "c41fba69b2461d1d9c86353918b636b2", "score": "0.70437175", "text": "protected function getOptions()\n {\n return [\n ['env', null, InputOption::VALUE_REQUIRED, 'Specific environment'],\n ];\n }", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.70315164", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "07ae568280d3b586e8e17d40f14f487c", "score": "0.7028332", "text": "protected function getOptions()\n {\n return [\n new InputOption('--print', null, InputOption::VALUE_NONE, 'Just printing webhooks without setting them'),\n new InputOption('--info', null, InputOption::VALUE_NONE, 'Generates urls to get info about webhook'),\n ];\n }", "title": "" }, { "docid": "dbfe4a8ef93eaa2f116ec4501ead3157", "score": "0.70248777", "text": "public function GetOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.70230496", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "14b97b6d22a9d3f33432ffc93a2de575", "score": "0.7013128", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run.'],\n ];\n }", "title": "" }, { "docid": "14b97b6d22a9d3f33432ffc93a2de575", "score": "0.7013128", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run.'],\n ];\n }", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70083207", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70083207", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70083207", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70083207", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70083207", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.70083207", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "4cbadb089a84fb62154193b7a206b541", "score": "0.7002377", "text": "public function getOptions()\n\t{\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "4cbadb089a84fb62154193b7a206b541", "score": "0.7002377", "text": "public function getOptions()\n\t{\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.699937", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.699937", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.699937", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "c1f9facdbc1487ea7d8f2f5e9ff6c268", "score": "0.6998309", "text": "protected function getOptions()\n {\n return [\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run'],\n ];\n }", "title": "" }, { "docid": "09b345728a1f9f953c0a4494d25cd0e8", "score": "0.6994164", "text": "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "4d8b87e34c873a4725862b41fd003ee0", "score": "0.6993606", "text": "protected function getOptions()\n {\n return [\n ['cron', null, InputOption::VALUE_NONE, 'Show output cron style', null],\n ];\n }", "title": "" }, { "docid": "b7e30ae7c2eb654bc20cb98e58fe4c11", "score": "0.6990197", "text": "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'The base model of this repository.'],\n ];\n }", "title": "" }, { "docid": "e5e4d72c6fd1f2a97d78db4137a669c1", "score": "0.69884205", "text": "protected function getOptions()\n {\n $namespace = $this->config->get('crud-generator.namespace');\n\n $version = $this->app->version();\n\n\t $return =array();\n\n\t if(!in_array(trim(substr($version, 0,3)), ['5.1'])) {\n\t\t $return[] = array( 'make-auth', \"a\", InputOption::VALUE_NONE, 'Execute make:auth and migrate commands' );\n\t }\n\n\t\t$return[] = array('migrate', \"m\", InputOption::VALUE_NONE, 'Execute migrate command');\n\t\t$return[] = array('hide-timestamps', \"t\", InputOption::VALUE_NONE, 'Hide [created_at, updated_at and deleted_at] from add list');\n\t\t$return[] = array('over-write', \"o\", InputOption::VALUE_NONE, 'Allow to overwrite exist files');\n\t\t$return[] = array('namespace', \"s\", InputOption::VALUE_OPTIONAL, 'Chose CRUD namespace', $namespace);\n\t\t$return[] = array('ignore-none-autoincrement', \"i\", InputOption::VALUE_NONE, 'Ignore tables which have no auto-increment field');\n\n\n\n return $return;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" }, { "docid": "48767e4540c9bbb4c51e8d5407277928", "score": "0.69752616", "text": "public function getOptions()\n {\n return $this->options;\n }", "title": "" } ]
58bbb2309b88230770548db70f7c7165
Determine if this workflow task type is internal from task settings
[ { "docid": "a453e95aa54272fad2e3e9a75d820790", "score": "0.65279156", "text": "public function isInternal()\n {\n return (isset($this->settings['internal']) AND $this->settings['internal']);\n }", "title": "" } ]
[ { "docid": "73a0867a444ce5da499586d68d014965", "score": "0.63851076", "text": "function is_task() {\n\t\treturn is_singular( array( 'cs-task' ) );\n\t}", "title": "" }, { "docid": "4774c42fbf2bfcab2887566f22a26f26", "score": "0.55142313", "text": "function acf_is_internal_post_type( $post, $post_type ) {\n\t$instance = acf_get_internal_post_type_instance( $post_type );\n\n\tif ( $instance ) {\n\t\treturn $instance->is_post( $post );\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "c28a6d78e2da368ed66959a35081aaa5", "score": "0.55084604", "text": "private function _is_my_house()\n\t{\n\t\tglobal $IN;\n\t\t\n\t\treturn (($IN->GBL('P', 'GET') == 'extension_settings'\n\t\t \t&& $IN->GBL('name', 'GET') == $this->_lower_class_name)\n\t\t\tOR $IN->GBL('P', 'GET') == 'save_extension_settings');\n\t}", "title": "" }, { "docid": "645f0103a70a3b87b2c20e5efdb2b292", "score": "0.55029964", "text": "public function getTaskType()\n {\n return $this->task_type;\n }", "title": "" }, { "docid": "6b6c2fba0bedf5511644d30a890b01c9", "score": "0.54957914", "text": "public function isInternal()\n {\n return $this->internal;\n }", "title": "" }, { "docid": "d60454938a50a1327196f1f2f6155963", "score": "0.54773444", "text": "public static function isFromTask() {\n // if is from cmd script\n try{\n $sf_instance = sfContext::getInstance();\n } catch (Exception $ex) {\n $sf_instance = null;\n }\n $module = $sf_instance ? $sf_instance->getModuleName() : null;\n if (empty($module)) {\n return true;\n }else{\n return false;\n } \n }", "title": "" }, { "docid": "7501ce283ca5d7e67b4b1605813acdf4", "score": "0.53988504", "text": "public static function is_tzolkin() {\n\t $post_type = is_admin() ? null : get_post_type();\n\t if( isset($_GET['post_type']) ) $post_type = $_GET['post_type'];\n\t\telseif( isset($_GET['post']) && isset($_GET['action']) &&\n\t\t$_GET['action'] === 'edit') $post_type = get_post_type($_GET['post']);\n\n\t\treturn self::$name === $post_type;\n\t}", "title": "" }, { "docid": "6564b64d9eaf62c11da93514b7d3c5b9", "score": "0.5358954", "text": "public function isInternal()\r\n {\r\n return ($this->internal == true);\r\n }", "title": "" }, { "docid": "7adee1fcd7ba6b1f549a091df3ac7f7a", "score": "0.52752715", "text": "public function isInternal(): bool;", "title": "" }, { "docid": "9b7d52fda30c28893fed49ebe9de3dae", "score": "0.522859", "text": "function acf_is_internal_post_type_key( $id = '', $post_type = 'acf-field-group' ) {\n\t$instance = acf_get_internal_post_type_instance( $post_type );\n\tif ( ! $instance ) {\n\t\treturn false;\n\t}\n\n\treturn $instance->is_post_key( $id );\n}", "title": "" }, { "docid": "8f642b233c5d1092a5cced0f5d48caef", "score": "0.52259827", "text": "public function isTypeLocal(){\n\n return ($this->type === 'local');\n }", "title": "" }, { "docid": "5240175874f891b480b0f08e29bf13b7", "score": "0.5165961", "text": "private function is_request($type){\n switch ($type){\n case 'admin' :\n return is_admin();\n case 'ajax' :\n return defined( 'DOING_AJAX' );\n case 'cron' :\n return defined( 'DOING_CRON' );\n case 'frontend' :\n return (!is_admin() || defined('DOING_AJAX')) && ! defined('DOING_CRON');\n }\n }", "title": "" }, { "docid": "b9f4308a04bd0e34073eefd0ef0ef2ed", "score": "0.5159456", "text": "private function is_request( $type ) {\r\n\t\t\tswitch ( $type ) {\r\n\t\t\t\tcase 'admin' :\r\n\t\t\t\t\treturn is_admin();\r\n\t\t\t\tcase 'ajax' :\r\n\t\t\t\t\treturn defined( 'DOING_AJAX' );\r\n\t\t\t\tcase 'cron' :\r\n\t\t\t\t\treturn defined( 'DOING_CRON' );\r\n\t\t\t\tcase 'frontend' :\r\n\t\t\t\t\treturn ( !is_admin() || defined( 'DOING_AJAX' ) ) && !defined( 'DOING_CRON' );\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "1c96316ae610219b6943d1f498209b40", "score": "0.5159001", "text": "public function cantDo()\n {\n foreach ($this->keys as $key => $value):\n if ($this->settings->$value == true):\n return true;\n endif;\n endforeach;\n return false;\n }", "title": "" }, { "docid": "804cb99d02cd286e131418dcfcf85ec3", "score": "0.5148013", "text": "private function is_request( $type ) {\n switch ( $type ) {\n case 'admin' :\n return is_admin();\n case 'ajax' :\n return defined( 'DOING_AJAX' );\n case 'cron' :\n return defined( 'DOING_CRON' );\n case 'frontend' :\n return ! is_admin() && ! defined( 'DOING_CRON' );\n }\n }", "title": "" }, { "docid": "7cc6583d96923c2ab6cc7aa992b63a54", "score": "0.5142667", "text": "public function isInternal();", "title": "" }, { "docid": "7cc6583d96923c2ab6cc7aa992b63a54", "score": "0.5142667", "text": "public function isInternal();", "title": "" }, { "docid": "c6315dbe28f4c77b59f944a1f930ff4c", "score": "0.51269406", "text": "private function is_request($type)\n {\n switch ($type) {\n case 'admin':\n return is_admin();\n case 'ajax':\n return wp_doing_ajax();\n case 'cron':\n return defined('DOING_CRON');\n case 'frontend':\n return (!is_admin() || wp_doing_ajax()) && !defined('DOING_CRON');\n default:\n return false;\n }\n }", "title": "" }, { "docid": "16f599624664cb3d96d5bc285ed97d3d", "score": "0.51126033", "text": "public function isWiki() {\n\t\t\t$type = $this->get('type');\n\t\t\t$wikiTypes = postsController::$wikiTypes;\n\t\t\treturn isset($wikiTypes[$type]);\n\t\t}", "title": "" }, { "docid": "7011e8b3ffd982c1debe6345b7ae69d7", "score": "0.5084948", "text": "public function isSetting($setting)\n {\n return array_key_exists($setting, $this->settingsTemplate);\n }", "title": "" }, { "docid": "198117296f022e83beae0ed382d63a67", "score": "0.5077155", "text": "public function is_request( $type ) {\r\n\t\tswitch ( $type ) {\r\n\t\t\tcase 'admin' :\r\n\t\t\t\treturn is_admin();\r\n\t\t\tcase 'ajax' :\r\n\t\t\t\treturn defined( 'DOING_AJAX' );\r\n\t\t\tcase 'cron' :\r\n\t\t\t\treturn defined( 'DOING_CRON' );\r\n\t\t\tcase 'frontend' :\r\n\t\t\t\treturn ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b6ecc5ca31b5b6e539ddad0c75a79650", "score": "0.5061777", "text": "public function checkTaskState();", "title": "" }, { "docid": "a290fb2a04e88d5a1e2cad182e21801e", "score": "0.50607324", "text": "public static function isInternalUser() {\n return Shared::data('internal-uid') ? true : false;\n }", "title": "" }, { "docid": "3b312d5af8c5dcd87d319dc4d6ad721a", "score": "0.5047018", "text": "private function getTemplating()\n {\n if ($this->choices->siteType==\"RESTful web services\") {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "5e53eb16fe45c7a4dff433b26f4dfc24", "score": "0.50201625", "text": "public static function isInTimeCheck() {\n \n $inTimeCheck = self::getConfig('inTimeCheck');\n \n if (is_bool($inTimeCheck)) {\n return $inTimeCheck;\n } else {\n // If no value or not a boolean value is given, in time check should be enabled\n return true;\n }\n }", "title": "" }, { "docid": "6b9ebc9c35eec02631572ec9af025d24", "score": "0.5005513", "text": "public static function isAllowed() {\r\n\t\treturn Todoyu::allowed('project', 'general:use');\r\n\t}", "title": "" }, { "docid": "88c64c76948bbdf0f04f773ab011a98f", "score": "0.49944985", "text": "private function is_request($type)\n {\n switch ($type) {\n case 'admin':\n return is_admin();\n case 'ajax':\n return defined('DOING_AJAX');\n case 'cron':\n return defined('DOING_CRON');\n case 'frontend':\n return (!is_admin() || defined('DOING_AJAX')) && !defined('DOING_CRON') && !defined('REST_REQUEST');\n }\n }", "title": "" }, { "docid": "5b731acb52cc187b29a89c0b53ea60f0", "score": "0.49867472", "text": "public function hasTypeUrl(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "a0b2717d300d3ace3ab0a59461ee2e74", "score": "0.4978906", "text": "public function isPublic()\r\n {\r\n return $this->config->get('public');\r\n }", "title": "" }, { "docid": "a58c31160f2e0d4342fe382a083fa2d7", "score": "0.49626583", "text": "public function is_settings_home() {\n\t\tif (isset($this->is_settings_home)) {\n\t\t\treturn $this->is_settings_home;\n\t\t}\n\n\t\tglobal $post;\n\n\t\t$this->is_settings_home = get_post_type() === 'page' &&\n\t\t MKB_Options::option( 'kb_page' ) &&\n\t\t $post->ID === (int) MKB_Options::option( 'kb_page' );\n\n\t\treturn $this->is_settings_home;\n\t}", "title": "" }, { "docid": "f954761fd4d0615cc50ef519257bc6a8", "score": "0.49605373", "text": "public function is_request( $type ) {\n\t\tswitch ( $type ) {\n\t\t\tcase 'admin' :\n\t\t\t\treturn is_admin();\n\t\t\tcase 'ajax' :\n\t\t\t\treturn defined( 'DOING_AJAX' );\n\t\t\tcase 'cron' :\n\t\t\t\treturn defined( 'DOING_CRON' );\n\t\t\tcase 'frontend' :\n\t\t\t\treturn ( ! is_admin() || defined( 'DOING_AJAX' ) ) && ! defined( 'DOING_CRON' );\n\t\t}\n\t}", "title": "" }, { "docid": "482c932371d3ad70034a7b7748d044ed", "score": "0.49574918", "text": "public function hasSettingService()\n {\n\n $url = $this->getSetting('ext_ims_lti_tool_setting_url');\n\n return !empty($url);\n\n }", "title": "" }, { "docid": "14fa5cbcbf8ef1520db30a4f3b585bb4", "score": "0.49558565", "text": "public function isConfigured()\n {\n switch ($this->model->{'settings.mode'})\n {\n case \"live\":\n if (!empty($this->model->{'settings.live.username'})\n && !empty($this->model->{'settings.live.password'})\n && !empty($this->model->{'settings.live.signature'})\n )\n {\n return true;\n }\n break;\n case \"test\":\n if (!empty($this->model->{'settings.test.username'})\n && !empty($this->model->{'settings.test.password'})\n && !empty($this->model->{'settings.test.signature'})\n )\n {\n return true;\n }\n break;\n default:\n break;\n }\n \n return false;\n }", "title": "" }, { "docid": "34363a6860fd45005bc9476efbbb068d", "score": "0.49504268", "text": "public function isTask($task = '')\n {\n if (request()->task === null) {\n throw new \\Exception('Task property is not found in current request.');\n }\n\n if (trim(request()->task) === '') {\n throw new \\Exception('Task is not defined or is defined as empty string/object');\n }\n\n if ($task === request()->task) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "534970759ccc33e8870ea84ef0da7b50", "score": "0.49493974", "text": "protected function isInWorkspace()\n\t{\n\t\treturn stristr(get_class($this->access_handler), \"workspace\");\n\t}", "title": "" }, { "docid": "44cdbc73ed1d53506c2230a87355564e", "score": "0.4940221", "text": "function task_get_security_types() {\n return array(\n 'private' => 'Private',\n 'protected' => 'Protected',\n 'public' => 'Public',\n );\n}", "title": "" }, { "docid": "45b7566d1ff411828c3394447760909b", "score": "0.49371758", "text": "public static function canConvertSettings()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "45b7566d1ff411828c3394447760909b", "score": "0.49371758", "text": "public static function canConvertSettings()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "45b7566d1ff411828c3394447760909b", "score": "0.49371758", "text": "public static function canConvertSettings()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "6f1a5ff4ccd048f4a811e0110a65fbb3", "score": "0.49370173", "text": "public function hasToolSettingsService()\n {\n\n $url = $this->getSetting('custom_link_setting_url');\n\n return !empty($url);\n\n }", "title": "" }, { "docid": "f63eb32a57f3b4362906fd55d84eb10a", "score": "0.49306542", "text": "public function isTypeInland(): bool;", "title": "" }, { "docid": "200685220f74934f517a169b36461f64", "score": "0.49056265", "text": "protected function filterTasks(): bool\n {\n if (empty($this->data['tasks'])) {\n return true;\n }\n if (empty($this->tasksToRun)) {\n return $this->filterNonDefaultTasks();\n } else {\n return $this->filterNonSelectedTasks();\n }\n }", "title": "" }, { "docid": "cde429ac059805cde590283d3ad4a86b", "score": "0.49049792", "text": "public function handles($type)\n {\n return strtolower($type ?? '') == 'local';\n }", "title": "" }, { "docid": "6c4b438461cabc2b155809362fff6417", "score": "0.48855996", "text": "public static function is_enabled( $type ){\n\t\t$location_types = get_option('dbem_location_types', array());\n\t\treturn !empty($location_types[$type]);\n\t}", "title": "" }, { "docid": "366dca4a7d4cd6c2353746a5d098619b", "score": "0.48850292", "text": "function getIsSystem() {\n return $this->is_system || parent::getIsSystem();\n }", "title": "" }, { "docid": "348935e301e8a4b1a3746f6d67f30be2", "score": "0.48810482", "text": "function woffice_current_user_can_check_task( $task, $project, $allowed_edit_project = null ) {\n\n\t if (!is_user_logged_in()) {\n return false;\n }\n\n\t\tif (is_null($allowed_edit_project)) {\n\t\t\t$allowed_edit_project = woffice_current_user_can_edit_project( $project->ID );\n\t\t}\n\n\t\t//if ($allowed_edit_project) {\n\t\t\t//$allowed_check = true;\n\t\t//} else {\n\t\t\t$allowed_check = (in_array(get_current_user_id(), $task['assigned']));\n\t\t//}\n\n\t /**\n * Filter if the current user can check a project task. By default every user who can edit a project, can also\n * check the tasks\n *\n * @param bool $allowed_check If the user can check the task or not\n * @param array $task\n * @param WP_Post $project\n * @param bool $allowed_edit_project If the current user is allowed to edit the project\n */\n\t\treturn apply_filters( 'woffice_allowed_check_project_task', $allowed_check, $task, $project, $allowed_edit_project );\n\t}", "title": "" }, { "docid": "172765314bba76d38f5345c1515c5244", "score": "0.48793548", "text": "function acf_validate_internal_post_type( $internal_post_type, $post_type_name ) {\n\t$instance = acf_get_internal_post_type_instance( $post_type_name );\n\n\tif ( ! $instance ) {\n\t\treturn false; // TODO: Should this return an empty array instead?\n\t}\n\n\treturn $instance->validate_post( $internal_post_type );\n}", "title": "" }, { "docid": "195dc86d2a5d99e848426a5c31db5bd1", "score": "0.48687238", "text": "public function is_plugin_settings() {\n\t\treturn isset( $_GET['post_type'] ) && 'wc_voucher' == $_GET['post_type'];\n\t}", "title": "" }, { "docid": "404521e5fbd9dd8487c143ba75d42b25", "score": "0.4863978", "text": "public function canUseInternal();", "title": "" }, { "docid": "d37185705db613a8b1363fae4ec9e3cb", "score": "0.48573306", "text": "public function isConfigured()\n {\n switch ($this->model->{'settings.mode'}) \n {\n case \"live\":\n case \"test\":\n if (!empty($this->model->{'settings.merchant_id'})\n && !empty($this->model->{'settings.access_code'})\n && !empty($this->model->{'settings.encryption_key'})\n )\n {\n return true;\n } \n break;\n default:\n break;\n }\n \n return false;\n }", "title": "" }, { "docid": "797a198f4aa190aaf1923a1c647e0cf6", "score": "0.48546118", "text": "protected function isGloballyActivated($a_type)\n\t{\n\n\t\tglobal $ilSetting;\n\t\tif (isset($this->check_global_activation[$a_type]) && $this->check_global_activation[$a_type])\n\t\t{\n\t\t\tif ($a_type == 'pdbookm')\n\t\t\t{\n\t\t\t\tif (!$ilSetting->get(\"disable_bookmarks\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse if ($a_type == 'pdnotes')\n\t\t\t{\n\t\t\t\tif (!$ilSetting->get(\"disable_notes\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\t\n\t\t\telseif($a_type == 'news')\n\t\t\t{\n\t\t\t\tinclude_once 'Services/Container/classes/class.ilContainer.php';\n\t\t\t\treturn \n\t\t\t\t\t$ilSetting->get('block_activated_news') &&\n\t\t\t\t\tilContainer::_lookupContainerSetting(\n\t\t\t\t\t\t\t$GLOBALS['ilCtrl']->getContextObjId(),\n\t\t\t\t\t\t\t'cont_show_news',\n\t\t\t\t\t\t\ttrue\n\t\t\t\t\t);\n\t\t\t}\n\t\t\telse if ($ilSetting->get(\"block_activated_\".$a_type))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telseif($a_type == 'cal')\n\t\t\t{\n\t\t\t\tinclude_once('./Services/Calendar/classes/class.ilCalendarSettings.php');\n\t\t\t\treturn ilCalendarSettings::lookupCalendarActivated($GLOBALS['ilCtrl']->getContextObjId());\n\t\t\t\t\n\t\t\t}\n\t\t\telseif($a_type == 'pdcal')\n\t\t\t{\n\t\t\t\tinclude_once('./Services/Calendar/classes/class.ilCalendarSettings.php');\n\t\t\t\treturn ilCalendarSettings::_getInstance()->isEnabled();\n\t\t\t}\n\t\t\telseif($a_type == \"tagcld\")\n\t\t\t{\n\t\t\t\t$tags_active = new ilSetting(\"tags\");\n\t\t\t\treturn (bool)$tags_active->get(\"enable\", false);\t\t\t\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d925b33189236751ff22416b5193d7ea", "score": "0.48499528", "text": "private static function isAccountInTesting()\n {\n if (!is_null(static::$isTesting)) {\n return static::$isTesting;\n }\n\n if ($isTesting = getenv('PAYU_ON_TESTING')) {\n return $isTesting;\n }\n\n return config('payu.payu_test');\n }", "title": "" }, { "docid": "e4a599b591c754832cf8ecc21f0aec1e", "score": "0.48469493", "text": "protected function is_base_request() {\n\t\t$vars = $_GET;\n\t\tunset( $vars['paged'] );\n\n\t\tif ( empty( $vars ) ) {\n\t\t\treturn true;\n\t\t} elseif ( 1 === count( $vars ) && ! empty( $vars['post_type'] ) ) {\n\t\t\treturn $this->screen->post_type === $vars['post_type'];\n\t\t}\n\n\t\treturn 1 === count( $vars ) && ! empty( $vars['mode'] );\n\t}", "title": "" }, { "docid": "a9efbaba4d4a26516026c65d885728a4", "score": "0.48412758", "text": "public static function is_our_admin_page()\n {\n global $typenow;\n return in_array($typenow, RP_WCEC::get_visible_post_types());\n }", "title": "" }, { "docid": "967c235b97380cea09fa7356615cbd11", "score": "0.48409387", "text": "function kbp_is_knowledgebase() {\n\n\tif ( is_singular( 'knowledgebase_item' ) || is_post_type_archive( 'knowledgebase_item' ) || is_tax( 'knowledgebase_tag' ) || is_tax( 'knowledgebase_category' ) ) {\n\t\t$is_knowledgebase_page = true;\n\t} else {\n\t\t$is_knowledgebase_page = false;\n\t}\n\n\treturn apply_filters( 'kbp_is_knowledgebase', $is_knowledgebase_page );\n}", "title": "" }, { "docid": "61858a5659d37830f955bae8304fad0a", "score": "0.48372516", "text": "function amt_check_portfolio_template(){\n\t$switch = false;\n\t\n\tif(is_singular('post')){\n\n\t\t//** get portfolio template meta\n\t\t$portfolio = get_field('post_type', get_the_ID() );\n\t\t\n\t\tif($portfolio ){\n\t\t\t$switch = true;\n\t\t}\n\t}\n\n\treturn $switch;\n\t\n}", "title": "" }, { "docid": "17f5ee9372b0d6b8e1953021adde01ff", "score": "0.48191568", "text": "protected function isTrackingActivatedInSettings(): bool\n {\n $configurationService = ObjectUtility::getConfigurationService();\n $settings = $configurationService->getTypoScriptSettings();\n return !empty($settings['tracking']['pagevisits']['_enable'])\n && $settings['tracking']['pagevisits']['_enable'] === '1';\n }", "title": "" }, { "docid": "42d2802730711ff293c9e27395cc55f6", "score": "0.48181093", "text": "public function getTask() {\n if (isset($_REQUEST['task']))\n return $_REQUEST['task'];\n else\n return false;\n }", "title": "" }, { "docid": "32e711358cf871e14c2192678fdfce90", "score": "0.48154807", "text": "private function filterNonDefaultTasks(): bool\n {\n foreach ($this->data['tasks'] as $i => $task) {\n if ((int)$task['run_by_default'] !== 1) {\n unset($this->data['tasks'][$i]);\n }\n }\n array_merge($this->data['tasks'], []);\n return true;\n }", "title": "" }, { "docid": "8bf7dc8f244e21dab4044c4d50fa7104", "score": "0.48151937", "text": "public function is_available( $settings ) {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "868b8e171a1d2d50c1d8c9673ecc7cca", "score": "0.48108664", "text": "public static function isWhat()\n\t{\n\t\tswitch(empty(static::$is))\n\t\t{\n\t\t\tcase true:\n\t\t\tstatic::$is = strtolower(array_pop(explode('\\\\', static::className())));\n\t\t\tbreak;\n\t\t}\n\t\treturn static::$is;\n\t}", "title": "" }, { "docid": "38840f2d442070a67594fa4b7a79a18e", "score": "0.4808092", "text": "protected function post_type_check() {\n\t\t\tglobal $pagenow, $typenow;\n\n\t\t\tif ( 'edit.php' === $pagenow ) {\n\t\t\t\tif ( ( ! empty( $typenow ) ) && ( $typenow === $this->post_type ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} elseif ( 'users.php' === $pagenow ) {\n\t\t\t\tif ( 'user' === $this->post_type ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "1a97291c7a42d437ffef14d5716c2d18", "score": "0.48042828", "text": "public function isEditable($setting)\n {\n $options = $this->getSettingOptions($setting);\n return $options['editable'];\n }", "title": "" }, { "docid": "3e580d6324591127d40659e7f8f6d4e3", "score": "0.480264", "text": "protected function define_my_settings() {\n // No particular settings for this activity\n }", "title": "" }, { "docid": "c61a6f06fa7d0eab5057a34a4d388771", "score": "0.4798176", "text": "public abstract function is_under_types_control();", "title": "" }, { "docid": "7e53126d4bb09bae683f3b9d30053be7", "score": "0.47959054", "text": "public function check_if_global() {\n\t\t$metaboxes = Kiwi_Social_Share_Helper::get_setting_value( 'custom_meta_boxes_posttypes', '' );\n\t\tif ( 'all' == $metaboxes ) {\n\t\t\t$this->global = true;\n\t\t}\n\t}", "title": "" }, { "docid": "edf5e0545060adff6ad603c494cc99bb", "score": "0.47930807", "text": "public static function is_network_active() {\n\t\tstatic $check;\n\t\tif ( is_bool( $check ) ) {\n\t\t\treturn $check;\n\t\t}\n\t\trequire_once ABSPATH . 'wp-admin/includes/plugin.php';\n\t\t$check = (bool) is_plugin_active_for_network( VIEW_ADMIN_AS_BASENAME );\n\t\treturn $check;\n\t}", "title": "" }, { "docid": "9f383bb0e59a95f58d8d52a39b967d0f", "score": "0.47829428", "text": "public function isInvisible()\r\n {\r\n return isset($this->config['is_invisible']) ? $this->config['is_invisible'] : false;\r\n }", "title": "" }, { "docid": "4ea1cc66e93b20d1cd84cfce35262f34", "score": "0.47816247", "text": "public function isInternal()\n {\n return false;\n }", "title": "" }, { "docid": "24871ca79dc4a4d80e094115c236f887", "score": "0.4775295", "text": "public function getIsInternalGoogleUser()\n {\n return $this->is_internal_google_user;\n }", "title": "" }, { "docid": "88f5a492b6fa22a43808977d187a7ad0", "score": "0.4773527", "text": "function should_execute(){\n \n // is a URI? (lame test for checking to see if we're viewing the CP or not)\n return isset($this->EE->uri->uri_string) &&\n $this->EE->uri->uri_string != '' &&\n \n // Freebie actually executes twice - but the second time,\n // the \"settings\" object isn't an array, which breaks it.\n // (No idea why). Checking type fixes this.\n gettype($this->settings) == 'array' &&\n \n // If the settings don't exist, don't check if they're blank\n (\n (\n isset($this->settings['to_ignore']) && \n $this->settings['to_ignore'] != ''\n ) || (\n isset($this->settings['ignore_beyond']) && \n $this->settings['ignore_beyond'] != '' \n )\n );\n \n }", "title": "" }, { "docid": "0f731dc52030c3722bd9ff33064b0f2f", "score": "0.47720623", "text": "protected function runTasks(string $type): bool\n {\n // Skip if no tasks defined\n if (empty($this->data['tasks'])) {\n return true;\n }\n\n // Skip if no tasks of given type defined:\n $typeTasks = [];\n foreach ($this->data['tasks'] as $task) {\n if ($task['type'] === $type) {\n array_push($typeTasks, $task);\n }\n }\n if (empty($typeTasks)) {\n return true;\n }\n\n // Skip if server is not ssh capable:\n if ($this->server->getType() !== 'ssh') {\n $this->logResponder->danger('Server not of type SSH. Skipping tasks.');\n return false;\n }\n\n // Execute tasks on server:\n $remotePath = $this->getRemotePath();\n foreach ($typeTasks as $task) {\n $command = 'cd ' . $remotePath . ' && ' . $task['command'];\n $this->logResponder->info('Executing task: ' . $task['name']);\n $response = $this->server->executeCommand($command);\n if ($response === false) {\n $this->logResponder->danger('Task failed.');\n } else {\n $this->logResponder->log($response);\n }\n }\n return true;\n }", "title": "" }, { "docid": "835564bb0fb715b8aa97aeb73c2d5921", "score": "0.4768495", "text": "public function isLocal(): bool;", "title": "" }, { "docid": "efbb0d92bbde6b1f04e4473dc430536c", "score": "0.4767293", "text": "protected function _useExternalAuth() {\n\t\treturn (bool)Hash::get($this->settings, 'externalAuth');\n\t}", "title": "" }, { "docid": "a8e4359a0668d59dd0b732500e00fa6c", "score": "0.4762477", "text": "public function manage_task( User $user, Task $task )\n {\n return $task->user->id === auth()->id();\n }", "title": "" }, { "docid": "2cd0fdf34c304f90c2fc5b6954e1e09c", "score": "0.4757033", "text": "function check_submission_display_settings($assessmenttype, $submission) {\n\n $settings = $this->get_groups_settings($assessmenttype, $submission->id);\n $course_settings = $this->get_groups_settings('course', $submission->course);\n\n // several options:\n // 1. there are no settings, so default to show\n // 2. there are settings and it is set to show by groups, so show, but only if the student\n // is in a group that is to be shown\n // 3. the settings say 'show'\n\n //echo \"submission display check\";\n\n if ($settings) {\n\n $displaywithoutgroups = ($settings->showhide == AMB_CONF_SHOW);\n $displaywithgroups = ($settings->showhide == AMB_CONF_GROUPS);\n $intherightgroup = $this->check_group_membership($settings->groups, $submission->userid);\n\n if ($displaywithoutgroups || ($displaywithgroups && $intherightgroup)) {\n return true;\n } else {\n // set to hidden, or in the wrong group\n return false;\n }\n\n } else {\n\n // check at course level for a default\n if ($course_settings) {\n\n $displaywithgroups = ($course_settings->showhide == AMB_CONF_GROUPS);\n $intherightgroup = $this->check_group_membership($course_settings->groups, $submission->userid);\n $displaywithoutgroups = ($course_settings->showhide == AMB_CONF_SHOW);\n\n if ($displaywithoutgroups || ($displaywithgroups && $intherightgroup)) {\n return true;\n } else {\n return false;\n }\n } else {\n // default to show if no settings saved yet.\n return true;\n }\n }\n }", "title": "" }, { "docid": "dbf5ba82a5c636973766d25fab28929a", "score": "0.47561443", "text": "protected function _hasTemplateSet() {\n return (bool)$this->getTemplate();\n }", "title": "" }, { "docid": "be00e788da79f078eab3c37eaf2aafa3", "score": "0.47520494", "text": "public function isLocal()\n\t{\n\t\t$local = 'League\\\\Flysystem\\\\Adapter\\\\Local';\n\t\treturn ($this->getAdapter()->getAdapter() instanceof $local);\n\t}", "title": "" }, { "docid": "4aa3a6e519d18f3f5cd3a516460f2230", "score": "0.4746397", "text": "public function isLocal()\n {\n return $this->local;\n }", "title": "" }, { "docid": "ec5b6fde30ba4d26f7c4104a88881839", "score": "0.47451502", "text": "public function isInternal() {\n if (strpos($this->link, JUri::root(), 0) === false) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "e11b2522c21d454b8c9ae1b42a956343", "score": "0.47396874", "text": "public static function get_settings() {\n static $plagiarismsettings;\n if (!empty($plagiarismsettings) || $plagiarismsettings === false) {\n return $plagiarismsettings;\n }\n $plagiarismsettings = (array)get_config('plagiarism_urkund');\n // Check if enabled.\n if (isset($plagiarismsettings['enabled']) && $plagiarismsettings['enabled']) {\n // Now check to make sure required settings are set!\n if (empty($plagiarismsettings['api'])) {\n debugging(\"URKUND API URL not set!\");\n return false;\n }\n return $plagiarismsettings;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "cb9bccbb4e7dfd7a4bca13aa4f111899", "score": "0.4736524", "text": "public function is_global() {\n\t\treturn (bool) $this->settings['global'];\n\t}", "title": "" }, { "docid": "7be58b1c452ed1ce7634a6280fd9224c", "score": "0.4734566", "text": "public function isControlValidationAudit() : bool\n {\n return $this->TaskType === 'control validation audit';\n }", "title": "" }, { "docid": "e2f5d5047efed2ffd085b759f7ea6e22", "score": "0.47297382", "text": "public function forThisInstance() {\n $asId = (isset($_REQUEST['asId'])) ? $this->sanitize($_REQUEST['asId']) : 'as0';\n $forThisInstance = ($asId == $this->config['asId']);\n return $forThisInstance;\n }", "title": "" }, { "docid": "5e2fe37db3137fe8f76668dd705f3d2a", "score": "0.4729448", "text": "public function userSettingsCheck()\n {\n return $this->settings;\n }", "title": "" }, { "docid": "0622a47c0e3a1477ac4a3649cda998bf", "score": "0.47241712", "text": "public function isLocal()\n {\n return $this->getIsLocal();\n }", "title": "" }, { "docid": "0a447786e181ac002b3e6d0c2afcb332", "score": "0.47237426", "text": "function is_internal() {\n return true;\n }", "title": "" }, { "docid": "b2e4c36ed9ec3213baa4e040e3b30801", "score": "0.47192904", "text": "public function evaluate() {\n $node = $this->getContextValue('node');\n $config = \\Drupal::config('scheduler.settings');\n return ($node->type->entity->getThirdPartySetting('scheduler', 'publish_enable', $config->get('default_publish_enable')));\n }", "title": "" }, { "docid": "7a85b5eb6ba3255707d5ebb75ca4d9bf", "score": "0.47173402", "text": "public function hasType()\n {\n return $this->get(self::TYPE) !== null;\n }", "title": "" }, { "docid": "129652621249ac05dbb6a44e8c0ee3c8", "score": "0.47154203", "text": "public function checkEnableSetting() {\r\n return Mage::getStoreConfig('storelocator/settings/active');\r\n }", "title": "" }, { "docid": "1275e5a22362f6a7797899456544baa2", "score": "0.471057", "text": "public function taskEnabled() {\n return true;\n }", "title": "" }, { "docid": "3c1528bf8411f0bc04de39bbcce64ab2", "score": "0.4710358", "text": "function checkTileConfig($tile,$tile_style)\n\t{\n\t#Returns whether the config is still on for these tiles\n\tswitch($tile_style)\n\t\t{\n\t\tcase \"thmsl\": \tglobal $home_themeheaders; return $home_themeheaders;\n\t\tcase \"theme\":\tglobal $home_themes; return $home_themes;\n\t\tcase \"mycol\":\tglobal $home_mycollections; return $home_mycollections;\n\t\tcase \"advsr\":\tglobal $home_advancedsearch; return $home_advancedsearch;\n\t\tcase \"mycnt\":\tglobal $home_mycontributions; return $home_mycontributions;\n\t\tcase \"hlpad\":\tglobal $home_helpadvice; return $home_helpadvice;\n\t\tcase \"custm\":\tglobal $custom_home_panels; return isset($custom_home_panels)? checkConfigCustomHomePanels($tile,$tile_style) : FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "183f518309069f786307d16b423043ca", "score": "0.47061267", "text": "function is_communityservice() {\n\treturn apply_filters( 'is_communityservice', is_task() );\n}", "title": "" }, { "docid": "a8c8973fafa62179174f9cdce2322464", "score": "0.47048932", "text": "function hasPermission( $task )\n\t{\n\t\t// get logged in user\n\t\t$auth\t\t=& Factory::getAuth();\n\t\t\n\t\tif ($auth->level == 'admin') {\n\t\t\treturn true;\t// always\n\t\t}\n\t\t\n\t\tif (isset($this->_perms['user'][$task][$auth->id])) {\n\t\t\treturn $this->_perms['user'][$task][$auth->id];\n\t\t}\n\t\telse {\n\t\t\tif (isset($this->_perms['role'][$task][$auth->level])) {\n\t\t\t\treturn $this->_perms['role'][$task][$auth->level];\n\t\t\t}\n\t\t}\n\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "53b5af82e6851cac2645fc38c3f50acc", "score": "0.47024822", "text": "public function taskAccess() {\n return true;\n }", "title": "" }, { "docid": "bd0e78ca88773e6840bd37ec142db1e7", "score": "0.46945176", "text": "function autoparts_trx_addons_allow_theme_icons($allow, $post_type) {\n\t\t$screen = function_exists('get_current_screen') ? get_current_screen() : false;\n\t\treturn $allow\n\t\t\t\t\t|| (defined('TRX_ADDONS_CPT_LAYOUTS_PT') && $post_type==TRX_ADDONS_CPT_LAYOUTS_PT)\n\t\t\t\t\t|| (!empty($screen->id) && in_array($screen->id, array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'appearance_page_trx_addons_options',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'profile'\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)\n\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "3323c512e73088d7a506d84a9f15ef3d", "score": "0.46920097", "text": "public static function isInternalType($typeName)\n {\n self::initTypeToExtension();\n\n $normalizedName = ltrim($typeName, '\\\\');\n $normalizedName = strtolower($normalizedName);\n\n return isset(self::$typeNameToExtension[$normalizedName]);\n }", "title": "" }, { "docid": "b78869136669502159fb49c5aa5e0fdd", "score": "0.46908134", "text": "public function is_internal() {\n return false;\n }", "title": "" }, { "docid": "9d4b44d9ad0114095ee672bf3dd400c6", "score": "0.46855432", "text": "static function getTask($task)\n {\n if (!count(static::$customtasks)) {\n static::registerBuiltinTasks();\n }\n\n if ($pos = strpos($task, ':')) {\n $task = substr($task, $pos + 1);\n }\n\n if (isset(static::$customtasks[$task])) {\n $test = static::$customtasks[$task]['class'];\n if (class_exists($test, true)) {\n return $test;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "fba75cdb43cedcc7c9550dbd88eef515", "score": "0.46838874", "text": "public function is($type):bool;", "title": "" } ]
74572b55c4ab2c3e16899436df055bc9
Bootstrap the application events.
[ { "docid": "a524283bc511d7d36136539ca73ad4c7", "score": "0.0", "text": "public function boot()\r\n\t{\r\n\t\t$this->package('vespakoen/epi');\r\n\t}", "title": "" } ]
[ { "docid": "5c2c90b069f2f331b064a4c3edc2a739", "score": "0.7562798", "text": "public function boot()\n\t{\n\t\t//\n $this->initializeAdminMenu();\n \\Event::listen('language:activated', function() {\n //$this->initializeFrontendMenu();\n });\n\t}", "title": "" }, { "docid": "0d65b5bd98d8e210883acf638fe9ad85", "score": "0.7535958", "text": "public function boot()\n {\n parent::boot();\n $this->registerEventsAndListeners();\n //\n }", "title": "" }, { "docid": "f0b7534e3fe4f2b292078cfeab12bafc", "score": "0.7534149", "text": "public static function boot ()\n {\n parent::boot();\n self::observe(new EventTriggerObserver());\n }", "title": "" }, { "docid": "dd4bddb1962f572dd49fddd683d63a44", "score": "0.75322044", "text": "public function boot()\n {\n parent::boot();\n\n // 手动注册事件(通配符事件监听器 —— 监听多个事件)\n Event::listen('event.test.*',function ($event, $param) {\n Log::info('通配符事件监听器 eventName = ' . $event . '&params = ' . json_encode($param));\n });\n\n /***\n * Swoole应用级别系统事件\n */\n // laravels.received_request\n Event::listen('laravels.received_request', function (Request $request, $app) {\n $request->query->set('get_key', 'swoole-get-param');// 修改 GET 请求参数\n $request->request->set('post_key', 'swoole-post-param'); // 修改 POST 请求参数\n });\n // laravels.generated_response\n Event::listen('laravels.generated_response', function (Request $request, Response $response, $app) {\n $response->headers->set('header-key', 'swoole-header-xiaoyongzi');\n });\n\n }", "title": "" }, { "docid": "4d30601b218076f5eca042683e58af46", "score": "0.7498963", "text": "public static function boot ()\n {\n parent::boot();\n self::observe(new EventDetailObserver());\n }", "title": "" }, { "docid": "774cded18972a57e88b9fc52d388d4c3", "score": "0.7456812", "text": "public function boot()\n {\n parent::boot();\n\n $events = app('events');\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "ddc002244ad3e1deea741bf8fce264b9", "score": "0.7424904", "text": "public function boot()\n { \n $this->registerTranslation();\n\t\t\n\t\t$this->registerViews();\n\n $this->fireEvent('boot');\n }", "title": "" }, { "docid": "6c22a7f1d2c29d71ccdd520403bcbc34", "score": "0.73948425", "text": "public function boot()\n {\n //\n Event::observe(EventObserver::class);\n Gradelist::observe(GradelistObserver::class);\n Admin::observe(AdminObserver::class);\n }", "title": "" }, { "docid": "6a3a0c689b29dc9071a93c23f0aae101", "score": "0.7367923", "text": "public function boot()\n {\n \n\t\t//nothing to do here //\n }", "title": "" }, { "docid": "1e61c1610bced6a1c985fe841f27a5e0", "score": "0.7347657", "text": "public function boot()\n {\n // Don't add anything here, they will become noodles.\n }", "title": "" }, { "docid": "6e794229feab07a0f516026323462fc3", "score": "0.73456776", "text": "public static function boot()\n {\n parent::boot();\n\n // Add event callbacks\n self::addEventCallbacks(['creat', 'delet', 'hydrat', 'restor', 'sav', 'updat', 'validat']);\n }", "title": "" }, { "docid": "9f025110c8d639e26eb5c89e15ed5240", "score": "0.7314844", "text": "public function boot()\r\n\t{\r\n\t\t$this->publishConfig();\r\n\t\t$this->app->booted(function () {\r\n\t\t\t$this->routes();\r\n\t\t});\r\n\r\n\t\tNova::serving(function (ServingNova $event) {\r\n\t\t\tNova::script('custom-table', __DIR__ . '/../dist/js/card.js');\r\n\t\t\tNova::style('custom-table', __DIR__ . '/../dist/css/card.css');\r\n\t\t});\r\n\t}", "title": "" }, { "docid": "d0fa2b0a920d3e6d99ab80f96b5f182b", "score": "0.7310622", "text": "public function boot()\n\t{\n\t\t$this->app->ajax();\n\t}", "title": "" }, { "docid": "459d4ef5c64e5f472489c2a619dc6a0c", "score": "0.7294293", "text": "public function boot()\n {\n $this->loadRoutesFrom(\n $this->app->make('path.checkin').'/router.php'\n );\n\n // Register Bootstraper API event.\n $this->app->make(BootstrapAPIsEventer::class)->listen('v2', function () {\n return [\n 'checkin' => (bool) $this->app->make(ConfigRepository::class)->get('checkin.open'),\n 'checkin:attach_balance' => (int) $this->app->make(ConfigRepository::class)->get('checkin.attach_balance'),\n ];\n });\n\n // Register manage menu.\n $this->registerManageMenu();\n }", "title": "" }, { "docid": "9a4479dd99b4a98189ade7003a9eb5ed", "score": "0.7290396", "text": "public function boot()\n\t{\n\t\t//Call function composerSidebar\n\t\t$this->composerMenu();\t\n\t\t\n\t}", "title": "" }, { "docid": "e75bc8a3036c854111379b87a5974835", "score": "0.72779536", "text": "public function boot()\n {\n $this->site();\n $this->theme();\n $this->map();\n //$this->countries();\n $this->about_section();\n $this->slider();\n $this->payment();\n $this->gallery_categories();\n $this->menu();\n $this->recipes();\n }", "title": "" }, { "docid": "3170f7e80fc6578557fd6b40cb57d32e", "score": "0.7270118", "text": "public function boot()\n\t{\n\t\tModel::setConnectionResolver($this->app['lmongo']);\n\n\t\tModel::setEventDispatcher($this->app['events']);\n\t}", "title": "" }, { "docid": "6ef03098d5f224ef500f100b620d5ded", "score": "0.7255912", "text": "public function boot()\n {\n foreach ($this->listens() as $event => $listeners) {\n foreach ($listeners as $listener) {\n Event::listen($event, $listener);\n }\n }\n\n foreach ($this->subscribe as $subscriber) {\n Event::subscribe($subscriber);\n }\n\n $this->loadViewsFrom(__DIR__.'/../../resources/views', 'nike');\n\n $this->loadMigrationsFrom(__DIR__.'/../../migrations');\n\n $this->loadRoutesFrom(__DIR__.'/../../routes/web.php');\n $this->loadRoutesFrom(__DIR__.'/../../routes/api.php');\n\n $this->authBoot();\n\n $this->schedule();\n\n\n }", "title": "" }, { "docid": "266b3f0a127982f2338da2c6359bd5e2", "score": "0.7253006", "text": "public function boot()\n {\n \tBladeExtensions::run();\n }", "title": "" }, { "docid": "47a5ae407e52ecc436d75f11c6287896", "score": "0.7251552", "text": "public function boot()\n {\n DownloaderData::observe(DownloaderDataObserver::class);\n }", "title": "" }, { "docid": "15a244e75c2a9d1db252e9b1e855582e", "score": "0.72486305", "text": "protected function boot()\n {\n }", "title": "" }, { "docid": "3792b14be0d4943d6953a8c1dded4ecb", "score": "0.72472703", "text": "public function boot() {\n\t\tModel::setConnectionResolver($this->app['db']);\n\t\tModel::setEventDispatcher($this->app['events']);\n\t}", "title": "" }, { "docid": "0a248b1b719aeab12f943728a23ccece", "score": "0.7229835", "text": "protected function boot()\n {\n // load all apps into the local container\n $this->injectAppPackages();\n\n // Load all app preferences\n $this->loadPreferences();\n }", "title": "" }, { "docid": "3ccd1bd84e7d3f63fad8cbb30c13b9ce", "score": "0.7226627", "text": "public function boot()\n {\n Todo::observe(TodoObserver::class);\n }", "title": "" }, { "docid": "3ffa1a12975a4f9ed7a03fa7b797f536", "score": "0.7214553", "text": "public function boot(): void\n {\n $this->configureCommands();\n $this->configureObservers();\n $this->configurePublishing();\n }", "title": "" }, { "docid": "84ea149fed4869794cace846ae11d058", "score": "0.72133565", "text": "public function bootstrap()\n {\n $this->_bootstrapDefaults();\n $this->_bootstrapInit();\n }", "title": "" }, { "docid": "f3ebab0784d6fe3ab84c9afeba616bc5", "score": "0.72053045", "text": "public function boot()\n {\n ProgramStudi::observe(GlobalObserver::class);\n Matakuliah::observe(GlobalObserver::class);\n Peminat::observe(GlobalObserver::class);\n Jadwal::observe(GlobalObserver::class);\n KelompokDosen::observe(GlobalObserver::class);\n ProcessItem::observe(GlobalObserver::class);\n ProcessLog::observe(GlobalObserver::class);\n SemesterDetail::observe(GlobalObserver::class);\n }", "title": "" }, { "docid": "bea37d97d9382df1404dd5a303588095", "score": "0.71798104", "text": "public function boot()\n {\n $this->strapPublishers();\n }", "title": "" }, { "docid": "ad16bd6a7378192ac3edb0ca83bb1401", "score": "0.7174883", "text": "protected static function boot()\n {\n }", "title": "" }, { "docid": "65457bc889f1f80088a846b642414418", "score": "0.7170186", "text": "public function boot()\n\t{\n\t\t// \n\t}", "title": "" }, { "docid": "dbf8621493a5b8070e3b256b92dee31a", "score": "0.7169864", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "25ba654f6b34afd3bf69dd215ca47cf1", "score": "0.7163119", "text": "public function boot()\n {\n $this->setupConfig();\n }", "title": "" }, { "docid": "64015f6a3024f9a20560665cb57c087b", "score": "0.71562934", "text": "public function boot()\n {\n $this->registerFrontMenu();\n $this->registerViewComposerData();\n }", "title": "" }, { "docid": "559ec9dd64df8d751ff20a9e8a3970c4", "score": "0.71517885", "text": "public function boot()\n {\n Blade::include('includes.styles', 'styles');\n Blade::include('includes.scripts', 'scripts');\n Blade::component('components.navbar', 'navbar');\n Blade::component('components.logo', 'logo');\n Blade::component('components.footer', 'footer');\n Blade::component('components.book-now', 'bookNow');\n }", "title": "" }, { "docid": "bdaa0465f471a0f91e053be16409d69f", "score": "0.7147341", "text": "public function boot()\n {\n Model::setConnectionResolver($this->app['db']);\n\n Model::setEventDispatcher($this->app['events']);\n }", "title": "" }, { "docid": "e070af37dd8d36f12632f83d3cc13257", "score": "0.7142414", "text": "public function boot()\n\t{\n\t\t// If the event classes exist, then register the event listeners.\n\t\tif (class_exists(RequestSending::class) && class_exists(ResponseReceived::class)) {\n\t\t\t$this->bootHttpClientEvents();\n\t\t}\n\t}", "title": "" }, { "docid": "c5b79a3f53ca9923e22f29d34363a43d", "score": "0.71420807", "text": "public function boot()\n {\n $this->setupConfig();\n\n }", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "8b2994ae8bb53a4cc3befeb14a5962bd", "score": "0.7141121", "text": "public function boot()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "6185c8641db082efaba0c542b9bc7235", "score": "0.71364754", "text": "public function boot() {\n \n }", "title": "" }, { "docid": "78f8c7ff85b9a1248b7a2abbd573af79", "score": "0.7133657", "text": "public function boot()\n {\n $this->registerConfig();\n $this->registerTranslations();\n $this->registerViews();\n User::observe(new UserObserver());\n Role::observe(new RoleObserver());\n Permission::observe(new PermissionObserver());\n $this->setMenu();\n $this->registerWidget();\n }", "title": "" }, { "docid": "8295036a51e280e53a6b800269bf2700", "score": "0.7131584", "text": "public function boot()\n {\n $this->configurePublishing();\n $this->configureRoutes();\n $this->configureCommands();\n }", "title": "" }, { "docid": "451b97646aeb185c4af5bf1ac3b47030", "score": "0.71300775", "text": "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/../resources/views' , 'zoroaster-log-viewer');\n\n $this->app->booted(function(){\n $this->routes();\n });\n\n Zoroaster::SidebarMenus([\n MenuItem::make()->route('Zoroaster-log-viewer.getListLogs' , 'مشاهدی خطاها')->icon('file-2')->gate('Zoroaster-log-viewer')\n ]);\n\n\n }", "title": "" }, { "docid": "4ed1cb97dcdaedd86b9f11d86ac21fc8", "score": "0.712981", "text": "public function boot()\n {\n helper('filesystem');\n\n $this->saveInAdmin();\n\n if ($this->inAdmin) {\n $this->setupMenus();\n }\n\n $this->discoverCoreModules();\n $this->initModules();\n }", "title": "" }, { "docid": "d08f67fe2a276da3b27584f0b455e1a0", "score": "0.7122046", "text": "public function boot()\n {\n Paginator::useBootstrapThree();\n }", "title": "" }, { "docid": "d08f67fe2a276da3b27584f0b455e1a0", "score": "0.7122046", "text": "public function boot()\n {\n Paginator::useBootstrapThree();\n }", "title": "" }, { "docid": "a18d963f886c71f3d74da83423e99390", "score": "0.71195215", "text": "public function boot()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "de233a96fbea3ea7960cc80b6cbbdf3c", "score": "0.71140784", "text": "public function boot()\n {\n $this->handleConfigs();\n $this->handleMigrations();\n\n if (!App::runningInConsole()) {\n $this->handleEvents();\n }\n }", "title": "" }, { "docid": "a1b045b847a92aa0fa60b2dc1cd10c49", "score": "0.71076196", "text": "protected static function boot()\n\t{\n\t\tparent::boot();\n\t\t\n\t\tRole::observe(RoleObserver::class);\n\t}", "title": "" }, { "docid": "0f513d2a39a702bf0fdc300a8860bae6", "score": "0.71012026", "text": "public function boot()\n {\n $this->publishMigrations();\n $this->publishConfig();\n $this->bootBlade();\n $this->bootCommands();\n }", "title": "" }, { "docid": "4ef1195a2068cfd127cdd77b87207f56", "score": "0.7099937", "text": "public function boot()\n {\n Employer::observe(EmployerObserver::class);\n Application::observe(ApplicationObserver::class);\n }", "title": "" }, { "docid": "a0dc114edfdf9e82b946922f790f961d", "score": "0.7098305", "text": "public function boot(): void\n {\n // Load dependencies\n require_once __DIR__ . '/../vendor/autoload.php';\n\n $this->handleRoutes();\n $this->handleViews();\n $this->handleInstances();\n }", "title": "" }, { "docid": "efe2d3f7bf29e8c60d88594b617faf78", "score": "0.70928043", "text": "public function boot()\n {\n \n // Register configs, migrations, etc\n $this->registerDirectories();\n\n // // COloquei no register pq nao tava reconhecendo as rotas para o adminlte\n // $this->app->booted(function () {\n // $this->routes();\n // });\n\n $this->loadLogger();\n }", "title": "" }, { "docid": "0d6358be1aa9030cb8fda359b682ec74", "score": "0.7085716", "text": "public function boot()\n {\n $this->handleConfig();\n $this->handleEvents();\n $this->handleCommands();\n $this->handleMigrations();\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.7081477", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.7081477", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.7081477", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "9b79eee2223d277de4236424a96989cb", "score": "0.7081477", "text": "public function boot() {\n //\n }", "title": "" }, { "docid": "78a9f193a75b4e1c159d46f546e931c9", "score": "0.70714855", "text": "public function boot()\n {\n parent::boot();\n\n Event::listen('amuu\\Events\\OrderCreated', function(OrderCreated $event)\n {\n // Handle the event...\n Log::debug('Provider EventServiceProvider::boot with Event::listen of amuu\\Events\\OrderCreated, fired by Event::fire(new OrderCreated($msg) in NewOrderController ');\n Log::debug($event->getMessage());\n\n });\n\n DB::listen(function ($query) {\n Log::debug($query->sql);\n Log::debug($query->bindings);\n Log::debug($query->time);\n });\n\n }", "title": "" }, { "docid": "54e60e9f7920593958f2b348f14ff5b4", "score": "0.70698017", "text": "public function boot()\n {\n if (!App::runningInBackend()) {\n return;\n }\n Event::listen('backend.page.beforeDisplay', function($controller, $action, $params) {\n $controller->addJs('/plugins/web/hotel/assets/js/script.js');\n });\n }", "title": "" }, { "docid": "68a455a27cc722a5d14e62d3c8f84d8e", "score": "0.70689005", "text": "public function boot()\n {\n Listing::observe(ListingObserver::class);\n Game::observe(GameObserver::class);\n User::observe(UserObserver::class);\n MenuItem::observe(MenuItemObserver::class);\n Language::observe(LanguageObserver::class);\n Wishlist::observe(WishlistObserver::class);\n }", "title": "" }, { "docid": "99013e122b30e89752a1684b553a847b", "score": "0.70663214", "text": "public function boot()\n {\n parent::boot();\n // به این صورت هم میشه برای یک رویداد شنود نوشت\n // Event::listen( RegisterUserEvent::class, function( RegisterUserEvent $event ) {\n // \\Log::info( 'Send Email to Wellcome User' );\n // } );\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7064686", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7064686", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7064686", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "e3b2fdd9e96922a7e6bb9e323b2f857f", "score": "0.7060973", "text": "public function boot()\n {\n $this->setupConfig();\n $this->extendSocialite();\n }", "title": "" }, { "docid": "3b22a22916fd058bda594b862bb8bfb2", "score": "0.70554847", "text": "public function boot()\n {\n $this->shareCurrentUser();\n\n $this->shareMenus();\n }", "title": "" }, { "docid": "daf906ea50697acb24d3bb847043cb29", "score": "0.7051609", "text": "public function boot()\n {\n Event::listen('backend.menu.extendItems', function($manager)\n {\n $manager->addSideMenuItems('RainLab.User', 'user', [\n 'bree7e.cris.import' => [\n 'label' => 'Импорт авторов',\n 'url' => Backend::url('bree7e/cris/authors/import'),\n 'icon' => 'icon-sign-in',\n 'permissions' => ['bree7e.cris.import_authors'],\n 'order' => 200,\n ]\n ]);\n }); \n }", "title": "" }, { "docid": "14cd54d71539d5c5a5253200364c8fd7", "score": "0.7047419", "text": "public function boot()\n {\n if (!$this->app->routesAreCached()) {\n require __DIR__ . '/routes.php';\n }\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'crm-launcher');\n $this->loadTranslationsFrom(__DIR__ . '/../lang', 'crm-launcher');\n $this->publish();\n $this->registerCommands();\n }", "title": "" }, { "docid": "e0a48b23487c8b7e957d419ae63f2c59", "score": "0.7043049", "text": "public function boot()\n {\n //\n\n Node::saving(function($node){\n echo 'saving event is fired<br>';\n });\n\n Node::creating(function($node){\n echo 'creating event is fired<br>';\n });\n\n Node::created(function($node){\n echo 'created event is fired<br>';\n });\n\n Node::saved(function($node){\n echo 'saved event is fired<br>';\n });\n }", "title": "" }, { "docid": "190700a448d204362cdc738f04808a17", "score": "0.70411414", "text": "public function boot()\n {\n Schema::defaultStringLength(191);\n\n// if ($this->app->environment() === 'local') {\n// if (isset($_SERVER['REQUEST_METHOD'], $_SERVER['REQUEST_URI'])) {\n// file_put_contents('php://stdout',\n// \"\\e[33m[HTTP::{$_SERVER['REQUEST_METHOD']} \\e[0m{$_SERVER['REQUEST_URI']}\\n\");\n// }\n//\n// DB::listen(function (QueryExecuted $event) {\n// file_put_contents('php://stdout', \"\\e[34m{$event->sql}\\t\\e[37m\" .\n// json_encode($event->bindings) . \"\\t\\e[32m{$event->time}ms\\e[0m\\n\");\n// });\n// }\n }", "title": "" }, { "docid": "7dec4b3c1350bbb3b863965186a382e3", "score": "0.7039959", "text": "public function boot()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "6417f2ec80bc831c77c045b8795250b9", "score": "0.70388", "text": "public function boot()\n\t{\n\t}", "title": "" }, { "docid": "63b059d5aff5b1f4b1b5991ec307c6c6", "score": "0.70381194", "text": "public function boot()\n\t{\n\t\tPivot::creating(function($event) {\n \\Log::info(\"Creating pivot...\");\n });\n\t}", "title": "" }, { "docid": "857498383109b7fb7e575250c48514b6", "score": "0.7038053", "text": "public function boot() {\n\t\t//\n\t}", "title": "" }, { "docid": "857498383109b7fb7e575250c48514b6", "score": "0.7038053", "text": "public function boot() {\n\t\t//\n\t}", "title": "" }, { "docid": "7f5dcb885489f4f8a770c99945ca2014", "score": "0.7036767", "text": "public function boot()\n {\n Dataset::observe(DatasetObserver::class);\n }", "title": "" }, { "docid": "86560a1db825d6f6a85c243ccf8193f3", "score": "0.70359457", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "86560a1db825d6f6a85c243ccf8193f3", "score": "0.70359457", "text": "public function boot()\n {\n //\n }", "title": "" }, { "docid": "f3392674642b5c52447edf7577985294", "score": "0.70358866", "text": "public function boot()\n {\n $this->putPHPToJavaScript();\n }", "title": "" }, { "docid": "1de513ef0e1bd8139f648a1bcd2bb9f2", "score": "0.7030657", "text": "public function boot()\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "30a34b8e01a8b46c10687732290018bc", "score": "0.702913", "text": "public function boot()\n {\n $this->publishAssets();\n }", "title": "" }, { "docid": "a0ee2fa62c7c8bdf4ada4fff0d02cba9", "score": "0.7028536", "text": "public function boot()\n {\n News::observe(NewsObserver::class);\n Gallery::observe(GalleryObserver::class);\n Place::observe(PlaceObserver::class);\n Afisha::observe(AfishaObserver::class);\n CultureDetails::observe(CultureDetailsObserver::class);\n }", "title": "" }, { "docid": "077417006a0d1af0cd50f11f84873791", "score": "0.7027676", "text": "public function boot(): void\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n EventsListCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "title": "" } ]
0707bf3a9bd026a179b81179ef0a4721
Add the roles configs to the loaded grids
[ { "docid": "4ddabf865dcd5aa89afba0c5547c53c8", "score": "0.6968743", "text": "public function addRolesConfigToResult()\n {\n $roles = $this->getResource()->getGridRoles($this->_getGridIds());\n return $this->_addArrangedValuesToResult($roles, 'roles_config');\n }", "title": "" } ]
[ { "docid": "cd71cb5f5a7699be85ae8b8b1d7cc2fe", "score": "0.65343034", "text": "public function add_user_roles() {\r\n\t\tarray_walk( $this->config, function ( $role_key ) {\r\n\t\t\tadd_role(\r\n\t\t\t\t$role_key['role'],\r\n\t\t\t\t$role_key['display_name'],\r\n\t\t\t\t$role_key['capabilities']\r\n\t\t\t);\r\n\t\t} );\r\n\t}", "title": "" }, { "docid": "f22bbf9f4d6dc9a5ca7e62beb3a380b0", "score": "0.6529361", "text": "function roles(){\n\t\t$this->load->model('role');\n\t\t$data['roles'] = $this->role->getAll('role ASC');\n\t\t$this->load->model('permission');\n\t\t$data['permissions'] = $this->permission->getAll('permission ASC');\t\t\n\t\t$this->load->view('admin/roleconfig', $data);\n\t}", "title": "" }, { "docid": "3a04cb059a4b6d67237ac584d7bc698c", "score": "0.62982947", "text": "private function populate()\n {\n $data = require __DIR__ . '/data/user_roles.php';\n\n foreach($data as $datum){\n $role_id = DB::table('roles')->where('name', '=', $datum['role_name'])->first()->id;\n\n DB::table('users')\n ->where('id', $datum['id'])\n ->update(['role_id' => $role_id]);\n }\n }", "title": "" }, { "docid": "846927de812ddb2bc045c91c14a5c249", "score": "0.61857986", "text": "private function assignRoles() {\n\t\tif(isset($_SESSION['AAT']['debug']) && $_SESSION['AAT']['debug'] === 1) {\n $this->oDebugLog->addLog('message','Access','assignRoles','in');\n }\n\t\t$this->oMusa->emptyTable('aat_user_role_map');\n $aKeys = array();\n // extract keys with the pattern \\d:\\d\n $aKeys = $this->oQS->getMatchingKeys('\\:');\n if (count($aKeys) > 0) {\n // if keys were found, insert rows\n foreach ($aKeys as $key) {\n list($uid, $rid) = preg_split(\"/\\:/\", $key);\n $aRow = array('aat_user_role_map', $uid, $rid);\n $this->oMusa->insertRow($aRow);\n $aRow = array();\n }\n $this->sMsg = 'Role assignments have been updated.';\n } else { $this->sMsg = 'No user:role keys'; }\n }", "title": "" }, { "docid": "c81c6b37c04bb97ed688448514e9fa58", "score": "0.61736315", "text": "public function setupRoles();", "title": "" }, { "docid": "de5f3dd719b4de0c25a8d8331b6c3097", "score": "0.5804971", "text": "private function insertRoles()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('acl_roles')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $roles = config('users.roles');\n\n // Add any data to the table.\n DB::table('acl_roles')->insert($roles);\n }", "title": "" }, { "docid": "75cd6ab2dad488b0197c621cdea7385f", "score": "0.5803568", "text": "public function configuracionRoles(){\n $super_administrador = array(\n \"directorio\" => \"Directorio Telefónico\",\n \"main\" => \"Cambio de Contraseña\",\n 'usuario' => array(\n \"usershow\" => \"Ver Usuario\",\n \"usermod\" => \"Modificar Usuario\",\n \"useradd\" => \"Agregar Usuario\"),\n 'configuracion' => array(\n 'confdominios' => \"Dominios\",\n 'confpermisos' => 'Permisos'\n )\n );\n $administradores = array(\n \"directorio\" => \"Directorio Telefónico\",\n \"main\" => \"Cambio de Contraseña\",\n 'usuario' => array(\n \"usershow\" => \"Ver Usuario\",\n \"usermod\" => \"Modificar Usuario\",\n \"useradd\" => \"Agregar Usuario\")\n );\n\n $tecnicos = array(\n \"directorio\" => \"Directorio Telefónico\",\n \"main\" => \"Cambio de Contraseña\",\n 'usuario' => array(\"usershow\" => \"Ver Usuario\")\n );\n\n $usuarios = array(\n \"directorio\" => \"Directorio Telefónico\",\n \"main\" => \"Cambio de Contraseña\"\n ); \n }", "title": "" }, { "docid": "d1d7f5e13be288310b9e22dcea160800", "score": "0.5795353", "text": "public function setup_roles_section() {\n \t$ta = (isset($this->options['rubric_evaluation_roles_settings']['rubric_evaluation_roles_settings']['rubric_evaluation_role_ta']) ? \n\t \t$this->options['rubric_evaluation_roles_settings']['rubric_evaluation_roles_settings']['rubric_evaluation_role_ta'] :\n\t \t'editor');\n \t$student = (isset($this->options['rubric_evaluation_roles_settings']['rubric_evaluation_roles_settings']['rubric_evaluation_role_student']) ? \n\t \t$this->options['rubric_evaluation_roles_settings']['rubric_evaluation_roles_settings']['rubric_evaluation_role_student'] :\n\t \t'author');\n \t$teacher = (isset($this->options['rubric_evaluation_roles_settings']['rubric_evaluation_roles_settings']['rubric_evaluation_role_teacher']) ? \n\t \t$this->options['rubric_evaluation_roles_settings']['rubric_evaluation_roles_settings']['rubric_evaluation_role_teacher'] :\n\t \t'administrator');\n \t\n \t//settings API display fields\n \tadd_settings_section(\n\t \t'rubric_evaluation_section_roles',\n\t \t__('Role Assignment', 'ctlt_rubric_evaluation'),\n\t \tarray( $this, 'print_section_info'),\n\t \t'rubric_evaluation_settings_role'\n \t);\n \t\n \tadd_settings_field(\n\t \t'rubric_evaluation_role_teacher', // ID\n\t \t__(\"Teacher's Role\", 'ctlt_rubric_evaluation'), // Title\n\t \tarray( $this, 'output_roles'),\n\t \t'rubric_evaluation_settings_role', // Page\n\t \t'rubric_evaluation_section_roles', // Section\n\t \tarray('rubric_evaluation_role_teacher', $this->_get_role('rubric_evaluation_role_teacher', $teacher), 'disabled')\n \t);\n \t\n \tadd_settings_field(\n\t \t'rubric_evaluation_role_ta', // ID\n\t \t__(\"TA's Role\", 'ctlt_rubric_evaluation'), // Title\n\t \tarray( $this, 'output_roles'),\n\t \t'rubric_evaluation_settings_role', // Page\n\t \t'rubric_evaluation_section_roles', // Section\n\t \tarray('rubric_evaluation_role_ta', $this->_get_role('rubric_evaluation_role_ta', $ta))\n \t);\n \t\n \tadd_settings_field(\n\t \t'rubric_evaluation_role_student', // ID\n\t \t__(\"Student's Role\", 'ctlt_rubric_evaluation'), // Title\n\t \tarray( $this, 'output_roles'),\n\t \t'rubric_evaluation_settings_role', // Page\n\t \t'rubric_evaluation_section_roles', // Section\n\t \tarray('rubric_evaluation_role_student', $this->_get_role('rubric_evaluation_role_student', $student))\n \t);\n \t \n \tregister_setting(\n\t \t'rubric_evaluation_roles', // Option group\n\t \t'rubric_evaluation_roles_settings', // Option name\n\t \tarray( $this, 'sanitize_roles' ) // Sanitize\n \t);\n }", "title": "" }, { "docid": "cb8f3dfa24570b07350187f8648cceb3", "score": "0.55961215", "text": "protected function setup(){\n $this->sp_permissions = DB::table('sp_permissions')->pluck('name');\n\n // get all available roles\n $this->roles = DB::table('roles')->get();\n\n foreach($this->roles as $rr){\n $this->role_names[] = $rr['name'];\n $this->role_ids[] = $rr['id'];\n }\n }", "title": "" }, { "docid": "8d6d0a603013a6f3eb74e2b90c1aa10b", "score": "0.556998", "text": "public function initialize()\n {\n $this->setSource('tc_acl_roles');\n $this->hasMany('id', 'Models\\Resource', 'id_role', ['alias' => 'resources']);\n $this->hasMany('id', 'Models\\AdminMenu', 'id_role', ['alias' => 'adminTabs']);\n $this->hasMany('id', 'Models\\Employee', 'id_role', ['alias' => 'employees']);\n }", "title": "" }, { "docid": "89238a7a28f2b19ce8bfbc45fea106bb", "score": "0.554422", "text": "public function roles_index()\n\t{\n\t\tpermittedArea();\n\t\t$data['roles'] = singleDbTableRow('roles');\n\n\t\ttheme('roles_index', $data);\n\t}", "title": "" }, { "docid": "1cd8a3c3f2d6e7c8a6aa490148782506", "score": "0.5540669", "text": "public function add_roles_capabilities() {\n\t\t$this->add_role_administrator_capabilities();\n\t\t$this->add_role_editor_capabilities();\n\t\t$this->add_role_cooker_capabilities();\n\t}", "title": "" }, { "docid": "2d672cf33b54f1bfdd17100786ab1ba1", "score": "0.54874575", "text": "protected function loadGroupRoles()\n {\n\n $db = $this->getDb();\n\n /// TODO add this in an external datasource\n // Load User Rights\n $sql = 'SELECT\n buiz_role_group.rowid,\n buiz_role_group.m_parent,\n buiz_role_group.name ,\n buiz_role_group.access_key ,\n buiz_role_group.level\n from\n buiz_role_group\n join\n buiz_group_users on buiz_role_group.rowid = buiz_group_users.id_group\n where\n buiz_group_users.id_user = '.$this->userId.'\n and buiz_group_users.id_area is null\n and buiz_group_users.vid is null\n ';\n\n $roles = $db->select($sql);\n\n foreach ($roles as $role) {\n\n $this->groupRoles[$role['access_key']] = $role['rowid'];\n\n if ($role['level'] > $this->userLevel)\n $this->userLevel = $role['level'];\n\n // if we have a parent load him\n if ($role['m_parent'])\n $this->loadGroupParents($role['m_parent']);\n\n }//end foreach */\n\n }", "title": "" }, { "docid": "c52ea5992a7f33a24d87063819a8b594", "score": "0.54635113", "text": "public function addRoles(array $roles)\n {\n }", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5459921", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5459921", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5459921", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5459921", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5459921", "text": "public function roles();", "title": "" }, { "docid": "a4eb024a41943a67094bca1f023e5300", "score": "0.5447536", "text": "public function action_UpgradeWizard_map_roles()\n {\n $this->view = 'maproles';\n }", "title": "" }, { "docid": "f296659d4ec81c22f86a08281b6e7a75", "score": "0.5425956", "text": "public function loadPanels(): void\n {\n foreach ($this->getConfig('panels') as $panel => $enabled) {\n [$panel, $enabled] = is_numeric($panel) ? [$enabled, true] : [$panel, $enabled];\n if ($enabled) {\n $this->registry->load($panel);\n }\n }\n }", "title": "" }, { "docid": "152b23daa2d208f4fee69fab5a9839ed", "score": "0.5425099", "text": "public function initAcl() {\n\n // get config\n $aclConfig = $this->config['application']['acl'];\n\n // init resources\n foreach ($aclConfig['resources'] as $resource) {\n if (!$this->acl->hasResource($resource)) {\n $this->acl->addResource(new Acl\\Resource\\GenericResource($resource));\n }\n }\n\n // init roles\n foreach ($aclConfig['roles'] as $key => $role) {\n\n $this->acl->addRole($role);\n\n // init allow actions\n if (array_key_exists('allow', $aclConfig) &&\n array_key_exists($role, $aclConfig['allow'])\n ) {\n\n foreach ($aclConfig['allow'][$role] as $resource => $actions) {\n foreach ($actions as $action) {\n $this->acl->allow($role, $resource, $action);\n }\n\n if ($this->acl->hasResource('mvc:' . $resource)) {\n $this->acl->allow($role, 'mvc:' . $resource);\n }\n }\n }\n\n // init deny actions\n if (array_key_exists('deny', $aclConfig) &&\n array_key_exists($role, $aclConfig['deny'])\n ) {\n\n foreach ($aclConfig['deny'][$role] as $resource => $actions) {\n foreach ($actions as $action) {\n $this->acl->allow($role, $resource, $action);\n }\n\n if ($this->acl->hasResource('mvc:' . $resource)) {\n $this->acl->allow($role, 'mvc:' . $resource);\n }\n }\n }\n }\n\n // set acl to layout\n $this->layout()->setVariable('acl', $this->acl);\n\n $this->layout()->setVariable('mainnaviLinks', $this->_getMainnaviLinks());\n\n // set user role to layout\n if ($this->auth && $this->auth->getIdentity()) {\n\n $this->layout()->setVariables(array(\n 'userName' => $this->auth->getIdentity()->getName(),\n 'userLogoutUrl' => $this->url()->fromRoute('home/default', array(\n 'controller' => 'auth',\n 'action' => 'logout'\n )),\n 'userRole' => $this->auth->getIdentity()->getRole()\n ));\n }\n }", "title": "" }, { "docid": "8c316cd6b0647bbe22e63eb489efa788", "score": "0.54228973", "text": "public function loadRoles(Event $e)\r\n {\r\n $rbac = $e->getRbac();\r\n $roles = $this->options->getRoles();\r\n $result = array();\r\n\r\n foreach($roles as $role => $parents) {\r\n if (is_numeric($role)) {\r\n $role = $parents;\r\n $parents = array();\r\n }\r\n if (empty($parents)) {\r\n $result[0][] = $role;\r\n }\r\n foreach($parents as $parent) {\r\n $result[$parent][] = $role;\r\n }\r\n }\r\n\r\n $this->recursiveRoles($rbac, $result);\r\n }", "title": "" }, { "docid": "8f79f8e0e540377c83ff0c0b46adbb3d", "score": "0.5409358", "text": "function pmprommr_setup_role() {\r\n\tremove_role('pmpro_membership_manager');\t//in case we updated the caps below\r\n\tadd_role('pmpro_membership_manager', 'Membership Manager', array(\r\n 'pmpro_memberships_menu' => true,\r\n\t\t'pmpro_edit_memberships' => true,\r\n 'pmpro_membershiplevels' => true,\r\n\t\t'pmpro_pagesettings' => true,\r\n 'pmpro_emailsettings' => true,\r\n\t\t'pmpro_paymentsettings' => true, \t\t\r\n 'pmpro_advancedsettings' => true, \r\n 'pmpro_addons' => true,\r\n\t\t'pmpro_memberslist' => true,\r\n 'pmpro_memberslistcsv' => true, \r\n 'pmpro_reports' => true,\r\n\t\t'pmpro_orders' => true,\r\n 'pmpro_orderscsv' => true,\r\n\t\t'pmpro_discountcodes' => true,\r\n\t\t'pmpro_approvals' => true,\r\n 'read' => true,\r\n\t\t'list_users' => true,\r\n\t\t'add_users' => true,\r\n\t\t'remove_users' => true,\r\n\t\t'create_users' => true,\r\n\t\t'delete_users' => true,\r\n\t\t'promote_users' => true,\r\n\t\t'edit_users' => true,\r\n ));\r\n}", "title": "" }, { "docid": "068efba23a6c14d2e86d897b1cfbf143", "score": "0.53846735", "text": "protected function _getAvailableRoles() {\n\t\tif ($this->_roles !== null) {\n\t\t\treturn $this->_roles;\n\t\t}\n\n\t\t$rolesTableKey = $this->getConfig('rolesTable');\n\t\tif (!$rolesTableKey) {\n\t\t\tthrow new CakeException('Invalid/missing rolesTable config');\n\t\t}\n\n\t\t$roles = Configure::read($rolesTableKey);\n\t\tif (is_array($roles)) {\n\t\t\tif ($this->getConfig('superAdminRole')) {\n\t\t\t\t$key = $this->getConfig('superAdmin') ?: 'superadmin';\n\t\t\t\t$roles[$key] = $this->getConfig('superAdminRole');\n\t\t\t}\n\n\t\t\tif (!$roles) {\n\t\t\t\tthrow new CakeException('Invalid roles config: No roles found in config.');\n\t\t\t}\n\n\t\t\treturn $roles;\n\t\t}\n\n\t\t$roles = $this->_getRolesFromDb($rolesTableKey);\n\t\tif ($this->getConfig('superAdminRole')) {\n\t\t\t$key = $this->getConfig('superAdmin') ?: 'superadmin';\n\t\t\t/** @var int $value */\n\t\t\t$value = $this->getConfig('superAdminRole');\n\t\t\t$roles[$key] = $value;\n\t\t}\n\n\t\tif (count($roles) < 1) {\n\t\t\tthrow new CakeException('Invalid TinyAuth role setup (roles table `' . $rolesTableKey . '` has no roles)');\n\t\t}\n\n\t\t$this->_roles = $roles;\n\n\t\treturn $roles;\n\t}", "title": "" }, { "docid": "86aae4f41cc8fbf0fd7a89490f267dce", "score": "0.53809375", "text": "public function initializePanels(): void\n {\n foreach ($this->registry->loaded() as $panel) {\n $this->registry->{$panel}->initialize();\n }\n }", "title": "" }, { "docid": "fb8263493d18a7eec4b8fb63d8f242cd", "score": "0.5371664", "text": "protected function loadConfigs(){\n\n\t\tConfig::bind('root', $this->root);\n\n\t\t// load all config files\n\n\t\tforeach ( glob( $this->root . '/configs/*.php' ) as $filename):\n\n\t\t\t$name = basename($filename, '.php');\n\n\t Config::bind($name, $value = require $filename);\n\n\t\tendforeach;\n\t}", "title": "" }, { "docid": "277167374a991edc6bf021b93fcfe701", "score": "0.5365777", "text": "protected function wp_roles_reinit() {\n global $wp_roles, $wp_user_roles;\n \n $wp_user_roles = null;\n $wp_roles->roles = array();\n $wp_roles->role_objects = array();\n $wp_roles->role_names = array();\n $wp_roles->use_db = true;\n\n require_once(ABSPATH . '/wp-admin/includes/schema.php');\n populate_roles();\n $wp_roles = new WP_Roles();\n \n $this->roles = $this->lib->get_user_roles();\n \n }", "title": "" }, { "docid": "d4137bf47ff0bcc9902888ac05a42492", "score": "0.5351349", "text": "private function cargueRoles()\n {\n $roles = self::Roles();\n\n foreach ($roles as $rol)\n factory(App\\Models\\Rol::class, 1)->create(['nombre_rol' => $rol]);\n\n echo \"CARGUE DE ROLES FINALIZADA\\n\";\n }", "title": "" }, { "docid": "8aad755192a4945f8ea2e2138629315b", "score": "0.5345751", "text": "public function refreshRoles()\n {\n $this->roles = null;\n $this->contextHash = null;\n $this->getRoles();\n }", "title": "" }, { "docid": "c362ce1ecef89848cba39cddde591c72", "score": "0.5328228", "text": "public function add_site_roles($attributes) {\n\n global $vce;\n\n // find out which class is calling to this method\n $trace = debug_backtrace();\n // our calling class is:\n $calling_class = $trace[1]['class'];\n // cycle through current to create an array to check against for existing role_names\n $site_roles = json_decode($vce->site->roles, true);\n foreach ($site_roles as $each_current) {\n $current_roles[strtolower($each_current['role_name'])] = true;\n }\n // cycle through new\n foreach ($attributes as $each_addition) {\n if (isset($each_addition['role_name'])) {\n // check if role_name already exists\n if (!isset($current_roles[strtolower($each_addition['role_name'])])) {\n // new array each time though\n $new_role = array();\n $new_role['role_name'] = $each_addition['role_name'];\n // check if permissions and then add\n $new_role['role_hierarchy'] = isset($each_addition['role_hierarchy']) ? $each_addition['role_hierarchy'] : 0;\n if (isset($each_addition['permissions'])) {\n $new_role['permissions'] = array(\n $calling_class => $each_addition['permissions'],\n );\n }\n // add new role to site_roles\n $site_roles[] = $new_role;\n }\n }\n }\n // update site_roles in site_meta table\n $update = array('meta_value' => json_encode($site_roles));\n $update_where = array('meta_key' => 'roles');\n $vce->db->update('site_meta', $update, $update_where);\n\n }", "title": "" }, { "docid": "8b9003e6c802b2b3071412ecb7e4cd9d", "score": "0.52945834", "text": "protected function updateRoles(): void\n {\n $authManager = Yii::$app->authManager;\n $userRoles = $authManager->getRolesByUser($this->user_id);\n $userRoleNames = array_keys($userRoles);\n\n $toAdd = array_diff($this->_roles, $userRoleNames);\n $toRemove = array_diff($userRoleNames, $this->_roles);\n\n foreach ($toAdd as $role) {\n $authManager->assign($authManager->getRole($role), $this->user_id);\n }\n\n foreach ($toRemove as $role) {\n $authManager->revoke($userRoles[$role], $this->user_id);\n }\n }", "title": "" }, { "docid": "a0e6c3196fb57e648d931ccc14687bd0", "score": "0.52887136", "text": "public function setRoles($roles): void\n {\n $this->_roles = $roles;\n }", "title": "" }, { "docid": "80634128518b20d76ef500391648688e", "score": "0.52683425", "text": "abstract public function setupGrid();", "title": "" }, { "docid": "f37af8e1411937763015b091883f1280", "score": "0.5252437", "text": "public function roleList() {\n\n $sql = 'SELECT SRR.id, SRR.name, SRR.importance, SRRI.alt_name, SRRI.description\n FROM shop_rbac_roles SRR\n INNER JOIN shop_rbac_roles_i18n SRRI ON SRRI.id = SRR.id WHERE SRRI.locale = \"' . MY_Controller::getCurrentLocale() . '\" ORDER BY SRR.name ASC';\n $query = $this->db->query($sql);\n\n $this->template->add_array(array(\n 'model' => $query->result(),\n ));\n\n $this->template->show('roleList', FALSE);\n }", "title": "" }, { "docid": "4c62cd31f488cc4fa87d6a9ef4f15327", "score": "0.5242707", "text": "protected function load() {\n\t\t\t$groups = array(self::GROUP_HEADER, self::GROUP_FOOTER);\n\t\t\tforeach($groups as $group) {\n\t\t\t\t$items = $this->config->get($group);\n\n\t\t\t\tforeach($items as $item => $params) {\n\t\t\t\t\t$this->group($group)->add($item, $params);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t# -- reset group\n\t\t\t$this->group(self::GROUP_HEADER);\n\t\t}", "title": "" }, { "docid": "427bc7b870bcbe9dd1aec7a6953f6758", "score": "0.5236204", "text": "protected function rolesPermissionsSeeder(){\n RoleResourcesAccess::create([\n 'role_code' => 'adm',\n 'resource_code' => Resource::$resource_code,\n 'rules' => json_encode([\n 'c' => true,\n 'r' => true,\n 'u' => true,\n 'd' => true\n ])\n ]);\n // Enable access to administrators to manipulate with role's permissions\n RoleResourcesAccess::create([\n 'role_code' => 'adm',\n 'resource_code' => RoleResourcesAccess::$resource_code,\n 'rules' => json_encode([\n 'c' => true,\n 'r' => true,\n 'u' => true,\n 'd' => true\n ])\n ]);\n // Enable access to administrators to manipulate with users permissions\n RoleResourcesAccess::create([\n 'role_code' => 'adm',\n 'resource_code' => UserResourcesAccess::$resource_code,\n 'rules' => json_encode([\n 'c' => true,\n 'r' => true,\n 'u' => true,\n 'd' => true\n ])\n ]);\n // Enable access to administrators to manipulate with msps\n RoleResourcesAccess::create([\n 'role_code' => 'adm',\n 'resource_code' => Msp::$resource_code,\n 'rules' => json_encode([\n 'c' => true,\n 'r' => true,\n 'u' => true,\n 'd' => true\n ])\n ]);\n // Enable access to administrator to manipulate with accounts\n RoleResourcesAccess::create([\n 'role_code' => 'adm',\n 'resource_code' => Msp::$resource_code,\n 'rules' => json_encode([\n 'c' => true,\n 'r' => true,\n 'u' => true,\n 'd' => true\n ])\n ]);\n\n RoleResourcesAccess::create([\n 'role_code' => 'user',\n 'resource_code' => Resource::$resource_code,\n 'rules' => json_encode([\n 'c' => false,\n 'r' => false,\n 'u' => false,\n 'd' => false\n ])\n ]);\n }", "title": "" }, { "docid": "0dbabd337117f7fa15ff95981b66e8ad", "score": "0.5235964", "text": "public function configure()\n {\n return $this->afterCreating(function (User $user) {\n if ($this->numberOfRoles > 0) {\n $roles = Role::factory()\n ->hasPermissions()\n ->count($this->numberOfRoles)\n ->create();\n $user->assignRole($roles->pluck('name')->all());\n }\n if ($this->numberOfPermissions > 0) {\n $permissions = Permission::factory()\n ->count($this->numberOfPermissions)\n ->create();\n $user->givePermissionTo($permissions->pluck('name')->all());\n }\n $user->load('roles', 'permissions');\n });\n }", "title": "" }, { "docid": "342f4eb3973b5e4f06e919ab9dfc0261", "score": "0.52296126", "text": "public function actionRoles()\n\t{\n\t\t$dataProvider = new RightsAuthItemDataProvider('roleTable', CAuthItem::TYPE_ROLE, array(\n\t\t\t'sortable'=>array(\n\t\t\t\t'id'=>'RightsRoleTableSort',\n\t\t\t\t'element'=>'.roleTable',\n\t\t\t\t'url'=>$this->createUrl('authItem/processSortable'),\n\t\t\t),\n\t\t));\n\t\t// Render the view\n\t\t$this->render('roles', array(\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'isBizRuleEnabled'=>$this->_module->enableBizRule,\n\t\t\t'isBizRuleDataEnabled'=>$this->_module->enableBizRuleData,\n\t\t));\n\t}", "title": "" }, { "docid": "5526345aa79be0ba9dc3770aeb9a0520", "score": "0.52178013", "text": "public function setRoles(array $roles);", "title": "" }, { "docid": "5526345aa79be0ba9dc3770aeb9a0520", "score": "0.52178013", "text": "public function setRoles(array $roles);", "title": "" }, { "docid": "5526345aa79be0ba9dc3770aeb9a0520", "score": "0.52178013", "text": "public function setRoles(array $roles);", "title": "" }, { "docid": "8cbf513be25f0f800df9104172c73253", "score": "0.5208401", "text": "protected function _setRoles()\n {\n /** @var $role Mage_Api2_Model_Acl_Global_Role */\n foreach ($this->_getRolesCollection() as $role) {\n $this->addRole($role->getId());\n }\n return $this;\n }", "title": "" }, { "docid": "219ddcea18535cf927ea0cc1f3b4090d", "score": "0.5204187", "text": "public function Roles()\n\t\t{\n\t\t\t//data tiene toda la informacion de nuestra vista\n\t\t\t$data['page_id'] = 3;\n\t\t\t$data['page_tag'] = \"Roles Usuario\";\n\t\t\t$data['page_name']= \"rol_usuario\";\n\t\t\t$data['page_title'] = \"Roles Usuario <small> Tienda Virtual</samall>\";\n\t\t\t$data['page_functions_js'] = \"functions_roles.js\";\n\t\t\t$this->views->getView($this,\"roles\",$data);//con roles llamamos a la vista View/Roles/roles.php\n\t\t}", "title": "" }, { "docid": "64b15727f5a9d446d70922ed37d160d9", "score": "0.51863176", "text": "public function run()\n {\n RoleRoute::insert([\n ['role_id' => 1, 'name' => 'admin.dashboard'],\n ['role_id' => 1, 'name' => 'admin.comp-add-bal'],\n ['role_id' => 1, 'name' => 'admin.comp-sub-bal'],\n ['role_id' => 2, 'name' => 'admin.setting.index'],\n ['role_id' => 2, 'name' => 'admin.setting.store'],\n ['role_id' => 2, 'name' => 'admin.setting.update'],\n ['role_id' => 2, 'name' => 'admin.setting.edit'],\n ['role_id' => 2, 'name' => 'admin.setting.destroy'],\n ['role_id' => 2, 'name' => 'admin.setting.show'],\n ['role_id' => 3, 'name' => 'admin.profile.index'],\n ['role_id' => 3, 'name' => 'admin.profile.store'],\n ['role_id' => 3, 'name' => 'admin.profile.store'],\n ['role_id' => 3, 'name' => 'admin.profile.update'],\n ['role_id' => 3, 'name' => 'admin.profile.edit'],\n ['role_id' => 3, 'name' => 'admin.profile.destroy'],\n ['role_id' => 3, 'name' => 'admin.profile.show'],\n ['role_id' => 4, 'name' => 'admin.account-approval.index'],\n ['role_id' => 4, 'name' => 'admin.account-approval.store'],\n ['role_id' => 4, 'name' => 'admin.account-approval.update'],\n ['role_id' => 4, 'name' => 'admin.account-approval.edit'],\n ['role_id' => 4, 'name' => 'admin.account-approval.destroy'],\n ['role_id' => 4, 'name' => 'admin.account-approval.show'],\n ['role_id' => 5, 'name' => 'admin.product.index'],\n ['role_id' => 5, 'name' => 'admin.product.store'],\n ['role_id' => 5, 'name' => 'admin.product.update'],\n ['role_id' => 5, 'name' => 'admin.product.edit'],\n ['role_id' => 5, 'name' => 'admin.product.destroy'],\n ['role_id' => 5, 'name' => 'admin.product.show'],\n ['role_id' => 5, 'name' => 'admin.image.destroy'],\n ['role_id' => 5, 'name' => 'admin.image.update'],\n ['role_id' => 6, 'name' => 'admin.category.index'],\n ['role_id' => 6, 'name' => 'admin.category.store'],\n ['role_id' => 6, 'name' => 'admin.category.update'],\n ['role_id' => 6, 'name' => 'admin.category.edit'],\n ['role_id' => 6, 'name' => 'admin.category.destroy'],\n ['role_id' => 6, 'name' => 'admin.category.show'],\n ['role_id' => 7, 'name' => 'admin.subcategory.index'],\n ['role_id' => 7, 'name' => 'admin.subcategory.store'],\n ['role_id' => 7, 'name' => 'admin.subcategory.update'],\n ['role_id' => 7, 'name' => 'admin.subcategory.edit'],\n ['role_id' => 7, 'name' => 'admin.subcategory.destroy'],\n ['role_id' => 7, 'name' => 'admin.subcategory.show'],\n ['role_id' => 8, 'name' => 'admin.user.index'],\n ['role_id' => 8, 'name' => 'admin.user.store'],\n ['role_id' => 8, 'name' => 'admin.user.update'],\n ['role_id' => 8, 'name' => 'admin.user.edit'],\n ['role_id' => 8, 'name' => 'admin.user.destroy'],\n ['role_id' => 8, 'name' => 'admin.user.show'],\n ['role_id' => 8, 'name' => 'admin.user.addbalance'],\n ['role_id' => 8, 'name' => 'admin.user.subbalance'],\n ['role_id' => 8, 'name' => 'admin.user-accounts'],\n ['role_id' => 8, 'name' => 'admin.order.user'],\n ['role_id' => 9, 'name' => 'admin.vendor.index'],\n ['role_id' => 9, 'name' => 'admin.vendor.store'],\n ['role_id' => 9, 'name' => 'admin.vendor.update'],\n ['role_id' => 9, 'name' => 'admin.vendor.edit'],\n ['role_id' => 9, 'name' => 'admin.vendor.destroy'],\n ['role_id' => 9, 'name' => 'admin.vendor.show'],\n ['role_id' => 9, 'name' => 'admin.addbalance'],\n ['role_id' => 9, 'name' => 'admin.subbalance'],\n ['role_id' => 9, 'name' => 'admin.vendorproducts'],\n \n ['role_id' => 10, 'name' => 'admin.gateway.index'],\n ['role_id' => 10, 'name' => 'admin.gateway.store'],\n ['role_id' => 10, 'name' => 'admin.gateway.update'],\n ['role_id' => 10, 'name' => 'admin.gateway.edit'],\n ['role_id' => 10, 'name' => 'admin.gateway.destroy'],\n ['role_id' => 10, 'name' => 'admin.gateway.show'],\n ['role_id' => 11, 'name' => 'admin.deposit-method.index'],\n ['role_id' => 11, 'name' => 'admin.deposit-method.store'],\n ['role_id' => 11, 'name' => 'admin.deposit-method.update'],\n ['role_id' => 11, 'name' => 'admin.deposit-method.edit'],\n ['role_id' => 11, 'name' => 'admin.deposit-method.destroy'],\n ['role_id' => 11, 'name' => 'admin.deposit-method.show'],\n ['role_id' => 12, 'name' => 'admin.withdrawmethod.index'],\n ['role_id' => 12, 'name' => 'admin.withdrawmethod.store'],\n ['role_id' => 12, 'name' => 'admin.withdrawmethod.update'],\n ['role_id' => 12, 'name' => 'admin.withdrawmethod.edit'],\n ['role_id' => 12, 'name' => 'admin.withdrawmethod.destroy'],\n ['role_id' => 12, 'name' => 'admin.withdrawmethod.show'],\n ['role_id' => 13, 'name' => 'admin.contact.create'],\n ['role_id' => 13, 'name' => 'admin.contact.index'],\n ['role_id' => 13, 'name' => 'admin.contact.store'],\n ['role_id' => 13, 'name' => 'admin.contact.update'],\n ['role_id' => 13, 'name' => 'admin.contact.edit'],\n ['role_id' => 13, 'name' => 'admin.contact.destroy'],\n ['role_id' => 13, 'name' => 'admin.contact.show'],\n ['role_id' => 14, 'name' => 'admin.admins.index'],\n ['role_id' => 14, 'name' => 'admin.admins.store'],\n ['role_id' => 14, 'name' => 'admin.admins.update'],\n ['role_id' => 14, 'name' => 'admin.admins.edit'],\n ['role_id' => 14, 'name' => 'admin.admins.destroy'],\n ['role_id' => 14, 'name' => 'admin.admins.show'],\n ['role_id' => 15, 'name' => 'admin.coupon.index'],\n ['role_id' => 15, 'name' => 'admin.coupon.store'],\n ['role_id' => 15, 'name' => 'admin.coupon.update'],\n ['role_id' => 15, 'name' => 'admin.coupon.edit'],\n ['role_id' => 15, 'name' => 'admin.coupon.destroy'],\n ['role_id' => 15, 'name' => 'admin.coupon.show'],\n ['role_id' => 16, 'name' => 'admin.terms'],\n ['role_id' => 16, 'name' => 'admin.refund'],\n ['role_id' => 16, 'name' => 'admin.aboutus'],\n ['role_id' => 16, 'name' => 'admin.replacement'],\n ['role_id' => 16, 'name' => 'admin.howitworks'],\n ['role_id' => 16, 'name' => 'admin.privacy'],\n ['role_id' => 16, 'name' => 'admin.save_terms'],\n ['role_id' => 16, 'name' => 'admin.save_refund'],\n ['role_id' => 16, 'name' => 'admin.save_replacement'],\n ['role_id' => 16, 'name' => 'admin.save_privacy'],\n ['role_id' => 16, 'name' => 'admin.save_howitworks'],\n ['role_id' => 16, 'name' => 'admin.save_aboutus'],\n ['role_id' => 17, 'name' => 'admin.blog.create'],\n ['role_id' => 17, 'name' => 'admin.blog.index'],\n ['role_id' => 17, 'name' => 'admin.blog.store'],\n ['role_id' => 17, 'name' => 'admin.blog.update'],\n ['role_id' => 17, 'name' => 'admin.blog.edit'],\n ['role_id' => 17, 'name' => 'admin.blog.destroy'],\n ['role_id' => 17, 'name' => 'admin.blog.show'],\n ['role_id' => 18, 'name' => 'admin.order.pending'],\n ['role_id' => 18, 'name' => 'admin.add-comment'],\n ['role_id' => 18, 'name' => 'admin.order.accepted'],\n ['role_id' => 18, 'name' => 'admin.order.rejected'],\n ['role_id' => 18, 'name' => 'admin.order.dispatched'],\n ['role_id' => 18, 'name' => 'admin.order.ready'],\n ['role_id' => 18, 'name' => 'admin.order.readyToShip'],\n ['role_id' => 18, 'name' => 'admin.order.delivered'],\n ['role_id' => 18, 'name' => 'admin.order.history'],\n ['role_id' => 18, 'name' => 'admin.order.details'],\n ['role_id' => 18, 'name' => 'admin.order.index'],\n ['role_id' => 18, 'name' => 'admin.order.status.accept'],\n ['role_id' => 18, 'name' => 'admin.order.status.deliver'],\n ['role_id' => 18, 'name' => 'admin.order.status.dispatch'],\n ['role_id' => 18, 'name' => 'admin.order.status.reject'],\n ['role_id' => 19, 'name' => 'admin.transaction.user'],\n ['role_id' => 19, 'name' => 'admin.transaction.vendor'],\n ['role_id' => 20, 'name' => 'admin.withdraw-account.index'],\n ['role_id' => 20, 'name' => 'admin.withdraw-account.store'],\n ['role_id' => 20, 'name' => 'admin.withdraw-account.update'],\n ['role_id' => 20, 'name' => 'admin.withdraw-account.edit'],\n ['role_id' => 20, 'name' => 'admin.withdraw-account.destroy'],\n ['role_id' => 20, 'name' => 'admin.withdraw-account.show'],\n ['role_id' => 20, 'name' => 'admin.accept'],\n ['role_id' => 20, 'name' => 'admin.reject'],\n ['role_id' => 20, 'name' => 'admin.accept'],\n ['role_id' => 20, 'name' => 'admin.accept'],\n ['role_id' => 21, 'name' => 'admin.withdraw.index'],\n ['role_id' => 21, 'name' => 'admin.withdraw.store'],\n ['role_id' => 21, 'name' => 'admin.withdraw.update'],\n ['role_id' => 21, 'name' => 'admin.withdraw.edit'],\n ['role_id' => 21, 'name' => 'admin.withdraw.destroy'],\n ['role_id' => 21, 'name' => 'admin.withdraw.show'],\n ['role_id' => 21, 'name' => 'admin.withdraw.accept'],\n ['role_id' => 21, 'name' => 'admin.withdraw.reject'],\n ['role_id' => 21, 'name' => 'admin.withdraw.account.accept'],\n ['role_id' => 21, 'name' => 'admin.withdraw.account.reject'],\n ['role_id' => 22, 'name' => 'admin.slider.index'],\n ['role_id' => 22, 'name' => 'admin.slider.store'],\n ['role_id' => 22, 'name' => 'admin.slider.update'],\n ['role_id' => 22, 'name' => 'admin.slider.edit'],\n ['role_id' => 22, 'name' => 'admin.slider.destroy'],\n ['role_id' => 22, 'name' => 'admin.slider.show'],\n ['role_id' => 23, 'name' => 'admin.banner.index'],\n ['role_id' => 23, 'name' => 'admin.banner.store'],\n ['role_id' => 23, 'name' => 'admin.banner.update'],\n ['role_id' => 23, 'name' => 'admin.banner.edit'],\n ['role_id' => 23, 'name' => 'admin.banner.destroy'],\n ['role_id' => 23, 'name' => 'admin.banner.show'],\n ['role_id' => 24, 'name' => 'admin.newsletter'],\n ['role_id' => 24, 'name' => 'admin.sendnewsletter'],\n ['role_id' => 25, 'name' => 'admin.ticket.index'],\n ['role_id' => 25, 'name' => 'admin.ticket.store'],\n ['role_id' => 25, 'name' => 'admin.ticket.update'],\n ['role_id' => 25, 'name' => 'admin.ticket.edit'],\n ['role_id' => 25, 'name' => 'admin.ticket.destroy'],\n ['role_id' => 25, 'name' => 'admin.ticket.show'],\n ['role_id' => 25, 'name' => 'admin.reply.store'],\n ['role_id' => 25, 'name' => 'admin.get-tickets'],\n ['role_id' => 26, 'name' => 'admin.news-ticker.index'],\n ['role_id' => 26, 'name' => 'admin.news-ticker.update'],\n ['role_id' => 27, 'name' => 'admin.tax.index'],\n ['role_id' => 27, 'name' => 'admin.tax.store'],\n ['role_id' => 28, 'name' => 'admin.accountDashboard'],\n ['role_id' => 28, 'name' => 'admin.transaction.company'],\n \n ]);\n }", "title": "" }, { "docid": "79d1c410ff29aa3e5d562db0a07ae78e", "score": "0.5170463", "text": "public function run()\n {\n $role_admin = Role::where('name', 'admin')->first();\n $users = config('user');\n foreach ($users as $user) {\n $user = User::create($user);\n $user->roles()->attach($role_admin);\n }\n }", "title": "" }, { "docid": "0f1c9650de2c02095b94c8985b2733da", "score": "0.5160623", "text": "public function setRoles(ArrayCollection $roles)\n {\n $this->roles = $roles;\n }", "title": "" }, { "docid": "a8c292ea8ea9996cddf74aa69735a11f", "score": "0.5150166", "text": "protected function initRoles() { \n\n $conn = new mysqli(\"localhost\", \"root\", \"dragonballz1\", \"mega_power\");\n\n // Check connection\n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n } \n\n $sql = \"SELECT t1.role_id, t2.role_name FROM user_role as t1\n JOIN roles as t2 ON t1.role_id = t2.role_id\n WHERE t1.user_id = \".$this->user_id.\";\";\n $result = $conn->query($sql);\n $this->roles = array();\n if (!$result) {\n trigger_error('Invalid query: ' . $conn->error);\n } \n\n\n if ($result->num_rows > 0) {\n // output data of each row\n while($row = $result->fetch_assoc()) {\n $this->roles[$row[\"role_name\"]] = Role::getRolePerms($row[\"role_id\"]);\n }\n } \n else \n {\n echo \"0 results\";\n }\n}", "title": "" }, { "docid": "8dde68e09dc3c39ce304507eafde7d6e", "score": "0.5143945", "text": "protected function update_roles() {\n global $wp_roles;\n \n $multisite = $this->lib->get( 'multisite' );\n if ( $multisite && $this->lib->is_super_admin() && $this->apply_to_all ) { \n // update Role for all blogs/sites in the network (permitted to superadmin only)\n if (!$this->multisite_update_roles()) {\n return false;\n }\n } else {\n if (!$this->save_roles()) {\n return false;\n }\n }\n\n // refresh global $wp_roles\n $wp_roles = new WP_Roles();\n \n return true;\n }", "title": "" }, { "docid": "126585a73c6472519dbe4661c9706d63", "score": "0.51291865", "text": "protected function configureAuth(): void\n {\n config([\n 'auth.guards' => array_merge(config('auth.guards'), AdminFacade::config('guards', [])),\n 'auth.providers' => array_merge(config('auth.providers'), AdminFacade::config('providers', [])),\n ]);\n }", "title": "" }, { "docid": "fd017a1cf0da3273f2acc5043787e7b9", "score": "0.51238686", "text": "protected function loadRoles(ZendAcl $acl, array $roles)\n {\n foreach ($roles as $role => $parentRoles) {\n $acl->addRole($role, $parentRoles);\n }\n }", "title": "" }, { "docid": "b2a3ca622bcb4b3a9601153581a50e0a", "score": "0.5116265", "text": "public function addCapabilities() {\n\t\t$this->isUpdatingRoles = true;\n\n\t\tforeach ( $this->roles as $wpRole => $role ) {\n\t\t\t$roleObject = get_role( $wpRole );\n\t\t\tif ( ! is_object( $roleObject ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( $this->isAdmin( $role ) ) {\n\t\t\t\t$roleObject->add_cap( 'aioseo_manage_seo' );\n\t\t\t}\n\t\t}\n\n\t\t$this->removeCapabilities();\n\t}", "title": "" }, { "docid": "4cc4276c42904f9db99b9a909374f182", "score": "0.51101", "text": "public function loadListOfRoles()\n {\n return $this->_getDatasource()\n ->select(\\Yana\\Security\\Data\\Tables\\RoleEnumeration::TABLE . '.*.' . \\Yana\\Security\\Data\\Tables\\RoleEnumeration::NAME);\n }", "title": "" }, { "docid": "9be3ef709603ca92a6a36f97be5155e3", "score": "0.5092067", "text": "protected function _getRolesCollection()\n {\n if (null === $this->_rolesCollection) {\n $this->_rolesCollection = Mage::getResourceModel('api2/acl_global_role_collection');\n }\n return $this->_rolesCollection;\n }", "title": "" }, { "docid": "778d743983beaa6e7db8ed0eca5c5c11", "score": "0.5090613", "text": "public function run()\n {\n DB::table('roles')->truncate();\n DB::table('roles')->insert([\n\t\t\t[\n\t \t'name' => 'Admin',\n\t \t'description' => 'Administer roles & permissions',\n\t\t\t\t'guard_name' => 'web',\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n \t],\n\t\t\t[\n\t \t'name' => 'Sales',\n\t \t'description' => 'Sales promotion & event',\n\t\t\t\t'guard_name' => 'web',\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n \t],\n\t\t\t[\n\t \t'name' => 'Warehouse',\n\t \t'description' => 'Warehouse roles',\n\t\t\t\t'guard_name' => 'web',\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n \t],\n\t\t\t[\n\t \t'name' => 'E-Shop 1',\n\t \t'description' => 'Admin Shop 1 roles',\n\t\t\t\t'guard_name' => 'web',\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n \t],\n\t\t\t[\n\t \t'name' => 'E-Shop 2',\n\t \t'description' => 'Admin Shop 2 roles',\n\t\t\t\t'guard_name' => 'web',\n\t\t\t\t'created_at' => date(\"Y-m-d H:i:s\"),\n\t\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n \t],\n\t\t]);\n }", "title": "" }, { "docid": "8bd1fa51fa8c42053f4d8309aa8cf276", "score": "0.50885147", "text": "protected function grid()\n {\n $grid = new Grid(new User);\n $grid->filter(function (Grid\\Filter $filter) {\n $filter->disableIdFilter();\n $filter->like('name');\n $filter->like('email');\n $roles = config('user_roles.roles');\n $filter->equal('role')->select($roles);\n });\n\n $grid->column('id', __('Id'))->sortable();\n\n $grid->column('name', __('Name'))->sortable();\n $grid->column('email', __('Email'))->sortable();\n\n $grid->column('role', 'Role')->display(function ($role) {\n $roles = config('user_roles.roles');\n return $roles[$role];\n })->sortable();\n\n $grid->column('fullname')->display(function () {\n return $this->fullname;\n });\n\n $grid->column('created_at', __('Created at'));\n\n $grid->quickSearch('name', 'email');\n\n $grid->disableExport();\n return $grid;\n }", "title": "" }, { "docid": "8e7b35f3a0b6a4734a17185b6cdc872c", "score": "0.50884783", "text": "public function attachRoles($roles)\n {\n foreach ($roles as $role) {\n $this->attachRole($role);\n }\n }", "title": "" }, { "docid": "64c5110e534dfffb8794e3f0dd45ff2c", "score": "0.50792485", "text": "function oddvault_roles_users() {\n // Delete the default custom permissions.\n db_delete('config_perms')->execute();\n\n // Create our custom permissions.\n $perms = array(\n 'access the user overview page' => array('admin/people'),\n 'access the permission overview page' => array('admin/people/permissions'),\n 'administer user roles' => array('admin/people/permissions/roles', 'admin/people/permissions/roles/edit/*', 'admin/people/permissions/roles/delete/*'),\n );\n foreach ($perms as $name => $paths) {\n db_insert('config_perms')\n ->fields(array(\n 'machine_name' => strtolower(preg_replace('/[^a-zA-Z0-9_]+/', '_', $name)),\n 'status' => 1,\n 'name' => $name,\n 'path' => serialize($paths),\n ))\n ->execute();\n }\n config_perms_cache_rebuild();\n\n // Create the administrator role.\n $administrator_role = new StdClass;\n $administrator_role->name = 'administrator';\n user_role_save($administrator_role);\n\n // Permissions for the administrator role.\n user_role_change_permissions($administrator_role->rid, array(\n 'administer permissions' => TRUE,\n 'administer users' => TRUE,\n ));\n}", "title": "" }, { "docid": "dd470b693c17cc9103e907aca5af32b0", "score": "0.50730187", "text": "public function run()\n {\n DB::table('admin_roles')->truncate();\n\n $adminRoles = Role::where('role_name', 'admin')->first();\n $authorRoles = Role::where('role_name', 'author')->first();\n $userRoles = Role::where('role_name', 'user')->first();\n\n $admin = Admin::create([\n 'admin_name' => 'Cườm Admin',\n 'admin_email' => '[email protected]',\n 'admin_avatar' => 'backend/images/1.jpg',\n 'admin_phone' => '0764608195',\n 'admin_password' => bcrypt('pass4so2555')\n ]);\n\n $author = Admin::create([\n 'admin_name' => 'Cườm Author',\n 'admin_email' => '[email protected]',\n 'admin_avatar' => 'backend/images/2.jpg',\n 'admin_phone' => '090505505',\n 'admin_password' => bcrypt('pass4so2555')\n ]);\n\n $user = Admin::create([\n 'admin_name' => 'Cườm User',\n 'admin_email' => '[email protected]',\n 'admin_avatar' => 'backend/images/3.jpg',\n 'admin_phone' => '0510008009',\n 'admin_password' => bcrypt('pass4so2555')\n ]);\n\n $admin->roles()->attach($adminRoles);\n $author->roles()->attach($authorRoles);\n $user->roles()->attach($userRoles);\n }", "title": "" }, { "docid": "e54fb58ff821921c33b7211929224102", "score": "0.50676346", "text": "public function addUsersConfigToResult()\n {\n $users = $this->getResource()->getGridUsers($this->_getGridIds());\n return $this->_addArrangedValuesToResult($users, 'users_config');\n }", "title": "" }, { "docid": "8891aab2e632ac40a847bbb1a7a23479", "score": "0.5060082", "text": "protected function getUserRoleSettings() {\n return $this->loadSettings('roles');\n }", "title": "" }, { "docid": "39df8a21e87a3681c5410536708293db", "score": "0.5058467", "text": "public function configure()\n {\n return $this->afterMaking(function (Project $project) {\n $manager = User::role('manager')->get()->random();\n $project->manager_id = $manager->id;\n })->afterCreating(function (Project $project) {\n $users = User::role('developer')->get()->take(rand(1, 4))->pluck('id');\n $project->developers()->sync($users);\n });\n }", "title": "" }, { "docid": "dc2d38fabcad8d64aa2074a7edc953b7", "score": "0.5052702", "text": "protected function load_boxes(){\n\t\tif ($this->boxes && !empty($this->boxes)){\n\t\t\tforeach ($this->boxes as $box) {\n\t\t\t\tadd_action('cmb2_admin_init', [$this, $box]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "93fb100bf45d0018ef9136709809533e", "score": "0.50514555", "text": "protected function loadConfigs() {\n foreach ($this->configPaths as $path) {\n $this->config->load($path);\n }\n }", "title": "" }, { "docid": "0f61af8162e253e6a1fc5aa129c791ff", "score": "0.50450283", "text": "public function run()\n\t{\n\t\t/**\n\t\t * admin\n\t\t */\n\t\tUser::find(1)->roles()->attach([1]);\n\t\tUser::find(1)->roles()->attach([2]);\n\t\tUser::find(1)->roles()->attach([3]);\n\n\t\t/**\n\t\t * editor\n\t\t */\n\t\tUser::find(2)->roles()->attach([2]);\n\t\tUser::find(2)->roles()->attach([3]);\n\n\t\t/**\n\t\t * user\n\t\t */\n\t\tUser::find(3)->roles()->attach([3]);\n\n\n\t\tfor ($i = 4; $i <= 10; $i++) {\n\t\t\tUser::find($i)->roles()->attach([2]);\n\t\t\tUser::find($i)->roles()->attach([3]);\n\t\t}\n\t}", "title": "" }, { "docid": "1f16129895031722f28bbf22e51fd333", "score": "0.5044982", "text": "public function loadListOfRoles(): array\n {\n return $this->_getContainer()->getDataReader()->loadListOfRoles();\n }", "title": "" }, { "docid": "07bd98e068c226473f45f53b05e58ddf", "score": "0.5044848", "text": "protected function initModules() {\r\n\t\t$modules = $this->config('modules');\r\n\r\n\t\tforeach ($modules as $module) {\r\n\t\t\t$this->modules[$module] = $this->createModule($module);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9c0a99476bbd37ba6a4a5f0445aaacd0", "score": "0.5040499", "text": "public function run()\n {\n $datas = [1, 2, 3];\n\n foreach($datas as $value)\n {\n $user = User::find($value);\n\n $user->roles()->attach($value);\n }\n }", "title": "" }, { "docid": "6de0b972cd3b6eb63b7bfd16d0372ab1", "score": "0.5038249", "text": "public function settings() {\n $this->roles = $this->getUserRoleSettings();\n\n $this->create_test_users = TRUE;\n }", "title": "" }, { "docid": "94a3c90ded3bbd893551c0d0aad6189e", "score": "0.503538", "text": "public function run()\n {\n Model::unguard();\n\n $roles = [\n config('core.player_roles'),\n config('core.staff_roles')\n ];\n\n $arr = \\Arr::collapse($roles);\n\n $arr = array_map(function($arr) {\n return ['name' => $arr];\n }, $arr);\n\n foreach ($arr as $a)\n {\n Role::create($a);\n }\n }", "title": "" }, { "docid": "e82e323192e39001ec8e65d134d7371b", "score": "0.5034526", "text": "public function load(){\n\t\t$this->buildAllowanceTables($this->pluginsToLoad);\n\t\t\n\t\tforeach ($this->pluginsToLoad as $packageName => $plugins){\n\t\t\tforeach ($plugins as $pluginName){\n\t\t\t\t$this->usePlugin($packageName, $pluginName);\n\t\t\t}\n\t\t\tHookManager::callHook(\"AfterThisPluginTreeInit\");\n\t\t\tHookManager::unRegisterHook(\"AfterThisPluginTreeInit\");\n\t\t}\n\n\t\t$this->customConfigs = new Config();\n\t}", "title": "" }, { "docid": "0ced84ebaee18f3d77ecb30eda9d3822", "score": "0.5033946", "text": "function GetRoles () {\n $this->roles = array();\n $qry = new AwlQuery( 'SELECT role_name FROM role_member m join roles r ON r.role_no = m.role_no WHERE user_no = ? ', $this->user_no );\n if ( $qry->Exec('Session::GetRoles') && $qry->rows() > 0 ) {\n while( $role = $qry->Fetch() ) {\n $this->roles[$role->role_name] = true;\n }\n }\n }", "title": "" }, { "docid": "a99a8634f7664e74ea03b663da06868a", "score": "0.50243115", "text": "function roleListing()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n\n $data['userRecords'] = $this->user_model->roleListing();\n\n $this->global['pageTitle'] = '角色管理';\n $this->global['pageType'] = 'user';\n\n $this->loadViews(\"systemrolemanage\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "1c32be9330b1c478020bec5a67edda93", "score": "0.50162274", "text": "public function Roles(){\n }", "title": "" }, { "docid": "4b869437032efcf5c9c028fb389cef02", "score": "0.501595", "text": "public function run()\n {\n // Chief Admin\n $roles = Role::find(1);\n $user = User::find(1);\n $user->roles()->attach($roles);\n\n // Admin\n // $roles = Role::find(2);\n // $user = User::find(2);\n // $user->roles()->attach($roles);\n\n // // Vice Chancellor\n // $roles = Role::find(3);\n // $user = User::find(3);\n // $user->roles()->attach($roles);\n\n // // Registrar\n // $roles = Role::find(4);\n // $user = User::find(4);\n // $user->roles()->attach($roles);\n\n // // Bursar\n // $roles = Role::find(5);\n // $user = User::find(5);\n // $user->roles()->attach($roles);\n\n // // Course System\n // $roles = Role::find(6);\n // $user = User::find(6);\n // $user->roles()->attach($roles);\n\n // // Dean Student Affair\n // $roles = Role::find(7);\n // $user = User::find(7);\n // $user->roles()->attach($roles);\n\n // // Dean\n // $roles = Role::find(8);\n // $user = User::find(8);\n // $user->roles()->attach($roles);\n\n // // Head of Head of Department\n // $roles = Role::find(9);\n // $user = User::find(9);\n // $user->roles()->attach($roles);\n\n // // Department Coordinator\n // $roles = Role::find(10);\n // $user = User::find(10);\n // $user->roles()->attach($roles);\n\n // // staff\n // $roles = Role::find(11);\n // $user = User::find(11);\n // $user->roles()->attach($roles);\n\n // // Student\n // $roles = Role::find(12);\n // $user = User::find(12);\n // $user->roles()->attach($roles);\n\n\n // User::all()->each(function($user) use ($roles){\n // $user->roles()->attach(\n // $roles->random(1)->pluck('id')\n // );\n // });\n }", "title": "" }, { "docid": "f4ed036dce028f7253c87bd4d6e3030e", "score": "0.50121593", "text": "public function voffice_add_roles() {\n global $wp_roles;\n\n //Add the VP Role with elevated capabilities.\n add_role('vp', __('Vice President', 'preg'), array(\n 'create_users' => true,\n 'delete_users' => true,\n 'edit_users' => true,\n 'delete_others_pages' => false,\n 'delete_others_posts' => false,\n 'delete_pages' => false,\n 'delete_posts' => false,\n 'delete_private_pages' => false,\n 'delete_private_posts' => false,\n 'delete_published_pages' => false,\n 'delete_published_posts' => false,\n 'edit_dashboard' => true,\n 'edit_others_pages' => true,\n 'edit_others_posts' => true,\n 'edit_pages' => true,\n 'edit_posts' => true,\n 'edit_private_pages' => true,\n 'edit_private_posts' => true,\n 'edit_published_pages' => true,\n 'edit_published_posts' => true,\n 'edit_theme_options' => false,\n 'manage_categories' => false,\n 'manage_links' => false,\n 'manage_options' => true,\n 'moderate_comments' => false,\n 'publish_pages' => false,\n 'publish_posts' => false,\n 'read' => true,\n 'read_private_pages' => false,\n 'read_private_posts' => false,\n 'switch_themes' => false,\n 'upload_files' => true\n ));\n\n //Add the VP Role with elevated capabilities.\n add_role('dm', __('District Manager', 'preg'), array(\n 'create_users' => true,\n 'delete_users' => true,\n 'edit_users' => true,\n 'delete_others_pages' => false,\n 'delete_others_posts' => false,\n 'delete_pages' => false,\n 'delete_posts' => false,\n 'delete_private_pages' => false,\n 'delete_private_posts' => false,\n 'delete_published_pages' => false,\n 'delete_published_posts' => false,\n 'edit_dashboard' => true,\n 'edit_others_pages' => true,\n 'edit_others_posts' => true,\n 'edit_pages' => true,\n 'edit_posts' => true,\n 'edit_private_pages' => true,\n 'edit_private_posts' => true,\n 'edit_published_pages' => true,\n 'edit_published_posts' => true,\n 'edit_theme_options' => false,\n 'manage_categories' => false,\n 'manage_links' => false,\n 'manage_options' => true,\n 'moderate_comments' => false,\n 'publish_pages' => false,\n 'publish_posts' => false,\n 'read' => true,\n 'read_private_pages' => false,\n 'read_private_posts' => false,\n 'switch_themes' => false,\n 'upload_files' => true\n ));\n\n //Add the \"Property\" role with basic subscriber capabilities\n add_role('property', __('Property', 'preg'), array(\n 'delete_others_pages' => false,\n 'delete_others_posts' => false,\n 'delete_pages' => false,\n 'delete_posts' => false,\n 'delete_private_pages' => false,\n 'delete_private_posts' => false,\n 'delete_published_pages' => false,\n 'delete_published_posts' => false,\n 'edit_dashboard' => false,\n 'edit_others_pages' => false,\n 'edit_others_posts' => false,\n 'edit_pages' => false,\n 'edit_posts' => false,\n 'edit_private_pages' => false,\n 'edit_private_posts' => false,\n 'edit_published_pages' => false,\n 'edit_published_posts' => false,\n 'edit_theme_options' => false,\n 'manage_categories' => false,\n 'manage_links' => false,\n 'manage_options' => false,\n 'moderate_comments' => false,\n 'publish_pages' => false,\n 'publish_posts' => false,\n 'read' => true,\n 'read_private_pages' => false,\n 'read_private_posts' => false,\n 'switch_themes' => false,\n 'upload_files' => false\n ));\n\n }", "title": "" }, { "docid": "09ef438184c0f4fb5f452568ff650c1d", "score": "0.50085795", "text": "public function setRoles(array $roles): void\n\t{\n\t\t$this->roles = $roles;\n\t}", "title": "" }, { "docid": "648879c4fc9da4dcfc38eb01aeb982dc", "score": "0.500625", "text": "public static function getallroles(){\n global $myMC;\n if(Auth::check())\n {\n $uid=Auth::id();\n $moduleid=$myMC->getMyVariable('moduleid');\n $mmenuid=$myMC->getMyVariable('modulemenuid');\n $upriveleges=$myMC->getUserPriveleges($moduleid,$mmenuid);\n $msg=\"\";\n if($upriveleges->isempty())\n {\n $msg= \"<div class='h4 alert-danger'>You dont have access to this Menu</div>\";\n }\n else{\n foreach ($upriveleges as $item){\n $add=$item->add;\n $edit=$item->edit;\n $delete=$item->delete;\n $view=$item->view;\n }\n $addbtn=\"\";\n $editbtn=\"\";\n $delbtn=\"\";\n if($add==1)\n {\n $addbtn='/Modules/'.$moduleid.'/'.$mmenuid.'/'.'add/';\n }\n if($edit==1)\n {\n $editbtn= '/Modules/'.$moduleid.'/'.$mmenuid.'/'.'edit/';\n }\n if($delete==1)\n {\n $delbtn= '/Modules/'.$moduleid.'/'.$mmenuid.'/'.'del/';\n }\n if($view==1) {\n $hierarchyid=role::getRolesHierarchy(User::getroleid(Auth::id()));\n $roles = DB::table('roles')\n ->where('roles.hierarchy','>=',$hierarchyid)\n ->select('roles.roleid', 'roles.rolename', 'roles.description', 'roles.hierarchy','roles.created_at', 'roles.updated_at')\n ->get();\n $msg .= \"<thead><tr>\n <th>\".($add ? \"<a href='\" . url($addbtn) . \"'class='btn btn-success col-md-12 glyphicon \n glyphicon-plus' title='Add'>Add</a>\" : \"\").\"\n </th>\n <th>Role Name</th>\n <th>Role Description</th>\n <th>Role Hierarchy</th>\n <th>Creation Date</th>\n <th>Update Date</th>\n </tr></thead><tbody>\";\n $editlink=\"\";\n $dellink=\"\";\n foreach ($roles as $item) {\n if($item->rolename!='SuperAdmin') {\n if($edit) {\n $editlink = \"<a href='\" . url($editbtn . $item->roleid) . \"' class='btn btn-success col-md-6 \n glyphicon glyphicon-pencil' title='Edit'>Edit</a>\";\n }\n if($delete) {\n $dellink = \"<a href='\" . url($delbtn . $item->roleid) . \"' class='btn btn-danger col-md-6 \n glyphicon glyphicon-trash' title='Delete'>Delete</a> \";\n }\n }\n $msg .= \"<tr>\n <td>\".$editlink.$dellink.\"</td>\n <td>\" . $item->rolename . \"</td>\n <td>\" . $item->description . \"</td>\n <td>\" . $item->hierarchy . \"</td>\n <td>\" . $item->created_at . \"</td>\n <td>\" . $item->updated_at . \"</td>\n </tr>\";\n }\n $msg .= \"</tbody>\";\n }else{\n $msg=\"<div class='h4 alert-danger'>You have access to this Menu but you don't have view policy</div>\";\n }\n }\n\n return $msg;\n }\n }", "title": "" }, { "docid": "3064ca8e14515a29f5094c671ab52db2", "score": "0.49977", "text": "protected function load()\n\t{\n\t\tif ($this->configs == null) {\n\t\t\t$this->configs = array();\t\t\t\t\n\t\t\t$configs = $this->createQuery('SELECT c FROM AgaviPress\\Config c')->getResult();\n\t\t\tforeach ($configs as $config) {\n\t\t\t\t$this->configs[$config->getName()] = $config->getValue();\n\t\t\t\t$this->records[$config->getName()] = $config;\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "3cd037dd4ff2ada28b26fc45973d1aff", "score": "0.4991114", "text": "public function run()\n {\n \n\n $data = [\n '[email protected]' => ['administrador', 'authenticated'],\n '[email protected]' => ['authenticated'],\n \n ];\n\n foreach ($data as $email => $role) {\n /** @var $user \\App\\Models\\Auth\\User\\User */\n $user = \\App\\User::whereEmail($email)->first();\n\n if (!$user) continue;\n\n $role = !is_array($role) ? [$role] : $role;\n\n $roles = \\App\\Role::whereIn('name', $role)->get();\n\n $user->roles()->attach($roles);\n }\n\n }", "title": "" }, { "docid": "50d9309aa50ed479197eddf44af9a378", "score": "0.49824855", "text": "public static function create_roles() {\n global $wp_roles;\n\n if ( ! class_exists( 'WP_Roles' ) ) {\n return;\n }\n\n if ( ! isset( $wp_roles ) ) {\n $wp_roles = new WP_Roles();\n }\n\n // Buyer role\n add_role( 'buyer', 'Покупатель', array() );\n\n // Seller role ( clone subscriber + add MEDIA!!! )\n $subscriber = $wp_roles->get_role( 'subscriber' );\n $subscriber->capabilities[ 'upload_files'] = true;\n add_role( 'seller', 'Продавец', $subscriber->capabilities );\n\n $admin_capabilities = self::get_core_admin_capabilities();\n\n foreach ( $admin_capabilities as $cap_admin_group ) {\n foreach ( $cap_admin_group as $admin_cap ) {\n $wp_roles->add_cap( 'administrator', $admin_cap );\n }\n }\n\n $seller_capabilities = self::get_core_seller_capabilities();\n\n foreach ( $seller_capabilities as $cap_seller_group ) {\n foreach ( $cap_seller_group as $seller_cap ) {\n $wp_roles->add_cap( 'seller', $seller_cap );\n }\n }\n }", "title": "" }, { "docid": "42aba94d11496b78c02a47949f5ebc0e", "score": "0.49815628", "text": "public function run()\n {\n //17 roles\n //9 menus\n\n for($i=1; $i <= 2; $i++){\n $role = Role::find($i);\n for($m=1; $m <= 6; $m++){\n $role->menus()->attach($role->id, [\n 'menu_id' => $m,\n 'role_id' => $role->id\n ]);\n }\n \n }\n }", "title": "" }, { "docid": "5383e893b2ac42e353b047d62ec542cc", "score": "0.49787706", "text": "public function createRoles()\n {\n foreach ($this->roles as $role) {\n try {\n /** @var Role $model */\n $model = Role::where(['name' => $role['name']])->first();\n if($model){\n $model->setRawAttributes($role);\n }else{\n $model = new Role($role);\n }\n\n $model->save();\n } catch (\\Exception $e) {\n echo $e->getMessage();\n return;\n }\n }\n }", "title": "" }, { "docid": "60b7031703ca00698a8211d78ae765c9", "score": "0.49782145", "text": "public function run()\n {\n User::truncate();\n DB::table('role_user')->truncate();\n\n // SuperAdmin\n $superAdminRole = Role::where('name', 'superadmin')->first();\n $superAdmin = User::create([\n 'name' => 'Lincoln Nail',\n 'email' => '[email protected]',\n 'password' => Hash::make('0524$ean')\n ]);\n $superAdmin->roles()->attach($superAdminRole);\n\n // Site Admin\n $siteAdminRole = Role::where('name', 'admin')->first();\n $siteAdmin = User::create([\n 'name' => 'Site Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('0524$ean')\n ]);\n $siteAdmin->roles()->attach($siteAdminRole);\n\n // Business Manager\n $businessManagerRole = Role::where('name', 'business-manager')->first();\n $businessManager = User::create([\n 'name' => 'Business Manager',\n 'email' => '[email protected]',\n 'password' => Hash::make('0524$ean')\n ]);\n $businessManager->roles()->attach($businessManagerRole);\n\n // Business User\n $businessUserRole = Role::where('name', 'business-user')->first();\n $businessUser = User::create([\n 'name' => 'Business User',\n 'email' => '[email protected]',\n 'password' => Hash::make('0524$ean')\n ]);\n $businessUser->roles()->attach($businessUserRole);\n\n // Discount User\n $discountUserRole = Role::where('name', 'discount-user')->first();\n $discountUser = User::create([\n 'name' => 'Discount User',\n 'email' => '[email protected]',\n 'password' => Hash::make('0524$ean')\n ]);\n $discountUser->roles()->attach($discountUserRole);\n }", "title": "" }, { "docid": "3d006296e06b63e0da805ec274eca455", "score": "0.4962852", "text": "public function run()\n {\n RoleMapping::insert([\n ['role_id' => '1','menu' => 'Role Manager','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Mandi User Mapping','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'User Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Agmark Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Locations Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Mandi Destination Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'FOR Line Items','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'FOR Freight','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Destination Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'States Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Roles Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Mandi Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1'],\n ['role_id' => '1','menu' => 'Competitors Master','device_type' => 'W','parent_menu' => NULL,'links' => NULL,'views' => NULL,'middleware' => NULL,'is_active' => '1']\n ]);\n }", "title": "" }, { "docid": "17ee107a87374dced007637d436f73f0", "score": "0.49604705", "text": "private function definePerfis() {\n // Define os perfils e suas heranças\n $this->addRole(new Zend_Acl_Role(null));\n $this->addRole(new Zend_Acl_Role('consulta', null));\n $this->addRole(new Zend_Acl_Role('planejamento'), 'consulta');\n $this->addRole(new Zend_Acl_Role('diefi'), 'consulta');\n $this->addRole(new Zend_Acl_Role('secretaria'), 'diefi');\n $this->addRole(new Zend_Acl_Role('secretaria_reserva'), 'secretaria');\n $this->addRole(new Zend_Acl_Role('seccional'), 'secretaria');\n $this->addRole(new Zend_Acl_Role('dipor'), 'seccional');\n $this->addRole(new Zend_Acl_Role('desenvolvedor'), 'dipor');\n }", "title": "" }, { "docid": "4d491b376ebaf393b020f149f9331721", "score": "0.4959691", "text": "public function assignRoles() {\n $players = $this->roleStrategy->assign($this->lobbyPlayers, $this->optionsManager);\n\n foreach ($players as $player) {\n $this->livingPlayers[$player->getId()] = $player;\n $this->originalPlayers[$player->getId()] = $player;\n\n if ($player->role->isRole(Role::WITCH)) {\n $this->setWitchHealingPotion(1);\n $this->setWitchPoisonPotion(1);\n }\n }\n }", "title": "" }, { "docid": "460fed629b5bd3390ffd822f725499ca", "score": "0.49535298", "text": "public function run()\n {\n \t$roles = [\n \t\t[\n \t\t\t\"role\" => \"headAdmin\",\n \"display_name\" => \"head admin\",\n \t\t\t\"created_at\" => Carbon::now()->format('Y-m-d H:i:s')\n \t\t],\n \t\t[\n \t\t\t\"role\" => \"subAdmin\",\n \"display_name\" => \"admin\",\n \t\t\t\"created_at\" => Carbon::now()->format('Y-m-d H:i:s')\n \t\t],\n \t\t[\n \t\t\t\"role\" => \"guest\",\n \"display_name\" => \"lid\",\n \t\t\t\"created_at\" => Carbon::now()->format('Y-m-d H:i:s')\n \t\t],\n \t\t[\n \t\t\t\"role\" => \"anonymous\",\n \"display_name\" => \"\",\n \t\t\t\"created_at\" => Carbon::now()->format('Y-m-d H:i:s')\n \t\t]\n \t];\n\n DB::table('roles')->insert($roles);\n }", "title": "" }, { "docid": "1d03e1b5d88e024ad7cc8908edb2f057", "score": "0.49481085", "text": "function seedRoles(){\n echo \"ADD RECORDS IN TABLE role : \";\n $roles=['Directeur de service','Membre de service','Commercial'];\n foreach ($roles as $role) {\n Connection::insert('role',['name'=>$role]);\n echo '-';\n } \n echo \"\\n\";\n }", "title": "" }, { "docid": "3b6f6cc84ef04c2e2131e1ce2f72dc6c", "score": "0.49396414", "text": "public function run()\n {\n $roles = Role::where('name' , 'seller')->get();\n\n User::where('name' , 'LIKE', '%seller%')->each( function( $user ) use( $roles ) {\n $user->roles()->attach($roles->random(1)->pluck('id'));\n });\n }", "title": "" }, { "docid": "ba2be837a30b0866ea2e641db0eddaa0", "score": "0.4934213", "text": "public static function load_modules(){\n\n\t\tforeach(Modules::get(array('link', 'name', 'active', 'access', 'view_access')) as $module){\n\t\t\t\n\t\t\tConfig::set('indira.modules.'.$module->name.'.link', (isset($module->link)) ? $module->link : 'false' );\n\t\t\tConfig::set('indira.modules.'.$module->name.'.access', (int) (isset($module->access)) ? $module->access : 777 );\n\t\t\tConfig::set('indira.modules.'.$module->name.'.view_access', (int) (isset($module->view_access)) ? $module->view_access : 777 );\n\t\t\tConfig::set('indira.modules.'.$module->name.'.active', (bool) (isset($module->active)) ? ($module->active == 'true') : false );\n\t\t}\n\t}", "title": "" }, { "docid": "ca256718d55a49daef0c8b624871e70b", "score": "0.4932711", "text": "public function run()\n {\n DB::table('roles')->insert([\n 'id' => 1,\n 'name' => 'Ultra admin',\n 'description' => 'Usuario exclusivo',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 2,\n 'name' => 'Super Admin',\n 'description' => 'Usuario con los privilegios más elevados',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 3,\n 'name' => 'Admin',\n 'description' => 'Este es el rol administrador',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 4,\n 'name' => 'Director',\n 'description' => 'Este es el rol director',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 5,\n 'name' => 'Coordinador',\n 'description' => 'Este es el rol coordinador',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 6,\n 'name' => 'Auxiliar',\n 'description' => 'Este es el rol auxiliar',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 7,\n 'name' => 'Asistente',\n 'description' => 'Este es el rol asistente',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 8,\n 'name' => 'Externo',\n 'description' => 'Este es el rol para administradores externos',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 9,\n 'name' => 'Asociado',\n 'description' => 'Este es el rol clientes / asociados',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 10,\n 'name' => 'Invitado',\n 'description' => 'Este es el rol para invitados',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n DB::table('roles')->insert([\n 'id' => 11,\n 'name' => 'Publico',\n 'description' => 'Este es el rol para publicaciones publicas',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n\n }", "title": "" }, { "docid": "eb66b568d77b8b25936d681b1ba21764", "score": "0.49267694", "text": "protected function grid()\n {\n $grid = new Grid(new Config);\n $grid->disableCreateButton();\n\n $grid->filter(function($filter){\n // 去掉默认的id过滤器\n $filter->disableIdFilter();\n });\n// $grid->id('Id');\n $grid->SoftwareName('软件名称');\n $grid->SoftwareVerno('软件版本号');\n $grid->NewSongHttp('新歌信息页面');\n $grid->SpeedLimit('限速(单位K)');\n// $grid->DomainNameSpace('云空间名称');\n// $grid->SecretKey('云SecretKey');\n// $grid->AccessKey('云AccessKey');\n $grid->LoginName('登录信息');\n $grid->UpdateMode('更新方式')->display(function ($UpdateMode){\n $UpdateModeArray = [1=>'不更新',2=>'可更新',3=>'必须更新'];\n return $UpdateModeArray[$UpdateMode];\n });;\n $grid->SoftseverVer('升级版本号');\n $grid->SoftseverHttp('升级版地址');\n $grid->SoftseverMemo('升级版说明');\n $grid->SoftboxVer('机顶盒升级版本号');\n $grid->SoftboxHttp('机顶盒升级版地址');\n $grid->SoftboxMemo('机顶盒升级版说明');\n $grid->SoftsongDbVer('歌曲文件升级版本号');\n $grid->SoftsongDbHttp('歌曲文件升级版地址');\n $grid->SingerPicHttp('下载地址目录');\n// $grid->warningTime('时间');\n// $grid->warningCountRoom('数量');\n//\n// $grid->warningTime1('时间1');\n// $grid->warningCountRoom1('数量1');\n $grid->actions(function ($actions) {\n $actions->disableView();\n $actions->disableDelete();\n if (!Admin::user()->can('系统配置修改')) {\n $actions->disableEdit();\n }\n });\n if (!Admin::user()->can('系统配置添加')) {\n $grid->disableCreateButton(); //角色添加的权限\n }\n\n return $grid;\n }", "title": "" }, { "docid": "7f56f07c158ca5cab7d22fea92498672", "score": "0.49267578", "text": "public function run()\n {\n foreach ($this->roles as $role) {\n \tDB::table('roles')->insert($role);\n }\n }", "title": "" }, { "docid": "d16bf02e8b635eef7762e51ad6a96c02", "score": "0.4925644", "text": "function getRoles () {\r\n return array(\"wysiwyg.edit\");\r\n }", "title": "" }, { "docid": "53d44906257369add3186396a2e0086a", "score": "0.49204874", "text": "public function run()\n {\n \n\n \\DB::table('roles')->delete();\n \n \\DB::table('roles')->insert(array (\n 0 => \n array (\n 'id' => 2,\n 'name' => 'admin',\n 'guard_name' => 'web',\n 'default' => 0,\n 'created_at' => '2018-07-21 16:37:56',\n 'updated_at' => '2019-09-07 22:42:01',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 3,\n 'name' => 'manager',\n 'guard_name' => 'web',\n 'default' => 0,\n 'created_at' => '2019-09-07 22:41:38',\n 'updated_at' => '2019-09-07 22:41:38',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 4,\n 'name' => 'client',\n 'guard_name' => 'web',\n 'default' => 1,\n 'created_at' => '2019-09-07 22:41:54',\n 'updated_at' => '2019-09-07 22:41:54',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 5,\n 'name' => 'driver',\n 'guard_name' => 'web',\n 'default' => 0,\n 'created_at' => '2019-12-15 18:50:21',\n 'updated_at' => '2019-12-15 18:50:21',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }", "title": "" }, { "docid": "c560e9f96c656e9e8ef2bbb421a5cff0", "score": "0.4918553", "text": "protected function _initConfigsMVC()\n\t// --------------------------------------------------------\n\t{\n\t\t$this->bootstrap('Configs');\n\n\t\t$files = array(\n\t\t\tAPPLICATION_PATH.'/configs/combiner.ini',\n\t\t);\n\n\t\t$this->addToConfig($files);\n\t}", "title": "" }, { "docid": "2999e53e9602687a10c7c0df97cb724f", "score": "0.491624", "text": "public function run()\n {\n DB::table('roles')->insert([\n [\n 'alias' => 'root',\n 'name' => 'Super Admin',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'alias' => 'campaign-manager',\n 'name' => 'Gerente de Campanha',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'alias' => 'lead-manager',\n 'name' => 'Gerente de Lead',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'alias' => 'avm-manager',\n 'name' => 'Gerente de AVM',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'alias' => 'website-editor',\n 'name' => 'Editor do Website',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ],\n [\n 'alias' => 'broker-lp',\n 'name' => 'Broker: Lead Page',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]\n ]);\n }", "title": "" }, { "docid": "ffdce865c739ccedb46bd2fdbee9ed1c", "score": "0.49060136", "text": "function initDefaultRoles()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "aff404de944d05967313743992358d2d", "score": "0.49059984", "text": "public function role() {\r\n $return['users'] = $this->User_Model->getList();\r\n $return['role'] = $this->Role_Model->getUserRole();\r\n $this->load->view('admin/add_role',$return);\r\n }", "title": "" } ]
fe93acec0c31618a0f5b586d2b73d5de
Web Online / Offline
[ { "docid": "5a07dbb62e2e259cb3cec13938e4d4a2", "score": "0.0", "text": "function cek_situs (){\nglobal $koneksi_db,$judul_situs;\nif (select_option(site_publish) !='1'){\ndie(require 'id-admin/themes/administrator/pages/offline.html');\n}\n}", "title": "" } ]
[ { "docid": "b9fb5519b10672eaf9c0c6ff045456fd", "score": "0.74508727", "text": "public function isOnline();", "title": "" }, { "docid": "876bb5fa00068f427daf80c4eda232ea", "score": "0.7035694", "text": "public function online() {\n exec('python '.SCRIPT_PATH.'online.py',$output,$return_var);\n if($return_var == 1) {\n $current = M('current_status');\n $current_data['publish_status'] = 2;\n if($current->where('id=1')->save($current_data)) {\n $this->ajaxReturn(array('info'=>'<span style=\"color:blue;\">已上线</span>','status'=>1));\n } else {\n $this->ajaxReturn(array('info'=>'update failed','status'=>0));\n }\n } else {\n $this->error('scrpit failed');\n }\n }", "title": "" }, { "docid": "3a8a56bcd7cc76648271c798dd15e0ab", "score": "0.69724554", "text": "public function offline(){\n }", "title": "" }, { "docid": "2b3a51b99ee44becbec723614a0ea237", "score": "0.6908927", "text": "public function online(){\n }", "title": "" }, { "docid": "9dbb1090d93e291bedfdceb32d34042e", "score": "0.6695189", "text": "function isOnline()\n {\n return $this->_status == 1;\n }", "title": "" }, { "docid": "94fb260dd97322be19f5044f75440283", "score": "0.66003036", "text": "public function isonline(){\r\n\t\t\tglobal $databaseCall;\r\n\t\t\t//$id=\"1iamVGEktv\";\r\n\t\t\t$sql=\"SELECT status from userstatus where FChatmeID ='{$id}'\";\r\n\t\t\t$result=$databaseCall->perform_query($sql);\r\n\t\t\t$result=$databaseCall->fetch_result($result);\r\n\t\t\t////$t=time();\r\n\t\t\t//echo $t;\r\n\t\t\tif(time()-360>$result[\"status\"]){\r\n\t\t\t\treturn \"offline\";\r\n\t\t\t}\r\n\t\t\treturn \"online\";\r\n\t\t}", "title": "" }, { "docid": "3b384497a121fa0684feb8bb99616591", "score": "0.6458395", "text": "function isOffline()\n {\n return $this->_status == 0;\n }", "title": "" }, { "docid": "1bd88fc18870be35c47a62b30826ac92", "score": "0.6453695", "text": "public function status() {\n echo remote::status('http://www.google.com').'<br/>';\n echo remote::status('http://www.yahoo.com').'<br/>';\n echo remote::status('http://www.gamespot.com').'<br/>';\n echo remote::status('http://www.ask.com');\n }", "title": "" }, { "docid": "97d854aa196548aa35962128447cbb5e", "score": "0.64056325", "text": "public function isOnline()\n {\n\n return ($this->getVersion() != '') ? true : false;\n\n }", "title": "" }, { "docid": "e41dfe54d24e48713599a5ac10606060", "score": "0.6398873", "text": "public static function isOnline()\n {\n return self::getInstance() !== null;\n }", "title": "" }, { "docid": "659aae0ddf4c1bbd7c7a83cc8cb2dde7", "score": "0.6285224", "text": "public function isOnline(){\n return\n Cache::has('user-is-online-' . $this->id);\n }", "title": "" }, { "docid": "95c140c83b1db6ffa06c895cdebbe27d", "score": "0.6272059", "text": "public function isOnline()\r\n\t{\r\n\t\treturn ($this->onlineState == \"online\") || ($this->onlineState == \"in-game\");\r\n\t}", "title": "" }, { "docid": "253c34694aa953630719fe39d52492f2", "score": "0.62694395", "text": "public function siteOffline()\n {\n //Offline Message\n $offlineMessage = $this->CoreCrud->selectSingleValue('settings','value',array('title'=>'offline_message','flg'=>1)); //Module List\n\n //Message\n $htmlDetails = htmlspecialchars_decode($offlineMessage);\n\n //Return\n echo $htmlDetails; \n }", "title": "" }, { "docid": "a5150564f7a9518bac575277226715c4", "score": "0.62085646", "text": "public function allOnline();", "title": "" }, { "docid": "e15c4b65784c77b40630d23f4a46fed2", "score": "0.6162617", "text": "public function getOnline()\r\n\t{\r\n\t\treturn $this->online;\r\n\t}", "title": "" }, { "docid": "5be1bb175d20e7966704a352a67aba88", "score": "0.61182606", "text": "public function getOnline()\n {\n return $this->online;\n }", "title": "" }, { "docid": "3baa187eab38f5eb314267c9b591141e", "score": "0.60952246", "text": "public static function goOnline()\n {\n $gamer = Gamer::where('user_id',Auth::user()->id)->first();\n\n return Inhouser::where('gamer_id',$gamer->id)\n ->update(['last_online' => DB::raw('NOW()')]);\n }", "title": "" }, { "docid": "edeade9fe157e82110a390ca666a2fd0", "score": "0.6040051", "text": "function isOnline(){\n return UserChecker::isOnline();\n}", "title": "" }, { "docid": "935aa047d034084dcd77c149490b3e2c", "score": "0.60356957", "text": "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "title": "" }, { "docid": "935aa047d034084dcd77c149490b3e2c", "score": "0.60356957", "text": "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "title": "" }, { "docid": "3c67d910cc26aad5fce02404a7d46de9", "score": "0.60239536", "text": "public function setStatusOnline()\n {\n return $this->exec('status_online');\n }", "title": "" }, { "docid": "f5124a5f27598823f1517fb640c31c65", "score": "0.6011919", "text": "public function actionOffline() { $this->setView('default'); }", "title": "" }, { "docid": "55f4dca0c4a277f87ad2eb8a87480956", "score": "0.5987872", "text": "public function is_online($id){\nreturn $this->getUserStatus($id);\n}", "title": "" }, { "docid": "7d461e0b6fe1d8675068e16923ed4f3a", "score": "0.5982889", "text": "public function webserver()\n {\n return $this->call_api_url($this->base_url,[\n 'function' => 'webserver'\n ]);\n }", "title": "" }, { "docid": "6028cda19bc076156b871ad875613095", "score": "0.5971906", "text": "public function onlineStatus () {\n\n $to_time = strtotime( date('Y-m-d H:i:s') );\n $from_time = strtotime($this->last_request);\n $minute = round(abs($to_time - $from_time) / 60);\n $online_status = $this->settings_get('online_status');\n \n \n\t\tif ($online_status != 0 && $minute <= 5) {\n\t\t\n\t\t return true;\n\t\t}\n\t\treturn false;\n\n }", "title": "" }, { "docid": "700b64506d5090930fd22a48f6167235", "score": "0.59558797", "text": "protected function generate_offline_play() {\n\t\t\treturn \"<div id=detail-side-box-offline-available>\n\t\t\t\t<i class='fas fa-check'></i> Offline Play Available\n\t\t\t</div>\";\n\t\t}", "title": "" }, { "docid": "0ac022b8f39757f515cea2a0ec3782d0", "score": "0.59388125", "text": "public function isOnline() : bool\n {\n return $this->userObject->IsLogged();\n }", "title": "" }, { "docid": "e96dd164d1bed3beb541dae8cadbe916", "score": "0.59112823", "text": "public function status()\n {\n $users = User::all();\n\n foreach ($users as $user) {\n\n if (Cache::has('user-is-online-' . $user->id))\n echo $user->name . \" is online. Last seen: \" . Carbon::parse($user->last_seen)->diffForHumans() . \" \";\n else {\n if ($user->last_seen != null) {\n echo $user->name . \" is offline. Last seen: \" . Carbon::parse($user->last_seen)->diffForHumans() . \" \";\n } else {\n echo $user->name . \" is offline. Last seen: No data \";\n }\n }\n }\n }", "title": "" }, { "docid": "bd30cbdb90ff6a21ec3e79f71c36ad5b", "score": "0.5901007", "text": "function CLIENT_generateHTMLDedicatedAndReachableStatus($online)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t$out = array();\n\n\t$statusimage = \"/gfx/status/\";\n\n\t$ping = (($online & ONLINE_STATUS_ping) == ONLINE_STATUS_ping);\n\t$ssh = (($online & ONLINE_STATUS_sshHttps) == ONLINE_STATUS_sshHttps);\n\n// var_dump($online);\n\n// \tprint(\"<h3>ON: $online, Ping: & ONLINE_STATUS_ping\n\n// print(\"<script>console.log($clientName);</script>\");\n\t\n\tif ($ping && $ssh)\n\t{\n\t\t$statusimage.=\"green.png\";\n\t\t$out['tooltip'] = $I18N_computerOnWithPingSSHHttps;\n\t}\n\telseif ($ping)\n\t{\n\t\t$statusimage.=\"greenred.png\";\n\t\t$out['tooltip'] = $I18N_computerPingNoSSHNoHttps;\n\t}\n\telse\n\t{\n\t\t$statusimage.=\"red.png\";\n\t\t$out['tooltip'] = $I18N_computerOff;\n\t}\n\n\t$out['html'] = \"<img border=\\\"0\\\" src=\\\"$statusimage\\\" title=\\\"$out[tooltip]\\\">\n\";\n\n\treturn($out);\n}", "title": "" }, { "docid": "8c811afb31321a1d0cfd8b526d4a3155", "score": "0.5894641", "text": "public function setStatusOffline()\n {\n return $this->exec('status_offline');\n }", "title": "" }, { "docid": "ed818e75060a882903a7059c884cbdc4", "score": "0.5879041", "text": "function webpage_reachable($page)\n{\n $url = url_components($page);\n $hostname = $url['host'];\n $service_port = $url['port']? $url['port']:80;\n\n /* Get the IP address for the target host. */\n if(!is_valid_ip($hostname))\n {\n $address = gethostbyname($hostname);\n if($address == $hostname)\n return false;\n }\n else\n $address = $hostname;\n\n /* Create a TCP/IP socket. */\n $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n if ($socket === false)\n return false;\n\n $result = socket_connect($socket, $address, $service_port);\n if ($result === false)\n return false;\n\n $in = \"HEAD / HTTP/1.1\\r\\n\";\n $in .= \"Host: $hostname\\r\\n\";\n $in .= \"Connection: Close\\r\\n\\r\\n\";\n $out = '';\n \n socket_write($socket, $in, strlen($in));\n while ($out = socket_read($socket, 2048)) {\n $resp .= $out;\n }\n \n socket_close($socket);\n\n // indien http/1 in resp zit, dan vind ik het goed .. \n if(strpos(strtolower($resp),'http/1')===false)\n return false;\n return true;\n}", "title": "" }, { "docid": "29724293139ff62cfa9f7ac048d2b02e", "score": "0.5866943", "text": "public function isLive();", "title": "" }, { "docid": "ba8b6cef992546464121f69123249696", "score": "0.5850403", "text": "public function playOnline() {\n echo 'Playing online... This game is fun!'.PHP_EOL;\n }", "title": "" }, { "docid": "ecff53a0f0eef86d62c85860aeb5b8e4", "score": "0.5849474", "text": "function isOnline($username){\n $url=$this->url.'users/'.$username.'/status';\n $header=array($this->getToken());\n $result=$this->postCurl($url,'', $header, 'GET');\n return $result;\n }", "title": "" }, { "docid": "7f5b4ab94837e8a0b16f341a761cb233", "score": "0.58002394", "text": "public function isReachable()\n {\n\n if ($this->data) {\n // eventueel titel enzo uit de site vissen en doorgeven in de json.\n return true;\n } else {\n return false;\n } \n }", "title": "" }, { "docid": "bc52a886a17453a9536c9bdf810b4109", "score": "0.57982236", "text": "public function site_status()\n {\n //Site Status\n $status = $this->CoreCrud->selectSingleValue('settings','value',array('title'=>'site_status','flg'=>1));\n\n //Check if is online\n if (strtolower($status) == 'online') {\n return TRUE; //Site is online\n }else{\n return FALSE; //Site is offline\n }\n }", "title": "" }, { "docid": "4eb8e456bd6af289db7f00f131c66577", "score": "0.5795301", "text": "public function CheckModuleOffline()\r {\r \r $return = \"\";\r if ($this->Module_Offline) {\r $style = \"border:1px solid red; color:red; border:5px; margin:5px; font-size:14px; font-weight:bold;\";\r $message = \"Module is currently offline. Please check back later.\";\r $return = \"<div style='{$style}'>{$message}</div>\";\r }\r \r return $return;\r }", "title": "" }, { "docid": "19c7dd3a957c970bc1412b1b7a76302b", "score": "0.5758985", "text": "function online_status($user){\n if(isset($user->last_logout) && \n ($user->last_logout > $user->last_login \n || strtotime('now') > strtotime($user->last_login) + 2*3600)\n ) return trans('offline');\n return trans('online');\n }", "title": "" }, { "docid": "45f009548755009ef1df8ff301e6c0a1", "score": "0.57458407", "text": "public function offlineAction() {\n\t\t$this->_helper->layout->setLayout('simple');\n\t\t$this->view->data = $this->data;\n\t}", "title": "" }, { "docid": "c6d7d2b2373b48627acc09a3783c97e8", "score": "0.5733327", "text": "public function online($mode = 'minecraft')\n {\n switch($mode) {\n case 'minecraft':\n clearstatcache();\n return file_exists(MC_PATH . '/server.log.lck'); \n break;\n \n case 'mcl':\n $cmd = 'screen -ls | egrep \"(.*)\\.' . $this->config->sysscreen . '[[:space:]](.*)\"';\n $result = trim(`$cmd`);\n return !empty($result);\n break;\n }\n }", "title": "" }, { "docid": "e1de553f31ccdcc6ac2e37a6adb60e61", "score": "0.57306916", "text": "function getStatus($ip, $port)\n{\n\tif($socket = @fsockopen($ip, $port, $errno, $errstr, 1))\n\t{\n\t\tfclose($socket);\n\t\treturn 'Online';\n\t}\n\telse\n\t{\n\t\t###\n\t\t//Uncomment the line above for debugging\n\t\t//echo \"$errstr ($errno)<br />\\n\";\n\t\t###\n\t\treturn 'Offline';\n\t}\n}", "title": "" }, { "docid": "898bc37a19133d931bf864d11a39caa2", "score": "0.57190895", "text": "protected function _users_online_url()\n {\n return get_forum_base_url() . '/index.php?act=Online&CODE=listall';\n }", "title": "" }, { "docid": "2f0b9f592f96f508fb6afa3168dcc63c", "score": "0.5717932", "text": "public function online() {\n if (!class_exists('WhosOnlinePlugin')) {\n return;\n }\n $now = Gdn_Format::toDateTime();\n $px = Gdn::sql()->Database->DatabasePrefix;\n $botID = $this->botID();\n $sql = \"insert {$px}Whosonline (UserID, Timestamp, Invisible) values ({$botID}, :Timestamp, :Invisible)\n on duplicate key update Timestamp = :Timestamp1, Invisible = :Invisible1\";\n Gdn::database()->query($sql, array(':Timestamp' => $now, ':Invisible' => 0, ':Timestamp1' => $now, ':Invisible1' => 0));\n return $this;\n }", "title": "" }, { "docid": "217d0b754bb9e615f74293d9e74da2da", "score": "0.56688106", "text": "public function online_connect ()\n\t\t{\n\t\t\t// require (\"../../../../betatest/connect.php\");\n\t\t\t// require (\"../../../../betatest/function.php\");\t\n\t\t\t// require (\"../../../../betatest/library.php\");\n\t\t\t// require (\"../../../../betatest/source.php\");\n\t\t\t// require (\"../../../../betatest/myclass.php\");\n\t\t}", "title": "" }, { "docid": "800a839208070a72199335141046a925", "score": "0.5667256", "text": "protected function _isWebServiceOnline()\n {\n $oXML = null;\n $aParams = array(\n 'job' => 'ping',\n );\n\n $this->_oCurlHandler->setUrl($this->_sWebServiceUrl);\n $this->_oCurlHandler->setMethod(\"GET\");\n $this->_oCurlHandler->setOption(\"CURLOPT_CONNECTTIMEOUT\", 30);\n $this->_oCurlHandler->setParameters($aParams);\n $sXML = $this->_oCurlHandler->execute();\n\n if (empty($sXML)) {\n $this->_blError = true;\n $this->_sErrorMessage = oxRegistry::getLang()->translateString('OXDIAG_ERRORMESSAGEWEBSERVICEISNOTREACHABLE');\n }\n\n try {\n $oXML = new SimpleXMLElement($sXML);\n } catch (Exception $ex) {\n $this->_blError = true;\n $this->_sErrorMessage .= oxRegistry::getLang()->translateString('OXDIAG_ERRORMESSAGEWEBSERVICERETURNEDNOXML');\n }\n\n if (!is_object($oXML)) {\n $this->_blError = true;\n $this->_sErrorMessage .= oxRegistry::getLang()->translateString('OXDIAG_ERRORMESSAGEVERSIONDOESNOTEXIST');\n }\n\n return !$this->_blError;\n }", "title": "" }, { "docid": "3058d3a5fd808bf0fbe9b295239a054e", "score": "0.5620667", "text": "function isSiteAvailable($url)\n {\n if (!filter_var($url, FILTER_VALIDATE_URL)) {\n return 'URL provided wasnt valid';\n }\n\n //make the connection with curl\n $cl = curl_init($url);\n curl_setopt($cl,CURLOPT_CONNECTTIMEOUT,10);\n curl_setopt($cl,CURLOPT_HEADER,true);\n curl_setopt($cl,CURLOPT_NOBODY,true);\n curl_setopt($cl,CURLOPT_RETURNTRANSFER,true);\n\n //get response\n $response = curl_exec($cl);\n\n curl_close($cl);\n\n if ($response) return '<div class=\"online\">Site seems to be up and running!</div>';\n\n return '<div class=\"down\">Oops nothing found, the site is either offline or the domain doesnt exist</div>';\n }", "title": "" }, { "docid": "4d9d641d36b8be27e139ba8167e27beb", "score": "0.5601267", "text": "function whosonline()\n\t{\n\t\t// Get the database initialized in global\n\t\tglobal $Database;\n\t\t\n\t\t// Prepared Select Array - Parameter Integer - Integer unix timestamp\n\t\t$data = $Database->preparedSelectArray(\"SELECT uid, username from chat_users where lastactive >= (? - 1800);\", \"i\", time());\n\t\t\n\t\t// Initialize a string that is empty.\n\t\t$str = \"\";\n\t\t\n\t\t// Loop through the data and get each user\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t\n\t\t\t// Get the UID and Username\n\t\t\t$uid = $value[\"uid\"];\n\t\t\t$username = $value[\"username\"];\n\t\t\t\n\t\t\t// Create links that redirect to the member profiles for each user.\n\t\t\t$str.= \"<a href='member.php?id={$uid}'>{$username}</a> \";\n\t\t}\n\t\t\n\t\t\n\t\t// Return the string\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "648efc5ef232754c5a76e7ce5a9d157a", "score": "0.56012076", "text": "function drupal_site_offline() {\n drupal_deliver_page(MENU_SITE_OFFLINE);\n}", "title": "" }, { "docid": "cd6c04543980efc97a0ccc5daa358fe0", "score": "0.5574572", "text": "function getServer();", "title": "" }, { "docid": "9c344e49f4be40a272d384c95a98668d", "score": "0.557006", "text": "protected function whosOnline()\n\t{\n\t\t$query = DB::select(File::get(storage_path() . '/sql/whos_online.sql'));\n\n\t\tConfig::set('webadmin.WHOSONLINE', $query);\n\t}", "title": "" }, { "docid": "83056473326892cfcd333499cdd54deb", "score": "0.55485535", "text": "public function online($realm = NULL) \n {\n \n }", "title": "" }, { "docid": "bbbc6f978bfbb61341a952006715c483", "score": "0.54777706", "text": "function getServerStatus()\n {\n if (($response_xml_data = file_get_contents('http://bsx.jlparry.com/status'))===false){\n // Darn... server error\n return false;\n } else {\n $data = simplexml_load_string($response_xml_data);\n if (!$data) {\n echo \"Error loading XML\\n\";\n foreach(libxml_get_errors() as $error) {\n echo \"\\t\", $error->message;\n }\n } else {\n return $data;\n }\n }\n return false;\n }", "title": "" }, { "docid": "28ad57a3187c844098f933653a243090", "score": "0.5475875", "text": "public function isOnline(): bool {\n foreach(Server::getInstance()->getOnlinePlayers() as $player) {\n if(strtolower($player->getName()) === strtolower($this->player)) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8cf7dd63d3acfa6166175ce588fe9493", "score": "0.54691875", "text": "public function getOnlineInformation()\n {\n return $this->onlineInformation;\n }", "title": "" }, { "docid": "1775ab997a433cb2e8f8ff1c669a624a", "score": "0.5468836", "text": "public static function UserOnline() {\r\n $now = date('Y-m-d H:i:s');\r\n $deleUserOnline = new Delete;\r\n $deleUserOnline->ExeDelete('ws_siteviews_online', \"WHERE online_endview < :now\", \"now={$now}\");\r\n\r\n $readUserOnline = new Read;\r\n $readUserOnline->ExeRead('ws_siteviews_online');\r\n return $readUserOnline->getRowCount();\r\n }", "title": "" }, { "docid": "d6064a668708c47cb6246388ad3706fa", "score": "0.5465374", "text": "function setOnline($a_val)\n\t{\n\t\t$this->online = $a_val;\n\t}", "title": "" }, { "docid": "5408c9613dd70928d8d8c3e3cd3d9b0a", "score": "0.54253393", "text": "public static function getOnlineStatus($account_name) \r\n\t{\r\n\t\t$account_name = mysql_real_escape_string($account_name);\r\n\t\tconnect::selectDB('logondb');\r\n\t\t$result = mysql_query(\"SELECT COUNT(online) FROM account WHERE username='\".$account_name.\"' AND online=1\");\r\n\t\tif (mysql_result($result,0)==0) \r\n\t\t\treturn '<b class=\"red_text\">Offline</b>';\r\n\t\telse\r\n\t\t\treturn '<b class=\"green_text\">Online</b>';\r\n\t}", "title": "" }, { "docid": "a51ffb4edf53b1694ec8684ee22f8ce8", "score": "0.54225767", "text": "public function actionOffline(): Response\n {\n // If this is a site request, make sure the offline template exists\n if (Craft::$app->getRequest()->getIsSiteRequest() && !$this->getView()->doesTemplateExist('offline')) {\n $templateMode = View::TEMPLATE_MODE_CP;\n }\n\n // Output the offline template\n return $this->renderTemplate('offline', [], $templateMode ?? null);\n }", "title": "" }, { "docid": "51aeec8c060c3ee4ebf242d12f501cd3", "score": "0.5411365", "text": "function request_check_online(){\n $result = pack_idle(true);\n if (!is_result_success($result)) {\n _log(__FUNCTION__ . ' pack error:'.json_encode($result));\n return $result;\n }\n $packet = get_result_data_key($result,'packet');\n // get the server parameters\n $cfg_maxpark_tcp_servers = config('maxpark.cfg_maxpark_tcp_servers');\n $cfg = $cfg_maxpark_tcp_servers['barcode'];\n // send packet to MaxPark\n $result = tcp_request($packet,$cfg['ip'],$cfg['port'],$cfg['recv_timeout'],$cfg['send_timeout']);\n if (!is_result_success($result)) {\n _log(__FUNCTION__ . ' request error:'.json_encode($result));\n return $result;\n }\n $response = get_result_data_key($result,'response');\n // parse the response\n $result = parse_idle_response($response);\n if (!is_result_success($result)) {\n _log(__FUNCTION__ . ' parse error:'.json_encode($result));\n return $result;\n }\n $cmd = get_result_data_key($result,'cmd');\n if ($cmd==CMD_SYNCHRONIZE_TIME) {\n // TODO , synchronize time\n _log(__FUNCTION__ . ' need to synchronize:'.get_result_data_key('value'));\n }\n return $result;\n}", "title": "" }, { "docid": "a483e614073e031140778ee05a0d20a9", "score": "0.5409198", "text": "public function on_website()\r\n\t{\r\n\t\tCC_Os::instance()->launch($this->website);\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "ee1828c98aea919bfde5d83ff389f3b8", "score": "0.53927433", "text": "public function getUrlOK();", "title": "" }, { "docid": "c180f265863a8c27bf445e8cc492c2f2", "score": "0.5392014", "text": "public function setOnline($status) {\n\t\t$this->data['var isOnline'] = $status ? 'true' : 'false';\n\t}", "title": "" }, { "docid": "f8be052bcb82a71f6ad0181c66137551", "score": "0.5382247", "text": "function optener_status_webservice(){ \t\n\n }", "title": "" }, { "docid": "2ae2c9451464acef266acf9503f58c2d", "score": "0.5359708", "text": "function get_visitor_online($render=TRUE,$regenerate_session=FALSE,$t_check=180){\n if($regenerate_session):\n session_regenerate_id();\n endif; \n $access_time=time();\n $time_check=$access_time-$t_check;\n $sess_id=session_id();\n $this->conn->StartTrans();\n //delete data < time check\n $dataUpdate1[\"active\"]=0;\n $this->adodbx->Update($this->model->tbl_visitor_online, $dataUpdate1,\"access_time<$time_check\");\n \n $found= $this->conn->GetOne(\"select count(active) as total from cms_visitor_online where active=1 and session='{$sess_id}'\");\n if($found==0):\n $data[\"access_time\"]=$access_time;\n $data[\"session\"]=$sess_id;\n $data[\"active\"]=1;\n $data=$this->_add_ip_address($data);\n $data=$this->_add_editor($data);\n $this->adodbx->Insert($this->model->tbl_visitor_online, $data);\n endif;\n if($found>0):\n $dataUpdate[\"access_time\"]=$access_time;\n $dataUpdate[\"active\"]=1;\n $dataUpdate=$this->_add_ip_address($dataUpdate);\n $dataUpdate=$this->_add_editor($dataUpdate);\n $this->adodbx->Update($this->model->tbl_visitor_online, $dataUpdate,\"session='{$sess_id}' and active=1\");\n endif;\n \n $total=$this->conn->GetOne(\"select count(*) as total from cms_visitor_online where access_time>$time_check\");\n $ok=$this->conn->CompleteTrans();\n if($ok):\n $dataRet[\"total\"]=$total;\n else:\n $dataRet[\"total\"]=0;\n endif;\n \n if($render):\n $this->load->view($this->module.\"visitor_online\",$dataRet,$view_data);\n else:\n if(!$this->input->is_ajax_request()):\n return $dataRet;\n else:\n echo json_encode($dataRet);\n endif;\n endif; \n \n }", "title": "" }, { "docid": "cf5d18916a18d4f9c0f3850ff492ab65", "score": "0.53427684", "text": "abstract public function liveUrl();", "title": "" }, { "docid": "ac287f11bc15e6e00aa897bfc00721b3", "score": "0.53352815", "text": "function classifyr_server_connectivity_ok() {\n\t// skip the check on WPMU because the status page is hidden\n\tglobal $wpcom_api_key;\n\tif ( $wpcom_api_key )\n\t\treturn true;\n\t$servers = classifyr_get_server_connectivity();\n\treturn !( empty($servers) || !count($servers) || count( array_filter($servers) ) < count($servers) );\n}", "title": "" }, { "docid": "d92442ef2f40e3b7a7ca7cff59be38fa", "score": "0.53032035", "text": "function userOnline() {\n $timestamp = date(\"Y-m-d H:i:s\");\n $this->db->userLastOnline(getUsername(), $timestamp);\n }", "title": "" }, { "docid": "afeb2c6091e5dd0fa144fde0d6c2db76", "score": "0.53026736", "text": "public function getInternetAccess()\n {\n return $this->internet_access;\n }", "title": "" }, { "docid": "d30bbae26ac543904a63eb14f8582a3e", "score": "0.5296265", "text": "public function changeStatus(): void\n {\n if ('online' === $this->online_status) {\n if ($this->industry_sector_id > 0) {\n $query = 'UPDATE '. \\rex::getTablePrefix() .'d2u_machinery_industry_sectors '\n .\"SET online_status = 'offline' \"\n .'WHERE industry_sector_id = '. $this->industry_sector_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'offline';\n } else {\n if ($this->industry_sector_id > 0) {\n $query = 'UPDATE '. \\rex::getTablePrefix() .'d2u_machinery_industry_sectors '\n .\"SET online_status = 'online' \"\n .'WHERE industry_sector_id = '. $this->industry_sector_id;\n $result = \\rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'online';\n }\n\n // Don't forget to regenerate URL cache / search_it index\n \\d2u_addon_backend_helper::generateUrlCache('industry_sector_id');\n }", "title": "" }, { "docid": "026710d669305d573459a3056c4c326a", "score": "0.5288981", "text": "private function setUserOnline()\n {\n global $DB;\n $sessOnline = $_SESSION[ 'userOnline' ];\n $sessOnline[ $this->analyticsOnline_agentName ] = $this->Browser;\n $insertOnline = $DB->QRInsert( $this->TableAnalyticsOnline, $sessOnline );\n }", "title": "" }, { "docid": "98cb4501e94076ad6143360c4c2fab60", "score": "0.5287002", "text": "function count_online(){\n\tglobal $d;\n\t$time = 600; // 10 phut\n\t$ssid = session_id();\n\n\t// xoa het han\n\t$sql = \"delete from #_online where time<\".(time()-$time);\n\t$d->query($sql);\n\t//\n\t$sql = \"select id,session_id from #_online order by id desc\";\n\t$d->query($sql);\n\t$result['dangxem'] = $d->num_rows();\n\t$rows = $d->result_array();\n\t$i = 0;\n\twhile(($rows[$i]['session_id'] != $ssid) && $i++<$result['dangxem']);\n\t\n\tif($i<$result['dangxem']){\n\t\t$sql = \"update #_online set time='\".time().\"' where session_id='\".$ssid.\"'\";\n\t\t$d->query($sql);\n\t\t$result['daxem'] = $rows[0]['id'];\n\t}\n\telse{\n\t\t$sql = \"insert into #_online (session_id, time) values ('\".$ssid.\"', '\".time().\"')\";\n\t\t$d->query($sql);\n\t\t$result['daxem'] = mysql_insert_id();\n\t\t$result['dangxem']++;\n\t}\n\t\n\t\n\t\n\t\n\t$is_add = 0;\n\t$d->query(\"select * from #_statistics where st_ip='\".$_SERVER['REMOTE_ADDR'].\"' and st_week = '\".date(\"W\").\"' and st_day = '\".date(\"d\").\"' order by st_time desc\");\n\tif($d->num_rows() == 0){\n\t\t\t$is_add = 1;\n\t}else{\n\t\t$rs = $d->fetch_array();\n\t\tif($rs['st_time']+300 < time()){\n\t\t\t$is_add = 1;\n\t\t}\n\t}\n\tif($is_add){\n\t\t$sql = \"insert into #_statistics(st_time,st_week,st_month,st_day,st_year,st_ip,st_url) value(\".time().\",\".date(\"W\").\",\".date(\"m\").\",\".date(\"d\").\",\".date(\"Y\").\",'\".$_SERVER['REMOTE_ADDR'].\"','\".current_url().\"')\";\n\t\t$d->query($sql);\n\t}\t\n\n\t\t$sql = \"select * from #_statistics where st_year = '\".date(\"Y\").\"' and st_month = '\".((date(\"m\"))).\"' and st_day = '\".(date(\"d\")-1).\"'\";\n\t\t\n\t\t$d->query($sql);\n\t\t$statistics['yesterday'] = $d->num_rows();\n\t\t\n\t\t$sql = \"select * from #_statistics where st_year = '\".date(\"Y\").\"' and st_month = '\".((date(\"m\"))).\"' and st_day = '\".date(\"d\").\"'\";\n\t\t\n\t\t$d->query($sql);\n\t\t$statistics['today'] = $d->num_rows();\n\t\t\n\t\t\n\t\t\n\t\t$sql = \"select * from #_statistics where st_year = '\".date(\"Y\").\"' and st_month = '\".date(\"m\").\"' and st_week = '\".date(\"W\").\"'\";\n\t\t\n\t\t$d->query($sql);\n\t\t$statistics['week'] = $d->num_rows();\n\t\t$sql = \"select * from #_statistics where st_year = '\".date(\"Y\").\"' and st_week = '\".(date(\"W\")-1).\"'\";\n\t\t$d->query($sql);\n\t\t\n\t\t$statistics['last_week'] = $d->num_rows();\n\t\t$sql = \"select * from #_statistics where st_year = '\".date(\"Y\").\"' and st_month = '\".date(\"m\").\"'\";\n\t\t$d->query($sql);\n\t\t$statistics['month'] = $d->num_rows();\n\t\t$sql = \"select * from #_statistics where st_year = '\".date(\"Y\").\"' and st_month = '\".(date(\"m\")-1).\"'\";\n\t\t\n\t\t$d->query($sql);\n\t\t$statistics['last_month'] = $d->num_rows();\n\t\t\n\t\t$sql = $sql = \"select * from #_statistics\";\n\t\t$d->query($sql);\n\t\t$statistics['all'] = $d->num_rows();\n\t\t\n\t\t$result['advance'] = $statistics;\n\t\t\n\t\n\treturn $result; // array('dangxem'=>'', 'daxem'=>'')\n}", "title": "" }, { "docid": "e459bb96b2a71b99d0b9b15d976f1cd1", "score": "0.52837116", "text": "function bandwidth_output($vars)\n{\n\t$observium = new Observium_class();\n\t$observium->init($vars);\n\t\n\t$send_request = $observium->request(['cmd' => 'status']);\n\t\n\tif($send_request->status == 'ok'):\n\t\n\t\t$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';\n\t\n\t\t$dispatcher = new AdminDispatcher();\n\t\t$response = $dispatcher->dispatch($action, $vars);\n\n\t echo $response;\n\t\n\telse:\n\t\n\t\techo 'Unable to Connect: Please Check your API credentials.';\n\t\n\tendif;\n}", "title": "" }, { "docid": "cbdfdcbb359d775ec2a41fc5ce0af666", "score": "0.52805656", "text": "static public function status($url) {\n\t\t// Get the hostname and path\n\t\t$url = parse_url ( $url );\n\t\t\n\t\tif (empty ( $url ['path'] )) {\n\t\t\t// Request the root document\n\t\t\t$url ['path'] = '/';\n\t\t}\n\t\t\n\t\t// Open a remote connection\n\t\t$port = isset ( $url ['port'] ) ? $url ['port'] : 80;\n\t\t$remote = fsockopen ( $url ['host'], $port, $errno, $errstr, 5 );\n\t\t\n\t\tif (! is_resource ( $remote ))\n\t\t\treturn FALSE;\n\t\t\t\n\t\t\t// Set CRLF\n\t\t$CRLF = \"\\r\\n\";\n\t\t\n\t\t// Send request\n\t\tfwrite ( $remote, 'HEAD ' . $url ['path'] . ' HTTP/1.0' . $CRLF );\n\t\tfwrite ( $remote, 'Host: ' . $url ['host'] . $CRLF );\n\t\tfwrite ( $remote, 'Connection: close' . $CRLF );\n\t\t\n\t\t// Send one more CRLF to terminate the headers\n\t\tfwrite ( $remote, $CRLF );\n\t\t\n\t\t// Remote is offline\n\t\t$response = FALSE;\n\t\t\n\t\twhile ( ! feof ( $remote ) ) {\n\t\t\t// Get the line\n\t\t\t$line = trim ( fgets ( $remote, 512 ) );\n\t\t\t\n\t\t\tif ($line !== '' and preg_match ( '#^HTTP/1\\.[01] (\\d{3})#', $line, $matches )) {\n\t\t\t\t// Response code found\n\t\t\t\t$response = ( int ) $matches [1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Close the connection\n\t\tfclose ( $remote );\n\t\t\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "96f175037878fbe8f1f2edcc07ab1511", "score": "0.52766263", "text": "function wms_onlineresource($dom) {\n\t//\n\t// Read the WMS online resource URL and return it as text.\n\t//\n\t$xp = \"/WMT_MS_Capabilities/Service/OnlineResource\";\n\t$ctx = xpath_new_context ( $dom );\n\t$xpnode = xpath_eval ( $ctx, $xp );\n\treturn $xpnode->nodeset [0]->get_attribute ( \"href\" );\n}", "title": "" }, { "docid": "d04899b60276a381a3f9cbdd0fdb247c", "score": "0.5269998", "text": "private function __updateDataCenterHome() {\n\t\t// Development server\n\t\tif (stripos($_SERVER['SERVER_NAME'], 'localhost') !== false) {\n\t\t\t$url = 'http://dchome.localhost/refresh_latest_release';\n\t\t// Production server\n\t\t} else {\n\t\t\t$url = 'http://cberdata.org/refresh_latest_release';\n\t\t}\n\t\t$results = trim(file_get_contents($url));\n\t\treturn (boolean) $results;\n\t}", "title": "" }, { "docid": "7e2f126d75d92f7b8f46ae8c2b8c21f2", "score": "0.5245545", "text": "public function refresh() {\n\t\t$this->client->offline();\n\t\t$this->okReply();\n\t}", "title": "" }, { "docid": "6c3cd16330d70df800e83f51eeca513b", "score": "0.52446085", "text": "function users_online()\n{\n // Mengambil dari javascript\n if (isset($_GET['onlineusers'])) {\n global $connection;\n\n if (!$connection) {\n session_start();\n include(\"../includes/db.php\");\n }\n $session = session_id();\n $time = time();\n $time_out_in_seconds = 02;\n $time_out = $time - $time_out_in_seconds;\n\n $query = \"SELECT * from users_online WHERE session = '$session'\";\n $send_query = mysqli_query($connection, $query);\n $count = mysqli_num_rows($send_query);\n\n if ($count == NULL) {\n mysqli_query($connection, \"INSERT into users_online(session,time) values('$session','$time')\");\n } else {\n mysqli_query($connection, \"UPDATE users_online set time = '$time' where session = '$session'\");\n }\n\n $users_online_query = mysqli_query($connection, \"SELECT * from users_online where time > '$time_out'\");\n echo $count_user = mysqli_num_rows($users_online_query);\n } //get request isset\n}", "title": "" }, { "docid": "c85fb9053c007087fffe38b135472d41", "score": "0.5242199", "text": "protected function checkStorageOffline() {\n\t\treturn !$this->getMediaModule()->getCurrentStorage()->isOnline();\n\t}", "title": "" }, { "docid": "e72500a08a1fa3b605997b897ece053e", "score": "0.5239726", "text": "function running_locally() {\n $whitelist = array('127.0.0.1', \"::1\");\n $localServer = '24.236.147.102'; //Maestro office\n if( in_array($_SERVER['REMOTE_ADDR'], $whitelist) || $_SERVER['SERVER_ADDR'] == $localServer ) :\n return true;\n else :\n return false;\n endif;\n}", "title": "" }, { "docid": "e999f7dfe9911726e3342b8e9f915ca5", "score": "0.5223482", "text": "public function isConnected(){\n /* Nothing to do here since we are hitting a REST API */\n return true;\n }", "title": "" }, { "docid": "ebe40aea3e13b87dc3ffdc9e725c98f9", "score": "0.5216887", "text": "function _assignOnlineList() {\n\t\t$sess = _new(\"session\");\n\t\t$this->assign(\"_usersOnline\",$sess->online());\n\t\t$this->assign(\"_onlineList\",$sess->onlineUser());\n\t}", "title": "" }, { "docid": "773bbe8a9a91c7b7f34786d61fce0182", "score": "0.5216601", "text": "public function codingkart_get_api_url_stating_or_live(){\n $site_url = site_url();\n if ($site_url == 'https://autodstools.com/') {\n $url = 'https://autodstools.com/';\n }else{\n $url = 'https://stage.autodstools.com/';\n }\n\n return $url;\n }", "title": "" }, { "docid": "0c3fd1ae789ea784ea018176e1f15b6b", "score": "0.5214468", "text": "function doCheckServerAlive(){\n // check if IP is valided\n\n // whitelist\n /*if(!checkIP()){\n return \"-1\";\n }*/\n $output = \"Check OK\";\n return $output;\n }", "title": "" }, { "docid": "99114c3c6e38ae8341e87a320d5981fc", "score": "0.52143866", "text": "function is_connected($ip)\n{\n //uses sockets to open a connection to apisonline.com\n $connected = @fsockopen($ip,80);\n if ($connected){\n $is_conn = true;\n fclose($connected);\n }else{\n $is_conn = false;\n }\n return $is_conn;\n\n}", "title": "" }, { "docid": "36754c958ec956aabfb7acf07b90621a", "score": "0.5208825", "text": "public function isLive()\n\t{\n\t\treturn ($this->getLiveMode() == 'live');\n\t}", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.5203994", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.5203994", "text": "public function status();", "title": "" }, { "docid": "b5c49c115344ecfa489fe0f51b23a524", "score": "0.5203994", "text": "public function status();", "title": "" }, { "docid": "1a24628740ec539283f1b2a545ec187f", "score": "0.5194468", "text": "protected function _fetchOnline() {\n $this->_xml = simplexml_load_file($this->_feedUrl.$this->_fileName.'.xml');\n if($this->_xml !== false && !empty($this->_cacheFolder)) {\n $filePath = $this->_cacheFolder.'/'.$this->_fileName.'.xml';\n if(!is_dir($this->_cacheFolder)) mkdir($this->_cacheFolder);\n $this->_xml->asXML($filePath);\n }\n return $this->_xml !== false;\n }", "title": "" }, { "docid": "bdc7e07eecbd2af3e735b129d430989c", "score": "0.5192295", "text": "public function switchServer() {\n if($this->isConnected) {\n\n $user_pseudo = $this->User->getKey('pseudo');\n $cache = Cache::read('stats-ranks-premium', 'data-short');\n if (!$cache) {\n $query = @json_decode(@file_get_contents('http://api.obsifight.net/users/staff/premium'), true);\n $ranks = $query['data'];\n $ranks = array_reverse($ranks);\n Cache::write('stats-ranks-premium', $ranks, 'data-short');\n } else {\n $ranks = Cache::read('stats-ranks-premium', 'data-short');\n }\n $isInStaff = false;\n foreach ($ranks as $rankname => $users) {\n if (in_array($this->controller->User->getKey('pseudo'), $users))\n $isInStaff = true;\n }\n\n if($isInStaff) {\n\n $server_id = Configure::read('ObsiPlugin.server.pvp.id');\n $server_bungee_id = Configure::read('ObsiPlugin.server.bungee.id');\n\n $callConnected = $this->Server->call(array('isConnected' => $user_pseudo), true, $server_id);\n if(isset($callConnected['isConnected']) && $callConnected['isConnected'] == \"true\") {\n\n $this->Session->setFlash('Vous être déjà connecté !', 'default.error');\n $this->redirect(array('controller' => 'user', 'action' => 'profile', 'plugin' => false));\n\n } else {\n $this->Server->call(array('performCommand' => 'send '.$user_pseudo.' srv_pvp'), true, $server_bungee_id);\n\n $this->Session->setFlash('Vous avez été switch sur le serveur pvp !', 'default.success');\n $this->redirect(array('controller' => 'user', 'action' => 'profile', 'plugin' => false));\n }\n\n } else {\n $this->Session->setFlash('Vous ne faites pas partie du staff !', 'default.error');\n $this->redirect(array('controller' => 'user', 'action' => 'profile', 'plugin' => false));\n }\n\n } else {\n throw new ForbiddenException();\n }\n }", "title": "" }, { "docid": "ea27e80734854d42a5a8aff816ca6222", "score": "0.5189516", "text": "public function hasInternet() : bool\n\t{\n\t\treturn Unittest_Helpers::has_internet();\n\t}", "title": "" }, { "docid": "55fdc15f34771b3f4af55f8a52b83b56", "score": "0.5180446", "text": "function oneall_social_login_check_fsockopen ($secure = true)\n{\n\t$result = oneall_social_login_fsockopen_request (($secure ? 'https' : 'http') . '://www.oneall.com/ping.html');\n\tif (is_object ($result) AND property_exists ($result, 'http_code') AND $result->http_code == 200)\n\t{\n\t\tif (property_exists ($result, 'http_data'))\n\t\t{\n\t\t\tif (strtolower ($result->http_data) == 'ok')\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "0669ebbd45cfed6a058ca81a08e4c9fc", "score": "0.5160887", "text": "function ping() {\n\n $weblogsparams[0] = C_BLOGNAME;\n $weblogsparams[1] = BLOGURL;\n $sites = explode(',',C_PING);\n if(count($sites) > 0) {\n\tforeach($sites as $site) {\n\t\t$url = explode('/',$site);\n\t\tXMLRPC_request($url[0], \"/\".$url[1], \"weblogUpdates.ping\", $weblogsparams, WEBLOG_XMLRPC_USERAGENT );\n\t}\n }\n\n}", "title": "" }, { "docid": "bf275690a716deb98007a30f6c9a839c", "score": "0.5148725", "text": "public function execWeb()\n {\n try {\n $this->exec();\n $front = $this->di->get('web_front');\n $response = $front->exec();\n $transport = $this->di->get('http_transport');\n $transport->sendResponse($response);\n } catch (Exception $e) {\n echo $e . PHP_EOL;\n exit(1);\n }\n }", "title": "" }, { "docid": "62b0d9cbdc6f8c185d2de3db1fe4fbe2", "score": "0.51484185", "text": "public function offline()\n {\n $BankAccount = M('BankAccount')\n ->field('cardholder,bankname,bank_type,bank_account')\n ->where(['type'=>2])\n ->limit(5)\n ->select();\n $bank = tpCache('smtp');\n $this->assign('bank',$bank);\n $this->assign('BankAccount',$BankAccount);\n $this->display();\n }", "title": "" }, { "docid": "62ac694cd6875f58cdc5ac531127c3af", "score": "0.5140561", "text": "function publisher_get_demo_contents_url() {\n\n\t\tstatic $url;\n\n\t\tif ( isset( $url ) ) {\n\n\t\t\treturn $url;\n\t\t}\n\n\t\t$servers = array(\n\t\t\t'http://demo-contents.betterstudio.com',\n\t\t\t'http://demo-contents-cf.betterstudio.com',\n\t\t);\n\n\t\tdo {\n\n\t\t\t$url = current( $servers );\n\n\t\t\tif ( BetterFramework_Oculus::is_host_accessible( $url ) ) {\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while( next( $servers ) !== false );\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "242353d542fcceef3479f3a77f9f1a87", "score": "0.5118068", "text": "public function listuseronlineAction() {\n\t\t\t//if(isset(session_id())){\n\t\t\t\t$tm=date(\"Y-m-d H:i:s\");\n\t\t\t\t$DataUseronlineUpdate = array(\n\t\t\t\t\t\"id\"=>session_id(),\n\t\t\t\t\t\"tm\"=>$tm,\n\t\t\t\t\t\"status\"=>'ON');\n\t\t\t\t$hasilupdateol = $this->useronline_serv->maintainDataupdateOl($DataUseronlineUpdate);\n\t\t\t\t//$sqlquery=\"update plus_login set status='ON',tm='$tm' where id='$session[id]'\";\n\t\t\t\t//echo $sqlquery;\n\t\t\t\t//$q=mysql_query($sqlquery);\n\t\t\t//}\n\t\t\t// Find out who is online /////////\n\t\t\t$gap=1; // change this to change the time in minutes, This is the time for which active users are collected. \n\t\t\t$tm=date (\"Y-m-d H:i:s\", mktime (date(\"H\"),date(\"i\")-$gap,date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\")));\n\t\t\t$this->view->jmluserol = $this->useronline_serv->getUseronlineSum($tm);\n\t\t\t\n\t\t\t$this->view->useronlinelist = $this->useronline_serv->getUseronlineList($tm);\n }", "title": "" }, { "docid": "660481eff711145fcc532c33b35d0ff9", "score": "0.5116548", "text": "function isServerJoinable($id) {\r\n\t\t//return ($this->status == \"online\");\r\n\t\tif ($status == \"online\") return true;\r\n\t\telse return false;\r\n\t}", "title": "" }, { "docid": "e14e7d92ed4d9d8115dabb44c0b1e343", "score": "0.5115716", "text": "function server() {\n\tif(isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] == 1) || isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n\n\t\t$protocol = 'https://'; // The current URL scheme uses https\n\n\t} else {\n\n\t\t$protocol = 'http://'; // The current URL scheme uses http\n\n\t}\n\n\tdefine('HTTP', $protocol); // Create a constant called HTTP and append the $protocol variable to it.\n\tdefine('SERVER_NAME', $_SERVER['SERVER_NAME']); // Create a constant called SERVER_NAME and append $_SERVER['SERVER_NAME'] to it\n\tdefine('REQUEST_URI', $_SERVER['REQUEST_URI']); // Create a constant called REQUEST_URI and append $_SERVER['REQUEST_URI'] to it\n\n\tdefine('LINK', HTTP . SERVER_NAME); // Create a constant called LINK and append both HTTP and SERVER_NAME\n\tdefine('REMOTE_ADDRESS', $_SERVER['REMOTE_ADDR']); // Create a constant called REMOTE_ADDRESS and append $_SERVER['REMOTE_ADDR'] to it\n\n}", "title": "" }, { "docid": "1c5806f28e25ba44614c8ae93f284222", "score": "0.5109268", "text": "function check_status() {\n return request('status') === \"on\";\n }", "title": "" }, { "docid": "175abf1d3d6dd0152bf6d107b747ff09", "score": "0.5106961", "text": "public function bootstrap_internet_connection() {\n $google = $this->container['internet_connection_google'];\n $nortaox = $this->container['internet_connection_nortaox'];\n\n $google = @fsockopen($google, 80);\n $nortaox = @fsockopen($nortaox, 80);\n\n if ($google && $nortaox || !$google && $nortaox) {\n tools::print_green(\"A internet esta acessivel e o website da %nortaox esta responsivo.\", array('%nortaox' => 'NortaoX.com'));\n $this->internet_connection = nx::INTERNET_CONNECTION_OK;\n fclose($nortaox);\n if ($google) {\n fclose($google);\n }\n }\n\n if ($google && !$nortaox) {\n $this->internet_connection = nx::INTERNET_CONNECTION_UP_NORTAOX_DOWN;\n $this->log(\"A internet esta acessivel mas o website da NortaoX.com NAO esta responsivo. Tente mais tarde.\", 'yellow');\n fclose($google);\n }\n\n if (!$google && !$nortaox) {\n $this->internet_connection = nx::INTERNET_CONNECTION_DOWN;\n $this->log(\"NAO ha conexao com a internet.\", 'red');\n }\n }", "title": "" } ]
bf4b97f4971c7cf42f63b58088d866e6
Strip empty items from the array
[ { "docid": "a7bdcb65fc0abfdbea5e2061396f1528", "score": "0.7492081", "text": "protected function _removeEmptyArrayItems(array &$data) {\n foreach ($data as $key => $value) {\n if (!is_array($value) && trim($value) == '') {\n unset($data[$key]);\n }\n }\n }", "title": "" } ]
[ { "docid": "622f3538ebf79c9ca6b71e771a0df1b9", "score": "0.77637047", "text": "function remove_empty_values_from_array(array $array) : array {\n return array_values(array_filter($array, function($item){\n return $item != 0 || $item != \"\";\n }));\n}", "title": "" }, { "docid": "e78ac9d14b80d66ab4d032168dcf1c4f", "score": "0.770999", "text": "public static function clean($array)\n {\n return array_filter($array, function($item) {\n return !empty($item);\n });\n }", "title": "" }, { "docid": "97f21f71f2c9f62d219b7882d00d5f23", "score": "0.7610324", "text": "function _remove_empties($arr = array())\n\t{\n\t\t$a\t= array();\n\n\t\tif (is_null($arr)) return $a;\n\n\t\tforeach ($arr as $key => $val)\n\t\t{\n\t\t\tif ($val == '') continue;\n\n\t\t\t$a[$key]\t= $val;\n\t\t}\n\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "5a081307add34382727bdb5549d89a5f", "score": "0.7580127", "text": "public static function stripEmpty(array $array): array\n {\n return array_filter($array, function ($item) {\n if (is_null($item)) {\n return false;\n }\n\n return (bool) trim($item);\n });\n }", "title": "" }, { "docid": "7f68e96367ac53c6aee134719a466f42", "score": "0.74329835", "text": "public function removeEmpty($array) {\n if (is_array($array)) {\n $array = array_filter($array);\n }\n\n return $array;\n }", "title": "" }, { "docid": "a5c88e4a7e4800666cbd4d2e059670a5", "score": "0.74093795", "text": "function array_remove_empty($array){\n\t$narr = array();\n\twhile(list($key, $val) = each($array)) {\n\t if (is_array($val)){\n $val = array_remove_empty($val);\n if (count($val)!=0) {\n $narr[$key] = $val;\n }\n\t } else {\n if (trim($val) != \"\"){\n $narr[$key] = $val;\n }\n\t }\n\t}\n\tunset($array); \n\treturn $narr; \n}", "title": "" }, { "docid": "ccae1b98d70bffc777426bee815fb204", "score": "0.7352752", "text": "function cssmin_array_clean(array $array)\r\n\t{\r\n\t$r = array();\r\n\t$c = count($v);\r\n\tif (cssmin_array_is_assoc($array))\r\n\t\t{\r\n\t\tforeach ($array as $key => $value)\r\n\t\t\t{\r\n\t\t\t$r[$key] = trim($value);\r\n\t\t\t}\r\n\t\t}\r\n\telse\r\n\t\t{\r\n\t\tforeach ($array as $value)\r\n\t\t\t{\r\n\t\t\tif (trim($value) != \"\")\r\n\t\t\t\t{\r\n\t\t\t\t$r[] = trim($value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\treturn $r;\r\n\t}", "title": "" }, { "docid": "e1cb71ecb6ef75a0758a5930b2d9b5f6", "score": "0.7333572", "text": "function cssmin_array_clean(array $array)\n{\n\t$r = array();\n\t$c = count($v);\n\n\tif (cssmin_array_is_assoc($array))\n\t{\n\t\tforeach ($array as $key => $value)\n\t\t\t$r[$key] = trim($value);\n\t}\n\telse\n\t{\n\t\tforeach ($array as $value)\n\t\t{\n\t\t\tif (trim($value) != \"\")\n\t\t\t\t$r[] = trim($value);\n\t\t}\n\t}\n\n\treturn $r;\n}", "title": "" }, { "docid": "089cc49cc76b16f128db85242bf6580f", "score": "0.7286922", "text": "public static function filter(array $array)\n\t{\n\t\tforeach ($array as $key => $val)\n\t\t{\n\t\t\tif ($val === null || is_string($val) && trim($val) === '')\n\t\t\t{\n\t\t\t\tunset($array[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "30bf7408f71ea828b00ed26a49a2edd1", "score": "0.7212477", "text": "private static function removeEmptyValues($array) {\n\t\tforeach ($array as $key => $value)\n\t\t\tif (empty($value))\n\t\t\t\tunset($array[$key]);\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "6fc5fe3878fcde6b60e3b079f4c7b1b9", "score": "0.7173686", "text": "static public function array_trim($array) {\n\t\t$trimmed = array();\n\t\t$is_numeric_indexed = I::_is_numeric_indexed_array($array);\n\t\t\n\t\tforeach ($array as $key => $value) {\n\t\t\t$value = trim($value);\n\t\t\tif ($value != '') {\n\t\t\t\tif ($is_numeric_indexed) {\n\t\t\t\t\tarray_push($trimmed,$value);\n\t\t\t\t} else {\n\t\t\t\t\t$trimmed[$key] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $trimmed;\n\t}", "title": "" }, { "docid": "6f1772f5d9a6f57dacc135aaf5f7d22e", "score": "0.7088696", "text": "function trim_array($arr)\n{\n # elements which have no data.\n if(is_array($arr))\n {\n foreach($arr as $ord => $line)\n {\n $trimmed_line = rtrim($line);\n if($trimmed_line)\n {\n $stuff[] = $trimmed_line;\n }\n }\n return $stuff;\n }\n}", "title": "" }, { "docid": "2cb8229d5328f4d96aa3c25d245a3175", "score": "0.7069402", "text": "function trim_array(&$arr) \r\n {\r\n foreach ($arr as $k => $v) {\r\n if (is_array($v))\r\n App::trim_array($arr[$k]);\r\n else\r\n $arr[$k] = trim($v);\r\n }\r\n }", "title": "" }, { "docid": "685e58b13ce0d830fcaa3c934945da7a", "score": "0.70628464", "text": "public static function removeEmptyValues($arr) {\r\n \r\n foreach ($arr as $aId => $value) {\r\n if ($value == \"\" || $value === \" \" || $value == NULL) {\r\n unset($arr[$aId]);\r\n }\r\n }\r\n \r\n return $arr;\r\n }", "title": "" }, { "docid": "c39e242e19c0b1da2a513be836e27392", "score": "0.7048326", "text": "static function RemoveEmptyArrayValues(array $array) : array\n\t{\n\t\treturn array_filter($array, function($value){return !empty($value) || $value === \"0\";});\n\t}", "title": "" }, { "docid": "cfa5cb7a2b339d17b35fdf0a75f00a0d", "score": "0.69918126", "text": "function arrayTrim ($array) {\n\tarray_shift($array);\n\treturn $array;\n}", "title": "" }, { "docid": "fba895de854f568e5eb86cf4d0816162", "score": "0.69816744", "text": "function cleanupArray($array) {\n\t$new_array = array();\n\tforeach ($array as $key => $value) {\n\t\tif (!empty($value)) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$value = cleanupArray($value, 0);\t\t\n\t\t\t\tif (count($value) == 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$value = trim(strip_tags($value));\n\t\t\t\tif (empty($value)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$new_array[$key] = $value;\n\t\t}\n\t}\n\tif (!empty($new_array)) {\n\t\t$new_array = array_merge_recursive($new_array);\n\t}\nreturn $new_array;\n}", "title": "" }, { "docid": "fe21caa7bb473cc93da1def96971fada", "score": "0.6949561", "text": "public static function filter_empty($array) {\n\t\t$filter = function ($value) {\n\t\t\treturn !empty($value);\n\t\t};\n\n\t\t$array = array_filter($array, $filter);\n\t\tunset($filter);\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "5a474df7a558c585c5a190f0a013b388", "score": "0.6907976", "text": "protected function remove_empty_options()\n {\n $arr = [ ];\n foreach ($this->options_array as $e) {\n if (!(is_string($e) && $e == '')) {\n array_push($arr, $e);\n }\n }\n $this->options_array = $arr;\n }", "title": "" }, { "docid": "7755afa8ed21c2967662b7dc139bfb7b", "score": "0.6819019", "text": "private function array_clean_unique( $array ) {\n\t\tif ( $array ) {\n\t\t\tforeach ( $array as $array_item )\n\t\t\t\t$array_item = trim( $array_item );\n\t\t\t$array = array_unique( $array );\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "594036e34e384874cc89180dd66ad5fc", "score": "0.681665", "text": "function RemoveEmptyStrings()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$items=Array();\n\t\t\t\t\t\t\tfor ($i = 0; $i < $this->Count(); $i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif (strlen($this->Strings($i))>0)\n\t\t\t\t\t\t\t\t\t\t$items[]=$this->Strings($i);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->items=$items;\n\t\t\t\t\t\t\treturn $this;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "02427ab28a236fe72d1f49ed1715a3ac", "score": "0.67724156", "text": "function cleanup($array){\n $i = 0;\n $ret_array = array();\n\n foreach ($array as $t){\n if ($t == \"\"){\n continue;\n }\n else if ($t[0] == \"#\"){\n break;\n }\n else if(strpos($t, \"#\")){\n $t = explode(\"#\", $t)[0];\n $ret_array[$i] = trim($t);\n break;\n }\n else{\n $ret_array[$i] = trim($t);\n $i++;\n }\n }\n if (sizeof($ret_array) > 0){\n return array_filter($ret_array);\n }\n return false;\n}", "title": "" }, { "docid": "8898d022dcf17ed6c4bdcae55dbb199c", "score": "0.6724547", "text": "function _strip_array($array) {\r\n\t\tif(!is_array($array)) return $array;\r\n\t\tforeach($array as $key => $value) {$slashed_array[$key] = stripslashes($value);}\r\n\t\treturn $slashed_array;\r\n\t}", "title": "" }, { "docid": "ddbe650d24c49a40af3e1793f567b5ee", "score": "0.67080945", "text": "function & trimArray(&$a) {array_walk($a,array('PommoHelper','trimValue')); return $a;}", "title": "" }, { "docid": "5b9c18034850f592b6beca955a00bf91", "score": "0.6702294", "text": "public static function removeEmpty(array $array): array\n {\n return array_filter($array, function ($value) {\n return empty($value) === false;\n });\n }", "title": "" }, { "docid": "634ef3c4730b8d93c2d2e614f5b9cebc", "score": "0.6684049", "text": "private function trimArray(array $values) {\n foreach ($values as $key => $value) {\n if (empty($value)) {\n unset($values[$key]);\n\n continue;\n } elseif (!is_string($value)) {\n continue;\n }\n\n $value = $this->trimValue($value);\n\n if ($this->willTrimEmptyLines && $value === '') {\n unset($values[$key]);\n\n continue;\n }\n\n $values[$key] = $value;\n }\n\n return $values;\n }", "title": "" }, { "docid": "32ba8b73c813eac223dc6f506da1f2b1", "score": "0.66744924", "text": "public static function trim($array)\n {\n return array_map(function($item) {\n return trim($item);\n }, $array);\n }", "title": "" }, { "docid": "fe912397f2ebffb2118104ac62e5ceab", "score": "0.65911126", "text": "function bq_meta_clean(&$arr) {\n if (is_array($arr)) {\n foreach ($arr as $i => $v) {\n if (is_array($arr[$i])) {\n abc_meta_clean($arr[$i]);\n\n if (!count($arr[$i])) {\n unset($arr[$i]);\n }\n } else {\n if (trim($arr[$i]) == '') {\n unset($arr[$i]);\n }\n }\n }\n\n if (!count($arr)) {\n $arr = NULL;\n }\n }\n}", "title": "" }, { "docid": "3282a7b9ba053808b0d51089751a2840", "score": "0.65855205", "text": "public static function sanitize_array( $array ) {\n\t\t$array = array_filter( $array );\n\t\t$array = array_unique( $array );\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "d3866b4f81324c1701d3acdbbfd1f335", "score": "0.65828156", "text": "protected function removeEmpty($items)\n {\n foreach ($items as $key => $value) {\n if (empty($value)) {\n unset($items[$key]);\n }\n }\n return $items;\n }", "title": "" }, { "docid": "b4d6a615b39ed4a5002139c4dfa3da20", "score": "0.6522322", "text": "function arrayTrim($input){\n\t\tif (!is_array($input)) {\n\t\t\treturn trim($input);\n\t\t}\n\t\treturn array_map(array($this, 'arrayTrim'), $input);\n\t}", "title": "" }, { "docid": "41c146e38dcbcdb00ba771de78350c3c", "score": "0.65082234", "text": "function clean_data($array_of_data) {\r\n $array_of_data1 = Array();\r\n\r\n $num_rows = count($array_of_data) + 1; //the number of rows in the data\r\n\r\n for ($row = 2; $row < $num_rows; $row++) {\r\n\r\n //this loop removes all the blan spaces at the end of rows\r\n while (('' == end($array_of_data[$row]) OR preg_match('/^[a-zA-Z\\/]{5}$/', end($array_of_data[$row]))) && !empty($array_of_data[$row])) {\r\n array_pop($array_of_data[$row]);\r\n //echo end($array_of_data[$row]);\r\n //echo '<br>';\r\n }\r\n\r\n //this condition checks if a row is entirely empty, and deletes it if true\r\n if (count($array_of_data[$row]) != 0) {\r\n array_push($array_of_data1, $array_of_data[$row]);\r\n continue;\r\n }\r\n }\r\n return $array_of_data1;\r\n}", "title": "" }, { "docid": "1b9f5fd1e7b46cddbce2de0cfdb637e0", "score": "0.6495846", "text": "public function cleanT($tArr)\n {\n for ($a = count($tArr); $a > 0; $a--) {\n if ((string)$tArr[$a - 1] !== '') {\n break;\n } else {\n unset($tArr[$a - 1]);\n }\n }\n return $tArr;\n }", "title": "" }, { "docid": "84d8f3a7a250f0347c26dd4dfd817845", "score": "0.64878136", "text": "function cleanArray($array){\n\t//print_r($array);\n\tfor($i=0;$i<count($array);$i++){\n\t\t$array[$i] = strval($array[$i]);\n\t}\n\t//print_r($array);\n\treturn $array;\n}", "title": "" }, { "docid": "bbe4e2235e199b4c00dd230236bb2f81", "score": "0.64263916", "text": "function array_remove_empty(array $haystack)\n {\n foreach ($haystack as $key => $value) {\n if (is_array($value)) {\n $haystack[$key] = array_remove_empty($haystack[$key]);\n }\n\n if (empty($haystack[$key]) && $haystack[$key] != 0) {\n unset($haystack[$key]);\n }\n }\n\n return $haystack;\n }", "title": "" }, { "docid": "a7a4bd1b411c46c13a97df08deee5193", "score": "0.6407755", "text": "protected function unsetEmptyValues(array $data) {\n\t\tforeach ($data as $key => $value) {\n\t\t\tif ($key === 'host' && is_array($value)) {\n\t\t\t\t$data[$key] = $this->unsetEmptyValues($value);\n\n\t\t\t\tif (!$data[$key]) {\n\t\t\t\t\tunset($data[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($key === 'interface') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telseif ($key === 'query_fields') {\n\t\t\t\tif ($value === '[]') {\n\t\t\t\t\tunset($data[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($value === '' || $value === null) {\n\t\t\t\tunset($data[$key]);\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "206f96e672ac2ff3b9310f02f7664dcc", "score": "0.6395299", "text": "public static function array_clean($array){\n\t\t\t$array = str_replace(array(\"\\r\\n\",\"\\n\",\"\\t\"), '', $array);\n\t\t\t$array = preg_replace(\"#\\s\\s+#\", \" \", $array);\n\t\t\t$array = str_replace(array(\"array ( \", \",)\", \", )\"), array(\"array(\", \")\", \")\"), $array);\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "2420d69f29271dffd5549c570f9f9534", "score": "0.63832504", "text": "function pilau_trim_array( $array, $charlist = null ) {\n\t\tif ( is_array( $array ) ) {\n\t\t\tforeach ( $array as &$value ) {\n\t\t\t\tif ( is_string( $value ) ) {\n\t\t\t\t\tif ( $charlist ) {\n\t\t\t\t\t\t$value = trim( $value, $charlist );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$value = trim( $value );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "5c4de95cb3e062bd3f5758fa65ca1f22", "score": "0.6365979", "text": "public function testEmptyArrayShouldReturnAnEmptyString()\n {\n $arr = [];\n $flatted = \\ProcessMaker\\Query\\Processor::flatstr(\n \\ProcessMaker\\Query\\Processor::flatten($arr, true), true\n );\n\n $this->assertEquals($flatted, '');\n }", "title": "" }, { "docid": "17d8c1ef4130ce91ce5db11a3c1b78d1", "score": "0.6358753", "text": "public static function trimArrayValues(&$value)\n\t{\n\t\t$value = trim($value);\n\t}", "title": "" }, { "docid": "8e2545ed5c4bab0758d9109620534745", "score": "0.6358665", "text": "function arrayRemoveQuotes($array){\n\t\t$quote = \"'\";\n\t\t$unquoted = array_map(\n\t\t/*remove surrounding quotes from every element of the array*/\n\t\t\t\tfunction($item) use ($quote) {\n\t\t\t\t\treturn trim($item, $quote);\n\t\t\t\t},\n\t\t\t\t$array );\n\t\treturn $unquoted;\n\t}", "title": "" }, { "docid": "8cd2461fd987fdd9e168bfa8b3f4a01d", "score": "0.6356243", "text": "function helper_is_array_empty($array){\n\t// array_filter() function's default behavior will remove all values from array which are equal to null, 0, '' or false\n\treturn array_filter( $array );\n}", "title": "" }, { "docid": "718b04c17e94e728e02c8af8b3d92c96", "score": "0.6343748", "text": "function array_trim( & $array, $type = null)\n{\n\t$types = [\n\t\t'int' , 'integer' ,\n\t\t'bool' , 'boolean' ,\n\t\t'float' , 'double' ,\n\t\t'string' ,\n\t\t'array' ,\n\t\t'object' ,\n\t\t'null' ,\n\t];\n\n\t// if a non-empty string value comes through, don't erase it\n\t// this is specifically for '0', but may work for others\n\t$is_non_empty_string = (is_string($array) && strlen(trim($array)));\n\tif ( ! $array && ! $is_non_empty_string) {\n\t\t$array = [];\n\t}\n\n\tif ( ! in_array($type, $types)) {\n\t\t$type = null;\n\t}\n\n\tif ( ! is_array($array)) {\n\t\t$array = explode(',', $array);\n\t}\n\n\tif ( ! is_null($type)) {\n\t\tarray_walk_recursive($array, function(& $v) use ($type) { $v = trim($v); settype($v, $type); });\n\t}\n\telse {\n\t\tarray_walk_recursive($array, function(& $v) { $v = trim($v); });\n\t}\n\n\treturn $array; // returns by reference as well\n}", "title": "" }, { "docid": "e97b790f3283b152f300e4caecb02d33", "score": "0.6342216", "text": "private function removeEmptyAttributes($attributes) {\n $pattrs = array_filter($attributes, function ($attrValue) {\n return !(is_array($attrValue) && empty($attrValue));\n });\n return $pattrs;\n }", "title": "" }, { "docid": "21a6e473b56b5f8c64fc0ea84ccd7b3a", "score": "0.63405704", "text": "function removeNull_From_Arr($my)\n {\n $newMy = array(); \n $i = 0; \n foreach ($my as $key => $value) { \n if (!is_null($value)) { \n $newMy[$i] = $value; \n $i++; \n } \n } \n return $newMy;\n }", "title": "" }, { "docid": "54404e8c76af86dfb26278c947a530ee", "score": "0.6337131", "text": "static public function prune(array $array, mixed $empties = ''): array\n {\n $comp = [];\n foreach ($array as $key => $value) { \n if ($value !== $empties) \n $comp[$key] = $value;\n }\n return $comp;\n }", "title": "" }, { "docid": "e65c35e427d9c44a3eee847d0fc73686", "score": "0.63312256", "text": "public function removeBlankOptions($haystack) {\n\t\tforeach ($haystack as $key => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t$haystack[$key] = $this->removeBlankOptions($haystack[$key]);\n\t\t\t}\n\t\t\tif (empty($haystack[$key])) {\n\t\t\t\tunset($haystack[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $haystack;\n\t}", "title": "" }, { "docid": "6e2a0a88c2d04872b63ef82a59f80de4", "score": "0.6311565", "text": "function trimArray($Input) {\n\t\t\n\t\tif (! is_array ( $Input ))\n\t\t\t\n\t\t\treturn trim ( $Input );\n\t\t\n\t\treturn array_map ( 'trimArray', $Input );\n\t\n\t}", "title": "" }, { "docid": "b1d82e5ae111cfa891e32680e3fa109b", "score": "0.62531185", "text": "function my_strip_tags($value)\n{\n global $dont_strip;\n if (is_array($value)) {\n foreach ($value as $key => $val) {\n if (!in_array($key, $dont_strip)) {\n $ret[$key] = my_strip_tags($val);\n } else {\n $ret[$key] = $val;\n }\n }\n } else {\n $ret = trim(strip_tags($value));\n }\n\n return $ret;\n}", "title": "" }, { "docid": "350311c5188092d1e8536141460f0ef6", "score": "0.6242072", "text": "function nullToEmpty($array)\n{\n if ($array == null) {\n $array = [];\n }\n return $array;\n}", "title": "" }, { "docid": "5b6877f35c3d0d6d01742e3f3da90af1", "score": "0.6235824", "text": "function cleanArray($arr)\n{\n if (is_array($arr)) {\n foreach ($arr as $k => $v) {\n if (empty($v)) {\n return false;\n }\n }\n return $arr;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "c8350b0e40e9ccd6d40e9ecb8fcfde2e", "score": "0.6232868", "text": "function clean_array(&$arr) \r\n {\r\n foreach ($arr as $k => $v) {\r\n if (is_array($v))\r\n App::clean_array($arr[$k]);\r\n else\r\n $arr[$k] = stripslashes($v);\r\n }\r\n }", "title": "" }, { "docid": "61349f5f576981cce58a75ee80f419c3", "score": "0.62182295", "text": "public function nullifyEmptyStrings()\n {\n $array = ['a' => '', 'b' => true, 'c' => \"\\n\\t\", 'd' => \"\\tstring with whitespace\\n\"];\n A::nullifyEmptyStrings($array);\n $this->assertSame(['a' => null, 'b' => true, 'c' => null, 'd' => \"\\tstring with whitespace\\n\"], $array);\n }", "title": "" }, { "docid": "a35b80a82f54cfee5d3e05fa34cf2877", "score": "0.6211534", "text": "function hide_empty($feed_a){\n\t$clean = array();\n\tforeach($feed_a as $feed){\n\t\tif(isset($feed->data) && ($feed->data)){\n\t\t\t$clean[] = $feed;\n\t\t}\n\t}\n\tif($clean) return $clean;\n}", "title": "" }, { "docid": "1e03d2e5ce17084184ac45795682c99b", "score": "0.6180024", "text": "public static function trim(array $array): array\n {\n return array_map(function ($value) {\n return is_string($value) ? trim($value) : $value;\n }, $array);\n }", "title": "" }, { "docid": "ff75f092814b7b67bc3e06fa01112147", "score": "0.61708236", "text": "protected function sanitize($arr)\n {\n foreach ($arr AS $k => $v) {\n if (is_array($v)) {\n if (count($v) > 0) {\n $arr[$k] = $this->sanitize($v);\n } else {\n $arr[$k] = \"\";\n }\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "3782d7ab5ad41c4a28b197ab5ddba88e", "score": "0.61624706", "text": "private function sanitize($arr)\n {\n foreach ($arr as $k => $v) {\n if (is_array($v)) {\n if (count($v) > 0) {\n $arr[$k] = $this->sanitize($v);\n } else {\n $arr[$k] = '';\n }\n }\n }\n\n return $arr;\n }", "title": "" }, { "docid": "32cda31fec4967acb28153396e883b02", "score": "0.613442", "text": "public function trim()\n {\n foreach ($this->children() as $item) {\n if ($item->children()->isEmpty()) {\n $this->remove($item);\n }\n }\n }", "title": "" }, { "docid": "0045fae2c6c55422cac0f2988bae7785", "score": "0.61342007", "text": "function removeNull($arr_with_null)\n {\n $newArr = array();\n foreach($arr_with_null as $key=>$value)\n {\n if(is_null($key) || $key == '' || is_null($value)|| $value == '' || $key == null || $value == null)\n unset($arr_with_null[$key]);\n // echo \" removing car = $key : $value <br>\"; \n else $newArr[$key] = $value; \n } \n return $newArr;\n }", "title": "" }, { "docid": "dccb8335478869113ff9b5599ec62f2f", "score": "0.6129437", "text": "function array_replace_empty_with_null( &$array ) {\n\n foreach( $array as $key => $value ) {\n $array[ $key ] = replace_empty_with_null( $value );\n }\n}", "title": "" }, { "docid": "2d717bc7c4b91b4f8f86252ac19f02e5", "score": "0.6116828", "text": "function filter_array($data, $filter)\r\n{\r\n\t$clean = array();\r\n\tforeach ($data as $key => $val)\r\n\t{\r\n\t\tif (substr($key, 0, strlen($filter)) == $filter)\r\n\t\t{\r\n\t\t\t$clean[substr($key, strlen($filter))] = $val;\r\n\t\t}\r\n\t}\r\n\r\n\t// Check: not all empty\r\n\t$is_empty = true;\r\n\tforeach ($clean as $item)\r\n\t{\r\n\t\tif (strlen($item) > 0)\r\n\t\t{\r\n\t\t\t$is_empty = false;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tif ($is_empty)\r\n\t{\r\n\t\treturn array();\r\n\t}\r\n\r\n\treturn $clean;\r\n}", "title": "" }, { "docid": "ec117470f9baf2d283b3bf0f9ae26ecb", "score": "0.60884845", "text": "function ddc_clean_filter(&$arr) {\n if(isset($arr['filter']['keyword']) && is_array($arr['filter']['keyword'])) {\n foreach($arr['filter']['keyword'] as $i => $v) {\n if(trim($v)=='') {\n unset($arr['filter']['role'][$i]);\n unset($arr['filter']['keyword'][$i]);\n }\n }\n }\n}", "title": "" }, { "docid": "41e54249ac0bcd243c0f28ae887d0bd4", "score": "0.6075675", "text": "function _only_numeric($array)\n\t{\n\t\tif (empty($array) === TRUE) return array();\n\n\t\tif (is_array($array) === FALSE)\n\t\t{\n\t\t\t$array\t= array($array);\n\t\t}\n\n\t\tforeach ($array as $key => $val)\n\t\t{\n\t\t\tif (preg_match('/[^0-9]/', $val) != 0 OR trim($val) == '') unset($array[$key]);\n\t\t}\n\n\t\tif (empty($array) === TRUE) return array();\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "61dfab9ac2dc99bd8fd75204f9790a3f", "score": "0.60685277", "text": "protected function cleanArray(array $a) {\n\t\t$clean = array();\n\t\tforeach($a as $key => $value) {\n\t\t\tif(is_array($value)) continue; // we only allow one dimensional arrays\n\t\t\tif(is_string($value) && $this->stripSlashes) $value = stripslashes($value);\n\t\t\t$clean[$key] = $value;\n\t\t}\n\t\treturn $clean;\n\t}", "title": "" }, { "docid": "3f3fb4b6e691cbe1b1ab7649cd8434fb", "score": "0.6061395", "text": "function trim_array($a = array(), $charList = '') {\n\tif(0 == strlen($charList)) {\n\t\tforeach($a as $k => $v) {\n\t\t\t$a[$k] = trim($v);\n\t\t}\n\t}\n\telse {\n\t\tforeach($a as $k => $v) {\n\t\t\t$a[$k] = trim($v, $charList);\n\t\t}\n\t}\n\treturn $a;\n}", "title": "" }, { "docid": "b1186bf8adc4764077fa753d6c2c359e", "score": "0.60580033", "text": "private function clear_values(){\n\tglobal $base;\n\t\n\t$clean_values = array();\n\tforeach($this->values() as $key => $val){\n\t\t$clean_values[$key] = $base->clear_string($val);\n\t}\n\t\treturn $clean_values;\n\t\n}", "title": "" }, { "docid": "5787f74ca14e7b8d68a07dc8983c2ab4", "score": "0.60428244", "text": "public static function compact(array $array): array\n {\n foreach ($array as $key => $value) {\n if (!$value) {\n unset($array[$key]);\n }\n }\n return $array;\n }", "title": "" }, { "docid": "3155d4ce9557216bf95a79548c13f1c5", "score": "0.60348123", "text": "function stripElements($elements, &$array){\r\n\t$elementsArray = explode(',', $elements);\r\n\t\r\n\tforeach($elementsArray AS $value){\r\n\t\tunset($array[$value]);\r\n\t}\r\n}", "title": "" }, { "docid": "deb73a9352f016c3866a908f5105f9a2", "score": "0.6022227", "text": "public static function removeNullArrayValues($array)\n\t{\n\t\t$newArray = array();\n\t\tforeach($array as $value) {\n\t\t\tif($value !== null)\n\t\t\t\t$newArray[] = $value;\n\t\t}\n\t\treturn $newArray;\n\t}", "title": "" }, { "docid": "17bbce561b9cbb9fc0052092cf8697da", "score": "0.60143495", "text": "function array_clean($input, $update = true, $strict = true){\r\n\t\t$tmp = array();\r\n\t\tforeach($input as $key => $value){\r\n\t\t\tif($strict){\r\n\t\t\t\tif(str_replace(' ', '', $value) != ''){\r\n\t\t\t\t\tif(is_numeric($key)){\r\n\t\t\t\t\t\t$tmp[] = $value;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$tmp[$key] = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif($value != ''){\r\n\t\t\t\t\tif(is_numeric($key)){\r\n\t\t\t\t\t\t$tmp[] = $value;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$tmp[$key] = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Return the nice clean array.\r\n\t\treturn $tmp;\r\n }", "title": "" }, { "docid": "625032fd94f9a11aeaa16f0b761884bb", "score": "0.6014011", "text": "public function array_filter($array)\n {\n return array_filter($array, 'strlen');\n }", "title": "" }, { "docid": "5f76950224721a5fcf03ee6bb9cf4a41", "score": "0.60077477", "text": "function _cp_array_filter_recursive($array) {\n\tif( !is_array($array) ){\n\t\treturn;\n\t}\n foreach ($array as $key => &$value) {\n if (empty($value)) {\n unset($array[$key]);\n }\n else {\n if (is_array($value)) {\n $value = _cp_array_filter_recursive($value);\n if (empty($value)) {\n unset($array[$key]);\n }\n }\n }\n }\n\n return $array;\n}", "title": "" }, { "docid": "c697da330f0256754ec1df0b53917d4a", "score": "0.5992939", "text": "public function testArrayWithEmptyValueShouldReturnAnEmptyString()\n {\n $str = '';\n // Flatstr will receive the value \"\" as an array with an empty value\n $arr = str_split($str);\n $flatted = \\ProcessMaker\\Query\\Processor::flatstr(\n \\ProcessMaker\\Query\\Processor::flatten($arr, true), true\n );\n\n $this->assertEquals($flatted, $str);\n }", "title": "" }, { "docid": "744ff2186217d50cf7e95a8e47ab04d5", "score": "0.59897584", "text": "public static function removeNotScalar(array $array): array\n {\n return array_filter($array, 'is_scalar');\n }", "title": "" }, { "docid": "42a5a000a7c6d67e40fd39c2bc2c505f", "score": "0.59891367", "text": "protected static function removeNull($array)\r\n {\r\n foreach ($array as $key => &$value) {\r\n if ($value === null) {\r\n unset($array[$key]);\r\n }\r\n }\r\n return $array;\r\n }", "title": "" }, { "docid": "b4d90f4c6040b5bc9954346e3fc8ae21", "score": "0.5983216", "text": "public static function TrimData($data)\n\t{\n\t\tif ( is_array($data) )\n\t\t{\n\t\t\treset($data);\n\t\t\tforeach ( (array) $data as $key => $value )\n\t\t\t{\n\t\t\t\t$data[$key] = Fn::TrimData( $value );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\t$data = trim( $data );\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "b18d9da7892b4923e0095ab843f6bd1f", "score": "0.5981664", "text": "function Clear($data){\n \n foreach($data as $k=>$str){\n $str = trim($str);\n $str = stripslashes($str);\n $str = htmlspecialchars($str);\n $ss[$k] = $str;\n } \nreturn $ss;\n}", "title": "" }, { "docid": "bc3360adbe4f80e51a2cab19f1268f23", "score": "0.5979435", "text": "function stripArray($array){\n $newArray = [];\n foreach($array as $a){\n if($a == '.' || $a == '..' || $a == '.DS_Store' || $a == '.htaccess') continue;\n array_push($newArray, $a);\n }\n return $this->natsortArray($newArray);\n }", "title": "" }, { "docid": "1b19a32dc2e58779dc656b2862ff92a3", "score": "0.597941", "text": "public static function filterEmptyValues(array $values): array\n {\n return array_filter($values, fn ($value) => self::isEmptyValue($value) === false);\n }", "title": "" }, { "docid": "ecccc12a0c0ddcb192e6be1cbf55539f", "score": "0.596577", "text": "public function testStringifyTransformsEmptyArrayCorrectly()\n {\n $value = array();\r\n $representation = Mol_Util_Stringifier::stringify($value);\r\n $this->assertEquals('[]', $representation);\n }", "title": "" }, { "docid": "94b7a73bea11fd70e299a94ff4ee88c4", "score": "0.5962359", "text": "function removeEmptyWords($docment)\n\t{\n\t\tforeach($docment as $index=>$word)\n\t\t{\n\t\t\tif(strlen($word)==0)\n\t\t\t{\n\t\t\t\tunset($docment[$index]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $docment;\n\t}", "title": "" }, { "docid": "d6e05b661791b7e8822ee04377c1eaa4", "score": "0.59559935", "text": "function trim_data(){\n $data = $_POST;\n foreach ($data as $entry) {\n $entry = trim($entry);\n #sanitise data of html special characters\n $entry = htmlspecialchars($entry);\n }\n return $data;\n }", "title": "" }, { "docid": "aa5c1300ef3d82f1e0246f0c6164a435", "score": "0.59516585", "text": "protected function _fixInfo()\n {\n $i = count($this->_info);\n while ($i --) {\n // the trim lets us keep literal '0' strings\n if (trim($this->_info[$i]) !== '') {\n // not empty, stop removing blanks\n break;\n } else {\n unset($this->_info[$i]);\n }\n }\n }", "title": "" }, { "docid": "53764498438ee0bedfbd971c630a2f62", "score": "0.593476", "text": "function trimValues($row){\n $result = array();\n foreach($row as $value){\n array_push($result, ltrim($value, \" \"));\n }\n return $result;\n}", "title": "" }, { "docid": "a71540c4413fcbdead92b5626ebc14a1", "score": "0.5895533", "text": "function twig_get_array_items_filter($array)\n{\n // noop\n return $array;\n}", "title": "" }, { "docid": "b4a4cc0f2bd7811de3c69c83f46649c9", "score": "0.5880071", "text": "public function strip()\n {\n $allowedTags = $this->make();\n\n if(is_array($this->subject)){\n return $this->stripArray($allowedTags, $this->subject);\n }\n\n return strip_tags($this->subject, $allowedTags);\n }", "title": "" }, { "docid": "94e0302bd724ac57b8bd75ef4564ba3b", "score": "0.58786523", "text": "public function testNullArrayShouldReturnAnEmptyString()\n {\n $arr = null;\n $flatted = \\ProcessMaker\\Query\\Processor::flatstr(\n \\ProcessMaker\\Query\\Processor::flatten($arr, true), true\n );\n\n $this->assertEquals($flatted, '');\n }", "title": "" }, { "docid": "0385abd8af7caa4779e1417d8a9639db", "score": "0.58747274", "text": "protected function recursivelyRemoveEmptyReplacements(array $input)\n {\n foreach ($input as &$value) {\n if (is_array($value)) {\n $value = $this->recursivelyRemoveEmptyReplacements($value);\n }\n }\n\n return array_filter($input, function ($value) {\n if (is_string($value)) {\n return ! Str::startsWith($value, ':');\n }\n\n return true;\n });\n }", "title": "" }, { "docid": "431a3cb1b138f400e51142847e80cdfa", "score": "0.58666205", "text": "Function ArrayTrim(&$item, $key)\r\n\t{\r\n\t\t$item = trim($item, \" \\t\"); // space and tab\r\n\t}", "title": "" }, { "docid": "6a234dd580a7f69e3e74049bf18e2fa4", "score": "0.58283913", "text": "public function sanitize(array $data)\r\n\t{\r\n\t\t\r\n\t\t$output = [];\r\n\t\t\r\n\t\tforeach ($data as $k => $v) {\r\n\t\t\t\r\n\t\t\tif ($v) $output[$k] = filter_var($v, FILTER_SANITIZE_STRING);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c7e469f7ca6c12abb3db2f26ab7b2f60", "score": "0.5820961", "text": "protected function removeEmptyParams(array $params)\n {\n foreach ($params as $key => $value) {\n if (empty($value)) {\n unset($params[$key]);\n }\n }\n return $params;\n }", "title": "" }, { "docid": "2546bfe20aac02b0a17e886f7fed8ed2", "score": "0.58196884", "text": "private function cleanArray(array $array): array\n {\n $clean_array = [];\n\n foreach ($array as $key => $value) {\n $clean_key = preg_replace('/[[:cntrl:]]/', '', $key);\n $clean_value = preg_replace('/[[:cntrl:]]/', '', $value);\n $clean_array[$clean_key] = $clean_value;\n }\n\n return $clean_array;\n }", "title": "" }, { "docid": "3a727ce901bba27124527a604608ded3", "score": "0.5806281", "text": "public function trimData($params){\r\n foreach ($params as &$value){\r\n $value = trim($value);\r\n }\r\n return $params;\r\n }", "title": "" }, { "docid": "1be220abde855452ab670d066a4994b2", "score": "0.58026266", "text": "public function cleanInputs($data) {\n $clean_input = Array();\n if (is_array($data)) {\n foreach ($data as $k => $v) {\n $clean_input[$k] = $this->cleanInputs($v);\n }\n } else {\n if(is_null($data)){\n $clean_input = \"\";\n }\n else{ \n $string = filter_var(\"\".$data, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\n $clean_input = trim(htmlspecialchars(strip_tags(stripslashes($string)),ENT_QUOTES, 'UTF-8')); \n }\n }\n return $clean_input;\n }", "title": "" }, { "docid": "e2cb334a75b29cfe432534d74950f5ab", "score": "0.5792261", "text": "function oxygen_array_filter_recursive($array) {\n foreach ($array as $key => &$value) {\n if (empty($value)) {\n unset($array[$key]);\n }\n else {\n if (is_array($value)) {\n $value = oxygen_array_filter_recursive($value);\n if (empty($value)) {\n unset($array[$key]);\n }\n }\n }\n }\n\n return $array;\n}", "title": "" }, { "docid": "e74ab043af2fd2d60363e2df1c1ddc66", "score": "0.578662", "text": "function clean_url_data($urldata)\n{\n\t$new_urldata = array();\n\tforeach($urldata AS $key=>$value)\n\t{\n\t\tif($value === FALSE || trim($value) == '')\n\t\t{\n\t\t\t$new_urldata[$key] = '';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$new_urldata[$key] = $value;\n\t\t}\n\t}\n\t\n\treturn $new_urldata;\n}", "title": "" }, { "docid": "7c59c82f904320ebb2991dbca25c979f", "score": "0.5780993", "text": "public function toNonEmptyList(): array;", "title": "" }, { "docid": "8178219385ccb12f2e44c12706ee49e7", "score": "0.577337", "text": "public function getNoSuffixItems() {\r\n\t\t$data = array();\r\n\t\t$this->db->from('inventory');\r\n\t\t$this->db->where('suffix is null', null, true);\r\n\t\t$query = $this->db->get();\r\n\t\tif($query->num_rows() > 0) {\r\n\t\t\tforeach($query->result_array() as $row) {\r\n\t\t\t\t$data[] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $data; //array\r\n\t}", "title": "" }, { "docid": "9c2466c723177091d5f1a5203da4ace2", "score": "0.5759146", "text": "function trim_value(&$value){\n if(gettype($value) == 'string'){\n $value = trim($value);\n }\n if(gettype($value) == 'array'){\n array_walk($value, 'trim_value');\n }\n}", "title": "" }, { "docid": "57dbce9a2669dd3109d58c2a3c2ef49b", "score": "0.5758261", "text": "public function trim_user_ary($users)\n\t{\n\t\tif (sizeof($users) > 4)\n\t\t{\n\t\t\tarray_splice($users, 3);\n\t\t}\n\t\treturn $users;\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "98a92f5f221512e805209e68c21a2f41", "score": "0.7230707", "text": "public function update($resource, $id, $data);", "title": "" }, { "docid": "259a6a29a43bf9b88ecc1eb3eee3041e", "score": "0.6979853", "text": "public function updateResource($resourceType, $resourceId, $record);", "title": "" }, { "docid": "c5e38f3d50e186dc31a1c1e3191e33a9", "score": "0.6735281", "text": "public function update(Request $request, Resource $resource)\n {\n $this->validate($request, [\n 'name' => 'required|string|max:255',\n 'desc' => 'required|string',\n 'cover' => 'image',\n 'photos.*' => 'image'\n ]);\n\n $resource->update($request->only('name', 'desc'));\n\n if ($request->hasFile('cover')) {\n if ($resource->cover()) {\n $resource->cover()->update(['cover' => 0]);\n }\n $resource->uploadPhoto($request->file('cover'), \"$resource->name cover\", 1);\n }\n\n if ($request->has('photos')) {\n foreach ($request->photos as $key => $photo) {\n $resource->uploadPhoto($photo, \"$resource->name photo\");\n }\n }\n\n return redirect('/home')->with(['status' => 'Device successfully updated']);\n }", "title": "" }, { "docid": "5356d72880be7a8e7291a3812494f44a", "score": "0.6498234", "text": "public function update(Request $request, storage $storage)\n {\n //\n }", "title": "" }, { "docid": "7f0fded4aa42dd4d661965974fccb688", "score": "0.6330383", "text": "function requestUpdate($resourceName);", "title": "" }, { "docid": "9df920f81c47ce1493ae744241672b2f", "score": "0.62157947", "text": "function updateResource($model)\n {\n }", "title": "" }, { "docid": "1d81eeba25152205b32aee461040c8af", "score": "0.61946255", "text": "function updateResource($id, $data)\n\t{\n\t\tif(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n $this->validateResource($data, $id);\n\t\t$this->db_update($this->_table, $this->getDbFields($data), array('id'=>$id));\n\t}", "title": "" }, { "docid": "a0575945e98b4f0b6ff629994e5f1060", "score": "0.6156594", "text": "public function update($resourceType, $id, array $queryParams = [], $meta = null);", "title": "" }, { "docid": "19cf522850f8d1f010d9f193ff0ee265", "score": "0.6095271", "text": "public function updateResourceData($resource, HungerGames $data){\n $this->createGameResource($resource, $data);\n }", "title": "" }, { "docid": "f25a192098a47b98f8a7c2af33a1dd2b", "score": "0.6065655", "text": "function updating_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "17ac23b2fa28e090182571ed20ffe721", "score": "0.6044543", "text": "public function update(Request $request, $resource, $id)\n {\n $original = $this->model->find($id);\n $model = $original->update($request->all());\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource.show', [\n 'resource' => $this->modelName,\n 'id' => $id\n ]);\n }", "title": "" }, { "docid": "e76e30799c75f7561fa2d246f6bd2a57", "score": "0.59422135", "text": "public function applyResource(Resource $resource): void;", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "d9e868d7c27c54e84b68cd0b04675e55", "score": "0.59301335", "text": "function eh_update_resource($type, $resource, $params)\n\t{\n\t\t$url\t\t= eh_get_api_url().\"resources/\".$type.\"/\".$resource.\"/set\";\n\t\t$info\t\t= explode(\"\\n\", eh_fetch_data($url, $params));\n\t\tif(strpos($info[0], 'negative') !== false)\n\t\t{\n\t\t\treturn $info[0];\n\t\t}\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "23ff4e035f19244ecf2ecfc892af99e2", "score": "0.5929896", "text": "function updated_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\UpdatedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "daedbb0f657251ba1f1dfe05df9672c1", "score": "0.58814067", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n \n // STEP 1: Update or insert this identity as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\"); \n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\", \n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords(); \n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\", \n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n } \n }", "title": "" }, { "docid": "5f4fa67168957ecd78198365cfd74bd9", "score": "0.58386296", "text": "public function update(Request $request)\n {\n try {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n ]);\n\n if ($validator->fails()) {\n $response = [\n 'msg' => $validator->errors->all(),\n 'status' => 0,\n ];\n }\n $data = [];\n if($request->image) {\n $image = ImageUploadHelper::imageupload($request, 'image');\n $data['image'] = $image;\n $data['name'] = $request->name;\n } else {\n $data['name'] = $request->name;\n }\n $resource = Resource::where('id', $request->id)->update($data);\n \n if ($resource) {\n $response = [\n 'msg' => 'Resource Edit Successfully',\n 'status' => 1,\n ];\n } else {\n $response = [\n 'msg' => 'Oops! Something went wrong',\n 'status' => 0,\n ];\n }\n } catch (\\Exception $e) {\n $response = [\n 'msg' => $e->getMessage() . \" \" . $e->getFile() . \" \" . $e->getLine(),\n 'status' => 0,\n ];\n }\n\n return response()->json($response);\n }", "title": "" }, { "docid": "e13311a6d3d6df9928a268f0dfeef488", "score": "0.58193165", "text": "public function update(EquipoStoreRequest $request, $id)\n {\n $equipo = Equipo::find($id);\n $equipo->fill($request->all())->save();\n if($request->file('foto_equipo')){\n $path = Storage::disk('public')->put('images/equipos', $request->file('foto_equipo'));\n $equipo->fill(['foto_equipo' => asset($path)])->save();\n }\n return redirect()->route('equipos.index')->with('info', 'Equipo actualizado con éxito');\n }", "title": "" }, { "docid": "4594dc168aa13c6fef27f370ea295688", "score": "0.57901055", "text": "public function update(Request $request, $id)\n {\n $stock = Stock::findOrFail($id);\n $stock->title = $request->title;\n $stock->caption = $request->caption;\n $stock->location_id = $request->location_id;\n $stock->type = $request->type;\n if ($request->img != null) {\n\n if (file_exists(public_path('') . $stock->img)) {\n unlink(public_path('') . $stock->img);\n }\n\n $imageName = \"/uploads\" . \"/\" . time() . '.' . $request->img->extension();\n\n $request->img->move(public_path('uploads/'), $imageName);\n $stock->img = $imageName;\n }\n $stock->save();\n\n return redirect('/stock/list');\n }", "title": "" }, { "docid": "6bad782d5097f353b6d7ab6700de6bd2", "score": "0.5789171", "text": "public function putAction()\n {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "b5cccc3771870667a9ee2e74c567e04f", "score": "0.5788723", "text": "public function put($resource, $id = 0, $data = NULL) {\n $data = $this->request('PUT', SPOTIFY_API_ENDPOINT, '/' . $resource . '/' . $id . '', 'application/json', $data, array());\n return $data;\n }", "title": "" }, { "docid": "1fc7ff41b62020f266925c1d4d0429db", "score": "0.57780427", "text": "public function update()\n {\n $this->objectWriteNot(\"update\");\n }", "title": "" }, { "docid": "07bb2e794095f53c3ada145c00d6e27c", "score": "0.5770977", "text": "public function update($id)\n {\n return $this->_resourcePersistence->store($id);\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "10a5238440cd234bf32137b5c2bdb8ca", "score": "0.5738228", "text": "public function updateAction () {\n\t\t$this->validateHttpMethod(\"PUT\");\n\t\t\n\t}", "title": "" }, { "docid": "286908b8496df6848f6d30646fd1773f", "score": "0.5703068", "text": "public function updateStream($path, $resource, $config = [])\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "632a0e357db115573e3d55d2e9207359", "score": "0.5699802", "text": "public function putAction()\n\t{\n\n\t\t\t\n\t\t$this->view->id = $id;\n\t\t$this->view->params = $this->_request->getParams();\n\t\t$this->view->message = sprintf('Resource #%s Updated', $id);\n\t\t$this->_response->ok();\n\n\t}", "title": "" }, { "docid": "8759752add8b6db67fed4d69cb0208e8", "score": "0.5683185", "text": "public function update()\n\t{\n\t\tparent::update();\n\t\t$this->write();\n\t}", "title": "" }, { "docid": "14c153b0cb8091e3ce492801115cea2c", "score": "0.5676489", "text": "public function update(Request $request, $id)\n {\n $name = $request->name;\n $description = $request->description;\n $amount = $request->amount;\n $category_id = $request->category_id;\n $photo = $request->photo;\n $has_discount = $request->has_discount;\n $product = new Product();\n $product->name = $name;\n $product->description = $description;\n $product->amount = $amount;\n $product->category_id = $category_id;\n $product->has_discount = ($has_discount === \"true\" || $has_discount === \"1\") ? 1: 0;\n\n\n $product_db = Product::find($id);\n $product_db->name = $product->name;\n $product_db->description = $product->description;\n $product_db->amount = $product->amount;\n $product_db->category_id = $product->category_id;\n $product_db->has_discount = $product->has_discount;\n\n if($product_db->save()) {\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $fileName = time() . '.' . $image->getClientOriginalExtension();\n \n $img = \\Image::make($image->getRealPath());\n $img->resize(250, 250, function ($constraint) {\n $constraint->aspectRatio(); \n });\n \n $img->stream(); // <-- Key point\n \n //dd();\n $full_url = 'images/1/smalls'.'/'.$fileName;\n \\Storage::disk('public')->put($full_url, $img);\n\n $product_db->photos = $full_url;\n $product_db->save();\n }\n $product_db->category = $product_db->category;\n return $product_db;\n }\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6b91824bf8c51c5e05fd48e2728329bf", "score": "0.56742364", "text": "public function update(Request $request, $id)\n {\n try{\n $obj = Obj::where('id',$id)->first();\n\n /* delete file request */\n if($request->get('deletefile')){\n\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route($this->module.'.show',[$id]);\n }\n\n $this->authorize('update', $obj);\n /* If file is given upload and store path */\n if(isset($request->all()['file'])){\n $file = $request->all()['file'];\n $path = Storage::disk('public')->putFile('category', $request->file('file'));\n $request->merge(['image' => $path]);\n }\n\n $obj = $obj->update($request->except(['file'])); \n flash('('.$this->app.'/'.$this->module.') item is updated!')->success();\n return redirect()->route($this->module.'.show',$id);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "7a0daf096da3d4426382a1e223faf321", "score": "0.5611065", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->stream($path, $resource, $config, 'update');\n }", "title": "" }, { "docid": "61fd60c4351f42e6fbc02b50ebca8bc2", "score": "0.5605237", "text": "public function update(Request $request, $id)\n {\n $resource = Resources::where('id', $id)->first();\n $resource->name = $request->name;\n $resource->category_id = (int)$request->category_id;\n $resource->location = $request->location;\n $resource->description = $request->description;\n $resource->icon = $request->icon;\n return json_encode($resource->save());\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "ecb354cb7b6b47a575835c7db1ad90b5", "score": "0.5598929", "text": "public function updateStreamAsync($path, $resource, Config $config);", "title": "" }, { "docid": "096b7dba1f9fc21e9dc73bbc8b007ad4", "score": "0.5582224", "text": "abstract public function update($id, $request);", "title": "" }, { "docid": "a2a8c7ed3b85cbbe7e79548fb9edbe73", "score": "0.558093", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required',\n ]);\n $data = $request->input();\n if (($request['img'])){\n $folder = 'products/'. date('Y') . '/'. date('m');\n\n $data['img'] = $request->file('img')->store('images/'. $folder);\n\n }\n $item = Product::find($id);\n $item ->update($data);\n return redirect()->route('admin.products.index')->with('success', 'Изменения сохранены');\n }", "title": "" }, { "docid": "7aa2abed7c854f7758eb73c29122e0bf", "score": "0.55795985", "text": "public function update(StorePhotos $request, $id)\n {\n // Grab the inventory item so we can update it\n $image = Images::findOrFail($id);\n\n $image->fill($request->validated());\n \n return (new ImagesResource($image))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "29aad1545f3bd950877d86ff51dcbf21", "score": "0.55708927", "text": "public function update(Request $request, $id)\n {\n $registro = Producto::find($id);\n $valores = $request ->all(); //recupero todos los datos del formulario\n $img = $request -> file('imagen');\n if(!is_null($img) ){\n $imagen = $request -> file('imagen')-> store('public/imagenes'); //obtengo la imagen del input y la guardi en el storage\n $url_replace = str_replace('storage','public', $registro->imagen); //reemplazo la url para eliminar del storage\n $url_N= Storage::url($imagen); //almaceno la nueva imagen en el storage\n Storage::delete($url_replace);\n $url = Storage::url($imagen);\n $valores['imagen'] = $url;\n }\n $registro ->fill($valores);\n $registro ->save();\n return redirect('/dashBoard/productos');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "fb222032c6bacfdf3f59fba2c85e8ff3", "score": "0.555832", "text": "public function update(StoreProduct $request, $id)\n {\n $params = request()->except(['_token']);\n if ($request->hasFile('photo')) {\n $path = $request->file('photo')->store('images');\n $params['photo'] = $path;\n }\n Product::where('id', $id)\n ->update($params);\n\n return redirect()->route('admin.products.show');\n }", "title": "" }, { "docid": "1d5bf70b6f6ee925cb3f92ebbf7df49a", "score": "0.5552059", "text": "public function update(Request $request, $id)\n {\n //\n $slider = SliderImage::find($id);\n if(request()->hasFile('photo')){\n Storage::disk('public')->delete('slider_image/'.$slider->slider_image);\n $image = request()->file('photo');\n $imageName = time() . '_' . $image->getClientOriginalName();\n $image->storeAs('slider_image', $imageName, 'public');\n\n $slider->slider_image = $imageName;\n $slider->updated_by = Auth::user()->name;\n $slider->save();\n toast('Slider Image Updated Successfully!','success');\n return redirect()->back();\n }\n\n }", "title": "" }, { "docid": "4c0ab51ecbeaff3788498a88d8e05dde", "score": "0.55394554", "text": "public function update($id) {\n \n }", "title": "" }, { "docid": "516873632753a11d0fca6446f9d7fead", "score": "0.55387545", "text": "public function update(Request $request, $id)\n {\n $modif=Image::find($id);\n if ($request->images== null){ \n }else{ \n Storage::delete('public/images/original/'.$modif->images);\n Storage::delete('public/images/thumbnails/'.$modif->images);\n $img=$request->images;\n $renom=time().$img->hashName();\n $img->store('/public/images/original/');\n $resized=ImageIntervention::make($img)->resize(109,108);\n $resized->save();\n Storage::put('/public/images/thumbnails/'.$renom, $resized);\n $modif->images=$renom;\n }\n\n $modif->images=$renom;\n $modif->save();\n return redirect('/insta');\n }", "title": "" }, { "docid": "db6cffbe49713220724fc0e32ce7122e", "score": "0.55386496", "text": "public function update(Request $request, $id)\n {\n $this->validateData($request); //ตรวจสอบข้อมูลก่อนการแก้ไข\n Networkedstorage::find($id)->update($request->all()); //ค้นหาและแก้ไขข้อมูลในตาราง networked_storages\n return redirect('/networkedstorage')->with('success','แก้ไขข้อมูลสำเร็จแล้ว');\n }", "title": "" }, { "docid": "5f6cc4993e197be08863357458931587", "score": "0.55344915", "text": "public function update(Request $request, int $id)\n {\n\n $request->validate($this->page_validate());\n $product = Product::findOrFail($id);\n $data = $request->all();\n $data['image'] = $product->image;\n $data = array_merge($data, $this->slug($request));\n\n if ($request->file('image'))\n {\n _file_delete($data['image']);\n $data['image'] = $this -> upload( $request , 'products' );\n }\n\n $product->update($data);\n\n return redirect(route('admin.product.index'))->with(_sessionmessage());\n }", "title": "" }, { "docid": "ab9b7d4682e0b792e27aad8d2e440b2e", "score": "0.5520933", "text": "public function update(Request $request, $id)\n {\n\n $requestData = $request->all();\n if ($request->hasFile('Imagen')) {\n\n $producto = producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->Imagen);\n\n $requestData['Imagen'] = $request->file('Imagen')\n ->store('uploads', 'public');\n }\n\n $producto = producto::findOrFail($id);\n $producto->update($requestData);\n\n return redirect('productos')->with('flash_message', 'producto Actualizado!');\n }", "title": "" }, { "docid": "014b2b761d95ca9c270fcc41c92d3964", "score": "0.5509719", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'trash' => 'required',\n 'price' => 'required|integer',\n // 'image' => 'required'\n ]);\n\n if ($validator->fails()) {\n return redirect('admin/trash/' . $id . '/edit')\n ->withErrors($validator);\n } else {\n $trash = Trash::find($id);\n\n $trash->trash = request('trash');\n $trash->price = request('price');\n\n if (!$request->file('image')) {\n $image = request('imagePath');\n } else {\n $image = base64_encode(file_get_contents(request('image')));\n $client = new Client();\n $res = $client->request('POST', 'https://freeimage.host/api/1/upload', [\n 'form_params' => [\n 'key' => '6d207e02198a847aa98d0a2a901485a5',\n 'action' => 'upload',\n 'source' => $image,\n 'format' => 'json'\n ]\n ]);\n\n $get = $res->getBody()->getContents();\n $data = json_decode($get);\n $trash->image = $data->image->display_url;\n }\n\n $trash->save();\n alert::success('message', 'Trash Updated');\n return redirect('admin/trash');\n }\n }", "title": "" }, { "docid": "84d0339c9496a4a023b54955b36002eb", "score": "0.5507803", "text": "public function updateSingle($request, $response, $args);", "title": "" }, { "docid": "a0c8aa8d43f7dbc67d52effeb5ceff30", "score": "0.55019945", "text": "public function update(Request $request, Producto $producto)\n {/*\n $producto->update($request->only(['nombreProducto', 'precio']));\n\n*/\n $producto->nombreProducto = $request->nombreProducto ?? $producto->nombreProducto;\n $producto->stock = $request->stock ?? $producto->stock;\n $producto->url = $request->url ?? $producto->url;\n $producto->precio = $request->precio ?? $producto->precio;\n $producto->save();\n return new ProductoResource($producto);\n }", "title": "" }, { "docid": "013212daa4ecab2fd83de19a4cffe83e", "score": "0.5501016", "text": "public function saveTransactionResource($resource)\n\t{\n\t\t$path = $this->getTransactionResourcePath($resource->getHash());\n\t\t$this->filesystem()->put($path, serialize($resource));\n\t}", "title": "" }, { "docid": "9eefb21d2c4fee1ef44fdb5073e1ab9d", "score": "0.54961485", "text": "public function update(Request $request, $id)\n {\n $slider=Headerslider::find($id);\n $validator=$request->validate([\n 'image'=>'required|mimes:png,jpg|max:1024'\n ]);\n if($validator==false)\n {\n return redirect()->back();\n }\n if(File::exists(public_path('/storage/images/'.$slider->image)))\n {\n File::delete(public_path('/storage/images/'.$slider->image));\n }\n $filename=rand().'.'.$request->image->extension();\n $request->image->storeAs('public/images/sliders',$filename);\n $request->image=$filename;\n $slider->update([\n 'image'=>$request->image\n ]);\n return redirect('/admin-user/slider');\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "3df93bb518efe3cbaf727ca9ad9328a0", "score": "0.5491213", "text": "public function testUpdateAProduct()\n {\n $prod = $this->generateProducts()->first();\n $this->seeInDatabase('products', ['name' => $prod->name]);\n\n $params = [\n 'name' => 'Google Pixel XL',\n 'description' => 'The best phone on the market',\n 'price' => 699.99,\n ];\n\n $response = $this->json('PUT', \"/products/{$prod->id}\", $params);\n $this->seeInDatabase('products', [\n 'name' => $params['name'],\n 'description' => $params['description'],\n 'price' => $params['price'],\n ]);\n }", "title": "" }, { "docid": "1e04073b58a998da6e0122e24cd1be12", "score": "0.5490248", "text": "public function update(Request $request, $id)\n {\n\n\n $datostrabajos=request()->except(['_token','_method']);\n\n\n if ($request->hasFile('Foto')) {\n\n\n$trabajo= Trabajos::findOrFail($id);\n\nStorage::delete('public/'. $trabajo->Foto);\n\n$datostrabajos['Foto']=$request->file('Foto')->store('uploads','public');\n\n\n }\n\n Trabajos::where('id','=',$id)->update($datostrabajos);\n\n //$trabajo= Trabajos::findOrFail($id);\n\n //return view('trabajos.edit',compact('trabajo'));\n\nreturn redirect('trabajos')->with('Mensaje','Trabajo modificado con éxito');\n }", "title": "" }, { "docid": "abf7a5c8e18b23e0935566a6ec214c56", "score": "0.5485075", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product -> name = $request -> name;\n $product -> price = $request -> price;\n $product -> description = $request -> description;\n\n $product -> update();\n\n Session::put('update', 'The product has been updated');\n\n return redirect('/resource');\n }", "title": "" }, { "docid": "1e8339e3233595b2c1df533b2987741b", "score": "0.5478798", "text": "public function update( Request $request, $id );", "title": "" }, { "docid": "a338906322949bb1be1e0e7a003a46e3", "score": "0.5478304", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n\n $product=Product::findOrFail($id);\n\n $data=$request->all();\n $data['admin_vendor_id']=Auth::user()->id;\n $data['is_featured']=$request->input('is_featured',0);\n $size=$request->input('size');\n\n if ($request->hasFile('file')) {\n $uploadedFile = $request->file('file')->store('backend/product');\n $data['photo'] = $uploadedFile;\n }\n\n $status=$product->fill($data)->save();\n if($status){\n request()->session()->flash('success','Product Successfully updated');\n }\n else{\n request()->session()->flash('error','Please try again!!');\n }\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8a8a5b40d30a661682ea39e7d25ae1ed", "score": "0.54719293", "text": "public function put()\n {\n /** @var \\Tacit\\Model\\Persistent $modelClass */\n $modelClass = static::$modelClass;\n\n $criteria = $this->criteria(func_get_args());\n\n /** @var \\Tacit\\Model\\Persistent $item */\n $item = $modelClass::findOne($criteria, [], $this->app->container->get('repository'));\n\n if (null === $item) {\n throw new NotFoundException($this);\n }\n\n try {\n /** @var \\Tacit\\Model\\Persistent $newItem */\n $newItem = new $modelClass();\n $data = array_replace_recursive(\n $newItem->toArray(),\n $this->app->request->post(null, [])\n );\n \n $data = $this->putBeforeSet($data);\n \n $item->fromArray($data, Collection::getMask($item));\n $item->save();\n } catch (OperationalException $e) {\n $e->next($this);\n } catch (ModelValidationException $e) {\n throw new UnacceptableEntityException($this, 'Resource validation failed', $e->getMessage(), $e->getMessages(), $e);\n } catch (Exception $e) {\n throw new ServerErrorException($this, 'Error updating resource', $e->getMessage(), null, $e);\n }\n\n $this->respondWithItem($item, new static::$transformer());\n }", "title": "" }, { "docid": "c0bda952d3e806da6a09fbad44c10c87", "score": "0.5466996", "text": "public function edit(storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c71ca30825c84517c03b65e7df4230aa", "score": "0.54666376", "text": "function update($record)\n { \n ////DEBUG\n return; \n ////END DEBUG \n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->put('/SuppliesAPI/item/id' . $record['id'], $record);\n }", "title": "" }, { "docid": "90755391b8e7c7b31e24f046029b9f4b", "score": "0.54652643", "text": "public function update($data) {\n\n }", "title": "" }, { "docid": "9043981d5738f7df4a3238c2fe116872", "score": "0.54592717", "text": "public function update($id,Request $request)\n {\n $file = $request->file('file');\n $extension = $file->getClientOriginalExtension();\n Storage::disk('local')->put($file->getFilename().'.'.$extension, File::get($file));\n $entry = Fileentry::find($id);\n $entry->original_mime_type = $file->getClientMimeType();\n $entry->original_filename = $file->getClientOriginalName();\n $entry->filename = $file->getFilename().'.'.$extension;\n\n $entry->save();\n }", "title": "" }, { "docid": "aa1f77aee84ae3a416c76923d1a56559", "score": "0.5459106", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "b249f46520a6b9be14d03dabf94d1d39", "score": "0.5454029", "text": "public function update(Request $request, $id)\n {\n //\n // dd($request);\n $user = User::find($id);\n $user->fill($request->all());\n if($request->hasFile('image')){\n $path = $request->file('image')->store('user');\n $file = Storage::delete($user->image);\n $user->image = $path;\n // dd(\"yey\",$user);\n }\n // dd(\"stop\",$user);\n $user->update();\n\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "68958d739424a9622fdca778a3822d3a", "score": "0.544828", "text": "public function update(StoreProduct $request, Product $product)\n {\n if($request->has('thumbnail')) {\n $name = basename($request->thumbnail->getClientOriginalName());\n $name = $name;\n $path = $request->thumbnail->move('productimages/', $name, 'public');\n }\n\n $product->name = $request->product_name;\n $product->price = $request->price;\n $product->desc = $request->desc;\n $product->quantity = $request->qty;\n $product->discount = $request->discount;\n $product->tax = $request->tax;\n $product->category_id = $request->category_id[0];\n $product->brand_id = $request->select_pharmacy[0];\n\n $image = ProductImage::where('image_id', '=', $product->id)->first();\n $image->image_path = $path;\n \n $product->save();\n $image->save();\n\n Session::flash('success', 'Product has been successfully updated!');\n\n return redirect()->route('admin.products.create', compact('product'));\n }", "title": "" }, { "docid": "b2886e9f73a0cf99ca3dd4d1756441e5", "score": "0.54461145", "text": "public function set(ResourceInterface $resource);", "title": "" }, { "docid": "9af94672d7f031c4cda0a455d6a11422", "score": "0.54421556", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->title = $request->title;\n $product->sku = $this->generateSKU();\n// if($request->input('slug')){\n// $product->slug = make_slug($request->input('slug'));\n// }else{\n// $product->slug = make_slug($request->input('title'));\n// }\n $product->slug = $this->makeSlug($request->slug);\n $product->status = $request->status;\n $product->price = $request->price;\n $product->discount_price = $request->discount_price;\n $product->description = $request->description;\n\n $product->meta_desc = $request->meta_desc;\n $product->meta_title = $request->meta_title;\n $product->meta_keywords = $request->meta_keywords;\n $product->user_id = Auth::id();\n\n $product->save();\n\n $photos = explode(',', $request->input('photo_id')[0]);\n\n\n $product->photos()->sync($photos);\n\n Session::flash('success', 'successfuly Edit product');\n return redirect('/administrator/products');\n\n }", "title": "" }, { "docid": "cb8621b723dc6fb774a0ae33c7eda6ca", "score": "0.54419065", "text": "public function update(StoreProductRequest $request, int $id)\n {\n $input = $request->only('title', 'description', 'price', 'category_id');\n Auth::user()->company->products()->find($id)->update($input);\n if ($request->hasFile('media')) {\n $files = $request->file('media');\n $this->productRepo->addMedia($files, $id);\n }\n return redirect(route('showMyProducts'));\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "fb30184e0b309716563a37352db2582d", "score": "0.5437578", "text": "public function put($data)\n {\n }", "title": "" }, { "docid": "98ab15cbe0428e7a24c838d3819e2bf9", "score": "0.5437555", "text": "public function update($id, Request $request, Product $product)\n {\n \t$productupdate = Product::find($id);\n\n if($request->hasFile('photo'))\n {\n\n @unlink(public_path().'/upload/product'.$productupdate->photo);\n \n $file = $request->file('photo');\n $path = public_path().'/upload/product';\n $filename = time().'.'.$file->getClientOriginalExtension();\n }\n if($file->move($path, $filename))\n {\n $productupdate->photo = $filename;\n }\n\n \t$productupdate->update($request->all());\n \treturn back();\n }", "title": "" }, { "docid": "c955211aedc76478d1650fdab80c5cff", "score": "0.542724", "text": "public function updatedProductById(Request $request, $id);", "title": "" }, { "docid": "5bafa084b714ad3beb62cc8123d05421", "score": "0.5426392", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = Product::findOrFail($id);\n $data->update([\n 'name' => serialize($request->name),\n 'price' => $request->price,\n 'category_id' => $request->category_id,\n 'currency_id' => $request->currency_id,\n 'image' => Helper::UpdateImage($request, 'uploads/category/', 'image', $data->image)\n ]);\nif ($data)\n Alert::success(trans('backend.updateFash'))->persistent(trans('backend.close2'));\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "d3fa7e7b7a7e3977da33f1e0093d5f5b", "score": "0.5425214", "text": "public function resourceHasBeenUpdated();", "title": "" }, { "docid": "628f6fb199b5a72e6e84a33d9c6f9a5e", "score": "0.5424779", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'picture' => 'image|sometimes|max:1999'\n\n ]);\n\n if($request->hasFile('picture')){\n // Get filename with the extension\n $filenameWithExt = $request->file('picture')->getClientOriginalName();\n // Get just filename\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n // Get just ext\n $extension = $request->file('picture')->getClientOriginalExtension();\n // Filename to store\n $fileNameToStore= $filename.'_'.time().'.'.$extension;\n // Upload Image\n $path = $request->file('picture')->storeAs('public/picture', $fileNameToStore);\n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n $product= Product::find($id);\n $product->product_name = $request->product_name;\n $product->supplier_id = $request->supplier_id;\n $product->cat_id = $request->cat_id;\n $product->status = $request->status;\n $product->user_id = 1;\n $product->picture = $fileNameToStore;\n $product->alert_quantity = $request->alert_quantity;\n $product->sale_price = $request->sale_price;\n $product->purches_price = $request->purches_price;\n $product->profit = $request->profit;\n\n\n $product->save();\n\n return redirect('/product');\n }", "title": "" }, { "docid": "f078dcf8f707bde762a227c61968e661", "score": "0.54241914", "text": "public function update($id, array $data){\n $product = Product::find($id);\n if(!empty($data['image'])){\n $titleShort = Str::slug(substr($data['title'], 0, 20));\n $data['image'] = UploadHelper::update('image', $data['image'], $titleShort.'-'. time(), 'images/products', $product->image); \n }else{\n $data['image'] = $product->image;\n }\n if (is_null($product))\n return null;\n\n $product->update($data);\n return $this->getByID($product->id);\n }", "title": "" }, { "docid": "06b935ea46fe7f6ab5cf585a11f5279e", "score": "0.5422626", "text": "public function update(ValidateProductInformation $request, Product $product)\n {\n $data = $request->all();\n $data['slug'] = str_slug($data['name']);\n $path = $product->image;\n if($request->file('image')!=null){\n $path = $request->file('image')->store('public/products');\n }\n\n $data['image'] = $path;\n $product->update($data);\n return redirect('/products');\n }", "title": "" }, { "docid": "a8a0978e247663271949812bb1f0e921", "score": "0.5421746", "text": "public function update(Request $request, $id)\n {\n $id = $request->id;\n if($request->hasFile('image')){\n Product::where('id',$id)->update([\n 'title'=>$request->title,\n 'textarea'=>$request->textarea,\n 'quantity'=>$request->quantity,\n 'price' =>$request->price,\n 'offer_price'=>$request->offer_price,\n 'status'=>$request->status,\n 'created_at' => Carbon::now(),\n ]);\n $path = $request->file('image')->store('imagestore');\n Product::find($id)->update([\n 'image'=> $path\n ]);\n return redirect()->route('product.index')->with('success',' Update Succesfully');\n }\n else{\n Product::where('id',$id)->update([\n 'title'=>$request->title,\n 'textarea'=>$request->textarea,\n 'quantity'=>$request->quantity,\n 'price' =>$request->price,\n 'offer_price'=>$request->offer_price,\n 'status'=>$request->status,\n 'created_at' => Carbon::now(),\n ]);\n return redirect()->route('product.index')->with('success','Update Succesfully');\n } \n\n }", "title": "" }, { "docid": "66743027520aa87b03d09a35564488ce", "score": "0.5420195", "text": "public function update(Request $request, $id)\n {\n $products = Product::find($id);\n\n $products->name = $request->name;\n $products->description = $request->description;\n $products->price = $request->price;\n $products->quantity = $request->quantity;\n\n $products->cat_id = $request->cat_id;\n if($request->hasFile('image')){\n\n $image = $request->file('image');\n $filename = time() . '.' . $image->getClientOriginalExtension();\n $location = public_path('uploads/images/' . $filename);\n Image::make($image)->save($location);\n\n $oldfilename = $products->image;\n //update the db\n $products->image = $filename;\n //delete the old image \n Storage::delete($oldfilename);\n }\n $products->save();\n\n if (isset($request->tags)) {\n $products->tags()->sync($request->tags);\n } else {\n $products->tags()->sync(array());\n }\n \n Session::flash('success', 'This post was successfully saved.');\n return redirect::route('product',$products->id);\n\n }", "title": "" }, { "docid": "97031ad94f3ce077f62b44e5b800499e", "score": "0.5410227", "text": "public function update(Request $request, $id)\n {\n $encrypt_decrypt = encrypt_decrypt('decrypt',$id);\n if($encrypt_decrypt === false){\n abort(403);\n }else{\n $this->validate($request, [\n 'name' => 'required',\n 'detail' => 'required',\n 'price' => 'required|numeric',\n 'in_stock' => 'required|numeric',\n ]);\n\n\n $product = Product::find($encrypt_decrypt);\n $product->name = $request->input('name');\n $product->detail = $request->input('detail');\n $product->price = $request->input('price');\n $product->in_stock = $request->input('in_stock');\n if($request->hasFile('file')){\n @unlink($product->photo);\n $filename = time().'.'.$request->file('file')->getClientOriginalExtension();\n $product->photo = 'public/img/product/new-product/' . $filename;\n $request->file('file')->move(public_path('public/img/product/new-product'), $filename);\n }\n $product->save();\n \n return redirect()->route('products.index')\n ->with('success','product updated successfully');\n }\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
2b7fd763804876b6450e597ada9677d0
Notification URL. Payment Service will send information about the course of the transaction to this URL. Value is not required. Can be set in Merchant panel or as a global value in configuration. Min 1 character, max 256 characters.
[ { "docid": "35dd7b0c3574c02111b6a13fb906fba6", "score": "0.0", "text": "public function setNotificationUrl(string $notificationUrl): PaymentBuilderInterface\n {\n $this->payment->setNotificationUrl($notificationUrl);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "c05b1a43f98214122ae4c3a6428a3bdf", "score": "0.75181574", "text": "public function getNotificationUrl()\n {\n return \\Mage::getUrl(\\Mage::getStoreConfig('payment/hycpay/notification_url'));\n }", "title": "" }, { "docid": "01bc7f72c73cfc1ba169aa58f5d7f9ec", "score": "0.7332349", "text": "protected function getNotificationUrl() {\n\t\treturn Mage::getUrl('optile/notification/index', array('_secure' => 1));\n\t}", "title": "" }, { "docid": "d61f74b1f751f3ff70a30713d5f6e54c", "score": "0.71027744", "text": "function getNotifyurl(){\n\t\t$router = $this->Front()->Router();\n\t\treturn '';// $router->assemble(array('action' => 'notify','forceSecure' => true)) .'?orderId=' . $this->getOrderid();\n\t}", "title": "" }, { "docid": "a7a82fda21921d548a9826e8d1813fc4", "score": "0.70499444", "text": "protected function getNotifyURL()\n\t{\n\t\treturn Mage::getUrl('checkout/onepage/notice', array('_secure' => true));\n\t}", "title": "" }, { "docid": "8ef9db78f73d7e840b22cbc669080141", "score": "0.6953485", "text": "public function getNotificationUri() : string\n {\n $urlKey = \"collectorbank/notification/index/reference/{checkout.publictoken}\";\n\n if ($this->getCustomBaseUrl()) {\n return $this->getCustomBaseUrl() . $urlKey;\n }\n\n return $this->storeManager->getStore()->getUrl($urlKey);\n }", "title": "" }, { "docid": "7aa6895d6b54d01491cd3db7491620b7", "score": "0.69228715", "text": "public function getNotificationURL(): string\n {\n return $this->notificationURL;\n }", "title": "" }, { "docid": "2d632a622ce00ebf3cae9dac00593fb2", "score": "0.6900739", "text": "protected function getNotifyURL()\n {\n return Mage::getUrl('cybermut/several/notify', array('_secure' => true));\n }", "title": "" }, { "docid": "13e16b952542d64b2079f66a6352e905", "score": "0.6675217", "text": "function getNotificationfailedurl(){\n\t\t$router = $this->Front()->Router();\n\t\treturn '';//$router->assemble(array('action' => 'notify','forceSecure' => true)) .'?orderId=' . $this->getOrderid();\n\t}", "title": "" }, { "docid": "252b0bf345e918d35b105af1c9faec2b", "score": "0.64893293", "text": "public function getNotifyUrl($payment)\n {\n return Url::fromRoute(\n 'commerce_payment.notify',\n [\n 'commerce_payment_gateway' => $payment->getPaymentGatewayId(),\n ],\n [\n 'absolute' => true,\n ]\n );\n }", "title": "" }, { "docid": "aae9378e78dc6a46d5591df115a3c792", "score": "0.6445809", "text": "public function getPaymentUrl()\n {\n return $this->url($this->getIdentifier(), 'payment');\n }", "title": "" }, { "docid": "9f440b366a1a40b40e98cb55f6b95245", "score": "0.638969", "text": "public function getPaymentUrl();", "title": "" }, { "docid": "6580f0e1f24acc84041c124159c1c855", "score": "0.63527834", "text": "public function notificationIdUrl()\n {\n return [\n 'type' => self::STRING_TYPE,\n 'location' => self::URL,\n ];\n }", "title": "" }, { "docid": "fb514967b00aa3a5ffa01e5357bb8574", "score": "0.62698454", "text": "private function getPaymentURL()\n\t{\n\t\t$sandbox = $this->params->get('sandbox', 0);\n\n\t\tif ($sandbox)\n\t\t{\n\t\t\t/* return different url if Epay ever changes\n\t\t\tIN FUTURE :: IF EPAY CHANGE THEN SANDBOX AND LIVE URL*/\n\t\t}\n\n\t\treturn 'https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx';\n\t}", "title": "" }, { "docid": "e765f01598de066c3593109de09fe875", "score": "0.62310535", "text": "function _notify_url()\r\r {\r\r $db = JFactory::getDBO();\r\r $par = &JComponentHelper::getParams('com_djclassifieds');\r\r // $user\t= JFactory::getUser();\r\r $payment_id = JRequest::getInt('id', 0);\r\r $app = JFactory::getApplication();\r\r $input = $app->input;\r\r $messageUrl = JRoute::_(DJClassifiedsSEO::getCategoryRoute('0:all'));\r\r\r try {\r\r if ($input->getString('Status') != 'OK')\r\r throw new Exception(JText::_(\"PLG_DJCFZARINPAL_PAYMENT_FAILED\"));\r\r\r $Authority = $input->getString('Authority');\r\r $MerchantID = $this->params['merchant_id'];\r\r $Amount = $input->getInt('amount');\r\r\r //$verifyContext = compact('MerchantID', 'Authority', 'Amount');\r\r\r //$verify = $this->zarinPalRequest('verification', $verifyContext);\r\r///////////////////////////////////////////////////////////////////////////////////////\r $data = array(\"merchant_id\" => $MerchantID, \"authority\" => $Authority, \"amount\" => $Amount);\r $jsonData = json_encode($data);\r $ch = curl_init('https://api.zarinpal.com/pg/v4/payment/verify.json');\r curl_setopt($ch, CURLOPT_USERAGENT, 'ZarinPal Rest Api v4');\r curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\r curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);\r curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r curl_setopt($ch, CURLOPT_HTTPHEADER, array(\r 'Content-Type: application/json',\r 'Content-Length: ' . strlen($jsonData)\r ));\r $result = curl_exec($ch);\r curl_close($ch);\r $result = json_decode($result, true);\r/// //////////////////////////////////////////////////////////////////////////////////\r\r if (!empty($result['errors'])) {\r\r throw new Exception(JText::_(\"PLG_DJCFZARINPAL_PAYMENT_CONNECTION_FAILED\"));\r\r\r $status = result['errors']['code'];\r }\r\r\r if ($result['data']['code'] == 100) {\r\r $RefID = $result['data']['ref_id'];\r\r\r $query = \"UPDATE #__djcf_payments SET status='Completed', transaction_id='\" . $RefID . \"' \"\r\r . \"WHERE id=\" . $payment_id . \" AND method='\" . $this->params['plugin_name'] . \"'\";\r\r $db->setQuery($query);\r\r $db->query();\r\r\r $this->_setPaymentCompleted((int)$payment_id);\r\r\r $message = JText::_(\"PLG_DJCFZARINPAL_PAYMENT_SUCCEED\") . '<br>' . JText::_(\"PLG_DJCFZARINPAL_PAYMENT_REF_ID\") . $RefID;\r\r $app->redirect($messageUrl, $message, 'message');\r\r\r exit;\r\r }else {\r\r throw new Exception($this->zarinPalStatusMessage($result['errors']['code']));\r }\r\r\r\r\r\r } catch (Exception $e) {\r\r $message = JText::_(\"PLG_DJCFZARINPAL_PAYMENT_ERROR\") . $e->getMessage();\r\r $app->redirect($messageUrl, $message, 'warning');\r\r exit;\r\r }\r\r }", "title": "" }, { "docid": "d2af9df7437adf4b9d17b801a7e83943", "score": "0.6183534", "text": "private function getPaymentURL()\n\t{\n\t\t$sandbox = $this->params->get('sandbox',0);\n\t\tif($sandbox) {\n\t\t\treturn 'http://sandboxsecure.mobilpay.ro';\n\t\t} else {\n\t\t\treturn 'https://secure.mobilpay.ro';\n\t\t}\n\t}", "title": "" }, { "docid": "3541e40c43594852af8cc48adb7b9367", "score": "0.6079433", "text": "public function getNotificationDashboardUrl(NotificationModel $notification): string;", "title": "" }, { "docid": "9016d3a0784716698c3272afd6581c5a", "score": "0.60582143", "text": "public function notificationPlanIdUrl()\n {\n return [\n 'type' => self::STRING_TYPE,\n 'location' => self::URL,\n ];\n }", "title": "" }, { "docid": "7461e04c7007c8d2d72e6aa6c6673f74", "score": "0.60357904", "text": "protected function getIPNURL()\n {\n return $this->getFormURL() . '?cmd=_notify-validate';\n }", "title": "" }, { "docid": "2522b96fd5ecd5c07a49526aa7e644f4", "score": "0.60304606", "text": "public function sendNotification()\n {\n return 'Payment successfully completed via credit card!';\n }", "title": "" }, { "docid": "0eff818f415ae5a09d70ab1e03b4faed", "score": "0.6029822", "text": "protected function _verificationUrl($notifiable): string\n {\n $prefix = config('frontend.email_verify_url');\n $callbackApiURL = url(\n sprintf(\n '%1$s/%2$d/%3$s',\n '/email/verify/user',\n $notifiable->getKey(),\n $this->verificationToken\n )\n );\n\n return $prefix . urlencode($callbackApiURL);\n }", "title": "" }, { "docid": "52a290fdee672d4a56ef8d67e9260893", "score": "0.5995523", "text": "protected function verificationUrl($notifiable)\n {\n $payload = $this->getToken($notifiable);\n\n return config('lighthouse-graphql-passport.verify_email.base_url').'?token='.$payload;\n }", "title": "" }, { "docid": "d526621ae5cace8ebccb5e376d77ef3a", "score": "0.5972746", "text": "public function getPayperURLCheckout() : string\n {\n return $this->checkNullValue('checkout_url', 'checkout url');\n \n }", "title": "" }, { "docid": "1bca224e83172cd81353f60fd05de781", "score": "0.5888189", "text": "public function getUrlPayment()\n {\n return $this->url_payment;\n }", "title": "" }, { "docid": "fb245208a397b5f5065e6aa6898012e1", "score": "0.58870125", "text": "public function getRedirectUrl()\r\n {\r\n $order = $this->getOrder();\r\n $orderId = $this->getOrderId();\r\n $publicKey = JString::trim($this->config->get('public_key'));\r\n $privateKey = JString::trim($this->config->get('private_key'));\r\n\r\n $payCurrency = $this->getDefaultCurrency();\r\n $orderAmount = $this->_order->val($this->getOrderSumm(), $order->getCurrency())->convert($payCurrency);\r\n\r\n $data = array(\r\n 'version' => self::VERSION,\r\n 'amount' => $orderAmount->val(),\r\n 'currency' => JString::strtoupper($payCurrency),\r\n 'public_key' => $publicKey,\r\n 'description' => $this->getOrderDescription(),\r\n 'order_id' => $orderId,\r\n 'server_url' => $this->_jbrouter->payment('callback'),\r\n 'result_url' => $this->_jbrouter->payment('success') . '&orderId=' . $this->getOrderId()\r\n );\r\n\r\n if ($this->isDebug()) {\r\n $data = array_merge($data, array('sandbox' => 1));\r\n }\r\n\r\n $dataEncode = base64_encode(json_encode($data));\r\n $signature = base64_encode(sha1($privateKey . $dataEncode . $privateKey, 1));\r\n\r\n return $this->_uri . '?' . $this->_jbrouter->query(array(\r\n 'data' => $dataEncode,\r\n 'signature' => $signature\r\n ));\r\n }", "title": "" }, { "docid": "ac5c9ac972412c49d0300acceaa681f1", "score": "0.58773196", "text": "protected function verificationUrl($notifiable)\n {\n return URL::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(120), // 120分(2時間)へ変更\n ['id' => $notifiable->getKey()]\n );\n }", "title": "" }, { "docid": "098fea497cdd58caf873fb1ee9f54e3b", "score": "0.58692205", "text": "public function getRedirectUrl(Notification $notif): string\n {\n switch ($notif->getType()) {\n case self::NOTIF_BADGE:\n return $this->router->generate('me', ['_locale' => 'en']);\n case self::NOTIF_RANKING:\n return $this->router->generate('coaster_ranking', ['_locale' => 'en']);\n default:\n return $this->router->generate('root');\n }\n }", "title": "" }, { "docid": "f47fc6edee21de2942239ba71b716471", "score": "0.5865597", "text": "public function getRequestUrl() \n\t\t{\n\t\t\t// Берем URL из параметров платежной системы\n\t\t\treturn $this->paymentSystem->getParameterByName('query.url')->value;\n\t\t}", "title": "" }, { "docid": "f2f73994d3dc3394eedae562da92c9ed", "score": "0.58343315", "text": "public function getWebhookSaveCustomerUrl() {\n return $this->getHost() . Mage::getStoreConfig('cueconnect/webhook/save_customer/url');\n }", "title": "" }, { "docid": "a58f7d9e838009713a79aa3e3e6e3e32", "score": "0.5822582", "text": "public function get_delivery_url( $context = 'view' ) {\n\t\treturn apply_filters( 'woocommerce_webhook_delivery_url', $this->get_prop( 'delivery_url', $context ), $this->get_id() );\n\t}", "title": "" }, { "docid": "e49aeb86ae8054da3ce9b9378f301158", "score": "0.5817207", "text": "protected function getTransactionUrl()\n\t{\n\t\tif ( $this->productionMode )\n\t\t{\n\t\t\t$this->apiBaseUrl = 'https://api-3t.paypal.com/nvp';\n\t\t\t$this->redirectUrl = 'https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=';\n\t\t}\n\t\telse\t//\tTest/sandbox\n\t\t{\n\t\t\t$this->apiBaseUrl = 'https://api-3t.sandbox.paypal.com/nvp';\n\t\t\t$this->redirectUrl = 'https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=';\n\t\t}\n\t}", "title": "" }, { "docid": "98e0e62855df508334774ecc733d3648", "score": "0.5812016", "text": "public function getNotificationChannelUrl()\n {\n if (array_key_exists(\"notificationChannelUrl\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannelUrl\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4926e70e0c6fc6c64234fb6d843739c1", "score": "0.5809182", "text": "public function getInfoUrl(): string\n {\n return 'https://crontab.guru/#' . str_replace(\" \", \"_\", $this->getSchedule());\n }", "title": "" }, { "docid": "dcb63b9df63adb71836fb52557ee19d1", "score": "0.5806386", "text": "public function getWebhookConfigurationChangedUrl() {\n\n return $this->getHost() . Mage::getStoreConfig('cueconnect/webhook/configuration_changed/url');\n }", "title": "" }, { "docid": "78db55a9610b41d6796b582cb69462b3", "score": "0.580355", "text": "public function getRedirectUrl()\n {\n return route('stripe.make.payment');\n }", "title": "" }, { "docid": "5338db2e6565d09bcb102a17e9ac046b", "score": "0.5801534", "text": "public function getRedirectPaymentPageTemplateUrl()\n {\n // do nothing\n }", "title": "" }, { "docid": "a312dc0f1cbbb29731befdb90f444993", "score": "0.57866913", "text": "public function getSendQuoteMessageUrl(){\r\n return $this->getUrl('*/*/sendQuoteMessage',array('_secure'=>true));\r\n }", "title": "" }, { "docid": "b31cb27e2542fbb936fd121a961990fa", "score": "0.576957", "text": "function notify_url() {\n\t\t$this->loadModel('Cart');\n\t\t$this->loadModel('BookingOrder');\n\t\t$this->loadModel('BookingSlot');\n\t\t$this->loadModel('Booking');\n\t\t$this->loadModel('BookingParticipate');\n\t\t$this->loadModel('VendorManager.ServiceImage');\n\t\t$this->loadModel('ServiceManager.ServiceType');\n\t\t\n\t\tif(!empty($_POST)){\n\t\t\t// Here this code is used for payment verification \n\t\t\t$src = $_POST['src'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t//host status code (secondary).\n\t\t\t$prc = $_POST['prc'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Return bank host status code (primary).\n\t\t\t$successcode = $_POST['successcode'];\t\t\t\t\t\t\t\n\t\t\t//0- succeeded, 1- failure, Others - error\n\t\t\t$ref = $_POST['Ref'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Merchant‘s Order Reference Number\n\t\t\t$payRef = $_POST['PayRef'];\t\t\t\t\t\t\t\t\t\t\t\t//PayDollar Payment Reference Number\n\t\t\t$amt = $_POST['Amt'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Transaction Amount\n\t\t\t$cur = $_POST['Cur'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Transaction Currency\n\t\t\t$payerAuth = $_POST['payerAuth'];\t\t\t\t\t\t\t\t\t\n\t\t\t//Payer Authentication Status\n\t\t\t\n\t\t\t$ord = $_POST['Ord'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Bank Reference – Order id\n\t\t\t$holder = $_POST['Holder'];\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t//The Holder Name of the Payment Account\n\t\t\t$remark = $_POST['remark'];\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t//A remark field for you to store additional data that will \n\t\t\t$authId = $_POST['AuthId'];\t\t\t\t\t\t\t\t\t\t\t\t//Approval Code\n\t\t\t$eci = $_POST['eci'];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//ECI value (for 3D enabled Merchants)\n\t\t\t$sourceIp = $_POST['sourceIp'];\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t//IP address of payer\n\t\t\t$ipCountry = $_POST['ipCountry'];\t\t\t\t\t\t\t\t\t//Country of payer ( e.g. HK) - if country is on high risk country list, an asterisk will be shown (e.g. MY*)\n\t\t\t \n\t\t\t$payMethod = $_POST['payMethod'];\t\t\t\t\t\t\t\t//Payment method (e.g. VISA, Master, Diners, JCB, AMEX)\n\t\t\t$secureHash = $_POST['secureHash'];\n\t\t\t$secureHashSecret = Configure::read('AsiaPay.secureHashSecret');\n\t\t\t//offered by paydollar\n\t\t\n\t\t\tApp::import('Vendor', 'assiapay', array('file' => 'assiapay' . DS . 'SHAPaydollarSecure.php'));\n\t\t\t// load vendor of aisapay\n\t\t\t$isSecureHash=true;\n\t\t\tif($isSecureHash){\n\t\t\t\t$secureHashs=explode(',', $secureHash);\n\t\t\t\t$paydollarSecure=new SHAPaydollarSecure();\n\t\t\t\t $verifyResult =false;\n\t\t\t\twhile(list($key,$value)=each($secureHashs)){\n\t\t\t\t\t$verifyResult = $paydollarSecure->verifyPaymentDatafeed($src,$prc, $successcode, $ref, $payRef, $cur, $amt, $payerAuth,$secureHashSecret, $value);\n\t\t\t\t\tif (!$verifyResult) {\n\t\t\t\t\t\t//echo 'Verify Fail';\n\t\t\t\t\t\t//TODO Verify Fail\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo 'True';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Here type 1- for simple activity bookin, 2- for invited activity booking,3- for vendor payment \n\t\t\t\tif($_POST['type']==1){\n\t\t\t\t\tself::simple_payment_ipn($_POST);\n\t\t\t\t}else\n\t\t\t\tif($_POST['type']==2){\n\t\t\t\t\tself :: invite_process_ipn($_POST);\n\t\t\t\t}else\n\t\t\t\tif($_POST['type']==3){\n\t\t\t\t\tself :: vendor_process_ipn($_POST);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "90cac397094501e939530da1a480bacc", "score": "0.576881", "text": "#[\\ReturnTypeWillChange]\n public function getTransactionUrl()\n {\n return \\rtrim($this->_scopeConfig->getValue('wallee_payment/general/base_gateway_url'), '/') .\n '/s/' . $this->getTransaction()->getSpaceId() . '/payment/transaction/view/' .\n $this->getTransaction()->getTransactionId();\n }", "title": "" }, { "docid": "cc9ef46a6f3f6e062991bf5deda4934f", "score": "0.57518244", "text": "public function getInternationalCardPaymentUrl()\n {\n return $this->scopeConfig->getValue(\n self::ONEPAY_INTERNATIONAL_CARD_PAYMENT_URL,\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "7976444d467c107a70793eb130d36248", "score": "0.57152605", "text": "public function getNoticesInboxUrl()\n {\n return $this->getUrl('adminhtml/notification');\n }", "title": "" }, { "docid": "b03f3a153c75248904fe7aad386b1b8e", "score": "0.5709098", "text": "public function getTransactionUrl()\r\n {\r\n \treturn $this->_paymentData->getMethodInstance($this->_paymentMethodCode)->getTransactionUrl();\r\n }", "title": "" }, { "docid": "90546133c52d10f0d871bdccf3a7e87c", "score": "0.57009745", "text": "public function getAcsCallbackUrl()\n {\n return Mage::getUrl('paymentsense/direct/callback', array('_secure' => true));\n }", "title": "" }, { "docid": "43921eefa3e0fa3c327b98b3bd37cec3", "score": "0.5672585", "text": "private function getUrl()\n {\n if (is_null($this->url)) {\n switch ($this->config['environment']) {\n case 'sandbox':\n case 'beta-sandbox':\n $this->url = \"https://api-3t.paypal.com/nvp\";\n break;\n default:\n $this->url = 'https://api-3t.paypal.com/nvp';\n }\n }\n return $this->url;\n }", "title": "" }, { "docid": "15c3896a539192be44f053b7d5fcbea3", "score": "0.5665378", "text": "protected function verificationUrl($notifiable)\n {\n $url = URL::temporarySignedRoute(\n 'verification.verify', Carbon::now()->addMinutes(60), ['user' => $notifiable->id]\n );\n\n return str_replace('/api', '', $url);\n }", "title": "" }, { "docid": "88b1755d4f6f3976fe6c3a014ce95970", "score": "0.5656311", "text": "public function getPaymentUrl($storeId = 0)\n {\n return self::GATEWAY_URL;\n }", "title": "" }, { "docid": "74f27a853cc4258366839f0b6fdfc2ad", "score": "0.56548744", "text": "public static function create_callback_uri() : string {\n\t\treturn get_site_url() . '/auth/delivery/callback';\n\t}", "title": "" }, { "docid": "b030a9cc4cc1a6c2c6b36d0018b3226f", "score": "0.5654177", "text": "public function verificationUrl($notifiable)\n {\n return URL::temporarySignedRoute('verification.verify', Carbon::now()->addMinutes(60), [\n 'id' => $notifiable->getKey(),\n 'hash' => sha1($notifiable->getEmailForVerification())\n ]);\n }", "title": "" }, { "docid": "7d5402f1049da17a2e1d5d3eb921150c", "score": "0.56404346", "text": "public function get_normal_return_url() {\n\t\t// @see /shopp/core/functions.php#L1873\n\t\t// @see /shopp/core/flow/Storefront.php#L1364\n\t\treturn shoppurl( array( 'messagetype' => 'open' ), 'thanks' );\n\t}", "title": "" }, { "docid": "5b7cc24ee7e1141501d6312783296616", "score": "0.56247056", "text": "function getPaymentGatewayURL(){\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a356fddc9844001d78add8a36a97a505", "score": "0.5620266", "text": "public function getUrlConfirm() {\n if (!$this->recovery_code || !$this->email) throw new \\Exception('Some user data is missing');\n\n return \\yii\\helpers\\Url::base(true) . '/register/confirm?id=' . $this->id . '&email=' . $this->email . '&code=' . $this->recovery_code;\n }", "title": "" }, { "docid": "11fbf337be880b201d1fde32915706df", "score": "0.5614019", "text": "public function getRedirectUrl()\n {\n $parts = [];\n\n // invoice_id?\n if ($this->getTransactionReference()) {\n $parts['i'] = $this->getTransactionReference();\n }\n\n // returnUrl?\n if ($this->getRequest()->getReturnUrl()) {\n $parts['w'] = $this->getRequest()->getReturnUrl();\n }\n\n // assemble url\n $url =\n 'https://aliantpay.io/invoice?' .\n http_build_query($parts, '', '&');\n\n return $url;\n }", "title": "" }, { "docid": "62f8739af99c4853042a5d486b17bcd4", "score": "0.56136197", "text": "public function getPaymentFormUrl()\n {\n $request = http_build_query($this->paymentData);\n\n $url = self::BASE_URL.'?'.$request;\n\n return $url;\n }", "title": "" }, { "docid": "6ce4e03304d16f9cb4f64f356ebfaa7e", "score": "0.560673", "text": "public function get_payment_server_url() {\n\t\treturn $this->payment_server_url;\n\t}", "title": "" }, { "docid": "6ce4e03304d16f9cb4f64f356ebfaa7e", "score": "0.560673", "text": "public function get_payment_server_url() {\n\t\treturn $this->payment_server_url;\n\t}", "title": "" }, { "docid": "89a80cf4daabecac7923db173f15890e", "score": "0.5590603", "text": "protected function verificationUrl($notifiable)\n {\n $parametres = [\n 'id' => $notifiable->getKey(),\n 'hash' => sha1($notifiable->getEmailForVerification()),\n ];\n $signed_route = URL::signedRoute('verification.verify', $parametres, null, false);\n return 'https://' . $notifiable->pp_domain . $signed_route;\n }", "title": "" }, { "docid": "eb9fc76dad49fb833e63150d852085c2", "score": "0.5585721", "text": "public function generate_sendemailurl(Order $order);", "title": "" }, { "docid": "1f36bbabf4b50914404f1f20cada5c3f", "score": "0.5585093", "text": "public function getcheckoutjsurl() { \n return str_replace('MID', $this->getConfigData(\"MID\"), $this->helper->getPaytmURL($this->helper::CHECKOUT_JS_URL,$this->getConfigData('environment')));\n }", "title": "" }, { "docid": "e4ce78180a24788df6cca4d8ae8b46ab", "score": "0.5583623", "text": "public function getRedirectUrl() {\n $order = $this->getQuote();\n $paymentMethod = get_class($order->getPayment()->getMethodInstance());\n\n $modelPayment = ($paymentMethod) ? Mage::getModel($paymentMethod) : $this;\n $hypercharge_channels = $this->getConfigChannels();\n\n // set API call mode\n $mode = !$modelPayment->getConfigData('mode');\n if ($mode) {\n $mode = Hypercharge\\Config::ENV_LIVE;\n } else {\n $mode = Hypercharge\\Config::ENV_SANDBOX;\n }\n\n $ttl = $modelPayment->getConfigData('ttl');\n\n if (!$hypercharge_channels) {\n Mage::throwException('Payment channels not configured correctly');\n return;\n }\n\n if (!$order) {\n Mage::throwException('Could not retrieve order information');\n return;\n }\n\n $currency = $order->getBaseCurrencyCode();\n if (!array_key_exists($currency, $hypercharge_channels)) {\n Mage::throwException(\n 'The merchant doesn\\'t accept payments for this currency');\n return;\n }\n\n\n Hypercharge\\Config::set(\n $hypercharge_channels[$currency]['login']\n ,$hypercharge_channels[$currency]['pass']\n ,$mode\n );\n\n\n $currency = $order->getBaseCurrencyCode();\n if (!array_key_exists($currency, $hypercharge_channels)) {\n Mage::throwException(\n 'The merchant doesn\\'t accept payments for this currency');\n return;\n }\n\n // is editable by user\n $editableByUser = (bool) $modelPayment->getConfigData('check_address');\n $amount = sprintf(\"%.02f\", $order->getBaseGrandTotal()) * 100;\n $billing = $order->getBillingAddress();\n\n $paymentData = array(\n 'transaction_id' => $order->getRealOrderId(),\n 'usage' => 'Hypercharge Web Payment Form transaction',\n 'description' => 'Order number ' . $order->getRealOrderId(),\n 'amount' => (int) $amount,\n 'currency' => $currency,\n 'editable_by_user' => $editableByUser,\n 'customer_email' => $order->getCustomerEmail(),\n 'notification_url' => Mage::getUrl('bit-hypercharge/wpfnotification/wpf', array('_secure' => true)),\n 'return_success_url' => Mage::getUrl('bit-hypercharge/wpfredirect/success', array('_secure' => true)),\n 'return_failure_url' => Mage::getUrl('bit-hypercharge/wpfredirect/failure', array('_secure' => true)),\n 'return_cancel_url' => Mage::getUrl('bit-hypercharge/wpfredirect/cancel', array('_secure' => true)),\n 'billing_address' => array(\n 'first_name' => $billing->getFirstname(),\n 'last_name' => $billing->getLastname(),\n 'address1' => trim(str_replace(\"\\n\", ' ', trim(implode(' ', $billing->getStreet())))),\n 'city' => $billing->getCity(),\n 'country' => $billing->getCountryId(),\n 'zip_code' => $billing->getData('postcode'),\n ),\n 'shipping_address' => array(\n 'first_name' => $billing->getFirstname(),\n 'last_name' => $billing->getLastname(),\n 'address1' => trim(str_replace(\"\\n\", ' ', trim(implode(' ', $billing->getStreet())))),\n 'city' => $billing->getCity(),\n 'country' => $billing->getCountryId(),\n 'zip_code' => $billing->getData('postcode'),\n ),\n );\n\n if ($billing->getTelephone()) {\n $paymentData['customer_phone'] = $billing->getTelephone();\n }\n\n $paymentData['transaction_types'] = array(\n 'transaction_type' => $modelPayment->getTransactionType()\n );\n\n if (in_array($paymentData['billing_address']['country'], array('US', 'CA'))) {\n $paymentData['billing_address']['state'] = $billing->getRegionCode();\n $paymentData['shipping_address']['state'] = $billing->getRegionCode();\n }\n\n if (ctype_digit($ttl) && ($ttl * 60) >= 300 && $ttl <= 86400)\n $paymentData['ttl'] = $ttl;\n\n // Log some information \n Mage::helper('bithypercharge')->logger(\"WPF initiated:\\n\"\n . \"Mode:\" . print_r($mode, true)\n . \"\\nRequest string:\\n\"\n . var_export($paymentData, true));\n\n\n\n // Instantiate payment method to log the response error\n $paymentInst = $order->getPayment()->getMethodInstance();\n\n try {\n $payment = Hypercharge\\Payment::wpf($paymentData);\n\n if ($payment->status == 'error') {\n $order->addStatusToHistory($order->getStatus(), $payment->message);\n $order->save();\n Mage::getSingleton('core/session')->addError($mode ? $payment->message : $payment->technical_message);\n $paymentInst->setTransactionId($paymentData['transaction_id']);\n return;\n }\n\n // And some information aggregation before we leave\n\n if( $payment->shouldRedirect()) {\n // ok, WPF session created.\n Mage::helper('bithypercharge')->logger('Customer redirected to Hypercharge');\n $order->addStatusToHistory($order->getStatus(), Mage::helper('bithypercharge')->__('Customer was redirected to Hypercharge.'));\n $order->save();\n $paymentInst->setLastTransactionId($paymentData['transaction_id']);\n Mage::getSingleton('core/session')->setHyperRedirectUrl($payment->redirect_url);\n if ($modelPayment->getConfigData('use_iframe') == 1) {\n return Mage::getUrl('bit-hypercharge/wpfredirect/hypercharge');\n } elseif ($modelPayment->getConfigData('use_iframe') == 2) {\n Mage::getSingleton('core/session')->setHyperReviewRedirect(1);\n return false;\n } else {\n return $payment->redirect_url;\n }\n } elseif($payment->isPersistentInHypercharge()) {\n Mage::helper('bithypercharge')->logger($payment->message . \" \" . $payment->technical_message);\n // payment has been created in hypercharge but something went wrong.\n if ($payment->status == 'error') {\n $order->addStatusToHistory($order->getStatus(), $payment->message);\n $order->save();\n Mage::getSingleton('core/session')->addError($mode ? $payment->message : $payment->technical_message);\n $paymentInst->setTransactionId($paymentData['transaction_id']);\n return;\n }\n\n } else {\n $order->addStatusToHistory($order->getStatus(), $this->__('Could not initiate WPF'));\n $order->save();\n Mage::getSingleton('core/session')->addError($this->__('Could not initiate WPF'));\n return;\n }\n } catch(Hypercharge\\Errors\\ValidationError $e) {\n // no payment created in hypercharge because of local pre-validation errors\n // show validation errors to customer\n // $e->errors is an Array of Hash, format: [ { \"property\": String , \"message\" : String }, ... ]\n $order->addStatusToHistory($order->getStatus(), \"Oops! An error occured! \" . implode(\"<br/>\", $e->errors));\n $order->save();\n Mage::getSingleton('core/session')->addError($mode ? $payment->message : $payment->technical_message);\n $paymentInst->setTransactionId($paymentData['transaction_id']);\n return;\n\n } catch(Exception $e) {\n Mage::helper('bithypercharge')->logger('WPF ERROR: ' . var_export($e->getTraceAsString(), true));\n $order->addStatusToHistory($order->getStatus(), \"Oops! An error occured! \");\n $order->save();\n Mage::getSingleton('core/session')->addError(\"Sorry for the inconvenience! An error occured!\");\n $paymentInst->setTransactionId($paymentData['transaction_id']);\n return;\n }\n }", "title": "" }, { "docid": "1a26377fab11630bdc3765fd21fd8f4a", "score": "0.55818063", "text": "public function getCheckoutRedirectUrl()\n {\n return $this->_urlBuilder->getUrl('payu/bml/start');\n }", "title": "" }, { "docid": "694a53bea211278dd1e8a3e6f8342d9f", "score": "0.5566823", "text": "protected function verificationUrl($notifiable): string\n {\n return URL::temporarySignedRoute(\n 'app.user.verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n [\n 'id' => $notifiable->getKey(),\n 'hash' => sha1((string)$notifiable->getKey()),\n ]\n );\n }", "title": "" }, { "docid": "4feb2fa3b7fe80011ba7e8eb222812d4", "score": "0.55664486", "text": "function aegis_confirmation_notification($order) { ?>\n\t\t<div class=\"payment-notification\" id=\"aegis-payment-confirmation-notification\">\n\t\t\t<?php\n\t\t\t\t$format = __('Once you make the payment, please confirm at <a href=\"%s?order_id=%d\" class=\"payment-notification__link\">Payment Confirmation »</a>', 'aegis' );\n\t\t\t\t$link = get_page_link( 439 );\n\t\t\t\techo sprintf($format, $link, $order->id);\n\t\t\t?>\n\t\t</div>\n\t<?php\n\t}", "title": "" }, { "docid": "c6113b9b32dd3bc8b5ec79f32f104858", "score": "0.55566764", "text": "function photoboard_notifications_get_url() {\n\t\t$url = @( $_SERVER['HTTPS'] != 'on' ) ? 'http://' . $_SERVER['SERVER_NAME'] : 'https://' . $_SERVER['SERVER_NAME'];\n\t\t$url .= ( $_SERVER['SERVER_PORT'] !== 80 ) ? \":\" . $_SERVER['SERVER_PORT'] : '';\n\t\t$url .= $_SERVER['REQUEST_URI'];\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "e735b7238793d496f17df263b85f4c43", "score": "0.55514246", "text": "public function getLatestNoticeUrl()\n {\n return $this->_getHelper()->getLatestNotice()->getUrl();\n }", "title": "" }, { "docid": "2a20d978ebf28a58eeaa2884c93e26be", "score": "0.55490863", "text": "public function routeNotificationForSlack()\n {\n return env('SCRIPTY_BOIS_WEBHOOK_URL');\n }", "title": "" }, { "docid": "7cd7a06e68248e2bfa359234b0c9e1c6", "score": "0.55483574", "text": "function send_ipn()\n\t{\n\t\t$pesapalNotification=\"CHANGE\";\n\t\t$pesapalTrackingId=md5(time());\n\t\t$pesapal_merchant_reference=$_GET['pesapal_merchant_reference'];\n\t\t$url = 'index.php?option=com_mymuse&task=notify';\n\t\t$url .= \"&pesapal_notification_type=$pesapalNotification\";\n\t\t$url .= \"&pesapal_merchant_reference=$pesapal_merchant_reference\";\n\t\t$url .= \"&pesapal_transaction_tracking_id=$pesapalTrackingId\";\n\t\t$this->setRedirect( $url);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ff8c586a33f0b9a16233707aa22a36c5", "score": "0.5547384", "text": "function getNotificationUrl(&$request, &$notification) {\n\t\t$router =& $request->getRouter();\n\t\t$dispatcher =& $router->getDispatcher();\n\t\t$url = null;\n\n\t\t$type = $notification->getType();\n\t\tswitch ($type) {\n\t\t\tcase NOTIFICATION_TYPE_MONOGRAPH_SUBMITTED:\n\t\t\tcase NOTIFICATION_TYPE_METADATA_MODIFIED:\n\t\t\t\tassert($notification->getAssocType() == ASSOC_TYPE_MONOGRAPH && is_numeric($notification->getAssocId()));\n\t\t\t\t$url = $dispatcher->url($request, ROUTE_PAGE, null, 'workflow', 'submission', $notification->getAssocId());\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_REVIEWER_COMMENT:\n\t\t\tcase NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_SUBMISSION:\n\t\t\tcase NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_INTERNAL_REVIEW:\n\t\t\tcase NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_EXTERNAL_REVIEW:\n\t\t\tcase NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_EDITING:\n\t\t\tcase NOTIFICATION_TYPE_EDITOR_ASSIGNMENT_PRODUCTION:\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_AUDITOR_REQUEST:\n\t\t\t\t$signoffDao =& DAORegistry::getDAO('SignoffDAO'); /* @var $signoffDao SignoffDAO */\n\t\t\t\t$signoff =& $signoffDao->getById($notification->getAssocId());\n\t\t\t\tassert(is_a($signoff, 'Signoff') && $signoff->getAssocType() == ASSOC_TYPE_MONOGRAPH_FILE);\n\n\t\t\t\t$submissionFileDao =& DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */\n\t\t\t\t$monographFile =& $submissionFileDao->getLatestRevision($signoff->getAssocId());\n\t\t\t\tassert(is_a($monographFile, 'MonographFile'));\n\n\t\t\t\tif ($signoff->getSymbolic() == 'SIGNOFF_COPYEDITING') {\n\t\t\t\t\t$stage = 'copyediting';\n\t\t\t\t} elseif ($signoff->getSymbolic() == 'SIGNOFF_PROOFING') {\n\t\t\t\t\t$stage = 'production';\n\t\t\t\t} else {\n\t\t\t\t\tassert(false);\n\t\t\t\t}\n\t\t\t\t$url = $dispatcher->url($request, ROUTE_PAGE, null, 'workflow', $stage, $monographFile->getMonographId());\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_REVIEW_ASSIGNMENT:\n\t\t\t\t$reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO'); /* @var $reviewAssignmentDao ReviewAssignmentDAO */\n\t\t\t\t$reviewAssignment =& $reviewAssignmentDao->getById($notification->getAssocId());\n\t\t\t\t$url = $dispatcher->url($request, ROUTE_PAGE, null, 'reviewer', 'submission', $reviewAssignment->getSubmissionId());\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_SIGNOFF_COPYEDIT:\n\t\t\t\t$url = $dispatcher->url($request, ROUTE_PAGE, null, 'workflow', 'copyediting', $notification->getAssocId());\n\t\t\t\tbreak;\n\t\t\tcase NOTIFICATION_TYPE_SIGNOFF_PROOF:\n\t\t\t\t$url = $dispatcher->url($request, ROUTE_PAGE, null, 'workflow', 'production', $notification->getAssocId());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$url = parent::getNotificationUrl($request, $notification);\n\t\t}\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "933f09a074a0a9628853921deee91258", "score": "0.55278134", "text": "public function getRedirectUrl() {\n return $this->helper->getTransactionURL($this->getConfigData('environment'));\n }", "title": "" }, { "docid": "f4e1db3709303bfdfd12b2bd5986600a", "score": "0.55245334", "text": "public function routeNotificationForSlack()\n {\n return config('api-health.notifications.slack.webhook_url');\n }", "title": "" }, { "docid": "f04de88ed125a541285af434829b0bcb", "score": "0.5523315", "text": "function getReleaseTimeUrl() {\n return assemble_url('invoice_time_release', array('invoice_id' => $this->getId()));\n }", "title": "" }, { "docid": "671a76c9a961ba323f03ea3c745781d2", "score": "0.5522347", "text": "public function getWebhookProductChangedUrl() {\n\n return $this->getHost() . Mage::getStoreConfig('cueconnect/webhook/product_changed/url');\n }", "title": "" }, { "docid": "42a2d94fae9b5a9c104b0f8883a17ec4", "score": "0.55149513", "text": "function give_get_view_receipt_url( $donation_id ) {\n\n\t$receipt_url = esc_url_raw(\n\t\tadd_query_arg(\n\t\t\tarray(\n\t\t\t\t'action' => 'view_in_browser',\n\t\t\t\t'_give_hash' => give_get_payment_key( $donation_id ),\n\t\t\t),\n\t\t\tgive_get_history_page_uri()\n\t\t)\n\t);\n\n\treturn $receipt_url;\n}", "title": "" }, { "docid": "d6fd6f6a62c7cc1c451b2181553736b2", "score": "0.5505549", "text": "public function notificationTypeIdUrl()\n {\n return [\n 'type' => self::STRING_TYPE,\n 'location' => self::URL,\n ];\n }", "title": "" }, { "docid": "b2a545cdd055783385f225121da3cf93", "score": "0.54992527", "text": "public function getUrlRecoverConfirm() {\n return \\yii\\helpers\\Url::base(true) . '/register/recover?id=' . $this->id . '&code=' . $this->recovery_code;\n }", "title": "" }, { "docid": "cf9552d07b4463a8e345f67574088cac", "score": "0.5497818", "text": "public function getRedirectUrl()\n {\n return Mage::getUrl('mpm/api/payment');\n }", "title": "" }, { "docid": "d8fff2546283c8778280a675958aca16", "score": "0.5490278", "text": "function wha_action_url($action,$achat_desc,$config,$versionId=2) {\n\t$url = wha_node_url($config);\n\t$signed = wha_message($action,$achat_desc,$config['MERCHANT_ID'],$config['KEY_ID'],$versionId);\n\treturn $url.((strpos($url,'?')===FALSE)?'?':'&').'m='.urlencode($signed);\n}", "title": "" }, { "docid": "fab8313b03f13c164f89cb54c297f43c", "score": "0.54886156", "text": "public function getProvisioningUrl(): string\n {\n try {\n $websiteName = $this->storeManager->getStore()->getWebsite()->getName();\n $customer = $this->getCustomer();\n\n $totp = $this->getCustomerOtp($customer);\n $totp->setLabel($customer->getEmail());\n $totp->setIssuer($websiteName);\n\n return $totp->getProvisioningUri();\n } catch (Exception $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "6332dba159bd1fda44cb363c6b85c477", "score": "0.54849416", "text": "public function getServiceUrl()\n {\n return WebToPay::PAY_URL;\n }", "title": "" }, { "docid": "29a330ef719b33a12cebcabcbe436e89", "score": "0.54787385", "text": "public function getCheckoutUrl()\n {\n return $this->getApiUrl().'checkout';\n }", "title": "" }, { "docid": "f29ef203fbb41d925a5f31d8ec691a44", "score": "0.54777807", "text": "public function getShorturlAttribute()\n {\n return config('app.shorturl') . '/notes/' . $this->nb60id;\n }", "title": "" }, { "docid": "9797a2641b431e074c947a5ec1ed28c7", "score": "0.5476387", "text": "public function getPaymentCancelUrl()\n {\n if (static::EC_TYPE_MARK == \\XLite\\Core\\Session::getInstance()->ec_type) {\n $url = $this->getReturnURL(null, true, true);\n\n } else {\n $url = \\XLite::getInstance()->getShopURL(\n \\XLite\\Core\\Converter::buildURL('checkout', 'express_checkout_return', ['cancel' => 1]),\n \\XLite\\Core\\Config::getInstance()->Security->customer_security\n );\n }\n\n if (\\XLite\\Core\\Request::getInstance()->cancelUrl) {\n $url .= '&cancelUrl=' . urlencode(\\XLite\\Core\\Request::getInstance()->cancelUrl);\n }\n\n return $url;\n }", "title": "" }, { "docid": "5880a22245deb55ac2596a33a757b6f6", "score": "0.5474008", "text": "public function getCheckoutRedirectUrl()\n {\n return $this->urlInterface->getUrl('kash/offsite/start', array('_secure'=>true));\n }", "title": "" }, { "docid": "085d9aa0ae3b94c57a5398795afae462", "score": "0.5465346", "text": "public function paymentUrl(Purchase $purchase): string;", "title": "" }, { "docid": "9f84910ded18c3bfb4ae5a8b2ba2aabd", "score": "0.5458417", "text": "public function getHostedFormCallbackUrl()\n {\n return Mage::getUrl('paymentsense/hosted/callback', array('_secure' => true));\n }", "title": "" }, { "docid": "c66361dbe713c7a5658d388ddddce6aa", "score": "0.5458071", "text": "public function getURL()\n {\n return self::generateURL($this->calendar, $this->getDateTime());\n }", "title": "" }, { "docid": "1dcd8003fc268a4d35b5239b5f7ed34e", "score": "0.545752", "text": "protected function apiURL()\n {\n if ($this->_config->paypal->env === 'live') {\n // Live environment does not use a sub-domain\n $env = '';\n } else {\n // Use the environment sub-domain\n $env = $this->_config->paypal->env . '.';\n }\n\n return 'https://api-3t.' . $env . 'paypal.com/nvp';\n }", "title": "" }, { "docid": "8959169d24647a777eaa9867ed65cee1", "score": "0.5450841", "text": "public function urlInfo()\n {\n $instructions = $this->instructions();\n\n if (!$instructions) {\n return false;\n }\n\n return $instructions->getPaymentInfoUrl();\n }", "title": "" }, { "docid": "555831527214275c6632e472b0a3b800", "score": "0.5450781", "text": "public function notifyAction() {\n try {\n // Get request variables\n $request = $this->Request();\n $plugin = $this->Plugin();\n $plugin->logAction(\"Notification received\\n\"\n . print_r($request->getPost(), true));\n $config = $plugin->Config();\n\n $channel = $this->getChannelById($request->getParam(\"payment_transaction_channel_token\"));\n if (empty($channel)) {\n $plugin->logAction('Could not find channel');\n throw new Enlight_Controller_Exception('No such channel');\n exit();\n }\n // Configure gateway\n Hypercharge\\Config::set(\n $channel['username']\n , $channel['password']\n , $config->hypercharge_test ? Hypercharge\\Config::ENV_SANDBOX : Hypercharge\\Config::ENV_LIVE\n );\n $notification = Hypercharge\\Payment::notification($request->getPost());\n\n if (!$notification->isVerified()) {\n $plugin->logAction('Notification is not verified');\n throw new Enlight_Controller_Exception('Notification is not verified');\n exit();\n }\n $paymentH = $notification->getPayment();\n\n if ($paymentH->isError() && $paymentH->error->status_code) {\n $message = \"ERROR: \" . $paymentH->error->status_code . \": \" . $paymentH->error->message . ' - ' . $paymentH->error->technical_message;\n $plugin->logAction($message);\n exit();\n }\n $plugin->logAction(\"payment OK\");\n $plugin->logAction(sprintf('payment status: %s', $paymentH->status));\n\n // Find the transaction\n $transaction_id_field = \"transactionId\";\n $trn = explode('---', $paymentH->transaction_id);\n list($transactionId, $paymentId) = explode(' ', $trn[0]);\n if (empty($transactionId) || empty($paymentId)) {\n $plugin->logAction('Incorrect transaction ID');\n throw new Enlight_Controller_Exception('Incorrect transaction id');\n exit();\n }\n //Find unique_id\n $uniqueId = $paymentH->unique_id;\n\n // Identify notification channel\n $transactionH = $notification->getTransaction();\n $plugin->logAction(sprintf('transaction type: %s', $transactionH->transaction_type));\n $plugin->logAction(sprintf('transaction unique_id: %s', $transactionH->unique_id));\n \n // Payment status mapping\n $newStatus = null;\n $isAuthorize = $transactionH->transaction_type == 'authorize' || $transactionH->transaction_type == 'authorize3d';\n switch ($paymentH->status) {\n case 'approved':\n case 'chargeback_reversed':\n $newStatus = 12;\n if ($isAuthorize)\n $newStatus = 18;\n break;\n case 'declined':\n case 'refunded':\n case 'chargebacked':\n case 'voided':\n case 'error':\n case 'rejected':\n $newStatus = 52;//35;\n break;\n case 'pending':\n case 'pending_async':\n case 'pre_arbitrated':\n $newStatus = 17;\n break;\n default:\n break;\n }\n if (null === $newStatus) {\n $plugin->logAction('Undefined transaction status: ' . $paymentH->status);\n exit();\n }\n \n $try = 1;\n //sometimes Hypercharge is faster than SW => we try more times to check the order\n while($try<4){\n //double-check if the order exists\n $plugin->logAction(sprintf('double-check if the order exists (try %s)', $try));\n $sql = '\n SELECT id FROM s_order\n WHERE transactionID=? AND temporaryID=?\n AND status!=-1\n ';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $transactionId,\n $paymentId\n ));\n\n if(!$orderId && $config->transactionId == \"uniqueId\"){\n //double-check if the order exists\n $sql = '\n SELECT id FROM s_order\n WHERE transactionID=? AND temporaryID=?\n AND status!=-1\n ';\n $orderId = Shopware()->Db()->fetchOne($sql, array(\n $uniqueId,\n $paymentId\n ));\n if($orderId){\n $transaction_id_field = \"uniqueId\";\n }\n }\n if($orderId){\n $try = 10;\n } else{\n $try++;\n sleep(2);\n }\n }\n\n if (!$orderId) {\n $recoverOrder = in_array($newStatus, array(12,18,17));\n if(!$recoverOrder){\n $recoverOrder = $config->recover_rejected_orders;\n }\n if($recoverOrder){\n //check if it is a cancelled order\n //but only for approved or pending\n $sql = \"SELECT o.id AS orderId \n FROM hypercharge_orders AS ho\n JOIN s_order o ON ho.sessionId = o.temporaryID\n WHERE ho.transactionId = ?\n AND ho.uniquePaymentId = ?\n AND ho.uniqueId = ?\n AND o.status = -1\";\n $orderId = Shopware()->Db()->fetchOne($sql, array($transactionId, $paymentId, $uniqueId));\n if($orderId){\n $plugin->logAction(sprintf('The order having payment id %s , transaction id %s and unique id %s is a cancelled order', $paymentId, $transactionId, $uniqueId));\n if($config->transactionId == \"uniqueId\"){\n $plugin->logAction(sprintf('The transactionId is changed from %s to %s', $transactionId, $uniqueId));\n $transaction_id_field = \"uniqueId\";\n }\n $orderId = $this->convertOrder($orderId, ($transaction_id_field == \"uniqueId\")? $uniqueId: $transactionId, $paymentId);\n if($orderId){\n Shopware()->Db()->update(\"hypercharge_orders\", array('status' => 1), \"transactionId = '\" . $transactionId . \"' AND uniquePaymentId = '\" . $paymentId . \"'\");\n }\n }\n } else {\n $plugin->logAction(sprintf(\"The transaction is not approved; we don't check if it is a cancelled order\"));\n }\n }\n if (!$orderId) {\n if($config->transactionId == \"uniqueId\"){\n $plugin->logAction(sprintf('The order having payment id %s and transaction id %s or %s does not exist', $paymentId, $transactionId, $uniqueId));\n } else {\n $plugin->logAction(sprintf('The order having payment id %s and transaction id %s does not exist', $paymentId, $transactionId));\n }\n exit();\n }\n //the transactionID was changed to uniqueID\n if($transaction_id_field == \"uniqueId\"){\n $transactionId = $uniqueId;\n }\n\n // Update payment status\n $plugin->logAction(sprintf('Updating transaction %s with payment id %s to %s', $transactionId, $paymentId, $newStatus));\n $this->savePaymentStatus($transactionId, $paymentId, $newStatus, false);\n if($config->transactionId == \"transactionUniqueId\"){\n if($transactionH->unique_id){\n $sql = '\n UPDATE s_order\n SET transactionID = ?\n WHERE transactionID=? AND temporaryID=?\n ';\n Shopware()->Db()->query($sql, array($transactionH->unique_id, $transactionId, $paymentId));\n $plugin->logAction(sprintf('The transactionId is changed from %s to %s', $transactionId, $transactionH->unique_id));\n }else {\n $plugin->logAction(sprintf('The transaction unique Id is empty'));\n }\n }\n Shopware()->Db()->update(\"hypercharge_orders\", array('transactionUniqueId' => $transactionH->unique_id), \"$transaction_id_field = '\" . $transactionId . \"' AND uniquePaymentId = '\" . $paymentId . \"' AND status = 1\");\n\n $plugin->logAction('Notification finished');\n\n // Tell hypercharge the notification has been successfully processed\n // and ensure output ends here\n die($notification->ack());\n } catch (Exception $ex) {\n $plugin->logAction(\"ERROR: \" . $ex->getMessage());\n }\n exit();\n }", "title": "" }, { "docid": "c28206d3d6e1cae96b2f7098fd0c8c84", "score": "0.5446468", "text": "function getTimeUrl() {\n return assemble_url('invoice_time', array('invoice_id' => $this->getId()));\n }", "title": "" }, { "docid": "d1e1d6a296bc431b40a904c64c9816f2", "score": "0.5442146", "text": "protected function verificationUrl($notifiable)\n {\n return route(\n 'verification.verify',\n [\n 'id' => $notifiable->getKey(),\n 'hash' => sha1($this->verificationToken),\n ]\n );\n }", "title": "" }, { "docid": "d21a5a3caa48aa67e044e48b0155402a", "score": "0.54417855", "text": "protected function link()\n {\n if (config('billing.gateway') === 'stripe') {\n return sprintf(\n 'https://dashboard.stripe.com/subscriptions/%s', $this->external_id\n );\n }\n }", "title": "" }, { "docid": "e16b7b9320ba317e989afd0b9cb61821", "score": "0.54205877", "text": "private function getNonceRetrieveUrl()\n {\n return $this->urlBuilder->getUrl(ConfigProvider::CODE . '/payment/getnonce', ['_secure' => true]);\n }", "title": "" }, { "docid": "ae3f11b09f61dc3d3b194140a0d68751", "score": "0.54195946", "text": "public function routeNotificationForNexmo()\n {\n return $this->notification_phone_number;\n }", "title": "" }, { "docid": "77856a03a7defa01438b5f76875dad22", "score": "0.54166806", "text": "function set_authorize_notification_url($theUrl) {\n\t\t$this->myAuthorizeNotificationUrl = $theUrl;\n\t}", "title": "" }, { "docid": "1629f5072f6571acbcedb64e94ab9a42", "score": "0.54145247", "text": "public function setNotificationUrl(string $notificationUrl): PaymentBuilderInterface;", "title": "" }, { "docid": "ab2e9195507f96142c66b7c204e012ac", "score": "0.5406367", "text": "function getAddPaymentUrl() {\n return assemble_url('invoice_payments_add', array('invoice_id' => $this->getId()));\n }", "title": "" }, { "docid": "3bc9e33fb1ff456f4a7f23f73137fa57", "score": "0.5398768", "text": "public function getMessagesUrl() {\n return Mage::getStoreConfig('pricemotion_options/default/messages_url');\n }", "title": "" }, { "docid": "3cd0009e002470c322d8782e3a466881", "score": "0.5390442", "text": "protected function getActionUrl()\n {\n $url = $this->urlBuilder->getUrl('amazonpaymentservicesfort/payment/redirect', ['_secure' => true]);\n\n return $url;\n }", "title": "" }, { "docid": "31b4e9fd24073b84ecdfbd18bc000b12", "score": "0.53780544", "text": "public function getSuccessUrl()\n {\n return $this->urlBuilder->getUrl('checkout/onepage/success?utm_nooverride=1');\n }", "title": "" }, { "docid": "62ee1f0a1b27c441406cfc27702e024a", "score": "0.5376482", "text": "public function getTxUrl()\n {\n return $this->tx_url;\n }", "title": "" }, { "docid": "dab410785afab0fd9fe8d2a4b0b48220", "score": "0.5357247", "text": "public function getOpsAdminPaymentUrl($payment)\n {\n return '';\n }", "title": "" }, { "docid": "cec788be84afa89fcae5473d499eb893", "score": "0.53549397", "text": "protected function verificationUrl($notifiable)\n {\n return URL::temporarySignedRoute(\n 'verification.verify',\n Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)),\n [\n 'id' => $notifiable->getKey(),\n 'hash' => sha1($notifiable->getEmailForVerification()),\n ]\n );\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "ed482119e218cad2dfd7df9e60f36e0e", "score": "0.0", "text": "public function edit(VacationData $vacation_data)\n {\n $vacation_data = VacationData::with('user.role', 'user.team')->find($vacation_data->id);\n $vacation_data = (new VacationDataResource($vacation_data))->all(request());\n\n return view('vacations.data.edit')->with([\n 'vacation_data' => $vacation_data\n ]);\n }", "title": "" } ]
[ { "docid": "dd595e2401a651c870eaf18d7e9760a3", "score": "0.8056069", "text": "public function edit(Resource $resource)\n {\n //\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "4699678dcf8e1179c0197353cd91326b", "score": "0.77389544", "text": "public function edit(Resource $resource)\n {\n /* dd($resource); */\n return view('resource.edit' , compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1d94403d2acd74d9393297956ff20089", "score": "0.76159143", "text": "function edit()\n {\n $this->_form('edit');\n }", "title": "" }, { "docid": "b7bd85f6505eaaa0e3a455e1f55cb3ad", "score": "0.76099056", "text": "public function edit(Resource $resource): View\n {\n $categoryOptions = Category::orderBy('name')->pluck('name', 'id');\n $groupOptions = Group::orderBy('name')->pluck('name', 'id');\n\n return view('resources.edit')->with(compact([\n 'resource',\n 'categoryOptions',\n 'groupOptions',\n ]));\n }", "title": "" }, { "docid": "9d3a38b20920e77ce2eff48e395afb74", "score": "0.7549802", "text": "function form_edit($id = 0)\n {\n\n $data['data'] = $this->resources_model->get_resource($id);\n $tamplate['_B'] = 'resources/edit_resource_view.php';\n $this->load->template_view($this->template_base, $data, $tamplate);\n }", "title": "" }, { "docid": "039ff036e8221b2585c3c113a5cd32fd", "score": "0.74767417", "text": "public function edit($id)\n {\n /* Check if logged user is authorized to update resources */\n $this->authorize('update', [$this->model, $id]);\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Displays the edit resource page */\n return view('admin.' . $this->name . '.edit')\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "title": "" }, { "docid": "8d801a89707c44b7882739b411cff7ef", "score": "0.7410825", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn view('admin.resources.edit', compact('resource'));\n\t}", "title": "" }, { "docid": "5c1544b2225be56677d1ab886a3b9ab7", "score": "0.7275615", "text": "protected function editAction()\n {\n SessionManager::clearSubformFromSession();\n return $this->renderForm('edit');\n }", "title": "" }, { "docid": "518ca2900cb6a7f47cf6c6cb3bb47305", "score": "0.71867603", "text": "public function edit($id)\n\t{\n\t\treturn view('resources.edit');\n\t}", "title": "" }, { "docid": "521678534e38ace8f31ee2c7c31109ce", "score": "0.71408635", "text": "public function editResource(Resource $resource)\n {\n if ($resource->type == 'CLASSROOM') {\n $types = ResourceType::where('type', 'CLASSROOM')->get();\n $rcharacteristics = Characteristic::where('type', 'CLASSROOM')->get();\n return view('SpecificViews.Admin.Resource.edit', compact('types', 'rcharacteristics', 'resource'));\n } else {\n $rcharacteristics = Characteristic::where('type', 'INSTRUMENT')->get();\n $types = ResourceType::where('type', 'INSTRUMENT')->get();\n return view('SpecificViews.Admin.Resource.edit', compact('types', 'rcharacteristics', 'resource'));\n }\n\n }", "title": "" }, { "docid": "b56a61d0b2c2bb662234e314a5c3fbd3", "score": "0.7139057", "text": "public function edit($id)\n {\n $resource = resource::find($id);\n\n return view('resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "1714331f57ac8dc71fb554550626fa1e", "score": "0.7134124", "text": "public function edit() {\n \n $role = $this->role_model->get_by_id($this->input->get('id'));\n if (!is_null($role)) {\n echo $this->load->view('role/edit_form', array(\n 'id' =>$role->id,\n 'description' => $role->description,\n 'help_text' => $role->help_text,\n 'email_text' => $role->email_text\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "67ece17efa862f295ce9431e50ca77e6", "score": "0.71021336", "text": "public function edit($id)\n {\n // TODO: return view with form\n }", "title": "" }, { "docid": "bd2eb7b4b851671a6d52d11c4bdca5a3", "score": "0.70816964", "text": "public function Editing()\n {\n $this->routeAuth();\n\n $arguments = [\n 'required' => ['route' => 'default'],\n 'method' => 'get',\n ];\n $parameters = $this->getArguments($arguments);\n\n $this->standardView('EditForm', $parameters);\n }", "title": "" }, { "docid": "cf800ac28142461ee3e96006e2779e1a", "score": "0.7012804", "text": "function edit_resource()\n {\n\n $this->form_validation->set_rules('resourcename', lang('label_name'), 'required|trim');\n\n $this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\n\n $id = $this->input->post('resourceid');\n\n if ($this->form_validation->run() == FALSE) {\n $this->form_edit($id);\n } else {\n\n $name = $this->input->post('resourcename');\n\n $this->resources_model->update($id, $name);\n\n set_flash_message(lang('msg_update_resource_success'));\n redirect('resources/');\n }\n\n }", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7008457", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "77a5d7e834f9c51c192908fd0d47f95d", "score": "0.69608295", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\treturn view('forms.edit', ['product' => $product]);\n\t}", "title": "" }, { "docid": "5d07386682cee2e28df5b9387838d3ad", "score": "0.6952048", "text": "public function edit($id) {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"employee\"] = Employee::find($id);\n $viewData[\"mode\"] = \"edit\";\n\n return view(\"pages.hr.employees.form\", $viewData);\n }", "title": "" }, { "docid": "021ba3eb9870bc8904cac5ce9993521f", "score": "0.69348085", "text": "public function edit()\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "d1bc76ee10d3c1987d93adb885f351c7", "score": "0.6924496", "text": "public function show_editform() \n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "f06cd09f9eac7562cc61bd57dbe667d1", "score": "0.6913356", "text": "public function edit($id)\n {\n $source = Source::orderBy('source_label', 'asc')->get();\n $author = Author::orderBy('author_label', 'asc')->get();\n $sub_category = Category::orderBy('category_label', 'asc')->get();\n $resource = Resource::find($id);\n\n $view_data = [\n 'resource' => $resource,\n 'source' => $source,\n 'author' => $author,\n 'sub_category' => $sub_category,\n ];\n\n return view('resource.edit', $view_data);\n }", "title": "" }, { "docid": "a2c4b9f94f63ae15d25e58aeec857d8a", "score": "0.69070923", "text": "public function actionEdit()\n {\n $template = __DIR__ . '/../../../templates/admin/edit.html';\n $this->view->display($template);\n }", "title": "" }, { "docid": "9ffa222823dcb1dfb2177f10ed5d14a6", "score": "0.69015515", "text": "public function editAction()\n {\n $this->title = \"Edit Book\";\n // get id value from route and set default value is missed 0 \n $id = $this->params()->fromRoute(\"id\",0);\n if(!$id || $id == 0){\n // to display 404 not found exception in case id is missed in Request \n return $this->notFoundAction(); \n // another way to display 404 not found exception\n //$this->getResponse()->setStatusCode(404);\n //return; \n }\n $form = new BookForm();\n //$form->bind($book);\n $form->get('submit')->setValue('Edit');\n \n $request = $this->getRequest();\n if($request->isPost()){\n \n }\n \n return new ViewModel(array(\n 'title' => $this->title,\n 'id' => $id,\n 'form' => $form,\n ));\n }", "title": "" }, { "docid": "9f065931f724059e1f1d001cf6deafdb", "score": "0.689776", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n $this->authorize('update', $record);\n\n return view($this->filterEditView('_resources.edit'), $this->filterEditViewData($record, [\n 'record' => $record,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "45f4946b9d690da6ca602cafd8acd6f6", "score": "0.6875199", "text": "public function edit($id)\n {\n return view('senioroperationmanager::edit');\n }", "title": "" }, { "docid": "5cebb6c2bc9c34e957b1521b8e0171da", "score": "0.6868003", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n if (is_null ($employee)) {\n App::abort(404);\n }\n return View::make('business/employees/form')->with('employee', $employee);\n\t}", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.685467", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "704bd05bb5b342386c8ae64a2f251b47", "score": "0.68310094", "text": "protected function editAction()\n {\n if ($this->request->isXmlHttpRequest()) {\n return $this->ajaxEdit();\n }\n\n $id = $this->request->query->get('id');\n if (!$item = $this->em->getRepository($this->entity['class'])->find($id)) {\n throw $this->createNotFoundException(sprintf('Unable to find entity (%s #%d).', $this->entity['name'], $id));\n }\n\n $fields = $this->entity['edit']['fields'];\n $editForm = $this->createEditForm($item, $fields);\n $deleteForm = $this->createDeleteForm($this->entity['name'], $id);\n\n $editForm->handleRequest($this->request);\n if ($editForm->isValid()) {\n $this->prepareEditEntityForPersist($item);\n $this->em->flush();\n\n return $this->redirect($this->generateUrl('admin', array('action' => 'list', 'view' => 'list', 'entity' => $this->entity['name'])));\n }\n\n return $this->render('@EasyAdmin/edit.html.twig', array(\n 'form' => $editForm->createView(),\n 'entity_fields' => $fields,\n 'item' => $item,\n 'delete_form' => $deleteForm->createView(),\n 'view' => 'edit',\n ));\n }", "title": "" }, { "docid": "ed2633bdcfc7ed5a550c62d352c24a77", "score": "0.6819932", "text": "public function edit($id)\n {\n $instance = $this->getRepository()->find($id);\n\n $this->addBreadcrumb($instance, 'edit');\n $this->authorize('update', $instance);\n\n return $this->view('edit')\n ->with('type', $this->resourceType)\n ->with('instance', $instance)\n ->with('isUpdate', true);\n }", "title": "" }, { "docid": "cd9f7e39075ec0fc916971721af0cd2e", "score": "0.68143326", "text": "public function edit()\n {\n return view('core::edit');\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "28a90ab6820643f9d5748374ed81131a", "score": "0.67907906", "text": "public function edit($id)\n {\n $this->view->employee = $this->model->edit($id);\n $this->view->render($this->path . '/edit');\n \n }", "title": "" }, { "docid": "5f2fd3cbab0d2a100dddd7a4ae2cefaf", "score": "0.6773027", "text": "public function edit($id)\n {\n // get the nerd\n\t\t$smstemplate = DocumentMaster::find($id);\n\t\t// show the edit form and pass the nerd\n\t\treturn View::make('documentmaster.edit')\n\t\t\t->with('documentmaster', $smstemplate);\n }", "title": "" }, { "docid": "cb920409ab954b104075c11c511d2022", "score": "0.67672926", "text": "public function editAction()\n {\n $post_id = $this->route_params['id'];\n $post = $this->post->findByID($post_id);\n\n View::renderWithLayout(Config::VIEWS_PATH . 'Posts/edit.php', [\n 'post' => $post\n ]);\n\n }", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6763203", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67458534", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "12b7e5d3d9cb665e40626307c8c40c99", "score": "0.6741306", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('company.form');\n\t\t$form->company = Company::find($id);\n\t\t$form->action = array('action' => array('Powerhouse\\Core\\CompanyController@update', $form->company->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "38d2e406d7a5e9d1f5004a85617a73b9", "score": "0.67376304", "text": "public function edit($id)\n\t{\n\t\t$form_data = ['route' => [self::$prefixRoute . 'update', $this->specialty->id], 'method' => 'PUT'];\n\n\t\treturn view(self::$prefixView . 'form', compact('form_data'))->with('specialty', $this->specialty);\n\t}", "title": "" }, { "docid": "cc6904fdf00085583ae76b949cdbe589", "score": "0.67358285", "text": "public function edit()\n {\n return view('volunteer::edit');\n }", "title": "" }, { "docid": "2beb90fadbb01fc51d9f15bef5d11b8d", "score": "0.67250276", "text": "public function edit()\n {\n return view('pagebuilder::edit');\n }", "title": "" }, { "docid": "393a2fa5abb84b3941411dac40f443fc", "score": "0.67221594", "text": "public function edit()\n {\n return view('bap::edit');\n }", "title": "" }, { "docid": "865bc4c469754948f370362e3c6b1e50", "score": "0.6716827", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Rio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Rio entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Rio:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c7bfd7a6f571abbdb67f79d194c13774", "score": "0.67109", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('project.form');\n\t\t$form->project = Project::find($id);\n\t\t$form->action = array('action' => array('Powerhouse\\Core\\ProjectController@update', $form->project->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "ffc3a067cfe92bdc0fefd0aa6bc1dee1", "score": "0.67088896", "text": "public function renderEdit($id = 0)\n\t{\n\t\t$form = $this['itemForm'];\n\t\tif (!$form->isSubmitted()) {\n\t\t\t$row = $this->model->find($id);\n\t\t\tif (!$row) {\n\t\t\t\tthrow new BadRequestException(RECORD_NOT_FOUND);\n\t\t\t}\n\t\t\t$form->setDefaults($row);\n\t\t\t\n\t\t\t$this->template->title = $row->label_en . ' - edit';\n\t\t}\n\t\t\n\t\t$this->setView('edit');\n\t}", "title": "" }, { "docid": "16b6d7cd6d5562240bfe7b4bf5ec4668", "score": "0.670842", "text": "public function edit($id)\n {\n return view('employees.form', compact('id'));\n }", "title": "" }, { "docid": "ecfa5a508c2f03ea2cc02d899a44d64d", "score": "0.6707534", "text": "protected function _edit() {\r\n\t\treturn $this->_editForm();\r\n\t}", "title": "" }, { "docid": "92f68c748cd68d5b2199de006850d464", "score": "0.6706401", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Programacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No existe la programacion.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Programacion:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f3efa78ffee8d0f21fbf25bc688f193b", "score": "0.6703318", "text": "public function edit($id)\n {\n $role = self::ROLE;\n // Uncomment the next line if the current_user_type is bound\n //$role = app('current_user_type') ? app('current_user_type') : 'manager';\n\n // get the product\n $product = LaravelProduct::find($id);\n\n // show the edit form and pass the product\n return View::make(self::UNIQUE_IDENTIFIER . '::edit')\n ->with('product', $product)\n ->with('role', $role);\n }", "title": "" }, { "docid": "aee289138ff45ed6516c6a9415fea5d5", "score": "0.669913", "text": "public function edit($id)\n {\n //\n $taskform = TaskForm::find($id);\n return view('taskforms.edit')->with('taskform', $taskform);\n }", "title": "" }, { "docid": "23200564e1a0aae4cc038b5f14f092e0", "score": "0.6688913", "text": "public function edit($id)\n\t{\n\t\t$model = GlobalModel::findOrFail($id);\n\t\t$globalModel = GlobalModel::getGlobalModel();\n\t\t$action_model = 'Editar '.$globalModel->singular_name.': '.$model->singular_name;\n\n\t\t$form_data = array('route' => array('dashboard.'.$globalModel->route.'.update', $model->id), 'method' => 'PUT', 'files' => true);\n\t\treturn View::make('pages/models/form', compact('action_model', 'model', 'form_data', 'globalModel'));\n\t}", "title": "" }, { "docid": "cbf068dcf001d30958187dba4e095caa", "score": "0.66679794", "text": "public function edit()\n {\n return view('appointment::edit');\n }", "title": "" }, { "docid": "252c7cca674ef213dfcafb1dd1941cb1", "score": "0.6664591", "text": "public function edit($id)\n {\n //\n $partner = Partner::find($id);\n return view('Partners/Admin/editForm' , compact('partner' , 'id'));\n }", "title": "" }, { "docid": "af795f73955d9d9446aec697e8d1585a", "score": "0.6663389", "text": "public function showEditForm($id)\n {\n $article = Article::find($id);\n\n return view('admin.edit', ['article' => $article]);\n\n }", "title": "" }, { "docid": "12507f1c00440ad43eb757af75bf6e99", "score": "0.66590947", "text": "public function edit($id)\n {\n $product_to_edit = $this->products->findOrFail($id);\n\n return view('products.form',['product'=>$product_to_edit]);\n }", "title": "" }, { "docid": "8994b22c3f812417a5c00ae1c359e901", "score": "0.66563636", "text": "public function edit()\n {\n $this->layout->with('title', $this->title);\n $this->layout->with('subtitle', 'change my details');\n\n $user = Sentry::getUser();\n\n $this->layout->content =\n View::make('account.edit')\n ->with('account', $user);\n }", "title": "" }, { "docid": "7fc64d7adaff4c5696f9313516372fbc", "score": "0.66486734", "text": "public function edit($id)\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "dadbd75e82b4f1a967d8ac7cb27bc98b", "score": "0.6641678", "text": "protected function changePageInSubformInEditModeAction()\n {\n $this->changePageInSubform();\n return $this->renderForm('edit');\n }", "title": "" }, { "docid": "063b81780fe8c5a543c8d12e2a95630a", "score": "0.66360956", "text": "public function editAction() {\n $parameters = $this->route_parameters;\n $product = Product::getSingleProduct($parameters['id']);\n $users = User::getAll($product['product_owner_id']);\n\n if ($product) {\n View::renderTemplate('Products/edit.html.twig', [\n 'product' => $product,\n 'users' => $users\n ]);\n } else {\n View::renderTemplate('404.html.twig', []);\n }\n }", "title": "" }, { "docid": "e457de999a03c9e7cf356e63e7069e9d", "score": "0.6632596", "text": "public function edit($id)\n {\n //FormEditar\n $professores = Professor::all();\n $disciplina = Disciplina::find($id);\n $action = route('disciplinas.update', $disciplina->id);\n return view('admin.disciplinas.form', compact('disciplina', 'action', 'professores'));\n }", "title": "" }, { "docid": "8590c55c1c70061cc325176390a29404", "score": "0.66302156", "text": "public function edit(\n $resource,\n $userId\n );", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "9218599a4f6abb8fe13ddcb4a391b018", "score": "0.6624856", "text": "public function edit($id)\n {\n return view('asset::Admin/Form', [\n 'asset' => $this->page->getById($id)\n ]);\n }", "title": "" }, { "docid": "df5a01f36557a67c42c488dcf336da1d", "score": "0.6623992", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('realEstateBundle:Offre')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Offre entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('realEstateBundle:Offre:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f24b3d4bab18a9d75efa91fc56a2b062", "score": "0.6621693", "text": "public function edit()\n {\n return view('housekeeping::edit');\n }", "title": "" }, { "docid": "e2d64baf531444993f439d05239f2f4d", "score": "0.6615924", "text": "public function edit()\n {\n return view('officeautomation::edit');\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "ced00a3017255bbcbba274e84e79e0e1", "score": "0.6589034", "text": "function editRecord() {\n\t\t$this->checkPermission();\n\t\t$this->loadRecord();\n\t\treturn $this->getEditForm();\n\t}", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65879726", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65879726", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "baa3acf391e7308a964fe78d9b259912", "score": "0.6587864", "text": "public function editAction($id)\n { \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CommonBundle:Nomenclator')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('El nomenclador especificado no existe');\n }\n\n $editForm = $this->createForm(new NomenclatorType(), $entity);\n \n $entity_catalog = new Catalog();\n $form_catalog = $this->createForm(new CatalogType(), $entity_catalog);\n\n return $this->render('CommonBundle:Nomenclator:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'form_catalog' => $form_catalog->createView()\n ));\n }", "title": "" }, { "docid": "7a7a712372a288997a1ff5accdfb7ce8", "score": "0.6585886", "text": "public function editAction(Request $request, Resource $resource)\n {\n $deleteForm = $this->createDeleteForm($resource);\n $editForm = $this->createForm('Unisystem\\AdminBundle\\Form\\ResourceType', $resource);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($resource);\n $em->flush();\n $request->getSession()->getFlashBag()->add( 'success', 'resource.edit.flash' );\n\n return $this->redirect($request->headers->get('referer'));\n }\n\n return $this->render('resource/edit.html.twig', array(\n 'resource' => $resource,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "30545216eb33c24f8a152e2021bb6edf", "score": "0.6580906", "text": "public function editAction()\n {\n \t$entreprise = $this->getCurrentEntreprise(); \n \tif (!$entreprise) {\n \t\tthrow $this->createNotFoundException('Unable to find Entreprise entity.');\n \t}\n \t$editForm = $this->createEditForm($entreprise);\n \treturn array(\n \t\t\t'entity' => $entreprise,\n \t\t\t'edit_form' => $editForm->createView(),\n \t);\n }", "title": "" }, { "docid": "11c76396ae44707c625948a1f1dd84b3", "score": "0.65796006", "text": "public function edit()\n {\n return view('provinsi::edit');\n }", "title": "" }, { "docid": "814d2dfc5e5447d0374c91d664a1faf2", "score": "0.6575626", "text": "public function editar()\n {\n if (isset($_GET[\"id\"])) {\n $id = (int)$_GET[\"id\"];\n\n\n //traemos todos los datos del usuario para mostrarlos en el formulario\n $administrador = new Administrador($this->adapter);\n $administrador = $administrador->getById($id);\n\n //Cargamos la vista para mostrar formulario de insert\n $this->view(\"Administrador/actualizar\", array(\n \"i\" => $administrador\n ));\n }\n }", "title": "" }, { "docid": "1a75786a7e2eadb5eb40fa30d9a98768", "score": "0.6573916", "text": "public function edit($id)\n {\n return view('enquirymanager::edit');\n }", "title": "" }, { "docid": "0a7f2f549c7de9a031f48dc6b499e7a1", "score": "0.65731585", "text": "public function edit($id) {\n $viewData = $this->getDefaultViewData();\n $viewData[\"mode\"] = \"EDIT\";\n $viewData[\"student\"] = Student::find($id);\n\n if ($viewData[\"student\"]) {\n return view('pages.students.form', $viewData);\n } else {\n return response(\"Student Not Found\", 404);\n }\n }", "title": "" }, { "docid": "9de8689c73fd572b594366f1bf5b5d98", "score": "0.6571643", "text": "public function edit($question)\n {\n $this->authorize(\"update\", $question);\n return view('questions.edit',compact('question'));\n }", "title": "" }, { "docid": "926e7ef2a770c60ad69c87162cacaa1a", "score": "0.65703654", "text": "public function edit()\n\t{\n\t\treturn View::make('user.edit');\n\t}", "title": "" }, { "docid": "ced44e573e48269f7e18b7046bf3c7b8", "score": "0.6569834", "text": "public function edit()\r\n {\r\n if($this->getSessionHandler()->isLoggedIn())\r\n {\r\n $id = $this->getRequestObject()->getParameter('id');\r\n $record = accounts::create()->findOne($id);\r\n \r\n $v = new EditAccountView();\r\n $v->injectData(array('data' => $record, 'id' => $id));\r\n echo $v->render();\r\n }\r\n else\r\n {\r\n $this->displayMessage('You must login to view this area!');\r\n }\r\n\r\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "af8a9e0d1d88de030c77bb2167000ca0", "score": "0.65597636", "text": "public function edit($id)\n\t{\n\t\treturn view('inventario::edit');\n\t}", "title": "" }, { "docid": "cec3fe3579905a040dbaed46e1a19e54", "score": "0.6557795", "text": "public function edit($id) {\n $fornecedor = $this->fornecedorRepository->show($id);\n return view('admin.fornecedores.edit')->with(compact('fornecedor'));\n }", "title": "" }, { "docid": "ecf60fd8dfae8412b0c1aa1136588163", "score": "0.6553316", "text": "public function edit($id)\n {\n $employee = Employee::where('id', $id)->first();\n return view('employees.edit',compact('employee'));\n }", "title": "" }, { "docid": "734c624b34c52ff6cb3c2642809dfdbc", "score": "0.6546303", "text": "protected function actionEdit() {\n\t\t\n\t\t// generate templates list\n\t\t$this->showDataLayoutContent();\n\t}", "title": "" }, { "docid": "93510eba883af2fed17214477f36d50f", "score": "0.6544809", "text": "public function edit($id)\n\t{\n return View::make('housholds.edit');\n\t}", "title": "" }, { "docid": "531deb797a3602e8ea456bf473e6c600", "score": "0.6543909", "text": "public function edit($id)\n\t{\n\t\t$record = Record::find($id);\n\n\t\treturn View::make('records.edit', compact('record'));\n\t}", "title": "" }, { "docid": "f9a4ee7989004e790bdc4a38a9983005", "score": "0.6542725", "text": "public function edit(Formulario $formulario)\n {\n //\n }", "title": "" }, { "docid": "08ed65e68f0c2c0f6cafaf66915c4e56", "score": "0.6542544", "text": "public function edit($id)\n\t{\n\t\t$form = $this->form->find($id);\n\n\t\tif (is_null($form))\n\t\t{\n\t\t\treturn Redirect::route('forms.index');\n\t\t}\n\n\t\treturn View::make('forms.edit', compact('form'));\n\t}", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "4f2a6fa5afece2a063c84dc9eda4aa78", "score": "0.0", "text": "public function destroy(Loans $loans)\n {\n try{\n $loans->delete();\n return response('deleted', 200);\n }\n catch(Exception $e){\n return response('Failed to delete data', 220);\n }\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "6f5cb91b0423a11c78f100fc165554df", "score": "0.6959094", "text": "public function delete(ResourceInterface $resource);", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "55490a425cec5f2c2efea8b737497612", "score": "0.6737496", "text": "public function deleteGameResource($resource){\n if($this->gameResourceExists($resource)){\n unlink($this->getResourceDataPath() . $resource . \".dat\");\n }\n }", "title": "" }, { "docid": "ef862fedfa2a9a53bdc0c931abd5b9ef", "score": "0.6707853", "text": "public function destroy()\n {\n $this->resource->delete();\n }", "title": "" }, { "docid": "033a3fd474fdaf2c9dbcf9853f451cd2", "score": "0.664397", "text": "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\"); \n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\", \n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "title": "" }, { "docid": "4f49f964d082c69a3fe92671d08d3bc7", "score": "0.66371554", "text": "public function delete($cacheResource, $ignoreLifetime = false);", "title": "" }, { "docid": "47236fb1482f779e9251fd6998158877", "score": "0.65373594", "text": "public function deleteResource(PersistentResource $resource, $unpublishResource = true)\n {\n $this->initialize();\n\n $collectionName = $resource->getCollectionName();\n\n $result = $this->resourceRepository->countBySha1AndCollectionName($resource->getSha1(), $collectionName);\n if ($result > 1) {\n $this->logger->debug(sprintf('Not removing storage data of resource %s (%s) because it is still in use by %s other PersistentResource object(s).', $resource->getFilename(), $resource->getSha1(), $result - 1));\n } else {\n if (!isset($this->collections[$collectionName])) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it refers to the unknown collection \"%s\".', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n $storage = $this->collections[$collectionName]->getStorage();\n if (!$storage instanceof WritableStorageInterface) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s) because it its collection \"%s\" is read-only.', $resource->getFilename(), $resource->getSha1(), $collectionName), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n try {\n $storage->deleteResource($resource);\n } catch (\\Exception $exception) {\n $this->logger->warning(sprintf('Could not remove storage data of resource %s (%s): %s.', $resource->getFilename(), $resource->getSha1(), $exception->getMessage()), LogEnvironment::fromMethodName(__METHOD__));\n\n return false;\n }\n if ($unpublishResource) {\n /** @var TargetInterface $target */\n $target = $this->collections[$collectionName]->getTarget();\n $target->unpublishResource($resource);\n $this->logger->debug(sprintf('Removed storage data and unpublished resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n } else {\n $this->logger->debug(sprintf('Removed storage data of resource %s (%s) because it not used by any other PersistentResource object.', $resource->getFilename(), $resource->getSha1()));\n }\n }\n\n $resource->setDeleted();\n $this->resourceRepository->remove($resource);\n\n return true;\n }", "title": "" }, { "docid": "73af02f86d4e877d5ec7756885285cd4", "score": "0.6409313", "text": "function delete($resourceName);", "title": "" }, { "docid": "fd5668b2d59626254ea2b308c3b7b195", "score": "0.63944584", "text": "public function removeResource(Row_AclResource $resource)\r\n\t{\r\n\t\t$row = $this->_getAclRow($resource);\r\n\t\t$row->allow = 0;\r\n\t\t$row->save();\r\n\t}", "title": "" }, { "docid": "66cab78c708362190959631c44dd73a1", "score": "0.6300312", "text": "public function remove( $resource ) {\n \n $res = $this->get( $resource );\n \n if ($res == false) {\n return $this;\n }\n \n $resourceId = $res->getResourceId();\n \n $resourcesRemoved = array( $resourceId );\n if ( null !== ( $resourceParent = $this->_resources[$resourceId]['parent'] ) ) {\n unset( $this->_resources[$resourceParent->getResourceId()]['children'][$resourceId] );\n }\n foreach ( $this->_resources[$resourceId]['children'] as $childId => $child ) {\n $this->remove( $childId );\n $resourcesRemoved[] = $childId;\n }\n // удаляет и правила для рессурса\n foreach ( $resourcesRemoved as $resourceIdRemoved ) {\n foreach ( $this->_rules['byResourceId'] as $resourceIdCurrent => $rules ) {\n if ( $resourceIdRemoved === $resourceIdCurrent ) {\n unset( $this->_rules['byResourceId'][$resourceIdCurrent] );\n }\n }\n }\n\n unset( $this->_resources[$resourceId] );\n\n\n return $this;\n }", "title": "" }, { "docid": "2a10b35926876411b2e80108cfe22fca", "score": "0.6298291", "text": "public function remove() {\n // determine the name of the file\n $filename = $this->engine->cache_file_path($this->key(), $this->options);\n @unlink($filename);\n }", "title": "" }, { "docid": "89ce35850dffc0e6605778465129a8fa", "score": "0.62484", "text": "public function destroy(Resource $resource)\n {\n if (count($resource->photos)) { // delete photos from filesystem and storage.\n foreach ($resource->photos as $key => $photo) {\n $resource->deletePhoto($photo);\n }\n }\n $resource->delete();\n return redirect('/home')->with(['status' => 'Deivce successfully deleted']);\n }", "title": "" }, { "docid": "2367dd4337c36bfe160c73cbfe965a9c", "score": "0.6222181", "text": "public function testRemoveResource() {\n\n\t\t$file = $this->tempDir . DIRECTORY_SEPARATOR . 'test.txt';\n\t\tfile_put_contents($file, 'test');\n\n\t\t$this->assertTrue(file_exists($file));\n\n\t\t$container = new FilesystemResourceContainer($this->tempDir, FileResource::TYPE);\n\t\t$container->remove('test.txt');\n\n\t\t$this->assertFalse(file_exists($file));\n\t}", "title": "" }, { "docid": "07b2c5af4c184e58bf2887516d95f2ee", "score": "0.6152366", "text": "public function clearResource(){\n\t\t\tif ($this->resource !== null){\n\t\t\t\timagedestroy($this->resource);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7e83a85a6ecaba18a97b363f757bfe88", "score": "0.61334383", "text": "public function remove() {\n\t\tunlink($this->getSrcImagePath());\n\t}", "title": "" }, { "docid": "0fd71148a5c7f18c479bf79390410ee6", "score": "0.6105545", "text": "public function delete(): void\n {\n if ($this->has($this->file))\n unlink($this->file);\n }", "title": "" }, { "docid": "eaf52922cf2f9f3851b5dee384bd6ceb", "score": "0.60544735", "text": "public static function remove($storageId) {\n\t\t$storageCache = new Storage($storageId);\n\t\t$numericId = $storageCache->getNumericId();\n\n\t\tif (strlen($storageId) > 64) {\n\t\t\t$storageId = md5($storageId);\n\t\t}\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($storageId));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($numericId));\n\t}", "title": "" }, { "docid": "5d67ccf5357bc568ae73bc2554b4fcb3", "score": "0.60279834", "text": "function destroying_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "98d22295493f0020f84c312075af1ad7", "score": "0.60123336", "text": "function deleting_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletingResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a7e206f667720084df5493157a69cfb1", "score": "0.59848213", "text": "static private function _delResCache($resource)\n {\n $hash = self::getHashByResource($resource);\n foreach (self::$res as &$items) {\n if (!empty($items[$hash])) {\n unset($items[$hash]);\n }\n } \n }", "title": "" }, { "docid": "896e95e8d1abd4f6c5eecd1940391bef", "score": "0.5978198", "text": "public function unlinkStorage(): self\n {\n unlink($this->path);\n\n return $this;\n }", "title": "" }, { "docid": "46e2a3c32c6b5a596ae0cf2bf703c970", "score": "0.5958219", "text": "public function destroy($id)\n {\n $get=Document::where('id',$id)->first();\n if($get->photo!=null&&file_exists(\"/storage/$get->photo\")){\n unlink('storage/'.$get->photo);\n }\n $get->delete();\n return redirect()->route('listDocument');\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "970f51bb911499288a1748bfe0157efa", "score": "0.5912158", "text": "public function delete($id) {\n $this->connectStorage($id);\n $this->storage->delete();\n }", "title": "" }, { "docid": "f1553c7757cc3676299373a5d3a835f9", "score": "0.5907517", "text": "public function destroy($id)\n {\n $uniforme = Uniforme::find();\n Storage::delete('file.jpg');\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "47945b59946db62fc806604498e46323", "score": "0.58641815", "text": "public function remove(FileInterface $file): FileInterface;", "title": "" }, { "docid": "d3158d405d4b489191764d14126b6336", "score": "0.5857253", "text": "public function destroy($id)\n {\n $trigger = Resource::where('id', $id)->first();\n $file = $trigger->file;\n if (!empty($file)) {\n $upFile = new UploadFile();\n $upFile->deleteCurrentFile($file, 'resource');\n }\n $trigger->delete();\n return back();\n }", "title": "" }, { "docid": "ce513fb382cd88ef0817a244ce395271", "score": "0.5824645", "text": "public function destroy($id)\n {\n $image= Image::find($id); \n $name = $image->name;\n $file = '/images/'.$name;\n $thumbnail = '/uploads/thumbnail/'.$name;\n Storage::delete([$file, $thumbnail]); // delete from folder $image->delete(); // delete from table return redirect()->back(); \n }", "title": "" }, { "docid": "b6078f9d34f26c367a9797120d6006ab", "score": "0.5818996", "text": "public function resourceHasBeenDeleted();", "title": "" }, { "docid": "c8394dead7326b95b49dd4f6c575a34a", "score": "0.58155316", "text": "public function destroy($resource, $id)\n {\n $model = $this->model->find($id);\n $model->delete();\n Cache::flush();\n $fields = $this->getModelAttributes();\n return redirect()->route('admin.resource', [\n 'resource' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "915ec80e489f9eed2bde0417b2f10a19", "score": "0.580295", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->addResource($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "b4ee6dc4b9942eba341457d6bf4d5638", "score": "0.5796796", "text": "public function removeFromStore()\n {\n if ($this->getHash() && $this->getType()) {\n $this->getFileStore()->delete($this->getHash(), $this->getType());\n } else {\n throw new SwompException(\"Cannot remove from Store - Hash and Type is required\");\n }\n }", "title": "" }, { "docid": "b48e565472dafa6e553cf8aee6f42a6a", "score": "0.578793", "text": "public function destroy($id)\n {\n $product = Pruduct::where('id', $id)->first();\n unlink('storage/' . $product->image);\n\n $product->delete();\n Session::flash('messege', 'Data berhasil di hapus.');\n return redirect()->back();\n }", "title": "" }, { "docid": "532f8d58b20e101c1f5035990ba18e7e", "score": "0.57871205", "text": "public function cleanStorage();", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "0009889a5268b3415309c6899e972909", "score": "0.57663226", "text": "public function delete()\r\n {\r\n $path = $this->path;\r\n parent::delete();\r\n\r\n // Delete file if exists\r\n if($this->id && file_exists($path))\r\n {\r\n unlink($path);\r\n }\r\n\r\n }", "title": "" }, { "docid": "62c6b6bfe5aeaa08992c1c1ff2c5e9ec", "score": "0.5732295", "text": "public function destroy($id)\n {\n $obj = Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n // remove file\n if(Storage::disk('public')->exists($obj->image))\n Storage::disk('public')->delete($obj->image);\n \n $obj->delete();\n\n flash('('.$this->app.'/'.$this->module.') item Successfully deleted!')->success();\n return redirect()->route($this->module.'.index');\n }", "title": "" }, { "docid": "b6294af388de3ae8b010bbdd0e147a65", "score": "0.57102996", "text": "function destroyed_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DestroyedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "a1d82443b72d201e5ede999d05bf59f5", "score": "0.57096094", "text": "public function unsetStorageId()\r\n\t{\r\n\t\tunset($this->_storage_id);\r\n\t}", "title": "" }, { "docid": "9591ec5177ac179477cbd3c3ccaa275a", "score": "0.5706215", "text": "public function destroy($id)\n {\n $file = FileTask::findOrFail($id);\n Storage::delete($file->path); //delete from disk\n $file->delete(); //delete from db\n flash('File was removed!');\n return back();\n }", "title": "" }, { "docid": "cf195d4a522e74edc7019e572a06923c", "score": "0.5694188", "text": "public function destroy($id)\n {\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return response()->json(['status' => 'success']);\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "fe53bca8d325675dd4f80c6d519ce470", "score": "0.5679682", "text": "public function destroy($id)\n {\n \n $delete = Product::find($id);\n $image_path ='public/image/'. $delete->photo;\n unlink( $image_path);\n $delete->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "8bbd28cf62ed375a2f7518342e1d75ae", "score": "0.56680655", "text": "public function removeFile();", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "c1ecca5c35e22313e1c38b1ddca48883", "score": "0.56521606", "text": "public function destroy(FILE $file)\n {\n \n\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n\n $file->delete();\n\n return redirect()->route('admin.files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "ac44db6cd2e11be0502437646b98bec0", "score": "0.56515306", "text": "public function untagResource($payload, $headers=[]) {\n $method = 'DELETE';\n $path = sprintf('/%s/tag', $this->apiVersion);\n $headers = $this->buildCommonHeaders($method, $path, $headers);\n $content = json_encode($payload);\n $headers['content-length'] = strlen($content);\n return $this->doRequest($method, $path, $headers, $data = $content);\n }", "title": "" }, { "docid": "3c36d7803d6dcac2a74d7850bf05b529", "score": "0.56461364", "text": "function deleteResource($model)\n {\n }", "title": "" }, { "docid": "198fe5623de140ddb980a64f1228ee9c", "score": "0.5643258", "text": "public function shutdownObject()\n {\n /** @var PersistentResource $resource */\n foreach ($this->resourceRepository->getAddedResources() as $resource) {\n if ($this->persistenceManager->isNewObject($resource)) {\n $this->deleteResource($resource, false);\n }\n }\n }", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "ddb7a7e1bd529da0193a6825c4588bde", "score": "0.5632143", "text": "function deleted_resource(Model $resource, Authenticatable $user = null)\n { \n return crud_event(\\Core\\Crud\\Events\\DeletedResource::class, $resource, $user);\n }", "title": "" }, { "docid": "cfb60ffcc989888bf5132bd8f18d28f3", "score": "0.563189", "text": "public function destroy(string $storageKey): bool;", "title": "" }, { "docid": "227d7db0fe495cc1b0734cf71cbc6374", "score": "0.5627202", "text": "public function destroy($id)\n {\n try {\n $resource = Resource::findOrFail($id);\n auth()->user()->resources()->detach($id);\n } catch (\\Throwable $e) {\n throw abort(404);\n }\n\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-saved',\n 'message' => $resource->getMedia()[0]->file_name . ' was unsaved successfully!',\n 'resource_id' => $id\n ]);\n }", "title": "" }, { "docid": "b2deedc135e4e9a6d691a34bc62901e4", "score": "0.5602831", "text": "public function delete(): void\n {\n if ($this->exists()) {\n File::delete($this->path());\n }\n }", "title": "" }, { "docid": "29d3e4879d0ed5074f12cb963276b7cc", "score": "0.56021434", "text": "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "title": "" }, { "docid": "2551dae05d41b0f050dbd034df4e2093", "score": "0.5595374", "text": "public function remove()\n {\n $res = unlink($this->_path);\n return $res;\n }", "title": "" }, { "docid": "2dfd4b7a5b42f50b0f3186c2425fc4a3", "score": "0.55950236", "text": "public abstract function deleteAsset(Asset $asset);", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "4a8532446eb5a624448dac28b0ab0abe", "score": "0.55868185", "text": "public function remove_to_cart($resource_id){\n\n $cart = Session::get('cart');\n\n $index = array_search($resource_id, $cart);\n if($index >= 0) {\n array_splice($cart, $index, 1);\n\n }\n\n Session::put('cart',$cart);\n\n return redirect('/cart');\n }", "title": "" }, { "docid": "eb676b82c99dc848aabda71793e9f00a", "score": "0.55856013", "text": "public function destroy()\n {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "0f5a2d5d4ccb6690f2c9b7c1ad81379c", "score": "0.55815697", "text": "public function delete() {\n\t\treturn unlink($this->path);\n\t}", "title": "" }, { "docid": "abcaf8d103f03089c84f7aa510afb02a", "score": "0.5578945", "text": "public function delete()\n {\n if (null !== $this->repository) {\n $this->repository->close();\n }\n\n $this->file->delete($this->filePath);\n $this->filePath = '';\n }", "title": "" }, { "docid": "6955ff701e4315c5cfa7e2767eafdbcf", "score": "0.55788815", "text": "public function clear($in_storage_too = true);", "title": "" }, { "docid": "f576b22c84d78e83b91d5036361a095c", "score": "0.55780953", "text": "public function delete($filename = null);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "930240c93dd67bc31042064adb044402", "score": "0.55683106", "text": "public function destroy($id) {\n $data = Product::findOrFail($id);\n @unlink(storage_path('app/public/product/' . $data->product_image));\n $data->delete();\n return redirect('product')->with('success', 'Product is successfully deleted');\n }", "title": "" }, { "docid": "f7e801c4eebb9a1d03e7feec4ecd5f21", "score": "0.5567041", "text": "public function destroy($id)\n {\n $realestate = Realestate::findOrfail($id);\n if( count($realestate->files) > 0 )\n {\n if(Storage::disk('public')->exists($realestate->files[0]->path))\n Storage::disk('public')->delete($realestate->files[0]->path);\n\n $realestate->files()->delete();\n }\n\n $realestate->delete();\n\n\n return redirect()->route('realestate_index');\n\n }", "title": "" }, { "docid": "f392b1ed7db16f604f843adb672ef950", "score": "0.55653834", "text": "public function destroy($id)\n {\n $slide = Slide::find($id);\n if(Storage::delete('public/slides/'.$slide->slides)){\n $slide->delete();\n return redirect('Viewall/All_slide')->with('error','Slide deleted');\n }\n}", "title": "" }, { "docid": "0a10bad03f5df8b55f39176b0c613baa", "score": "0.55647546", "text": "public function remove(string $path)\n {\n $this->set($path, null);\n }", "title": "" }, { "docid": "adc4e9de22fd8f0d6314e35dcee0b8e0", "score": "0.5563022", "text": "public function remove(string $object): void;", "title": "" }, { "docid": "37d5927bb51b78bdcea795a632988120", "score": "0.55617017", "text": "public function removeTransactionResource($hash)\n\t{\n\t\t$path = $this->getTransactionResourcePath($hash);\n\t\treturn $this->deleteTransactionResource($path);\n\t}", "title": "" }, { "docid": "61d679086bf634ff55d0bc8a41a70710", "score": "0.5561249", "text": "public function destroy($id)\n {\n $user =DB::table('users')->where('id',$id)->first();\n $photo = $user->photo;\n \n unlink($photo);\n DB::table('users')->where('id',$id)->delete();\n \n }", "title": "" }, { "docid": "40424bbe7e79c788acc8e40fa96c2e17", "score": "0.5556214", "text": "public function destroy($id)\n {\n \n $product = Product::findOrFail($id);\n\n if($product->delete()) {\n\n return new ProductResource($product);\n }\n }", "title": "" }, { "docid": "b877c987e8cb3298dc4c9f11662792f9", "score": "0.55559146", "text": "public function destroy($id)\n {\n $path = File::findOrFail($id)->path; \n //esto me va a borrar del storage el archivo que le diga. De todas formas el find or fail me tiene que traer la dirreccion\n Storage::delete( $path ); \n\t\tFile::findOrFail($id)->delete(); \n\t\treturn redirect('/home');\n }", "title": "" }, { "docid": "09d16b97894d6829ff484d20cf378f8f", "score": "0.555526", "text": "public function destroy(Request $request, $id){\n $file = File::whereCodeName($id)->firstOrFail();\n //unlink elimina el archivo de la aplicacion\n unlink(public_path('storage/'. Auth::id() .'/' . $file->code_name));\n\n //eliminar de base de datos\n $file->delete();\n\n //avisar que se ha borrado archivo al usuario\n Alert::info('¡Ateción!', 'Se ha eliminado el archivo');\n return back();\n }", "title": "" }, { "docid": "19530e0d90a5511cefec030646832ac7", "score": "0.55509293", "text": "function deleteResource($id)\n\t{\n\t if(empty($id)) \n throw new App_Db_Exception_Table('Resource ID is not specified');\n\t\t\n\t\t$this->db_delete($this->_table, array('id'=>$id));\n\t}", "title": "" }, { "docid": "3fa04699fe14eb03c48cfde3470db201", "score": "0.55502915", "text": "public function destroy($id)\n {\n $file = Upload::findOrFail($id);\n if(File::exists(public_path($file->filename))){\n unlink(public_path($file->filename));\n File::delete(public_path($file->filename));\n }\n $file->delete();\n return redirect()->back()->with('success','Deleted Successfully');\n //\n }", "title": "" }, { "docid": "94b6f2ef01c97218c0ea77ca980a8947", "score": "0.55452746", "text": "public function wipeStorage(): void\n {\n $this->storageAdapter->wipeStorage();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "51ecf73cbf0ed20291ef32754f32287e", "score": "0.55377126", "text": "public function destroy($id)\n {\n $site_image = DB::table('site_images')->where('id',$id)->first();\n $image=$site_image->image_name;\n unlink($image);\n DB::table('site_images')->where('id',$id)->delete();\n\n redirect()->back()->with('success', 'site image removed successfully');\n }", "title": "" }, { "docid": "30d0b23b0b35054a9dcfaf9fdc529aa5", "score": "0.5532588", "text": "public function destroy($id)\n {\n\n $p = Product::where('id' , $id)->first();\n if(File::exists($p->image)){\n File::delete($p->image);\n }\n $p->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
6abaad552cc72a0a82e8e2c23f43aefa
Stars up all the files in the project to those specified in the package. This should copy over/prepare all the files needed to make a standard project into a heavyD one.
[ { "docid": "ef897e3030baa072766248053ea1c327", "score": "0.0", "text": "public function taskProjectStartup(string $seedFileLocation);", "title": "" } ]
[ { "docid": "5a6b33bc619d8354fb27505ecaa27d56", "score": "0.62220377", "text": "private function moveProjectFilesToRoot()\n {\n r_copy($this->backupPath . '/src', __ROOT_DIRECTORY__);\n }", "title": "" }, { "docid": "f3d5759a021d795cd77f3a107995aaf7", "score": "0.6192595", "text": "public function prepare(){\n mkdir($this->runtimePath, 0755, true);\n shell_exec(\"cp -R \" . rtrim($this->path, \"/\") . \"/* \" . $this->runtimePath);\n }", "title": "" }, { "docid": "a021a4f45d887b2a3ad920145b6dd071", "score": "0.6080714", "text": "public function build() {\n $this->scanDirectory($this->root.\"lib\");\n $this->scanDirectory($this->root.\"src\");\n $this->scanDirectory($this->root.\"test\");\n }", "title": "" }, { "docid": "acd5e9c2097c6c236f7930a743c2e96e", "score": "0.5983527", "text": "protected function rebuild()\n {\n $this->apps = $this->getDependency(DClassInformation::class)\n ->getClassNames(DApp::class);\n $this->files = [ self::FILE_MANIFEST => [],\n self::FILE_REGISTRATIONS => [],\n self::FILE_TABLES => [], ];\n /* @var $fileInformation DFileInformation */\n $fileInformation = $this->getDependency(DFileInformation::class);\n foreach ($fileInformation->getFiles() as $filename) {\n // Check if this is a supporting file.\n $type = substr($filename, strpos($filename, '.'));\n if (in_array($type, self::$fileTypes)) {\n $this->files[ $type ][] = $filename;\n }\n }\n }", "title": "" }, { "docid": "468a82e27125543b59ae22e605ea4c94", "score": "0.5953555", "text": "protected static function copyRequiredFiles(): void {\n self::updateSass();\n self::updateBootstrapping();\n self::installVueComponent();\n }", "title": "" }, { "docid": "993e08e3153253db82c3922aac0b03e5", "score": "0.59481925", "text": "function main () {\n // Make sure that the target dir contains at least one code\n // file, if not remove the target file as it's pointless.\n $hasFile = false;\n foreach (scandir($this->dir) as $item) {\n $item = \"{$this->dir}/{$item}\";\n if (substr($item, -4) == '.php' && is_file($item)) {\n $hasFile = true;\n break;\n }\n }\n if (! $hasFile) {\n printf(\"Remove empty NSPF package %s\", $this->file);\n unlink($this->file);\n return;\n }\n\n $toks = token_get_all(file_get_contents($this->file));\n $uses = $this->extractUses($toks);\n if (! $uses) {\n return;\n }\n file_put_contents($this->file, $this->replacesUses($toks, $uses));\n }", "title": "" }, { "docid": "543fde96d774d93eaadad0a6380d927f", "score": "0.59297335", "text": "public function pack()\n {\n $this->verifyConfig();\n $this->setEnvironment();\n $this->packDatabase();\n $this->packFiles();\n }", "title": "" }, { "docid": "f1dd3a272a8b03459c96062d6d478593", "score": "0.5891837", "text": "public function build_all() {\n $this->make_dir();\n $this->make_img_dir();\n }", "title": "" }, { "docid": "52b71b13d96071e868f0210bf65c8713", "score": "0.5755557", "text": "public function main()\n {\n $project = $this->getProject();\n\n foreach($this->filesets as $fs) {\n $ds = $fs->getDirectoryScanner($project);\n $files = $ds->getIncludedFiles();\n $dir = $fs->getDir($this->project)->getPath();\n\n foreach ($files as $fileName) {\n $this->highlightFile($dir . '/' . $fileName);\n }\n }\n }", "title": "" }, { "docid": "84c26241df17e27b007af643bba9ecc6", "score": "0.56729853", "text": "function mainAssemble() {\n # Step 1 is to assembly a spec and generate the build script\n $includes = array();\n $dirs = scandir('./tests-runtime');\n foreach($dirs as $dir) {\n \t#echo \"\\n Looking at directory $dir\";\n if(substr($dir,0,1)=='.') continue;\n if(!is_dir('./tests-runtime/'.$dir)) continue;\n if($dir=='debug') continue;\n if($dir=='out') continue;\n \n $file = \"./tests-runtime/$dir/$dir.dd.yaml\";\n if(!file_exists($file)) {\n if(file_exists(\"tests-runtime/$dir/test.dd.yaml\")) {\n $includes[] = $dir;\n $fc = file_get_contents(\"tests-runtime/$dir/test.dd.yaml\");\n file_put_contents(\"tests-runtime/$dir.dd.yaml\",$fc);\n }\n }\n else {\n $includes[] = $dir;\n $fc = file_get_contents($file);\n file_put_contents(\"tests-runtime/$dir.dd.yaml\",$fc);\n }\n }\n \n $master = \"includes:\\n - \".implode(\"\\n - \",$includes);\n file_put_contents(\"tests-runtime/tests-runtime.dd.yaml\",$master);\n }", "title": "" }, { "docid": "f0d0df9f651b761011eb15635c7efd15", "score": "0.5668298", "text": "private function load_files() {\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/config.php';\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/assets.php';\n \n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/manager.php';\n\n require PREMIUM_ADDONS_PATH . 'includes/templates/types/manager.php';\n\n require PREMIUM_ADDONS_PATH . 'includes/templates/classes/api.php';\n \n }", "title": "" }, { "docid": "7c5c3b275dd8afc59c655da954c4a317", "score": "0.56667095", "text": "private function CopyFiles()\n {\n $root = $_SERVER['DOCUMENT_ROOT'];\n \n foreach ($this->Package_Files AS $source => $destination) \n {\n $t_source = \"{$root}/{$source}\";\n $t_destination = \"{$root}/{$this->Package_Directory}/{$this->Package_Folder}/{$destination}\";\n $copy_result = $this->smartCopy($t_source, $t_destination);\n \n if (!$copy_result) {\n $this->OutputMessage (\"<b style='color:red;'>FILE DID NOT COPY:</b <br /><b>Source</b> ==> {$t_source} <br /><b>Destination</b> ==> {$t_destination} <br />\");\n } else {\n $this->OutputMessage (\"<b style='color:blue;'>FILE COPIED:</b <br /><b>Source</b> ==> {$t_source} <br /><b>Destination</b> ==> {$t_destination} <br />\");\n }\n \n \n # write the contents for the file (install.php)\n $temp = explode('/', $source);\n $count = count($temp);\n \n $source_filename = $temp[$count-1];\n $source_filename_length = strlen($source_filename);\n \n $temp_length = -($source_filename_length);\n $destination_new = substr($source, 0, $temp_length);\n $source_new = \"{$destination}{$source_filename}\";\n \n $this->Install_File_Content_FILES .= \"'{$source_new}' => '{$destination_new}',\n \";\n \n \n # write the contents for the file (remove.php)\n $delete_file = \"{$destination_new}{$source_filename}\";\n $this->Remove_File_Content_FILES .= \"'{$delete_file}',\n \";\n \n }\n \n ### TO DO ###\n # determine if folder exists - create if not there\n # determine if file exists - copy if not - ask to overwrite if YES\n }", "title": "" }, { "docid": "31b29da9f83e6ddd15609966e5eaf124", "score": "0.56498456", "text": "public function moveRequiredFiles() {\n $modulePath = dirname(__FILE__).DIRECTORY_SEPARATOR;\n $suffix = '.original';\n\n # These files are \"upgrade-proof\" (not in repository, jus their copies)\n # Will not be overwriten by new version\n # =====================================================================\n $requiredFilePathArr = array(\n 'badgeModel' => $modulePath.'models'.DIRECTORY_SEPARATOR.'Badge.php',\n 'badgeController' => $modulePath.'controllers'.DIRECTORY_SEPARATOR.'BadgeController.php',\n 'badgeCssFile' => $modulePath.'assets'.DIRECTORY_SEPARATOR.'css'.DIRECTORY_SEPARATOR.'badger.css',\n 'badgeView_List' => $modulePath.'views'.DIRECTORY_SEPARATOR.'badge'.DIRECTORY_SEPARATOR.'_list.php',\n 'badgeViewList' => $modulePath.'views'.DIRECTORY_SEPARATOR.'badge'.DIRECTORY_SEPARATOR.'list.php',\n 'badgeViewMy' => $modulePath.'views'.DIRECTORY_SEPARATOR.'badge'.DIRECTORY_SEPARATOR.'my.php',\n );\n\n foreach($requiredFilePathArr as $targetPath) {\n $targetPath = $targetPath;\n $sourcePath = $targetPath.$suffix;\n\n $targetExists = file_exists($targetPath);\n $sourceExists = file_exists($sourcePath);\n\n // Both files missing. BAD!\n if( !$targetExists && !$sourceExists ) {\n throw new Exception('Required files missing ('.$targetPath.')');\n }\n\n // Target missing: not so bad\n // Copy original files to their required destination\n if(! $targetExists) {\n copy( $sourcePath, $targetPath);\n if(! file_exists($targetPath) ) {\n shell_exec('cp '.$sourcePath.' '.$targetPath.'');\n }\n }\n }\n }", "title": "" }, { "docid": "d0e7ed1e1732d5d86eb9cacaa5d691cd", "score": "0.5645019", "text": "public function copyFiles(): void\n {\n file_put_contents(\n config_path('auth.php'),\n $this->compileFileStub('config/auth.stub')\n );\n\n foreach ($this->filesToCopy as $stub => $file) {\n file_put_contents(\n app_path($file),\n $this->compileFileStub($stub)\n );\n }\n }", "title": "" }, { "docid": "ead13f9106e40f9a09e123dd290154fd", "score": "0.5631894", "text": "private function copyPublicRootFiles()\n {\n $source = [\n \"{$this->basePath}resources{$this->ds}manifest.json\",\n \"{$this->basePath}resources{$this->ds}serviceworker.js\",\n ];\n $destination = \"public{$this->ds}\";\n $this->copyFilesFromSource($source, $destination);\n }", "title": "" }, { "docid": "1edb3342fa24bfc10bb8dd81576777f2", "score": "0.56311595", "text": "public function hydrate() {\n $this->logger->debug(\"Hydrate: cwd = '{$this->options->get('working_directory')}', pathspec = '{$this->options->get('pathspec')}', recurse = '{$this->options->get('recurse')}'\");\n\n $fs = $this->filesys;\n // move working directory\n $savedir = $fs->getcwd();\n $this->logger->debug(\"savedir = $savedir\");\n try {\n $fs->chdir($this->options->get('working_directory'));\n $dirh = $fs->opendir('.');\n $specs = explode(' ', trim($this->options->get('pathspec')));\n foreach ($specs as $spec)\n $this->processSpec('', $dirh, $spec);\n } finally {\n $fs->chdir($savedir);\n }\n }", "title": "" }, { "docid": "e87ca1795f2913ee33f21b056da8dd74", "score": "0.5631034", "text": "private function set_files() {\n\t\tforeach( $this->namespaces as $psuedonamespace => $path ) {\n\t\t\t$this->inc_files[ $psuedonamespace ] = $this->glob( $path . '/includes' );\n\t\t\t$this->admin_files[ $psuedonamespace ] = $this->glob( $path . '/admin/includes' );\n\t\t\t$this->public_files[ $psuedonamespace ] = $this->glob( $path . '/public/includes' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "95365a880eb0f41ade1ff9aafd509a80", "score": "0.55751777", "text": "public function copyModuleFiles(PackageEvent $event): void\n {\n $package = $this->extractPackage($event);\n $this->packagePath = $this->vendorPath . DS . $package->getName();\n if ($package->getType() === 'bluz-module' && file_exists($this->packagePath)) {\n if ($package->getExtra() && isset($package->getExtra()['copy-files'])) {\n $this->copyExtras($package->getExtra()['copy-files']);\n }\n $this->copyModule();\n }\n }", "title": "" }, { "docid": "3c91a99167da9ffccef45fb980339006", "score": "0.55730796", "text": "public function main() {\n\n $projects = Project::parseFolder($this->getSourceDir());\n\n foreach ($projects as $dataFile => $project) {\n\n if (!in_array($project->getProjectType(), ['d7', 'd8'])) {\n continue;\n }\n\n $this->log('Handling ' . $dataFile);\n $this->pollProjectServers($project);\n }\n $this->outputReport();\n }", "title": "" }, { "docid": "de89b3e2ff0397904fac1d2c06b1153a", "score": "0.55592155", "text": "public function copyFiles()\n {\n file_put_contents(\n config_path('auth.php'),\n $this->compileFileStub('config/auth.stub')\n );\n\n foreach ($this->filesToCopy as $stub => $file) {\n file_put_contents(\n app_path($file),\n $this->compileFileStub($stub)\n );\n }\n }", "title": "" }, { "docid": "999ed05c9b197c37816179e4fa11dab6", "score": "0.55557066", "text": "public function prep_simulation()\n {\n $this->create_work_dir();\n \n //create local copies of all files in the working directory\n $this->create_working_copies();\n\n //TODO: pass ownership to the sandbox\n //(or make the files world-readable?)\n }", "title": "" }, { "docid": "08a056f14696a7d1538ebfc130f5ef08", "score": "0.55210954", "text": "public static function alter()\n {\n\n //--------------------------------------------\n // BELOW IS A SNIPPET I USED TO ALTER THE UNIVERSE STRUCTURE...,\n // I KEEP IT AS A MEMO JUST IN CASE...\n //--------------------------------------------\n ini_set(\"max_execution_time\", 0);\n $galaxyDir = \"/myphp/universe/Ling\";\n $planetDirs = YorgDirScannerTool::getDirs($galaxyDir);\n $allFiles = [];\n foreach ($planetDirs as $planetDir) {\n $planetName = basename($planetDir);\n $planetFiles = YorgDirScannerTool::getFiles($planetDir, true);\n foreach ($planetFiles as $file) {\n $allFiles[] = $file;\n }\n }\n\n\n foreach ($planetDirs as $planetDir) {\n $planetName = basename($planetDir);\n $planetFiles = YorgDirScannerTool::getFiles($planetDir, true);\n\n foreach ($planetFiles as $file) {\n $content = file_get_contents($file);\n $newContent = str_replace('namespace ' . $planetName, 'namespace Ling\\\\' . $planetName, $content);\n FileSystemTool::mkfile($file, $newContent);\n }\n\n\n $readMeFile = $planetDir . \"/README.md\";\n if (file_exists($readMeFile)) {\n $content = file_get_contents($readMeFile);\n $newContent = str_replace('uni import ' . $planetName, 'uni import Ling/' . $planetName, $content);\n FileSystemTool::mkfile($readMeFile, $newContent);\n }\n\n $depItem = DependencyTool::getDependencyItem($planetDir);\n if (array_key_exists(\"dependencies\", $depItem)) {\n $deps = $depItem['dependencies'];\n if (array_key_exists(\"ling\", $deps)) {\n if (!empty($deps['ling'])) {\n $deps['Ling'] = $deps['ling'];\n }\n unset($deps['ling']);\n }\n $newDepItem = [\n \"dependencies\" => $deps,\n \"post_install\" => [],\n ];\n BabyYamlUtil::writeFile($newDepItem, $planetDir . \"/dependencies.byml\");\n }\n\n\n $metaInfo = MetaInfoTool::parseInfo($planetDir);\n if ($metaInfo) {\n if (array_key_exists(\"galaxy\", $metaInfo)) {\n unset($metaInfo['galaxy']);\n }\n BabyYamlUtil::writeFile($metaInfo, $planetDir . \"/meta-info.byml\");\n }\n\n\n foreach ($allFiles as $file) {\n $content = file_get_contents($file);\n $newContent = str_replace('use ' . $planetName . '\\\\', 'use Ling\\\\' . $planetName . '\\\\', $content);\n FileSystemTool::mkfile($file, $newContent);\n }\n\n }\n\n }", "title": "" }, { "docid": "1aea39ce639d5fea88908520e142e728", "score": "0.55208975", "text": "public function dirPrepare(): void\n {\n $paths = $this->getPaths();\n $filesystem = $this->getFilesystem();\n $this->info('Preparing artifact directories');\n $filesystem->mkdir([\n sprintf('%s/build/coverage', $paths['var']),\n sprintf('%s/build/logs', $paths['var'])\n ]);\n $this->info('Artifact directories prepared');\n }", "title": "" }, { "docid": "f3d6549a2ddc8eb770d826a685c2e1b1", "score": "0.55092543", "text": "public function regenerate_directory_contents() {\n\t\t$this->files_and_folders = $this->get_dir_contents( $this->path_to_includes );\n\t\t$this->update_files_and_folders_version( $this->files_version );\n\t\tself::$files_and_folders_version = $this->files_version;\n\t\t\n\t\t$this->update_includes_real_path( $this->path_to_includes );\n\t\tself::$saved_includes_real_path = $this->path_to_includes;\n\t}", "title": "" }, { "docid": "3c0e835e8c561ca9f75a5f0cf89904ee", "score": "0.5490817", "text": "public function __invoke(Project $project): void\n {\n $files = $project->sourceFiles();\n $files\n ->name('*.gif')\n ->name('*.png')\n ->name('*.jpg')\n ->name('*.jpeg')\n ->name('*.svg');\n\n $project->watchlist->watchFiles($files);\n\n /** @var SplFileInfo $file */\n foreach ($files as $file) {\n $project->addFile(new LazyFile($file->getPathname(), $file->getRelativePathname()));\n }\n }", "title": "" }, { "docid": "f76f4568011dcedb2ffec392c26af288", "score": "0.5486599", "text": "public function run(): void\n {\n $webDir = $this->baseDir . '/web';\n // Custom vendor dir is not currently supported.\n $vendorDir = $this->baseDir . '/vendor';\n // Ensure we have a webdir\n $this->filesystem->ensureDirectoryExists($webDir);\n // Ensure we have a static dir for ephemeral, generated files ...\n $this->filesystem->ensureDirectoryExists($webDir . '/static');\n\n foreach ($this->appPackages as $app) {\n if ($app === 'horde/components') {\n continue;\n }\n $appVendorDir = $vendorDir . '/' . $app;\n [$vendor, $appName] = explode('/', $app);\n $appWebDir = $webDir . '/' . $appName;\n // abort if the app isn't actually there\n if (!is_dir($appVendorDir) || !is_readable($appVendorDir)) {\n // TODO: Consume IO object and warn\n continue;\n }\n // create the app's main dir in the web/ tree\n $this->filesystem->ensureDirectoryExists($appWebDir);\n // Items we won't copy or link to the web tree\n $filterList = [\n 'files' => [\n 'LICENSE', 'composer.json', 'composer.lock', '.gitattributes',\n '.horde.yml', '.travis.yml', 'package.xml', 'phpunit.xml.dist',\n '.gitignore', 'README.rst',\n ],\n 'dirs' => [\n 'doc', \n 'test',\n 'bin',\n 'script',\n 'scripts',\n 'static', // static should be ensured to exist in webdir.\n '.git',\n '.github',\n ]\n ];\n\n if ($this->mode === 'symlink') {\n // create links to the app's subdirs and files in the web/ tree, omitting select dirs and files\n foreach (new DirectoryIterator($appVendorDir) as $appFileInfo) {\n if ($appFileInfo->isDot()) {\n continue;\n }\n $name = $appFileInfo->getFilename();\n if ($appFileInfo->isDir()) {\n if (in_array(\n $name,\n $filterList['dirs']\n )) {\n continue;\n }\n $this->filesystem->relativeSymlink(\n $appVendorDir . '/' . $name,\n $appWebDir . '/' . $name\n );\n }\n if (in_array(\n $name,\n $filterList['files']\n )) {\n continue;\n }\n $this->filesystem->relativeSymlink(\n $appVendorDir . '/' . $name,\n $appWebDir . '/' . $name\n );\n }\n } else {\n $copy = new RecursiveCopy($appVendorDir, $appWebDir, array_merge($filterList['files'], $filterList['dirs']));\n $copy->copy();\n }\n }\n }", "title": "" }, { "docid": "e4467a8705a04ab79537a1e1f5a6a1a5", "score": "0.54773694", "text": "private function includes() {\n\t\trequire_once $this->dir_path . 'lib/extended-cpts/extended-cpts.php';\n\t\trequire_once $this->dir_path . 'lib/class-gw-advanced-merge-tags.php';\n\t\trequire_once $this->dir_path . 'inc/customizer.php';\n\t\trequire_once $this->dir_path . 'inc/cpts-location.php';\n\t\trequire_once $this->dir_path . 'inc/post-types.php';\n\t\trequire_once $this->dir_path . 'inc/cpts-blog.php';\n\t\trequire_once $this->dir_path . 'inc/taxonomies.php';\n\t\trequire_once $this->dir_path . 'inc/metaboxes.php';\n\t\trequire_once $this->dir_path . 'inc/rest-meta.php';\n\t\trequire_once $this->dir_path . 'inc/parish-flow.php';\n\t\trequire_once $this->dir_path . 'inc/gf-parish-data.php';\n\t\trequire_once $this->dir_path . 'inc/documents-meta.php';\n\t\trequire_once $this->dir_path . 'inc/functions.php';\n\t}", "title": "" }, { "docid": "cccfee19ab816e38d2ed80d5462a50a8", "score": "0.54763806", "text": "private function includeFiles()\n {\n $configuratorPaths = $this->configurator->getEntityPaths();\n\n /**\n * 1. Load all files from sourcePaths\n */\n foreach ($configuratorPaths as $path) {\n\n $finder = new Finder();\n $finder->files()->in($path);\n\n foreach ($finder as $file) {\n $realPath = $file->getRealPath();\n\n require_once $realPath;\n\n $this->includedFiles[$realPath] = true;\n }\n }\n }", "title": "" }, { "docid": "893ffdc030daf6b2b5001254292d213f", "score": "0.54661906", "text": "public function main() {\n // refer to http://pear.php.net/package/PEAR_PackageFileManager2/docs/latest/PEAR_PackageFileManager2/PEAR_PackageFileManager2.html\n PEAR_Frontend::setFrontendObject(new PEARCraterTask_Frontend($this));\n $package = new PEAR_PackageFileManager2();\n $this->_initOptions();\n $a = $package->setOptions($this->_options);\n if (PEAR::isError($a)) {\n $this->log($a->getMessage(), Project::MSG_ERR);\n exit(-1);\n }\n\n $package->setPackage((string) $this->_name);\n $package->setSummary((string) $this->_summary);\n\n $desc = preg_replace(\"/^({$this->_description->indention_type}{{$this->_description->indentions_to_remove}}|\\t)+/m\", '', (string) $this->_description);\n $package->setDescription($desc);\n\n $package->setChannel((string) $this->_channel);\n $package->setAPIVersion($this->_version->api);\n $package->setReleaseVersion($this->_version->release);\n $package->setAPIStability($this->_stability->api);\n $package->setReleaseStability($this->_stability->release);\n\n // TODO: allow different types\n $package->setPackageType($this->_type);\n $package->addRelease();\n if (!is_null($this->_dependencies->php)) {\n $this->log('Using explicit PHP minimum version: ' . $this->_dependencies->php->minimum_version);\n $package->setPhpDep($this->_dependencies->php->minimum_version);\n } else {\n $this->log('Using current PHP version as minimum: ' . phpversion());\n $package->setPhpDep(phpversion());\n }\n\n if (!is_null($this->_dependencies->pear)) {\n $this->log('setting minimum PEAR version: ' . $this->_dependencies->pear->minimum_version);\n $package->setPearinstallerDep(\n $this->_dependencies->pear->minimum_version, $this->_dependencies->pear->maximum_version, $this->_dependencies->pear->recommended_version, $this->_dependencies->pear->exclude_version\n );\n } else {\n $this->log('setting minimum PEAR version to currently installed version');\n $pear_version = PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version');\n $this->log('minimum PEAR version: ' . $pear_version);\n $package->setPearinstallerDep(\n PEAR_Config::singleton()->getRegistry()->packageInfo('PEAR', 'version')\n );\n }\n\n foreach ($this->_maintainers as $maintainer) {\n $this->log(\"adding maintainer [{$maintainer->user}/{$maintainer->name}] with role [{$maintainer->role}]\");\n $package->addMaintainer(\n $maintainer->role, $maintainer->user, $maintainer->name, $maintainer->email, $maintainer->active\n );\n }\n\n // handle dependencies\n if (!empty($this->_dependencies)) {\n $this->log('adding dependencies');\n if (count($this->_dependencies->groups) > 0) {\n $this->log('found dependency groups');\n foreach ($this->_dependencies->groups as $group) {\n $this->log(\"adding [{$group->name}] :: [{$group->hint}]\");\n $package->addDependencyGroup($group->name, $group->hint);\n foreach ($group->packages as $sub_package) {\n $package->addGroupPackageDepWithChannel(\n 'subpackage', $group->name, $sub_package->name, $sub_package->channel, '0.0.1'\n );\n }\n }\n }\n if (count($this->_dependencies->packages) > 0) {\n $this->log('found dependencies');\n foreach ($this->_dependencies->packages as $dependency) {\n $this->log(\"adding following dependency: {$dependency->channel}/{$dependency->name}\");\n $package->addPackageDepWithChannel(\n $dependency->type, $dependency->name, $dependency->channel, $dependency->minimum_version, $dependency->maximum_version, $dependency->recommended_version, $dependency->exclude_version, $dependency->providesextension, $dependency->nodefault\n );\n }\n }\n\n if (count($this->_dependencies->extensions) > 0) {\n $this->log('adding extension dependencies');\n foreach ($this->_dependencies->extensions as $extension) {\n $this->log(\"adding ext dependency for: {$extension->name}\");\n $package->addExtensionDep(\n $extension->type, $extension->name, $extension->minimum_version, $extension->maximum_version, $extension->recommended_version, $extension->extension\n );\n }\n }\n }\n\n foreach ($this->_changelogs as $changelog) {\n $this->log(\"adding changelog for prior release [{$changelog->version}]\");\n $changelog->package = $package;\n $package->setChangelogEntry(\n $changelog->version, $changelog->toArray()\n );\n\n if (is_null($this->_notes) && $package->getVersion() == $changelog->version) {\n $this->log(\"no package notes specified, using changelog entry\");\n $this->_notes = $changelog->contents;\n }\n }\n\n foreach ($this->_replacements as $replacement) {\n $replacement->isValid();\n\n $this->log(\"adding replace from [{$replacement->from}] to [{$replacement->to}]\");\n $package->addReplacement(\n $replacement->path, $replacement->type, $replacement->from, $replacement->to\n );\n }\n\n foreach ($this->_releases as $release) {\n $this->log('adding new release');\n $package->addRelease();\n foreach ($release->install as $install) {\n $this->log(\"installing [{$install->name}] as [{$install->as}]\");\n $package->addInstallAs($install->name, $install->as);\n }\n }\n\n $notes = preg_replace(\"/^( {4}|\\t)+/m\", '', (string) $this->_notes);\n $package->setNotes($notes);\n\n\n $package->setLicense($this->_license->license, $this->_license->uri);\n $package->generateContents();\n $e = $package->writePackageFile();\n if (PEAR::isError($e)) {\n throw new PEARCraterTask_Exception(\n 'unable to write package.xml file: ' . $e->getMessage()\n );\n }\n }", "title": "" }, { "docid": "950fdf4e120318526566f63709fa3308", "score": "0.54585654", "text": "protected function makeFiles()\n {\n $list = $this->getBuffer()->getScriptFiles();\n\n $html = \"\";\n\n foreach ($list as $path) {\n if($path[LibsFinder::L_MAIN] === true ){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]);\n }\n }\n\n $this->replace('js_links', $html);\n }", "title": "" }, { "docid": "30daf07c93386012d77eedf186627d25", "score": "0.5444158", "text": "public function compile_core()\n{ \n\n // Load core package\n require_once(SITE_PATH . '/etc/core/package.php');\n $pkg = new \\apex\\pkg_core();\n\n // Create destination dir\n $destdir = sys_get_temp_dir() . '/apex';\n if (is_dir($destdir)) { io::remove_dir($destdir); }\n io::create_dir($destdir);\n\n // Go through external files\n foreach ($pkg->ext_files as $file) { \n\n // Copy directory\n if (preg_match(\"/^(.*?)\\/\\*$/\", $file, $match)) { \n io::create_dir(dirname(\"$destdir/\" . $match[1] . '.php'));\n system(\"cp -R \" . SITE_PATH . \"/$match[1]/ $destdir/$match[1]/\");\n continue;\n }\n\n // Check if file exists\n if (!file_exists(SITE_PATH . \"/$file\")) { \n throw new ApexException('error', \"The external file does not exist, {1}\", $file);\n }\n\n // Copy file as needed\n io::create_dir(dirname(\"$destdir/$file\"));\n copy(SITE_PATH . \"/$file\", \"$destdir/$file\");\n }\n\n // Create /storage/ directory\n io::create_dir(\"$destdir/storage/logs\");\n file_put_contents(\"$destdir/storage/logs/access.log\", '');\n\n // Go through components\n $components = array();\n $rows = db::query(\"SELECT * FROm internal_components WHERE owner = 'core' ORDER BY id\");\n foreach ($rows as $row) { \n\n // Get files\n $files = components::get_all_files($row['type'], $row['alias'], $row['package'], $row['parent']);\n $has_php = false;\n foreach ($files as $file) { \n if (preg_match(\"/\\.php$/\", $file)) { $has_php = true; }\n\n if (!file_exists(SITE_PATH . '/' . $file)) { continue; }\n io::create_dir(dirname(\"$destdir/$file\"));\n copy(SITE_PATH . '/' . $file, \"$destdir/$file\");\n }\n\n // Add to $components array\n if ($has_php === true) { \n $vars = array(\n 'order_num' => $row['order_num'],\n 'type' => $row['type'],\n 'package' => $row['package'],\n 'parent' => $row['parent'],\n 'alias' => $row['alias'],\n 'value' => $row['value']\n );\n array_push($components, $vars);\n }\n }\n file_put_contents(SITE_PATH .'/etc/core/components.json', json_encode($components));\n\n // Copy over package files\n $pkg_files = array('components.json', 'install.sql', 'reset.sql', 'remove.sql', 'package.php');\n foreach ($pkg_files as $file) { \n if (!file_exists(SITE_PATH . '/etc/core/' . $file)) { continue; }\n\n // Copy, if not package.php\n if ($file != 'package.php') { \n copy(SITE_PATH . '/etc/core/' . $file, $destdir . '/etc/core/' . $file);\n continue;\n }\n\n // Update version in package.php file\n $version = db::get_field(\"SELECT version FROM internal_packages WHERE alias = 'core'\");\n $text = str_replace(\"~version~\", $version, file_get_contents(SITE_PATH . '/etc/core/package.php'));\n file_put_contents($destdir . '/etc/core/package.php', $text);\n }\n\n // Save blank /etc/config.php file\n file_put_contents(\"$destdir/etc/config.php\", \"<?php\\n\\n\");\n\n // Create /docs directory\n $files = io::parse_dir(SITE_PATH . '/docs', false);\n foreach ($files as $file) { \n if (preg_match(\"/\\//\", $file)) { continue; }\n if (!preg_match(\"/\\.md$/\", $file)) { continue; }\n copy(SITE_PATH . \"/docs/$file\", \"$destdir/docs/$file\");\n }\n\n // Update GIthub repo\n $this->update_github_repo();\n\n // Return\n return $destdir;\n\n}", "title": "" }, { "docid": "a72d78193c9920658b92ffe3cea425a7", "score": "0.5442421", "text": "public function main()\n {\n if (! isset($this->file) and count($this->filesets) == 0) {\n throw new BuildException(\"Missing either a nested fileset or attribute 'file' set\");\n }\n \n // init the database\n \\BuyPlayTix\\DataBean\\DB::init(array(\n \"user\" => $this->userid,\n \"pass\" => $this->password,\n \"dsn\" => $this->url\n ));\n \n $this->dbh = new PDO($this->url, $this->userid, $this->password);\n \n if ($this->file instanceof PhingFile) {\n $this->load($this->file->getPath());\n } else { // process filesets\n $project = $this->getProject();\n foreach ($this->filesets as $fs) {\n $ds = $fs->getDirectoryScanner($project);\n $files = $ds->getIncludedFiles();\n $dir = $fs->getDir($this->project)->getPath();\n foreach ($files as $file) {\n $this->load($dir . DIRECTORY_SEPARATOR . $file);\n }\n }\n }\n $this->build();\n }", "title": "" }, { "docid": "e4741710d31325c1f37e2f2a48eb68cb", "score": "0.54419094", "text": "function execute() {\n\t\tif ( file_exists( $this->buildDir ) ) {\n\t\t\t$this->runCmd( 'rm', '-rf', '--', $this->buildDir );\n\t\t}\n\t\tif ( !mkdir( $this->buildDir ) ) {\n\t\t\t$this->croak( \"Unable to create build directory {$this->buildDir}\" );\n\t\t}\n\t\t$this->chdir( $this->buildDir );\n\n\t\t# Check out the parent directory of the target branch\n\t\t$this->runCmd( 'svn', 'co', '--depth=empty', '--quiet', $this->destBaseUrl, 'wmf' );\n\n\t\t$this->chdir( 'wmf' );\n\n\n\t\t# Copy in phase3\n\t\t$destRel = $this->newVersion;\n\t\t$this->runCmd( 'svn', 'cp', '--quiet', \"{$this->mainSourceUrl}/phase3\", $destRel );\n\n\n\t\t# Delete extensions/README\n\t\t$this->runCmd( 'svn', 'rm', '--quiet', \"$destRel/extensions/README\" );\n\n\t\t# Add normal extensions\n\t\tforeach ( $this->normalExtensions as $name ) {\n\t\t\t$this->runCmd( 'svn', 'cp', '--ignore-externals', '--quiet',\n\t\t\t\t\"{$this->mainSourceUrl}/extensions/$name\",\n\t\t\t\t\"$destRel/extensions/$name\" );\n\t\t}\n\n\t\t# Add special extensions\n\t\tforeach ( $this->specialExtensions as $name => $sourceUrl ) {\n\t\t\t$this->runCmd( 'svn', 'cp', '--ignore-externals', '--quiet',\n\t\t\t\t$sourceUrl,\n\t\t\t\t\"$destRel/extensions/$name\" );\n\t\t}\n\n\t\t# Copy in preserved items\n\t\tforeach ( $this->preservedItems as $item ) {\n\t\t\t$this->runCmd( 'svn', 'cp', '--quiet',\n\t\t\t\t\"{$this->destBaseUrl}/{$this->oldVersion}/$item\",\n\t\t\t\tdirname( \"$destRel/$item\" ) );\n\t\t}\n\n\t\t# Do intermediate commit\n\t\t$this->runWriteCmd( 'svn', 'ci', '-q', '-m', \"Creating new WMF branch\" );\n\n\t\t# Fix $wgVersion\n\t\t$this->fixVersion( \"$destRel/includes/DefaultSettings.php\" );\n\n\t\t# Apply patches\n\t\tforeach ( $this->patches as $patch ) {\n\t\t\t$this->runCmd( 'svn', 'merge', '-q', '-c', $patch['rev'], $patch['base'], $destRel );\n\t\t}\n\n\t\t# Remove unwanted externals\n\t\tforeach ( $this->unwantedExternals as $external ) {\n\t\t\t$this->runCmd( 'svn', 'propdel', '-q', 'svn:externals', \"$destRel/$external\" );\n\t\t}\n\n\t\t# Do the final commit\n\t\t$this->runWriteCmd( 'svn', 'ci', '-q', '-m', \n\t\t\t'Applied local patches for new WMF branch' );\n\t}", "title": "" }, { "docid": "785cc7f3f0d21cffdcaba3e35db75b0a", "score": "0.54370743", "text": "function copy_raw_push_package_files($package_dir, $raw_files) {\n mkdir($package_dir . '/icon.iconset');\n foreach ($raw_files as $raw_file) {\n copy(\"Package_Push.raw/$raw_file\", \"$package_dir/$raw_file\");\n }\n}", "title": "" }, { "docid": "ec7e562bb35f87df9d00c62e8c3f1898", "score": "0.542225", "text": "public function prepare()\n {\n\n // prepare the directories\n return $this->taskFileSystemStack()\n ->mkdir($this->properties['dist.dir'])\n ->mkdir($this->properties['target.dir'])\n ->mkdir(sprintf('%s/reports', $this->properties['target.dir']))\n ->run();\n }", "title": "" }, { "docid": "98f7ed79d2f89879f171d7ca2c1ae332", "score": "0.54062873", "text": "protected function rebuild()\n {\n $this->translationFiles = array();\n /* @var $appInformation DAppInformation */\n $appInformation = $this->getDependency(DAppInformation::class);\n $apps = $appInformation->getApps();\n foreach ($apps as $app) {\n /* @var $app DApp */\n $path = $app->getAbsolutePath() . '_translations/';\n if (is_dir($path)) {\n $iterator = DFileIterator::getIterator($path);\n foreach ($iterator as $file) {\n /* @var $file SplFileInfo */\n $relativePath = str_replace(DECIBEL_PATH, '', $file->getPathname());\n $this->translationFiles[ $file->getFilename() ][] = $relativePath;\n }\n }\n }\n }", "title": "" }, { "docid": "f868b2136f90ccbeae3f9162dba8eafd", "score": "0.53893876", "text": "private function backupDeployerFiles()\n {\n if (!file_exists($this->backupPath)) {\n mkdir($this->backupPath, 0777);\n }\n\n $excludes = $this->exclude;\n\n array_push(\n $excludes,\n __ROOT_DIRECTORY__ . '/vendor'\n );\n\n r_copy(__ROOT_DIRECTORY__, $this->backupPath, $excludes);\n r_rmdir(__ROOT_DIRECTORY__, $this->exclude);\n }", "title": "" }, { "docid": "7fb12bbf994be46f8330b1bfc45e21f7", "score": "0.5373782", "text": "protected function _copySkeleton()\n {\n $this->_source = dirname(ROOT) . DS . 'ThePhpLeague' . DS . 'skeleton';\n $this->_destination = dirname(ROOT) . DS . 'Packages' . DS . 'Plain' . DS . $this->params['directory'];\n $folder = new Folder();\n $folder->copy([\n 'to' => $this->_destination,\n 'from' => $this->_source,\n 'mode' => 0755,\n 'skip' => ['.git', '.gitattributes', '.gitignore'],\n 'scheme' => Folder::SKIP,\n ]);\n }", "title": "" }, { "docid": "ce9501fc4becbf7df69e7819f4078265", "score": "0.53645635", "text": "protected function processPackage(Package $package)\n {\n $files = $package->getFiles();\n $this->originalFiles[$package->getPrettyName()] = $files;\n\n if (!empty($files)) {\n $this->addFiles($package, $files);\n }\n if ($package->isRoot()) {\n $this->rootPackage = $package;\n $this->loadDotEnv($package);\n $devFiles = $package->getDevFiles();\n if (!empty($devFiles)) {\n $this->addFiles($package, $devFiles);\n }\n $this->outputDir = $package->getOutputDir();\n $alternatives = $package->getAlternatives();\n if (is_string($alternatives)) {\n $this->alternatives = $this->readConfig($package, $alternatives);\n } elseif (is_array($alternatives)) {\n $this->alternatives = $alternatives;\n } elseif (!empty($alternatives)) {\n throw new BadConfigurationException('alternatives must be array or path to configuration file');\n }\n }\n\n $aliases = $package->collectAliases();\n\n $this->builder->mergeAliases($aliases);\n $this->builder->setPackage($package->getPrettyName(), array_filter([\n 'name' => $package->getPrettyName(),\n 'version' => $package->getVersion(),\n 'reference' => $package->getSourceReference() ?: $package->getDistReference(),\n 'aliases' => $aliases,\n ]));\n }", "title": "" }, { "docid": "d6bdc95ae5a2b5d01a35366444ac12fe", "score": "0.535277", "text": "public static function rebuild() {\n global $CRITICALI_ROOT;\n CriticalI_RepositoryLock::write_lock();\n \n $data = array('packages'=>array(), 'directories'=>array(), 'commands'=>array());\n \n $dh = opendir($CRITICALI_ROOT);\n if ($dh === false)\n throw new Exception(\"Cannot access criticali root directory \\\"$CRITICALI_ROOT\\\"\");\n \n while (($filename = readdir($dh)) !== false) {\n try {\n if ($filename == '.' || $filename == '..') continue;\n $path = \"$CRITICALI_ROOT/$filename\";\n if (!is_dir($path)) continue;\n if (!file_exists(\"$path/package.ini\")) continue;\n \n $pkg = new CriticalI_Package_Directory($filename, $path);\n $name = $pkg->name();\n $version = $pkg->version();\n \n if (isset($data['packages'][$name]))\n $data['packages'][$name] = self::add_version_to_list($data['packages'][$name], $version);\n else\n $data['packages'][$name] = $version;\n $data['directories'][\"$name-$version\"] = $filename;\n if ($pkg->has_commands()) {\n if (isset($data['commands'][$name]))\n $data['commands'][$name] = self::add_version_to_list($data['commands'][$name], $version);\n else\n $data['commands'][$name] = $version;\n }\n \n } catch (Exception $e) {\n fwrite(STDERR, \"Caught exception \".get_class($e).\": \".$e->getMessage().\"\\nIgnoring package \\\"$filename\\\".\");\n }\n }\n \n closedir($dh);\n \n CriticalI_ConfigFile::write(\"$CRITICALI_ROOT/.packages\", $data);\n \n self::$list = new CriticalI_Package_List();\n }", "title": "" }, { "docid": "7fa386ed049e7bdcae3bf2fb709142e0", "score": "0.53437656", "text": "private static function addfiles(){\n self::include_file('wp-ci-assets');\n self::include_file('wp-ci-db-connect');\n self::include_file('wp-ci-builtin');\n self::include_file('wp-ci-template');\n self::include_file('wp-ci-page-template');\n }", "title": "" }, { "docid": "10bc2f72e0f85a908ad89c13a4e84d9b", "score": "0.53272116", "text": "function k_js_package($src, $dest, array $includes = array (), array $options = array ()) {\n k_log_indent(\"Packaging JS from $src to $dest\");\n \n $src = k_absolute_path($src);\n $abs_dest = k_absolute_path($dest);\n \n // create the target path\n k_setup_dir($dest);\n \n $args = array ();\n foreach ($includes as $path) {\n $args[] = '-I';\n $args[] = escapeshellarg(k_absolute_path($path));\n }\n \n if (!empty ($options['asset_root'])) {\n $args[] = '--asset-root=' . escapeshellarg(k_absolute_path($options['asset_root']));\n }\n \n foreach (glob(\"{$src}/*.js\") as $package) {\n // package the file\n $package_name = basename($package);\n k_log_indent(\"Packaging {$package_name}\");\n $combined_path = \"{$abs_dest}/{$package_name}\";\n $temp_path = $combined_path . '.TEMP';\n $package_args = array_merge($args, array ($package, '>', $temp_path));\n k_shell_cmd('sprocketize ' . implode(' ', $package_args));\n \n // update it only if necessary\n if (!file_exists($combined_path) || md5_file($temp_path) != md5_file($combined_path)) {\n rename($temp_path, $combined_path);\n k_log(\"Package {$package_name} updated\");\n } else {\n unlink($temp_path);\n }\n \n // store metadata\n k_metadata_add('js', $package_name, array (\n 'path' => \"{$dest}/{$package_name}\",\n 'timestamp' => filemtime($combined_path),\n ));\n \n k_log_unindent();\n }\n k_log_unindent();\n}", "title": "" }, { "docid": "e78a2b92b1303aa51c45524edabe8e82", "score": "0.5325166", "text": "private function process_files() {\n\t\t\n\t\tforeach ( $this->files as $i=>$entry ) {\n\t\t\t\n\t\t\tif ( is_array($entry) ) {\n\t\t\t\t$dest \t= array_keys($entry);\n\t\t\t\t$dest\t= $dest[0];\n\t\t\t\t\n\t\t\t\t$source = $entry[$dest];\n\t\t\t\t$dest\t= $this->dest . $dest;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$source = $this->source . $entry;\n\t\t\t\t$dest\t= $this->dest . $entry;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Exclude a file by part of it's detination path\n\t\t\tif ( $this->is_skip_file_path($dest) ) continue;\n\t\t\t\n\t\t\t// SYNCRONIZATION MODE:\n\t\t\t// does not override files who didn't changed since last syncronization\n\t\t\tif ( $this->sync === 'sync' && $this->exists($dest) ) {\n\t\t\t\t\n\t\t\t\tif ( !( filemtime($source) > filemtime($dest) ) ) {\t\t\t\t\n\t\t\t\t\tdebug(\"SKIP SYNC: \" . $dest );\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Process file throught proper object\n\t\t\techo '. '; flush();\n\t\t\t$action = new $this->FileProcessor( $source, $dest, $this->file_uglify_level( $dest ) );\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "42cf75f0db80272b5af9e202ca8056cc", "score": "0.53213656", "text": "public function createProjectFiles($project)\n\t{\n\n\t\t/**\n\t\t * project.c\n\t\t */\n\t\t$content = file_get_contents(__DIR__ . '/../templates/project.c');\n\t\tif (empty($content)) {\n\t\t\tthrow new Exception(\"Template project.c doesn't exist\");\n\t\t}\n\n\t\t$files = $this->_files;\n\n\t\t/**\n\t\t * Round 1. Calculate the dependency rank\n\t\t * Classes are ordered according to a dependency ranking\n\t\t * Classes that are dependencies of classes that are dependency of other classes\n\t\t * have more weight\n\t\t */\n\t\tforeach ($files as $file) {\n\t\t\t$classDefinition = $file->getClassDefinition();\n\t\t\tif ($classDefinition) {\n\t\t\t\t$classDefinition->calculateDependencyRank();\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Round 1.5 Make a second pass to ensure classes will have the correct weight\n\t\t */\n\t\tforeach ($files as $file) {\n\t\t\t$classDefinition = $file->getClassDefinition();\n\t\t\tif ($classDefinition) {\n\t\t\t\t$classDefinition->calculateDependencyRank();\n\t\t\t}\n\t\t}\n\n\t\t$classEntries = array();\n\t\t$classInits = array();\n\n\t\t$interfaceEntries = array();\n\t\t$interfaceInits = array();\n\n\t\t/**\n\t\t * Round 2. Generate the ZEPHIR_INIT calls according to the dependency rank\n\t\t */\n\t\tforeach ($files as $file) {\n\t\t\t$classDefinition = $file->getClassDefinition();\n\t\t\tif ($classDefinition) {\n\t\t\t\t$dependencyRank = $classDefinition->getDependencyRank();\n\t\t\t\tif ($classDefinition->getType() == 'class') {\n\t\t\t\t\tif (!isset($classInits[$dependencyRank])) {\n\t\t\t\t\t\t$classEntries[$dependencyRank] = array();\n\t\t\t\t\t\t$classInits[$dependencyRank] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$classEntries[$dependencyRank][] = 'zend_class_entry *' . $classDefinition->getClassEntry() . ';';\n\t\t\t\t\t$classInits[$dependencyRank][] = 'ZEPHIR_INIT(' . $classDefinition->getCNamespace() . '_' . $classDefinition->getName() . ');';\n\t\t\t\t} else {\n\t\t\t\t\tif (!isset($interfaceInits[$dependencyRank])) {\n\t\t\t\t\t\t$interfaceEntries[$dependencyRank] = array();\n\t\t\t\t\t\t$interfaceInits[$dependencyRank] = array();\n\t\t\t\t\t}\n\t\t\t\t\t$interfaceEntries[$dependencyRank][] = 'zend_class_entry *' . $classDefinition->getClassEntry() . ';';\n\t\t\t\t\t$interfaceInits[$dependencyRank][] = 'ZEPHIR_INIT(' . $classDefinition->getCNamespace() . '_' . $classDefinition->getName() . ');';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tkrsort($classInits);\n\t\tkrsort($classEntries);\n\t\tkrsort($interfaceInits);\n\t\tkrsort($interfaceEntries);\n\n\t\t$completeInterfaceInits = array();\n\t\tforeach ($interfaceInits as $dependencyRank => $rankInterfaceInits) {\n\t\t\tasort($rankInterfaceInits, SORT_STRING);\n\t\t\t$completeInterfaceInits = array_merge($completeInterfaceInits, $rankInterfaceInits);\n\t\t}\n\n\t\t$completeInterfaceEntries = array();\n\t\tforeach ($interfaceEntries as $dependencyRank => $rankInterfaceEntries) {\n\t\t\tasort($rankInterfaceEntries, SORT_STRING);\n\t\t\t$completeInterfaceEntries = array_merge($completeInterfaceEntries, $rankInterfaceEntries);\n\t\t}\n\n\t\t$completeClassInits = array();\n\t\tforeach ($classInits as $dependencyRank => $rankClassInits) {\n\t\t\tasort($rankClassInits, SORT_STRING);\n\t\t\t$completeClassInits = array_merge($completeClassInits, $rankClassInits);\n\t\t}\n\n\t\t$completeClassEntries = array();\n\t\tforeach ($classEntries as $dependencyRank => $rankClassEntries) {\n\t\t\tasort($rankClassEntries, SORT_STRING);\n\t\t\t$completeClassEntries = array_merge($completeClassEntries, $rankClassEntries);\n\t\t}\n\n\t\t$toReplace = array(\n\t\t\t'%PROJECT_LOWER%' \t\t=> strtolower($project),\n\t\t\t'%PROJECT_UPPER%' \t\t=> strtoupper($project),\n\t\t\t'%PROJECT_CAMELIZE%' \t=> ucfirst($project),\n\t\t\t'%CLASS_ENTRIES%' \t\t=> implode(PHP_EOL, array_merge($completeInterfaceEntries, $completeClassEntries)),\n\t\t\t'%CLASS_INITS%'\t\t\t=> implode(PHP_EOL . \"\\t\", array_merge($completeInterfaceInits, $completeClassInits)),\n\t\t);\n\n\t\tforeach ($toReplace as $mark => $replace) {\n\t\t\t$content = str_replace($mark, $replace, $content);\n\t\t}\n\n\t\t/**\n\t\t * Round 3. Generate and place the entry point of the project\n\t\t */\n\t\tfile_put_contents('ext/' . $project . '.c', $content);\n\t\tunset($content);\n\n\t\t/**\n\t\t * Round 4. Generate the project main header\n\t\t */\n\t\t$content = file_get_contents(__DIR__ . '/../templates/project.h');\n\t\tif (empty($content)) {\n\t\t\tthrow new Exception(\"Template project.h doesn't exists\");\n\t\t}\n\n\t\t$includeHeaders = array();\n\t\tforeach ($this->_compiledFiles as $file) {\n\t\t\tif ($file) {\n\t\t\t\t$fileH = str_replace(\".c\", \".h\", $file);\n\t\t\t\t$include = '#include \"' . $fileH . '\"';\n\t\t\t\t$includeHeaders[] = $include;\n\t\t\t}\n\t\t}\n\n\t\t$toReplace = array(\n\t\t\t'%INCLUDE_HEADERS%' => implode(PHP_EOL, $includeHeaders)\n\t\t);\n\n\t\tforeach ($toReplace as $mark => $replace) {\n\t\t\t$content = str_replace($mark, $replace, $content);\n\t\t}\n\n\t\tfile_put_contents('ext/' . $project . '.h', $content);\n\n\t\t/**\n\t\t * Round 5. Create php_project.h\n\t\t */\n\t\t$content = file_get_contents(__DIR__ . '/../templates/php_project.h');\n\t\tif (empty($content)) {\n\t\t\tthrow new Exception(\"Template php_project.h doesn't exist\");\n\t\t}\n\n\t\t$toReplace = array(\n\t\t\t'%PROJECT_LOWER%' \t\t=> strtolower($project),\n\t\t\t'%PROJECT_UPPER%' \t\t=> strtoupper($project),\n\t\t\t'%PROJECT_EXTNAME%' \t=> strtolower($project),\n\t\t\t'%PROJECT_VERSION%' \t=> '0.0.1'\n\t\t);\n\n\t\tforeach ($toReplace as $mark => $replace) {\n\t\t\t$content = str_replace($mark, $replace, $content);\n\t\t}\n\n\t\tfile_put_contents('ext/php_' . $project . '.h', $content);\n\n\t}", "title": "" }, { "docid": "c3c27215fcaaef37a1d5ac7db1160daa", "score": "0.53011644", "text": "public function materialize()\n {\n //Define filename of output\n $this->disk = 'resources';\n $this->targetFile = ucfirst($this->modelName) . 'Resource.php';\n\n parent::materialize();\n }", "title": "" }, { "docid": "d82b2b4856fd8a18e066c7ec72be7e98", "score": "0.5300601", "text": "function copy_loop($start_path, $final_path){\n\n global $xerte_toolkits_site;\n\n if (!file_exists($final_path)) {\n mkdir($final_path, 0777, true);\n }\n\n $d = opendir($start_path);\n\n while($f = readdir($d)){\n\n if(is_dir($start_path . $f)){\n\n if(($f!=\".\")&&($f!=\"..\")){\n\n copy_loop($start_path . $f . \"/\", $final_path . $f . \"/\");\n\n }\t\t\t\n\n }else{\n $ok = copy($start_path . $f, $final_path . $f);\n /*\n $data = file_get_contents($start_path . $f);\n\n $fh = fopen($final_path . $f, \"w\");\n\n fwrite($fh,$data);\n\n fclose($fh);\n */\n }\n\n }\t\n\n closedir($d);\n\n}", "title": "" }, { "docid": "f7773a6598bc796539b48b4f899013d1", "score": "0.5285536", "text": "static private function load_files() {\n\n\t\t\t/* Classes */\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-filesystem.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-pointers.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-posts.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-admin-settings.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ajax.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ajax-layout.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-art.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-auto-suggest.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-color.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-css.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-export.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-extensions.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-fonts.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-debug.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-usage.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-icons.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-iframe-preview.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-import.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-loop.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-model.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-module.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-photo.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-revisions.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-services.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-compat.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-shortcodes.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-timezones.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ui-content-panel.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-ui-settings-forms.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-notifications.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-update.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-access.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-user-settings.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-utils.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpml.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-privacy.php';\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-settings-presets.php';\n\n\t\t\t/* WP CLI Commands */\n\t\t\tif ( defined( 'WP_CLI' ) ) {\n\t\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wpcli-command.php';\n\t\t\t}\n\n\t\t\t/* WP Blocks Support */\n\t\t\trequire_once FL_BUILDER_DIR . 'classes/class-fl-builder-wp-blocks.php';\n\n\t\t\t/* Includes */\n\t\t\trequire_once FL_BUILDER_DIR . 'includes/compatibility.php';\n\n\t\t\t/* Updater */\n\t\t\tif ( file_exists( FL_BUILDER_DIR . 'includes/updater/updater.php' ) ) {\n\t\t\t\trequire_once FL_BUILDER_DIR . 'includes/updater/updater.php';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "45ccb1db38e8ed901c95690a0dbb4aca", "score": "0.52793986", "text": "protected function prepareResources()\n {\n $config = realpath(__DIR__.'/../../config/config.php');\n\n $this->mergeConfigFrom($config, 'sanatorium-shop');\n\n $this->publishes([\n $config => config_path('sanatorium-shop.php'),\n ], 'config');\n }", "title": "" }, { "docid": "fb8793e17c5570afdf44c59a59198d15", "score": "0.5273911", "text": "protected function setUp()\n {\n $this->object = new Util_File;\n $this->_path = $root = str_replace('/application', '', APPLICATION_PATH) . '/';\n \n $files = $this->providerFiles();\n foreach($files as $row) {\n \t\n \t$dir = @explode('/', $row[0]);\n \t$last = count($dir) - 1;\n \t$name = $dir[$last];\n \tunset($dir[$last]);\n \t$dir = @implode('/', $dir);\n \t\n \t@mkdir($this->_path . $dir);\n \t$file = $this->_path . $row[0];\n \t\n \t$rs = file_put_contents($file, $row[1]);\n }\n }", "title": "" }, { "docid": "ec7de1ab44d9a1462297147cf690f6cc", "score": "0.52711695", "text": "function generateSource() \n {\n // generate source and header files\n $this->writeHeaderFile();\n $this->writeCodeFile();\n\n // generate .cvsignore file entries\n $this->writeDotCvsignore();\n\n // generate EXPERIMENTAL file for unstable release states\n $this->writeExperimental();\n \n // generate LICENSE file if license given\n if ($this->license) {\n $this->license->writeToFile($this->dirpath.\"/COPYING\");\n $this->files['doc'][] = \"COPYING\";\n }\n }", "title": "" }, { "docid": "a4bf78c52452a481b9cf929bc13a51fd", "score": "0.5263014", "text": "protected function setUp()\n {\n $this->filesystem = new \\Composer\\Util\\Filesystem();\n $tmpDir = $this->replaceSlashes(sys_get_temp_dir());\n $this->sourceDir = sprintf('%s/%s/module_dir', $tmpDir, $this->getName());\n $this->destDir = sprintf('%s/%s/magento_dir', $tmpDir, $this->getName());\n $this->filesystem->ensureDirectoryExists($this->sourceDir);\n $this->filesystem->ensureDirectoryExists($this->destDir);\n\n $this->strategy = $this->getTestDeployStrategy($this->sourceDir, $this->destDir);\n }", "title": "" }, { "docid": "6e020f21c66543ee3f01c10e339908a6", "score": "0.52619475", "text": "protected function prepareResources()\n {\n $config = realpath(__DIR__.'/../../config/config.php');\n\n $this->mergeConfigFrom($config, 'sanatorium-inputs');\n\n $this->publishes([\n $config => config_path('sanatorium-inputs.php'),\n ], 'config');\n }", "title": "" }, { "docid": "f9957ee929fe66c7f95b0125ecd50c0b", "score": "0.5258641", "text": "protected function initDirectories() {\n $this->makeDirectory($this->paths['library']);\n $this->makeDirectory($this->paths['library'] . $this->paths['generated']);\n $this->makeDirectory($this->paths['application']);\n $this->makeDirectory($this->paths['application'] . $this->paths['modules']);\n }", "title": "" }, { "docid": "2a778b434c9ad7424420bd8d6b59065c", "score": "0.5254425", "text": "public function scaffoldTransformFiles()\n {\n\n $transformerClassName = $this->className.'Transformer';\n\n $filePath = $this->resourcePath.'/Http/Transformers/'.$transformerClassName.'.php';\n\n $this->files->put($filePath, $this->buildClass($transformerClassName, 'transformer'));\n }", "title": "" }, { "docid": "dc4cdf67182daf2b6df5cb54611b5a93", "score": "0.52502", "text": "protected function prepare() {\n Artisan::call('config:clear');\n Artisan::call('route:clear');\n foreach(Storage::disk('base')->files('app/Updates') as $filename) {\n array_push($this->versions, str_replace(array(\n 'app/Updates/',\n '.php'\n ), '', $filename));\n }\n }", "title": "" }, { "docid": "6f02cf3c161b1fff586f8da6356faad6", "score": "0.52485275", "text": "public function buildAutoloadInformationFiles() {}", "title": "" }, { "docid": "da33c62b3eac53c4c1e9435682609d62", "score": "0.5246232", "text": "private function get_files() {\n\n\t\trequire_once( LIMECUDA_STAFF_GENESIS_PLUGIN_DIR . 'src/class-plugin-assets.php' );\n\t\trequire_once( LIMECUDA_STAFF_GENESIS_PLUGIN_DIR . 'src/class-custom-content.php' );\n\t\trequire_once( LIMECUDA_STAFF_GENESIS_PLUGIN_DIR . 'src/includes/acf-meta.php' );\n\n\t\trequire_once( LIMECUDA_STAFF_GENESIS_PLUGIN_DIR . 'src/includes/functions/general.php' );\n\t\trequire_once( LIMECUDA_STAFF_GENESIS_PLUGIN_DIR . 'src/class-template-adjustments.php' );\n\n\t}", "title": "" }, { "docid": "eef3da19b1b1ea0c6431a1a718adb05c", "score": "0.5234522", "text": "public function prepare($buildDir, LocalApplication $app, Config $config, array $settings = []);", "title": "" }, { "docid": "d63b94f29bd400105b2da27af6541c2e", "score": "0.52256274", "text": "protected function prepareResources()\n {\n // Publish our views\n $this->loadViewsFrom(base_path(\"resources/views\"), 'base');\n $this->publishes([\n __DIR__ . '/views' => base_path(\"resources/views\")\n ]);\n\n // Publish our lang\n $this->publishes([\n __DIR__ . '/lang' => base_path(\"resources/lang\")\n ], 'migrations');\n\n // Publish our migrations\n $this->publishes([\n __DIR__ . '/migrations' => base_path(\"database/migrations\")\n ], 'migrations');\n\n // Publish a config file\n $this->publishes([\n __DIR__ . '/config' => base_path('/config')\n ], 'config');\n\n // Publish our routes\n $this->publishes([\n __DIR__ . '/routes.php' => base_path(\"app/Http/blog_routes.php\")\n ], 'routes');\n\n // Include the routes file\n if(file_exists(base_path(\"app/Http/blog_routes.php\")))\n include base_path(\"app/Http/blog_routes.php\");\n }", "title": "" }, { "docid": "2c41f7aaa7ecd087c431d30979dfcfb3", "score": "0.52235955", "text": "public function main()\n {\n $this->loadDependencies();\n\n if (!isset($this->file) && count($this->filesets) == 0) {\n throw new BuildException('Missing either a nested fileset or attribute \"file\" set');\n }\n\n if (count($this->formatters) == 0) {\n // turn legacy format attribute into formatter\n $fmt = new PHPCPDFormatterElement($this);\n $fmt->setType($this->format);\n $fmt->setUseFile(false);\n\n $this->formatters[] = $fmt;\n }\n\n $this->validateFormatters();\n\n $filesToParse = array();\n\n if ($this->file instanceof PhingFile) {\n $filesToParse[] = $this->file->getPath();\n } else {\n // append any files in filesets\n foreach ($this->filesets as $fs) {\n $files = $fs->getDirectoryScanner($this->project)->getIncludedFiles();\n\n foreach ($files as $filename) {\n $f = new PhingFile($fs->getDir($this->project), $filename);\n $filesToParse[] = $f->getAbsolutePath();\n }\n }\n }\n\n $this->log('Processing files...');\n\n if ($this->oldVersion) {\n $detectorClass = 'PHPCPD_Detector';\n $strategyClass = 'PHPCPD_Detector_Strategy_Default';\n } else {\n $detectorClass = '\\\\SebastianBergmann\\\\PHPCPD\\\\Detector\\\\Detector';\n $strategyClass = '\\\\SebastianBergmann\\\\PHPCPD\\\\Detector\\\\Strategy\\\\DefaultStrategy';\n }\n\n $detector = new $detectorClass(new $strategyClass());\n $clones = $detector->copyPasteDetection(\n $filesToParse,\n $this->minLines,\n $this->minTokens,\n $this->fuzzy\n );\n\n $this->log('Finished copy/paste detection');\n\n foreach ($this->formatters as $fe) {\n $formatter = $fe->getFormatter();\n $formatter->processClones(\n $clones,\n $this->project,\n $fe->getUseFile(),\n $fe->getOutfile()\n );\n }\n }", "title": "" }, { "docid": "2d5e8f38d867c9f2d49e04621fa5d730", "score": "0.52202487", "text": "public function copyAssets() {\n $this->core->component('file')->copyFolder('themes/' . $this->core->setting('theme') . '/assets/', 'public/assets/');\n }", "title": "" }, { "docid": "d0d4d1e4923e32d532319b42cd7f7967", "score": "0.5217061", "text": "private function init_files() {\n\t\tforeach ( $this->files as $file ) {\n\t\t\tparent::require_file( CODEXIN_CORE_INC_DIR . \"$file.php\" );\n\t\t}\n\t}", "title": "" }, { "docid": "45ff4bb4cb4b5537f3a1436abaef83e7", "score": "0.5207677", "text": "public function buildAll($force = true)\n\t{\n\t\t$this->force_update = $force;\n\t\t\n\t\t$packages = array_keys(Current::$config->get('js'));\n\t\t\n\t\t$this->packageForProduction($packages);\n\t\tarray_walk($packages, array($this, 'buildPackage'));\n\t}", "title": "" }, { "docid": "6a714fc07c4f2a38b65c0fe162b05385", "score": "0.5206716", "text": "protected function setUp() {\n $this->generatePaths();\n\n $core_code = <<<EOS\n<?php\nnamespace Core;\nclass $this->core {\n}\nEOS;\n\n $component_code = <<<EOS\n<?php\nnamespace $this->package;\nclass $this->component extends \\Core\\Component {\n function run() {}\n}\nEOS;\n\n @mkdir($this->paths['component_dir'], 0777, TRUE);\n file_put_contents($this->paths['core_file'], $core_code);\n file_put_contents($this->paths['component_file'], $component_code);\n }", "title": "" }, { "docid": "a36f753f5930c8cb9c291a71d41f1be0", "score": "0.5204295", "text": "private function syncSuites()\n\t{\n\t\t$this->sourceSuites = $this->getSuites($this->sourceProject);\n\t\t$this->destinationSuites = $this->getSuites($this->destinationProject);\n\n\t\t$this->deleteOrphanedSuites();\n\t\t$this->matchSuites();\n\t\t$this->copySuites();\n\t}", "title": "" }, { "docid": "f9b81e0497f74abd3fbfb3f01066ee20", "score": "0.5195053", "text": "protected function copyStubs(): void\n {\n $this->files->copyDirectory(__DIR__ . '/stubs/support', $this->cypressPath('support'));\n $this->files->copyDirectory(__DIR__ . '/stubs/plugins', $this->cypressPath('plugins'));\n\n $this->lineBreak();\n\n $this->status('Updated', $this->cypressPath('support/index.js', false));\n $this->status('Updated', $this->cypressPath('plugins/index.js', false));\n $this->status('Created', $this->cypressPath('plugins/swap-env.js', false));\n $this->status('Created', $this->cypressPath('support/laravel-commands.js', false));\n $this->status('Created', $this->cypressPath('support/laravel-routes.js', false));\n $this->status('Created', $this->cypressPath('support/assertions.js', false));\n $this->status('Created', $this->cypressPath('support/index.d.ts', false));\n\n $this->createCypressConfig();\n\n if (!$this->files->exists($path = base_path('.env.cypress'))) {\n $this->files->copy(base_path('.env'), $path);\n\n $this->status('Created', '.env.cypress');\n }\n\n $this->lineBreak();\n }", "title": "" }, { "docid": "fbacbcf9171865258752bf0d340fa8c8", "score": "0.5187025", "text": "public function providerCopyStyles()\n {\n $package = array(\n 'name' => 'components/package',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'styles' => array(\n 'tests/ComponentInstaller/Test/Resources/test.css',\n ),\n ),\n ),\n );\n $packages = array($package);\n $tests[] = array($packages, array(\n 'package/tests/ComponentInstaller/Test/Resources/test.css',\n ));\n\n // Test collecting two styles.\n $package = array(\n 'name' => 'components/packagewithtwostyles',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'styles' => array(\n 'tests/ComponentInstaller/Test/Resources/test.css',\n 'tests/ComponentInstaller/Test/Resources/test2.css',\n ),\n ),\n ),\n );\n $packages = array($package);\n $tests[] = array($packages, array(\n 'packagewithtwostyles/tests/ComponentInstaller/Test/Resources/test.css',\n 'packagewithtwostyles/tests/ComponentInstaller/Test/Resources/test2.css',\n ));\n\n // Test collecting a style that doesn't exist.\n $package = array(\n 'name' => 'components/stylethatdoesnotexist',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'styles' => array(\n 'tests/ComponentInstaller/Test/Resources/test.css',\n 'tests/ComponentInstaller/Test/Resources/test-not-found.css',\n ),\n ),\n ),\n );\n $packages = array($package);\n $tests[] = array($packages, array(\n 'stylethatdoesnotexist/tests/ComponentInstaller/Test/Resources/test.css',\n ));\n\n // Test collecting all styles, files and scripts.\n $package = array(\n 'name' => 'components/allassets',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'styles' => array(\n 'tests/ComponentInstaller/Test/Resources/test.css',\n ),\n 'files' => array(\n 'tests/ComponentInstaller/Test/Resources/img.jpg',\n 'tests/ComponentInstaller/Test/Resources/img2.jpg',\n ),\n 'scripts' => array(\n 'tests/ComponentInstaller/Test/Resources/test.js'\n ),\n ),\n ),\n );\n $packages = array($package);\n $tests[] = array($packages, array(\n 'allassets/tests/ComponentInstaller/Test/Resources/test.css',\n 'allassets/tests/ComponentInstaller/Test/Resources/img.jpg',\n 'allassets/tests/ComponentInstaller/Test/Resources/img2.jpg',\n 'allassets/tests/ComponentInstaller/Test/Resources/test.js',\n ));\n\n // Test copying a different component name.\n $package = array(\n 'name' => 'components/differentcomponentname',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'name' => 'diffname',\n 'files' => array(\n 'tests/ComponentInstaller/Test/Resources/img.jpg',\n ),\n ),\n ),\n );\n $packages = array($package);\n $tests[] = array($packages, array(\n 'diffname/tests/ComponentInstaller/Test/Resources/img.jpg',\n ));\n\n // Test two different packages.\n $package = array(\n 'name' => 'components/twopackages1',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'files' => array(\n 'tests/ComponentInstaller/Test/Resources/img.jpg',\n ),\n ),\n ),\n );\n $package2 = array(\n 'name' => 'components/twopackages2',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'name' => 'twopackages2-diff',\n 'files' => array(\n 'tests/ComponentInstaller/Test/Resources/img2.jpg',\n ),\n ),\n ),\n );\n $packages = array($package, $package2);\n $tests[] = array($packages, array(\n 'twopackages1/tests/ComponentInstaller/Test/Resources/img.jpg',\n 'twopackages2-diff/tests/ComponentInstaller/Test/Resources/img2.jpg',\n ));\n\n // Test copying an asset with a glob().\n $package = array(\n 'name' => 'components/differentcomponentname',\n 'version' => '1.2.3',\n 'is-root' => true, // Set the root so that it knows to use the cwd.\n 'extra' => array(\n 'component' => array(\n 'name' => 'diffname',\n 'files' => array(\n 'tests/ComponentInstaller/Test/Resources/*.jpg',\n ),\n ),\n ),\n );\n $packages = array($package);\n $tests[] = array($packages, array(\n 'diffname/tests/ComponentInstaller/Test/Resources/img.jpg',\n 'diffname/tests/ComponentInstaller/Test/Resources/img2.jpg',\n ));\n\n return $tests;\n }", "title": "" }, { "docid": "a55b66a78a77cbeac335aa985ef7814e", "score": "0.5185959", "text": "abstract protected function setup_assets();", "title": "" }, { "docid": "1f0f52536432369951c1d40e70415c38", "score": "0.51777357", "text": "public function fixfiles() {\n\t\tif(!Permission::check('ADMIN')) return Security::permissionFailure($this);\n\t\t\n\t\t$files = DataObject::get(\"File\");\n\t\tforeach($files as $file) {\n\t\t\t$file->updateFilesystem();\n\t\t\techo \"<li>\", $file->Filename;\n\t\t\t$file->write();\n\t\t}\n\t\techo \"<p>Done!\";\n\t}", "title": "" }, { "docid": "84f704a597b246906123d89a3331a48f", "score": "0.5176482", "text": "public function setFilesToCopy()\n\t{\n\t\t$params = $this->getFormParams();\n\t\t\n\t\t// TODO: stack or align stack?\n\t\t// Extract the stack id from the stack string\n\t\t$stack = $params->getParamValue( \"stack\" );\n\t\tlist($stackid, $apix, $boxsz, $totpart) = preg_split('%\\|--\\|%',$stack);\n\t\t\n\t\t// Get the stack file path\n\t\t$particle = new particledata();\n\t\t$stackdata = $particle->getStackParams($stackid);\n\t\t$stackfile = $stackdata['path'].\"/\".$stackdata['name'];\n\t\t\n\t\t// Get the stack file path and name\n\t\t$this->filesToCopy[] = $stackfile;\n\t}", "title": "" }, { "docid": "3047c72512fcf267c431b87f180bbd3b", "score": "0.5172302", "text": "function buildProject()\n {\n passthru($this->getBaseCmd(\"build:project\"));\n }", "title": "" }, { "docid": "c7820df88b8dd4aab0567afc70de4820", "score": "0.5171054", "text": "public function compile(string $pkg_alias):string\n{ \n\n // Debug\n debug::add(3, tr(\"Start compiling pacakge for publication to repository, {1}\", $pkg_alias));\n\n // Load package\n $client = new package_config($pkg_alias);\n $pkg = $client->load();\n\n // Create tmp directory\n $tmp_dir = sys_get_temp_dir() . '/apex_' . $pkg_alias;\n io::remove_dir($tmp_dir);\n io::create_dir($tmp_dir);\n io::create_dir(\"$tmp_dir/files\");\n $this->tmp_dir = $tmp_dir;\n\n // Debug\n debug::add(4, tr(\"Compiling, loaded package configuration and created tmp directory for package, {1}\", $pkg_alias));\n\n // Go through components\n $components = array();\n $rows = db::query(\"SELECT * FROM internal_components WHERE owner = %s ORDER BY id\", $pkg_alias);\n foreach ($rows as $row) { \n\n // Go through files\n $has_php = false;\n $files = components::get_all_files($row['type'], $row['alias'], $row['package'], $row['parent']);\n foreach ($files as $file) { \n if (preg_match(\"/\\.php$/\", $file)) { $has_php = true; }\n if (!file_exists(SITE_PATH . '/' . $file)) { continue; }\n $this->add_file($file);\n }\n if ($has_php === false) { continue; }\n\n // Add to $components array\n $vars = array(\n 'type' => $row['type'],\n 'order_num' => $row['order_num'],\n 'package' => $row['package'],\n 'parent' => $row['parent'],\n 'alias' => $row['alias'],\n 'value' => $row['value']\n );\n array_push($components, $vars);\n }\n file_put_contents(SITE_PATH . '/etc/' . $pkg_alias . '/components.json', json_encode($components));\n\n // Debug\n debug::add(4, tr(\"Compiling package, successfully compiled aall components and created componentss.sjon file for package, {1}\", $pkg_alias));\n\n // Copy over basic package files\n $pkg_dir = SITE_PATH . '/etc/' . $pkg_alias;\n $files = array('components.json', 'package.php', 'install.sql', 'install_after.sql', 'reset.sql', 'remove.sql');\n foreach ($files as $file) { \n if (!file_exists(\"$pkg_dir/$file\")) { continue; }\n copy(\"$pkg_dir/$file\", \"$tmp_dir/$file\");\n }\n\n // External files\n foreach ($pkg->ext_files as $file) { \n\n // Check for * mark\n if (preg_match(\"/^(.+?)\\*$/\", $file, $match)) { \n $files = io::parse_dir(SITE_PATH . '/' . $match[1]);\n foreach ($files as $tmp_file) { $this->add_file($match[1] . $tmp_file); }\n } else { \n $this->add_file($file);\n }\n }\n\n // docs and /src/tpl/ dirclearectories\n $addl_dirs = array(\n 'docs/' . $pkg_alias,\n 'src/' . $pkg_alias . '/tpl'\n );\n foreach ($addl_dirs as $dir) { \n if (!is_dir(SITE_PATH . '/' . $dir)) { continue; }\n $addl_files = io::parse_dir(SITE_PATH . '/' . $dir);\n foreach ($addl_files as $file) { \n $this->add_file($dir . '/' . $file);\n }\n }\n\n // Save JSON file\n file_put_contents(\"$tmp_dir/toc.json\", json_encode($this->toc));\n\n // Debug\n debug::add(4, tr(\"Compiling, gatheered all files and saved toc.json for package, {1}\", $pkg_alias));\n\n // Create archive\n $version = db::get_field(\"SELECT version FROM internal_packages WHERE alias = %s\", $pkg_alias);\n $archive_file = sys_get_temp_dir() . '/' . $pkg_alias . '-' . str_replace(\".\", \"_\", $version) . '.zip';\n io::create_zip_archive($tmp_dir, $archive_file);\n\n // Debug\n debug::add(3, tr(\"Successfully compiled package for publication, {1}\", $pkg_alias));\n\n // Return\n return $archive_file;\n\n}", "title": "" }, { "docid": "32f383968e689825afc67e0a69299dd0", "score": "0.5170779", "text": "public function run()\n {\n // Get all possible versions\n $versions = $this->loader->getVersions();\n\n // Iterate over all versions and get content\n $docs = array();\n foreach ($versions as $version) {\n\n // Get the docs\n $docs[$version->getName()] = $this->loader->getDocByVersion($version);\n }\n\n // Lets unpack the docs one by one and hand them to the compiler\n foreach ($docs as $version => $tmpFile) {\n\n // Collect what we need and hand it to the compiler\n $this->compiler->compile(\n $tmpFile . DIRECTORY_SEPARATOR . $this->loader->getSystemPathModifier($version) . DIRECTORY_SEPARATOR .\n $this->config->getValue(Config::PATH_MODIFIER),\n $this->config->getValue(Config::PROJECT_NAME) . DIRECTORY_SEPARATOR,\n $version,\n $versions\n );\n }\n\n // Clear the tmp dir\n $this->clearTmpDirectory();\n }", "title": "" }, { "docid": "44d008a21c2affde73596af45aa4dbc3", "score": "0.5167479", "text": "function prepareFiles($base)\n{\n\tif (!is_file($base . \".in\")) {\n\t\tif (file_put_contents($base . \".in\", \"\") === FALSE) {\n\t\t\tfwrite(STDERR, \"Nelze vytvorit chybejici soubor s testy: \" . $base . \".in\" . PHP_EOL);\n\t\t\texit(12);\n\t\t}\n\t}\n\n\tif (!is_file($base . \".out\")) {\n\t\tif (file_put_contents($base . \".out\", \"\") === FALSE) {\n\t\t\tfwrite(STDERR, \"Nelze vytvorit chybejici soubor s testy: \" . $base . \".out\" . PHP_EOL);\n\t\t\texit(12);\n\t\t}\n\t}\n\n\tif (!is_file($base . \".rc\")) {\n\t\tif (file_put_contents($base . \".rc\", \"0\") === FALSE) {\n\t\t\tfwrite(STDERR, \"Nelze vytvorit chybejici soubor s testy: \" . $base . \".rc\" . PHP_EOL);\n\t\t\texit(12);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b79d7d16a0e9f749be944dce6d20111b", "score": "0.5167397", "text": "public function setup()\n\t{\n\t\tif (!is_file($this->cachePath)) {\n\t\t\t@mkdir('cache/integrity');\n\t\t}\n\t\t$tables = $this->loadSchema();\n\t\t$this->cache($tables);\n\t}", "title": "" }, { "docid": "571e0b311cdff2417804b05373c9655a", "score": "0.5145876", "text": "public static function setUpFiles() {\n $sqlPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql';\n $initPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'init';\n $schemaPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'schema';\n $dataPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'data';\n $scriptPath = self::$baseDir . DIRECTORY_SEPARATOR . 'sql' . DIRECTORY_SEPARATOR . 'script';\n\n self::$schemaPath = $schemaPath;\n self::$dataPath = $dataPath;\n self::$scriptPath = $scriptPath;\n\n $file1 = $schemaPath . DIRECTORY_SEPARATOR . \"1test.sql\";\n $file2 = $schemaPath . DIRECTORY_SEPARATOR . \"2test.sql\";\n $file3 = $dataPath . DIRECTORY_SEPARATOR . \"3test.sql\";\n $file4 = $dataPath . DIRECTORY_SEPARATOR . \"20141009_123456_test4.sql\";\n $file5 = $schemaPath . DIRECTORY_SEPARATOR . \"20141008_114523_test5.sql\";\n $file6 = $schemaPath . DIRECTORY_SEPARATOR . \"20141009_140000_test6.sql\";\n\n self::$files = array();\n self::$files[] = $file1;\n self::$files[] = $file2;\n self::$files[] = $file3;\n self::$files[] = $file4;\n self::$files[] = $file5;\n self::$files[] = $file6;\n\n mkdir($sqlPath);\n mkdir($initPath);\n mkdir($schemaPath);\n mkdir($dataPath);\n mkdir($scriptPath);\n\n file_put_contents($file1,\"create table mytest2 (id int);\");\n file_put_contents($file2,\"alter table mytest2 add name char(1);\");\n file_put_contents($file3,\"insert into mytest2 values (1,'a');\");\n file_put_contents($file4,\"\");\n file_put_contents($file5,\"\");\n file_put_contents($file6,\"\");\n\n // set up some test dirs for configFullPath loading\n mkdir(normalizeDirectory(self::$baseDir . '/level1'),0777,true);\n mkdir(normalizeDirectory(self::$baseDir . '/level1/level2'),0777,true);\n mkdir(normalizeDirectory(self::$baseDir . '/level1/level2/level3'),0777,true);\n\n self::writeConfigFile(normalizeDirectory(self::$baseDir . '/level1/level1.php'));\n self::writeConfigFile(normalizeDirectory(self::$baseDir . '/level1/level2/level2.php'));\n self::writeConfigFile(normalizeDirectory(self::$baseDir . '/level1/level2/config.php'));\n\n }", "title": "" }, { "docid": "38af69e10aa0c8af8e4b12f75961b320", "score": "0.5143879", "text": "private function copySampleAssets()\n {\n $sourceDir = dirname(dirname(__FILE__)) . '/' . $this->sampleAssetsBasePathInModule;\n\n try {\n $mediaDirectory = $this->filesystem->getDirectoryWrite(\n \\Magento\\Framework\\App\\Filesystem\\DirectoryList::MEDIA\n );\n $destinationDir = $mediaDirectory->getAbsolutePath() . 'wysiwyg/synchrony/sample_assets';\n // create destination dir if doesn't exist\n $this->fileManager->checkAndCreateFolder($destinationDir);\n $this->fileManager->cd($sourceDir);\n $files = $this->fileManager->ls(File::GREP_FILES);\n foreach ($files as $file) {\n if (!$file['is_image']) {\n continue;\n }\n $this->fileManager->cp($sourceDir . '/' . $file['text'], $destinationDir . '/' . $file['text']);\n }\n } catch (\\Exception $e) {\n // intentionally doing nothing, any issues here do not worth interrupting installation\n }\n }", "title": "" }, { "docid": "0a0deceefb283ba0b9a0d35e3f8ac2d7", "score": "0.5137473", "text": "public function install()\n {\n $disk = Storage::createLocalDriver([\n 'driver' => 'local',\n 'root' => app_path(),\n ]);\n \n $this->info('Publishing required files', 1);\n $this->call('vendor:publish', ['--provider' => TwoStreamServiceProvider::class, '--tag' => ['required']], 2);\n \n $this->info('Applying your app\\'s namespace <comment>[' . $this->appNamespace . ']</comment>', 1);\n foreach (TwoStreamServiceProvider::pathsToPublish(TwoStreamServiceProvider::class, 'required') as $required) {\n $required = str_replace(app_path(), '', $required);\n $originalFile = $disk->get($required);\n $file = str_replace('{{namespace}}', $this->appNamespace, $originalFile);\n \n if ($file != $originalFile) {\n $this->info('Setting namespace for <comment>[/app' . str_replace([app_path(), '.php', '.stub'], '', $required) . ']</comment>', 2);\n $disk->put($required, $file);\n }\n \n if (! $disk->exists(str_replace('.stub', '.php', $required))) {\n $disk->move($required, str_replace('.stub', '.php', $required));\n }\n }\n \n $this->info('Cleaning up...', 1);\n $this->level(0);\n $files = array_merge($disk->allFiles('Ws'), $disk->allFiles('Exceptions'));\n foreach ($files as $key => $file) {\n if (preg_match('/\\\\.stub$/', $file)) {\n $disk->delete($file);\n }\n }\n }", "title": "" }, { "docid": "ca0e94dedfcfbaacf25110b20d327ef6", "score": "0.5130637", "text": "private function _prepareSiteDirectory() {\r\n\t\t// collisions with other sites creating app package at the same time\r\n\t\ttry {\r\n\t\t\t// Make sure directory structure exists. All files in this tree, plus /app/desktop/distro tree will be zipped together\r\n\t\t\t$old = umask(0); \r\n\t\t\tif (!file_exists($this->package_dir)) {\r\n\t\t\t\tif (! mkdir($this->package_dir, 0777, true)) throw new Exception('Could not create site directory'); // Make recursive dir structure (make all dirs)\r\n\t\t\t\tchmod($this->package_dir,0777);\r\n\t\t\t}\r\n\t\t\tif (!file_exists($this->package_dir.'/data')) {\r\n\t\t\t\tif (! mkdir($this->package_dir.'/data',0777)) throw new Exception('Could not create site data directory'); \r\n\t\t\t}\r\n\t\t\tumask($old); \r\n\t\t} catch (Exception $e) {\r\n\t\t\t$this->error_message = $e->getMessage();\r\n\t\t\t$this->view->assign ( 'error_message', $this->error_message );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t// Copy site specific settings file and a blank copy of the database to the site's \r\n\t\t// desktop dir. The database will be populated later, before zip is created\r\n\t\ttry {\r\n\t\t\t// Create settings file in the site's desktop directory (/sites/<countryName>/data)\r\n\t\t\t//copy (Globals::$BASE_PATH.Globals::$WEB_FOLDER.'/Settings.xml', $dp.'data/Settings.xml') \r\n\t\t\t$curFile = 'settings';\r\n\t\t\t$this->settingsAction ($this->package_dir.'/data/');\t\r\n\r\n\t\t\t// Always start with a fresh blank datbase file\r\n\t\t\t$curFile = 'sqlite';\r\n\t\t\tif (! copy (Globals::$BASE_PATH.'/app/desktop/trainsmart.template.sqlite', $this->package_dir.'/data/trainsmart.active.sqlite') ) throw('PHP copy function did not succeed');\r\n\t\t\r\n\t\t} catch (Exception $e) {\r\n\t\t\t$this->error_message = 'Failure copying '.$curFile.' file. The exact error was '.$e->getMessage();\r\n\t\t\t$this->view->assign ( 'error_message', $this->error_message );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\r\n\t\tif (!file_exists($this->package_dir.'/data')) {\r\n\t\t\t$this->view->assign ( 'error_message', 'Could not initialize site directory.' );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "140d52dd49c0a55311367e261749bc7e", "score": "0.51295286", "text": "protected function copyPublicAssets()\n {\n $target = $this->__DIR__ . '/../../../../public';\n $source = $this->public_path . '/packages/devisephp/cms';\n $this->File->copyDirectory($target, $source);\n }", "title": "" }, { "docid": "f408f246e3471c53bb93ee3044c3101b", "score": "0.5120248", "text": "public function copy_bridge_files_tc(){\n\t\t$plugin_path_tc = WP_PLUGIN_DIR . '/' . TC_PLUGIN_NAME;\n\t\t$plugin_bridge_file_path = $plugin_path_tc . '/wp-tcapsule-bridge';\n\t\t$current_bridge_file_name = $this->config->get_option('current_bridge_file_name');\n\t\t$root_bridge_file_path = ABSPATH . '/' . $current_bridge_file_name;\n\t\t$restore_id = WPTC_Factory::get('config')->get_option('restore_action_id');\n $logger = WPTC_Factory::get('logger');\n\t\t$this_config_like_file = $this->create_config_like_file();\n\t\t\n\t\t$files_other_than_bridge = array();\n\t\t$files_other_than_bridge['DBTables.php'] = $plugin_path_tc . '/Classes/Processed/DBTables.php';\n\t\t$files_other_than_bridge['Factory.php'] = $plugin_path_tc . '/Classes/Factory.php';\n\t\t$files_other_than_bridge['FileList.php'] = $plugin_path_tc . '/Classes/FileList.php';\n\t\t$files_other_than_bridge['tc-config.php'] = $plugin_path_tc . '/Classes/Config.php';\n\t\t$files_other_than_bridge['wp-tc-config.php'] = $this_config_like_file;\t\t\t\t\t\t//config-like-file which was prepared already\n\t\t$files_other_than_bridge['Files.php'] = $plugin_path_tc . '/Classes/Processed/Files.php';\n\t\t$files_other_than_bridge['Restoredfiles.php'] = $plugin_path_tc . '/Classes/Processed/Restoredfiles.php';\n\t\t$files_other_than_bridge['class-wp-filesystem-base.php'] = ABSPATH . '/wp-admin/includes/class-wp-filesystem-base.php';\n\t\t$files_other_than_bridge['class-wp-filesystem-direct.php'] = ABSPATH . '/wp-admin/includes/class-wp-filesystem-direct.php';\n\t\t$files_other_than_bridge['class-wp-filesystem-ftpext.php'] = ABSPATH . '/wp-admin/includes/class-wp-filesystem-ftpext.php';\n\t\t$files_other_than_bridge['class-wp-error.php'] = ABSPATH . '/wp-includes/class-wp-error.php';\n\t\t$files_other_than_bridge['jquery.min.js'] = ABSPATH . '/wp-includes/js/jquery/jquery.js';\n\t\t$files_other_than_bridge['formatting.php'] = ABSPATH . '/wp-includes/formatting.php';\n\t\t\n\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ----plugin_bridge_file_path------- \".var_export($plugin_bridge_file_path,true).\"\\n\",FILE_APPEND);\n\t\t\n\t\t//create the folder in root directory if it doesnt exist\n\t\tglobal $wp_filesystem;\n\t\tif ( !$wp_filesystem->is_dir($root_bridge_file_path) ) \n\t\t{\n\t\t\tif ( !$wp_filesystem->mkdir($root_bridge_file_path, FS_CHMOD_DIR) )\n\t\t\t{\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----root folder creation error------- \".var_export($root_bridge_file_path,true).\"\\n\",FILE_APPEND);\n $logger->log('Failed to create bridge directory while restoring . Check your folder permissions','restore_error',$restore_id);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//call the copy function to copy the bridge folder files\n\t\t$copy_res = $this->tc_file_system_copy_dir($plugin_bridge_file_path, $root_bridge_file_path, true);\n\t\tif(!$copy_res)\n\t\t{\n\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----copy false------- \\n\",FILE_APPEND);\n $logger->log('Failed to Copying Downloaded files','restore_error',$restore_id);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t//copy the files which the bridge will use\n\t\tforeach($files_other_than_bridge as $key => $value){\n\t\t\t$this->tc_file_system_copy($value, $root_bridge_file_path . '/' . $key, true);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "97423d9cb815a4f6b7b68201d9281dee", "score": "0.51140267", "text": "public function run() {\r\n $this->temporaryFiles();\r\n }", "title": "" }, { "docid": "97b4d7db2ca25eda0793c8c191082fcf", "score": "0.5111227", "text": "public function publicizeDirs()\n {\n $compiler = new PublicizeFilesCompiler($this->tempDir, $this->wwwDir);\n $compiler->setData($this->publicize);\n $compiler->compile();\n }", "title": "" }, { "docid": "4cb7c1002459b443adc93fc5aaef1b72", "score": "0.5107529", "text": "private function copyTiles()\n {\n $files = Storage::allFiles($this->jobPath . \"/tiles\");\n\n foreach ($files as $file) {\n $stream = Storage::getDriver()->readStream($file);\n $fileName = str_replace($this->jobPath . \"/tiles/\", \"\", $file);\n\n Storage::disk('projects')->put($this->project->path . '/tiles/' . $fileName, $stream);\n }\n }", "title": "" }, { "docid": "29361ccf039c36598dcfc53d6f7e3934", "score": "0.51067233", "text": "public function load_plugin_dependency_files(){\r\n\t\t\t$includes_files = array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'codestar-framework',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_LIB .'/codestar-framework'\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-menu-page',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_ADMIN\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-custom-post-type',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_ADMIN\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-post-column-customize',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_ADMIN\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-admin-request',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_ADMIN\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'add-menu-item-custom-fields',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_LIB .'/mega-menu'\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-appside-shortcodes',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_INC\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-elementor-section-extends',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_ELEMENTOR\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-elementor-widget-init',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_ELEMENTOR\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-about-us-widget',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_WP_WIDGETS\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-recent-post-widget',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_WP_WIDGETS\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'file-name' => 'class-contact-info-widget',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_WP_WIDGETS\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\t//add if theme was not activate\r\n\t\t\tif (!APPSIDE_THEME_ACTIVE){\r\n\t\t\t\t$includes_files[] = array(\r\n\t\t\t\t\t'file-name' => 'class-appside-excerpt',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_INC\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif (!empty(get_option('appside_license_status')) && get_option('appside_license_status') != 'not_verified'){\r\n\t\t\t\t$includes_files[] = array(\r\n\t\t\t\t\t'file-name' => 'class-demo-data-import',\r\n\t\t\t\t\t'folder-name' => APPSIDE_MASTER_DEMO_IMPORT\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\tif (is_array($includes_files) && !empty($includes_files)){\r\n\t\t\t\tforeach ($includes_files as $file){\r\n\t\t\t\t\tif (file_exists($file['folder-name'].'/'.$file['file-name'].'.php')){\r\n\t\t\t\t\t\trequire_once $file['folder-name'].'/'.$file['file-name'].'.php';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "e235f8119bf967fb4c390560b495e94b", "score": "0.5103728", "text": "private function tree_build() {\n\t\t// lets include the functional files.\n\t\tforeach ($this->gui_includes as $includes) {\n\t\t\tinclude $includes;\n\t\t}\n\t}", "title": "" }, { "docid": "285bdef36e98ffaaebe7fff79814b843", "score": "0.5084644", "text": "public function compile(bool $force = false): void\n {\n if ($this->compiled) {\n throw new \\LogicException('Cannot recompile already compiled build files.');\n }\n\n $output_folder = $this->config->getOutputFolder();\n $source_dir = (!empty($this->config->getSourceRoot()) ? $this->config->getSourceRoot() . '/' : '');\n\n // put the require.js in the web folder\n $fs = new Filesystem();\n $require_file = new File(\n $fs->makePathRelative(__DIR__ . '/js', $this->config->getProjectRoot()) . 'require.js'\n );\n $output_require_file = new File($output_folder . '/require.js');\n\n $this->addToFiles($output_require_file, [new Dependency($require_file)], true, $force);\n\n // Entry points\n foreach ($this->config->getEntryPoints() as $file_name) {\n $file = new File($source_dir . $file_name);\n $entry_point = new EntryPoint($this->finder->all($file), $this->config->getSplitStrategy());\n $files_to_build = $entry_point->getFilesToBuild($output_folder);\n\n if (empty($files_to_build)) {\n throw new \\RuntimeException(\n sprintf('Entry point \"%s\" did not resolve in any output file.', $file_name)\n );\n }\n\n foreach ($files_to_build as $input => $dependencies) {\n $this->addToFiles(new File($input), $dependencies, false, $force);\n }\n }\n\n // Assets\n foreach ($this->config->getAssetFiles() as $file_name) {\n $file = new File($source_dir . $file_name);\n $asset = new Asset($this->finder->all($file));\n\n $this->addToFiles(\n $asset->getAssetFile($output_folder, $this->config->getSourceRoot()),\n $asset->getFiles(),\n false,\n $force\n );\n }\n\n $this->compiled = true;\n }", "title": "" }, { "docid": "383a71a1a61970c8fabf8248be4a5f25", "score": "0.5082389", "text": "public function mergeModifiedFiles();", "title": "" }, { "docid": "68cf13c5faad19270c1e85e4c4005f55", "score": "0.5073307", "text": "protected static function updateBootstrapping() {\n copy(__DIR__ . '/stubs/js/multiSelect.js', resource_path('js/multiSelect.js'));\n }", "title": "" }, { "docid": "b9402c67908b78b73001ea10c9517daa", "score": "0.50701874", "text": "public function load_files(){\n\t\tinclude_once('classes/class.corcrmImporter.php');\n\t\tinclude_once('classes/class.createProduct.php');\n\t\tinclude_once('classes/class.getProductCsv.php');\n\t}", "title": "" }, { "docid": "fcc0c0884c654e2712ae54de3b496e9b", "score": "0.506947", "text": "public function loadGitTag()\n {\n list($version, $stability) = $this->tag->getVersion();\n $this->setVersion($version);\n $this->setStability($stability);\n\n sscanf($this->tag->getDatetime(), '%s %s', $date, $time);\n $this->setDate($date);\n $this->setTime($time);\n\n $this->setNotes($this->tag->getMessage());\n\n // dest = var/package/tmp/Module_Name-X.X.X/\n $dest = Mage_Connect_Package_Writer::PATH_TO_TEMPORARY_DIRECTORY . basename($this->getReleaseFilename()) . DS;\n $filenames = $this->tag->getFilenames();\n $projectdir = getcwd();\n @mkdir($dest, 0700, true);\n chdir($dest);\n\n $map = $this->getMap();\n foreach ($filenames as $filename) {\n if ($map) {\n $mappedfile = preg_replace(array_keys($map), $map, $filename, 1, $replaced);\n if (! $replaced) continue;\n }\n else {\n $mappedfile = $filename;\n }\n @mkdir(dirname($mappedfile), 0700, true);\n $this->tag->saveFileContents($filename, $mappedfile);\n\n list($target, $mappedfile) = $this->getTargetName($mappedfile);\n $this->addContent($mappedfile, $target);\n }\n\n chdir($projectdir);\n\n return $this;\n }", "title": "" }, { "docid": "c736d9f07755820a8379060828666a2a", "score": "0.5068514", "text": "public function pack()\n {\n\n $request = $this->getRequest();\n\n $package = $request->param('objid',Validator::CNAME);\n\n $fileName = PATH_GW.'data/wbf_package/'.$package.'.xml';\n\n $xml = LibXml::load( $fileName );\n\n $packageName = PATH_GW.'src/'.trim($xml['package']).'.php';\n\n $fileList = array();\n\n foreach( $xml->classes->class as $class )\n {\n $fileList[] = trim($class);\n }\n\n $packer = new LibCodePackerPhp();\n $packer->fileName = $packageName;\n $packer->setFilesAsClasses( array_reverse($fileList) );\n $packer->pack();\n\n Controller::addMessage( 'Successfully packed '.trim($xml['package']) );\n\n }", "title": "" }, { "docid": "a84b407167be80ca85d5708fead19c0e", "score": "0.5067563", "text": "public function copyProjectExtraFiles(Event $event): void\n {\n $extras = $event->getComposer()->getPackage()->getExtra();\n if (array_key_exists('copy-files', $extras)) {\n $this->installer->getIo()->write(\n sprintf(' - Copied additional file(s)'),\n true\n );\n $this->copyExtras($extras['copy-files']);\n }\n }", "title": "" }, { "docid": "1d7790bb302ac8b2b8e796ab59a4d47c", "score": "0.506543", "text": "public function cleanWaste()\n {\n $this->taskCleanWaste(__DIR__)->run();\n }", "title": "" }, { "docid": "f065995934459ae440091edcd80faf63", "score": "0.50593746", "text": "function _packagePackage()\n {\n // Check the saved state.\n // Don't need to check previewed because you can't save\n // unless you preview.\n if (!$this->saved) {\n $this->showWarnings('You must save the file before you can package it.');\n $this->notebook->set_page(-1);\n return;\n }\n\n // Include PEAR_Packager\n require_once 'PEAR/Packager.php';\n \n // Package the file.\n $packager =& new PEAR_Packager();\n $retVal = $packager->package($this->_options['packagedirectory'] . '/' . 'package.xml');\n\n // Check for errors.\n if (PEAR::isError($result)) {\n $this->_pushWarning($result->getCode(), array());\n return;\n }\n }", "title": "" }, { "docid": "437a48b398409cd9a5c9d9fa788f7822", "score": "0.5049163", "text": "private function __construct() {\n $files = $this->getFiles(Webgrind_Config::xdebugOutputFormat(), Webgrind_Config::xdebugOutputDir());\n\n // Get list of preprocessed files\n $prepFiles = $this->getPrepFiles('/\\\\'.Webgrind_Config::$preprocessedSuffix.'$/', Webgrind_Config::storageDir());\n // Loop over the preprocessed files.\n foreach ($prepFiles as $fileName=>$prepFile) {\n $fileName = str_replace(Webgrind_Config::$preprocessedSuffix,'',$fileName);\n\n // If it is older than its corrosponding original: delete it.\n // If it's original does not exist: delete it\n if (!isset($files[$fileName]) || $files[$fileName]['mtime']>$prepFile['mtime'])\n unlink($prepFile['absoluteFilename']);\n else\n $files[$fileName]['preprocessed'] = true;\n }\n // Sort by mtime\n uasort($files,array($this,'mtimeCmp'));\n\n $this->files = $files;\n }", "title": "" }, { "docid": "5d4457c01785641dc1ebd44a3ce2ff8d", "score": "0.5045764", "text": "public function setupManifest()\n {\n // test-project class manifest (since it will lose visibility of core classes)\n $presenter = new SSViewer_DataPresenter(new ViewableData());\n unset($presenter);\n\n // Switch to test manifest\n $s = DIRECTORY_SEPARATOR;\n $this->alternateBasePath = __DIR__ . $s . 'i18nTest' . $s . \"_fakewebroot\";\n Director::config()->set('alternate_base_folder', $this->alternateBasePath);\n\n // New module manifest\n $moduleManifest = new ModuleManifest($this->alternateBasePath);\n $moduleManifest->init(true);\n $this->pushModuleManifest($moduleManifest);\n\n // Replace old template loader with new one with alternate base path\n $this->oldThemeResourceLoader = ThemeResourceLoader::inst();\n ThemeResourceLoader::set_instance($loader = new ThemeResourceLoader($this->alternateBasePath));\n $loader->addSet(\n '$default',\n $default = new ThemeManifest($this->alternateBasePath, project())\n );\n $default->init(true);\n\n SSViewer::set_themes([\n 'testtheme1',\n '$default',\n ]);\n\n $this->originalLocale = i18n::get_locale();\n i18n::set_locale('en_US');\n\n // Set new manifest against the root\n $classManifest = new ClassManifest($this->alternateBasePath);\n $classManifest->init(true);\n $this->pushManifest($classManifest);\n\n // Setup uncached translator\n // This should pull the module list from the above manifest\n $translator = new Translator('en');\n $translator->setFallbackLocales(['en']);\n $loader = new ModuleYamlLoader();\n $loader->setReader(new YamlReader());\n $translator->addLoader('ss', $loader); // Standard ss module loader\n $translator->addLoader('array', new ArrayLoader()); // Note: array loader isn't added by default\n $provider = new SymfonyMessageProvider();\n $provider->setTranslator($translator);\n Injector::inst()->registerService($provider, MessageProvider::class);\n }", "title": "" }, { "docid": "662001ab70daa3fd1d7f98d69e9a5537", "score": "0.5032461", "text": "private function oneClick_Copy()\n {\n if (!Rules::isBrowserTriggerEnabled()) {\n @chmod($this->pathRootExtractedPiwik . '/misc/cron/archive.sh', 0755);\n }\n\n $model = new Model();\n\n /*\n * Copy all files to PIWIK_INCLUDE_PATH.\n * These files are accessed through the dispatcher.\n */\n Filesystem::copyRecursive($this->pathRootExtractedPiwik, PIWIK_INCLUDE_PATH);\n $model->removeGoneFiles($this->pathRootExtractedPiwik, PIWIK_INCLUDE_PATH);\n\n /*\n * These files are visible in the web root and are generally\n * served directly by the web server. May be shared.\n */\n if (PIWIK_INCLUDE_PATH !== PIWIK_DOCUMENT_ROOT) {\n /*\n * Copy PHP files that expect to be in the document root\n */\n $specialCases = array(\n '/index.php',\n '/piwik.php',\n '/js/index.php',\n );\n\n foreach ($specialCases as $file) {\n Filesystem::copy($this->pathRootExtractedPiwik . $file, PIWIK_DOCUMENT_ROOT . $file);\n }\n\n /*\n * Copy the non-PHP files (e.g., images, css, javascript)\n */\n Filesystem::copyRecursive($this->pathRootExtractedPiwik, PIWIK_DOCUMENT_ROOT, true);\n $model->removeGoneFiles($this->pathRootExtractedPiwik, PIWIK_DOCUMENT_ROOT);\n }\n\n /*\n * Config files may be user (account) specific\n */\n if (PIWIK_INCLUDE_PATH !== PIWIK_USER_PATH) {\n Filesystem::copyRecursive($this->pathRootExtractedPiwik . '/config', PIWIK_USER_PATH . '/config');\n }\n\n Filesystem::unlinkRecursive($this->pathRootExtractedPiwik, true);\n\n Filesystem::clearPhpCaches();\n }", "title": "" }, { "docid": "ad069aaae0ce0c457afd6dea577480ad", "score": "0.503134", "text": "protected function setConfFiles() {\n $current_dir = basename(getcwd());\n $project_name = $this->io->ask('Please enter the project name (default to ' . $current_dir . '): ', $current_dir);\n $theme_name = str_replace('-', '_', $project_name);\n\n\n $this->io->write('Setting up .env file');\n $env = file_get_contents(self::ENV_FILE . '.example');\n $env = str_replace('example', $project_name, $env);\n file_put_contents(self::ENV_FILE, $env);\n\n $makefile = file_get_contents(self::MAKE_FILE);\n $makefile = str_replace('frontend_target ?= \"example\"', 'frontend_target ?= \"' . $theme_name . '\"', $makefile);\n file_put_contents(self::MAKE_FILE, $makefile);\n\n $this->io->write('Setting up Drush aliases file');\n $source_filename = self::DRUSH_ALIASES_FOLDER . \"/sitename\" . self::DRUSH_ALIASES_FILE_SUFFIX . \".example\";\n $aliases = file_get_contents($source_filename);\n $aliases = str_replace('sitename', $project_name, $aliases);\n file_put_contents(self::DRUSH_ALIASES_FOLDER . \"/$project_name\" . self::DRUSH_ALIASES_FILE_SUFFIX, $aliases);\n\n $this->io->write('Setting up behat.yml file');\n $behat_yml = file_get_contents('./behat.yml');\n $behat_yml = str_replace('example', $project_name, $behat_yml);\n file_put_contents('./behat.yml', $behat_yml);\n\n $this->io->write('Setting up BackstopJS\\' cookies.json file');\n $backstop = file_get_contents('./tests/functional/backstopjs/backstop_data/engine_scripts/cookies.json');\n $backstop = str_replace('example', $project_name, $backstop);\n file_put_contents('./tests/functional/backstopjs/backstop_data/engine_scripts/cookies.json', $backstop);\n\n $this->io->write('Setting up docker-compose.override.yml');\n copy('./docker-compose.override.yml.dist', './docker-compose.override.yml');\n\n $this->io->write('Setting up phpunit.xml');\n copy('./phpunit.xml.dist', './phpunit.xml');\n\n $this->io->write('Setting up phpcs.xml');\n copy('./phpcs.xml.dist', './phpcs.xml.dist');\n\n $this->io->write('Setting up phpmd.xml');\n copy('./phpmd.xml.dist', './phpmd.xml');\n\n\n return $project_name;\n }", "title": "" }, { "docid": "7a6646aea64055d9a6eb5d2ce9baffe0", "score": "0.50310653", "text": "protected function create_working_copies()\n {\n //if there exists only one schematic file, copy it to toplevel.sch, for compatibility\n if(self::filecount($this->userdesign) === 1 && self::file_extension(self::first_file($this->userdesign)->get_filename()) == \"sch\")\n {\n self::first_file($this->userdesign)->copy_content_to($this->work_dir.'/toplevel.sch');\n }\n else if(self::filecount($this->userdesign) === 1 && self::file_extension(self::first_file($this->userdesign)->get_filename()) == \"fsm\")\n {\n self::first_file($this->userdesign)->copy_content_to($this->work_dir.'/design.fsm');\n }\n //If we have no file extension, assume a FSMD file; this is a peculairty of FSMDesigner on certain browsers\n else if(self::filecount($this->userdesign) === 1 && self::file_extension(self::first_file($this->userdesign)->get_filename()) == false) \n {\n self::first_file($this->userdesign)->copy_content_to($this->work_dir.'/design.fsmd');\n }\n else\n {\n //create the user design _first_\n foreach($this->userdesign as $file)\n {\n //skip directories and files with empty names\n if($file->is_directory() || trim($file->get_filename()) == '')\n continue;\n\n //if the file isn't of an allowed type, ignore it\n if(!in_array(self::file_extension($file->get_filename()), $this->allowed_exts))\n {\n //and throw an exception\n //FIXME: get_string\n $this->last_error = 'At least one of your files was ignored, as the filetype was not allowed by your instructor. ('.$file->get_filename().')';\n throw new InvalidFiletypeException($this->last_error);\n }\n\n //copy the file to the working dir\n $file->copy_content_to($this->work_dir.'/'.$file->get_filename());\n }\n \n }\n \n //create the reference design _second_\n //it's important to create this second, so the user can't\n //overwrite any reference design files (and dishonestly get a higher grade)\n foreach($this->reference as $file)\n {\n //skip directories and files with empty names\n if($file->is_directory() || trim($file->get_filename()) == '')\n continue;\n\n //copy the file to the working dir\n $file->copy_content_to($this->work_dir.'/'.$file->get_filename());\n }\n }", "title": "" }, { "docid": "585961d1dc9a063f7c27540811e98dad", "score": "0.5024334", "text": "public function createFiles($globalPackages, $modulePackages)\n {\n $packageAttributes = [\n 'devJs',\n 'js',\n 'sourcePath',\n 'devPath',\n 'distPath',\n 'scssPath',\n 'cssSourcePaths',\n 'imgPath',\n 'fontPath',\n 'css',\n 'extraParams'\n ];\n\n $mainAssets = $this->tempPath . '/assets';\n $modulesDir = $this->tempPath . '/modules';\n\n $this->createDir($mainAssets);\n $mainFile = $mainAssets . '/bundles.php';\n $mainBundles = [];\n\n foreach ($globalPackages as $package) {\n $class =\n\"<?php\nnamespace \" . $package['namespace'] . \";\nclass \" . $package['name'] . \" extends \" . $package['type'] . \"\n{\n\";\n foreach ($packageAttributes as $attr) {\n if (array_key_exists($attr, $package)) {\n $class .= 'public $' . $attr . ' = ' . var_export($package[$attr], true) . ';';\n $class .= \"\\n\";\n }\n }\n $class .= \"}\";\n $fileName = $mainAssets . '/' . $package['name'] . '.php';\n file_put_contents($fileName, $class);\n $mainBundles[] = $package['namespace'] . '\\\\' . $package['name'];\n }\n\n $fileContent = '<?php return ' . var_export($mainBundles, true) . ';';\n file_put_contents($mainFile, $fileContent);\n\n $modules = [];\n\n foreach ($modulePackages as $module => $packages) {\n $moduleAssets = $modulesDir . '/' . $module . '/assets';\n $this->createDir($moduleAssets);\n\n $moduleBundles = [];\n\n foreach ($packages as $package) {\n $class =\n\"<?php\nnamespace \" . $package['namespace'] . \";\nclass \" . $package['name'] . \" extends \" . $package['type'] . \"\n{\n\";\n foreach ($packageAttributes as $attr) {\n if (array_key_exists($attr, $package)) {\n $class .= 'public $' . $attr . ' = ' . var_export($package[$attr], true) . ';';\n $class .= \"\\n\";\n }\n }\n $class .= \"}\";\n $fileName = $moduleAssets . '/' . $package['name'] . '.php';\n file_put_contents($fileName, $class);\n $moduleBundles[] = $package['namespace'] . '\\\\' . $package['name'];\n }\n\n $fileContent = '<?php return ' . var_export($moduleBundles, true) . ';';\n file_put_contents($moduleAssets . '/bundles.php', $fileContent);\n $modules[$module] = ['basePath' => '@app/modules/' . $module ];\n }\n\n $this->createDir($modulesDir . '/parent/assets');\n $this->createDir($modulesDir . '/child/assets');\n\n $modules['parent'] = [\n 'basePath' => '@app/modules/parent',\n 'modules' => [\n 'child' => [\n 'basePath' => '@app/modules/child',\n ]\n ],\n ];\n\n // use class to find path\n $this->createDir($modulesDir . '/classtest/assets');\n file_put_contents($modulesDir . '/classtest/ClassTestModule.php', '<?php namespace app\\modules\\classtest; class ClassTestModule extends \\yii\\base\\Module {}');\n $modules['class_test'] = [\n 'class' => 'app\\modules\\classtest\\ClassTestModule'\n ];\n\n return ['modules' => $modules];\n }", "title": "" } ]
ce5aab78562b75e97e98b3b5c31fe3c0
Process the sweetcaptcha logic
[ { "docid": "e397b6d779e84b0caed33ac18de39703", "score": "0.5740579", "text": "public function onFormProcessed(Event $event)\n {\n $form = $event['form'];\n $action = $event['action'];\n\n switch ($action) {\n case 'sweetcaptcha':\n // make sure we have the details\n $key = $form->getValue('sckey');\n $value = $form->getValue('scvalue');\n if ($key && $value && $this->sweetcaptcha->check(array('sckey' => $key, 'scvalue' => $value)) == \"true\") {\n // do nothing captcha passed successfully\n } else {\n $this->grav->fireEvent('onFormValidationError', new Event([\n 'form' => $form,\n 'message' => $this->grav['language']->translate('PLUGIN_FORM.ERROR_VALIDATING_CAPTCHA')\n ]));\n $event->stopPropagation();\n }\n\n break;\n }\n }", "title": "" } ]
[ { "docid": "80cf1bf65708690acea353bb79baabd1", "score": "0.6385145", "text": "public function captcha()\n {\n $user_id = 'test';\n $status = Geetest::preProcess(['user_id'=>$user_id]);\n session()->put('gtserver',$status);\n session()->put('user_id',$user_id);\n echo Geetest::getResponseStr();\n }", "title": "" }, { "docid": "336f35b6a317ea3df7f19a934cac4d44", "score": "0.62961775", "text": "public function getCaptcha();", "title": "" }, { "docid": "b99c61c4497ee4d3387919dc9d56728a", "score": "0.61778647", "text": "public function captcha() {\n\t\t$this->autoRender = false;\n\t\t$this->layout='ajax';\n\t\t$code = zcaptcha_create();\n\t\t$this->Session->write('captcha_code', $code);\n\t}", "title": "" }, { "docid": "7a2863462c9bf0cb5d3a35dde415e0b0", "score": "0.60479087", "text": "public function captcha_refresh(){\n $cap_image=$this->_make_captcha();\n echo $cap_image;\n }", "title": "" }, { "docid": "53e319de5e45a1dd0719558efc03f00e", "score": "0.60234255", "text": "public static function captcha (){\n $str = self::captchaClean();\n self::$fields[] = array ('value' => $str);\n }", "title": "" }, { "docid": "996c63828d7b97e91db98cc054f15141", "score": "0.60123146", "text": "function checkCaptcha($captcha){\r\n if ($captcha != $_SESSION[\"vercode\"] OR $_SESSION[\"vercode\"]=='') { \r\n return false; \r\n //echo '<strong>Wrong captcha code. Try again.</strong>'; \r\n } \r\n else { \r\n return true; \r\n // add form data processing code here \r\n //echo '<strong>Verification successful.</strong>';\r\n //view_verify.php\r\n }\r\n}", "title": "" }, { "docid": "0048c268b5f16a3853f9afcabd5ae5c4", "score": "0.59827715", "text": "function generateCaptcha( ) {\n\t\tglobal $database, $smartyvs;\n\t\t$c = hwd_vs_Config::get_instance();\n\n\t\t$code = null;\n\t\tif ($c->disablecaptcha == 0) {\n\n\t\t\t$jversion = hwd_vs_access::checkJversion();\n\n\t\t\t$code.=\"<script language=\\\"javascript\\\">\n\t\t\t\t\twindow.onload=refresh_hwd_Captcha;\n\t\t\t\t\tvar image=\\\"\".JURI::root( true ).\"/components/com_hwdvideoshare/assets/captcha/CaptchaSecurityImages.php?width=120&height=40&jversion=\".$jversion.\"&characters=6&uid=\".rand().\"\\\";\n\t\t\t\t\t\tfunction refresh_hwd_Captcha()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdocument.images[\\\"hwdCaptchaPic\\\"].src=image+\\\"?\\\"+new Date();\n\t\t\t\t\t\t}\n\t\t\t\t\t</script>\n\t\t\t\t\t<img src=\\\"\".JURI::root( true ).\"/components/com_hwdvideoshare/assets/images/loadingCaptcha.png\\\" alt=\\\"Security Code\\\" name=\\\"hwdCaptchaPic\\\" id=\\\"hwdCaptchaPic\\\" width=\\\"120\\\" height=\\\"40\\\" style=\\\"border: 1px solid Black; width: 120px; height: 40px;\\\" />\n\t\t\t\t\t<script language=\\\"javascript\\\">\n\t\t\t\t\tdocument.write('<div style=\\\"cursor:pointer;padding:3px;\\\" onclick=\\\"refresh_hwd_Captcha()\\\" >\"._HWDVIDS_INFO_NEWCODE.\"</a>');\n\t\t\t\t\t</script>\";\n\t\t$smartyvs->assign(\"print_captcha\", 1);\n\t\t}\n\n\treturn $code;\n\t}", "title": "" }, { "docid": "cf32934880932a64227b6924ccb73739", "score": "0.59609777", "text": "public function captcha()\n {\n $code=rand(1000,9999);\n Mage::getSingleton('core/session')->setCaptchaValue($code);\n $im = imagecreatetruecolor(50, 28);\n $bg = imagecolorallocate($im, 22, 86, 165); //background color blue\n $fg = imagecolorallocate($im, 255, 255, 255);//text color white\n imagefill($im, 0, 0, $bg);\n imagestring($im, 5, 5, 5, $code, $fg);\n header(\"Cache-Control: no-cache, must-revalidate\");\n header('Content-type: image/png');\n return imagepng($im);\n //imagedestroy($im);\n }", "title": "" }, { "docid": "b0933280566c15e26584f4fa40bbfc63", "score": "0.5959022", "text": "private function load_si_captcha()\n {\n \n if ( class_exists( 'ReallySimpleCaptcha' ) ) \n {\n\n $captcha_instance = new ReallySimpleCaptcha();\n $captcha_instance->bg = array( 0, 0, 0 );\n $word = $captcha_instance->generate_random_word();\n $prefix = mt_rand();\n return $captcha_instance->generate_image( $prefix, $word );\n } \n else\n {\n return '';\n } \n }", "title": "" }, { "docid": "429327340c9d5979f52e5f6a8f7ce2c0", "score": "0.594086", "text": "public function process()\n {\n if ($this->disabled) {\n return;\n }\n\n // Process only when a login has been submitted.\n if (empty($_POST)) {\n return true;\n }\n\n // Fetch the reCAPTCHA submission response.\n $response = json_decode($this->googleRecaptchaRequest(), true);\n\n // Assume valid.\n $valid = true;\n\n // Validate hostname. reCAPTCHA expects hostname validation when shared\n // keys are in use.\n $hostname = parse_url(get_home_url(), PHP_URL_HOST);\n if (!isset($response['hostname']) || $response['hostname'] !== $hostname) {\n $valid = false;\n }\n\n // Validate response\n if (!isset($response['success']) || $response['success'] !== true) {\n $valid = false;\n }\n\n // If validation failed, logout and redirect.\n if (!$valid) {\n wp_logout();\n header('Location: wp-login.php?recaptcha-failure');\n exit();\n }\n }", "title": "" }, { "docid": "d23ee89ed024ea72f172366476d73791", "score": "0.5841456", "text": "function menu_captcha()\r\n{\r\n\t// Init\r\n\tglobal $trad;\r\n\t$captcha_path = PATH_DIVERS.\"captcha.php\";\r\n\t// Controle javacript : captcha non spécifié / erronné ?\r\n\t$captcha = \"<script type='text/javascript'>\r\n\tfunction controle_captcha()\r\n\t{\r\n\t\tif(get_value('captcha')=='') { alert(\\\"\".$trad[\"captcha_alert_specifier\"].\"\\\"); return false; }\r\n\t\trequete_ajax(\\\"\".PATH_DIVERS.\"captcha_verif.php?captcha=\\\"+get_value('captcha').toUpperCase());\r\n\t\tif(Http_Request_Result!='true') { alert(\\\"\".$trad[\"captcha_alert_erronee\"].\"\\\"); return false; }\r\n\t}\r\n\t</script>\";\r\n\t// Affichage du captcha\r\n\t$captcha .= \"<span \".infobulle($trad[\"captcha_info\"]).\">\".\r\n\t\t\t\t\t$trad[\"captcha\"].\"&nbsp;<img src=\\\"\".PATH_TPL.\"divers/reload.png\\\" style='cursor:pointer;width:15px;' title='reload !' onClick=\\\"element('captcha_img').src='\".$captcha_path.\"?tmp='+Math.random();\\\" />&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t<img src=\\\"\".$captcha_path.\"\\\" id='captcha_img' />&nbsp;&nbsp;&nbsp;<img src=\\\"\".PATH_TPL.\"divers/fleche_droite.png\\\" />&nbsp;&nbsp;<input type='text' name='captcha' id='captcha' style='width:120px;text-transform:uppercase;' />\r\n\t\t\t\t</span>\";\r\n\t// retour\r\n\treturn $captcha;\r\n}", "title": "" }, { "docid": "8e19150e60705e113f3c9e8a40f78dff", "score": "0.5840255", "text": "public function generateCaptcha($rand) {\n ob_clean();\n $data = $this->common_model->commonFunction();\n $arr1 = array(\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\");\n $arr2 = array();\n foreach ($arr1 as $val)\n $arr2[] = strtoupper($val);\n $arr3 = array(\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\");\n $str = \"\";\n $arr_all_characters = array_merge($arr1, $arr2, $arr3);\n for ($i = 0; $i < 5; $i++) {\n $str.=$arr_all_characters[array_rand($arr_all_characters)] . \"\";\n }\n $this->session->set_userdata('security_answer', $str);\n putenv('GDFONTPATH=' . realpath('.'));\n //$font = '/var/www/ci-pipl-code-library/user-module/media/front/captcha/ariblk.ttf';\n $font = $data['absolute_path'] . 'media/front/captcha/ariblk.ttf';\n $IMGVER_IMAGE = imagecreatefromjpeg(base_url() . \"media/front/captcha/bg1.jpg\");\n $IMGVER_COLOR_WHITE = imagecolorallocate($IMGVER_IMAGE, 0, 0, 0);\n $text = $str;\n $IMGVER_COLOR_BLACK = imagecolorallocate($IMGVER_IMAGE, 255, 255, 255);\n imagefill($IMGVER_IMAGE, 0, 0, $IMGVER_COLOR_BLACK);\n imagettftext($IMGVER_IMAGE, 24, 0, 20, 28, $IMGVER_COLOR_WHITE, $font, $text);\n //header(\"Content-type: image/jpeg\");\n imagejpeg($IMGVER_IMAGE);\n }", "title": "" }, { "docid": "69adf68e67434ddfb15775083896342f", "score": "0.58369976", "text": "public function activeCaptcha()\r\n\t{ \r\n\t\t$code = Y::controller()->createAction('captcha')->getVerifyCode();\r\n \r\n\t\tif ($code != $this->verifyCode) { \r\n \t$this->addError('verifyCode', 'Неправильный код проверки.');\r\n }\r\n \r\n if(!isset($_POST['ajax'])) {\r\n \tY::controller()->createAction('captcha')->getVerifyCode(true);\r\n }\r\n\t}", "title": "" }, { "docid": "93becb99a9355e538c313a33d77cfbe7", "score": "0.58073395", "text": "public function index(){\n\n $this->form_validation->set_rules('username','Username','required');\n $this->form_validation->set_rules('password','password','required');\n $this->form_validation->set_rules('userCaptcha', 'Captcha', 'required|callback_check_captcha');\n $userCaptcha = $this->input->post('userCaptcha');\n\n // Get the user's entered captcha value from the form\n $userCaptcha =$this->input->post('captcha');\n\n // Get the actual captcha value that we stored in the session\n $word = $this->session->userdata('captchaWord');\n\n if ($this->form_validation->run() == true){\n\n $data['username'] = $this->input->post('username');\n $data['password'] = md5($this->input->post('password'));\n\n\n $userExist = $this->Login_model->check_user_details($data);\n\n $sess_array = array();\n\n if($userExist)\n {\n // Clear the session variable\n $this->session->unset_userdata('captchaWord');\n $sess_array = array\n (\n 'username' => $userExist->username,\n 'id' => $userExist->id,\n );\n $this->session->set_userdata('logged_in', $sess_array);\n\n redirect('admin/dashboard');\n\n }\n else\n {\n // numeric random number for captcha\n $random_number = substr(number_format(time() * rand(),0,'',''),0,6);\n\n $vals = array(\n 'word' => $random_number,\n 'img_path' => 'uploads/captcha/',\n 'img_url' => base_url().'uploads/captcha/',\n 'font_path' => 'uploads/captcha/texb.ttf',\n 'img_width' => '150',\n 'img_height' => 30,\n 'expiration' => 7200,\n 'word_length' => 8,\n 'font_size' => 16,\n 'img_id' => 'Imageid',\n 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n\n // White background and border, black text and red grid\n 'colors' => array(\n 'background' => array(255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(0, 0, 0),\n 'grid' => array(255, 40, 40)\n )\n );\n\n // $captcha = create_captcha($vals);\n\n $data['captcha'] = create_captcha($vals);\n $data['error']=\"Please Enter Valid Username and Password..\";\n $this->load->view('admin/login', $data);\n }\n\n }else{\n // numeric random number for captcha\n $random_number = substr(number_format(time() * rand(),0,'',''),0,6);\n\n $vals = array(\n 'word' => $random_number,\n 'img_path' => 'uploads/captcha/',\n 'img_url' => base_url().'uploads/captcha/',\n 'font_path' => 'uploads/captcha/texb.ttf',\n 'img_width' => '150',\n 'img_height' => 30,\n 'expiration' => 7200,\n 'word_length' => 8,\n 'font_size' => 16,\n 'img_id' => 'Imageid',\n 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n\n // White background and border, black text and red grid\n 'colors' => array(\n 'background' => array(255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(0, 0, 0),\n 'grid' => array(255, 40, 40)\n )\n );\n $data['captcha'] = create_captcha($vals);\n\n $this->session->set_userdata('captchaWord',$data['captcha']['word']);\n $data['error']=\"Please Enter Valid Username and Password\";\n //echo $this->session->flashdata('success');\n //print_r($data);die;\n //print_r($data['captcha']);die;\n $this->load->view('admin/login', $data);\n }\n\n }", "title": "" }, { "docid": "a50295a445fd99e0cfbc12b6e9a98ed4", "score": "0.5790527", "text": "function captchaGD($captcha_unique_id) {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<input type=\"hidden\" id=\"regid\" name=\"captcha_unique_id\" value=\"{$captcha_unique_id}\" />\n<fieldset id='captcha' class='gd'>\n\t<ul class='ipsForm <if test=\"$this->request['section'] == 'register' || $this->request['section'] == 'lostpass'\">ipsForm_horizontal<else />ipsForm_vertical</if>'>\n\t\t<li class='ipsField'>\n\t\t\t<label class='ipsField_title'>{$this->lang->words['glb_captcha_image']} <span class='ipsForm_required'>*</span></label>\n\t\t\t<div class='ipsField_content'>\n\t\t\t\t<p class='clearfix'>\n\t\t\t\t\t<img id='gd-antispam' class='antispam_img left' src='{$this->settings['base_url']}app=core&amp;module=global&amp;section=captcha&amp;do=showimage&amp;captcha_unique_id={$captcha_unique_id}' />\n\t\t\t\t\t<a href='#' id='gd-image-link' class='ipsButton_secondary left' title=\"{$this->lang->words['captcah_new']}\"><img src='{$this->settings['img_url']}/icon_refresh.png' alt=\"{$this->lang->words['captcah_new']}\" /></a>\n\t\t\t\t</p>\n\t\t\t\t<input type=\"text\" class='input_text' size=\"36\" maxlength=\"20\" value=\"\" name=\"captcha_string\" tabindex='0' id='captcha_string' />\n\t\t\t</div>\n\t\t</li>\n\t</ul>\n</fieldset>\n<script type='text/javascript'>\n\tipb.global.initGD();\n\t$('captcha_string').defaultize( \"{$this->lang->words['captcha_string_enter']}\" );\n</script>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "6757e2204651ba914e67b779edb80dad", "score": "0.5785599", "text": "public function _make_captcha() {\n \n $pool = 'ABCDEFGHIJKLMNPQRSTUVWXYZ';\n\n $str = '';\n for ($i = 0; $i < 6; $i++)\n {\n $str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);\n }\n\n $word = $str;\n\n $this -> load -> helper('captcha');\n $vals = array(\n 'img_path' => './captcha/',\n 'img_url' => base_url() . 'captcha/',\n 'img_width' => 260,\n 'img_height' => 60,\n 'expiration' => 7200,\n 'text_color'=>\"#000000\",\n 'font_size' => 20,\n 'font_path' => base_url().'webadmin/front/fonts/LucidaSansUnicode.ttf',\n 'expiration' => 7200,\n 'word'=>$word \n );\n\n // Create captcha\n $cap = create_captcha($vals);\n\n // store captcha value on session \n $this->session->set_userdata('captcha',$cap['word']);\n\n // Write to DB\n if ($cap) {\n $data = array('captcha_time' => $cap['time'], 'ip_address' => $this -> input -> ip_address(), 'word' => $cap['word'], );\n $query = $this -> db -> insert_string('captcha', $data);\n $this -> db -> query($query);\n } else {\n return \"Umm captcha not work\";\n }\n return $cap['image'];\n }", "title": "" }, { "docid": "ab18cc1959b4edd5871cd347b06581ee", "score": "0.5771585", "text": "private function __textCaptcha($key)\n {\n //获取相关配置\n $settings = $this->getCaptchaCfg('settings');\n //初始化验证码\n $captcha = new Captcha();\n $vcode = $captcha->gnrt($settings);\n $sensitive = $this->getCaptchaCfg('sensitive');\n $vcode = $sensitive ? $vcode : Str::lower($vcode);\n //存储验证码\n $hasher = new Hasher;\n $session = session();\n $hash = $hasher->make($vcode);\n $session->put($key, $hash);\n $session->save();\n //输出验证码\n $captcha->img();\n exit;\n }", "title": "" }, { "docid": "4bf3306d22d23c3839dff1d98662a487", "score": "0.5766344", "text": "public function captchaPassed() {\n $this->authModel->captchaPassed($_SERVER['REMOTE_ADDR']);\n }", "title": "" }, { "docid": "d83fd057f77bcdf37f973d1ba839fc86", "score": "0.57644516", "text": "protected function postProcessSettings()\n {\n if (Tools::isSubmit('submitNocaptcharecaptchaModule')) {\n $formValues = $this->getConfigFormValues();\n\n foreach (array_keys($formValues) as $key) {\n if (Tools::isSubmit($key)) {\n if (($key == static::PUBLIC_KEY) && !Tools::getValue($key) ||\n ($key == static::PRIVATE_KEY) && !Tools::getValue($key)\n ) {\n $this->uninstallOptionalOverrides();\n\n $this->addError($this->l('Site key and secret are required!'), true);\n\n return;\n } else {\n if ($key == static::ATTEMPTS) {\n if (Validate::isInt(Tools::getValue($key))) {\n Configuration::updateValue(static::ATTEMPTS, (int) Tools::getValue($key));\n RecaptchaVisitor::resetAllAttempts((int) Tools::getValue($key));\n } else {\n $this->addError(sprintf($this->l('The %s field is invalid.'), 'login attempts'), true);\n\n return;\n }\n } elseif ($key == static::ADMINLOGIN) {\n $adminLogin = (bool) Tools::getValue(static::ADMINLOGIN);\n if ($adminLogin != Configuration::get(static::ADMINLOGIN)) {\n if ($adminLogin) {\n $this->installAdminLoginOverride();\n } else {\n $this->uninstallAdminLoginOverride();\n }\n }\n } elseif ($key == static::LOGIN || $key == static::CREATE) {\n $this->manageAuthOverride(Tools::getValue(static::LOGIN), Tools::getValue(static::CREATE));\n } elseif ($key == static::PASSWORD) {\n $this->managePasswordOverride(Tools::getValue(static::PASSWORD));\n } elseif ($key == static::CONTACT) {\n $this->manageContactOverride(Tools::getValue(static::CONTACT));\n } else {\n Configuration::updateValue($key, Tools::getValue($key));\n }\n }\n }\n }\n\n if (empty($this->context->controller->errors)) {\n $this->addConfirmation($this->l('Settings successfully updated'));\n }\n }\n }", "title": "" }, { "docid": "90644e22b2a948d4abc9d8048ddb2591", "score": "0.5757645", "text": "public function captcha(){\n\t\theader('Content-type:image/jpeg');\n\t\t$width=100;\n\t\t$height=30;\n\t\t$string='';//Define variable to save font\n\t\t$img=imagecreatetruecolor($width, $height);\n\t\t$arr=array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9');\n\t\t//Generate colored pixels \n\t\t$colorBg=imagecolorallocate($img,rand(200,255),rand(200,255),rand(200,255));\n\t\t//Fill color\n\t\timagefill($img, 0, 0, $colorBg);\n\t\t//The loop, loop draw background interference points\n\t\tfor($m=0;$m<=100;$m++){\n\t\t $pointcolor=imagecolorallocate($img,rand(0,255),rand(0,255),rand(0,255));\n\t\t imagesetpixel($img,rand(0,$width-1),rand(0,$height-1),$pointcolor);\n\t\t}\n\t\t//Draw interference lines in a loop\n\t\t/*for ($i=0;$i<=4;$i++){\n\t\t $linecolor=imagecolorallocate($img,rand(0,255),rand(0,255),rand(0,255));\n\t\t imageline($img,rand(0,$width),rand(0,$height),rand(0,$width),rand(0,$height),$linecolor);\n\t\t}*/\n\t\tfor($i=0;$i<4;$i++){\n\t\t\t$string.=$arr[rand(0,count($arr)-1)];\n\t\t}\n\t\t$_SESSION['captcha'] = $string;\n\t\t$colorString=imagecolorallocate($img,rand(10,100),rand(10,100),rand(10,100));\n\t\timagestring($img,5,rand(0,$width-36),rand(0,$height-15),$string,$colorString);\n\t\t//Output picture to browser\n\t\timagejpeg($img);\n\t\t//Destroy, release resources\n\t\timagedestroy($img);\n\t}", "title": "" }, { "docid": "b75ac0340cc67fcfb0165b4ce3279c66", "score": "0.57220393", "text": "public function checkCaptcha($input);", "title": "" }, { "docid": "fea645bc245bc049cd330fd74968ff60", "score": "0.56696206", "text": "public function captcha() {\n\t\t$expiration = time() - 7200;// Two hour limit\n\t\t$this->CI->db->query(\"DELETE FROM captcha WHERE captcha_time < \" . $expiration);\n\n\t\t// Then see if a captcha exists:\n\t\t$sql = \"SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?\";\n\t\t$binds = array($_POST['captcha'], $this->CI->input->ip_address(), $expiration);\n\t\t$query = $this->CI->db->query($sql, $binds);\n\t\t$row = $query->row();\n\n\t\tif ($row->count == 0) {\n\t\t\t$this->set_message('captcha', lang('captcha_err'));\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "84a3d79af727956dfa2a8bada9ea342c", "score": "0.56602734", "text": "function _captcha_check()\n\t{\n\t\tif ($this->input->post('captcha') == 'notabot')\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telseif ($this->input->post('captcha') != 'notabot')\n\t\t{\n\t\t\t$this->form_validation->set_message('captcha_check', 'You didn\\'t pass the spam check, please contact us to post a comment.');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "e798ad462a7c44ee375cef7edfa46b6f", "score": "0.565215", "text": "protected function postProcessAdvancedSettings()\n {\n if (Tools::isSubmit('submitRecaptchaAdvanced')) {\n if (Tools::isSubmit(static::LOGINSELECT)) {\n $loginSelect = Tools::getValue(static::LOGINSELECT);\n if (!empty($loginSelect)) {\n Configuration::updateValue(static::LOGINSELECT, $loginSelect);\n } else {\n $this->addError(sprintf($this->l('The %s jQuery selector is invalid'), $this->l('Login')), true);\n }\n }\n if (Tools::isSubmit(static::LOGINPOS)) {\n Configuration::updateValue(static::LOGINPOS, Tools::getValue(static::LOGINPOS));\n }\n if (Tools::isSubmit(static::LOGINHTML)) {\n $this->updateHTMLValue('loginCaptcha', 'login', $this->l('Login'), static::LOGINHTML);\n }\n if (Tools::isSubmit(static::CREATESELECT)) {\n $createSelect = Tools::getValue(static::CREATESELECT);\n if (!empty($createSelect)) {\n Configuration::updateValue(static::CREATESELECT, $createSelect);\n } else {\n $this->addError(sprintf($this->l('The %s jQuery selector is invalid'), $this->l('Register')), true);\n }\n }\n if (Tools::isSubmit(static::CREATEPOS)) {\n Configuration::updateValue(static::CREATEPOS, Tools::getValue(static::CREATEPOS));\n }\n if (Tools::isSubmit(static::CREATEHTML)) {\n $this->updateHTMLValue('createCaptcha', 'create', $this->l('Register'), static::CREATEHTML);\n }\n if (Tools::isSubmit(static::PASSWORDSELECT)) {\n $passwordSelect = Tools::getValue(static::PASSWORDSELECT);\n if (!empty($passwordSelect)) {\n Configuration::updateValue(static::PASSWORDSELECT, $passwordSelect);\n } else {\n $this->addError(sprintf($this->l('The %s jQuery selector is invalid'), $this->l('Password')), true);\n }\n }\n if (Tools::isSubmit(static::PASSWORDPOS)) {\n Configuration::updateValue(static::PASSWORDPOS, Tools::getValue(static::PASSWORDPOS));\n }\n if (Tools::isSubmit(static::PASSWORDHTML)) {\n $this->updateHTMLValue('passwordCaptcha', 'password', $this->l('Password'), static::PASSWORDHTML);\n }\n if (Tools::isSubmit(static::CONTACTSELECT)) {\n $contactSelect = Tools::getValue(static::CONTACTSELECT);\n if (!empty($contactSelect)) {\n Configuration::updateValue(static::CONTACTSELECT, $contactSelect);\n } else {\n $this->addError(sprintf($this->l('The %s jQuery selector is invalid'), $this->l('Contact')), true);\n }\n }\n if (Tools::isSubmit(static::CONTACTPOS)) {\n Configuration::updateValue(static::CONTACTPOS, Tools::getValue(static::CONTACTPOS));\n }\n if (Tools::isSubmit(static::CONTACTHTML)) {\n $this->updateHTMLValue('contactCaptcha', 'contact', $this->l('Contact'), static::CONTACTHTML);\n }\n if (Tools::isSubmit(static::OPCLOGINSELECT)) {\n $opcLoginSelect = Tools::getValue(static::OPCLOGINSELECT);\n if (!empty($opcLoginSelect)) {\n Configuration::updateValue(static::OPCLOGINSELECT, $opcLoginSelect);\n } else {\n $this->addError(sprintf($this->l('The %s jQuery selector is invalid'), $this->l('OPC Login')), true);\n }\n }\n if (Tools::isSubmit(static::OPCLOGINPOS)) {\n Configuration::updateValue(static::OPCLOGINPOS, Tools::getValue(static::OPCLOGINPOS));\n }\n if (Tools::isSubmit(static::OPCLOGINHTML)) {\n $this->updateHTMLValue('loginCaptcha', 'login', $this->l('OPC Login'), static::OPCLOGINHTML);\n }\n if (Tools::isSubmit(static::OPCCREATESELECT)) {\n $opcCreateSelect = Tools::getValue(static::OPCCREATESELECT);\n if (!empty($opcCreateSelect)) {\n Configuration::updateValue(static::OPCCREATESELECT, $opcCreateSelect);\n } else {\n $this->addError(sprintf($this->l('The %s jQuery selector is invalid'), $this->l('OPC Register')), true);\n }\n }\n if (Tools::isSubmit(static::OPCCREATEPOS)) {\n Configuration::updateValue(static::OPCCREATEPOS, Tools::getValue(static::OPCCREATEPOS));\n }\n if (Tools::isSubmit(static::OPCCREATEHTML)) {\n $this->updateHTMLValue('createCaptcha', 'create', $this->l('OPC Register'), static::OPCCREATEHTML);\n }\n if (Tools::isSubmit(static::EXTRACSS)) {\n $extraCss = Tools::getValue(static::EXTRACSS);\n if (!empty($extraCss)) {\n if (!file_put_contents($this->local_path.'views/css/extra.css', $extraCss)) {\n $this->addError($this->l('Couldn\\'t save CSS file'), true);\n }\n } elseif (file_exists($this->local_path.'views/css/extra.css')) {\n if (!@unlink($this->local_path.'views/css/extra.css')) {\n $this->addError($this->l('Couldn\\'t clear CSS file'), true);\n }\n }\n }\n\n if (empty($this->context->controller->errors)) {\n $this->addConfirmation($this->l('Advanced settings successfully updated'));\n }\n }\n }", "title": "" }, { "docid": "554e793eab61d2ddd1cdd7ead4d6827f", "score": "0.5651248", "text": "function fCaptcha($ruta='nucleo/tmp/'){\n\t$captcha = imagecreatetruecolor(120,35);\n\t$color = rand(128,160);\n\t$background_color = imagecolorallocate($captcha, $color, $color, $color);\n\timagefill($captcha, 0, 0, $background_color);\n\t\n\t#draw some lines\n\tfor($i=0;$i<10;$i++){\n\t\t$color = rand(48,96);\n\t\timageline($captcha, rand(0,130),rand(0,35), rand(0,130), rand(0,35),imagecolorallocate($captcha, $color, $color, $color));\n\t}\n\t\n\t#generate a random string of 5 characters\n\t$string = fClaveAleatoria();\n $nombre= fClaveAleatoria(10);\n\t#make string uppercase and replace \"O\" and \"0\" to avoid mistakes\n\t$string = strtoupper($string);\n\n\t#save string in session \"captcha\" key\n if(file_exists($ruta.$_SESSION[\"imagenCaptcha\"].\".jpg\")){\n unlink($ruta.$_SESSION[\"imagenCaptcha\"].\".jpg\");\n }\n $imagen=$ruta.$nombre.\".jpg\";\n\t$_SESSION[\"captcha\"]=$string;\n $_SESSION[\"imagenCaptcha\"]=$nombre;\n\t#place each character in a random position\n\tputenv('GDFONTPATH=' . realpath('.'));\n\t$font = 'arial.ttf';\n\tfor($i=0;$i<5;$i++){\n\t\t$color = rand(0,32);\n\t\tif(file_exists($font)){\n\t\t\t$x=4+$i*23+rand(0,6);\n\t\t\t$y=rand(18,28);\n\t\t\timagettftext ($captcha, 15, rand(-25,25), $x, $y, imagecolorallocate($captcha, $color, $color, $color), $font, $string[$i]);\n\t\t}else{\n\t\t\t$x=5+$i*24+rand(0,6);\n\t\t\t$y=rand(1,18);\n\t\t\timagestring($captcha, 5, $x, $y, $string[$i], imagecolorallocate($captcha, $color, $color, $color));\n\t\t}\n\t}\n\t\n\t#applies distorsion to image\n\t$matrix = array(array(1, 1, 1), array(1.0, 7, 1.0), array(1, 1, 1));\n\timageconvolution($captcha, $matrix, 16, 32);\n\timagejpeg($captcha,$imagen);\n return \"<div id='cpt'><img src='$imagen' class='captcha' id='captcha'/>\".fCampo(capt,\"Ingrese el Texto de la Imagen\",texto).fAjax(captcha,click,captcha,cpt,null,\"u=0\").\"</div>\";\n}", "title": "" }, { "docid": "4b9586d72ad0e34929d02ef2e656e942", "score": "0.5646433", "text": "function _admincaptcha() {\r\n global $conf,$lang;\r\n //return \"Not Done Yet\";\r\n/*\r\ncaptcha:length=5\r\ncaptcha:height=30\r\ncaptcha:square=1\r\ncaptcha:chars=ABCDFGHJKLMNPQRSTUVWXY23456789\r\ncaptcha:bgcolor=trans\r\ncaptcha:lines=1\r\ncaptcha:over=0\r\n*/\r\n\r\n $a = $conf['database']['db'] -> query(\"SELECT `config` FROM `{$conf['database']['pref']}config` WHERE `config` like '%captcha%'\");\r\n $a = $conf['database']['db'] -> fetch($a, 'array');\r\n \r\n\t\t$r = null;\r\n\t\t\r\n\t\tif ( isset ( $_POST['del'] ) )\r\n\t\t\t{\r\n\t\t\t\t$_POST['del'] = secure($_POST['del']);\r\n\t\t\t\tif ( $conf['database']['db'] -> query ($q = \"DELETE FROM `{$conf['database']['pref']}config` WHERE `config` = '{$_POST['del']}' LIMIT 1\") )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= sprintf($lang['admin']['deleted'],$_POST['del']) . \"<br>\";\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= sprintf($lang['admin']['errdeleted'],$_POST['del']) . \"<br>\";\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\tif ( isset ( $_POST['make'] ) ) \r\n\t\t\t{\r\n\t\t\t\tif ( is_array ( $_POST['make'] ) ) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$conp = $_POST['make'][0];\r\n\t\t\t\t\t\t$_POST['make'] = secure($_POST['make'][0] . '=' . $_POST['make'][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$_POST['make'] = secure($_POST['make']);\r\n\t\t\t\t\t\t$conp = secure($_POST['make']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( $conf['database']['db'] -> query ( $q = \"INSERT INTO `{$conf['database']['pref']}config` ( `config` ) \\n VALUES ( '{$_POST['make']}' );\") )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= sprintf($lang['admin']['updated'],$conp) . \"<br>\";\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$r .= sprintf($lang['admin']['errupdated'],$conp) . \"<br>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$r .= renew(5,$conf['site']['url'] . \"admin/module/captcha\");\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$r.= \"<br><table>\";\r\n\t\t\t\t\r\n\t\t\t\tfor ( $i=0; $i<sizeof($a); $i++ )\r\n\t\t\t\t{\r\n\t\t\t\t\tpreg_match_all(\"#(.*)\\:(.*)=(.*)#\",$a[$i]['config'],$out);\r\n\t\t\t\t\t$ex = explode(\"=\",$a[$i]['config']);\r\n\t\t\t\t\tif ( !isset ( $ex[1] ) ) $ex[1]=null;\r\n\t\t\t\t\t$r .= \"<tr><td>{$ex[0]}</td><td><form method='post' action='{$conf['site']['url']}admin/module/captcha'><input type='hidden' name='del' value='{$a[$i]['config']}'><input type='hidden' name='make[]' value='{$ex[0]}'><input type='text' name='make[]' value='{$ex[1]}'></td><td><input type='submit' value='{$lang['admin']['save']}'></form></td></tr>\";\r\n}\r\n\t\t\t\t$r .= \"</table>\";\r\n\t\t}\r\n\t\treturn $r;\r\n}", "title": "" }, { "docid": "e206f7966cc95bc97158e1e007597383", "score": "0.5636241", "text": "public function captcha($tmp)\n {\n //生成验证码图片的Builder对象,配置相应属性\n $builder = new CaptchaBuilder;\n //可以设置图片宽高及字体\n $builder->build($width = 115, $height = 35, $font = null);\n //获取验证码的内容\n $phrase = $builder->getPhrase();\n\n //把内容存入session\n Session::flash('code', $phrase);\n //生成图片\n header(\"Cache-Control: no-cache, must-revalidate\");\n header('Content-Type: image/jpeg');\n $builder->output();\n }", "title": "" }, { "docid": "33f4579217a23217ce2b7d752f099c8a", "score": "0.5633991", "text": "private function validate_si_captcha()\n {\n if ( class_exists( 'ReallySimpleCaptcha' ) ) \n {\n\n }else{\n return true;\n }\n\n }", "title": "" }, { "docid": "14d425d8ffd8f463c8ddc411819cec6d", "score": "0.5621827", "text": "static function captcha()\n {\n // https://gist.github.com/raywint/6200891\n\n session_start();\n header(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"); \n header(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\"); \n header(\"Cache-Control: no-store, no-cache, must-revalidate\"); \n header(\"Cache-Control: post-check=0, pre-check=0\", false); \n header(\"Pragma: no-cache\"); \n\n $characters = '23456789abcdefghijkmnpqrstuvwxyz';\n $text = '';\n for($i=0; $i<5; $i++) // getting the required random 5 characters\n $text[$i] = $characters[rand(0, strlen($characters)-1)];\n $_SESSION['captcha'] = $text; // assigning the text into session\n\n $image = imagecreate(90,30);\n $background = imagecolorallocate($image,208,208,208);\n $color = imagecolorallocate($image,64,64,64); // text color\n $line_color = imagecolorallocate($image, 128, 128, 128);\n\n $font = realpath('consolab.ttf'); // setting the font path\n imagettftext($image, 19, 0, 9, 22, $color, $font, $text);\n\n for($i=0; $i<8; $i++){ // FOR LOOP FOR CREATING RANDOM LINES\n $x1 = rand( 0, 29); $y1 = rand(0, 29); // RANDOM STARTING, ENDING POSITION \n $x2 = rand(60, 89); $y2 = rand(0, 29);\n imageline($image, $x1, $y1, $x2, $y2, $line_color); // RANDOM LINE\n }\n\n header('Content-Type: image/png'); // setting the content type as png\n imagepng($image);\n imagedestroy($image);\n\n }", "title": "" }, { "docid": "655be3cca2b44469eaef06da2fb6355a", "score": "0.5621748", "text": "function get_captcha_html() {\n $r = rand(100, 500);\n $s = rand(1, 5);\n $challenge_id = strtoupper('CAPTCHA_CHALLENGE_' . uniqid());\n Yii::app()->session[$challenge_id] = \"\" . ($r + $s);\n Yii::log($challenge_id . \" ==> \" . Yii::app()->session[$challenge_id], CLogger::LEVEL_INFO, \"get_captcha_html\");\n\n $obf_r = \"\";\n $str_r = $r + \"\";\n for ($i = 0; $i < strlen($str_r); $i++) {\n $obf_r .= \"<script>document.write(\\\"\" . mb_substr($str_r, $i, 1) . \"\\\");</script>\";\n }\n\n return '<span class=\"CHALLENGE_QUESTION\">' . $obf_r . ' plus ' . $s . ' ist gleich </span>' .\n '<input type=\"hidden\" value=\"' . $challenge_id . '\" name=\"CHALLENGE_ID\" />' .\n '<input size=\"8\" name=\"CHALLENGE_ANSWER\" id=\"challenge_answer\" type=\"text\" maxlength=\"255\" value=\"\" />';\n }", "title": "" }, { "docid": "b40021d464c095e5b72639c7e87d0081", "score": "0.5604297", "text": "function _create_captcha()\n {\n $this->load->helper('captcha');\n\n $cap = create_captcha(array(\n 'img_path'\t\t=> $this->config->item('captcha_path', 'tank_auth'),\n 'img_url'\t\t=> base_url().$this->config->item('captcha_path', 'tank_auth'),\n 'font_path'\t\t=> $this->config->item('captcha_fonts_path', 'tank_auth'),\n 'font_size'\t\t=> $this->config->item('captcha_font_size', 'tank_auth'),\n 'img_width'\t\t=> $this->config->item('captcha_width', 'tank_auth'),\n 'img_height'\t=> $this->config->item('captcha_height', 'tank_auth'),\n 'show_grid'\t\t=> $this->config->item('captcha_grid', 'tank_auth'),\n 'expiration'\t=> $this->config->item('captcha_expire', 'tank_auth'),\n ));\n\n // Save captcha params in session\n $this->session->set_flashdata(array(\n 'captcha_word' => $cap['word'],\n 'captcha_time' => $cap['time'],\n ));\n\n return $cap['image'];\n }", "title": "" }, { "docid": "95e87f0c6592a2d1b6c1ee260da1ce32", "score": "0.56019896", "text": "function template_control_verification_honeycaptcha($verify_id, $verify_context)\n{\n\tglobal $context, $txt;\n\n\techo '\n\t\t\t<div class=\"visual_verification\">';\n\n\tif ($verify_context['use_graphic_library'])\n\t\techo '\n\t\t\t\t<img src=\"', $verify_context['image_href'], '\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '\" />';\n\telse\n\t\techo '\n\t\t\t\t<img src=\"', $verify_context['image_href'], ';letter=1\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '_1\" />\n\t\t\t\t<img src=\"', $verify_context['image_href'], ';letter=2\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '_2\" />\n\t\t\t\t<img src=\"', $verify_context['image_href'], ';letter=3\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '_3\" />\n\t\t\t\t<img src=\"', $verify_context['image_href'], ';letter=4\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '_4\" />\n\t\t\t\t<img src=\"', $verify_context['image_href'], ';letter=5\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '_5\" />\n\t\t\t\t<img src=\"', $verify_context['image_href'], ';letter=6\" alt=\"', $txt['visual_verification_description'], '\" id=\"verification_image_', $verify_id, '_6\" />';\n\n\techo '\n\t\t\t\t<div class=\"smalltext\" style=\"margin: 4px 0 8px 0;\">\n\t\t\t\t\t<a href=\"', $verify_context['image_href'], ';sound\" id=\"visual_verification_', $verify_id, '_sound\" rel=\"nofollow\">', $txt['visual_verification_sound'], '</a> / <a href=\"#visual_verification_', $verify_id, '_refresh\" id=\"visual_verification_', $verify_id, '_refresh\">', $txt['visual_verification_request_new'], '</a><br /><br />\n\t\t\t\t\t', $txt['visual_verification_description'], ':\n\t\t\t\t\t<input type=\"text\" name=\"', $verify_id, '_vv[code]\" value=\"', !empty($verify_context['text_value']) ? $verify_context['text_value'] : '', '\" size=\"30\" tabindex=\"', $context['tabindex']++, '\" class=\"', $verify_context['is_error'] ? 'border_error ' : '', 'input_text\" />\n\t\t\t\t</div>\n\t\t\t</div>';\n}", "title": "" }, { "docid": "bb67205e8e9bb80eded0c2d0d191e7b3", "score": "0.55923975", "text": "function onCaptchaFormSubmit()\r\n\t{\t\r\n\t\t$app =& JFactory::getApplication();\r\n\t\t$this->ccap_policy->start_captcha_page();\r\n\t\t$check = $this->ccap_policy->check_form($_REQUEST);\r\n\t\t\r\n\t\tif (!$check) {\r\n\t\t\t$app->enqueueMessage('CAPTCHA failed - please try again.', 'error');\r\n\t\t\treturn false; // block form submit\r\n\t\t}\r\n\r\n\t\treturn true; // allow form submit\r\n\t\t\r\n\t}", "title": "" }, { "docid": "0519c7f01b2017f562aca395e6e251ce", "score": "0.5562397", "text": "function EnterCaptcha($captchaImg, $inputs, $captchaSize = '5') {\n\techo \"\\n<form name='captcha' method='POST'>\\n\";\n\tforeach ($inputs as $name => $input) echo \"\\t<input type='hidden' name='$name' id='$name' value='$input' />\\n\";\n\techo \"\\t<h4>\" . lang(301) . \" <img alt='CAPTCHA Image' src='$captchaImg' /> \" . lang(302) . \": <input type='text' name='captcha' size='$captchaSize' />&nbsp;&nbsp;\\n\\t\\t<input type='submit' onclick='return check();' value='Enter Captcha' />\\n\\t</h4>\\n\\t<script type='text/javascript'>/* <![CDATA[ */\\n\\t\\tfunction check() {\\n\\t\\t\\tvar captcha=document.dl.captcha.value;\\n\\t\\t\\tif (captcha == '') {\\n\\t\\t\\t\\twindow.alert('You didn\\'t enter the image verification code');\\n\\t\\t\\t\\treturn false;\\n\\t\\t\\t} else return true;\\n\\t\\t}\\n\\t/* ]]> */</script>\\n</form>\\n</body>\\n</html>\";\n}", "title": "" }, { "docid": "a8139d703907c50c569d9558a8fb577a", "score": "0.55370164", "text": "function Captcha_API($inside_sendstudio=false)\n\t{\n\t\t// Detect if the server has GD installed or not\n\t\t// Set variables for later use\n\t\tif (function_exists('imageCreateFromPNG')) {\n\t\t\t$this->type = 'dynamic';\n\t\t}else{\n\t\t\t$this->type = 'static';\n\t\t}\n\n\t\t// all variables\n\t\t$this->length\t\t= 6;\n\n\t\t// img captcha variables\n\t\t$this->imgDir = SENDSTUDIO_FORM_DESIGNS_DIRECTORY . '/captcha';\n\n\t\t// gd type captcha variables\n\t\t$this->fontPath\t\t= SENDSTUDIO_FORM_DESIGNS_DIRECTORY . '/captcha/captcha.ttf';\n\n\t\t$this->fontSize\t\t= '12';\n\t\t$this->textColor\t= '000000';\n\n\t\t$this->inside_sendstudio = (bool)$inside_sendstudio;\n\n\t\t// $this->bgCol1\t\t= '#ffffff';\n\t\t// $this->bgCol2\t\t= '#ffffff';\n\t\t// $this->bgFillStyle\t= '';\n\t}", "title": "" }, { "docid": "6bd35f38b7ec7f43fd773198a40b8748", "score": "0.55181456", "text": "public function go(){\n try{\n $captcha = $this->getParam('captcha');\n $username = $this->getParam('username');\n $password = $this->getParam('password');\n\n $this->response('Username => '.$username.PHP_EOL);\n $this->response('Password => '.$password.PHP_EOL);\n $this->response('Captcha => '.$captcha.PHP_EOL);\n }catch (Throwable $e){\n\t\t\t$this->error($e);\n\t\t}\n }", "title": "" }, { "docid": "15dc663d434afed4476cc9d3fe26e130", "score": "0.5512365", "text": "public function generate(): CaptchaForm;", "title": "" }, { "docid": "39c2123f775929b53dc053be47980225", "score": "0.55081666", "text": "function validateFormCaptcha($abort_on_failure = false)\r\n{\r\n global $auth;\r\n if($key= get('captcha_key')) {\r\n $captcha_input= get('captcha_input');\r\n\r\n $should_be= substr(md5( $key . $auth->cur_user->identifier ), 0, 5);\r\n\r\n\r\n if($captcha_input == $should_be) {\r\n return true;\r\n }\r\n else {\r\n if($abort_on_failure) {\r\n global $PH;\r\n $PH->abortWarning(__(\"Sorry, but the entered number did not match\"));\r\n }\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "0dd29d999cf90c5c58729256b46371ca", "score": "0.54845047", "text": "function captcha_form_result_($Form){\n\t\tif($CI->gears->captcha->mistakes && $CI->session->get('form_fail') <= (int)$CI->gears->captcha->mistakes) return;\n\t\tif(in_array($Form->name,explode(',',$Form->gears->captcha->forms))){\n\t\t\t$Form->captcha('captcha');\n\t\t}\n\t}", "title": "" }, { "docid": "c144148ef90c990a1e347f8268cab2ae", "score": "0.545362", "text": "private function load_captchabestwebsoft()\n {\n \n if ( function_exists( 'cptch_register_form' ) ) \n {\n\n ob_start();\n if( function_exists( 'cptch_display_captcha_custom' ) ) { \n echo \"<input type='hidden' name='cntctfrm_contact_action' value='true' />\"; \n echo cptch_display_captcha_custom();\n }; \n if( function_exists( 'cptchpr_display_captcha_custom' ) ) { \n echo \"<input type='hidden' name='cntctfrm_contact_action' value='true' />\"; \n echo cptchpr_display_captcha_custom(); \n };\n\n $display = ob_get_clean();\n return $display;\n } \n else\n {\n return '';\n } \n }", "title": "" }, { "docid": "c65017bd75fa6d798ee2d653acf1b12c", "score": "0.5452914", "text": "function onCaptchaFormDisplay() \r\n\t{\r\n\t\tif ($this->params->get('load_jquery',1)) {\r\n\t\t\t$document =& JFactory::getDocument();\r\n\t\t\t$headData = $document->getHeadData();\r\n\t\t\t$headData['scripts']['http://code.jquery.com/jquery-1.4.2.min.js'] = 'text/javascript';\r\n\t\t\t$headData['script']['text/javascript'] = \"jQuery.noConflict();\\n\" . $headData['script']['text/javascript'];\r\n\t\t\t$document->setHeadData($headData);\r\n\t\t}\r\n\t\t\r\n\t\t$this->ccap_policy->reset();\r\n\t\t$ccap_captcha = $this->ccap_policy->create_visual($this->ccap_callback_url, $this->ccap_options);\r\n\t\treturn $ccap_captcha;\r\n\t}", "title": "" }, { "docid": "bb3ac31ccf92503c02c64df90049c6dd", "score": "0.54477954", "text": "function provjeraRecaptcha()\n{\n $response = $_POST[\"g-recaptcha-response\"];\n\t$url = 'https://www.google.com/recaptcha/api/siteverify';\n\t$data = array(\n\t\t'secret' => '6LcGgx8UAAAAADLu8bjERhjvICwANBHptdihi8Ay',\n\t\t'response' => $_POST[\"g-recaptcha-response\"]\n\t);\n}", "title": "" }, { "docid": "253b03fb9da11862fac6e2745bafe51f", "score": "0.5431625", "text": "public function captchaFailed() {\n $this->authModel->captchaFailed($_SERVER['REMOTE_ADDR']);\n }", "title": "" }, { "docid": "318e370489d44088149b5ae506a2f65c", "score": "0.54313534", "text": "public function do_captcha_generator(){\n $params = array(\n 'img_path' => 'assets/images/',\n 'img_url' => base_url().'assets/images/',\n 'img_width' => '138',\n 'img_height' => 34,\n 'font_size' => 24,\n 'word_length' => 5,\n 'colors' => array(\n 'background' => array(255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(0, 0, 0),\n 'grid' => array(255, 255, 255)\n ),\n 'pool' => '23456789abcdefghjkmnpqrstuvwxyz',\n );\n\n /* Generate the captcha */\n $captcha = create_captcha($params);\n\n return $captcha;\n\n }", "title": "" }, { "docid": "f7e0ae6bf638a8cf07b3a28f910a50ba", "score": "0.5422664", "text": "function post_captcha($user_response) {\n $fields_string = '';\n $fields = array(\n 'secret' => '6LekdkQUAAAAANV73lGPAPbx64ElUzFXNF3YPSlB',\n 'response' => $user_response\n );\n foreach($fields as $key=>$value)\n $fields_string .= $key . '=' . $value . '&';\n $fields_string = rtrim($fields_string, '&');\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify');\n curl_setopt($ch, CURLOPT_POST, count($fields));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, True);\n \n $result = curl_exec($ch);\n curl_close($ch);\n \n return json_decode($result, true);\n }", "title": "" }, { "docid": "4c35e5b9d94d6449c972e8cc8d0658e5", "score": "0.54119", "text": "public function checkCaptcha() {\n if ($this->input->post('input_captcha_value') == $this->session->userdata('security_answer')) {\n echo 'true';\n } else {\n echo 'false';\n }\n }", "title": "" }, { "docid": "a97d33b11f1387828914fdeccb7990ee", "score": "0.53907764", "text": "function rec($site_key,$co,$sa,$loc) {\n $ua = $_SERVER['HTTP_USER_AGENT'];\n $head = array(\n 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',\n 'Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2'\n );\n $l=\"https://www.google.com/recaptcha/api.js\";\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $loc);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $h = curl_exec($ch);\n curl_close($ch);\n $t1=explode(\"releases/\",$h);\n $t2=explode(\"/\",$t1[1]);\n $v=$t2[0];\n $cb=\"123456789\";\n $l2=\"https://www.google.com/recaptcha/api2/anchor?ar=1&k=\".$site_key.\"&co=\".$co.\"&hl=ro&v=\".$v.\"&size=invisible&cb=\".$cb;\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l2);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $loc);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt($ch, CURLOPT_HEADER, 1);\n $h = curl_exec($ch);\n curl_close($ch);\n $h=str_replace('\\x22','\"',$h);\n $t1=explode('recaptcha-token\" value=\"',$h);\n $t2=explode('\"',$t1[1]);\n $c=$t2[0];\n $l6=\"https://www.google.com/recaptcha/api2/reload?k=\".$site_key;\n $p=array('v' => $v,\n 'reason' => 'q',\n 'k' => $site_key,\n 'c' => $c,\n 'sa' => $sa,\n 'co' => $co);\n $post=http_build_query($p);\n $head=array(\n 'Accept: */*',\n 'Accept-Language: ro-RO,ro;q=0.8,en-US;q=0.6,en-GB;q=0.4,en;q=0.2',\n 'Accept-Encoding: deflate',\n 'Content-Type: application/x-www-form-urlencoded;charset=utf-8',\n 'Content-Length: '.strlen($post).'',\n 'Connection: keep-alive');\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $l6);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERAGENT, $ua);\n curl_setopt($ch, CURLOPT_REFERER, $l2);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $head);\n curl_setopt ($ch, CURLOPT_POST, 1);\n curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);\n $h = curl_exec($ch);\n curl_close($ch);\n $t1=explode('rresp\",\"',$h);\n $t2=explode('\"',$t1[1]);\n $r=$t2[0];\n return $r;\n}", "title": "" }, { "docid": "62db7b2244938c2736db3fc53ea45ef6", "score": "0.5384191", "text": "function onCheckAnswer($code)\n\t{\n\t\t$solution = Factory::getApplication()->input->getString('bfsecurimage_response_field');\n\t\tif (empty($solution))\n\t\t{\n\t\t\tthrow new \\RuntimeException(Text::_('PLG_BFSECURIMAGE_ERROR_EMPTY_SOLUTION'), 500);\n\t\t}\n\n\t\trequire_once __DIR__ . '/bfsecurimagehelper.php';\n\t\t$securImage = plgCaptchaBFSecurimageHelper::getSecureimageInstance();\n\t\t$result = $securImage->check($solution);\n\t\tif (!$result)\n\t\t{\n\t\t\tthrow new \\RuntimeException(Text::_('PLG_BFSECURIMAGE_ERROR_INCORRECT_CAPTCHA_SOL'), 500);\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "19400be65bb9ae4aad2c8288375d1b3a", "score": "0.53791344", "text": "function ShowCaptcha()\n\t{\n\t\t$tpl = GetTemplateSystem();\n\t\t$tpl->Assign('captcha_baseurl', SENDSTUDIO_RESOURCES_URL . '/form_designs/captcha/index.php');\n\t\t$tpl->Assign('captcha_length', $this->length);\n\t\t$tpl->Assign('captcha_dynamic', ($this->type == 'dynamic'));\n\t\t$tpl->Assign('captcha_session', (!$this->inside_sendstudio && !$this->modify_details));\n\n\t\treturn $tpl->ParseTemplate('captcha_code', true);\n\t}", "title": "" }, { "docid": "c7d9b46cf4fe08a4dabd35cde4099294", "score": "0.5328461", "text": "protected auto_detect_fields(){\n\t\t// If response is not set, auto detect it from the global POST variable\n\t\tif(empty($this->RESPONSE) && isset($_POST['capcode'])){\n\t\t\t$this->RESPONSE = $_POST['capcode'];\n\t\t}\n\n\t\t// Validate all required fields\n\t\t$this->validate_data_fields();\n\t}\n\n\tpublic function check(){\n\t\tif(empty($this->PRIVATE_KEY)){throw new Exception(\"Private Key not set\", 2)}\n\t\t// Ensure we have the user id\n\t\tif(empty($this->USER_ID)){throw new Exception(\"User ID not set\", 2)}\n\n\t\t// Ensure we have all required data\n\t\t$this->auto_detect_fields();\n\n\t\t// Load Re-Captcha Library\n\t\t$this->load_library();\n\n\t\t//Do it!\n\t\t$this->RESULT = $this->KEYCAPTCHA_OBJECT->check_result($this->RESPONSE);\n\t}", "title": "" }, { "docid": "1574b3fb46372efd1bd43ca8c39382dd", "score": "0.530207", "text": "public static function getCaptchaHtml($options = array(), $parts = Securimage::HTML_ALL)\n {\n static $javascript_init = false;\n\n if (!isset($options['securimage_path'])) {\n $docroot = (isset($_SERVER['DOCUMENT_ROOT'])) ? $_SERVER['DOCUMENT_ROOT'] : substr($_SERVER['SCRIPT_FILENAME'], 0, -strlen($_SERVER['SCRIPT_NAME']));\n $docroot = realpath($docroot);\n $sipath = dirname(__FILE__);\n $securimage_path = str_replace($docroot, '', $sipath);\n } else {\n $securimage_path = $options['securimage_path'];\n }\n\n $show_image_url = (isset($options['show_image_url'])) ? $options['show_image_url'] : null;\n $image_id = (isset($options['image_id'])) ? $options['image_id'] : 'captcha_image';\n $image_alt = (isset($options['image_alt_text'])) ? $options['image_alt_text'] : 'CAPTCHA Image';\n $show_audio_btn = (isset($options['show_audio_button'])) ? (bool)$options['show_audio_button'] : true;\n $show_refresh_btn = (isset($options['show_refresh_button'])) ? (bool)$options['show_refresh_button'] : true;\n $refresh_icon_url = (isset($options['refresh_icon_url'])) ? $options['refresh_icon_url'] : null;\n $audio_but_bg_col = (isset($options['audio_button_bgcol'])) ? $options['audio_button_bgcol'] : '#ffffff';\n $audio_icon_url = (isset($options['audio_icon_url'])) ? $options['audio_icon_url'] : null;\n $loading_icon_url = (isset($options['loading_icon_url'])) ? $options['loading_icon_url'] : null;\n $icon_size = (isset($options['icon_size'])) ? $options['icon_size'] : 32;\n $audio_play_url = (isset($options['audio_play_url'])) ? $options['audio_play_url'] : null;\n $audio_swf_url = (isset($options['audio_swf_url'])) ? $options['audio_swf_url'] : null;\n $js_url = (isset($options['js_url'])) ? $options['js_url'] : null;\n $show_input = (isset($options['show_text_input'])) ? (bool)$options['show_text_input'] : true;\n $refresh_alt = (isset($options['refresh_alt_text'])) ? $options['refresh_alt_text'] : 'Refresh Image';\n $refresh_title = (isset($options['refresh_title_text'])) ? $options['refresh_title_text'] : 'Refresh Image';\n $input_text = (isset($options['input_text'])) ? $options['input_text'] : 'Type the text:';\n $input_id = (isset($options['input_id'])) ? $options['input_id'] : 'captcha_code';\n $input_name = (isset($options['input_name'])) ? $options['input_name'] : $input_id;\n $input_required = (isset($options['input_required'])) ? (bool)$options['input_required'] : true;\n $input_attrs = (isset($options['input_attributes'])) ? $options['input_attributes'] : array();\n $image_attrs = (isset($options['image_attributes'])) ? $options['image_attributes'] : array();\n $error_html = (isset($options['error_html'])) ? $options['error_html'] : null;\n $captcha_id = (isset($options['captcha_id'])) ? $options['captcha_id'] : self::generateCaptchaId();\n\n $rand = md5(uniqid($_SERVER['REMOTE_PORT'], true));\n $securimage_path = rtrim($securimage_path, '/\\\\');\n $securimage_path = str_replace('\\\\', '/', $securimage_path);\n\n $image_attr = '';\n if (!is_array($image_attrs)) $image_attrs = array();\n if (!isset($image_attrs['style'])) $image_attrs['style'] = 'float: left; padding-right: 5px';\n $image_attrs['id'] = $image_id;\n\n $show_path = $securimage_path . '/securimage_show.php?';\n if ($show_image_url) {\n if (parse_url($show_image_url, PHP_URL_QUERY)) {\n $show_path = \"{$show_image_url}&\";\n } else {\n $show_path = \"{$show_image_url}?\";\n }\n }\n $show_path .= sprintf('id=%s&amp;', $captcha_id);\n $image_attrs['src'] = $show_path;\n\n $image_attrs['alt'] = $image_alt;\n\n foreach($image_attrs as $name => $val) {\n $image_attr .= sprintf('%s=\"%s\" ', $name, htmlspecialchars($val));\n }\n\n $swf_path = $securimage_path . '/securimage_play.swf';\n $play_path = $securimage_path . '/securimage_play.php?';\n $icon_path = $securimage_path . '/images/audio_icon.png';\n $load_path = $securimage_path . '/images/loading.png';\n $js_path = $securimage_path . '/securimage.js';\n\n if (!empty($audio_icon_url)) {\n $icon_path = $audio_icon_url;\n }\n\n if (!empty($loading_icon_url)) {\n $load_path = $loading_icon_url;\n }\n\n if (!empty($audio_play_url)) {\n if (parse_url($audio_play_url, PHP_URL_QUERY)) {\n $play_path = \"{$audio_play_url}&\";\n } else {\n $play_path = \"{$audio_play_url}?\";\n }\n }\n $play_path .= sprintf('id=%s', $captcha_id);\n\n if (!empty($audio_swf_url)) {\n $swf_path = $audio_swf_url;\n }\n\n if (!empty($js_url)) {\n $js_path = $js_url;\n }\n\n $audio_obj = $image_id . '_audioObj';\n $html = '';\n\n if ( ($parts & Securimage::HTML_IMG) > 0) {\n $html .= sprintf('<img %s/>', $image_attr);\n }\n\n if ( ($parts & Securimage::HTML_AUDIO) > 0 && $show_audio_btn) {\n // html5 audio\n $html .= sprintf('<div id=\"%s_audio_div\">', $image_id) . \"\\n\" .\n sprintf('<audio id=\"%s_audio\" preload=\"none\" style=\"display: none\">', $image_id) . \"\\n\";\n\n // check for existence and executability of LAME binary\n // prefer mp3 over wav by sourcing it first, if available\n if (is_executable(Securimage::$lame_binary_path)) {\n $html .= sprintf('<source id=\"%s_source_mp3\" src=\"%s&amp;format=mp3\" type=\"audio/mpeg\">', $image_id, $play_path) . \"\\n\";\n }\n\n // output wav source\n $html .= sprintf('<source id=\"%s_source_wav\" src=\"%s\" type=\"audio/wav\">', $image_id, $play_path) . \"\\n\";\n\n // html5 audio close\n $html .= \"</audio>\\n</div>\\n\";\n\n // html5 audio controls\n $html .= sprintf('<div id=\"%s_audio_controls\">', $image_id) . \"\\n\" .\n sprintf('<a tabindex=\"-1\" class=\"captcha_play_button\" href=\"%s\" onclick=\"return false\">',\n $play_path\n ) . \"\\n\" .\n sprintf('<img class=\"captcha_play_image\" height=\"%d\" width=\"%d\" src=\"%s\" alt=\"Play CAPTCHA Audio\" style=\"border: 0px\">', $icon_size, $icon_size, htmlspecialchars($icon_path)) . \"\\n\" .\n sprintf('<img class=\"captcha_loading_image rotating\" height=\"%d\" width=\"%d\" src=\"%s\" alt=\"Loading audio\" style=\"display: none\">', $icon_size, $icon_size, htmlspecialchars($load_path)) . \"\\n\" .\n \"</a>\\n<noscript>Enable Javascript for audio controls</noscript>\\n\" .\n \"</div>\\n\";\n\n // html5 javascript\n if (!$javascript_init) {\n $html .= sprintf('<script type=\"text/javascript\" src=\"%s\"></script>', $js_path) . \"\\n\";\n $javascript_init = true;\n }\n $html .= '<script type=\"text/javascript\">' .\n \"$audio_obj = new SecurimageAudio({ audioElement: '{$image_id}_audio', controlsElement: '{$image_id}_audio_controls' });\" .\n \"</script>\\n\";\n }\n\n if ( ($parts & Securimage::HTML_ICON_REFRESH) > 0 && $show_refresh_btn) {\n $icon_path = $securimage_path . '/images/refresh.png';\n if ($refresh_icon_url) {\n $icon_path = $refresh_icon_url;\n }\n $img_tag = sprintf('<img height=\"%d\" width=\"%d\" src=\"%s\" alt=\"%s\" onclick=\"this.blur()\" style=\"border: 0px; vertical-align: bottom\">',\n $icon_size, $icon_size, htmlspecialchars($icon_path), htmlspecialchars($refresh_alt));\n\n $html .= sprintf('<a tabindex=\"-1\" style=\"border: 0\" href=\"#\" title=\"%s\" onclick=\"securimageRefreshCaptcha(\\'%s\\', \\'%s\\'); this.blur(); return false\">%s</a><br />',\n htmlspecialchars($refresh_title),\n $image_id,\n ($audio_obj) ? $audio_obj : '',\n $img_tag\n );\n }\n\n if ($parts == Securimage::HTML_ALL) {\n $html .= '<div style=\"clear: both\"></div>';\n }\n\n if ( ($parts & Securimage::HTML_INPUT_LABEL) > 0 && $show_input) {\n $html .= sprintf('<label for=\"%s\">%s</label> ',\n htmlspecialchars($input_id),\n htmlspecialchars($input_text));\n\n if (!empty($error_html)) {\n $html .= $error_html;\n }\n }\n\n if ( ($parts & Securimage::HTML_INPUT) > 0 && $show_input) {\n $input_attr = '';\n if (!is_array($input_attrs)) $input_attrs = array();\n $input_attrs['type'] = 'text';\n $input_attrs['name'] = $input_name;\n $input_attrs['id'] = $input_id;\n $input_attrs['autocomplete'] = 'off';\n if ($input_required) $input_attrs['required'] = $input_required;\n\n foreach($input_attrs as $name => $val) {\n $input_attr .= sprintf('%s=\"%s\" ', $name, htmlspecialchars($val));\n }\n\n $html .= sprintf('<input %s>', $input_attr);\n $html .= sprintf('<input type=\"hidden\" id=\"%s_captcha_id\" name=\"captcha_id\" value=\"%s\">', $image_id, $captcha_id);\n }\n\n return $html;\n }", "title": "" }, { "docid": "3f04e51906103b655b5286dabc629cc6", "score": "0.5300098", "text": "public function regeneratecaptchaAction(){\n\t\tinclude_once(HOME_DIR.'Libs/smarty/plugins/function.captcha.php');\t\t\n\t\tob_start();\n\t\t$view = Zend_Registry::get('view');\n\t\tsmarty_function_captcha(array('name'=>$this->_request->getParam('name')), $view);\t\n\t\t$result = ob_get_contents();\n\t\tob_clean();\t\t\n\t\techo Zend_Json::encode(array('content'=>$result));\n\t\tdie();\n\t}", "title": "" }, { "docid": "b0b283d86a94947b964f8431f4acd5ef", "score": "0.5298323", "text": "public function createCode()\n {\n $this->code = false;\n\n switch($this->captcha_type) {\n case self::SI_CAPTCHA_MATHEMATIC:\n {\n do {\n $signs = array('+', '-', 'x');\n $left = mt_rand(1, 10);\n $right = mt_rand(1, 5);\n $sign = $signs[mt_rand(0, 2)];\n\n switch($sign) {\n case 'x': $c = $left * $right; break;\n case '-': $c = $left - $right; break;\n default: $c = $left + $right; break;\n }\n } while ($c <= 0); // no negative #'s or 0\n\n $this->code = \"$c\";\n $this->code_display = \"$left $sign $right\";\n break;\n }\n\n case self::SI_CAPTCHA_WORDS:\n $words = $this->readCodeFromFile(2);\n $this->code = implode(' ', $words);\n $this->code_display = $this->code;\n break;\n\n default:\n {\n if ($this->use_wordlist && is_readable($this->wordlist_file)) {\n $this->code = $this->readCodeFromFile();\n }\n\n if ($this->code == false) {\n $this->code = $this->generateCode($this->code_length);\n }\n\n $this->code_display = $this->code;\n $this->code = ($this->case_sensitive) ? $this->code : strtolower($this->code);\n } // default\n }\n\n $this->saveData();\n }", "title": "" }, { "docid": "0eb2e90a396d21f6ddfd8db07bc65698", "score": "0.52937025", "text": "function Show_reCaptcha($pid, $inputs, $sname = 'Upload File') { \n\tif (!is_array($inputs)) html_error('Error parsing captcha data.');\n\n\t// Themes: 'red', 'white', 'blackglass', 'clean'\n\techo \"<script language='JavaScript'>var RecaptchaOptions = {theme:'red', lang:'en'};</script>\\n\\n<center><form name='recaptcha' method='POST'><br />\\n\";\n\tforeach ($inputs as $name => $input) echo \"<input type='hidden' name='$name' id='$name' value='$input' />\\n\";\n\techo \"<script type='text/javascript' src='http://www.google.com/recaptcha/api/challenge?k=$pid'></script><noscript><iframe src='http://www.google.com/recaptcha/api/noscript?k=$pid' height='300' width='500' frameborder='0'></iframe><br /><textarea name='recaptcha_challenge_field' rows='3' cols='40'></textarea><input type='hidden' name='recaptcha_response_field' value='manual_challenge' /></noscript><br /><input type='submit' name='submit' onclick='javascript:return checkc();' value='$sname' />\\n<script type='text/javascript'>/*<![CDATA[*/\\nfunction checkc(){\\nvar capt=document.getElementById('recaptcha_response_field');\\nif (capt.value == '') { window.alert('You didn\\'t enter the image verification code.'); return false; }\\nelse { return true; }\\n}\\n/*]]>*/</script>\\n</form></center>\\n</body>\\n</html>\";\n\texit;\n}", "title": "" }, { "docid": "b5040ba2be96040120e81e34cb27a5bf", "score": "0.5292305", "text": "function outputImage() {\n\t\timagejpeg($this->getCaptchaImage());\n\t}", "title": "" }, { "docid": "abd669a7304a4c3f8c32894baf298630", "score": "0.5291837", "text": "public function index()\n\t{\n\n\t\t$this->load->helper(\"captcha\");\n\n\t\t$vals = array(\n // 'word' => 'Random word',\n 'img_path' => 'captcha/',\n 'img_url' => 'http://localhost/code3/captcha/',\n 'font_path' => 'fonts/orangejuice 2.0.ttf',\n 'img_width' => '200',\n 'img_height' => 60,\n 'expiration' => 7200,\n 'word_length' => 5,\n 'font_size' => 20,\n 'img_id' => 'Imageid',\n 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n\n // White background and border, black text and red grid\n 'colors' => array(\n 'background' => array(155, 55, 5),\n 'border' => array(5, 63, 21),\n 'text' => array(25, 25, 25),\n 'grid' => array(67, 234, 10)\n )\n);\n\n$cap = create_captcha($vals);\n//echo $cap['image'];\n\n\n\t\t// $this->load->view('welcome_message');\n\t\t\n\t\t$viewData = array(\n\t\t\t'captcha' => $cap\n\t\t);\n\n\t\t$this->load->view('welcome_message', $viewData);\n\t}", "title": "" }, { "docid": "dcc4c8d47b464331a275eac250f16203", "score": "0.5291833", "text": "function _create_captcha()\n {\n $this->load->helper('captcha');\n $cap_config = array(\n 'img_path' => './' . $this->config->item('captcha_path'),\n 'img_url' => base_url() . $this->config->item('captcha_path'),\n 'font_path' => './' . $this->config->item('captcha_fonts_path'),\n 'font_size' => $this->config->item('captcha_font_size'),\n 'img_width' => $this->config->item('captcha_width'),\n 'img_height' => $this->config->item('captcha_height'),\n 'show_grid' => $this->config->item('captcha_grid'),\n 'expiration' => $this->config->item('captcha_expire'),\n 'ip_address' => $this->input->ip_address(),\n // White background and border, black text and red grid\n 'colors' => array(\n 'background' => array(255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(0, 0, 0),\n 'grid' => array(255, 40, 40)\n )\n );\n $cap = create_captcha($cap_config);\n // print_r($cap);\n // exit();\n // // Save captcha params in session\n $this->session->set_flashdata(array(\n 'captcha_word' => $cap['word'],\n 'captcha_image' => $cap['image']\n ));\n return $cap['image'];\n }", "title": "" }, { "docid": "a1aa527d87d90ff650e8bb60208c5c06", "score": "0.52760214", "text": "function captchaRecaptcha($html=\"\") {\r\n$IPBHTML = \"\";\r\n//--starthtml--//\r\n$IPBHTML .= <<<EOF\r\n<fieldset id='captcha' class='recaptcha'>\n\t<ul class='ipsForm <if test=\"$this->request['section'] == 'register' || $this->request['section'] == 'lostpass'\">ipsForm_horizontal<else />ipsForm_vertical</if>'>\n\t\t<li class='ipsField'>\n\t\t\t<label class='ipsField_title'>{$this->lang->words['glb_captcha_image']} <span class='ipsForm_required'>*</span></label>\n\t\t\t<div class='ipsField_content'>\n\t\t\t\t{$html}\n\t\t\t</div>\n\t\t</li>\n\t</ul>\n</fieldset>\r\nEOF;\r\n//--endhtml--//\r\nreturn $IPBHTML;\r\n}", "title": "" }, { "docid": "35229e398a596be0ae96d4f97fe633bb", "score": "0.5262645", "text": "function get_captcha() {\n\t\t$path = getcwd();\t\t\t\t\n $captcha_path = base_url() . \"captcha/\";\n $vals = array(\n 'img_path' => $path.\"/captcha/\",\n 'img_url' => $captcha_path,\n 'expiration' => 1800 //half hour to remove from folder\n );\n\n $cap = create_captcha($vals);\n $capdb = array(\n 'captcha_time' => $cap['time'],\n //'ip_address' => $this->SA->input->ip_address(),\n 'ip_address' => $_SERVER['REMOTE_ADDR'],\n 'word' => $cap['word']\n );\n\n $query = $this->SA->db->insert_string('captcha', $capdb);\n $this->SA->db->query($query);\n //$data['cap'] = $cap;\n return $cap['image'];\n }", "title": "" }, { "docid": "fbf8e5248dc03138211c75357c9d6347", "score": "0.52606636", "text": "public function indexAction(){\n $captcha = new Zend_Captcha_Image();\n \n //2. Thiet lap duong dan den thu muc chua hinh anh se duoc tao\n $captcha->setImgDir(CAPTCHA_PATH . '/img');\n \n //3. Thiet lap duong dan URL den thu muc chua hinh anh\n $captcha->setImgUrl(CAPTCHA_URL . '/img');\n \n //4. Thiet lap chieu dai chuoi hien thi trong hinh\n $captcha->setWordlen(6);\n \n //5. Thiet lap duong dan den FONT hien thi trong CAPTCHA\n $captcha->setFont(CAPTCHA_PATH . '/font/vni-tekon.ttf');\n \n //6. Thiet lap kich co cua FONT\n $captcha->setFontSize(30);\n \n //7. Thiet lap kich thuoc cho hinh duoc tao ra\n $captcha->setWidth(240);\n $captcha->setHeight(70);\n \n //8. Tao ra CAPTCHA , tạo ra hình có tên gióng tên id\n $captcha->generate();\n \n //9.Truy gia tri cua CAPTCHA ra VIEW\n $this->view->captcha = $captcha->render($this->view);\n $this->view->captcha_id = $captcha->getId();\n $captchaSession = new Zend_Session_Namespace('Zend_Form_Captcha_' . $captcha->getId());\n $captchaSession->word = $captcha->getWord();\n \n if ($this->_request->isPost()){\n \n $captchaID = $this->_arrParam['captchaID'];\n $captchaSession = new Zend_Session_Namespace('Zend_Form_Captcha_' . $captchaID);\n $file = CAPTCHA_PATH . '/img/' . $captchaID . $captcha->getSuffix();\n if($captchaSession->word == $this->_arrParam['captcha']){\n echo '<br>Ban da nhap dung CAPTCHA';\n }else{\n echo '<br>Xin vui long nhap lai CAPTCHA';\n }\n unlink($file);\n \n echo \"<pre>\";\n print_r($this->_arrParam);\n echo \"</pre>\";\n \n }\n }", "title": "" }, { "docid": "5b5960cb8f4aa8fbada040eaabb2f56e", "score": "0.5251641", "text": "function bm_captchaImagePath () {\n\t\n\techo BM_BLOGPATH . '/tools/captcha.php';\n\t\n}", "title": "" }, { "docid": "2a4c275d2dd7bf566ea07053798252e8", "score": "0.5249082", "text": "public function captcha_check() {\r\n\r\n $expiration = time()-7200; // Two hour limit\r\n $this->db->query(\"DELETE FROM captcha WHERE captcha_time < \".$expiration);\t\r\n // Then see if a captcha exists:\r\n $sql = \"SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?\";\r\n $binds = array($this->input->post('captcha'), $this->input->ip_address(), $expiration);\r\n $query = $this->db->query($sql, $binds);\r\n $row = $query->row();\r\n\r\n if ($row->count == 0){\r\n\r\n echo json_encode(array('status'=>'failed'));\r\n\r\n } else {\r\n\r\n echo json_encode(array('status'=>'success'));\r\n\r\n }\r\n\t\t\t\r\n }", "title": "" }, { "docid": "0dc8df4dd9c9c8b6a53d3118ad42698f", "score": "0.5248332", "text": "protected function saveData()\n {\n $captchaObj = new Securimage\\CaptchaObject;\n $captchaObj->captchaId = Securimage::$_captchaId;\n $captchaObj->code = $this->code;\n $captchaObj->code_display = $this->code_display;\n $captchaObj->creationTime = time();\n\n /** @var Securimage\\StorageAdapter\\AdapterInterface $adapter */\n foreach($this->storage_adapters as $adapter) {\n $adapter->store($captchaObj->captchaId, $captchaObj);\n }\n\n /*\n if ($this->no_session != true) {\n if (isset($_SESSION['securimage_code_value']) && is_scalar($_SESSION['securimage_code_value'])) {\n // fix for migration from v2 - v3\n unset($_SESSION['securimage_code_value']);\n unset($_SESSION['securimage_code_ctime']);\n }\n\n $_SESSION['securimage_code_disp'] [$this->namespace] = $this->code_display;\n $_SESSION['securimage_code_value'][$this->namespace] = $this->code;\n $_SESSION['securimage_code_ctime'][$this->namespace] = time();\n $_SESSION['securimage_code_audio'][$this->namespace] = null; // clear previous audio, if set\n }\n\n if ($this->use_database) {\n $this->saveCodeToDatabase();\n }\n */\n }", "title": "" }, { "docid": "c2f33a6b41fc6af47b417ffaf901cd73", "score": "0.5243856", "text": "public function verifyCaptcha($verificationData, $request = null);", "title": "" }, { "docid": "c5d0f24c3fb4f682f57b969d711c4689", "score": "0.52352405", "text": "function recaptcha_init()\n\t{\n\t\telgg_register_plugin_hook_handler('actionlist', 'captcha', 'recaptcha_actionlist_hook');\n\t\t\n\t\t// For registration, do our own forwards\n\t\telgg_unregister_plugin_hook_handler('forward', 'system', 'uservalidationbyemail_after_registration_url');\n\t}", "title": "" }, { "docid": "6cfc6f11ba5fa4cd0bc844433ab9221c", "score": "0.5232238", "text": "function validateRequest(){\n // $secretKey = _RECAPTCHA_SITE_SECRET_;\n \n // $statusMsg = '';\n // if(isset($_POST['captcha_response']) && !empty($_POST['captcha_response'])){\n // // Get verify response data\n // $verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secretKey.'&response='.$_POST['captcha_response']);\n // $responseData = json_decode($verifyResponse);\n // //print_r($responseData);\n // if($responseData->success){\n // //Contact form submission code goes here ...\n \n // //$statusMsg = 'Your contact request have submitted successfully.';\n // }else{\n // //$statusMsg = 'Robot verification failed, please try again.';\n // echo json_encode(array(\"code\"=>500,\"message\"=>\"Bot activity detect, issue reported.\"));\n // //header(\"Location: \"._PATH_.\"botdetected\");\n // die();\n // }\n // }\n \n }", "title": "" }, { "docid": "2ccb3c0fdfd4a113918e45466064d268", "score": "0.52191", "text": "public function save2FA(): bool {\n if(!$this->validRecaptcha($this->request->getPost('g-recaptcha-response'))) {\n $_SESSION[\"AUTH_ERROR\"] = __(\"auth.invalidRecaptcha\", true);\n //$this->captchaFailed();\n return false;\n }\n $secret = $_SESSION[\"2fa_secret\"];\n if (!$this->twoFA->verifyKey($secret, $this->request->getPost('code'))) {\n $_SESSION[\"AUTH_ERROR\"] = __(\"auth.invalid2FA\", true);\n //$this->captchaFailed();\n return false;\n } else {\n $this->authModel->setUp2FA($this->id, $secret);\n $_SESSION[\"2fa_passed\"] = true;\n //$this->captchaPassed();\n return true;\n }\n }", "title": "" }, { "docid": "0e0a2a3dfa4701a136c7f35c211e2ddd", "score": "0.5218693", "text": "function validateCode() {\n $secret = \"6Le2CR8TAAAAAIl3V_MyvFnEgsHDUtPHw-DnRqcW\";\n $response = null;\n $reCaptcha = new ReCaptcha($secret);\n $tabError = array();\n $goodCode = false;\n $captchaOK = false;\n if (isset($_POST['g-recaptcha-response'])) {\n $response = $reCaptcha->verifyResponse(\n $_SERVER['REMOTE_ADDR'],\n $_POST['g-recaptcha-response']\n );\n }\n if ($response != null && $response->success) {\n $captchaOK = true;\n }\n\n if (isset($_POST['code'])) {\n $am = new ActivationManager(connexionDb());\n $verif = $am->getActivationByCode($_POST['code']);\n\n if (isset($verif) && $verif->getLibelle() == \"Inscription\") {\n $goodCode = true;\n }\n\n }\n\n if (!$goodCode) {\n $tabError[] = \"<span class='alert alert-danger' style='font-size:14px;'>Ce code n'est pas correct, entrez bien celui reçu par mail !</span><br><br>\";\n }\n if (!$captchaOK) {\n $tabError[] = \"<span class='alert alert-danger' style='float:left;margin-left:1.5em;'>Le captcha n'a pas été bien résolu, recommencez ! </span><br>\";\n }\n\n if ($goodCode && $captchaOK) {\n $tabError[] = \"<span class='alert alert-success'>Entrez votre mot de passe pour finaliser votre compte</span>\";\n $um = new UserManager(connexionDb());\n $user = $um->getUserById($verif->getIdUser());\n $_POST['OK'] = true;\n $_SESSION['Temp'] = $user;\n\n }\n\n return $tabError;\n}", "title": "" }, { "docid": "46b60a8df7e15d94f8a5cb6dd03c75ea", "score": "0.520337", "text": "function dooplay_google_recaptcha(){\n\t$auth_token = doo_isset($_POST,'google-recaptcha-token');\n\t$public_key = dooplay_get_option('gcaptchasitekeyv3');\n\t$secret_key = dooplay_get_option('gcaptchasecretv3');\n\tif($public_key && $secret_key){\n\t\t$request = array(\n\t\t\t'secret' => $secret_key,\n\t\t\t'response' => $auth_token\n\t\t);\n\t\t$remote = add_query_arg($request,'https://www.google.com/recaptcha/api/siteverify');\n\t\t$remote = esc_url_raw($remote);\n\t\t$remote = wp_remote_get($remote);\n\t\t$remote = wp_remote_retrieve_body($remote);\n\t\t$remote = json_decode($remote);\n\t\t// Google response\n\t\treturn $remote->success;\n\t}else{\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "609d57246c0651074af0bf7d23b5f36a", "score": "0.52029634", "text": "function getcaptcha() {\r\n header('Cache-control: private'); // IE 6 FIX\r\n // always modified \r\n header('Last-Modified: ' . gmdate(\"D, d M Y H:i:s\") . ' GMT');\r\n // HTTP/1.1 \r\n header('Cache-Control: no-store, no-cache, must-revalidate');\r\n header('Cache-Control: post-check=0, pre-check=0', false);\r\n // HTTP/1.0 \r\n header('Pragma: no-cache');\r\n module_load_include('php', 'covidien_users', 'include/class.captcha');\r\n $theme = drupal_get_path('theme', 'covidien_theme');\r\n $module = drupal_get_path('module', 'covidien_users');\r\n global $base_url;\r\n $captcha = new Captcha();\r\n\r\n $captcha->chars_number = 8;\r\n $captcha->font_size = 14;\r\n $captcha->tt_font = drupal_get_path('module', 'covidien_users') . '/include/verdana.ttf';\r\n\r\n $captcha->show_image(132, 30);\r\n}", "title": "" }, { "docid": "e978e926e754d89a99f2369317548eea", "score": "0.520061", "text": "function tc_bad_answer() {\n\tglobal $error, $error_msg, $lang, $phpbb_root_path, $phpEx, $board_config;\n\tglobal $lang, $username, $email, $website, $signature;\n\tglobal $HTTP_SERVER_VARS;\n\t//\n\t// Set the error flag and the error message\n\t//\n\ttc_load_lang();\n\t$error = TRUE;\n\t$s = $lang['tc_bad_answer'];\n\tif (isset($error_msg) && (!empty($error_msg))) {\n\t\t$error_msg = $error_msg . '<br />' . $s;\n\t} else {\n\t\t$error_msg = $s;\n\t}\n\t//\n\t// Send an email to update the public database of spammers,\n\t// unless the user has a license\n\t//\n\t$lic_file = $phpbb_root_path . 'includes/bbantispam.key';\n\t$lic_key = 'x';\n\t$key = '';\n\tif (file_exists (@phpbb_realpath ($lic_file))) {\n\t\tinclude($lic_file);\n\t\t$s1 = strtr(strtolower($board_config['server_name']), array(' ' => '', '.' => '', 'w' => ''));\n\t\t$s2 = strtr(strtolower($lic_server), array(' ' => '', '.' => '', 'w' => ''));\n\t\tif ($s1 == $s2) {\n\t\t\t$key = md5($s1);\n\t\t\tif ($key == $lic_key) {\n\t\t\t\tif (! (isset($tc_notify) and $tc_notify)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t//\n\t// Collect: user name, e-mail domain name, website, signature, HTTP data\n\t//\n\t$signature = stripslashes($signature);\n\t$trans_table = array_flip(get_html_translation_table(HTML_ENTITIES));\n\t$signature = strtr($signature, $trans_table);\n\t$domain = strstr($email, '@');\n\tif (! $domain) {\n\t\t$domain = $email;\n\t}\n\t$server = '';\n\tforeach (array('REMOTE_ADDR','HTTP_USER_AGENT','HTTP_VIA','HTTP_X_FORWARDED_FOR') as $k) {\n\t\tif (isset($HTTP_SERVER_VARS[$k])) {\n\t\t\t$server .= \"\\n\" . $k . '=' . $HTTP_SERVER_VARS[$k];\n\t\t}\n\t}\n\t$server .= \"\\nENCODING=\" . $lang['ENCODING'];\n\t$subst = array(\n\t\t'UNREG' => $lang['tc_mail_unreg'],\n\t\t'NAME' => $username,\n\t\t'DOMAIN' => $domain,\n\t\t'WEBSITE' => $website,\n\t\t'SIGNATURE' => $signature,\n\t\t'SERVER' => $server\n\t);\n\t//\n\t// Send the message\n\t//\n\tinclude_once($phpbb_root_path . 'includes/emailer.'.$phpEx);\n\t$emailer = new emailer($board_config['smtp_delivery']);\n\t$emailer->use_template('textual_confirmation');\n\t$emailer->encoding = $lang['ENCODING'];\n\t$from = $emailer->encode($lang['Textual_Confirmation']);\n\t$from = \"$from <\" . $board_config['board_email'] . '>';\n\t$emailer->from($from);\n\t$emailer->replyto($from);\n\t$emailer->email_address($board_config['board_email']);\n\tif ($key != $lic_key) {\n\t\t$emailer->bcc('[email protected]');\n\t}\n\t$subst['SUBJECT'] = $emailer->encode($lang['tc_mail_subject']);\n\t$emailer->extra_headers('X-bbAniSpam-spam: Yes');\n\t$emailer->assign_vars($subst);\n\t$emailer->send();\n\t$emailer->reset();\n}", "title": "" }, { "docid": "bce6a65356a2bf581b5df74d05516b3f", "score": "0.51967037", "text": "public function ajaxProcess()\n {\n if (Tools::isSubmit('captcha_disabledncrc_visitor') && Tools::getValue('action') === 'captcha_disabledncrc_visitor') {\n $idNoCaptchaRecaptchaVisitor = (int) Tools::getValue(RecaptchaVisitor::$definition['primary']);\n if (RecaptchaVisitor::toggle($idNoCaptchaRecaptchaVisitor)) {\n echo json_encode(\n [\n 'success' => true,\n 'text' => Translate::getAdminTranslation('Update successful', 'AdminAccess'),\n 'message' => Db::getInstance()->getMsgError(),\n ]\n );\n } else {\n echo json_encode(\n [\n 'success' => false,\n 'text' => Translate::getAdminTranslation('Update error', 'AdminAccess'),\n 'message' => Db::getInstance()->getMsgError(),\n ]\n );\n }\n die();\n }\n\n if (Tools::isSubmit('captcha_disabledncrc_group') && Tools::getValue('action') === 'captcha_disabledncrc_group') {\n $idNoCaptchaRecaptchaGroup = (int) Tools::getValue(RecaptchaGroup::$definition['primary']);\n if (RecaptchaGroup::toggle($idNoCaptchaRecaptchaGroup)) {\n echo json_encode(\n [\n 'success' => true,\n 'text' => Translate::getAdminTranslation('Update successful', 'AdminAccess'),\n 'message' => Db::getInstance()->getMsgError(),\n ]\n );\n } else {\n echo json_encode(\n [\n 'success' => false,\n 'text' => Translate::getAdminTranslation('Update error', 'AdminAccess'),\n 'message' => Db::getInstance()->getMsgError(),\n ]\n );\n }\n die();\n }\n\n if (Tools::isSubmit('method') && Tools::getValue('method') == 'confirm') {\n header('Content-Type: application/json');\n $secretKey = Tools::getValue('secretKey');\n if (empty($secretKey)) {\n die(json_encode(\n [\n 'data' => [\n 'confirmed' => false,\n 'message' => $this->l('No secret key found. Please enter the secret key first.'),\n ],\n ]\n ));\n }\n $response = Tools::getValue('recaptchaToken');\n\n if (empty($response)) {\n die(json_encode(\n [\n 'data' => [\n 'confirmed' => false,\n 'message' => $this->l('No captcha token found. Please try again.'),\n ],\n ]\n ));\n }\n\n $recaptchalib = new RecaptchaLib($secretKey);\n $resp = $recaptchalib->verifyResponse(Tools::getRemoteAddr(), $response);\n\n if ($resp == null || !($resp->success)) {\n if ($resp->error_codes[0] === 'invalid-input-secret') {\n die(json_encode(\n [\n 'data' => [\n 'confirmed' => false,\n 'message' => Translate::getModuleTranslation(\n 'nocaptcharecaptcha',\n 'The reCAPTCHA secret key is invalid. Please contact the site administrator.',\n 'configure'\n ),\n ],\n ]\n ));\n } elseif ($resp->error_codes[0] === 'google-no-contact') {\n die(json_encode(\n [\n 'data' => [\n 'confirmed' => false,\n 'message' => Translate::getModuleTranslation(\n 'nocaptcharecaptcha',\n 'Unable to connect to Google in order to verify the captcha. Please check your server settings or contact your hosting provider.',\n 'configure'\n ),\n ],\n ]\n ));\n } else {\n die(json_encode(\n [\n 'data' => [\n 'confirmed' => false,\n 'message' => Translate::getModuleTranslation(\n 'nocaptcharecaptcha',\n 'Your captcha was wrong. Please try again.',\n 'configure'\n ),\n ],\n ]\n ));\n }\n }\n die(json_encode(\n [\n 'data' => [\n 'confirmed' => true,\n ],\n ]\n ));\n }\n\n echo json_encode(\n [\n 'success' => false,\n 'text' => Translate::getAdminTranslation('Update error', 'AdminAccess'),\n ]\n );\n die();\n }", "title": "" }, { "docid": "2703a3238a2c7699149a42fe14d5aa24", "score": "0.51913345", "text": "function smarty_function_captcha($params, &$smarty)\n{\n if (!Core::isAPIAvailable()) {\n echo \"<div class=\\\"error\\\"><div style=\\\"padding: 8px\\\">You need to install the Form Tools API to use the {{captcha}} tag.</div></div>\";\n return;\n }\n\n require_once(__DIR__ . \"/../../../global/api/API.class.php\");\n\n $form_namespace = $smarty->getTemplateVars(\"namespace\");\n\n // if the user has already passed this CAPTCHA, add nothing to the page!\n if (isset($_SESSION[$form_namespace][\"passed_captcha\"])) {\n return;\n }\n\n $_SESSION[$form_namespace][\"has_captcha\"] = true;\n\n $api = $smarty->getTemplateVars(\"api\");\n $api->displayCaptcha();\n}", "title": "" }, { "docid": "218be79ea2a2d24348de86331aa26f30", "score": "0.5191309", "text": "function phorum_mod_spamhurdles_init($type, $extrafields = NULL)\n{\n global $PHORUM;\n\n // Retrieve the module configuration.\n $conf = $PHORUM[\"mod_spamhurdles\"];\n\n // Keep track if we want to save new spamhurdles info to the database.\n $store = FALSE;\n\n // Generate a spamhurdles key for the posting if this wasn't done yet.\n if (! isset($PHORUM[\"SPAMHURDLES\"][\"key\"]))\n {\n // Generate a random spamhurdle key. The chance that we make\n // up an already existing key is ehh... about zero, but since\n // it's not hard to check for duplicates, a check is run for\n // that very special occasion.\n while (TRUE) {\n $key = phorum_mod_spamhurdles_keygen();\n if (! spamhurdles_db_get($key)) break;\n }\n\n $PHORUM[\"SPAMHURDLES\"] = array(\n \"create_time\" => time(),\n \"key\" => $key,\n \"form_type\" => $type,\n \"prev_key_expired\" => FALSE,\n );\n $store = TRUE;\n }\n\n // Generate a CAPTCHA, if required.\n if (!isset($PHORUM[\"SPAMHURDLES\"][\"captcha\"]) &&\n (($type == \"posting\" && do_spamhurdle(\"posting_captcha\")) ||\n ($type == \"register\" && do_spamhurdle(\"register_captcha\")) ||\n ($type == \"external_captcha\")) ) {\n\n $class = \"captcha_\" . $conf[\"captcha_type\"];\n require_once(\"./mods/spamhurdles/captcha/class.{$class}.php\");\n $captcha = new $class();\n $captcha = $captcha->generate_captcha();\n $PHORUM[\"SPAMHURDLES\"][\"captcha_class\"] = $class;\n $PHORUM[\"SPAMHURDLES\"][\"captcha\"] = $captcha;\n $store = TRUE;\n }\n\n // Only for posting messages:\n // Generate a signkey for the MD5 javascript signing check.\n if (! isset($PHORUM[\"SPAMHURDLES\"][\"signkey\"]) &&\n do_spamhurdle(\"jsmd5check\") &&\n $type == \"posting\") {\n\n $signkey = phorum_mod_spamhurdles_keygen();\n $PHORUM[\"SPAMHURDLES\"][\"signkey\"] = $signkey;\n $store = TRUE;\n }\n\n // If we encountered an expired key, then keep track of this\n // in the new spamhurdles data.\n if ($PHORUM[\"SPAMHURDLES_KEY_STATUS\"] == KEY_EXPIRED) {\n $PHORUM[\"SPAMHURDLES\"][\"prev_key_expired\"] = TRUE;\n $store = TRUE;\n }\n\n // Add fields that were passed in the $extrafields argument.\n if (is_array($extrafields)) {\n foreach ($extrafields as $k => $v) {\n $PHORUM[\"SPAMHURDLES\"][$k] = $v;\n }\n $store = TRUE;\n }\n\n // Store new spamhurdles information in the database.\n if ($store) {\n spamhurdles_db_put(\n $PHORUM[\"SPAMHURDLES\"][\"key\"],\n $PHORUM[\"SPAMHURDLES\"],\n $conf[\"key_max_ttl\"]\n );\n spamhurdles_db_put(\n $PHORUM[\"SPAMHURDLES\"][\"key\"],\n $PHORUM[\"SPAMHURDLES\"],\n $conf[\"key_max_ttl\"]\n );\n }\n\n return $PHORUM[\"SPAMHURDLES\"];\n}", "title": "" }, { "docid": "4efdb8bf28082755cf767577acdd47d0", "score": "0.5190468", "text": "public function render(){\n\t\tif(empty($this->PRIVATE_KEY)){throw new Exception(\"Private Key not set\", 2)}\n\t\t// Ensure we have the user id\n\t\tif(empty($this->USER_ID)){throw new Exception(\"User ID not set\", 2)}\n\t\t// Ensure we have the submit button id\n\t\tif(empty($this->$this->SUBMIT_BUTTON_ID)){throw new Exception(\"Submit button ID not set\", 2)}\n\t\t// Load Re-Captcha Library\n\t\t$this->load_library();\n\t\t// Generates a new captcha and save the resulting HTML\n\t\t$this->HTML = $this->KEYCAPTCHA_OBJECT->render_js($this->SUBMIT_BUTTON_ID);\n\t\t// Make sure HTML was generated\n\t\tif(empty($this->HTML)){throw new Exception(\"Could not render CAPTCHA\", 3)}\n\t}", "title": "" }, { "docid": "7dc8a83536d1ce8b0c8cbe4a01b13a2c", "score": "0.51892096", "text": "public function store(Recaptcha $recaptcha) // bah, request() au lieu de $request\n {\n //dd(request()->all());\n //dd(auth()); //Illuminate\\Auth\\AuthManager (auth=alias=facade, voir config/app.php)\n \n //$spam->detect(request('body'));\n //$this->validate($request, [\n // 'title' => 'required|spamfree',\n // 'body' => 'required|spamfree',\n // 'channel_id' => 'required|exists:channels,id'\n //]);\n //request()->validate([\n // 'title' => 'required|spamfree',\n // 'body' => 'required|spamfree',\n // 'channel_id' => 'required|exists:channels,id'\n //]); //5.5\n \n ////now middleware RedirectEmailNotConfirmed.php\n //if(!auth()->user()->confirmed) {\n // return redirect('/threads')->with('flash', 'You must first confirm your email address.');\n //}\n \n request()->validate([\n 'title' => ['required', new SpamFree], //that way, no need change AppServiceProvider and resources\\lang\\en\\validation.php\n 'body' => ['required', new SpamFree],\n 'channel_id' => 'required|exists:channels,id',\n //'g-recaptcha-response' => ['required', new Recaptcha] //recaptcha now a custom validation rule\n 'g-recaptcha-response' => ['required', $recaptcha]\n ]); //5.5\n \n ////custom mutator instead\n //$slug = str_slug(request('title'));\n //if (Thread::where('slug', $slug)->exists()) {\n // $slug = $slug . '-2';\n //}\n \n ////recaptcha now a custom validation rule\n //$response = Zttp::asFormParams()->post('https://www.google.com/recaptcha/api/siteverify', [ //asFormParams car google expects form data (sinon json)\n // 'secret' => config('services.recaptcha.secret'),\n // 'response' => $request->input('g-recaptcha-response'), //input syntax since dashes //reponse = 03AHqfIOnTgcR3PRcuGaEyFy5...\n // 'remoteip' => $_SERVER['REMOTE_ADDR'], //server superglobal , remote user ip, 192.168.1.10\n //]);\n ////dd($response->json()); // attay [success=>true, challenge_ts=>2018..., hostname=>forum.local]\n //\n //if (! $response->json()['success']) {\n // throw new \\Exception('Recaptcha failed');\n //}\n \n $thread = Thread::create([\n 'user_id' => auth()->id(), //ou request('user_id'),\n 'channel_id' => request('channel_id'),\n 'title' => request('title'),\n 'body' => request('body')\n //'slug' => str_slug(request('title'))\n //'slug' => request('title') //NOW done by the model event //custom mutator...\n ]);\n \n if (request()->wantsJson()) {\n return response($thread, 201);\n }\n \n return redirect($thread->path())\n ->with('flash', 'Your thread has been published'); // view: session('flash'), not $flash\n }", "title": "" }, { "docid": "544c8c117a441d470ca9bef24febbebb", "score": "0.51832086", "text": "public function simple_php_captcha($config = array()) {\n if (!function_exists('gd_info')) {\n throw new Exception('Required GD library is missing');\n }\n\n $bg_path = URL . 'public/captcha/backgrounds/';\n $font_path = URL . 'public/captcha/fonts/';\n // Default values\n $captcha_config = array(\n 'code' => '',\n 'min_length' => 5,\n 'max_length' => 5,\n 'backgrounds' => array(\n $bg_path . '45-degree-fabric.png',\n $bg_path . 'cloth-alike.png',\n $bg_path . 'grey-sandbag.png',\n $bg_path . 'kinda-jean.png',\n $bg_path . 'polyester-lite.png',\n $bg_path . 'stitched-wool.png',\n $bg_path . 'white-carbon.png',\n $bg_path . 'white-wave.png'\n ),\n 'fonts' => array(\n $font_path . 'times_new_yorker.ttf'\n ),\n 'characters' => 'ABCDEFGHJKLMNPRSTUVWXYZabcdefghjkmnprstuvwxyz23456789',\n 'min_font_size' => 28,\n 'max_font_size' => 28,\n 'color' => '#666',\n 'angle_min' => 0,\n 'angle_max' => 10,\n 'shadow' => true,\n 'shadow_color' => '#fff',\n 'shadow_offset_x' => -1,\n 'shadow_offset_y' => 1\n );\n\n // Overwrite defaults with custom config values\n if (is_array($config)) {\n foreach ($config as $key => $value)\n $captcha_config[$key] = $value;\n }\n\n // Restrict certain values\n if ($captcha_config['min_length'] < 1)\n $captcha_config['min_length'] = 1;\n if ($captcha_config['angle_min'] < 0)\n $captcha_config['angle_min'] = 0;\n if ($captcha_config['angle_max'] > 10)\n $captcha_config['angle_max'] = 10;\n if ($captcha_config['angle_max'] < $captcha_config['angle_min'])\n $captcha_config['angle_max'] = $captcha_config['angle_min'];\n if ($captcha_config['min_font_size'] < 10)\n $captcha_config['min_font_size'] = 10;\n if ($captcha_config['max_font_size'] < $captcha_config['min_font_size'])\n $captcha_config['max_font_size'] = $captcha_config['min_font_size'];\n\n // Generate CAPTCHA code if not set by user\n if (empty($captcha_config['code'])) {\n $captcha_config['code'] = '';\n $length = mt_rand($captcha_config['min_length'], $captcha_config['max_length']);\n while (strlen($captcha_config['code']) < $length) {\n $captcha_config['code'] .= substr($captcha_config['characters'], mt_rand() % (strlen($captcha_config['characters'])), 1);\n }\n }\n\n // Generate HTML for image src\n if (strpos($_SERVER['SCRIPT_FILENAME'], $_SERVER['DOCUMENT_ROOT'])) {\n $image_src = substr(__FILE__, strlen(realpath($_SERVER['DOCUMENT_ROOT']))) . '?_CAPTCHA&amp;t=' . urlencode(microtime());\n $image_src = '/' . ltrim(preg_replace('/\\\\\\\\/', '/', $image_src), '/');\n } else {\n $_SERVER['WEB_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']);\n $image_src = substr(__FILE__, strlen(realpath($_SERVER['WEB_ROOT']))) . '?_CAPTCHA&amp;t=' . urlencode(microtime());\n $image_src = '/' . ltrim(preg_replace('/\\\\\\\\/', '/', $image_src), '/');\n }\n\n $_SESSION['_CAPTCHA']['config'] = serialize($captcha_config);\n\n return array(\n 'code' => $captcha_config['code'],\n 'image_src' => $image_src\n );\n }", "title": "" }, { "docid": "a727c0ae0ced37eb5b4f04ff078a0f88", "score": "0.5181182", "text": "public function generate_image($question) {\n $fontsdir = dirname(__FILE__) . \"/fonts\";\n $dh = opendir($fontsdir);\n if (! $dh) die (\"captcha_image class cannot read the fonts directory\");\n $fonts = array();\n while ($file = readdir($dh)) {\n if (substr($file, -4, 4) == \".ttf\") {\n $fonts[] = \"$fontsdir/$file\";\n }\n }\n if (count($fonts) == 0) die (\"captcha_image class did not find any ttf fonts to use for writing the captcha code\");\n\n // Create an image, that should be large enough for holding\n // our complete captcha. We will clip it to the right size later on.\n // The exact width is arbitrairy. If a code doesn't fit when using\n // some other fonts, then 60 might have to be made larger below.\n $img = imagecreatetruecolor(60*strlen($question), 100);\n\n // Fill background color.\n $col = imagecolorallocate($img, 230, 230, 230);\n imagefill($img, 0, 0, $col);\n\n // Draw random characters for distortion.\n $colors = array();\n for ($i=0; $i<5; $i++) {\n $cc = rand(120, 190);\n $colors[] = imagecolorallocate($img, $cc+30, $cc+20, $cc+10);\n }\n for ($i=0; $i<15; $i++) {\n $x = rand(0, 60*strlen($question));\n $y = rand(0, 100);\n $size = rand(30,90);\n $rfont = $fonts[rand(0, count($fonts)-1)];\n $rcolor = $colors[rand(0, count($colors)-1)];\n $angle = -90 + rand(0,180);\n $char = chr(rand(ord('A'), ord('A')+26));\n imagettftext($img, $size, $angle, $x, $y, $rcolor, $rfont, $char);\n }\n\n // Draw characters for the CAPTCHA answer.\n $boxwidth = 0;\n $boxheight = 0;\n for ($i=0; $i<strlen($question); $i++) {\n\n $fontcolor = imagecolorallocate($img, rand(0,200), 0, 0);\n $rfont = $fonts[rand(0, count($fonts)-1)];\n $size = rand(25,32);\n $char = substr($question, $i, 1);\n $angle = -15 + rand(0, 30);\n\n // Determine the bounding box for the rendered character.\n $box = imagettfbbox($size, $angle, $rfont, $char);\n $l = min($box[0], $box[6]);\n $r = max($box[2], $box[4]);\n $w = abs($l - $r);\n $t = min($box[5], $box[7]);\n $b = max($box[1], $box[3]);\n $h = abs($t - $b);\n\n if ($box[0] > $box[6]) {\n $boxwidth += ($box[0] - $box[6]);\n }\n\n $chary = 5 + 0 - $t;\n $chary_rand = rand(0,20);\n $charx = 5 + $boxwidth;\n imagettftext($img, $size, $angle, $charx, $chary+$chary_rand, $fontcolor, $rfont, $char);\n $boxwidth = $boxwidth + $w;\n if ($boxheight < ($h+$chary_rand)) $boxheight = $h + $chary_rand;\n }\n $boxwidth += 10;\n $boxheight += 10;\n\n // Crop the code into a new image.\n $cropped = imagecreatetruecolor($boxwidth, $boxheight);\n imagecopy($cropped, $img, 0, 0, 0, 0, $boxwidth, $boxheight);\n imagedestroy($img);\n\n // Display the image.\n header(\"Content-Type: image/gif\");\n imagegif($cropped);\n imagedestroy($cropped);\n }", "title": "" }, { "docid": "4c7c17f8e5db7b03f6b4754dc71491bd", "score": "0.51789665", "text": "public function mathCaptcha() {\n\t\t$lang = new Language;\n\t\t$association = array(\n\t\t\t'1' => 'one', '2' => 'two', '3' => 'three', '4' => 'four',\n\t\t\t'5' => 'five', '6' => 'six', '7' => 'seven', '8' => 'eight',\n\t\t\t'9' => 'nine', '10' => 'ten', '11' => 'eleven', '12' => 'twelve',\n\t\t\t'13' => 'thirteen', '14' => 'fourteen', '15' => 'fifteen', '16' => 'sixteen',\n\t\t\t'17' => 'seventeen', '18' => 'eighteen', '19' => 'nineteen', '20' => 'twenty'\n\t\t);\n\t\t$digit1 = mt_rand( 1, 20 );\n\t\t$digit2 = mt_rand( 1, 20 );\n\t\t$cube = mt_rand( 0, 1 );\n\t\t$cube2 = mt_rand( 0, 1 );\n\t\tif ( $cube === 1 ) {\n\t\t\t$dis_dig1 = strtr( $digit1, $association );\n\t\t\t$dis_dig2 = $digit2;\n\t\t} else {\n\t\t\t$dis_dig1 = $digit1;\n\t\t\t$dis_dig2 = strtr( $digit2, $association );\n\t\t}\n\t\t$_SESSION['math_captcha_answer'] = null;\n\t\tif( $cube2 === 1 ) {\n\t\t\tif ( $digit1 < 10 && $digit2 < 10 ) {\n\t\t\t\t$_SESSION['math_captcha_answer'] = $digit1 * $digit2;\n\t\t\t\t$math = $lang->_tr( $dis_dig1, 1 ) . ' &times; ' . $lang->_tr( $dis_dig2, 1 );\n\t\t\t} else {\n\t\t\t\t$_SESSION['math_captcha_answer'] = $digit1 + $digit2;\n\t\t\t\t$math = $lang->_tr( $dis_dig1, 1 ) . ' + ' . $lang->_tr( $dis_dig2, 1 );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $digit1 > $digit2 ) {\n\t\t\t\t$_SESSION['math_captcha_answer'] = $digit1 - $digit2;\n\t\t\t\t$math = $lang->_tr( $dis_dig1, 1 ) . ' - ' . $lang->_tr( $dis_dig2, 1 );\n\t\t\t} else {\n\t\t\t\t$_SESSION['math_captcha_answer'] = $digit2 - $digit1;\n\t\t\t\t$math = $lang->_tr( $dis_dig2, 1 ) . ' - ' . $lang->_tr( $dis_dig1, 1 );\n\t\t\t}\n\t\t}\n\t\treturn $math;\n\t}", "title": "" }, { "docid": "d341ffde18094cf8aab0cfbca6e07164", "score": "0.5158553", "text": "function process_si_contact_form()\n\t{\n\t $_SESSION['ctform'] = array(); // re-initialize the form session data\n\n\t if ($_SERVER['REQUEST_METHOD'] == 'POST' && @$_POST['do'] == 'contact') {\n\t\t// if the form has been submitted\n\n\t\tforeach($_POST as $key => $value) {\n\t\t if (!is_array($key)) {\n\t\t\t// sanitize the input data\n\t\t\tif ($key != 'ct_message') $value = strip_tags($value);\n\t\t\t$_POST[$key] = htmlspecialchars(stripslashes(trim($value)));\n\t\t }\n\t\t}\n\n\t\t$name = @$_POST['ct_name']; // name from the form\n\t\t$email = @$_POST['ct_email']; // email from the form\n\t\t$firstname = @$_POST['ct_firstname']; // url from the form\n\t\t$message = @$_POST['ct_message']; // the message from the form\n\t\t$captcha = @$_POST['ct_captcha']; // the user's entry for the captcha code\n\t\t$name = substr($name, 0, 64); // limit name to 64 characters\n\n\t\t$errors = array(); // initialize empty error array\n\n\t\tif (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) {\n\t\t // only check for errors if the form is not in debug mode\n\n\t\t if (strlen($name) < 3) {\n\t\t\t// name too short, add error\n\t\t\t$errors['name_error'] = 'Merci de remplir le champ \\'nom\\'';\n\t\t }\n\n\t\t if (strlen($firstname) < 2) {\n\t\t\t// name too short, add error\n\t\t\t$errors['name_error'] = 'Merci de remplir le champ \\'prenom\\'';\n\t\t }\n\t\t \n\t\t if (strlen($email) == 0) {\n\t\t\t// no email address given\n\t\t\t$errors['email_error'] = 'Merci de remplir le champ \\'Email\\'';\n\t\t } else if ( !preg_match('/^(?:[\\w\\d]+\\.?)+@(?:(?:[\\w\\d]\\-?)+\\.)+\\w{2,4}$/i', $email)) {\n\t\t\t// invalid email format\n\t\t\t$errors['email_error'] = 'L\\'adresse Email est invalide';\n\t\t }\n\n\t\t if (strlen($message) < 20) {\n\t\t\t// message length too short\n\t\t\t$errors['message_error'] = 'Merci d\\'entrer un message';\n\t\t }\n\t\t}\n\n\t\t// Only try to validate the captcha if the form has no errors\n\t\t// This is especially important for ajax calls\n\t\tif (sizeof($errors) == 0) {\n\t\t require_once dirname(__FILE__) . '/securimage/securimage.php';\n\t\t $securimage = new Securimage();\n\n\t\t if ($securimage->check($captcha) == false) {\n\t\t\t$errors['captcha_error'] = 'Code de s&eacute;curit&eacute; incorrect<br />';\n\t\t }\n\t\t}\n\n\t\tif (sizeof($errors) == 0) {\n\t\t // no errors, send the form\n\t\t $time = date('r');\n\t\t $message = \"A message was submitted from the contact form. The following information was provided.<br /><br />\"\n\t\t\t\t\t\t. \"Nom: $name<br />\"\n\t\t\t\t\t\t. \"Prenom: $firstname<br />\"\n\t\t\t\t\t\t. \"Email: $email<br />\"\n\t\t\t\t\t\t. \"Message:<br />\"\n\t\t\t\t\t\t. \"<pre>$message</pre>\"\n\t\t\t\t\t\t. \"<br /><br />IP Address: {$_SERVER['REMOTE_ADDR']}<br />\"\n\t\t\t\t\t\t. \"Time: $time<br />\"\n\t\t\t\t\t\t. \"Browser: {$_SERVER['HTTP_USER_AGENT']}<br />\";\n\n\t\t $message = wordwrap($message, 70);\n\n\t\t if (isset($GLOBALS['DEBUG_MODE']) && $GLOBALS['DEBUG_MODE'] == false) {\n\t\t\tmail($GLOBALS['ct_recipient'], $GLOBALS['ct_msg_subject'], $message, \"From: {$GLOBALS['ct_recipient']}\\r\\nReply-To: {$email}\\r\\nContent-type: text/html; charset=ISO-8859-1\\r\\nMIME-Version: 1.0\");\n\t\t }\n\n\t\t $_SESSION['ctform']['error'] = false; // no error with form\n\t\t $_SESSION['ctform']['success'] = true; // message sent\n\t\t} else {\n\t\t // save the entries, this is to re-populate the form\n\t\t $_SESSION['ctform']['ct_name'] = $name; // save name from the form submission\n\t\t $_SESSION['ctform']['ct_email'] = $email; // save email\n\t\t $_SESSION['ctform']['ct_message'] = $message; // save message\n\n\t\t foreach($errors as $key => $error) {\n\t\t\t// set up error messages to display with each field\n\t\t\t$_SESSION['ctform'][$key] = \"<span style=\\\"font-weight: bold; color: #f00\\\">$error</span>\";\n\t\t }\n\n\t\t $_SESSION['ctform']['error'] = true; // set error floag\n\t\t}\n\t } // POST\n\t}", "title": "" }, { "docid": "0fe92ea756d425737e8fe329f302fade", "score": "0.5154449", "text": "private function load_funcaptcha()\n {\n if(class_exists('FUNCAPTCHA')) \n {\n $funcaptcha = funcaptcha_API();\n $options = funcaptcha_get_settings();\n return $funcaptcha->getFunCaptcha($options['public_key']);\n } \n else\n {\n return '';\n } \n }", "title": "" }, { "docid": "5088a6fde8ac8f92962f405499cf0005", "score": "0.5148642", "text": "function setCaptcha($value)\t{\n\t\t$this->captcha = $value; \n\t}", "title": "" }, { "docid": "16cd454d0174c0f993931d38591d1a45", "score": "0.5147084", "text": "function recaptcha_ready()\n\t{\n\t\t// Register actions to intercept\n\t\t$actions = array();\n\t\t$actions = elgg_trigger_plugin_hook('actionlist', 'captcha', null, $actions);\n\t\t\n\t\tif (($actions) && (is_array($actions)))\n\t\t{\n\t\t\tforeach ($actions as $action)\n\t\t\t\telgg_register_plugin_hook_handler(\"action\", $action, \"recaptcha_verify_action_hook\");\n\t\t}\n\t}", "title": "" }, { "docid": "4310832f0f4f2a76adf49a695cd64bbe", "score": "0.51424605", "text": "function captchaCheck($reCaptcha, $reCaptchaKey) {\n\t$url=\"https://www.google.com/recaptcha/api/siteverify?secret=\" . $reCaptchaKey;\n\t$url=$url . \"&response=\" . $reCaptcha;\n\t$url=$url . \"&remoteip=\" . $_SERVER['REMOTE_ADDR'];\n\t$status=json_decode(file_get_contents($url));\n\tif ($status->success == false) {\n\t\tlogout();\n\t\texit;\n\t}\n}", "title": "" }, { "docid": "606e092db534a55e4bb6f4312b047c1c", "score": "0.51405233", "text": "public function refreshCaptcha()\n {\n // Captcha configuration\n $vals = array(\n 'word' => '',\n 'img_path' => './assets/captcha/',\n 'img_url' => base_url('assets/captcha/'),\n 'font_path' => FCPATH . 'assets/fonts/roboto-black.ttf',\n 'img_width' => 250,\n 'img_height' => 100,\n 'expiration' => 60,\n 'word_length' => 8,\n 'font_size' => 25,\n 'img_id' => 'Imageid',\n 'pool' => '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',\n\n // White background and border, black text and blue grid\n 'colors' => array(\n 'background' => array(255, 255, 255),\n 'border' => array(255, 255, 255),\n 'text' => array(0, 0, 0),\n 'grid' => array(111, 251, 248)\n )\n );\n $captcha = create_captcha($vals);\n\n // Unset previous captcha and set new captcha word\n $this->session->unset_userdata('captchaCode');\n $this->session->set_userdata('captchaCode', $captcha['word']);\n\n // Display captcha image\n echo $captcha['image'];\n }", "title": "" }, { "docid": "400bac64791567de9a82992b571747bf", "score": "0.51370466", "text": "protected function generateCaptchaImageTag(){\n if (!is_dir('captcha')) {\n mkdir('./captcha', 0777, TRUE);\n }\n $this->load->helper('captcha');\n $random = trim(rand(1001, 9999)); //random number is in this range\n $vals = array(\n 'word'\t=> $random,\t\t//random number\n 'img_path' \t=> './'.CAPTCHA_FOLDER,\n 'img_url' \t=> base_url() . CAPTCHA_FOLDER,\n 'img_width'\t=> CAPTCHA_W,\n 'img_height' \t=> CAPTCHA_H,\n 'expiration' \t=> CAPTCHA_EXP_DURATION,\n 'font_size' \t=> CAPTCHA_FONT_SIZE,\n 'font_path' => FCPATH. 'captcha/font/OpenSans-Bold.ttf',\n );\n\n $cap = create_captcha($vals);\n //save into database\n// $data = array(\n// 'captcha_time'\t=> $cap['time'],\n// 'ip_address'\t=> $this->input->ip_address(),\n// 'word'\t=> $cap['word']\n// );\n//\n// $query = $this->db->insert_string('captcha', $data);\n// $this->db->query($query);\n\n //generate captcha session\n $session_userdata = [\n 'CAPTCHA_EXPIRE_TIME' => $cap['time'],\n 'CAPTCHA_CODE' => $cap['word']\n ];\n $this->session->set_userdata($session_userdata);\n\n return $cap['image'];\n }", "title": "" }, { "docid": "922f8cad21117ef53db8e3d6940d4e7e", "score": "0.5137026", "text": "protected function reCaptcha()\n {\n\t$request = request();\n $secret = '6LfwKzUUAAAAAEnr87OfoR3EUqED4ewpVLfZ2SAB';\n $url = 'https://www.google.com/recaptcha/api/siteverify';\n $input = $request->all();\n $query = 'secret='.$secret.'&response='.$input['g-recaptcha-response'].'&remoteip='.$request->ip();\n $ch = curl_init(); \n curl_setopt($ch,CURLOPT_URL,$url);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n curl_setopt($ch,CURLOPT_HEADER, false); \n curl_setopt($ch, CURLOPT_POST, count($query));\n curl_setopt($ch, CURLOPT_POSTFIELDS, $query); \n \n $output=json_decode(curl_exec($ch));\n Log::info(print_r($output, true));\n curl_close($ch);\n \n if(isset($output->success)){\n return $output->success;\n }else{\n return false;\n }\n\n }", "title": "" }, { "docid": "3ec648551b4096c7446c3f28806eb9f4", "score": "0.51307535", "text": "public function OnAddContentCaptcha(&$content) \n\t{\t\n\t\tif (!defined(\"ADMIN_SECTION\")){\n\t\t\t$arSettings = self::getParamSite();\n\t\t\tif($arSettings[\"act\"] == \"Y\" && self::checkBrowser() && !self::checkMask($arSettings[\"mask_exclusion\"])){\n\t\t\t\t$theme = isset($arSettings[\"theme\"]) ? $arSettings[\"theme\"] : 'light';\n $size = isset($arSettings[\"size\"]) ? $arSettings[\"size\"] : 'normal';\n $badge = isset($arSettings[\"badge\"]) ? $arSettings[\"badge\"] : 'bottomright';\n\t\t\t\t$search = array (\n\t\t\t\t\t'/<img src=\"\\/bitrix\\/tools\\/captcha\\.php\\?captcha_sid=(.+?(?=>))>/is',\n\t\t\t\t\t'/<img src=\"\\/bitrix\\/tools\\/captcha\\.php\\?captcha_code=(.+?(?=>))>/is',\n\t\t\t\t\t'/name=\"captcha_word\"/is'\n\t\t\t\t\t);\n\t\t\t\t$replace = array (\n\t\t\t\t\t'<div class=\"g-recaptcha\" data-theme=\"' . $theme . '\" data-sitekey=\"'. $arSettings[\"key\"] .'\" data-size=\"'. $size .'\" data-badge=\"'. $badge .'\" data-callback=\"RecaptchafreeSubmitForm\"></div>',\n\t\t\t\t\t'<div class=\"g-recaptcha\" data-theme=\"' . $theme . '\" data-sitekey=\"'. $arSettings[\"key\"] .'\" data-size=\"'. $size .'\" data-badge=\"'. $badge .'\" data-callback=\"RecaptchafreeSubmitForm\"></div>',\n\t\t\t\t\t'name=\"captcha_word\" style=\"display:none\" value=\"'. substr($arSettings[\"key\"], 0, 5).'\"'\n\t\t\t\t\t);\n\t\t\t\t$content = preg_replace($search, $replace, $content);\n\t\t\t}\n\t\t} \n\t}", "title": "" }, { "docid": "55f4d72501e4b036d19b2214c92716ef", "score": "0.5126859", "text": "public function do_contact()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n $workarea = $console->tpl->getWorkArea('Cms');\n\n $securimage = new Securimage();\n\n $lang = $request->param('l', Validator::CNAME);\n\n if (!$lang)\n $lang = Conf::getActive()->lang;\n\n $rqt = new Contact_Request();\n $rqt->handleSaveRequest($request, array('contact' => new Contact_Entity()));\n\n $missing = new TArray();\n\n $conf = Conf::getActive();\n if(false !== $conf->captcha){\n $captcha = $securimage->check($_POST['captcha']);\n }\n\n\n $errors = array(\n 'de' => array(\n 'salutation' => 'Anrede ist ein Pflichtfeld.',\n 'lastname' => 'Nachname ist ein Pflichtfeld.',\n 'surname' => 'Vorname ist ein Pflichtfeld.',\n //'company' => 'Firma ist ein Pflichtfeld.',\n 'email' => 'E-Mail ist ein Pflichtfeld.',\n 'comment' => 'Anfrage ist ein Pflichtfeld.',\n 'captcha' => 'Der Sicherheitscode war inkorrekt: ',\n 'error' => 'Die von Ihnen gemachten Angaben sind unvollständig. Bitte füllen Sie alle Pflichfelder aus.'\n ),\n 'en' => array(\n 'salutation' => 'Salution is required.',\n 'lastname' => 'Lastname is require.',\n 'surname' => 'Surname is required.',\n //'company' => 'Company is required.',\n 'email' => 'E-Mail is required.',\n 'comment' => 'Inquiry is required.',\n 'captcha' => 'The security code was invalid: ',\n 'error' => 'The information you provided is incomplete. Please fill in all required fields.'\n ),\n );\n\n\n\n $rqt->errors = array();\n\n $error = false;\n\n if (false !== $conf->captcha) {\n if (!$captcha) {\n //$rqt->addError($errors[$lang]['captcha']);\n $error = true;\n $missing->captcha = true;\n }\n }\n\n\n if (!$rqt->entities['contact']->salutation) {\n //$rqt->addError($errors[$lang]['lastname']);\n $error = true;\n $missing->salutation = true;\n }\n\n if ($rqt->entities['contact']->isEmpty('lastname')) {\n //$rqt->addError($errors[$lang]['lastname']);\n $error = true;\n $missing->lastname = true;\n }\n\n if ($rqt->entities['contact']->isEmpty('surname')) {\n //$rqt->addError($errors[$lang]['surname']);\n $missing->surname = true;\n $error = true;\n }\n\n if ($rqt->entities['contact']->isEmpty('company')) {\n //$rqt->addError($errors[$lang]['company']);\n //$missing->company = true;\n //$error = true;\n }\n\n if ($rqt->entities['contact']->isEmpty('email')) {\n //$rqt->addError($errors[$lang]['email']);\n $missing->email = true;\n $error = true;\n }\n\n if ($rqt->entities['contact']->isEmpty('comment')) {\n //$rqt->addError($errors[$lang]['comment']);\n $missing->comment = true;\n $error = true;\n }\n\n if ($error)\n $rqt->addError($errors[$lang]['error']);\n\n if (!$rqt->errors) {\n\n try{\n $mailer = new MessageMail();\n\n $newContactMsg = new Contact_New_Message();\n $newContactMsg->render($rqt->entities['contact']);\n\n $confObj = Conf::getActive();\n\n if($confObj->def_reply_to)\n $newContactMsg->replyTo = $confObj->def_reply_to;\n \n $newContactMsg->receiver = $confObj->admin_mail;\n\n // wird vorab benötigt falls in send message eine exception kommt\n $copyContactMsg = new Contact_Copy_Message();\n $copyContactMsg->render($rqt->entities['contact'], $lang);\n $copyContactMsg->receiver = $rqt->entities['contact']->email;\n\n if ('[email protected]' == $rqt->entities['contact']->email) {\n throw new Exception('Debuggung');\n }\n\n $mailer->sendMessage($newContactMsg);\n\n if (Conf::getActive()->dev_mail) {\n $newContactMsg = new Contact_New_Message();\n $newContactMsg->render($rqt->entities['contact']);\n $newContactMsg->receiver = Conf::getActive()->dev_mail;\n $mailer->sendMessage($newContactMsg);\n }\n\n if (isset($_POST['contact']['send_copy'])) {\n $mailer->sendMessage($copyContactMsg);\n }\n\n $workarea->lang = $lang;\n //$workarea->addTemplate( 'contact_sent' );\n $workarea->rqtPage = 'contact_sent';\n \n }\n catch (Exception $exc){\n \n $workarea->addVar('errors',$rqt->errors);\n $workarea->lang = $lang;\n $workarea->addVar('contact',$rqt->entities['contact']);\n $workarea->addVar('missing',$missing);\n $workarea->addVar('message',$copyContactMsg);\n //$workarea->addTemplate( 'contact_failed' );\n $workarea->rqtPage = 'contact_failed';\n }\n\n } else {\n\n $workarea->addVar('errors',$rqt->errors);\n $workarea->lang = $lang;\n $workarea->addVar('contact',$rqt->entities['contact']);\n $workarea->addVar('missing',$missing);\n //$workarea->addTemplate( 'contact' );\n $workarea->rqtPage = 'contact';\n }\n\n\n\n }", "title": "" }, { "docid": "da1816d4f25e3f576cbaf8b8fb8235e4", "score": "0.512522", "text": "function checkCaptcha($captcha){\n if(!$captcha){\n throw new captchaException(\"Captcha moet ingevuld worden!\");\n } else {\n $response=json_decode(file_get_contents(\"https://www.google.com/recaptcha/api/siteverify?secret=6Lc72xIUAAAAAPizuF3nUbklCPljVCVzgYespz8o&response=\".$captcha.\"&remoteip=\".$_SERVER['REMOTE_ADDR']));\n if($response->success==false) {\n throw new captchaException(\"Je bent een spammer!\");\n }\n }\n}", "title": "" }, { "docid": "b228e8953957e768c7c045f46532428b", "score": "0.51162475", "text": "public function RefreshCaptcha(){\n return response()->json(['captcha' => captcha_img()]);\n }", "title": "" }, { "docid": "588a25f465b3365e1ce39623a77b2d81", "score": "0.51125354", "text": "function validate_captcha() {\n $ip = $_SERVER['REMOTE_ADDR'];\n // First, delete old captchas\n $expiration = time() - 10000; // 15 second to remove from database\n $this->SA->db->query(\"DELETE FROM captcha WHERE captcha_time < \" . $expiration);\n\n // Then see if a captcha exists:\n $sql = \"SELECT COUNT(*) AS count FROM captcha WHERE word = ? AND ip_address = ? AND captcha_time > ?\";\n $binds = array($_POST['captcha'], $this->SA->input->ip_address(), $expiration);\n $query = $this->SA->db->query($sql, $binds);\n $row = $query->row();\n\n if ($row->count == 0) {\n\t\t\t$this->SA->form_validation->set_message('valid_captcha', \"Captcha tidak valid / salah\");\n\t\t\treturn false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "c4935da3f83481dbb50f502fca47129a", "score": "0.5107162", "text": "public function CreateInstance()\r\n\t{\r\n\t\t$return = array();\r\n\t\t\r\n\t\t// load captcha using web service\r\n\t\t$url = 'http://api.textcaptcha.com/' . $this->config['api_key'];\r\n\t\t\r\n\t\t$OurXML = false;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t $xml = @new SimpleXMLElement($url,null,true);\r\n\t\t} \r\n\t\tcatch (Exception $e) \r\n\t\t{\r\n\t\t\t//unable to get qeustion from the TextCaptcha service use one of the stored\r\n\t\t\t$xml = $this->GetStoredInstance();\r\n\t\t\t\r\n\t\t\t//check if we ware able to get one of the stored\r\n\t\t\tif (!$xml)\r\n\t\t\t{\r\n\t\t\t\t// if there is a problem, use static fallback..\r\n\t\t\t\t$fallback = \r\n\t\t\t\t'<captcha>'.\r\n\t\t\t\t '<question>Is ice hot or cold?</question>'.\r\n\t\t\t\t '<answer>'.md5('cold').'</answer>'.\r\n\t\t\t\t'</captcha>';\r\n\t\t\t\t\r\n\t\t\t\t$xml = new SimpleXMLElement($fallback);\r\n\t\t\t\t\r\n\t\t\t\t//mem\r\n\t\t\t\tunset($fallback);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//define that this is our XML\r\n\t\t\t$OurXML = true;\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif (!$OurXML)\r\n\t\t{\r\n\t\t\t$this->StoreCaptcha($xml);\r\n\t\t}\r\n\t\t\t\r\n\t\t// display question as part of form\r\n\t\t$return['question'] = (string)$xml->question;\r\n\t\t \r\n\t\t//store answers in session\r\n\t\t$ans = array();\r\n\t\tforeach ($xml->answer as $hash)\r\n\t\t{\r\n\t\t\t//salt the hash\r\n\t\t\t$salted = md5($hash . $this->config['salt']);\r\n\t\t\t//store\r\n\t\t \t$ans[] = (string)$salted;\r\n\t\t}\r\n\t\t$_SESSION['CAPTCHA']['Answers'] = $ans;\r\n\t\t\r\n\t\t//free up memory\r\n\t\tunset($ans, $hash, $salted, $xml, $OurXML, $url);\r\n\t\t\r\n\t\t//Generate response field name and save it\r\n\t\t$ReponseFieldName = md5(uniqid() . $this->config['salt'] . time());\r\n\t\t\r\n\t\t$return['ResponseFieldName'] = $ReponseFieldName;\r\n\t\t$_SESSION['CAPTCHA']['ResponseFieldName'] = $ReponseFieldName;\r\n\t\t\r\n\t\tunset($ReponseFieldName);\r\n\t\t\r\n\t\t//return the question\r\n\t\treturn $return;\r\n\t}", "title": "" }, { "docid": "7c1f02f9f58eca31adf47a35a88063e5", "score": "0.5106693", "text": "public static function useCaptcha() {\n\t\treturn Config::get ( 'use_captcha' ) == '1';\n\t}", "title": "" }, { "docid": "2814743d84f3ffff8950671cd1adddcf", "score": "0.5090561", "text": "function captcha_not_matched() {\r\n\t\tif( isset($_POST['captcha']) ){\r\n\t\t\t$captcha_text = $_POST['captcha'];\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$captcha_text = '';\r\n\t\t}\r\n\r\n\t\t// Return a boolean representation if the text entered and session don't match\r\n\t\treturn strtoupper($captcha_text) != strtoupper($_SESSION['captcha']);\r\n\t}", "title": "" }, { "docid": "f0e64c7a83ab6ac9b2d6c3f59d036129", "score": "0.50892687", "text": "function handlePost()\n {\n // CSRF protection\n\n $token = $this->trimmed('token');\n if (!$token || $token != common_session_token()) {\n // TRANS: Form validation error message.\n $this->show_form(_('There was a problem with your session token. '.\n 'Try again, please.'));\n return;\n }\n\n if ($this->arg('upload')) {\n $this->uploadLogo();\n } else if ($this->arg('crop')) {\n $this->cropLogo();\n } else {\n // TRANS: Form validation error message when an unsupported argument is used.\n $this->showForm(_('Unexpected form submission.'));\n }\n }", "title": "" }, { "docid": "d38092be4305892fc74269c33a0ab2ba", "score": "0.5088019", "text": "public function resetPhrase()\n {\n// $phrasePlaintext = substr(md5(microtime()), 0, 5);\n $charSet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $phrasePlaintext = substr(str_shuffle(str_repeat($charSet, 5)), 0, 5);\n // Generate a random environment variable to put together with the encryption.\n // As this is stored only server side, the client side should not be able to decrypt\n $enc_iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length(CIPHERMETHOD));\n $encrypted = openssl_encrypt($phrasePlaintext, CIPHERMETHOD, CAPTCHAKEY, 0, $enc_iv) . \"::\" . bin2hex($enc_iv);\n $this->phrase = $encrypted;\n Session::setSession(\"captcha\", serialize($this));\n }", "title": "" }, { "docid": "55d7f2140742222feee1b428b2fda729", "score": "0.5087105", "text": "public function prepareLoginAttempts()\n\t{\n\t\t$showCaptcha = false;\n\n\t\t// Check if count exist\n\t\tif ($this->showCaptcha())\n\t\t{\n\t\t\t$showCaptcha = true;\n\t\t}\n\n\t\treturn __engineReaction(1, ['show_captcha' => $showCaptcha]);\n\t}", "title": "" }, { "docid": "ebc59e04bfd35515b79887a13ad52af1", "score": "0.50808215", "text": "public function captcha_check(){\n $url = 'https://www.google.com/recaptcha/api/siteverify?secret='.$this->config->item('google_recaptcha_secret').'&response='.$this->input->post('g-recaptcha-response'); \n\t\t$ch = curl_init();\n\t\tcurl_setopt ($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);\n\t\tcurl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$verifyResponse = curl_exec($ch);\n\t\t\n\t\t$responseData = json_decode($verifyResponse);\n\t\t\n\t\tif(!$responseData->success){\n\t\t\t$this->form_validation->set_message('captcha_check', '%s 입력값이 잘못되었습니다');\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t }", "title": "" }, { "docid": "05d9a0d2bfa5420e499ee12aec6c3815", "score": "0.5079309", "text": "public function onCheckAnswer()\n\t{\n\t\tjimport('joomla.http');\n\n\t\t// Required objects \n\t\t$input = JFactory::getApplication()->input;\n\n\t\t//Data array\n\t\t$data = array('secret' => $this->params->get('secret_key'), 'response' => $input->get('g-recaptcha-response')); \n\t\t$moduleParams = new JRegistry();\n\t\t$http = new JHttp($moduleParams, $transport = null);\n\t\t\n\t\t//Post data to url and get response\n\t\t$response = $http->post($this->params->get('post_url'), $data);\n\t\t$response = json_decode($response->body);\n\n\t\tif($response->success)\n\t\t\treturn true;\n\t\telse\n\t\t{\t\t\t\n\t\t\t$this->_subject->setError(JText::_('PLG_CAPTCHA_RECAPTCHANEW_ERROR'));\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
361d34934ff41ce90ad3b183c8a60f28
Creates a question from a QTI file Receives parameters from a QTI parser and creates a valid ILIAS question object
[ { "docid": "44651aae80ae70486bda8bd679f0573d", "score": "0.46574602", "text": "function fromXML(&$item, &$questionpool_id, &$tst_id, &$tst_object, &$question_counter, &$import_mapping)\n\t{\n\t\t#$this->getPlugin()->includeClass(\"import/qti12/class.assMathematikOnlineImport.php\");\n\t\t#$import = new assMathematikOnlineImport($this);\n\t\t#$import->fromXML($item, $questionpool_id, $tst_id, $tst_object, $question_counter, $import_mapping);\n\t}", "title": "" } ]
[ { "docid": "fcda30c6f0a0b41f681d5b3153a76d5c", "score": "0.6139671", "text": "function readquestion($lines) {\n \t// converts it into a question object suitable for processing and insertion.\n\n $question = $this->defaultquestion();\n $comment = NULL;\n \n // define replaced by simple assignment, stop redefine notices\n $gift_answerweight_regex = \"^%\\-*([0-9]{1,2})\\.?([0-9]*)%\"; \n\n // REMOVED COMMENTED LINES and IMPLODE\n foreach ($lines as $key => $line) {\n $line = trim($line);\n if (substr($line, 0, 2) == \"//\") {\n $lines[$key] = \" \";\n }\n }\n\n $text = trim(implode(\" \", $lines));\n\n if ($text == \"\") {\n return false;\n }\n\n // Substitute escaped control characters with placeholders\n $text = $this->escapedchar_pre($text);\n\n // Look for category modifier ---------------------------------------------------------\n if (ereg( '^\\$CATEGORY:', $text)) {\n // $newcategory = $matches[1];\n $newcategory = trim(substr( $text, 10 ));\n $newcategory = trim(substr( $newcategory, 0, strpos($newcategory, \"::\")));\n\t\t\t\n $question->setCategoryFromName($newcategory);\n $text = trim(substr($text, 10+strlen($newcategory)));\n \n // build fake question to contain category\n \n \t// XXX: create a category !\n //return true;\n }\n \n // QUESTION NAME parser --------------------------------------------------------------\n if (substr($text, 0, 2) == \"::\") {\n $text = substr($text, 2);\n\n $namefinish = strpos($text, \"::\");\n if ($namefinish === false) {\n $question->prompt = false;\n // name will be assigned after processing question text below\n } else {\n $questionname = substr($text, 0, $namefinish);\n $question->prompt = addslashes(trim($this->escapedchar_post($questionname)));\n $text = trim(substr($text, $namefinish+2)); // Remove name from text\n }\n } else {\n $question->prompt = false;\n }\n\n\n // FIND ANSWER section -----------------------------------------------------------------\n // no answer means its a description\n $answerstart = strpos($text, \"{\");\n $answerfinish = strpos($text, \"}\");\n\n $description = false;\n if (($answerstart === false) and ($answerfinish === false)) {\n $description = true;\n $answertext = '';\n $answerlength = 0;\n }\n elseif (!(($answerstart !== false) and ($answerfinish !== false))) {\n //$this->error( get_string( 'braceerror', 'quiz' ), $text );\n return false;\n }\n else {\n $answerlength = $answerfinish - $answerstart;\n $answertext = trim(substr($text, $answerstart + 1, $answerlength - 1));\n }\n\n \n\t\t// Format QUESTION TEXT without answer, inserting \"_____\" as necessary\n if ($description) {\n $text = $text;\n }\n elseif (substr($text, -1) == \"}\") {\n // no blank line if answers follow question, outside of closing punctuation\n $text = substr_replace($text, \"\", $answerstart, $answerlength+1);\n } else {\n // inserts blank line for missing word format\n $text = substr_replace($text, \"_____\", $answerstart, $answerlength+1);\n }\n\n // get text format from text\n $oldtext = $text;\n $textformat = 0;\n if (substr($text,0,1)=='[') {\n $text = substr( $text,1 );\n $rh_brace = strpos( $text, ']' );\n $qtformat= substr( $text, 0, $rh_brace );\n $text = substr( $text, $rh_brace+1 );\n \n }\n // i must find out for what this param is used\n $question->textformat = $textformat;\n \t\t\n \t\t// question text \n $question->quest_text = addslashes(trim($this->escapedchar_post($text)));\n\n // set question name if not already set\n\t\tif ($question->prompt === false) {\n\t\t\t$question->prompt = $question->quest_text;\n\t\t}\n\n // ensure name is not longer than 250 characters\n $question->prompt = $question->prompt ;\n $question->prompt = strip_tags(substr( $question->prompt, 0, 250 ));\n\n // determine QUESTION TYPE -------------------------------------------------------------\n $question->qtype = NULL;\n\n // give plugins first try\n // plugins must promise not to intercept standard qtypes\n // MDL-12346, this could be called from lesson mod which has its own base class =(\n /*\n if (method_exists($this, 'try_importing_using_qtypes') && ($try_question = $this->try_importing_using_qtypes( $lines, $question, $answertext ))) {\n return $try_question;\n }\n\t\t*/\n if ($description) {\n $question->qtype = 'title';\n }\n elseif ($answertext == '') {\n $question->qtype = 'extended_text';\n }\n elseif ($answertext{0} == \"#\"){\n $question->qtype = 'numerical';\n\n\t\t} elseif (strpos($answertext, \"~\") !== false) {\n\t\t\t\n\t\t\t// only Multiplechoice questions contain tilde ~\n\t\t\tif (strpos($answertext,\"=\") === false) {\n\t\t\t\t\n\t\t\t\t// multiple answers are enabled if no single answer is 100% correct\n\t\t\t\t$question->qtype = 'choice_multiple'; \n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// only one answer allowed (the default)\n\t\t\t\t$question->qtype = 'choice';\n\t\t\t}\n }", "title": "" }, { "docid": "b23f825c10d4f65dd4a105960c137530", "score": "0.57058394", "text": "function readquestion($lines) {\n /// this format, this function converts it into a question \n /// object suitable for processing and insertion into Moodle.\n\n echo \"<p>This quiz format has not yet been completed!</p>\";\n\n return NULL;\n }", "title": "" }, { "docid": "eb925dceb6cd6f2a38fe7f2ebc74a598", "score": "0.56897336", "text": "function createQuestion(){\n\t\t\tglobal $db;\n\t\t\tglobal $json;\n\t\t\t\t\t\t\n\t\t\t//Check if type meets minimum requirements\n\t\t\tif($this->type == \"\" || $this->type == null){\n\t\t\t\t$json->invalidMinimumRequirements(\"Type\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//Checks if type meets our supported types\n\t\t\t\tswitch($this->type){\n\t\t\t\t\tcase \"multipleChoice\":break;\n\t\t\t\t\tcase \"slider\":break;\n\t\t\t\t\tdefault : $json->invalidRequest(); return;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Check if question meets minimum requirements\n\t\t\tif($this->question == \"\" || $this->question == null || strlen($this->question) < 6 || strlen($this->question) > 500){\n\t\t\t\t$json->invalidMinimumRequirements(\"Question\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\t\n\t\t\t$insert = $db->prepare('INSERT INTO question VALUES (DEFAULT, :type, :question)');\n\t\t\t$insert->bindParam(':type', $this->type);\n\t\t\t$insert->bindParam(':question', $this->question);\n\t\t\t\n\t\t\tif($insert->execute()){\n\t\t\t\t$json->created(\"Question\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$json->server();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "30e310b8b99123143de68999e2efd42c", "score": "0.55963504", "text": "function getQuestionTypeObject($question,$validate = 0){\n\t\t$uid = $question['uid'];\n\t\t$content = '';\n\t\t$saveArray = array();\n\n\t\tswitch ($question['type']){\n\t\t\tcase 'open':\n\t\t\t\t$question_obj = new question_open();\n\t\t\t\t$answer = array();\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\t$this->piVars[$question['uid']]['text'] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t}\n\t\t\t\t$answer['text'] = $this->piVars[$question['uid']]['text'];\n\t\t\t\tif ($answer['text'] == '') $answer['text'] = $question[\"open_in_text\"];\n\t\t\t\t$question_obj->init($uid,$this,$answer,$validate,\"error\",\"d.m.y\",\",\");\n\t\t\t\tbreak;\n\t\t\tcase 'closed':\n\t\t\t\t$question_obj = new question_closed();\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\tif (!is_array($this->saveArray[$question['uid']]['answer']) AND stristr($this->saveArray[$question['uid']]['answer'],'<phparray>')){\n\t\t\t\t\t\t$this->piVars[$question['uid']]['options'] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$answer = $this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid, $this, $answer, $validate);\n\t\t\tbreak;\n\t\t\tcase 'dd_words':\n\t\t\t\t$question_obj = new question_dd_words();\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\tif (!is_array($this->saveArray[$question['uid']]['answer']) AND stristr($this->saveArray[$question['uid']]['answer'],'<phparray>')){\n\t\t\t\t\t\t$this->piVars[$question['uid']]['options'] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$answer = $this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid, $this, $answer, $validate);\n\t\t\tbreak;\n\t\t\tcase 'dd_area':\n\t\t\t\t$question_obj = new question_dd_area();\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\tif (!is_array($this->saveArray[$question['uid']]['answer']) AND stristr($this->saveArray[$question['uid']]['answer'],'<phparray>')){\n\t\t\t\t\t\t$this->piVars[$question['uid']]['options'] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$answer = $this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid, $this, $answer, $validate);\n\t\t\tbreak;\n\t\t\tcase 'dd_pictures':\n\t\t\t\t$question_obj = new question_dd_pictures();\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\tif (!is_array($this->saveArray[$question['uid']]['answer']) AND stristr($this->saveArray[$question['uid']]['answer'],'<phparray>')){\n\t\t\t\t\t\t$this->piVars[$question['uid']]['options'] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$answer = $this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid, $this, $answer, $validate);\n\t\t\tbreak;\n\t\t\tcase 'matrix':\n\t\t\t\t$question_obj = new question_matrix();\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t}\n\t\t\t\t$answer=$this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid,$this,$answer,$validate,'error',\"d.m.y\",\",\");\n\t\t\t\tbreak;\n\t\t\tcase 'semantic':\n\t\t\t\t$question_obj = new question_semantic();\n\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t}\n\t\t\t\t$answer = $this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid,$this,$answer,$validate);\n\t\t\t\tbreak;\n\t\t\tcase 'demographic':\n\t\t\t\t$question_obj = new question_demographic();\n\n\t\t\t\tif (is_array($this->saveArray[$question['uid']]) AND !$this->piVars[$question['uid']] AND $this->saveArray[$question['uid']]){\n\t\t\t\t\t$this->piVars[$question['uid']] = $this->saveArray[$question['uid']]['answer'];\n\t\t\t\t}\n\t\t\t\t$answer=$this->piVars[$question['uid']];\n\n\t\t\t\tif (is_array($answer['fe_users'])){\n\t\t\t\t\tforeach ($answer['fe_users'] as $field => $value){\n\t\t\t\t\t\t//t3lib_div::devLog('demographic answer field '.$question['uid'], $this->prefixId, 0, array($field,$value));\n\t\t\t\t\t\tif ($value == ''){\n\t\t\t\t\t\t\t$answer['fe_users'][$field] = $GLOBALS['TSFE']->fe_user->user[$field];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (is_array($options['fields'])){\n\t\t\t\t\tforeach ($options['fields'] as $field => $type){\n\t\t\t\t\t\t//t3lib_div::devLog('demographic answer field '.$question['uid'], $this->prefixId, 0, array($field,$type));\n\t\t\t\t\t\tif ($answer['fe_users'][$field] == ''){\n\t\t\t\t\t\t\t$answer['fe_users'][$field] = $GLOBALS['TSFE']->fe_user->user[$field];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$question_obj->init($uid,$this,$answer,$validate,\"error\",\"\",\"\");\n\t\t\t\tbreak;\n\t\t\tcase 'privacy':\n\t\t\t\t$question_obj = new question_privacy();\n\t\t\t\t$answer = $this->piVars[$question['uid']];\n\t\t\t\t$question_obj->init($uid,$this,$answer,$validate);\n\t\t\t\tbreak;\n\t\t\tcase 'blind':\n\t\t\t\t$question_obj = new question_blind();\n\t\t\t\t$answer = array();\n\t\t\t\t$question_obj->init($uid,$this,$answer);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t/*Hook*/\n\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['getDifferentQuestionTypeObject'])){\n\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['getDifferentQuestionTypeObject'] as $_classRef){\n\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t\t\tif (!is_object($question_obj)) $question_obj = $_procObj->getDifferentQuestionType($this,$question,$this->piVars);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\treturn $question_obj;\n\t}", "title": "" }, { "docid": "94a52c8dc8c035548f1feedac8030c06", "score": "0.5525904", "text": "public function readquestions($lines) {\n\n // Set up array to hold all our questions.\n $questions = array();\n\n // Each element of $lines is a qformat_d2l_file object.\n foreach ($lines as $fileobj) {\n if ($fileobj->filetype == self::FILETYPE_QTI) {\n $importer = new qformat_d2l_qti();\n } else {\n // In all other cases we are not able to import the file.\n debugging('fileobj type not recognised', DEBUG_DEVELOPER);\n continue;\n }\n $importer->set_filebase($fileobj->filebase);\n $questions = array_merge($questions, $importer->readquestions($fileobj->text));\n }\n\n // Give any unnamed categories generated names.\n $unnamedcount = 0;\n foreach ($questions as $question) {\n if ($question->qtype == 'category' && $question->category == '') {\n $question->category = get_string('importedcategory', 'qformat_d2l', ++$unnamedcount);\n }\n }\n\n return $questions;\n }", "title": "" }, { "docid": "83da6b42ad546c2270b70cbed6727c3d", "score": "0.5481681", "text": "private function generate_question() {\n\n require_once(__DIR__ . '/csv_gd.class.php');\n $csv_filename = $this->configuration['base_data_dir'] . '/csv/' . $this->configuration['csv_input'];\n\n $data_quiz_src_obj = new csv_gd($csv_filename);\n $data_quiz_src_orig = $data_quiz_src_obj->csv_to_array();\n\n\n\n // filter unwanted question (tags, diff level, void )\n $data_quiz_src_filtered = $this->quiz_filter($data_quiz_src_orig, $this->configuration['tags'], $this->configuration['min_diffucult_level'], $this->configuration['max_diffucult_level']);\n\n\n // reverse question with_answer\n if ($this->configuration['reverse_question'] == TRUE) {\n $data_quiz_src_filtered = $this->quiz_switch_question_with_answer($data_quiz_src_filtered);\n }\n\n\n // generate question and answer\n $data_quiz_src = $this->quiz_generate($data_quiz_src_filtered);\n\n\n // randomize quiz \n if ($this->configuration['randomize_question'] == TRUE) {\n shuffle($data_quiz_src);\n }\n\n\n // restrict the maxium number of question\n if ($this->configuration['max_question_total'] > 0) {\n $this->configuration['max_question_total'] = min(count($data_quiz_src), $this->configuration['max_question_total']);\n } else {\n $this->configuration['max_question_total'] = count($data_quiz_src);\n }\n $this->question = array_slice($data_quiz_src, 0, $this->configuration['max_question_total']);\n\n $this->configuration['debug']=$this->debug;\n\n // return $this->quiz_questions;\n }", "title": "" }, { "docid": "3a091046baf6689db58dd37e7820b1b4", "score": "0.5476474", "text": "public function create($question, $type = ObjectFactory::TEXT_QUESTION)\n\t{\n\t\t// echo $type;\n\t\t$newQuestion = $this->objectFactory->createQuestion($type);\n\t\t// if ($type == ObjectFactory::SINGLE_CHOICE_QUESTION) echo \"single\";\n\t\t// echo $question;\n\t\t$newQuestion->setQuestion($question);\n\t\t$this->questions[$newQuestion->getId()] = $newQuestion;\n\t\treturn $newQuestion;\n\t}", "title": "" }, { "docid": "65dfb5eaff7946006b962577e63873bc", "score": "0.54163986", "text": "public function import_from_xml($data, $question, qformat_xml $format, $extra=null) {\n // Check question is for us.\n if (!isset($data['@']['type']) || $data['@']['type'] != 'multichoiceset') {\n return false;\n }\n\n $question = $format->import_headers($data);\n $question->qtype = 'multichoiceset';\n\n $question->shuffleanswers = $format->trans_single(\n $format->getpath($data, array('#', 'shuffleanswers', 0, '#'), 1));\n\n $question->answernumbering = $format->getpath($data,\n array('#', 'answernumbering', 0, '#'), 'abc');\n\n $question->showstandardinstruction = $format->trans_single(\n $format->getpath($data, array('#', 'showstandardinstruction', 0, '#'), 1));\n\n $question->correctfeedback = array();\n $question->correctfeedback['text'] = $format->getpath($data, array('#', 'correctfeedback', 0, '#', 'text', 0, '#'),\n '', true);\n $question->correctfeedback['format'] = $format->trans_format(\n $format->getpath($data, array('#', 'correctfeedback', 0, '@', 'format'),\n $format->get_format($question->questiontextformat)));\n $question->correctfeedback['files'] = array();\n // Restore files in correctfeedback.\n $files = $format->getpath($data, array('#', 'correctfeedback', 0, '#', 'file'), array(), false);\n foreach ($files as $file) {\n $filesdata = new stdclass;\n $filesdata->content = $file['#'];\n $filesdata->encoding = $file['@']['encoding'];\n $filesdata->name = $file['@']['name'];\n $question->correctfeedback['files'][] = $filesdata;\n }\n\n $question->incorrectfeedback = array();\n $question->incorrectfeedback['text'] = $format->getpath($data, array('#', 'incorrectfeedback', 0, '#', 'text', 0, '#'),\n '', true );\n $question->incorrectfeedback['format'] = $format->trans_format(\n $format->getpath($data, array('#', 'incorrectfeedback', 0, '@', 'format'),\n $format->get_format($question->questiontextformat)));\n $question->incorrectfeedback['files'] = array();\n // Restore files in incorrectfeedback.\n $files = $format->getpath($data, array('#', 'incorrectfeedback', 0, '#', 'file'), array(), false);\n foreach ($files as $file) {\n $filesdata = new stdclass;\n $filesdata->content = $file['#'];\n $filesdata->encoding = $file['@']['encoding'];\n $filesdata->name = $file['@']['name'];\n $question->incorrectfeedback['files'][] = $filesdata;\n }\n\n $question->shownumcorrect = array_key_exists('shownumcorrect', $data['#']);\n\n // Run through the answers.\n $answers = $data['#']['answer'];\n foreach ($answers as $answer) {\n $ans = $format->import_answer($answer, true,\n $format->get_format($question->questiontextformat));\n $question->answer[] = $ans->answer;\n\n // FIX: Some tools set fraction to `0.0`\n // which leeds to false `true` answers.\n $question->correctanswer[] = !empty($ans->fraction) &&\n (float)$ans->fraction > 0;\n $question->feedback[] = $ans->feedback;\n\n // Backwards compatibility.\n if (array_key_exists('correctanswer', $answer['#'])) {\n $key = end(array_keys($question->correctanswer));\n $question->correctanswer[$key] = $format->getpath($answer,\n array('#', 'correctanswer', 0, '#'), 0);\n }\n }\n\n $format->import_hints($question, $data, true, true,\n $format->get_format($question->questiontextformat));\n\n // Get extra choicefeedback setting from each hint.\n if (!empty($question->hintoptions)) {\n foreach ($question->hintoptions as $key => $options) {\n $question->hintshowchoicefeedback[$key] = !empty($options);\n }\n }\n return $question;\n }", "title": "" }, { "docid": "09b1506144971b9fbe1b622bfe36f579", "score": "0.5384593", "text": "private function question()\n\t{\n\t\t$this->qns['questionnaire']['questionnairecategories_id'] = $this->allinputs['questioncat'];\n\t\t$this->qns['questionnaire']['questionnairesubcategories_id'] = $this->allinputs['questionsubcat'];\n\t\t$this->qns['questionnaire']['label'] = $this->allinputs['question_label'];\n\n\n\t\t$this->qns['questionnaire']['question'] = $this->allinputs['question'];\n\t\t$this->qns['questionnaire']['has_sub_question'] = $this->allinputs['subquestion'];\n\n\t\tif( $this->qns['questionnaire']['has_sub_question'] == 0 )\n\t\t{\n\t\t\t$this->qns['answers']['answer_type'] = $this->allinputs['optiontype'];\n\t\t}\n\n\t\t$this->qns['questionnaire']['active'] = 1;\n\n\t\tif( $this->qns['questionnaire']['has_sub_question'] == 0 ){\n\t\t\t//This code must be skipped if sub_question is 1\n\t\t\t$optionCounter = 0;\n\t\t\tforeach ($this->allinputs as $key => $value) {\n\n\t\t\t\tif( str_is('option_*', $key) ){\n\t\t\t\t\t$optionCounter++;\n\t\t\t\t\t$this->qns['answers'][$optionCounter] = ( $this->qns['answers']['answer_type'] == 'opentext' ) ? 'Offered answer text' : $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "489422e8a8aba60a56286ca31e1e3bdb", "score": "0.53583664", "text": "public function loadFromDb($question_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$result = $ilDB->queryF(\"SELECT qpl_questions.* FROM qpl_questions WHERE question_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($question_id)\n\t\t);\n\t\tif ($result->numRows() == 1)\n\t\t{\n\t\t\t$data = $ilDB->fetchAssoc($result);\n\t\t\t$this->setId($question_id);\n\t\t\t$this->setTitle($data[\"title\"]);\n\t\t\t$this->setComment($data[\"description\"]);\n\t\t\t$this->setSuggestedSolution($data[\"solution_hint\"]);\n\t\t\t$this->setOriginalId($data[\"original_id\"]);\n\t\t\t$this->setObjId($data[\"obj_fi\"]);\n\t\t\t$this->setAuthor($data[\"author\"]);\n\t\t\t$this->setOwner($data[\"owner\"]);\n\n\t\t\tinclude_once(\"./Services/RTE/classes/class.ilRTE.php\");\n\t\t\t$this->setQuestion(ilRTE::_replaceMediaObjectImageSrc($data[\"question_text\"], 1));\n\t\t\t$this->setEstimatedWorkingTime(substr($data[\"working_time\"], 0, 2), substr($data[\"working_time\"], 3, 2), substr($data[\"working_time\"], 6, 2));\n\n\t\t\t// load variables\n\t\t\t$result = $ilDB->queryF(\"SELECT * FROM il_qpl_qst_fq_var WHERE question_fi = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($question_id)\n\t\t\t);\n\t\t\tif ($result->numRows() > 0)\n\t\t\t{\n\t\t\t\t$this->getPlugin()->includeClass(\"class.assFormulaQuestionVariable.php\");\n\t\t\t\twhile ($data = $ilDB->fetchAssoc($result))\n\t\t\t\t{\n\t\t\t\t\t$varObj = new assFormulaQuestionVariable($data[\"variable\"], $data[\"range_min\"], $data[\"range_max\"], $this->getUnit($data[\"unit_fi\"]), $data[\"varprecision\"], $data[\"intprecision\"]);\n\t\t\t\t\t$this->addVariable($varObj);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// load results\n\t\t\t$result = $ilDB->queryF(\"SELECT * FROM il_qpl_qst_fq_res WHERE question_fi = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($question_id)\n\t\t\t);\n\t\t\tif ($result->numRows() > 0)\n\t\t\t{\n\t\t\t\t$this->getPlugin()->includeClass(\"class.assFormulaQuestionResult.php\");\n\t\t\t\twhile ($data = $ilDB->fetchAssoc($result))\n\t\t\t\t{\n\t\t\t\t\t$resObj = new assFormulaQuestionResult($data[\"result\"], $data[\"range_min\"], $data[\"range_max\"], $data[\"tolerance\"], $this->getUnit($data[\"unit_fi\"]), $data[\"formula\"], $data[\"points\"], $data[\"resprecision\"], $data[\"rating_simple\"], $data[\"rating_sign\"], $data[\"rating_value\"], $data[\"rating_unit\"]);\n\t\t\t\t\t$this->addResult($resObj);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// load result units\n\t\t\t$result = $ilDB->queryF(\"SELECT * FROM il_qpl_qst_fq_res_unit WHERE question_fi = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($question_id)\n\t\t\t);\n\t\t\tif ($result->numRows() > 0)\n\t\t\t{\n\t\t\t\twhile ($data = $ilDB->fetchAssoc($result))\n\t\t\t\t{\n\t\t\t\t\t$unit = $this->getUnit($data[\"unit_fi\"]);\n\t\t\t\t\t$resObj = $this->getResult($data[\"result\"]);\n\t\t\t\t\t$this->addResultUnit($resObj, $unit);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tparent::loadFromDb($question_id);\n\t}", "title": "" }, { "docid": "d5936da5aa2d1376fe5ec5a3c3145345", "score": "0.5253922", "text": "function loadFromDb($question_id)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$result = $ilDB->queryF(\"SELECT qpl_questions.* FROM qpl_questions WHERE question_id = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($question_id)\n\t\t);\n\t\tif ($result->numRows() == 1)\n\t\t{\n\t\t\t$data = $ilDB->fetchAssoc($result);\n\t\t\t$this->setId($question_id);\n\t\t\t$this->setTitle($data[\"title\"]);\n\t\t\t$this->setComment($data[\"description\"]);\n\t\t\t$this->setSuggestedSolution($data[\"solution_hint\"]);\n\t\t\t$this->setOriginalId($data[\"original_id\"]);\n\t\t\t$this->setObjId($data[\"obj_fi\"]);\n\t\t\t$this->setAuthor($data[\"author\"]);\n\t\t\t$this->setOwner($data[\"owner\"]);\n\t\t\t$this->setPoints($data[\"points\"]);\n\n\t\t\tinclude_once(\"./Services/RTE/classes/class.ilRTE.php\");\n\t\t\t$this->setQuestion(ilRTE::_replaceMediaObjectImageSrc($data[\"question_text\"], 1));\n\t\t\t\n\t\t\t$this->setEstimatedWorkingTimeFromDurationString($data[\"working_time\"]);\n\n\t\t\t// load additional data\n\t\t\t$result = $ilDB->queryF(\"SELECT * FROM \" . $this->getAdditionalTableName() . \" WHERE question_fi = %s\",\n\t\t\t\tarray('integer'),\n\t\t\t\tarray($question_id)\n\t\t\t);\n\t\t\t\n\t\t\tif ($result->numRows() == 1)\n\t\t\t{\n\t\t\t\t$data = $ilDB->fetchAssoc($result);\n\t\t\t\t\n\t\t\t\t$this->setVipSubId((int) $data['vip_sub_id']);\n\t\t\t\t$this->setVipCookie((string) $data['vip_cookie']);\n\t\t\t\t$this->setVipExercise((string) $data['vip_exercise']);\n\t\t\t\t$this->setVipLang((string) $data['vip_lang']);\n\t\t\t\t$this->setVipExerciseId((int) $data['vip_exercise_id']);\n\t\t\t\t$this->setVipEvaluation((string) $data['vip_evaluation']);\n\t\t\t\t$this->setVipResultStorage((int) $data['vip_result_storage']);\n\t\t\t\t$this->setVipAutoScoring((int) $data['vip_auto_scoring']);\n\t\t\t}\n\t\t}\n\t\tparent::loadFromDb($question_id);\n\t}", "title": "" }, { "docid": "1a23c2a65285b7a7e554f4d483a293c8", "score": "0.51792926", "text": "abstract protected function __construct($instantquiz, $record);", "title": "" }, { "docid": "15833a13124e9bf61fae5f9be1f710f4", "score": "0.51750785", "text": "function writequestion( $question ) {\n\t // question reflects database fields for general question and specific to type\n\t\n\t // initial string;\n\t $expout = \"\";\n\t\n\t // add comment\n\t $expout .= \"// question: $question->id \\n\";\n\n\t if ($question->id_category != \"\"){\n\t $expout .= \"\\$CATEGORY:$question->id_category\\n\";\n\t }\n\t\t\n\t // get question text format\n\t /*$textformat = $question->textformat;\n\t $question->text = \"\";\n\t if ($textformat!=FORMAT_MOODLE) {\n\t $question->text = text_format_name( (int)$textformat );\n\t $question->text = \"[$question->text]\";\n\t }*/\n\t $qtext_format = \"[\".$question->qtype.\"]\";\n\t // output depends on question type\n\t switch($question->qtype) {\n\t\t\tcase 'category' : {\n\t\t\t\t// not a real question, used to insert category switch\n\t\t\t\t$expout .= \"\\$CATEGORY: $question->category\\n\"; \n\t\t\t};break;\n\t\t\tcase 'title' : {\n\t\t\t\tif($question->prompt != '') $expout .= '::'.$this->repchar($question->prompt).'::';\n\t\t\t\t$expout .= $qtext_format;\n\t\t\t\t$expout .= $this->repchar( $question->quest_text);\n\t\t\t};break;\n\t\t case 'extended_text' : {\n\t\t $expout .= '::'.$this->repchar($question->prompt).'::';\n\t\t $expout .= $qtext_format;\n\t\t $expout .= $this->repchar( $question->quest_text);\n\t\t $expout .= \"{}\\n\";\n\t\t };break;\n\t\t case 'truefalse' : {/*\n\t\t $trueanswer = $question->options->answers[$question->options->trueanswer];\n\t\t $falseanswer = $question->options->answers[$question->options->falseanswer];\n\t\t if ($trueanswer->fraction == 1) {\n\t\t $answertext = 'TRUE';\n\t\t $right_feedback = $trueanswer->feedback;\n\t\t $wrong_feedback = $falseanswer->feedback;\n\t\t } else {\n\t\t $answertext = 'FALSE';\n\t\t $right_feedback = $falseanswer->feedback;\n\t\t $wrong_feedback = $trueanswer->feedback;\n\t\t }\n\t\t\n\t\t $wrong_feedback = $this->repchar($wrong_feedback);\n\t\t $right_feedback = $this->repchar($right_feedback);\n\t\t $expout .= \"::\".$this->repchar($question->prompt).\"::\".$qtext_format.$this->repchar( $question->quest_text ).\"{\".$this->repchar( $answertext );\n\t\t if ($wrong_feedback) {\n\t\t $expout .= \"#\" . $wrong_feedback;\n\t\t } else if ($right_feedback) {\n\t\t $expout .= \"#\";\n\t\t }\n\t\t if ($right_feedback) {\n\t\t $expout .= \"#\" . $right_feedback;\n\t\t }\n\t\t $expout .= \"}\\n\";*/\n\t\t }//;break;\n\t\t \n\t\t case 'shortanswer' : {/*\n\t\t $expout .= \"::\".$this->repchar($question->prompt).\"::\".$qtext_format.$this->repchar( $question->quest_text ).\"{\\n\";\n\t\t foreach($question->options->answers as $answer) {\n\t\t $weight = 100 * $answer->score_correct;\n\t\t $expout .= \"\\t=%\".$weight.\"%\".$this->repchar( $answer->text ).\"#\".$this->repchar( $answer->comment ).\"\\n\";\n\t\t }\n\t\t $expout .= \"}\\n\";*/\n\t\t }//;break;\n\t\t\tcase 'choice' : {\n\t\t\t\t$expout .= \"::\".$this->repchar($question->prompt).\"::\".$qtext_format.$this->repchar( $question->quest_text ).\"{\\n\";\n\t\t\t\t\n\t\t\t\tforeach($question->answers as $answer) {\n\t\t\t\t\tif (($answer->score_correct == 1) || ($answer->score_correct == 0 && $answer->is_correct == 1) ) {\n\t\t\t\t\t\t$answertext = '=';\n\t\t\t\t\t}\n\t\t\t\t\telseif ($answer->score_correct > 1) {\n\t\t\t\t\t\t$export_weight = $answer->score_correct*100;\n\t\t\t\t\t\t$answertext = \"=%$export_weight%\";\n\t\t\t\t\t}\n\t\t\t\t\telseif ($answer->score_correct==0) {\n\t\t\t\t\t\t$answertext = '~';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$export_weight = $answer->score_correct*100;\n\t\t\t\t\t\t$answertext = \"~%$export_weight%\";\n\t\t\t\t\t}\n\t\t\t\t\t$expout .= \"\\t\".$answertext.$this->repchar( $answer->text );\n\t\t\t\t\tif ($answer->comment!=\"\") {\n\t\t\t\t\t\t$expout .= \"#\".$this->repchar( $answer->comment );\n\t\t\t\t\t}\n\t\t\t\t\t$expout .= \"\\n\";\n\t\t\t\t}\n\t\t\t\t$expout .= \"}\\n\";\n\t\t\t};break;\n\t\t\tcase 'choice_multiple' : {\n\t\t\t\t$expout .= \"::\".$this->repchar($question->prompt).\"::\".$qtext_format.$this->repchar( $question->quest_text ).\"{\\n\";\n\t\t\t\t\n\t\t\t\tforeach($question->answers as $answer) {\n\t\t\t\t\tif ($answer->score_correct==1) {\n\t\t\t\t\t\t$answertext = '=';\n\t\t\t\t\t}\n\t\t\t\t\telseif ($answer->score_correct==0) {\n\t\t\t\t\t\t$answertext = '~';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$export_weight = $answer->score_correct*100;\n\t\t\t\t\t\t$answertext = \"~%$export_weight%\";\n\t\t\t\t\t}\n\t\t\t\t\t$expout .= \"\\t\".$answertext.$this->repchar( $answer->text );\n\t\t\t\t\tif ($answer->comment!=\"\") {\n\t\t\t\t\t\t$expout .= \"#\".$this->repchar( $answer->comment );\n\t\t\t\t\t}\n\t\t\t\t\t$expout .= \"\\n\";\n\t\t\t\t}\n\t\t\t\t$expout .= \"}\\n\";\n\t\t\t};break;\n\t\t case 'associate' : {\n\t\t\t\t$expout .= \"::\".$this->repchar($question->prompt).\"::\".$qtext_format.$this->repchar( $question->quest_text ).\"{\\n\";\n\t\t\t\tforeach($question->answers as $i => $subquestion) {\n\t\t\t\t\t$expout .= \"\\t=\".$this->repchar( $subquestion->text ).\" -> \".$this->repchar( $question->extra_info[$i]->text ).\"\\n\";\n\t\t\t\t}\n\t\t\t\t$expout .= \"}\\n\";\n\t\t };break;\n\t\t case NUMERICAL:\n\t\t $expout .= \"::\".$this->repchar($question->prompt).\"::\".$qtext_format.$this->repchar( $question->quest_text ).\"{#\\n\";\n\t\t foreach ($question->options->answers as $answer) {\n\t\t if ($answer->text != '') {\n\t\t $percentage = '';\n\t\t if ($answer->score_correct < 1) {\n\t\t $pval = $answer->score_correct * 100;\n\t\t $percentage = \"%$pval%\";\n\t\t }\n\t\t $expout .= \"\\t=$percentage\".$answer->text.\":\".(float)$answer->tolerance.\"#\".$this->repchar( $answer->comment ).\"\\n\";\n\t\t } else {\n\t\t $expout .= \"\\t~#\".$this->repchar( $answer->comment ).\"\\n\";\n\t\t }\n\t\t }\n\t\t $expout .= \"}\\n\";\n\t\t break;\n\t\t case DESCRIPTION:\n\t\t $expout .= \"// DESCRIPTION type is not supported\\n\";\n\t\t break;\n\t\t case MULTIANSWER:\n\t\t $expout .= \"// CLOZE type is not supported\\n\";\n\t\t break;\n\t\t default:\n\t\t \n\t\t\t\treturn false;\n\t\t}\n\t // add empty line to delimit questions\n\t $expout .= \"\\n\";\n\t return $expout;\n\t}", "title": "" }, { "docid": "12020ba8ac3f219ffc4960a3ba04582c", "score": "0.51667225", "text": "function __construct($isstd, $id = 0, $question = '', $type = null,\n $order = null, $DB_load = true) {\n $this->isstd = $isstd;\n\n //Check to make sure that the id is a number.\n if (!is_number($id)) {\n print_error(get_string('question_id_invalid', 'local_evaluations'));\n }\n\n //If it is not a new question then make sure the question exists.\n if ($id > 0) {\n $this->verify_question_exists($id);\n }\n\n\n //Set the id.\n $this->id = $id;\n\n\n if (!$DB_load) {//use updated parameters\n $this->question = $question;\n $this->type = $type;\n $this->order = $order;\n }\n }", "title": "" }, { "docid": "d89f9b0aea4b444c6902cef874926074", "score": "0.5136621", "text": "function ExtendedText_Question( $id ) {\n\t\t\n\t\tparent::Question( $id );\n\t}", "title": "" }, { "docid": "a2a58d645d44f1dc86252dc2abfcd64a", "score": "0.513222", "text": "protected function prepare_question_attempt() {\n // Create a question with a usage from the current user.\n $questiongenerator = $this->getDataGenerator()->get_plugin_generator('core_question');\n $cat = $questiongenerator->create_question_category();\n $quba = question_engine::make_questions_usage_by_activity('core_question_preview', context_system::instance());\n $quba->set_preferred_behaviour('deferredfeedback');\n $questiondata = $questiongenerator->create_question('numerical', null, ['category' => $cat->id]);\n $question = question_bank::load_question($questiondata->id);\n $quba->add_question($question);\n $quba->start_all_questions();\n\n question_engine::save_questions_usage_by_activity($quba);\n\n return $quba;\n }", "title": "" }, { "docid": "1cfad14d805a70938b627af6f0a4910b", "score": "0.5087107", "text": "public static function get_sc_question_form_data_question_three() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4011;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-003';\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->scoringmethod = 'sconezero';\n $qdata->shuffleanswers = 1;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 5;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->option_4 = array(\n 'text' => 'Option Text 4',\n 'format' => 1\n );\n $qdata->feedback_4 = array(\n 'text' => 'Feedback Text 4',\n 'format' => 1\n );\n $qdata->option_5 = array(\n 'text' => 'Option Text 5',\n 'format' => 1\n );\n $qdata->feedback_5 = array(\n 'text' => 'Feedback Text 5',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "title": "" }, { "docid": "093cff8dfff5c9c4a80ba8d4253bcc5e", "score": "0.50720495", "text": "function fromXML(&$item, &$questionpool_id, &$tst_id, &$tst_object, &$question_counter, &$import_mapping)\n\t{\n\t\t$this->getPlugin()->includeClass(\"import/qti12/class.assFormulaQuestionImport.php\");\n\t\t$import = new assFormulaQuestionImport($this);\n\t\t$import->fromXML($item, $questionpool_id, $tst_id, $tst_object, $question_counter, $import_mapping);\n\t}", "title": "" }, { "docid": "72872b7dd19095534d7ee54002579cd6", "score": "0.504854", "text": "public function createQuestionAndAnswers () {\n global $tpl, $lng, $ilCtrl, $ilTabs;\n\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n\n\n $ilTabs->activateTab(\"editQuiz\");\n\n\n if ($wiz->checkInput()){\n $wiz->createQuestionAndAnswers($this->object);\n ilUtil::sendSuccess($this->txt(\"question_obj_create\"), true);\n $ilCtrl->redirect($this, \"editQuiz\");\n }\n $this->initAddQuestionAndAnswersFormAfterError();\n //$tpl->setContent(\"Test\");\n }", "title": "" }, { "docid": "15062f6174f39d4044f2223e64ee5f6d", "score": "0.50414944", "text": "protected function make_question_instance($questiondata) {\n question_bank::load_question_definition_classes($this->name());\n $class = 'qtype_multichoiceset_question';\n return new $class();\n }", "title": "" }, { "docid": "36f0346c08e2672a68b20bb8389ee10f", "score": "0.50397944", "text": "public function initAsSpecimen()\n {\n global $user, $langs, $conf;\n\n $now=dol_now();\n\n // Initialise parameters\n $this->id = 0;\n $this->ref = 'SPECIMEN';\n $this->specimen = 1;\n $this->socid = 1;\n $this->date_c = $now;\n $this->date_m = $now;\n $this->date_start = $now;\n $this->date_end = $now + (3600 * 24 * 365);\n $this->note_public = 'SPECIMEN';\n\t\t$this->fk_ele = 20000;\n $this->opp_amount = 20000;\n $this->budget_amount = 10000;\n\n /*\n $nbp = mt_rand(1, 9);\n $xnbp = 0;\n while ($xnbp < $nbp)\n {\n $line = new Task($this->db);\n $line->fk_project = 0;\n $line->label = $langs->trans(\"Label\") . \" \" . $xnbp;\n $line->description = $langs->trans(\"Description\") . \" \" . $xnbp;\n\n $this->lines[]=$line;\n $xnbp++;\n }\n */\n }", "title": "" }, { "docid": "d7f374a84e04a2d00bad47a13d78f022", "score": "0.5029242", "text": "public function create_question($title, $uid, $cid, $body) {\n\t\t$date = date('Y/m/d H:i:s');\n\t\t$this -> db -> set('title', $title);\n\t\t$this -> db -> set('userID', $uid);\n\t\t$this -> db -> set('catID', $cid);\n\t\t$this -> db -> set('body', $body);\n\t\t$this -> db -> set('date', $date);\n\t\t$this -> db -> insert('Question');\n\t\treturn $this -> db -> insert_id();\n\t}", "title": "" }, { "docid": "98ece51650f6c3aa8d3cf72ca7ff5c81", "score": "0.500907", "text": "public function create(array $data)\n\t{\n\t\t$question = Question::create(['title' => $data['title'], 'body' => $data['body'], 'user_id' => request()->user()->id]);\n\t\t$this->attachTags($question, $data['tags']);\n\t\treturn $question;\n\t}", "title": "" }, { "docid": "a2132becd790207a616c7f67bc0191ed", "score": "0.4995504", "text": "function insertParticularQuestionToQuiz($question,$conn)\n {\n if($question['type']==\"radio\")\n {\n return insertRadioQuestion($question,$conn);\n }\n if($question['type']==\"checkbox\")\n {\n return insertCheckboxQuestion($question,$conn);\n }\n else if($question[\"type\"]==\"loose_text\" || $question[\"type\"]==\"strict_text\")\n {\n return insertTextQuestion($question,$conn);\n }\n return -1;\n }", "title": "" }, { "docid": "c0e86d367c8d1c4fc284e6751b569b6b", "score": "0.4977961", "text": "public static function get_sc_question_form_data_question_one() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4010;\n $qdata->createdby = $USER->id;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-001';\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->scoringmethod = 'sconezero';\n $qdata->shuffleanswers = 0;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 3;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "title": "" }, { "docid": "ce2a66da1883e9e10815cc3520d8d597", "score": "0.4958913", "text": "public function __construct($description , $problem,$question)\n {\n $this->description=$description;\n $this->problem=$problem;\n $this->question=$question;\n }", "title": "" }, { "docid": "5b0c1e215fe33f46cb9916f8f6f39808", "score": "0.4939305", "text": "function qa_question($record_id = ''){\r\n\t\t\t$this->table_name = 'qa_questions';\r\n\t\t\t\r\n\t\t\t$this->full_path = '';\r\n\t\t\t\r\n\t\t\tif($record_id!='') $this->load($record_id);\r\n\t\t}", "title": "" }, { "docid": "7c6ac3e64f888ce91dfc67dc4518d20e", "score": "0.49069005", "text": "public function data_preprocessing(&$question, $cat, qtype_proforma_edit_form $editor) {\n parent::data_preprocessing($question, $cat, $editor);\n $form = $editor->get_form();\n\n if (empty($question->options)) {\n $question->furtherTemplates = '';\n $question->firstTemplate = '';\n }\n\n // Create template list with all template files without the first one\n // which gets its own editor\n // (normally there should be only one template if no filepicker is used).\n $alltemplates = explode(',', $question->templates);\n $question->firstTemplate = array_shift($alltemplates);\n $question->furtherTemplates = implode(',', $alltemplates);\n if (strlen($question->furtherTemplates) == 0) {\n $form->removeElement('furtherTemplates');\n }\n\n // Create links for model solution.\n $msfilearea = new qtype_proforma_filearea(qtype_proforma::FILEAREA_MODELSOL);\n if (isset($question->id)) {\n $question->mslinks = $msfilearea->get_files_as_links($question->contextid,\n $question->id);\n } else {\n // Create new ProFormA question => no question available.\n $question->mslinks = '';\n }\n\n // Extract internal grading hints.\n $this->_taskhandler->extract_formdata_from_gradinghints($question, $form);\n }", "title": "" }, { "docid": "b6129d03ea85f8d19adf5e0066490a44", "score": "0.49036264", "text": "public function parse($qstr){\n\t\tglobal $ruleSet;\n\t\tif(str_replace([\" \",\"\t\",\"\\n\",\"\\r\"],'',$qstr)===''){echo \"Error: No text submitted/empty file.\";return '';}\n\t\t\n\t\t//$t=microtime();\n\t\t$nMatches=preg_match_all($this->qregex(), $qstr, $qtext);\n\t\t//echo '(TIME-millis:'.(microtime()-$t).':TIME)';\n\t\t\n\t\t$qs=new qIO();\n\t\tfor($i=0;$i<$nMatches;$i++){\n\t\t\ttry{\n\t\t//0 full match\n\t\t//1 QPart\n\t\t//2 Number\n\t\t//3 Subj\n\t\t//4 QType\n\t\t//5 QuestionText\n\t\t//6-9 W-Z\n\t\t//10 Answer\n\t\t\t\t//Indices: 0 full match, Part, Number, Subject, MCQText, ChoicesW, ChoicesX, ChoicesY, ChoicesZ, SAQText, MCa, AnswerText\n\t\t\t\t$qs->addByArray(array(array(\n\t\t\t\t\t\"isB\"=>strpos('tb',strtolower(substr($qtext[1][$i],0,1))),//--todo-- THIS IS A BIG PROBLEM.\n\t\t\t\t\t\"Subject\"=>array_search(strtolower(substr($qtext[2][$i],0,1)),$ruleSet[\"SubjChars\"]),//--todo-- THIS IS A PROBLEM.\n\t\t\t\t\t\"isSA\"=>$qtext[4][$i]=='Short Answer',\n\t\t\t\t\t\"Question\"=>str_replace([\"\\r\",\"\\n\"],'',$qtext[5][$i]),//:O IMPORTANT: single quotes do not escape \\n etc!\n\t\t\t\t\t\"MCW\"=>$qtext[6][$i],\"MCX\"=>$qtext[7][$i],\"MCY\"=>$qtext[8][$i],\"MCZ\"=>$qtext[9][$i],\n\t\t\t\t\t\"MCa\"=>substr($qtext[10][$i],0,1),\n\t\t\t\t\t\"Answer\"=>$qtext[10][$i],\n\t\t\t\t\t)));\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\techo \"ERROR: \".$e->getMessage();\n\t\t\t\t//--todo-- DISPLAY ERRORS? OR JUST IGNORING? OR IDK IT SHOULDN'T EVEN HAPPEN\n\t\t\t}\n\t\t}\n\t\t$qs->commit();\n\t\t$parsedQIDs=$qs->getQIDs();\n\t\t\n\t\t/*echo \"Duplicates: none<br><br>\";*/\n\t\techo \"<b>Total uploaded Question-IDs: \".((count($parsedQIDs)==0)?\"no questions entered\":arrayToRanges($parsedQIDs).\" (\".count($parsedQIDs).\" total entered)\").\"</b>\";\n\t\treturn preg_replace($this->qregex(),'',$qstr);//stuff remaining after questions detected\n\t}", "title": "" }, { "docid": "60a595cf0647c20ed135eb711fe6d753", "score": "0.48972732", "text": "public function run()\n {\n $question = new TemplateQuestion();\n $question->question = 'Conducted by?';\n $question->template_section_id = 1;\n $question->save();\n\n $question = new TemplateQuestion();\n $question->question = 'date?';\n $question->template_section_id = 1;\n $question->save();\n\n $question = new TemplateQuestion();\n $question->question = 'Location';\n $question->template_section_id = 1;\n $question->save();\n\n //seed another section\n\n $question = new TemplateQuestion();\n $question->question = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';\n $question->template_section_id = 2;\n $question->save();\n\n $question = new TemplateQuestion();\n $question->question = 'trash empty?';\n $question->template_section_id = 2;\n $question->save();\n\n $question = new TemplateQuestion();\n $question->question = 'Water shut off?';\n $question->template_section_id = 2;\n $question->save();\n\n\n }", "title": "" }, { "docid": "c56435ddff08516ca6930dcba0a98e55", "score": "0.4878949", "text": "public function run()\n {\n $questionType = new QuestionType();\n $questionType->type = 'Only selection(Radio Button)';\n $questionType->save();\n\n $questionType = new QuestionType();\n $questionType->type = 'Multiple selection(Checkbox)';\n $questionType->save();\n\n $questionType = new QuestionType();\n $questionType->type = 'Only selection with other input';\n $questionType->save();\n\n $questionType = new QuestionType();\n $questionType->type = 'Multiple selection with other input';\n $questionType->save();\n\n $questionType = new QuestionType();\n $questionType->type = 'Scale';\n $questionType->save();\n\n $questionType = new QuestionType();\n $questionType->type = 'Open question';\n $questionType->save();\n }", "title": "" }, { "docid": "4add3c93cc7d3b4a98aa77217d61a626", "score": "0.48744705", "text": "public static function get_sc_question_form_data_question_four() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4011;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-004';\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->scoringmethod = 'subpoints';\n $qdata->shuffleanswers = 1;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 5;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->option_4 = array(\n 'text' => 'Option Text 4',\n 'format' => 1\n );\n $qdata->feedback_4 = array(\n 'text' => 'Feedback Text 4',\n 'format' => 1\n );\n $qdata->option_5 = array(\n 'text' => 'Option Text 5',\n 'format' => 1\n );\n $qdata->feedback_5 = array(\n 'text' => 'Feedback Text 5',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "title": "" }, { "docid": "5590f426cf08636712ab0390f6447d2d", "score": "0.48646763", "text": "function run()\n\t{\n\t\trequire_code('quiz');\n\n\t\t$questions=array();\n\n\t\t$text=post_param('text');\n\t\t$type=post_param('type');\n\n\t\t$_qs=explode(chr(10).chr(10),$text);\n\t\t$qs=array();\n\t\tforeach ($_qs as $q)\n\t\t{\n\t\t\t$q=trim($q);\n\t\t\tif ($q!='') $qs[]=$q;\n\t\t}\n\t\t$num_q=0;\n\n\t\t$qs2=array();\n\t\tforeach ($qs as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\n\t\t\t$implicit_question_number=$i;//$matches[1];\n\n\t\t\t$qs2[$implicit_question_number]=$q.chr(10).implode(chr(10),$as);\n\t\t}\n\t\tksort($qs2);\n\n\t\tforeach (array_values($qs2) as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\t\t\t$question=trim($matches[count($matches)-1]);\n\t\t\t$long_input_field=(strpos($question,' [LONG]')!==false)?1:0;\n\t\t\t$question=str_replace(' [LONG]','',$question);\n\t\t\t$num_choosable_answers=(strpos($question,' [*]')!==false)?count($as):((count($as)>0)?1:0);\n\t\t\t$question=str_replace(' [*]','',$question);\n\t\t\t$required=(strpos($question,' [REQUIRED]')!==false)?1:0;\n\t\t\t$question=str_replace(' [REQUIRED]','',$question);\n\n\t\t\t// Now we add the answers\n\t\t\t$answers=array();\n\t\t\tforeach ($as as $x=>$a)\n\t\t\t{\n\t\t\t\t$is_correct=((($x==0) && (strpos($qs2[$i],' [*]')===false) && ($type!='SURVEY')) || (strpos($a,' [*]')!==false))?1:0;\n\t\t\t\t$a=str_replace(' [*]','',$a);\n\n\t\t\t\tif (substr($a,0,1)==':') continue;\n\n\t\t\t\t$answers[]=array(\n\t\t\t\t\t'id'=>$x,\n\t\t\t\t\t'q_answer_text'=>$a,\n\t\t\t\t\t'q_is_correct'=>$is_correct,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$questions[]=array(\n\t\t\t\t'id'=>$i,\n\t\t\t\t'q_long_input_field'=>$long_input_field,\n\t\t\t\t'q_num_choosable_answers'=>$num_choosable_answers,\n\t\t\t\t'q_question_text'=>$question,\n\t\t\t\t'answers'=>$answers,\n\t\t\t\t'q_required'=>$required,\n\t\t\t);\n\n\t\t\t$num_q++;\n\t\t}\n\n\t\t$preview=render_quiz($questions);\n\n\t\treturn array(do_template('FORM',array('SUBMIT_NAME'=>'','TEXT'=>'','URL'=>'','HIDDEN'=>'','FIELDS'=>$preview)),NULL);\n\t}", "title": "" }, { "docid": "3645cd05e10931c5921b6f14658e8956", "score": "0.4864367", "text": "private function createQuestion(QuestionDefinition $definition)\n {\n $question = $this->getStore()->create('question');\n $this->applyQuestionValues($question, $definition);\n\n $question->save();\n\n foreach ($definition->getChoices() as $choiceDef) {\n $this->createChoice($question, $choiceDef);\n }\n }", "title": "" }, { "docid": "412d34a8bfa5bad15029b040b4da574e", "score": "0.48382562", "text": "public function fillQuestion(array $question)\n\t{\n\t\t[$inputMode, $inputExpectation, $notUseful, $from] = explode('_', $question['type']);\n\n\t\tvar_dump($inputMode, $inputExpectation, $notUseful, $from);\n\t\t//var_dump($question['function']['name']);\n\n\t\tif($inputMode == 'type')\n\t\t{\n\t\t\t$question['text'] .= $question['function'][$from] . ' ?';\n\t\t\t$question['answer_text'] = $question['function'][$inputExpectation];\n\t\t}\n\n\t\telseif($inputMode == 'choose')\n\t\t{\n\t\t\t$question['answer_text'] = $question['function'][$inputExpectation];\n\n\t\t\tif($from == 'name')\n\t\t\t{\n\t\t\t\t$question['text'] .= $question['function']['name'] . '() ?';\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$question['text'] .= $question['function'][$from] . ' ?';\n\t\t\t}\n\n\t\t\t$question['choices'] = $this->generateChoices($question);\n\n\t\t\t//put correct answer in (by clobbering one of generated choices)\n\t\t\t$randomChoice = array_rand($question['choices']);\n\n\t\t\t$question['choices'][$randomChoice] = $question['answer_text'];\n\t\t\t$question['answer_index'] = $randomChoice;\n\t\t}\n\n\t\t\n\n\t\treturn $question;\n\t}", "title": "" }, { "docid": "4c6de57d4a183300fd9a654ccc4ea84f", "score": "0.48107862", "text": "public function createAResearch()\n {\n // --Research Topic\n // --Research Description\n // --Research Files\n\n // Create a Research \n // Upload Research Files\n }", "title": "" }, { "docid": "bc60c098a8038ab027163d9460257ce9", "score": "0.48077235", "text": "function base_init($uid){\r\n\t\t// Sublines\r\n\t\t$where = \"question_uid=\".$uid;\r\n\t\t$where .= \" AND sys_language_uid=\".$GLOBALS['TSFE']->sys_language_uid;\r\n\t\t$where .= $this->cObj->enableFields('tx_kequestionnaire_sublines');\r\n\t\t$res=$GLOBALS[\"TYPO3_DB\"]->exec_SELECTgetRows(\"*\", \"tx_kequestionnaire_sublines\", $where,'','sorting');\r\n\r\n\t\tforeach($res as $row){\r\n\t\t\t$row=$this->processRTEFields($row,\"tx_kequestionnaire_sublines\");\r\n\r\n\t\t\t$this->sublines[$row[\"uid\"]]=$row;\r\n\t\t\t$this->sublines[$row[\"uid\"]][\"error\"]=0;\r\n\t\t}\r\n\t\t\r\n\t\t// Columns\r\n\t\t$where = \"question_uid=\".$uid;\r\n\t\t$where .= \" AND sys_language_uid=\".$GLOBALS['TSFE']->sys_language_uid;\r\n\t\t$where .= $this->cObj->enableFields('tx_kequestionnaire_columns');\r\n\t\t$res=$GLOBALS[\"TYPO3_DB\"]->exec_SELECTgetRows(\"*\", \"tx_kequestionnaire_columns\", $where,'','sorting');\r\n\r\n\t\tforeach($res as $row){\r\n\t\t\t$row=$this->processRTEFields($row,\"tx_kequestionnaire_columns\");\r\n\r\n\t\t\t$this->columns[$row[\"uid\"]]=$row;\r\n\t\t\t$this->answers[$row[\"uid\"]]=$row;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8b1f99fa989b90ec239b1fc414280f59", "score": "0.48074472", "text": "public function question($id)\n {\n return $this->create($id);\n }", "title": "" }, { "docid": "3bfef0405a7b1bdb846f739a6fc5a5b2", "score": "0.47776082", "text": "protected function initialise_question_instance(question_definition $question, $questiondata) {\n parent::initialise_question_instance($question, $questiondata);\n $question->parts = array();\n if (!empty($questiondata->options->answers)) {\n foreach ($questiondata->options->answers as $ans) {\n $part = new qtype_formulas_part();\n foreach ($ans as $key => $value) {\n $part->{$key} = $value;\n }\n $question->parts[$part->partindex] = $part;\n }\n }\n $question->varsrandom = $questiondata->options->varsrandom;\n $question->varsglobal = $questiondata->options->varsglobal;\n $question->answernumbering = $questiondata->options->answernumbering;\n $question->qv = new qtype_formulas\\variables();\n $question->numpart = $questiondata->options->numpart;\n if ($question->numpart != 0) {\n $question->fractions = array_fill(0, $question->numpart, 0);\n $question->anscorrs = array_fill(0, $question->numpart, 0);\n $question->unitcorrs = array_fill(0, $question->numpart, 0);\n }\n $question->textfragments = $this->split_questiontext($question->questiontext, $question->parts);\n $this->initialise_combined_feedback($question, $questiondata, true);\n }", "title": "" }, { "docid": "c18df7424688ac2c989ee27ea5d4573b", "score": "0.4768842", "text": "abstract protected function getQuestion();", "title": "" }, { "docid": "848377d2872eaf1d9d96fe472f06a970", "score": "0.47664675", "text": "public function createAssessmentQuestionsTable()\n {\n $query = \"CREATE TABLE IF NOT EXISTS assessment_questions(\n id INT(2) UNSIGNED PRIMARY KEY AUTO_INCREMENT,\n question VARCHAR(150) NOT NULL,\n options VARCHAR(255) NOT NULL\n )\";\n $this->execQuery($query);\n return true;\n }", "title": "" }, { "docid": "260b9b00f3b3d656741bb290f200a6dd", "score": "0.47553965", "text": "static function fromQth(string $qth): Locator\n {\n $qth = strtoupper($qth);\n\n // format validation\n if (!static::validation($qth)) {\n throw new \\InvalidArgumentException(\"QTH Locator '\" . $qth . \"' don't have the required format 'AA12', 'AA12CD', 'AA12CD34' or 'AB12CD34XX'.\");\n }\n\n // create Locator\n $instance = new static(new Convertor());\n $instance->setQth($qth);\n $instance->setCoordsArr($instance->convertor->qthToCoords($qth));\n\n return $instance;\n }", "title": "" }, { "docid": "7e792384b7348bae94d81da6968df0b9", "score": "0.47545603", "text": "public function get_sc_question_data_question_one() {\n global $USER;\n $qdata = new stdClass();\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-001';\n $qdata->idnumber = 4010;\n $qdata->category = 1;\n $qdata->contextid = 1;\n $qdata->parent = 0;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->length = 0;\n $qdata->hidden = 0;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->timecreated = \"1552376610\";\n $qdata->timemodified = \"1552376610\";\n $qdata->stamp = \"127.0.0.1+1552376610+76EZEc\";\n $qdata->version = \"127.0.0.1+155237661076EZEc\";\n $qdata->defaultmark = 1;\n $qdata->penalty = 0.3333333;\n $qdata->questiontext = \"Questiontext for Question 1\";\n $qdata->questiontextformat = FORMAT_HTML;\n $qdata->generalfeedback = \"This feedback is general\";\n $qdata->generalfeedbackformat = FORMAT_HTML;\n $qdata->options = new stdClass();\n $qdata->options->questionid = 4010;\n $qdata->options->scoringmethod = \"sconezero\";\n $qdata->options->shuffleanswers = 0;\n $qdata->options->answernumbering = 'none';\n $qdata->options->numberofrows = 3;\n $qdata->options->correctrow = 1;\n $qdata->options->rows = array(\n 1 => (object) array(\n 'id' => 1,\n 'questionid' => 4010,\n 'number' => 1,\n 'optiontext' => 'Option Text 1',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 1',\n 'optionfeedbackformat' => 1\n ),\n 2 => (object) array(\n 'id' => 2,\n 'questionid' => 4010,\n 'number' => 2,\n 'optiontext' => 'Option Text 2',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 2',\n 'optionfeedbackformat' => 1\n ),\n 3 => (object) array(\n 'id' => 3,\n 'questionid' => 4010,\n 'number' => 3,\n 'optiontext' => 'Option Text 3',\n 'optiontextformat' => 1,\n 'optionfeedback' => 'Feedback Text 3',\n 'optionfeedbackformat' => 1\n )\n );\n $qdata->hints = array(\n 0 => (object) array(\n 'id' => 0,\n 'questionid' => 4010,\n 'hint' => 'This is the 1st hint',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 0\n ),\n 1 => (object) array(\n 'id' => 1,\n 'questionid' => 4010,\n 'hint' => 'This is the 2nd hint',\n 'hintformat' => FORMAT_HTML,\n 'shownumcorrect' => 0,\n 'clearwrong' => 0,\n 'options' => 0\n )\n );\n return $qdata;\n }", "title": "" }, { "docid": "436f1bc20b2fb4d291f1b13b446dbe36", "score": "0.4728829", "text": "function setQuestionTabs()\n\t{\n\t\tglobal $rbacsystem, $ilTabs;\n\n\t\t$ilTabs->clearTargets();\n\t\t\n\t\t$this->ctrl->setParameterByClass(\"ilAssQuestionPageGUI\", \"q_id\", $_GET[\"q_id\"]);\n\t\tinclude_once \"./Modules/TestQuestionPool/classes/class.assQuestion.php\";\n\t\t$q_type = $this->object->getQuestionType();\n\n\t\tif (strlen($q_type))\n\t\t{\n\t\t\t$classname = $q_type . \"GUI\";\n\t\t\t$this->ctrl->setParameterByClass(strtolower($classname), \"sel_question_types\", $q_type);\n\t\t\t$this->ctrl->setParameterByClass(strtolower($classname), \"q_id\", $_GET[\"q_id\"]);\n\t\t}\n\n\t\tif ($_GET[\"q_id\"])\n\t\t{\n\t\t\tif ($rbacsystem->checkAccess('write', $_GET[\"ref_id\"]))\n\t\t\t{\n\t\t\t\t// edit page\n\t\t\t\t$ilTabs->addTarget(\"edit_page\",\n\t\t\t\t\t$this->ctrl->getLinkTargetByClass(\"ilAssQuestionPageGUI\", \"edit\"),\n\t\t\t\t\tarray(\"edit\", \"insert\", \"exec_pg\"),\n\t\t\t\t\t\"\", \"\", $force_active);\n\t\t\t}\n\n\t\t\t$this->addTab_QuestionPreview($ilTabs);\n\t\t}\n\n\t\t$force_active = false;\n\t\tif ($rbacsystem->checkAccess('write', $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$url = \"\";\n\t\t\tif ($classname) $url = $this->ctrl->getLinkTargetByClass($classname, \"editQuestion\");\n\t\t\t$commands = $_POST[\"cmd\"];\n\t\t\tif (is_array($commands))\n\t\t\t{\n\t\t\t\tforeach ($commands as $key => $value)\n\t\t\t\t{\n\t\t\t\t\tif (preg_match(\"/^suggestrange_.*/\", $key, $matches))\n\t\t\t\t\t{\n\t\t\t\t\t\t$force_active = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// edit question properties\n\t\t\t$ilTabs->addTarget(\"edit_question\",\n\t\t\t\t$url,\n\t\t\t\tarray(\"editQuestion\", \"save\", \"flashAddParam\", \"saveEdit\", \"originalSyncForm\"),\n\t\t\t\t$classname, \"\", $force_active);\n\t\t}\n\n\t\t// add tab for question feedback within common class assQuestionGUI\n\t\t$this->addTab_QuestionFeedback($ilTabs);\n\n\t\t// add tab for question hint within common class assQuestionGUI\n\t\t$this->addTab_QuestionHints($ilTabs);\n\n\t\t// add tab for question's suggested solution within common class assQuestionGUI\n\t\t$this->addTab_SuggestedSolution($ilTabs, $classname);\n\n\t\t// Assessment of questions sub menu entry\n\t\tif ($_GET[\"q_id\"])\n\t\t{\n\t\t\t$ilTabs->addTarget(\"statistics\",\n\t\t\t\t$this->ctrl->getLinkTargetByClass($classname, \"assessment\"),\n\t\t\t\tarray(\"assessment\"),\n\t\t\t\t$classname, \"\");\n\t\t}\n\n\t\t$this->addBackTab($ilTabs);\n\t}", "title": "" }, { "docid": "d4e9ee43ca7a4e79b84a25cb52bd4e4e", "score": "0.47231612", "text": "public function createAction()\n {\n $interQCM = new InteractionQCM();\n $form = $this->createForm(\n new InteractionQCMType(\n $this->container->get('security.context')->getToken()->getUser()\n ), $interQCM\n );\n\n $exoID = $this->container->get('request')->request->get('exercise');\n\n $formHandler = new InteractionQCMHandler(\n $form, $this->get('request'), $this->getDoctrine()->getManager(),\n $this->container->get('security.context')->getToken()->getUser(), $exoID\n );\n\n if ($formHandler->processAdd()) {\n $categoryToFind = $interQCM->getInteraction()->getQuestion()->getCategory();\n $titleToFind = $interQCM->getInteraction()->getQuestion()->getTitle();\n\n if ($exoID == -1) {\n return $this->redirect(\n $this->generateUrl('ujm_question_index', array(\n 'categoryToFind' => $categoryToFind, 'titleToFind' => $titleToFind)\n )\n );\n } else {\n $em = $this->getDoctrine()->getManager();\n $exercise = $em->getRepository('UJMExoBundle:Exercise')->find($exoID);\n\n if ($this->container->get('ujm.exercise_services')->isExerciseAdmin($exercise)) {\n $this->container->get('ujm.exercise_services')->setExerciseQuestion($exoID, $interQCM);\n }\n\n return $this->redirect(\n $this->generateUrl('ujm_exercise_questions', array(\n 'id' => $exoID, 'categoryToFind' => $categoryToFind, 'titleToFind' => $titleToFind)\n )\n );\n }\n }\n\n $formWithError = $this->render(\n 'UJMExoBundle:InteractionQCM:new.html.twig', array(\n 'entity' => $interQCM,\n 'form' => $form->createView(),\n 'error' => true,\n 'exoID' => $exoID\n )\n );\n\n $formWithError = substr($formWithError, strrpos($formWithError, 'GMT') + 3);\n\n return $this->render(\n 'UJMExoBundle:Question:new.html.twig', array(\n 'formWithError' => $formWithError,\n 'exoID' => $exoID\n )\n );\n }", "title": "" }, { "docid": "f75c81680fd0e8654465ca5584e1dfef", "score": "0.47206423", "text": "function ot_add_question($translator_id, $info)\n{\n $info = ot_clean_hash($info);\n\n $subject = $info[\"subject\"];\n $message = $info[\"message\"];\n $now = ot_get_current_datetime();\n $project_id = $info[\"project_id\"];\n\n $result = mysql_query(\"\n INSERT INTO tr_project_questions (project_id, account_id, creation_date, status, thread_status, subject, message)\n VALUES ($project_id, $translator_id, '$now', 'unread', 'new', '$subject', '$message')\n \") or ot_handle_error(mysql_error());\n\n\n $success = true;\n $response = \"\";\n if ($result)\n {\n \t$question_id = mysql_insert_id();\n \tot_send_general_question_notification_emails($translator_id, $question_id);\n\n $response = \"The project manager(s) have been notified. Responses to your questions can be found on your <a href=\\\"messages/\\\" class=\\\"bold\\\">Message Board</a>.\";\n }\n else\n {\n $success = false;\n $response = \"There was an error sending your email.\";\n }\n\n return array($success, $response);\n}", "title": "" }, { "docid": "4b497fbd0029f4879b1ec24f3177f242", "score": "0.47192025", "text": "protected function initialise_question_instance(question_definition $question, $questiondata) {\r\n\r\n parent::initialise_question_instance($question, $questiondata);\r\n $question->responseformat = 'plain';\r\n $question->responsefieldlines = $questiondata->options->responsefieldlines;\r\n\t$question->givencode = $questiondata->options->givencode;\r\n\t$question->testclassname = $questiondata->options->testclassname;\r\n\t$question->junitcode = $questiondata->options->junitcode;\r\n\r\n }", "title": "" }, { "docid": "45b4ecc045ab191dfbedd1c9de087342", "score": "0.4704565", "text": "function tmpToDB($temp_file, $dbcon){\n\t\t$courseid = 150;\n\t\t$questionBank = array();\n\t\t$index = 0;\t\t\n\t\t$questionFile = fopen($temp_file, \"r\") or die(\"file not found\");\n\t\t//iterate over question document, check if it is a question or an answer. add to appropriate array.\t\n\t\twhile(!feof($questionFile)){\t\n\t\t\t$line = fgets($questionFile);\n\n\t\t\t//find chapter number\n\t\t\tif(strpos($line,\"Chapter \")!==FALSE){\n\t\t\t\t$lineArray = explode(\" \", $line);\n\t\t\t\t$insertChapter = $lineArray[1];\n\t\t\t}\n\t\t\t\n\t\t\t//check if it's a question\n\t\t\tif(is_numeric(substr($line,0,1))){\n\t\t\t\t$question = substr($line,3);\n\t\t\t\t$question = trim($question, ' \\0\\t\\n\\x0b\\r');\n\t\t\t\t$questionBank[\"question\"] = $question;\n\t\t\t}\n\t\t\t//check if it's a possible answer operates under the assumption a b c and d are the only choices.\n\t\t\t//can probably spruce this up a little nicer. cascading switch statement maybe?\n\t\t\tif(strtoupper(substr($line,0,2)) == 'A)' | strtoupper(substr($line,0,2)) == 'B)' | strtoupper(substr($line,0,2)) == 'C)' | strtoupper(substr($line,0,2)) == 'D)'){\n\t\t\t\t$choice = strtoupper(substr($line,0,1));\n\t\t\t\t$choice = trim($choice, ' \\0\\t\\n\\x0b\\r');\n\t\t\t\t$choices[$choice] = substr($line,3);\n\t\t\t\t$questionBank[\"choices\"] = $choices;\t\t\t\n\t\t\t}\n\t\t\t//assign questions, choices and answers to question bank.\n\t\t\tif(strtoupper(substr($line,0,6)) == \"ANSWER\"){\n\t\t\t\t$answer= substr($line,7,8);\n\t\t\t\t$answer = trim($answer, ' \\0\\t\\n\\x0b\\r');\n\t\t\t\t//php seems to require this before it recognizes A as A.\n\t\t\t\t$a = ord($answer);\n\t\t\t\t$a = chr($a);\n\t\t\t\t//remove $index when loading into db.\n\t\t\t\t$questionBank[\"question\"] = $question;\n\t\t\t\t$questionBank[\"choices\"] = $choices;\n\t\t\t\t$questionBank[\"answer\"] = $answer;\n\t\t\t\n\t\t\t\t//TODO database tom foolery\n\t\t\t\t//insert statements to questiontable.\n\t\t\t\t\n\t\t\t\t//bound params\n\t\t\t\t//$stmt = $dbcon->prepare(\"INSERT INTO db.table (question, chapter, courseid)) VALUES(?,?)\");\n\t\t\t\t//$stmt->bind_param(\"data_types\",$insertQuestion, $insertChaper);\n\t\t\t\t\n\t\t\t\t//PDO prefer to use this\n\t\t\t\t$insertQuestion = json_encode($questionBank);\n\t\t\t\t$stmt = $dbcon->prepare(\"INSERT INTO question (questionid, question, chapter, courseid) VALUES (null, :question, :chapter, :courseid)\");\n\t\t\t\t$stmt->bindParam(':question', $insertQuestion);\n\t\t\t\t$stmt->bindParam(':chapter', $insertChapter);\n\t\t\t\t$stmt->bindParam(':courseid', $courseid);\n\t\t\t\tif($stmt->execute()){\n\t\t\t\t\t$index+=1;\n\t\t\t\t}else{\n\t\t\t\t\techo 'error <br>';\n\t\t\t\t\t$arr = $stmt->errorInfo();\n\t\t\t\t\tprint_r($arr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//close db connection\n\t\t$conn=null;\n\t\t//close file\n\t\tfclose($questionFile);\n\t\techo $index . \" questions uploaded for chapter \" . $insertChapter . \" on course: \" . $courseid;\n\t\t//this is only for debug purposes, uncomment PDO statements when ready.\n\t\t//$qbjson = json_encode($questionBank);\n\t\t//echo $qbjson;\n\n\t}", "title": "" }, { "docid": "cc8de1db5dfbe4735937aa6328b59b4c", "score": "0.46947414", "text": "public function generateQuestion()\n\t{\n\t\t//get random question type\n\t\t$type = $this->questionTypes[array_rand($this->questionTypes)];\n\n\t\t//get random section\n\t\t$section = $this->getRandomSection();\n\n\t\t//get random function (within the above section)\n\t\t$function = $this->getRandomFunction($section);\n\n\t\t$question = [];\n\t\t$question['type'] = $type;\n\t\t$question['section'] = $section;\n\t\t$question['function'] = $function;\n\t\t$question['text'] = \"{$section} now, {$this->questionTextPerType[$type]}\";\n\t\t$question['choices'] = [];\n\t\t$question['answer_text'] = '';\n\t\t$question['answer_index'] = '';\t//in ['choices'] array\n\n\n\t\treturn $this->fillQuestion($question);\n\t}", "title": "" }, { "docid": "04d15a70739ee081f875d4641eaf054d", "score": "0.4677231", "text": "public function create()\n {\n $animals = Animal::all();\n $ani = [];\n foreach ($animals as $animal) {\n $ani[$animal -> animal_id] = $animal -> animal_name;\n }\n\n $worksheets = Worksheet::all();\n $works = [];\n foreach ($worksheets as $worksheet) {\n $works[$worksheet -> worksheet_id] = $worksheet -> worksheet_name;\n }\n\n $descriptions = Question_description::all();\n $descrip = [];\n foreach ($descriptions as $description) {\n $descrip[$description -> description_id] = $description -> description;\n }\n\n\n return view('pages/data_manage/question/create') -> withAni($ani) \n -> withAnimals($animals)\n -> withWorks($works)\n -> withDescrip($descrip);\n }", "title": "" }, { "docid": "463ee929078370b5413d723397199a89", "score": "0.46751004", "text": "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"question\",\n \"action\" => \"index\"\n ));\n }\n\n $que = new Question();\n\n $que->setQuesId($this->request->getPost(\"quesid\"));\n $que->setDesc($this->request->getPost(\"desc\"));\n $que->setOrder($this->request->getPost(\"order\"));\n $que->setBkgrId($this->request->getPost(\"bkgrid\"));\n $que->setQtype($this->request->getPost(\"qtype\"));\n $que->setAmtText($this->request->getPost(\"amttext\"));\n $que->setAmtType($this->request->getPost(\"amttype\"));\n $que->setCrdt($this->request->getPost(\"crdt\"));\n $que->setCrdtId($this->request->getPost(\"crdtid\"));\n $que->setUpdt($this->request->getPost(\"updt\"));\n $que->setUpdtId($this->request->getPost(\"updtid\"));\n $que->setDelmark($this->request->getPost(\"delmark\"));\n \n\n if (!$que->save()) {\n foreach ($que->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"ques\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"Question was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"question\",\n \"action\" => \"index\"\n ));\n\n }", "title": "" }, { "docid": "6845a2709b3c281cc118d0f7421e6ba0", "score": "0.46608657", "text": "function ciniki_writingcatalog_itemAdd(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'title'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Title'), \n 'subtitle'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Subtitle'), \n 'permalink'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Permalink'), \n 'type'=>array('required'=>'no', 'blank'=>'no', 'default'=>'30', 'name'=>'Type'),\n 'webflags'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'0', 'name'=>'Web Flags'), \n 'image_id'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'0', 'name'=>'Image'),\n 'catalog_number'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Catalog Number'), \n 'year'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Year'), \n 'month'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Month'), \n 'day'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Day'), \n 'synopsis'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Synopsis'), \n 'description'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Description'), \n 'content'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Content'), \n 'inspiration'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Inspiration'), \n 'awards'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Awards'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Notes'), \n 'categories'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'list', 'delimiter'=>'::', 'name'=>'Categories'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'writingcatalog', 'private', 'checkAccess');\n $rc = ciniki_writingcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.writingcatalog.itemAdd'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'makePermalink');\n $args['permalink'] = ciniki_core_makePermalink($ciniki, $args['title']);\n \n //\n // Get a new UUID\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUUID');\n $rc = ciniki_core_dbUUID($ciniki, 'ciniki.writingcatalog');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args['uuid'] = $rc['uuid'];\n\n //\n // Check the permalink doesn't already exist\n //\n $strsql = \"SELECT id, title, permalink FROM ciniki_writingcatalog \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND permalink = '\" . ciniki_core_dbQuote($ciniki, $args['permalink']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.writingcatalog', 'item');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( $rc['num_rows'] > 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.writingcatalog.15', 'msg'=>'You already have an item with this title, please choose another title.'));\n }\n\n // \n // Turn off autocommit\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbInsert');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.writingcatalog');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n $rc = ciniki_core_objectAdd($ciniki, $args['tnid'], 'ciniki.writingcatalog.item', $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.writingcatalog');\n return $rc;\n }\n $writingcatalog_id = $rc['id'];\n\n //\n // Update the categories\n //\n if( isset($args['categories']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'tagsUpdate');\n $rc = ciniki_core_tagsUpdate($ciniki, 'ciniki.writingcatalog', 'tag', $args['tnid'],\n 'ciniki_writingcatalog_tags', 'ciniki_writingcatalog_history',\n 'writingcatalog_id', $writingcatalog_id, 10, $args['categories']);\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.writingcatalog');\n return $rc;\n }\n }\n\n //\n // Commit the database changes\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.writingcatalog');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Update the last_change date in the tenant modules\n // Ignore the result, as we don't want to stop user updates if this fails.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate');\n ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'ciniki', 'writingcatalog');\n\n return array('stat'=>'ok', 'id'=>$writingcatalog_id);\n}", "title": "" }, { "docid": "0f4717604e3b70942f7f137fac62ba27", "score": "0.4653261", "text": "public function actionCreate()\n\t{\n\t\t$model=new QrQuestionSet;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['QrQuestionSet']))\n\t\t{\n\t\t\t$model->attributes=$_POST['QrQuestionSet'];\n\n\t\t$this->widget('application.extensions.qrcode.QRCodeGenerator',array(\n\t 'data' => 'http://www.bryantan.info',\n\t 'filename' => $model->qrcode.\".png\",\n\t 'subfolderVar' => false,\n\t 'matrixPointSize' => 5,\n\t 'displayImage'=>false, // default to true, if set to false display a URL path\n\t 'errorCorrectionLevel'=>'L', // available parameter is L,M,Q,H\n\t 'matrixPointSize'=>4, // 1 to 10 only\n\t\t));\n\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->idqr_question_set));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "c3caf0acbffa4898997b46eb5f6d191a", "score": "0.4646737", "text": "public function create(Request $request,$id)\n {\n //\n $pr = PurchaseRequestModel::find($id);\n $pr->created_abstract = 1;\n\n $abstract = new AbstractModel;\n $abstract->created_by = Auth::user()->id;\n $abstract->abstract_title = \"A-\".$pr->pr_unique;\n $abstract->pr_number = $pr->pr_form_no;\n $abstract->proc_details = strtoupper($request->get('proc_details'));\n $abstract->office = Auth::user()->department;\n $abstract->requestor_name = $pr->requestor_name;\n\n $abstract->save();\n\n \n $data = PurchaseRequestItemModel::where('pr_form_number',$pr->pr_form_no)->get();\n\n foreach($data as $datas){\n $query = AbstractModel::where('pr_number',$pr->pr_form_no)->firstorFail(); \n $ppmpitem = PpmpItem::find($datas->pr_description);\n abstractitemmodel::create([\n 'abstract_id' => $query->id,\n 'qty' => $datas->pr_qty,\n 'unit' =>$datas->pr_unit,\n 'particulars' =>$ppmpitem->description\n ]);\n }\n\n \n $pr->save();\n\n activity('Create Abstract of Quotation')\n ->log('Generated Abstract of Quotation Form: A-'.$pr->pr_unique);\n\n return redirect()->back()->with('success','Abstract of Quotation Form Generated!');\n\n\n\n }", "title": "" }, { "docid": "6cce23d5bec33d24f7846b2141045a51", "score": "0.46329123", "text": "public function initAddQuestionAndAnswersForm () {\n global $tpl, $ilCtrl;\n\n $my_tpl = new ilTemplate(\"tpl.question_and_answers.html\", true, true,\n \"Customizing/global/plugins/Services/Repository/RepositoryObject/MobileQuiz\");\n $rtokenFactory = new ilCtrl();\n $my_tpl->setVariable(\"ACTION_URL\",$this->ctrl->getFormAction($this));\n $my_tpl->setVariable(\"SUBMIT_BUTTON\", $this->txt(\"save\"));\n $my_tpl->setVariable(\"NEW_QUESTION\", $this->txt(\"question_add_head\"));\n $my_tpl->setVariable(\"QUESTION\", $this->txt(\"question_add_text\"));\n $my_tpl->setVariable(\"QUESTION_TYPE\", $this->txt(\"question_add_type\"));\n $my_tpl->setVariable(\"CHOICES\", $this->txt(\"choice_add_texts\"));\n $my_tpl->setVariable(\"VAR_1\", \"value1\");\n $my_tpl->setVariable(\"COMMAND\", \"cmd[createQuestionAndAnswers]\");\n $my_tpl->setVariable(\"MINIMUM\", $this->txt(\"choice_add_numeric_minimum\"));\n $my_tpl->setVariable(\"MAXIMUM\", $this->txt(\"choice_add_numeric_maximum\"));\n $my_tpl->setVariable(\"STEP\", $this->txt(\"choice_add_numeric_steprange\"));\n $my_tpl->setVariable(\"CORRECT_VALUE\", $this->txt(\"choice_add_numeric_correctvalue\"));\n $my_tpl->setVariable(\"TOLERANCE_RANGE\", $this->txt(\"choice_add_numeric_tolerenace_range\"));\n $my_tpl->setVariable(\"SELECTED_SINGLE\", 'selected=\"selected\"');\n\n $my_tpl->setVariable(\"HIDE_NUMERIC_BLOCK\", 'style=\"display:none;\"');\n $my_tpl->setVariable(\"HIDE_SINGLE_CHOICE_BLOCK\", 'style=\"display:none;\"');\n\n $html = $my_tpl->get();\n $tpl->setContent($html);\n }", "title": "" }, { "docid": "f2c233f4b22dc8c177f3b2cdfc785483", "score": "0.4623126", "text": "function init(){\n\t\t//t3lib_div::debug($this->cObj->data);\n\t\t// Assign the flexform data to a local variable for easier access\n\t\t$piFlexForm = $this->cObj->data['pi_flexform'];\n\t\t\n\t\t// Traverse the entire flexform array based on the language\n\t\t// and write the content to an array\n\t\tif (is_array($piFlexForm['data'])) {\n\t\t\tforeach ( $piFlexForm['data'] as $sheet => $data ) {\n\t\t\t\tforeach ( $data as $lang => $value ) {\n\t\t\t\t\tforeach ( $value as $key => $val ) {\n\t\t\t\t\t\t$this->ffdata[$key] = $this->pi_getFFvalue($piFlexForm, $key, $sheet);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//questionnaire Type\n\t\t$this->type = $this->ffdata['type'];\n\n\t\t//t3lib_div::devLog('ffdata', $this->prefixId, 0, $this->ffdata);\n\t\t$this->pid = $this->ffdata['storage_pid'];\n\n\t\t//get the Template\n\t\t//check if there is given a template, or use the standard\n\t\t$template = 'questionnaire.html';\n\t\t$this->tmpl_path = t3lib_extMgm::siteRelPath('ke_questionnaire').'res/templates/';\n\t\tif ($this->conf['template_dir'] != '') $this->tmpl_path = trim($this->conf['template_dir']);\n\t\tif ($this->ffdata['template_dir'] != '') $this->tmpl_path = trim($this->ffdata['template_dir']);\n\t\t//t3lib_div::debug($GLOBALS['TSFE']->config);\n\t\t$this->conf['sys_language_uid'] = $this->cObj->data['sys_language_uid'];\n\t\t$this->conf['language'] = strtolower($GLOBALS['TSFE']->config['config']['language']);\n\n\t\t$this->tmpl = $this->cObj->fileResource($this->tmpl_path.$template);\n\t\t//t3lib_div::devLog('template base', $this->prefixId, 0, array($this->tmpl_path,$this->tmpl,$this->tmpl_path.$template));\n\n\t\t// if $this->ffdata['render_count'] is null, set it to one\n\t\tif ($this->ffdata['render_count'] == 0) $this->ffdata['render_count'] = 1;\n\n\t\t$this->extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ke_questionnaire']);\n\n\t\t//get the user id\n\t\t$this->user_id = $GLOBALS['TSFE']->fe_user->user['uid'];\n\t\tif ($this->user_id){\n\t\t\t$markerArray = array();\n\t\t\t$user_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*','fe_users','uid='.$this->user_id);\n\t\t\tif ($user_res){\n\t\t\t\t$user = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($user_res);\n\t\t\t\tforeach ($user as $key => $value){\n\t\t\t\t\tif ($key != 'pid' AND $key != 'password'){\n\t\t\t\t\t\t$markerArray['###USER_'.strtoupper($key).'###'] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->userMarker = $markerArray;\n\t\t}\n\n\t\t//init Captcha\n\t\tif (t3lib_extMgm::isLoaded('sr_freecap') ) {\n\t\t\trequire_once(t3lib_extMgm::extPath('sr_freecap').'pi2/class.tx_srfreecap_pi2.php');\n\t\t\t$this->freeCap = t3lib_div::makeInstance('tx_srfreecap_pi2');\n\t\t}\n\n\t\t//get the questions of the questionnaire\n\t\t$this->getQuestions();\n\n\t\t//centralize the pagecount\n\t\t$this->pageCount = $this->getPageCount();\n\n\t\t//clear piVars (XSS and SQLInjection)\n\t\t$this->clearPiVars();\n\n\t\t$this->no_authcodeKey = 'no_authcode';\n\t}", "title": "" }, { "docid": "89cac062bee52aaafa493a67313cad59", "score": "0.46145394", "text": "private static function makeQuestionFromRow($row) {\r\n\t\t$question = new Question($row['title'], $row['content'], $row['postedOn'], $row['tags'], $row['user_id'], $row['fname'], $row['lname']);\r\n\t\t$question -> id = $row['id'];\r\n\t\treturn $question;\r\n\t}", "title": "" }, { "docid": "dcab29fadd99c07e231bc8c30ac4a49d", "score": "0.4609636", "text": "public function __construct(ContainerInterface $di, Question $question)\n {\n parent::__construct($di);\n $this->question = $question;\n $this->form->create(\n [\n \"id\" => __CLASS__,\n \"use_fieldset\" => false,\n ],\n [\n \"id\" => [\n \"type\" => \"hidden\",\n \"value\" => $question->id,\n ],\n \"title\" => [\n \"type\" => \"text\",\n \"validation\" => [\"not_empty\"],\n \"value\" => $question->title,\n ],\n \"content\" => [\n \"type\" => \"textarea\",\n \"validation\" => [\"not_empty\"],\n \"value\" => $question->content,\n ],\n \"tags\" => [\n \"type\" => \"text\",\n \"label\" => \"Tags (separated by spaces)\",\n \"value\" => implode(\" \", $question->tags()),\n ],\n \"answer\" => [\n \"type\" => \"select\",\n \"label\" => \"Accepted answer\",\n \"options\" => $this->getAnswers($question->id),\n ],\n \"submit\" => [\n \"type\" => \"submit\",\n \"value\" => \"Update question\",\n \"class\" => \"solid\",\n \"callback\" => [$this, \"callbackSubmit\"]\n ],\n ]\n );\n }", "title": "" }, { "docid": "c27fbd451b981db78326e9f527624c10", "score": "0.45958155", "text": "public static function create() {\n\t\t$ret = new self();\n\t\t$params = func_get_args();\n\t\tif (count($params) > 0) {\n\t\t\tforeach($params as $key => $param) {\n\t\t\t\tif ($key == 0) $ret->setQuestion ($param);\n\t\t\t\t$ret->addAnswer($param);\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "1000ab02d1d833910e4f7380fb6ca0ea", "score": "0.4594997", "text": "function SurveyQuestionGUI()\n\t{\n\t\tglobal $lng, $tpl, $ilCtrl;\n\n\t\t$this->lng =& $lng;\n\t\t$this->tpl =& $tpl;\n\t\t$this->ctrl =& $ilCtrl;\n\t\t$this->ctrl->saveParameter($this, \"q_id\");\n\t\t$this->ctrl->setParameterByClass($_GET[\"cmdClass\"], \"sel_question_types\", $_GET[\"sel_question_types\"]);\n\t\t$this->cumulated = array();\n\t\t$this->errormessages = array();\n\t}", "title": "" }, { "docid": "e84dac6b47882ff904809610217374c5", "score": "0.45907292", "text": "function __construct($id = -1)\n\t{\n\t\tparent::__construct();\n\t\tinclude_once \"./Modules/TestQuestionPool/classes/class.assFlashQuestion.php\";\n\t\t$this->object = new assFlashQuestion();\n\t\t$this->newUnitId = null;\n\t\tif ($id >= 0)\n\t\t{\n\t\t\t$this->object->loadFromDb($id);\n\t\t}\n\t}", "title": "" }, { "docid": "b77371176bf9fcc225279df5f2546dd2", "score": "0.45882404", "text": "public function set_questions_quality($questions_quality)\n\t{\n\t\tif (is_null($questions_quality)) {\n\t\t\tthrow new InvalidArgumentException(\"Project Questions Quality Invalid!\");\n\t\t}\n\t\t$this->questions_quality = $questions_quality;\n\t}", "title": "" }, { "docid": "ff87d716ced3dd62cb5ddc6dd0e6af7c", "score": "0.45774037", "text": "private function generateQuestion(){\n\t\t\t$questions = array(\n\t\t\t\t\tarray('name' => 'chevrolet', 'logo' => 'chevrolet.png'),\n\t\t\t\t\tarray('name' => 'playboy', 'logo' => 'playboy.png'),\n\t\t\t\t\tarray('name' => 'shell', 'logo' => 'shell.png'),\n\t\t\t\t\tarray('name' => 'java', 'logo' => 'java.png'),\n\t\t\t\t\tarray('name' => 'mysql', 'logo' => 'mysql.png'),\n\t\t\t\t\tarray('name' => 'postgresql', 'logo' => 'postgresql.png'),\n\t\t\t\t\tarray('name' => 'chrome', 'logo' => 'chrome.png'),\n\t\t\t\t\tarray('name' => 'firefox', 'logo' => 'firefox.png'),\n\t\t\t\t\tarray('name' => 'bluetooth', 'logo' => 'bluetooth.png'),\n\t\t\t\t\tarray('name' => 'twitter', 'logo' => 'twitter.png')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$index = rand(0, count($questions) - 1);\n\t\t\t\n\t\t\t$this->session->set('gl_answer', $questions[$index]['name']);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t\t'originalContentUrl' => $this->image_url . $questions[$index]['logo'],\n\t\t\t\t\t\t\t'previewImageUrl' => $this->image_url . $questions[$index]['logo']\n\t\t\t\t\t\t);\n\t\t}", "title": "" }, { "docid": "131be4890aa725a2ee8268066208b463", "score": "0.4571161", "text": "public function create(string $abstract, array $parameters=[], bool $useExactClass=false);", "title": "" }, { "docid": "f0c548a709235666ab8a0a2187721a8c", "score": "0.4570053", "text": "public function __construct($fileName){\n\t\t$getXspace = new Xspace();\n\t\t$this->xpertSpace = $getXspace->parse($fileName);\n\t\t$i = 1;\n\t\tforeach ($this->xpertSpace->survey_articles->article as $article) {\n\t\t\t$this->_attInfo[(String) $article->id] =$article->attributes();\n\t\t\tforeach($article->children() as $art_item){\n\t\t\t\t$this->_articleInfo[$i][$art_item->getName()] = $art_item;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\t/* Get Read IT title */\n\t\tforeach ($this->xpertSpace->read_it as $key=>$item){\n\t\t\tif(!isset($this->_titleInfo[$item->id])){\n\t\t\t\t$this->_titleInfo[(String) $item->id] = $item->title;\n\t\t\t}\n\t\t}\n\t\t$this->_blurbText = $this->xpertSpace->blurb;\t\n\t $i=1;\n\t\tforeach ($this->xpertSpace->featured_assets as $featuredAsset) {\n\t\t\tforeach ($featuredAsset->feature as $features){\n\t\t\t\tforeach ($features->children() as $child_features){\n\t\t\t // echo $child_features->getName().\"dfhgjkshdgkj \".$child_features;\n\t\t\t \n\t\t\t $this->_featuredAssetsInfo[$i] = $features->attributes();\n\t \t $this->_featuredAssets[$i][(String) $child_features->getName()] = $child_features;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e986bfbf4c50101f5dcdc318ad2bbc37", "score": "0.45640644", "text": "public function __construct($question, $answer)\n {\n $this->question = $question;\n $this->answer = $answer;\n }", "title": "" }, { "docid": "df29030f4c4d2edede07822dfa71cb1d", "score": "0.45598003", "text": "public function setQuestion(Question $question);", "title": "" }, { "docid": "b0755661c8607c269b74ab3d3028f1cd", "score": "0.45522243", "text": "public static function get_sc_question_form_data_question_two() {\n global $USER;\n $qdata = new stdClass();\n $qdata->id = 4011;\n $qdata->createdby = $USER->id;\n $qdata->modifiedby = $USER->id;\n $qdata->qtype = 'sc';\n $qdata->name = 'SC-Question-002';\n $qdata->questiontext = array(\n \"text\" => 'Questiontext for Question 1',\n 'format' => FORMAT_HTML,\n 'itemid' => 1\n );\n $qdata->generalfeedback = array(\n \"text\" => 'This feedback is general',\n 'format' => FORMAT_HTML,\n 'itemid' => 2\n );\n $qdata->defaultmark = 1;\n $qdata->status = \\core_question\\local\\bank\\question_version_status::QUESTION_STATUS_READY;\n $qdata->length = 1;\n $qdata->penalty = 0.3333333;\n $qdata->hidden = 0;\n $qdata->scoringmethod = 'sconezero';\n $qdata->shuffleanswers = 1;\n $qdata->answernumbering = 'none';\n $qdata->numberofrows = 3;\n $qdata->correctrow = 1;\n $qdata->option_1 = array(\n 'text' => 'Option Text 1',\n 'format' => 1\n );\n $qdata->feedback_1 = array(\n 'text' => 'Feedback Text 1',\n 'format' => 1\n );\n $qdata->option_2 = array(\n 'text' => 'Option Text 2',\n 'format' => 1\n );\n $qdata->feedback_2 = array(\n 'text' => 'Feedback Text 2',\n 'format' => 1\n );\n $qdata->option_3 = array(\n 'text' => 'Option Text 3',\n 'format' => 1\n );\n $qdata->feedback_3 = array(\n 'text' => 'Feedback Text 3',\n 'format' => 1\n );\n $qdata->hint = array(\n 0 => array(\n 'text' => 'This is the 1st hint',\n 'format' => FORMAT_HTML\n ),\n 1 => array(\n 'text' => 'This is the 2nd hint',\n 'format' => FORMAT_HTML\n ),\n );\n return $qdata;\n }", "title": "" }, { "docid": "4cded6497341b271e840606561ac91f9", "score": "0.4551941", "text": "public function make_numerical_question_pi() {\n question_bank::load_question_definition_classes('numerical');\n $num = new qtype_numerical_question();\n test_question_maker::initialise_a_question($num);\n $num->name = 'Pi to two d.p.';\n $num->questiontext = 'What is pi to two d.p.?';\n $num->generalfeedback = 'Generalfeedback: 3.14 is the right answer.';\n $num->answers = array(\n 13 => new qtype_numerical_answer(13, '3.14', 1.0, 'Very good.',\n FORMAT_HTML, 0),\n 14 => new qtype_numerical_answer(14, '3.142', 0.0, 'Too accurate.',\n FORMAT_HTML, 0.005),\n 15 => new qtype_numerical_answer(15, '3.1', 0.0, 'Not accurate enough.',\n FORMAT_HTML, 0.05),\n 16 => new qtype_numerical_answer(16, '3', 0.0, 'Not accurate enough.',\n FORMAT_HTML, 0.5),\n 17 => new qtype_numerical_answer(17, '*', 0.0, 'Completely wrong.',\n FORMAT_HTML, 0),\n );\n $num->qtype = question_bank::get_qtype('numerical');\n $num->unitdisplay = qtype_numerical::UNITOPTIONAL;\n $num->unitgradingtype = 0;\n $num->unitpenalty = 0.2;\n $num->ap = new qtype_numerical_answer_processor(array());\n\n return $num;\n }", "title": "" }, { "docid": "760000956c689c0fa73f4807083c92a6", "score": "0.4550019", "text": "public function import_from_xml($xml, $fromform, qformat_xml $format, $extra=null) {\n // Return if data type is not our own one.\n if (!isset($xml['@']['type']) || $xml['@']['type'] != $this->name()) {\n return false;\n }\n\n // Import the common question headers and set the corresponding field,\n // Unfortunately we can't use the parent method because it will try to import answers,\n // and fails as formulas \"answers\" are not real answers but formulas question parts !!\n $fromform = $format->import_headers($xml);\n $fromform->qtype = $this->name();\n $format->import_combined_feedback($fromform, $xml, true);\n $format->import_hints($fromform, $xml, true);\n\n $fromform->varsrandom = $format->getpath($xml, array('#', 'varsrandom', 0, '#', 'text', 0, '#'), '', true);\n $fromform->varsglobal = $format->getpath($xml, array('#', 'varsglobal', 0, '#', 'text', 0, '#'), '', true);\n $fromform->answernumbering = $format->getpath($xml, array('#', 'answernumbering', 0, '#', 'text', 0, '#'), 'none', true);\n\n // Loop over each answer block found in the XML.\n $tags = $this->part_tags();\n $anscount = 0;\n foreach ($xml['#']['answers'] as $answer) {\n $partindex = $format->getpath($answer, array('#', 'partindex', 0 , '#' , 'text' , 0 , '#'), false);\n if ($partindex) {\n $fromform->partindex[$anscount] = $partindex;\n }\n foreach ($tags as $tag) {\n $fromform->{$tag}[$anscount] = $format->getpath(\n $answer,\n array('#', $tag, 0 , '#' , 'text' , 0 , '#'),\n '0',\n false,\n 'error'\n );\n }\n\n $subqxml = $format->getpath($answer, array('#', 'subqtext', 0), array());\n $fromform->subqtext[$anscount] = $format->import_text_with_files($subqxml,\n array(), '', $format->get_format($fromform->questiontextformat));\n\n $feedbackxml = $format->getpath($answer, array('#', 'feedback', 0), array());\n $fromform->feedback[$anscount] = $format->import_text_with_files($feedbackxml,\n array(), '', $format->get_format($fromform->questiontextformat));\n\n $feedbackxml = $format->getpath($answer, array('#', 'correctfeedback', 0), array());\n $fromform->partcorrectfb[$anscount] = $format->import_text_with_files($feedbackxml,\n array(), '', $format->get_format($fromform->questiontextformat));\n $feedbackxml = $format->getpath($answer, array('#', 'partiallycorrectfeedback', 0), array());\n $fromform->partpartiallycorrectfb[$anscount] = $format->import_text_with_files($feedbackxml,\n array(), '', $format->get_format($fromform->questiontextformat));\n $feedbackxml = $format->getpath($answer, array('#', 'incorrectfeedback', 0), array());\n $fromform->partincorrectfb[$anscount] = $format->import_text_with_files($feedbackxml,\n array(), '', $format->get_format($fromform->questiontextformat));\n ++$anscount;\n }\n $fromform->defaultmark = array_sum($fromform->answermark); // Make the defaultmark consistent if not specified.\n\n return $fromform;\n }", "title": "" }, { "docid": "7130726680138ee4d607eec24e383309", "score": "0.45428208", "text": "public function build_moodle(QtiImportSettings $settings){\n $data = $settings->get_data();\n $result = $this->create_question();\n if(isset($data->name)){\n $result->name = $data->name;\n }\n if(isset($data->questiontext)){\n $result->questiontext = $data->questiontext;\n }\n if(isset($data->generalfeedback)){\n $result->generalfeedback = $data->generalfeedback;\n }\n if(isset($data->penalty)){\n $result->penalty = $data->penalty;\n }\n if(isset($data->defaultgrade)){\n $result->defaultgrade = $data->defaultgrade;\n }\n if(isset($data->options)){\n if(isset($data->options->correctfeedback)){\n $result->correctfeedback = $this->format_text($data->options->correctfeedback);\n }\n if(isset($data->options->partiallycorrectfeedback)){\n $result->partiallycorrectfeedback = $this->format_text($data->options->partiallycorrectfeedback);\n }\n if(isset($data->options->incorrectfeedback)){\n $result->incorrectfeedback = $this->format_text($data->options->incorrectfeedback);\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "d3845c445383c6fe5f393e6bccd689c3", "score": "0.45401835", "text": "function testGetQuizOneQuestion() {\n echo 'Questions=1,Options=2,Category=2<br><br>';\n\t\t$this->getQuizHelper(1,2,2);\n\t}", "title": "" }, { "docid": "ae9788537eed5521dfc75c51f1ac9ebc", "score": "0.4530464", "text": "function construct_faq_item($faq, $find = '')\n{\n\tglobal $vbulletin, $stylevar, $ifaqcache, $faqbits, $faqlinks, $show, $vbphrase;\n\n\t$faq['text'] = trim($faq['text']);\n\tif (is_array($find))\n\t{\n\t\t$faq['title'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', \"process_highlight_faq('\\\\2', \\$find, '\\\\1', '<u>\\\\\\\\1</u>')\", $faq['title']);\n\t\t$faq['text'] = preg_replace('#(^|>)([^<]+)(?=<|$)#sUe', \"process_highlight_faq('\\\\2', \\$find, '\\\\1', '<span class=\\\"highlight\\\">\\\\\\\\1</span>')\", $faq['text']);\n\t}\n\n\t$faqsublinks = '';\n\tif (is_array($ifaqcache[\"$faq[faqname]\"]))\n\t{\n\t\tforeach($ifaqcache[\"$faq[faqname]\"] AS $subfaq)\n\t\t{\n\t\t\tif ($subfaq['displayorder'] > 0)\n\t\t\t{\n\t\t\t\teval('$faqsublinks .= \"' . fetch_template('faqbit_link') . '\";');\n\t\t\t}\n\t\t}\n\t}\n\n\t$show['faqsublinks'] = iif ($faqsublinks, true, false);\n\t$show['faqtext'] = iif ($faq['text'], true, false);\n\n\t($hook = vBulletinHook::fetch_hook('faq_item_display')) ? eval($hook) : false;\n\n\teval('$faqbits .= \"' . fetch_template('faqbit') . '\";');\n}", "title": "" }, { "docid": "4b9bbe9907324b9460a940218129b9a1", "score": "0.45302472", "text": "public function getQuestionType()\n\t{\n\t\treturn \"assFormulaQuestion\";\n\t}", "title": "" }, { "docid": "aa1750bf4ed8f9d717cd1ce6c1b41e01", "score": "0.4511088", "text": "function mainAskQuestions() {\n\t\t// if there are no questions made for the questionnaire\n\t\tif (count($this->questions) == 0) {\n\t\t\t$content = $this->pi_getLL('no_questions');\n\t\t\t//Hook to manipulate the Error-Message for no questions\n\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['pi1_noQuestions'])){\n\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['pi1_noQuestions'] as $_classRef){\n\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t\t$content = $_procObj->pi1_noQuestions($this);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->pi_wrapInBaseClass($content);\n\t\t}\n\t\t\n\t\t//if the validation is not processed correctly the former page will be shown\n\t\tif (!$this->checkValidation()) $this->piVars['page'] --;\n\n\t\t$content = '';\n\t\t$subPart = '';\n\t\t$save = true;\n\t\t$markerArray = array();\n\t\t$markerArray['###PI###'] = $this->prefixId;\n\n\t\t//check if history should be made\n\t\t$make_history = false;\n\t\tif ($this->ffdata['history'] == 1){\n\t\t\t$make_history = true;\n\t\t}\n\n\t\t//different handling for different access-types\n\t\tswitch ($this->ffdata['access']){\n\t\t\t//free access, no check needed\n\t\t\tcase 'FREE':\n\t\t\t\t//$this->ffdata['render_count_withblind'] = 1;\n\t\t\t\t$subPart = '###QUESTIONNAIRE###';\n\t\t\t\t$markerArray['###PAGES###'] = $this->getPages();\n\t\t\t\t$save = false;\n\t\t\t\tbreak;\n\t\t\t//acces only for fe_user or authcodes\n\t\t\tcase 'FE_USERS':\n\t\t\tcase 'AUTH_CODE':\n\t\t\t\t//if authcode and authcode is not valid\n\t\t\t\tif ($this->ffdata['access']=='AUTH_CODE' AND !$this->checkAuthCode()){\n\t\t\t\t\t//show the text for no authcode the input for the authcode\n\t\t\t\t\t$subPart = '###NO_AUTHCODE###';\n\t\t\t\t\t$markerArray['###FORM_ACTION###'] = htmlspecialchars($this->pi_getPageLink($GLOBALS['TSFE']->id));\n\t\t\t\t\t$markerArray['###TEXT###'] = $this->pi_getLL($this->no_authcodeKey);\n\t\t\t\t\t$markerArray['###SUBMIT_LABEL###'] = $this->pi_getLL('authcode_submit_label');\n\t\t\t\t\t$save = false;\n\t\t\t\t//if fe_user and no user logged in\n\t\t\t\t} elseif ($this->ffdata['access']=='FE_USERS' AND $this->user_id == 0){\n\t\t\t\t\t//show the text\n\t\t\t\t\t$subPart = '###ONLY_FEUSER###';\n\t\t\t\t\t$markerArray['###TEXT###'] = $this->pi_getLL('only_feuser');\n\t\t\t\t\t$save = false;\n\t\t\t\t//else there is a valid authcode or logged in user\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->user_id){\n\t\t\t\t\t\tforeach ($this->userMarker as $marker => $value){\n\t\t\t\t\t\t\t$markerArray[$marker] = $value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//check if the user has already paricipated\n\t\t\t\t\t$last_result = array();\n\t\t\t\t\tif (!$this->piVars['result_id']){\n\t\t\t\t\t\t$check_result = $this->checkResults();\n\t\t\t\t\t\tif ($this->ffdata['stop_part_solved'] == 1) $check_result['finished_count'] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t//t3lib_div::debug($check_result,'checkResults');\n\t\t\t\t\t//9.2012\n\t\t\t\t\t// Premium Addition Check for block after finish\n\t\t\t\t\tif ($this->ffdata['stop_part_solved'] == 1 AND $check_result['points_complete'] == 1){\n\t\t\t\t\t\t$subPart = 'NOMORE';\n\t\t\t\t\t\t$markerArray['###TEXT###'] = $this->pi_getLL('already_completed');\n\t\t\t\t\t\t//t3lib_div::debug($this->cObj->data['uid'],'id');\n\t\t\t\t\t\tif ($this->ffdata['cert_linkbyblock'] == 1){\n\t\t\t\t\t\t\t$link_title = $this->pi_getLL('already_completed_cert_link');\n\t\t\t\t\t\t\t$add_params = array();\n\t\t\t\t\t\t\t$add_params[$this->prefixId.'[certificate]'] = 1;\n\t\t\t\t\t\t\t$add_params[$this->prefixId.'[q_id]'] = $this->cObj->data['uid'];\n\t\t\t\t\t\t\t$add_params[$this->prefixId.'[p_id]'] = $check_result['points_complete_result'];\n\t\t\t\t\t\t\t$cert_link = $this->pi_linkToPage($link_title,\n\t\t\t\t\t\t\t\t$GLOBALS['TSFE']->id,\n\t\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t\t$add_params\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$markerArray['###TEXT###'] .= '<br>'.$this->pi_getLL('already_completed_cert').$cert_link;\n\t\t\t\t\t\t};\n\t\t\t\t\t\t$save = false;\n\t\t\t\t\t//and select the last one if there is one and not working on one\n\t\t\t\t\t} elseif ($check_result['last_result'] > 0 AND $check_result['finished_count'] < $this->ffdata['max_participations'] AND !$this->piVars['result_id']){\n\t\t\t\t\t\tif ($this->ffdata['restart_possible'] != 1){\n\t\t\t\t\t\t\t$this->getResults($check_result['last_result'],$make_history);\n\t\t\t\t\t\t\tif ($this->lastAnswered > 0) $this->getPageNr();\n\t\t\t\t\t\t\t//t3lib_div::devLog('loaded saveArray', $this->prefixId, 0, $this->saveArray);\n\t\t\t\t\t\t\t$subPart = '###QUESTIONNAIRE###';\n\t\t\t\t\t\t\t$markerArray['###PAGES###'] = $this->getPages();\n\t\t\t\t\t\t//else show the restart page\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$save = false;\n\t\t\t\t\t\t\t$subPart = '###RESUME_LAST###';\n\t\t\t\t\t\t\t$markerArray['###FORM_ACTION###'] = htmlspecialchars($this->pi_getPageLink($GLOBALS['TSFE']->id,'',array($this->prefixId.'[result_id]'=>($check_result['last_result']))));\n\t\t\t\t\t\t\t$markerArray['###TEXT###'] = $this->pi_getLL('resume_last');\n\t\t\t\t\t\t\t$markerArray['###AUTHCODE###'] = '';\n\t\t\t\t\t\t\tif ($this->piVars['auth_code']) $markerArray['###AUTHCODE###'] = '<input type=\"hidden\" name=\"'.$this->prefixId.'[auth_code]\" value=\"'.$this->piVars['auth_code'].'\" />';\n\t\t\t\t\t\t\t$markerArray['###RESUME_LABEL###'] = $this->pi_getLL('resume_label');\n\t\t\t\t\t\t\t$markerArray['###RESTART_LABEL###'] = $this->pi_getLL('restart_label');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//if the patricipation is new and the user can patricipate once more\n\t\t\t\t\t\t//then load the data and show the questionnaire\n\t\t\t\t\t\tif ($check_result['finished_count'] < $this->ffdata['max_participations']){\n\t\t\t\t\t\t\t//if the user wants to restart the result is cleared and the user completely restarts the answering\n\t\t\t\t\t\t\tif ($this->piVars['submit_type'] == 'restart') {\n\t\t\t\t\t\t\t\t$this->clearResults($this->piVars['result_id'],$make_history);\n\t\t\t\t\t\t\t//else if the user wants to resume his last position and all his given answers\n\t\t\t\t\t\t\t} elseif ($this->piVars['submit_type'] == 'resume') {\n\t\t\t\t\t\t\t\t$this->getResults($this->piVars['result_id'],$make_history);\n\t\t\t\t\t\t\t\tif ($this->lastAnswered) $this->getPageNr();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->getResults($this->piVars['result_id'],false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$subPart = '###QUESTIONNAIRE###';\n\t\t\t\t\t\t\t$markerArray['###PAGES###'] = $this->getPages();\n\t\t\t\t\t\t//else Show the page informing the user that he has already participated\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$subPart = 'NOMORE';\n\t\t\t\t\t\t\t$markerArray['###TEXT###'] = $this->pi_getLL('no_more');\n\t\t\t\t\t\t\t$save = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//t3lib_div::devLog('markerArray for PI1', $this->prefixId, 0, $markerArray);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t//Hook to include new access-types\n\t\t\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['pi1_accessType'])){\n\t\t\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['pi1_accessType'] as $_classRef){\n\t\t\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t\t\t$parts = array();\n\t\t\t\t\t\t$parts['markerArray'] = $markerArray;\n\t\t\t\t\t\t//contains: subPart, markerArray and save variable\n\t\t\t\t\t\t$parts = $_procObj->pi1_accessType($this,$parts);\n\t\t\t\t\t\t$subPart = $parts['subPart'];\n\t\t\t\t\t\t$markerArray = $parts['markerArray'];\n\t\t\t\t\t\t$save = $parts['save'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t//render the content\n\t\t$content = $this->renderContent($subPart,$markerArray);\n\n\t\t//if the save-Flag is set and it's not the first page with a description\n\t\tif ($save){\n\t\t\t//save the results\n\t\t\t$this->setResults($this->piVars['result_id']);\n\t\t}\n\n\t\t\n\t\t//Hook to do something after all\n\t\t//uherrmann, 2012-06-06, +9\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['postProcess'])){\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extKey]['postProcess'] as $_classRef){\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$hookResult = $_procObj->postProcess($this);\n\t\t\t\tif (!empty ($hookResult)) {\n\t\t\t\t\t$content = $hookResult;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if there is additional Header Data in the array\n\t\tif (is_array($this->addHeaderData)){\n\t\t\t//t3lib_div::devLog('fe js', $this->prefixId, 0, $this->addHeaderData);\n\t\t\tforeach ($this->addHeaderData as $script){\n\t\t\t\t//t3lib_div::devLog('fe js', $this->prefixId, 0, array($script));\n\t\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId] .= $script;\n\t\t\t}\n\t\t}\n\t\tif(count($GLOBALS['TSFE']->register['kequestionnaire'])) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData['keq-js-slider'] = '\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t$(document).ready(function() {' .\n\t\t\t\t\timplode(CHR(10), $GLOBALS['TSFE']->register['kequestionnaire']) . '\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t';\n\t\t}\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "title": "" }, { "docid": "a3bb33dc79635a3315608d6a7973de15", "score": "0.4507444", "text": "public function validate_instantiation($form, &$validanswers) {\n\n $errors = array();\n\n // Create a formulas question so we can use its methods for validation.\n $qo = new qtype_formulas_question;\n foreach ($form as $key => $value) {\n $qo->$key = $value;\n }\n $tags = $this->part_tags();\n\n $qo->options = new stdClass();\n $extraquestionfields = $this->extra_question_fields();\n array_shift($extraquestionfields);\n foreach ($extraquestionfields as $field) {\n if (isset($form->{$field})) {\n $qo->{$field} = $form->{$field};\n $qo->options->{$field} = $form->{$field};\n }\n }\n\n if (count($form->answer)) {\n foreach ($form->answer as $key => $answer) {\n $ans = new stdClass();\n foreach ($tags as $tag) {\n $ans->{$tag} = $form->{$tag}[$key];\n }\n $ans->subqtext = $form->subqtext[$key];\n $ans->feedback = $form->feedback[$key];\n $ans->partcorrectfb = $form->partcorrectfb[$key];\n $ans->partpartiallycorrectfb = $form->partpartiallycorrectfb[$key];\n $ans->partincorrectfb = $form->partincorrectfb[$key];\n $qo->options->answers[] = $ans;\n }\n }\n $qo->parts = array();\n if (!empty($qo->options->answers)) {\n foreach ($qo->options->answers as $i => $ans) {\n $ans->partindex = $i;\n $ans->subqtextformat = $ans->subqtext['format'];\n $ans->subqtext = $ans->subqtext['text'];\n $ans->feedbackformat = $ans->feedback['format'];\n $ans->feedback = $ans->feedback['text'];\n $ans->partcorrectfbformat = $ans->partcorrectfb['format'];\n $ans->partcorrectfb = $ans->partcorrectfb['text'];\n $ans->partpartiallycorrectfbformat = $ans->partpartiallycorrectfb['format'];\n $ans->partpartiallycorrectfb = $ans->partpartiallycorrectfb['text'];\n $ans->partincorrectfbformat = $ans->partincorrectfb['format'];\n $ans->partincorrectfb = $ans->partincorrectfb['text'];\n\n $qo->parts[$i] = new qtype_formulas_part();\n foreach ($ans as $key => $value) {\n $qo->parts[$i]->$key = $value;\n // TODO verify if part id is set (but do we actually need it here?).\n }\n }\n }\n $qo->qv = new qtype_formulas\\variables();\n $qo->options->numpart = count($qo->options->answers);\n $qo->numpart = $qo->options->numpart;\n $qo->fractions = array_fill(0, $qo->numpart, 0);\n $qo->anscorrs = array_fill(0, $qo->numpart, 0);\n $qo->unitcorrs = array_fill(0, $qo->numpart, 0);\n\n try {\n $vstack = $qo->qv->parse_random_variables($qo->varsrandom);\n $qo->randomsvars = $qo->qv->instantiate_random_variables($vstack); // Instantiate a set of random variables.\n } catch (Exception $e) {\n $errors[\"varsrandom\"] = $e->getMessage();\n return $errors;\n }\n\n try {\n $qo->globalvars = $qo->qv->evaluate_assignments($qo->randomsvars, $qo->varsglobal);\n } catch (Exception $e) {\n $errors[\"varsglobal\"] = get_string('error_validation_eval', 'qtype_formulas') . $e->getMessage();\n return $errors;\n }\n\n // Attempt to compute answers to see if they are wrong or not.\n foreach ($validanswers as $idx => $ans) {\n $ans->partindex = $idx;\n $unitcheck = new answer_unit_conversion;\n\n try {\n $unitcheck->parse_targets($ans->postunit);\n } catch (Exception $e) {\n $errors[\"postunit[$idx]\"] = get_string('error_unit', 'qtype_formulas') . $e->getMessage();\n }\n\n try {\n $unitcheck->assign_additional_rules($ans->otherrule);\n $unitcheck->reparse_all_rules();\n } catch (Exception $e) {\n $errors[\"otherrule[$idx]\"] = get_string('error_rule', 'qtype_formulas') . $e->getMessage();\n }\n\n try {\n $conversionrules = new unit_conversion_rules;\n $entry = $conversionrules->entry($ans->ruleid);\n if ($entry === null || $entry[1] === null) {\n throw new Exception(get_string('error_ruleid', 'qtype_formulas'));\n }\n $unitcheck->assign_default_rules($ans->ruleid, $entry[1]);\n $unitcheck->reparse_all_rules();\n } catch (Exception $e) {\n $errors[\"ruleid[$idx]\"] = $e->getMessage();\n }\n\n try {\n $vars = $qo->qv->evaluate_assignments($qo->globalvars, $ans->vars1);\n } catch (Exception $e) {\n $errors[\"vars1[$idx]\"] = get_string('error_validation_eval', 'qtype_formulas') . $e->getMessage();\n continue;\n }\n\n try {\n $modelanswers = $qo->get_evaluated_answer($ans);\n $cloneanswers = $modelanswers;\n // Set the number of 'coordinates' which is used to display all answer boxes.\n $ans->numbox = count($modelanswers);\n $gradingtype = $ans->answertype;\n } catch (Exception $e) {\n $errors[\"answer[$idx]\"] = $e->getMessage();\n continue;\n }\n\n try {\n $dres = $qo->compute_response_difference($vars, $modelanswers, $cloneanswers, 1, $gradingtype);\n if ($dres === null) {\n throw new Exception();\n }\n } catch (Exception $e) {\n $errors[\"answer[$idx]\"] = get_string('error_validation_eval', 'qtype_formulas') . $e->getMessage();\n continue;\n }\n\n try {\n $qo->add_special_correctness_variables($vars, $modelanswers, $cloneanswers, $dres->diff, $dres->is_number);\n $qo->qv->evaluate_assignments($vars, $ans->vars2);\n } catch (Exception $e) {\n $errors[\"vars2[$idx]\"] = get_string('error_validation_eval', 'qtype_formulas') . $e->getMessage();\n continue;\n }\n\n try {\n $responses = $qo->get_correct_responses_individually($ans);\n $correctness = $qo->grade_responses_individually($ans, $responses, $unitcheck);\n } catch (Exception $e) {\n $errors[\"correctness[$idx]\"] = get_string('error_validation_eval', 'qtype_formulas') . $e->getMessage();\n continue;\n }\n\n }\n return $errors;\n }", "title": "" }, { "docid": "36b2fc586248cc3166c251f6da8dfe6a", "score": "0.45062107", "text": "public function initQuestionAndAnswersEditForm () {\n global $tpl, $ilCtrl;\n\n $my_tpl = new ilTemplate(\"tpl.question_and_answers.html\", true, true,\n \"Customizing/global/plugins/Services/Repository/RepositoryObject/MobileQuiz\");\n $rtokenFactory = new ilCtrl();\n $my_tpl->setVariable(\"ACTION_URL\",$this->ctrl->getFormAction($this));\n $my_tpl->setVariable(\"SUBMIT_BUTTON\", $this->txt(\"save\"));\n $my_tpl->setVariable(\"NEW_QUESTION\", $this->txt(\"question_add_head\"));\n $my_tpl->setVariable(\"QUESTION\", $this->txt(\"question_add_text\"));\n $my_tpl->setVariable(\"QUESTION_TYPE\", $this->txt(\"question_add_type\"));\n $my_tpl->setVariable(\"CHOICES\", $this->txt(\"choice_add_texts\"));\n $my_tpl->setVariable(\"MINIMUM\", $this->txt(\"choice_add_numeric_minimum\"));\n $my_tpl->setVariable(\"MAXIMUM\", $this->txt(\"choice_add_numeric_maximum\"));\n $my_tpl->setVariable(\"STEP\", $this->txt(\"choice_add_numeric_steprange\"));\n $my_tpl->setVariable(\"CORRECT_VALUE\", $this->txt(\"choice_add_numeric_correctvalue\"));\n $my_tpl->setVariable(\"TOLERANCE_RANGE\", $this->txt(\"choice_add_numeric_tolerenace_range\"));\n $my_tpl->setVariable(\"VAR_1\", \"value1\");\n $my_tpl->setVariable(\"COMMAND\", \"cmd[changeQuestionAndAnswers]\");\n $my_tpl->setVariable(\"HIDE_QUESTION_TYPE\", 'style=\"display:none;\"');\n \n $my_tpl->setVariable(\"DELETE\", $this->txt(\"choice_delete\"));\n $my_tpl->setVariable(\"DELETE_INFO\", $this->txt(\"choice_delete_info\"));\n $my_tpl->setVariable(\"MOVE_UP\", $this->txt(\"choice_up\"));\n $my_tpl->setVariable(\"MOVE_UP_INFO\", $this->txt(\"choice_up_info\"));\n $my_tpl->setVariable(\"MOVE_DOWN\", $this->txt(\"choice_down\"));\n $my_tpl->setVariable(\"MOVE_DOWN_INFO\", $this->txt(\"choice_down_info\"));\n \n \n // refill fields\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n $wiz -> loadAnswerAndQuestions($_GET['question_id'],$my_tpl, $this->object);\n\n $html = $my_tpl->get();\n $tpl->setContent($html);\n\n $this->ctrl->clearParameters($this);\n }", "title": "" }, { "docid": "c46a51cb742f06e2e7ad941fd215100a", "score": "0.4502862", "text": "public function __construct() {\n $question = new qtype_preg();\n $this->engines = $question->available_engines();\n unset($this->engines['preg_php_matcher']);\n $this->engines = array_keys($this->engines);\n }", "title": "" }, { "docid": "bdc69a382d85b727f860e8b39fae215d", "score": "0.44842452", "text": "public function __construct( $title, $fileName, $type )\n {\n $this->title = $title;\n $this->fileName = $fileName;\n $this->graphDims= array('width' => 390,\n 'height' => 250,);\n\n $expected = array(\n phpucChartI::TYPE_PIE,\n phpucChartI::TYPE_LINE,\n phpucChartI::TYPE_DOT,\n phpucChartI::TYPE_TIME\n );\n\n if ( !in_array( $type, $expected ) )\n {\n throw new InvalidArgumentException( 'Invalid input type given.' );\n }\n $this->type = $type;\n }", "title": "" }, { "docid": "faeeeba3a45d4bef7a661f027de8fd2d", "score": "0.4480564", "text": "public function created(InterviewQuestion $interviewQuestion): void\n {\n //\n }", "title": "" }, { "docid": "0a2c37c4e60f3064c1f64ed7e938e68c", "score": "0.44795546", "text": "protected function question(string $question, $defaultAwnser = null): Question\n {\n return new Question($question, $defaultAwnser);\n }", "title": "" }, { "docid": "89fef094d3c8cb6342154f3825ce68ab", "score": "0.44774598", "text": "public function process_question(array $data, array $raw) {\n global $CFG;\n\n // populate the list of orders first to get their ids\n // note that the field is re-populated on restore anyway but let us\n // do our best to produce valid backup files\n $orderids = array();\n if (isset($data['orders']['order'])) {\n foreach ($data['orders']['order'] as $order) {\n $orderids[] = $order['id'];\n }\n }\n\n // convert order options\n $orderoptions = array();\n $orderoptions['id'] = $this->converter->get_nextid();\n $orderoptions['subquestions'] = implode(',', $orderids);\n\t\t$orderoptions['horizontal'] = $data['horizontal'];\n $this->write_xml('orderoptions', $orderoptions, array('/orderoptions/id'));\n\n // convert orders\n $this->xmlwriter->begin_tag('orders');\n if (isset($data['orders']['order'])) {\n foreach ($data['orders']['order'] as $order) {\n // replay the upgrade step 2009072100\n $order['questiontextformat'] = 0;\n if ($CFG->texteditors !== 'textarea' and $data['oldquestiontextformat'] == FORMAT_MOODLE) {\n $order['questiontext'] = text_to_html($order['questiontext'], false, false, true);\n $order['questiontextformat'] = FORMAT_HTML;\n\t\t\t\t\t$order['answertext'] = text_to_html($order['answertext'], false, false, true);\n $order['answertextformat'] = FORMAT_HTML;\n } else {\n $order['questiontextformat'] = $data['oldquestiontextformat'];\n\t\t\t\t\t$order['answertextformat'] = $data['oldquestiontextformat'];\n }\n\n $this->write_xml('order', $order, array('/order/id'));\n }\n }\n $this->xmlwriter->end_tag('orders');\n }", "title": "" }, { "docid": "d6a2782643ee96f16170771bb3dc241b", "score": "0.44745755", "text": "public function create()\n {\n // Crée un nouveau quiz\n $quiz = new Quiz;\n\n // Assigne le contenu du formulaire aux propriétés de l'objet\n $quiz\n ->setTitle($_POST['title'])\n ->setDescription($_POST['description'])\n ;\n\n // Sauvegarde le quiz en base de données\n $quiz->save();\n\n // Redirige vers la page \"Création\"\n header('Location: /create');\n }", "title": "" }, { "docid": "aba4edf343f5428f085f09ba25922708", "score": "0.4473618", "text": "function initializeQuestionEditForm() {\n if (!(isset($this->dialogQuestion) && is_object($this->dialogQuestion))) {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_dialog.php');\n if (@$this->params['cmd'] != 'add_question') {\n $data = $this->question;\n $hidden = array(\n 'cmd' => 'edit_question',\n 'save' => 1,\n 'group_id' => $this->params['group_id'],\n 'question_id' => $this->params['question_id']\n );\n $btnCaption = 'Edit';\n } else {\n $data = array();\n $hidden = array(\n 'cmd' => 'create_question',\n 'save' => 1,\n 'group_id' => $this->params['group_id']\n );\n $btnCaption = 'Save';\n }\n $fields = array(\n 'question_title' => array('Title', 'isNoHTML', TRUE, 'input', 250),\n 'question_text' => array('Text', 'isSomeText', FALSE, 'simplerichtext', 12),\n 'question_link' => array('Link', 'isSomeText', FALSE, 'simplerichtext', 4)\n );\n $this->dialogQuestion = new base_dialog(\n $this, $this->paramName, $fields, $data, $hidden\n );\n $this->dialogQuestion->msgs = &$this->msgs;\n $this->dialogQuestion->loadParams();\n $this->dialogQuestion->baseLink = $this->baseLink;\n $this->dialogQuestion->dialogTitle =\n papaya_strings::escapeHtmlChars($this->_gt('Properties'));\n $this->dialogQuestion->buttonTitle = $btnCaption;\n $this->dialogQuestion->dialogDoubleButtons = FALSE;\n }\n }", "title": "" }, { "docid": "52336ab7bfbe1d8cc520e6d5917e1a59", "score": "0.4472841", "text": "public function create($type=null,$item_id)\n {\n //\n }", "title": "" }, { "docid": "1b6a22a2c79c9c3a91ece2fa285f3c1f", "score": "0.44716904", "text": "public function __construct() {\n\t\t\n\t\t$this->setDate();\n\t\t\n\t\t$tide_string = fopen(\"http://www.ntslf.org/tides/tidepred?port=Rosslare\", \"r\");\n\t\t\n\t\t//$this->tidesRosslare = file_get_html(\"http://www.ntslf.org/tides/tidepred?port=Rosslare\");\n\t\t\n\t\tif(isset($tide_string) && !empty($tide_string)) {\n\t\t\t$this->assemble_tides($tide_string);\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "2ce708c9e87ac194e7b72a28400f9300", "score": "0.44709173", "text": "public static function quizFait ($courrielUtil,$idQuiz,$note) {\n self::initialiserDB();\n self::$database->query(\" INSERT INTO QuizFait (courrielUtil, idQuiz, note)\n values (:courrielUtil, :idQuiz, :note)\");\n self::$database->bind(':courrielUtil', $courrielUtil);\n self::$database->bind(':idQuiz', $idQuiz);\n self::$database->bind(':note', $note);\n self::$database->execute();\n }", "title": "" }, { "docid": "5799072c30bbc5eaec13f0583d30e3ef", "score": "0.44629368", "text": "public function insertQuestion($questioninfo)\n {\n $question = new QuestionInfo($questioninfo);\n $this->db->setQuery(\"INSERT INTO question (qtext, qweight, cid, number)\n VALUES ('$question->qtext','$question->qweight','$question->cid','$question->number')\");\n }", "title": "" }, { "docid": "89f4f3bf54fc9b856a2ab0e6cdf43b9e", "score": "0.4461834", "text": "static function &_getQuestionGUI($questiontype, $question_id = -1)\n\t{\n\t\tinclude_once \"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php\";\n\t\tif ((!$questiontype) and ($question_id > 0))\n\t\t{\n\t\t\t$questiontype = SurveyQuestion::_getQuestiontype($question_id);\n\t\t}\n\t\tSurveyQuestion::_includeClass($questiontype, 1);\n\t\t$question_type_gui = $questiontype . \"GUI\";\n\t\t$question = new $question_type_gui($question_id);\n\t\treturn $question;\n\t}", "title": "" }, { "docid": "a6851c387f346582c47f728943ed1bfa", "score": "0.4455995", "text": "public function make_multianswer_question_fourmc() {\n question_bank::load_question_definition_classes('multianswer');\n $q = new qtype_multianswer_question();\n test_question_maker::initialise_a_question($q);\n $q->name = 'Multianswer four multi-choice';\n $q->questiontext = '<p>Match the following cities with the correct state:</p>\n <ul>\n <li>San Francisco: {#1}</li>\n <li>Tucson: {#2}</li>\n <li>Los Angeles: {#3}</li>\n <li>Phoenix: {#4}</li>\n </ul>';\n $q->questiontextformat = FORMAT_HTML;\n $q->generalfeedback = '';\n $q->qtype = question_bank::get_qtype('multianswer');\n\n $q->textfragments = array('<p>Match the following cities with the correct state:</p>\n <ul>\n <li>San Francisco: ', '</li>\n <li>Tucson: ', '</li>\n <li>Los Angeles: ', '</li>\n <li>Phoenix: ', '</li>\n </ul>');\n $q->places = array('1' => '1', '2' => '2', '3' => '3', '4' => '4');\n\n $subqdata = array(\n 1 => array('qt' => '{1:MULTICHOICE:=California#OK~Arizona#Wrong}', 'California' => 'OK', 'Arizona' => 'Wrong'),\n 2 => array('qt' => '{1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}', 'California' => 'Wrong', 'Arizona' => 'OK'),\n 3 => array('qt' => '{1:MULTICHOICE:=California#OK~Arizona#Wrong}', 'California' => 'OK', 'Arizona' => 'Wrong'),\n 4 => array('qt' => '{1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}', 'California' => 'Wrong', 'Arizona' => 'OK'),\n );\n foreach ($subqdata as $i => $data) {\n // Multiple-choice subquestion.\n question_bank::load_question_definition_classes('multichoice');\n $mc = new qtype_multichoice_single_question();\n test_question_maker::initialise_a_question($mc);\n $mc->name = 'Multianswer four multi-choice';\n $mc->questiontext = $data['qt'];\n $mc->questiontextformat = FORMAT_HTML;\n $mc->generalfeedback = '';\n $mc->generalfeedbackformat = FORMAT_HTML;\n\n $mc->shuffleanswers = 0; // TODO this is a cheat to make the unit tests easier to write.\n // In reality, multianswer questions always shuffle.\n $mc->answernumbering = 'none';\n $mc->layout = qtype_multichoice_base::LAYOUT_DROPDOWN;\n\n $mc->answers = array(\n 10 * $i => new question_answer(13, 'California', (float) ($data['California'] == 'OK'),\n $data['California'], FORMAT_HTML),\n 10 * $i + 1 => new question_answer(14, 'Arizona', (float) ($data['Arizona'] == 'OK'),\n $data['Arizona'], FORMAT_HTML),\n );\n $mc->qtype = question_bank::get_qtype('multichoice');\n $mc->maxmark = 1;\n\n $q->subquestions[$i] = $mc;\n }\n\n return $q;\n }", "title": "" }, { "docid": "28c86d0caadaed0e583778b91da6be53", "score": "0.44501102", "text": "function setQuestion( &$question )\r\n {\r\n if ( is_a( $question, \"eZQuizQuestion\" ) )\r\n $this->Question = $question;\r\n }", "title": "" }, { "docid": "720c1346df704da514a43d08e2028919", "score": "0.4448995", "text": "public function run()\n {\n //\n Guide::truncate();\n Enterprise::truncate();\n Question::truncate();\n Reply::truncate();\n AppliedGuide::truncate();\n Quizzed::truncate();\n GuideType::truncate();\n GivenReply::truncate();\n\n $this->guideType('Uno');\n $this->guideType('Dos');\n $this->guideType('Tres');\n\n\n $this->createGuide( 'Guia Tipo uno', 'norma 35 engie', 1,'/guide/1' );\n\n $first_items_quide1 =[18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,\n 29, 30, 31, 32, 33];\n $second_items_guide1= [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\n 15, 16, 17, 34, 35, 36, 37, 38, 39, 40, 41,\n 42, 43, 44, 45, 46];\n\n\n\n\n $serial_first_items1= serialize($first_items_quide1);\n $serial_second_items1= serialize($second_items_guide1);\n\n\n $this->createGuide( 'Guia Tipo dos', 'norma 35 engie', 2,'/guide/2' ,\n $first_items_quide1,$second_items_guide1);\n\n\n $first_items_quide2 = [1, 4, 23, 24, 25, 26, 27, 28, 30, 31, 32,\n 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,\n 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,\n 53, 55, 56, 57];\n\n $second_items_guide2 = [2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\n 15, 16, 17, 18, 19, 20, 21, 22, 29, 54,\n 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,\n 68, 69, 70, 71, 72];\n\n\n\n\n\n\n $this->createGuide('Guia Tipo tres','norma 35 guia tipo Tres',3,'/guide/3',\n $first_items_quide2, $second_items_guide2 );\n\n\n\n\n\n /* $this->createEnterprise('Engie','coyontural', 'abc123zaq123x', 2462021212, 'liverpool libramiento', 'agricola', [1,2], 25);\n\n\n\n $this->createEnterprise('Pemex', 'coyontural','abc123zaq576x', 2462021212, 'liverpool libramiento','petroleo',[1,2],100);*/\n\n\n\n\n\n//------------------category guide type two-------------------------------------------------------------------\n\n\n $contentCategoryArray = ['amount_job', 'job_responsibility', 'job_time', 'job_decisions','job_information','job_relationships','client_attention','is_boss'];\n $this->populateCategories($contentCategoryArray, 2);\n\n\n //------------------------------ category guia type tres--------------------------\n $contentCategoryArray1 = ['environment_job', 'amount_rhythm', 'mental_effort', 'act_responsibilities',\n 'work_journey','can_decision', 'work_changes','work_training', 'contact_boss','coworker_relationships',\n 'given_information', 'violence_act','clients_attention', 'is_boss'];\n $this->populateCategories($contentCategoryArray1, 3);\n\n//------------------category guide type one-------------------------------------------------------------------\n\n $contentCategoryArray0 = ['traumatic_event', 'persistence_memories', 'endeavor_to_avoid', 'affectation'];\n $this->populateCategories($contentCategoryArray0, 1);\n\n\n\n\n//----------------------category 1 -------------------------------------------------------------------\n\n $questionsContentArray1= ['Mi trabajo me exige hacer mucho esfuerzo físico', 'Me preocupa sufrir un accidente en mi trabajo', 'Considero que las actividades que realizo son peligrosas', 'Por la cantidad de trabajo que tengo debo quedarme tiempo adicional a mi turno',\n 'Considero que es necesario mantener un ritmo de trabajo acelerado', 'Mi trabajo exige que esté muy concentrado','Mi trabajo requiere que memorice mucha información','Mi trabajo exige que atienda varios asuntos al mismo tiempo','Mi trabajo exige que atienda varios asuntos al mismo tiempo'];\n $this->populateQuestions(1,2,$questionsContentArray1, 1 );\n\n\n//-----------------------------------------category 2----------------------------------------------------------------------------\n $questionsContentArray2 = ['En mi trabajo soy responsable de cosas de mucho valor','Respondo ante mi jefe por los resultados de toda mi área de trabajo','En mi trabajo me dan órdenes contradictorias','Considero que en mi trabajo me piden hacer cosas innecesarias' ];\n $this->populateQuestions(2, 2,$questionsContentArray2, 10);\n\n\n\n//----------------------------------- category 3---------------------------------------------------------------------------\n $questionsContentArray3 = ['Trabajo horas extras más de tres veces a la semana','Mi trabajo me exige laborar en días de descanso, festivos o fines de semana','Respondo ante mi jefe por los resultados de toda mi área de trabajo','Pienso en las actividades familiares o personales cuando estoy en mi trabajo'];\n $this->populateQuestions(3,2,$questionsContentArray3, 14);\n\n\n\n//-----------------------category 4---------------------------------------------------------------------------------------------\n\n $questionsContentArray4 = ['Mi trabajo permite que desarrolle nuevas habilidades', 'En mi trabajo puedo aspirar a un mejor puesto','Durante mi jornada de trabajo puedo tomar pausas cuando las necesito','Puedo decidir la velocidad a la que realizo mis actividades en mi trabajo',\n 'Puedo cambiar el orden de las actividades que realizo en mi trabajo'];\n $this->populateQuestions(4,2, $questionsContentArray4, 18);\n\n\n//----------------------------category 5 ---------------------------------------------------------------\n\n $questionsContentArray5 = ['Me informan con claridad cuáles son mis funciones','Me explican claramente los resultados que debo obtener en mi trabajo', 'Me informan con quién puedo resolver problemas o asuntos de trabajo', 'Me permiten asistir a capacitaciones relacionadas con mi trabajo',\n 'Recibo capacitación útil para hacer mi trabajo' ];\n $this->populateQuestions(5, 2 , $questionsContentArray5, 23);\n\n\n//---------------------------------------category 6------------------------------------------------------------------------------------------\n\n $questionsContentArray6 = ['Mi jefe tiene en cuenta mis puntos de vista y opiniones', 'Mi jefe ayuda a solucionar los problemas que se presentan en el trabajo','Puedo confiar en mis compañeros de trabajo','Cuando tenemos que realizar trabajo de equipo los compañeros colaboran',\n 'Mis compañeros de trabajo me ayudan cuando tengo dificultades', 'En mi trabajo puedo expresarme libremente sin interrupciones','Recibo críticas constantes a mi persona y/o trabajo',\n 'Recibo burlas, calumnias, difamaciones, humillaciones o ridiculizaciones','Se ignora mi presencia o se me excluye de las reuniones de trabajo y en la toma de decisiones','Se manipulan las situaciones de trabajo para hacerme parecer un mal trabajador',\n 'Se ignoran mis éxitos laborales y se atribuyen a otros trabajadores', 'Me bloquean o impiden las oportunidades que tengo para obtener ascenso o mejora en mi trabajo','He presenciado actos de violencia en mi centro de trabajo'];\n $this->populateQuestions(6,2,$questionsContentArray6 , 28);\n\n\n//------------------------------------category 7-------------------------------------------------------------------------------\n $questionsContentArray7 = ['Atiendo clientes o usuarios muy enojados','Mi trabajo me exige atender personas muy necesitadas de ayuda o enfermas', 'Para hacer mi trabajo debo demostrar sentimientos distintos a los míos'];\n $this->populateQuestions(7 ,2 , $questionsContentArray7, 41);\n\n\n//------------------------------------------category 8-----------------------------------------------------------------\n $questionsContentArray8 = ['Comunican tarde los asuntos de trabajo','Dificultan el logro de los resultados del trabajo', 'Ignoran las sugerencias para mejorar su trabajo'];\n $this->populateQuestions(8,2, $questionsContentArray8, 44);\n\n\n//----------------------------------------------------category 9 start type guide tres----------------------------------------------\n\n\n//-----------------------------------category 9-----------------------------------------------------------------\n\n $questionsContent1 = ['El espacio donde trabajo me permite realizar mis\nactividades de manera segura e higiénica','Mi trabajo me exige hacer mucho esfuerzo físico','Me preocupa sufrir un accidente en mi trabajo','Considero que en mi trabajo se aplican las normas de\nseguridad y salud en el trabajo','Considero que las actividades que realizo son peligrosas'];\n\n $this->populateQuestions(9,3,$questionsContent1, 1 );\n\n//------------------------------------------------------------category 10 ---------------------------------------------------------------------------------------------\n\n $questionsContent2 = ['Por la cantidad de trabajo que tengo debo quedarmetiempo adicional a mi turno','Por la cantidad de trabajo que tengo debo trabajar sin parar', 'Considero que es necesario mantener un ritmo de trabajo\nacelerado'];\n $this->populateQuestions(10,3,$questionsContent2, 6);\n\n//---------------------------------------------------category 11----------------------------------------------------------------------------------------------------------\n\n $questionsContent3 = ['Mi trabajo exige que esté muy concentrado', 'Mi trabajo requiere que memorice mucha información','En mi trabajo tengo que tomar decisiones difíciles muy\nrápido', 'Mi trabajo exige que atienda varios asuntos al mismo tiempo'];\n $this->populateQuestions(11, 3,$questionsContent3, 9 );\n\n//------------------------------------------category 12----------------------------------------------------------------------------------------------------------------------------------------------\n $questionsContent4 = ['En mi trabajo soy responsable de cosas de mucho valor','Respondo ante mi jefe por los resultados de toda mi área de trabajo','En el trabajo me dan órdenes contradictorias', 'Considero que en mi trabajo me piden hacer cosas innecesarias'];\n $this->populateQuestions(12, 3, $questionsContent4, 13);\n\n//--------------------------------------category 13--------------------------------------------------------------\n $questionsContent5 = ['Trabajo horas extras más de tres veces a la semana','Mi trabajo me exige laborar en días de descanso,festivos o fines de semana',\n 'Considero que el tiempo en el trabajo es mucho y perjudica mis actividades familiares o personales', 'Debo atender asuntos de trabajo cuando estoy en casa', 'Pienso en las actividades familiares o personales cuando\n estoy en mi trabajo', 'Pienso que mis responsabilidades familiares afectan mi trabajo'];\n $this->populateQuestions(13, 3 , $questionsContent5, 17);\n\n// ------------------------------------------category 14 ---------------------------------------------------\n\n $questionsContent6 = ['Mi trabajo permite que desarrolle nuevas habilidades', 'En mi trabajo puedo aspirar a un mejor puesto', 'Durante mi jornada de trabajo puedo tomar pausascuando las necesito',\n 'Puedo decidir cuánto trabajo realizo durante la jornada laboral' ,'Puedo decidir la velocidad a la que realizo mis actividades en mi trabajo', 'Puedo cambiar el orden de las actividades que realizo en mi trabajo'];\n $this->populateQuestions(14 , 3,$questionsContent6, 23 );\n\n// ------------------------------------------category 15 ---------------------------------------------------------\n $questionsContent7 = ['Los cambios que se presentan en mi trabajo dificultan mi labor', 'Cuando se presentan cambios en mi trabajo se tienen en cuenta mis ideas o aportaciones'];\n $this->populateQuestions(15, 3, $questionsContent7, 29);\n\n// ------------------------------------------category 16 ---------------------------------------------------------\n\n $questionsContent8 = ['Me informan con claridad cuáles son mis funciones', 'Me explican claramente los resultados que debo obtener en mi trabajo',\n 'Me explican claramente los objetivos de mi trabajo','Me informan con quién puedo resolver problemas o asuntos de trabajo',\n 'Me permiten asistir a capacitaciones relacionadas con mi trabajo', 'Recibo capacitación útil para hacer mi trabajo'];\n $this->populateQuestions(16, 3, $questionsContent8, 31);\n\n// ------------------------------------------category 17 ---------------------------------------------------------\n\n $questionsContent9 =['Mi jefe ayuda a organizar mejor el trabajo', 'Mi jefe tiene en cuenta mis puntos de vista y opiniones', 'Mi jefe me comunica a tiempo la información relacionada con el trabajo',\n 'La orientación que me da mi jefe me ayuda a realizar mejor mi trabajo', 'Mi jefe ayuda a solucionar los problemas que se presentan en el trabajo'];\n $this->populateQuestions(17,3, $questionsContent9, 37 );\n\n// ------------------------------------------category 18 ---------------------------------------------------------\n $questionsContent10 = ['Puedo confiar en mis compañeros de trabajo', 'Entre compañeros solucionamos los problemas de trabajo de forma respetuosa',\n 'En mi trabajo me hacen sentir parte del grupo', 'Cuando tenemos que realizar trabajo de equipo los compañeros colaboran',\n 'Mis compañeros de trabajo me ayudan cuando tengo dificultades'];\n $this->populateQuestions(18, 3, $questionsContent10, 42 );\n\n// ------------------------------------------category 19 ---------------------------------------------------------\n $questionsContent11 = ['Me informan sobre lo que hago bien en mi trabajo', 'La forma como evalúan mi trabajo en mi centro de trabajo me ayuda a mejorar mi desempeño',\n 'En mi centro de trabajo me pagan a tiempo mi salario', 'El pago que recibo es el que merezco por el trabajo que realizo',\n 'Si obtengo los resultados esperados en mi trabajo me recompensan o reconocen', 'Las personas que hacen bien el trabajo pueden crecer laboralmente',\n 'Considero que mi trabajo es estable', 'En mi trabajo existe continua rotación de personal', 'Siento orgullo de laborar en este centro de trabajo',\n 'Me siento comprometido con mi trabajo'];\n $this->populateQuestions(19, 3, $questionsContent11, 47);\n\n// ------------------------------------------category 20 ---------------------------------------------------------\n\n $questionsContent12 = ['En mi trabajo puedo expresarme sin interrupciones ', 'Recibo críticas constantes a mi persona y/o trabajo' ,'Recibo burlas, calumnias, difamaciones, humillaciones o ridiculizaciones',\n 'Se ignora mi presencia o se me excluye de las reuniones de trabajo y en la toma de decisiones' , 'Se manipulan las situaciones de trabajo para hacerme parecer un mal trabajador',\n 'Se ignoran mis éxitos laborales y se atribuyen a otros trabajadores', 'Me bloquean o impiden las oportunidades que tengo para obtener ascenso o mejora en mi trabajo', 'He presenciado actos de violencia en mi centro de trabajo' ];\n $this->populateQuestions(20, 3, $questionsContent12, 57);\n\n// ------------------------------------------category 21 ---------------------------------------------------------\n\n $questionsContent13 = ['Atiendo clientes o usuarios muy enojados', 'Mi trabajo me exige atender personas muy necesitadas de ayuda o enfermas', 'Para hacer mi trabajo debo demostrar sentimientos distintos a los míos',\n 'Mi trabajo me exige atender situaciones de violencia'];\n $this->populateQuestions(21, 3, $questionsContent13, 65);\n\n\n// ------------------------------------------category 22 ---------------------------------------------------------\n\n $questionsContent14 = ['Comunican tarde los asuntos de trabajo', 'Dificultan el logro de los resultados del trabajo', 'Cooperan poco cuando se necesita',\n 'Ignoran las sugerencias para mejorar su trabajo'];\n $this->populateQuestions(22, 3, $questionsContent14, 69);\n\n// ------------------------------------------guide I category 23 ---------------------------------------------------------\n $questionsContentGuideOne1 = ['Accidente que tenga como consecuencia la muerte, la pérdida de un miembro o una lesión grave?', 'Asaltos', 'Actos violentos que derivaron en lesiones graves',\n 'Secuestro', 'Amenazas','Cualquier otro que ponga en riesgo su vida o salud, y/o la de otras personas?'];\n $this->populateQuestions(23, 1, $questionsContentGuideOne1, 1);\n//-------------------------category 24-------------------------------------------------------------------------------------\n $questionsContentGuideOne2 = ['¿Ha tenido recuerdos recurrentes sobre el acontecimiento que le provocan malestares?',\n 'Asa¿Ha tenido sueños de carácter recurrente sobre el acontecimiento, que le producen malestar?'];\n $this->populateQuestions(24, 1, $questionsContentGuideOne2, 7);\n//-------------------------category 25-------------------------------------------------------------------------------------\n\n $questionsContentGuideOne3 = ['¿Se ha esforzado por evitar todo tipo de sentimientos, conversaciones o situaciones que le puedan recordar el acontecimiento?','¿Se ha esforzado por evitar todo tipo de actividades, lugares o personas que motivan recuerdos del acontecimiento?',\n '¿Ha tenido sueños de carácter recurrente sobre el acontecimiento, que le producen malestar?','¿Ha tenido dificultad para recordar alguna parte importante del evento?', '¿Ha disminuido su interés en sus actividades cotidianas?','\n¿Se ha sentido usted alejado o distante de los demás?','¿Ha notado que tiene dificultad para expresar sus sentimientos?', '¿Ha tenido la impresión de que su vida se va a acortar, que va a morir antes que otras personas o que tiene un futuro limitado?'];\n $this->populateQuestions(25, 1, $questionsContentGuideOne3, 9);\n//-------------------------category 26-------------------------------------------------------------------------------------\n\n $questionsContentGuideOne3 = ['¿Ha tenido usted dificultades para dormir?','¿Ha estado particularmente irritable o le han dado arranques de coraje?',\n '¿Ha tenido dificultad para concentrarse?','¿Ha estado nervioso o constantemente en alerta?', '¿Se ha sobresaltado fácilmente por cualquier cosa?'];\n $this->populateQuestions(26, 1, $questionsContentGuideOne3, 14);\n\n\n//-------------------------Replies-------------------------------------------------------------------------------------\n\n\n\n\n $this->createReply('Siempre');\n $this->createReply('Casi siempre');\n $this->createReply('Algunas veces');\n $this->createReply('Casi nunca');\n $this->createReply('Nunca');\n $this->createReply('Si');\n $this->createReply('No');\n\n\n\n\n\n\n $this->createAgeRange('15-19');\n $this->createAgeRange('20-24');\n $this->createAgeRange('25-30');\n $this->createAgeRange('31-34');\n $this->createAgeRange('35-39');\n $this->createAgeRange('40-44');\n $this->createAgeRange('45-49');\n $this->createAgeRange('49-55');\n $this->createAgeRange('55-60');\n $this->createAgeRange('60-65');\n $this->createAgeRange('65-69');\n $this->createAgeRange('70 o más');\n\n $this->createStudiesLevel('Sin formación');\n $this->createStudiesLevel('Primaria terminada');\n $this->createStudiesLevel('Primaria incompleta');\n $this->createStudiesLevel('Secundaria terminada');\n $this->createStudiesLevel('Secundaria incompleta');\n $this->createStudiesLevel('Preparatoria o bachillerato terminada');\n $this->createStudiesLevel('Preparatoria o bachillerato incompleta');\n $this->createStudiesLevel('Técnico superior terminada');\n $this->createStudiesLevel('Técnico superior incompleta');\n $this->createStudiesLevel('Licenciatura terminada');\n $this->createStudiesLevel('Licenciatura incompleta');\n $this->createStudiesLevel('Maestría terminada');\n $this->createStudiesLevel('Maestría incompleta');\n $this->createStudiesLevel('Doctorado terminado');\n $this->createStudiesLevel('Doctorado incompleto');\n\n\n\n\n /* $this->createQuizzed(1,7, 3,'Sergio', 'Garcia', 'Gerente',\n 'Administrativo', 'Gerente','Soltero','Confianza',\n 'Diurno 6:00 a 20:00','Entre 1 y 4 años','Mixto','Entre 1 y 4 años');*/\n\n\n\n\n\n\n\n /*$this->createGivenReply(1,1, $first_items_quide1, $second_items_guide1,1);\n\n\n $this->createGivenReply(1,3,$first_items_quide1,$second_items_guide1,1 );\n\n\n\n $this->createGivenReply(2,4,$first_items_quide1, $second_items_guide1,1);*/\n\n }", "title": "" }, { "docid": "db83f22372d7e0ebe9d6e3a011d93da3", "score": "0.44487596", "text": "public function __construct($question, $hintkey) {\n $this->question = $question;\n $this->hintkey = $hintkey;\n // Hintkey is like <hintname>#<number>\n $this->number = substr($hintkey, strpos($hintkey, '#') + 1);\n }", "title": "" }, { "docid": "002d66783f3c64c21ebd8c5aba3707ea", "score": "0.44487146", "text": "function __construct(\n\t\t$title = \"\",\n\t\t$comment = \"\",\n\t\t$author = \"\",\n\t\t$owner = -1,\n\t\t$question = \"\"\n\t)\n\t{\n\t\tparent::__construct($title, $comment, $author, $owner, $question);\n\t\t$this->variables = array();\n\t\t$this->results = array();\n\t\t$this->units = array();\n\t\t$this->resultunits = array();\n\t\t$this->categorizedUnits = array();\n\t\t$this->plugin = null;\n\t}", "title": "" }, { "docid": "fffd98075bc84d5a0a24373269989ac2", "score": "0.44476977", "text": "public function make_multianswer_question_twosubq() {\n question_bank::load_question_definition_classes('multianswer');\n $q = new qtype_multianswer_question();\n test_question_maker::initialise_a_question($q);\n $q->name = 'Simple multianswer';\n $q->questiontext =\n 'Complete this opening line of verse: \"The {#1} and the {#2} went to sea\".';\n $q->generalfeedback = 'General feedback: It\\'s from \"The Owl and the Pussy-cat\" by Lear: ' .\n '\"The owl and the pussycat went to sea';\n $q->qtype = question_bank::get_qtype('multianswer');\n\n $q->textfragments = array(\n 'Complete this opening line of verse: \"The ',\n ' and the ',\n ' went to sea\".',\n );\n $q->places = array('1' => '1', '2' => '2');\n\n // Shortanswer subquestion.\n question_bank::load_question_definition_classes('shortanswer');\n $sa = new qtype_shortanswer_question();\n test_question_maker::initialise_a_question($sa);\n $sa->name = 'Simple multianswer';\n $sa->questiontext = '{1:SHORTANSWER:Dog#Wrong, silly!~=Owl#Well done!~*#Wrong answer}';\n $sa->questiontextformat = FORMAT_HTML;\n $sa->generalfeedback = '';\n $sa->generalfeedbackformat = FORMAT_HTML;\n $sa->usecase = true;\n $sa->answers = array(\n 13 => new question_answer(13, 'Dog', 0.0, 'Wrong, silly!', FORMAT_HTML),\n 14 => new question_answer(14, 'Owl', 1.0, 'Well done!', FORMAT_HTML),\n 15 => new question_answer(15, '*', 0.0, 'Wrong answer', FORMAT_HTML),\n );\n $sa->qtype = question_bank::get_qtype('shortanswer');\n $sa->maxmark = 1;\n\n // Multiple-choice subquestion.\n question_bank::load_question_definition_classes('multichoice');\n $mc = new qtype_multichoice_single_question();\n test_question_maker::initialise_a_question($mc);\n $mc->name = 'Simple multianswer';\n $mc->questiontext = '{1:MULTICHOICE:Bow-wow#You seem to have a dog obsessions!' .\n '~Wiggly worm#Now you are just being rediculous!~=Pussy-cat#Well done!}';\n $mc->questiontextformat = FORMAT_HTML;\n $mc->generalfeedback = '';\n $mc->generalfeedbackformat = FORMAT_HTML;\n\n $mc->shuffleanswers = 0;\n $mc->answernumbering = 'none';\n $mc->layout = qtype_multichoice_base::LAYOUT_DROPDOWN;\n\n $mc->answers = array(\n 13 => new question_answer(13, 'Bow-wow', 0,\n 'You seem to have a dog obsessions!', FORMAT_HTML),\n 14 => new question_answer(14, 'Wiggly worm', 0,\n 'Now you are just being rediculous!', FORMAT_HTML),\n 15 => new question_answer(15, 'Pussy-cat', 1,\n 'Well done!', FORMAT_HTML),\n );\n $mc->qtype = question_bank::get_qtype('multichoice');\n $mc->maxmark = 1;\n\n $q->subquestions = array(\n 1 => $sa,\n 2 => $mc,\n );\n\n return $q;\n }", "title": "" }, { "docid": "6e51e3088d3e58aa208d193dc3e94779", "score": "0.4445448", "text": "private function addQuestion() : void\n {\n $question = $this->console->ask(__('Type your question'));\n\n $this->console->info('Question successfully added ');\n\n $answer = $this->console->ask(__('Type your answer'));\n\n $this->console->info('Answer successfully added ');\n\n $this->questionRepository->create([\n 'question' => $question,\n 'valid_answer' => $answer,\n ]);\n }", "title": "" }, { "docid": "87cd2cc25eba9b9c5430fd493640a1bb", "score": "0.44453102", "text": "function importprocess($filename) {\n\n if (! $lines = $this->readdata($filename)) {\n notify(\"File could not be read, or was empty\");\n return false;\n }\n\n if (! $questions = $this->readquestions($lines)) { // Extract all the questions\n notify(\"There are no questions in this file!\");\n return false;\n }\n\n notify(\"Importing \".count($questions).\" questions\");\n\n $count = 0;\n\n foreach ($questions as $question) { // Process and store each question\n $count++;\n\n echo \"<hr /><p><b>$count</b>. \".stripslashes($question->questiontext).\"</p>\";\n\n $question->category = $this->category->id;\n $question->stamp = make_unique_id_code(); // Set the unique code (not to be changed)\n $question->version = 1; // Original version of this question\n\n if (!$question->id = insert_record(\"quiz_questions\", $question)) {\n error(\"Could not insert new question!\");\n }\n\n $this->questionids[] = $question->id;\n\n // Now to save all the answers and type-specific options\n\n global $QUIZ_QTYPES;\n $result = $QUIZ_QTYPES[$question->qtype]\n ->save_question_options($question);\n\n if (!empty($result->error)) {\n notify($result->error);\n return false;\n }\n\n if (!empty($result->notice)) {\n notify($result->notice);\n return true;\n }\n }\n return true;\n }", "title": "" }, { "docid": "ceb0f4798ae74689f2d666f79edf6367", "score": "0.4445059", "text": "public function setQuestion($question) {\r\n\t$this->question = $question;\r\n }", "title": "" }, { "docid": "b140d19a4bc70dc5f4469a54bdb4032f", "score": "0.4444649", "text": "public static function question($questions)\n {\n $choices = array();\n $answer = array();\n\n // To find the related records from question layout\n foreach ($questions as $question) {\n $choice = array();\n $related = $question->getRelatedSet('qus_QUSC');\n\n foreach ($related as $relatedField) {\n // To find and create array of correct answers\n if ($relatedField->getField('qus_QUSC::isCorrect_kqn')) {\n array_push($answer, $relatedField->getField('qus_QUSC::choiceValue_kqt'));\n }\n\n // To create the array of choices of a question\n array_push($choice, $relatedField->getField('qus_QUSC::choiceValue_kqt'));\n }\n\n // To create array of choices of all questions\n array_push($choices, $choice);\n }\n\n // return array of choices and answers of questions\n return array($choices, $answer);\n }", "title": "" }, { "docid": "eb96a4c9fe792286efebb649248a814e", "score": "0.44398445", "text": "function get_question(){\n\t$item = array(\n\t\t\t'id' => 0, \n\t\t\t'sa' => '짬뽕',\n\t\t\t'sb' => '짜장면',\n\t\t\t'pubdate' => '2015-10-10'\n\t\t);\n return $item;\n}", "title": "" } ]
c0670d7025ed6a08e0485104e105fa18
Read: returns a page with dependant child entity pages. i.e: Doctor page with Appointments and Practitioners on error: route to indexAction
[ { "docid": "228987f1a66fe4fb5de7ae452aba21fe", "score": "0.0", "text": "public abstract function profileAction();", "title": "" } ]
[ { "docid": "15308ffac97d84fa3aea36dca39312ae", "score": "0.6246209", "text": "public function indexAction ()\n {\n \t$page = new Pages_Model_Pages();\n \t$row = $page->fetchForEditByName($this->_request->pageName);\n\n \tif($this->_request->isXmlHttpRequest()) {\n \t$this->getHelper('viewRenderer')->setNoRender(true);\n \t$this->_helper->layout->disableLayout();\n \t\n\t if(isset($this->_request->pageName)) {\n\t $page = new Pages_Model_Pages();\n\t $child = $page->fetchByName($this->_request->pageName);\n\t $this->_response->setBody('<h2>' . $child->pageName . '</h2>' . $child->pageText);\n\t }\n\n\t }\n\n if($this->page->getIsAllowed())\n {\n \tif($this->acl->isAllowed( new User_Acl_Role_User(), $this->page->getResourceId(), 'admin.pages.edit.any'))\n \t{\n \t\t$this->view->allowEdit = true;\n \t}\n \t//Zend_Debug::dump($this->page);\n \t$this->view->page = array();\n \t$this->view->page['pageText'] = $this->page->getPageText();\n \t$this->view->page['pageName'] = $this->page->getPageName();\n \t$this->view->page['pageOwner'] = $this->page->getPageOwner();\n \t$this->view->page['role'] = $this->page->getRole();\n \t$this->view->page['pageId'] = $this->page->getPageId();\n \t$this->view->page['createdDate'] = $this->page->getCreatedDate();\n \t$this->view->page['modifiedDate'] = $this->page->getModifiedDate();\n \t$this->view->page['publishDate'] = $this->page->getPublishDate();\n \t$this->view->page['pageType'] = $this->page->getPageType();\n \t$this->view->page['subPages'] = $this->page->getSubPages();\n \t$this->view->page['hasSubPages'] = $this->page->getHasSubPages();\n \t$this->view->page['parentPage'] = $this->page->getParentPage();\n \t$this->view->keyWords = $this->page->getKeyWords();\n \t$this->view->page['showSlider'] = (bool) $this->page->showSlider;\n \t//Zend_Debug::dump();\n \tif (Zend_Controller_Action_HelperBroker::hasHelper($this->page->getPageType())) {\n \t\t$this->view->widget = $this->page->getPageType();\n \t}\n\n } else {\n \t//TODO: Create routes and test this redirect to error page\n \t//$this->messenger->addMessage('Access Denied');\n \tthrow new Zend_Controller_Action_Exception('Access Denied', 550);\n }\n\n }", "title": "" }, { "docid": "e0a79d846cd553abed8fec3e6f0a882b", "score": "0.6127878", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()\n ->getManager();\n\n /* Use the getAgencies function that I created in the Agency Repository\n to get all the agencies and eager load users. */ \n $agencies = $em->getRepository('BCGContactBundle:Agency')\n ->getAgencies();\n\n // Go to index page passing the agencies instance.\n return $this->render('BCGContactBundle:Page:index.html.twig', array(\n 'agencies' => $agencies\n ));\n }", "title": "" }, { "docid": "5403f8a40a66a4529420e1088671f7e6", "score": "0.61110336", "text": "public function index(){\n if(!Auth::check()){\n return redirect('login');\n }\n if(!Utility::userRolePermission(Session::get('role_id'),9)){\n return redirect('404_page');\n }\n\n $data['page'] = 'Doctor';\n\n $data['divisions'] = DB::table('address_divisions')->get();\n $data['specialities'] = DB::table('specialities')->where('status','active')->get();\n $data['classes'] = DB::table('classes')->where('status','active')->get();\n $data['special_day_types'] = DB::table('doctor_special_day_types')->where('status','active')->get();\n \treturn view('doctor.manage_doctor',$data);\n }", "title": "" }, { "docid": "271616dfe600ada99662520e0b7323aa", "score": "0.60633206", "text": "public function index(){\n if(Auth::user()->can('index',Page::class)){\n return $this->pageService->getAll();\n }else{\n abort(401);\n }\n }", "title": "" }, { "docid": "698002c15e6f6e97a68f1dcf6eb991e6", "score": "0.6048294", "text": "public function index()\n {\n if (Auth::user()->ability('superadministrator', 'read-doctors')){\n return view('doctor.read',[\n 'pageheader'=>'医生',\n 'pagedescription'=>'列表',\n 'doctors'=>Doctor::all(),\n 'enableUpdate'=>Auth::user()->hasPermission('update-doctors'),\n 'enableDelete'=>Auth::user()->hasPermission('delete-doctors'),\n ]);\n }\n return abort(403,config('yyxt.permission_deny'));\n }", "title": "" }, { "docid": "75971479981f4154a8e5d0a0b221d3b0", "score": "0.6025277", "text": "public function index()\n {\n // $arr['enfants']=Enfant::all();\n $arr['seancetraitements']=Seancetraitement::all();\n $arr['traitants']=Traitant::all();\n $arr['enfants']=Enfant::paginate(5);\n return view('pagetraitant.parentts.index')->with($arr);\n }", "title": "" }, { "docid": "2b62cec638a3bc4967a927e4d0f06a06", "score": "0.5973238", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitepage = $sitepage = Engine_Api::_()->core()->getSubject('sitepage_page');\n\n\t\t//GET CATEGORY\n $row = Engine_Api::_()->getDbTable('categories', 'sitepage')->getCategory($sitepage->category_id);\n if (!empty($row->category_name)) {\n $this->view->category_name = $row->category_name;\n }\n\n\t\t//GET SUB-CATEGORY\n $row = Engine_Api::_()->getDbTable('categories', 'sitepage')->getCategory($sitepage->subcategory_id);\n if (!empty($row->category_name)) {\n $this->view->subcategory_name = $row->category_name;\n } \n\n //GET SUB-SUB-CATEGORY\n $row = Engine_Api::_()->getDbTable('categories', 'sitepage')->getCategory($sitepage->subsubcategory_id);\n if (!empty($row->category_name)) {\n $this->view->subsubcategory_name = $row->category_name;\n }\n \n //GET TAGS\n $this->view->sitepageTags = $sitepage->tags()->getTagMaps();\n\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Sitepage/View/Helper', 'Sitepage_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($sitepage);\n }", "title": "" }, { "docid": "99f12077e3bdf9e230503f82e92e2916", "score": "0.5933118", "text": "public function indexAction()\n {\n $pm = $this->get(\"permission.manager\");\n $pm->isGrantedForbidden('ROLE_SUPER_USER',\"SITE_PERSONAS\");\n \n return $this->redirect($this->generateUrl('persona_page',array('page'=>1,'orderBy'=>'nombres','order'=>'asc'))); \n }", "title": "" }, { "docid": "7d9f919d6253afc98d1a929b07464c11", "score": "0.5892164", "text": "public function indexAction()\n {\n throw $this->createNotFoundException();\n }", "title": "" }, { "docid": "4d49981f6a8096f3b51bae1e0e2a0c89", "score": "0.5864754", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $em->getFilters()->disable('softdeleteable'); // must disable the Doctrine filter to catch and count the \"deleted\" pages\n\t $nbPagesInTrash = count($em->getRepository('PagesBundle:Page')->getTrashedPages());\n\t $pages = $em->getRepository('PagesBundle:Page')->findBy( ['deletedAt' => null] ); // only \"active\" Pages\n\n return $this->render('PagesBundle:Admin:index.html.twig', array(\n 'pages' => $pages,\n\t 'nbPagesInTrash' =>$nbPagesInTrash\n ));\n }", "title": "" }, { "docid": "284905ee77c7ebe7e7f482037ef7b536", "score": "0.5859189", "text": "public function index()\n {\n $doctors = Doctor::with(\"profile\",\"contact\")->get();\n return view(\"admin.doctor.index\",compact(\"doctors\"));\n }", "title": "" }, { "docid": "22409b3187d39070efd6ced5e1e9bc3c", "score": "0.5858309", "text": "public function index()\n {\n $patients = Patient::with([\n 'records' => function($record) {\n $record->with([\n 'patient',\n 'recordType',\n 'room',\n 'diagnoses' => function($diagnoses) {\n $diagnoses->with([\n 'diagnose'\n ]);\n },\n 'billings' => function($billing) {\n $billing->with([\n 'charge'\n ]);\n },\n ]);\n }\n ])->get();\n // return $patients;\n return view('admin.patients.index', [\n 'page' => $this->page,\n 'description' => $this->description . $this->page,\n 'patients' => $patients\n ]);\n }", "title": "" }, { "docid": "f36768242b82968fc5b2a672bf3b5d40", "score": "0.5793658", "text": "public function index()\n {\n // Get books or resources\n $booksOrResources = BookOrResource::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return BookOrResourceResource::collection($booksOrResources);\n }", "title": "" }, { "docid": "bea8c4773af2a6a879e0684013d65654", "score": "0.57907635", "text": "public function indexAction() {\n\t\t//HTTP code 500 might not good choice here.\n\t\t$this->getResponse ()->setHttpResponseCode ( 500 );\n\t\t$this->getResponse ()->appendBody ( \"no list/index allowed\" );\n\n\t}", "title": "" }, { "docid": "49671bb3e00fa9e2338cfbcd50fff303", "score": "0.5781665", "text": "public function indexAction()\n\t{\n\t\t// $this->persistent->searchParams = null;\n\t\t// $this->view->subTypes = SubTypes::find();\n\t}", "title": "" }, { "docid": "7e61ef7f0c8da94d56991de358a81470", "score": "0.57772666", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n\n if ($this->ind == true)\n {\n $metiers = $em->getRepository('MovibeBackendBundle:Metier')->showMetiers();\n }\n else\n {\n $metiers = $em->getRepository('MovibeBackendBundle:Metier')->showParents();\n }\n $pagination = $this->pagination($metiers,1000);\n\n $pages = array();\n $pages['Metiers'] = \"movibe_backend_metier\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:Metier:index.html.twig', array(\n 'metiers' => $pagination,\n ));\n }", "title": "" }, { "docid": "64e43c05bc722c90c5f7e4eab99d09fd", "score": "0.5773205", "text": "public function index()\n {\n return Accident::with('typeAccident', 'employees')->paginate(10);\n }", "title": "" }, { "docid": "2be1b05a710ba55de6098cfa91a234e3", "score": "0.576958", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('cjohnsonContentManagementSystemBundle:Page')->findAll();\n\n return $this->render('cjohnsonContentManagementSystemBundle:Page:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "5009ef16682df8220db17ea82625939b", "score": "0.57386726", "text": "public function index()\n {\n $doctors = Doctor::latest()->paginate(4);\n $notices = Post::where('category_id', Post::TYPE_NOTICE)->latest()->paginate(5);\n $focuses = Post::where('category_id', Post::TYPE_FOCUSES)->latest()->paginate(5);\n $surgicals = Post::where('category_id', Post::TYPE_SURGICAL)->latest()->paginate(5);\n $medicines = Post::where('category_id', Post::TYPE_MEDICINE)->latest()->paginate(5);\n return view('welcome', compact('notices', 'focuses','surgicals','medicines', 'doctors'));\n }", "title": "" }, { "docid": "3288ce865d517bf15692b689f35882ad", "score": "0.57357126", "text": "public function index()\n {\n if(Gate::denies('manager')){\n return redirect()->back()->with('error',\"You don't have permission\");\n }\n $paginate = (int)config('global.departments_table.paginate');\n $deps = OrgTree::paginate($paginate);\n $data = array(\n 'title' => 'Departments table',\n 'deps' => $deps\n );\n \n return view('org.index')->with($data);\n }", "title": "" }, { "docid": "2bf1a2bd26f0394c521a6010c1bf0f05", "score": "0.57346064", "text": "public function listAction()\n {\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n $this->view->page_id = $page_id = $this->_getParam('page_id');\n\n //GET PROJECT ITEM\n $this->view->sitepage = $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //IF THERE IS NO PAGE.\n if (empty($sitepage)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n Engine_Api::_()->core()->setSubject($sitepage);\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n $this->view->initiatives = $outcomes = Engine_Api::_()->getDbtable('initiatives', 'sitepage')->getAllInitiativesByPageId($page_id);\n\n }", "title": "" }, { "docid": "f2e34656c0f6bb10d996d2dbf5adf1be", "score": "0.57204753", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $referralPartners = $em->getRepository('AppBundle:ReferralPartner')->findAll();\n\n return $this->render('referralpartner/index.html.twig', array(\n 'referralPartners' => $referralPartners,\n ));\n }", "title": "" }, { "docid": "9d88e98db556a185c18f3483efb2dd01", "score": "0.57192755", "text": "public function index()\n {\n if(!Gate::allows('IsAdmin')){\n abort(404,\"Page NotFound\");\n }\n\n $data_doctor = doctor::all();\n\n return view('Doctor.doctor', compact('data_doctor'));\n }", "title": "" }, { "docid": "5e201f9eb78817caf29a278d004ca814", "score": "0.57156646", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $qb = $em->getRepository('happyCmsBundle:DoctorType')->createQueryBuilder('n');\n /**@var DoctorType[] $nurseType */\n $nurseType = $qb\n ->orderBy('n.createdDate', 'desc')\n ->getQuery()\n ->getArrayResult();\n\n return $this->render('@happyCms/NurseType/index.html.twig', array(\n 'nursetype' => $nurseType\n ));\n }", "title": "" }, { "docid": "b95e5daa30a9038c42bf730959c6a45d", "score": "0.5711742", "text": "public function index()\n {\n \treturn view('admin-panel::page.index', ['pages' => $this->CRUD->getAll() , 'dates' => $this->getDatesOfResources($this->model), 'languages' => $this->languages]);\n }", "title": "" }, { "docid": "efcb5236098833bf409a364390f1bf3c", "score": "0.56983334", "text": "public function indexAction()\n {\n return $this->goToFirstSubSection();\n }", "title": "" }, { "docid": "a392a3d2b96c2f98d89dadd62ab3f033", "score": "0.56795913", "text": "public function index()\n {\n // Set relation ship level=0, increase it for relation ship level incres\n $model = $this->_mainModel;\n $this->$model->recursive = $this->settings['recursive'];\n $this->Paginator->settings = $this->settings['Paginator'];\n $modelData = $this->Paginator->paginate($this->_mainModel);\n $this->set(array('data' => $modelData));\n }", "title": "" }, { "docid": "f2891dab54c557c82b23fb6ffb6bd462", "score": "0.56747514", "text": "public function indexAction()\n {\n \t$title= 'Mostrar Accesos';\n \t$data = array('title'=> $title);\n\t\t\n \tif ($this->acceso()) {\n \t\t//###########################################\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('AcmeLoginBundle:Logins')->findAll();\n\n return $this->render('AcmeLoginBundle:Logins:index.html.twig', array(\n 'entities' => $entities, 'title'=> $title\n ));\n\t\t//#################################################\n\t\t}else return $this->render('AcmeLoginBundle:Autentication:error.html.twig', $data);\n }", "title": "" }, { "docid": "51dc378395225bc2c421e1c5e33f45ed", "score": "0.5670296", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $pages = $em->getRepository('AppBundle:Page')->findAll();\n\n return $this->render('page/index.html.twig', array(\n 'pages' => $pages,\n ));\n }", "title": "" }, { "docid": "83b88568dabca12898117a21c3a3d2c6", "score": "0.5658335", "text": "public function index()\n {\n $designations = \\DB::table('designations')\n ->select('designation_id', 'designation_name', 'IsActive')->paginate(10);\n\n if (!Auth::user()->hasPermissionTo('Employee Management')) {\n abort('401');\n } else {\n\n // return view('employees.index',)->with('roles', $roles);\n // return response()->json($employees);\n\n return view('designations.index', compact('roles', 'designations'));\n }\n }", "title": "" }, { "docid": "a32ed162bac5feffa4d0d4d75f031e5f", "score": "0.56575155", "text": "public function index()\n {\n //\n\t\t$comp = Entity::paginate(10);\n\t\treturn view('entity.list')->with('user', $comp);\n }", "title": "" }, { "docid": "de4ba3f19e4cacdaf0eb2d1f8569bf0e", "score": "0.564848", "text": "public function index()\n {\n if (!Auth::user()->can('manage_requisition')) {\n return redirect('home')->with(denied());\n } // end permission checking\n\n if (Auth::user()->can('access_to_all_branch')){\n $requisitions = Requisition::orderBy('id', 'DESC')->paginate(20);\n }else{\n $requisitions = Requisition::where('requisition_from', auth()->user()->employee->branch_id)\n ->orWhere('requisition_to', auth()->user()->employee->branch_id)\n ->orderBy('id', 'DESC')\n ->paginate(20);\n }\n return view('backend.requisition.index',[\n 'requisitions' => $requisitions,\n 'branches' => Branch::all(),\n ]);\n }", "title": "" }, { "docid": "580824ca6f9cf172b69dea922f92ec72", "score": "0.5645799", "text": "function index()\n {\n $this->actionNotFound('index');\n }", "title": "" }, { "docid": "6df93319ccece225ead3ff3f0bd7b127", "score": "0.56422925", "text": "public function index()\n {\n $deps = PhongBan::paginate(2); \n // $emps->withPath(route('PhongBan::PhongBan.index'));\n $deps->withPath(url('phongban/index'));\n // $emps = PhongBan::all();\n // return $emps;\n return view('phongban::index', compact('deps'));\n }", "title": "" }, { "docid": "ad10cfcf90f24b0efb0b76b1ff8c6208", "score": "0.5641584", "text": "public function index()\n {\n $experts = Experts::paginate(12);\n return view('admin.experts.index',compact('experts'));\n }", "title": "" }, { "docid": "a5ed656282dfe5f00e892d787667a0eb", "score": "0.56414443", "text": "public function index()\n {\n $doctors = Doctor::paginate(10);\n return view('pages.doctor.index', compact('doctors'));\n }", "title": "" }, { "docid": "1bdad8d8df606e14814af573e023e678", "score": "0.5640717", "text": "public function indexAction() {\n\t\tif (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n $subject = Engine_Api::_()->core()->getSubject();\n $this->view->resource_id = $subject->getIdentity();\n $this->view->resource_type = $subject->getType(); \n\n\t\t//GET VIEWER\n\t\t$this->view->viewer_id = $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\n\n\t\t//DONT RENDER IF NOT AUTHORIZED\n\t\tif (empty($viewer_id)) {\n\t\t\treturn $this->setNoRender();\n }\n }", "title": "" }, { "docid": "ab3d659693dafeabc4092ea94f5f070f", "score": "0.56392884", "text": "public function index()\n {\n $exs=Examination::with('doctor','patient')->get();\n return view('examination.list',compact('exs'));\n }", "title": "" }, { "docid": "e39c2de7755cd4b5870c82bd717bd3b4", "score": "0.5638064", "text": "public function index()\n {\n abort_if(Gate::denies('child_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n $children = Children::all();\n\n return view('admin.children.index', compact('children'));\n }", "title": "" }, { "docid": "b680779b144824ea4182757ae311216c", "score": "0.5637688", "text": "public function index()\n {\n return Employee::professional()->paginate();\n }", "title": "" }, { "docid": "2960ffaed962f244775b2a022d0ef288", "score": "0.5635309", "text": "public function indexAction()\n {\n /*$em = $this->getDoctrine()->getManager();\n\n $childrenOfOtoeos = $em->getRepository('ApplicationBundle:ChildrenOfOtoeos')->findAll();*/\n $result = get_all_childrenOfOtoeos();\n $childrenOfOtoeos = array();\n while ($row = mysqli_fetch_assoc($result)) {\n array_push ($childrenOfOtoeos, $row);\n }\n\n return $this->render('childrenofotoeos/index.html.twig', array(\n 'childrenOfOtoeos' => $childrenOfOtoeos,\n ));\n }", "title": "" }, { "docid": "3ce6d8d8a0b56ce2cee5f7f73fd3243d", "score": "0.5631965", "text": "public function pagesAction() : object\n {\n $page = $this->app->page;\n $title = \"View pages of contents\";\n $sql = <<<EOD\nSELECT\n *,\n CASE\n WHEN (deleted <= NOW()) THEN \"isDeleted\"\n WHEN (published <= NOW()) THEN \"isPublished\"\n ELSE \"notPublished\"\n END AS status\nFROM content\nWHERE type=?\n;\nEOD;\n $resultset = $this->db->executeFetchAll($sql, [\"page\"]);\n // $page->add(\"cms/header\");\n $page->add(\"cms/pages\", [\"resultset\" => $resultset, ]);\n return $page->render([\"title\" => $title, ]);\n }", "title": "" }, { "docid": "76c8f7024f749fa0abcdc53754b87c7f", "score": "0.56293994", "text": "protected function listAction()\n {\n $currentEntityName = $this->entity['name'];\n\n if (in_array('ROLE_EDUCATEUR', $this->getUser()->getRoles())) {\n if ('Maisonnee' == $currentEntityName\n || 'Personnel' == $currentEntityName\n || 'Residents_passes' == $currentEntityName\n || 'Soin' == $currentEntityName) {\n return $this->redirectToBackendHomepage();\n }\n }\n\n if (in_array('ROLE_SOIGNANT', $this->getUser()->getRoles())) {\n if ('Maisonnee' == $currentEntityName\n || 'Personnel' == $currentEntityName\n || 'Residents_actuels' == $currentEntityName\n || 'Residents_passes' == $currentEntityName) {\n return $this->redirectToBackendHomepage();\n }\n }\n\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n try {\n /** @var ResidentRepository $residentRepo */\n $residentRepo = $this->getDoctrine()->getManager()->getRepository('\\App\\Entity\\Resident');\n $residentList = $residentRepo->getListActive();\n } catch (\\Exception $e) {\n $residentList = null;\n }\n\n try {\n /** @var UserRepository $userRepo */\n $userRepo = $this->getDoctrine()->getManager()->getRepository('\\App\\Entity\\User');\n $userList = $userRepo->getListActive();\n\n } catch (\\Exception $e) {\n $userList = null;\n }\n\n try {\n /** @var MaisonneeRepository $maisonneeRepo */\n $maisonneeRepo = $this->getDoctrine()->getManager()->getRepository('\\App\\Entity\\Maisonnee');\n $maisonneeList = $maisonneeRepo->getList();\n } catch (\\Exception $e) {\n $maisonneeList = null;\n }\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n return $this->render($this->entity['templates']['list'], array(\n 'maisonneeList' => $maisonneeList,\n 'userList' => $userList,\n 'residentList' => $residentList,\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }", "title": "" }, { "docid": "38202bdb66eada721f3300cc8b74bf3c", "score": "0.56252724", "text": "public function indexAction() {\n \n // SET NO RENDER IF NO SUBJECT\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n \n // GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n \n //GET SUBJECT\n $this->view->sitepage_subject = $sitepage_subject = Engine_Api::_()->core()->getSubject('sitepage_page');\n\n //GET PAGE ID\n $page_id = $sitepage_subject->page_id;\n\n //PACKAGE BASE PRIYACY START\n if (Engine_Api::_()->sitepage()->hasPackageEnable()) {\n if (!Engine_Api::_()->sitepage()->allowPackageContent($sitepage_subject->package_id, \"modules\", \"sitepageevent\")) {\n return $this->setNoRender();\n }\n } else {\n $isPageOwnerAllow = Engine_Api::_()->sitepage()->isPageOwnerAllow($sitepage_subject, 'secreate');\n if (empty($isPageOwnerAllow)) {\n return $this->setNoRender();\n }\n }\n //PACKAGE BASE PRIYACY END\n \n //TOTAL EVENT\n $this->view->eventCount = Engine_Api::_()->sitepage()->getTotalCount($page_id, 'sitepageevent', 'events'); \n $eventCreate = Engine_Api::_()->sitepage()->isManageAdmin($sitepage_subject, 'secreate');\n \n //START MANAGE-ADMIN CHECK\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage_subject, 'view');\n if (empty($isManageAdmin)) {\n return $this->setNoRender();\n }\n\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage_subject, 'edit');\n if (empty($isManageAdmin)) {\n $this->view->can_edit = $can_edit = 0;\n } else {\n $this->view->can_edit = $can_edit = 1;\n }\n\n if (empty($eventCreate) && empty($this->view->eventCount) && empty($can_edit) && !(Engine_Api::_()->sitepage()->showTabsWithoutContent())) {\n return $this->setNoRender();\n } \n //END MANAGE-ADMIN CHECK\n \n //GET VIEWER INFORMATION\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n $get_event = Engine_Api::_()->getItemTable('sitepageevent_event')->getEventUserType();\n if (empty($get_event)) {\n return $this->setNoRender();\n }\n\n $this->view->allowView = false;\n if (!empty($viewer_id) && $viewer->level_id == 1) {\n $auth = Engine_Api::_()->authorization()->context;\n $this->view->allowView = true;\n } \n\n //GET LAYOUT\n $layout = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.layoutcreate', 0);\n\n //GET THE THIRD TYPE LAYOUT\n $this->view->widgets = $widgets = Engine_Api::_()->sitepage()->getwidget($layout, $page_id);\n\n //GET THE CURRENT TAB ID\n $this->view->content_id = Engine_Api::_()->sitepage()->GetTabIdinfo('sitepageevent.profile-sitepageevents', $page_id, $layout);\n $sitepageevent_profilePageType = Zend_Registry::isRegistered('sitepageevent_profilePageType') ? Zend_Registry::get('sitepageevent_profilePageType') : null;\n if (empty($sitepageevent_profilePageType)) {\n return $this->setNoRender();\n }\n \n //WHICH LINK HAS BEEN CLICKED\n $this->view->clicked = $clicked = $this->_getParam('clicked_event', 'upcomingevent');\n\n //REQUEST TYPE IS AJAX OR NOT\n $this->view->isajax = $isajax = $this->_getParam('isajax', null);\n\n //GET THE TAB ID\n $this->view->module_tabid = $currenttabid = Zend_Controller_Front::getInstance()->getRequest()->getParam('tab', null);\n $this->view->getIsEvent = Engine_Api::_()->sitepage()->getPackageAuthInfo('sitepageevent');\n\n //SHOWING THE TOP TITLE IN CASE OF NON TABBED LAYOUT\n $this->view->showtoptitle = $showtoptitle = Engine_Api::_()->sitepage()->showtoptitle($layout, $page_id);\n\n //SHOWING THE EVENTS\n if (!empty($isajax) || ($currenttabid == $this->view->identity) || ($widgets == 0)) {\n //GET THE TAB ID\n $this->view->identity_temp = Zend_Controller_Front::getInstance()->getRequest()->getParam('identity_temp', $currenttabid);\n $this->view->show_content = true;\n\n //GET SEARCHING PARAMETERS\n $this->view->page = $page = $this->_getParam('page', 1);\n $this->view->search = $search = $this->_getParam('search');\n $this->view->selectbox = $selectbox = $this->_getParam('selectbox');\n $this->view->checkbox = $checkbox = $this->_getParam('checkbox');\n\n //MAKING THE SEACHING PARAMATER ARRAY\n $values = array();\n if (!empty($search)) {\n $values['search'] = $search;\n }\n\n if ($clicked == 'upcomingevent') {\n if ($selectbox == 'allmyevent' || $selectbox == 'eventilead') {\n if (empty($values['orderby'])) {\n $values['orderby'] = 'starttime';\n $selectbox = 'starttime';\n } else {\n $values['orderby'] = $selectbox;\n }\n }\n $values['orderby'] = $selectbox;\n $values['clicked'] = $clicked;\n $params['selectedbox'] = '';\n } else if ($clicked == 'pastevent') {\n $values['clicked'] = $clicked;\n $values['orderby'] = 'endtime';\n $params['selectedbox'] = '';\n } else if ($clicked == 'myevent') {\n $values['selectedbox'] = 'allmyevent';\n if ($selectbox == 'allmyevent') {\n $values['selectedbox'] = $selectbox;\n } elseif ($selectbox == 'eventilead') {\n $values['selectedbox'] = $selectbox;\n $values['user_id'] = $viewer_id;\n }\n }\n\n if (empty($selectbox)) {\n $values['orderby'] = 'starttime';\n }\n\n //START MANAGE-ADMIN CHECK\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage_subject, 'secreate');\n if (empty($isManageAdmin) && empty($can_edit)) {\n $this->view->can_create = 0;\n } else {\n $this->view->can_create = 1;\n }\n //END MANAGE-ADMIN CHECK\n \n $values['page_id'] = $page_id;\n if ($can_edit) {\n $values['show_event'] = 0;\n $this->view->paginator = $paginator = Engine_Api::_()->getDbTable('events', 'sitepageevent')->getSitepageeventsPaginator($values);\n } else {\n $values['show_event'] = 1;\n $values['event_owner_id'] = $viewer_id;\n $this->view->paginator = $paginator = Engine_Api::_()->getDbTable('events', 'sitepageevent')->getSitepageeventsPaginator($values);\n }\n\n //EVENTS PER PAGE\n $paginator->setItemCountPerPage(10);\n $this->view->paginator->setCurrentPageNumber($page);\n\n //ADD COUNT TO TITLE IF CONFIGURED\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n\n // MAKE PAGINATOR\n $currentPageNumber = $this->_getParam('page', 1);\n $this->view->paginator = $paginator = Engine_Api::_()->getDbTable('events', 'sitepageevent')->getSitepageeventsPaginator($values);\n\n $this->view->myeventmessage = 0;\n $this->view->pastmessage = 0;\n $this->view->upcomingmessage = 0;\n \n if ($paginator->getTotalItemCount() == 0) {\n if ($clicked == 'myevent' && empty($search)) {\n $this->view->selectbox = '';\n $this->view->myeventmessage = 1;\n } elseif ($clicked == 'pastevent' && empty($search)) {\n $this->view->selectbox = '';\n $this->view->pastmessage = 1;\n } elseif ($clicked == 'upcomingevent' && empty($search)) {\n $this->view->selectbox = '';\n $this->view->upcomingmessage = 1;\n }\n }\n $paginator->setItemCountPerPage(10)->setCurrentPageNumber($currentPageNumber);\n } else {\n $this->view->show_content = false;\n $title_count = $this->_getParam('titleCount', false);\n $this->view->identity_temp = $this->view->identity;\n\n $values = array();\n $values['orderby'] = 'starttime';\n $values['page_id'] = $page_id;\n $values['show_count'] = 1;\n if ($can_edit) {\n $values['show_event'] = 0;\n $paginator = Engine_Api::_()->getDbTable('events', 'sitepageevent')->getSitepageeventsPaginator($values);\n } else {\n $values['show_event'] = 1;\n $values['event_owner_id'] = $viewer_id;\n $paginator = Engine_Api::_()->getDbTable('events', 'sitepageevent')->getSitepageeventsPaginator($values);\n }\n }\n $this->_childCount = $paginator->getTotalItemCount();\n \n // If we cannot find clicked_event param, set page load calendar.\n $real_clicked_event = $this->_getParam('clicked_event', null);\n $this->view->isCalendar = $calendar = $this->_getParam('calendar') || empty($real_clicked_event);\n }", "title": "" }, { "docid": "18d4e30914e10aab1feddebffeee6051", "score": "0.5617906", "text": "public function pagesActionGet() : object\n {\n $title = \"View pages\";\n\n // Get data from database\n $res = $this->pageHandler->fetchAll($this->app->db);\n\n // Add view\n $data = [\n \"res\" => $res,\n ];\n $this->app->page->add(\"content/edit-header\");\n $this->app->page->add(\"content/pages\", $data);\n\n // Render view\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "ff52fd8028afed2b61b02448c2f7e10e", "score": "0.56094044", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $expertises = $em->getRepository('AdvertBundle:Expertise')->findAll();\n\n return $this->render('expertise/index.html.twig', array(\n 'expertises' => $expertises,\n ));\n }", "title": "" }, { "docid": "93b37490ecec690975d11d07ca1cf2e9", "score": "0.56053936", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $route = $this->getRefererRoute();\n $filmId = preg_replace(\"/\\D/\",'', $route);\n\n $posts = $em->getRepository('FrontendBundle:Post')->findByFilmId($filmId);\n\n $tab = [];\n\n foreach ($posts as $post)\n {\n $userid = $em->getRepository('AppBundle:User')->findOneById($post->getAuthor());\n\n $tab[] = array(\n 'username' => $userid->getUsername(),\n 'content' => $post->getContent(),\n 'date' => $post->getDate(), \n );\n }\n\n return $this->render('post/index.html.twig', array(\n 'posts' => $posts,\n 'tab'=> $tab,\n ));\n }", "title": "" }, { "docid": "4a33927f803227dc8d06ab5c7ff45b84", "score": "0.56052953", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $em = $this->getDoctrine()\n ->getRepository('ReclamationBundle:CatReclamation');\n $re = $em->findAll();\n\n\n return $this->render('@Reclamation/CatReclamation/index.html.twig', array(\n 'res' => $re,\n ));\n }", "title": "" }, { "docid": "9c9bf6cc109971a5174c2a6078f26769", "score": "0.56042653", "text": "public function actionIndex()\n {\n\t\tif(Yii::$app->user->can('admin')){\n\t\t\t$searchModel = new AuthItemChildSearch();\n\t\t\t$dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n\t\t\treturn $this->render('index', [\n\t\t\t\t'searchModel' => $searchModel,\n\t\t\t\t'dataProvider' => $dataProvider,\n\t\t\t]);\n\t\t}\n\t\telse{\n\t\t\tthrow new HttpException(403, 'Nao tem permissao para executar esta accao'); \n\t\t}\n \n }", "title": "" }, { "docid": "757889142314f98dfede3cdc99db6e4d", "score": "0.5602593", "text": "public function detailsAction()\n {\n require('./model/modelManager.php');\n\n // Call the getAnimalDetail() and getAnimalWeight() function to get animal's details\n $modelManager = new modelManager();\n $req = $modelManager->getAnimalDetail($_GET['idAnimal']);\n $wei = $modelManager->getAnimalWeight($_GET['idAnimal']);\n $data = $req->fetch(PDO::FETCH_ASSOC);\n\n // Test if the user's foreign key is the same that the user's id connected. If it is, require the animal's details page\n if ($data['fkIdUser'] == $_SESSION['idAuth']) {\n require('./view/detailsAnimal.php');\n }else {\n\n //Else throw Exception\n throw new \\Exception(\"Vous n'avez pas les droits d'accèder à cette page\");\n }\n }", "title": "" }, { "docid": "a765849a2f3b521b6554222f279842d1", "score": "0.56003433", "text": "public function index()\n {\n// For Resources to work, pagination is a must\n $count = Article::all() -> count();\n $articless = Article::paginate($count);\n\n// return ArticleResource::collection($articles);\n $articles = ArticleResource::collection($articless);\n return view('articles.index', compact('articles'));\n }", "title": "" }, { "docid": "bf9d7236fa8da396afa428d6366ad747", "score": "0.5599541", "text": "public function show() {\n // without an id we just redirect to the error page as we need the post id to find it in the database\n if (!isset($_GET['id']))\n return call('pages', 'error');\n\n // we use the given id to get the right post\n $employees = Employee::find($_GET['id']);\n require_once('views/employees/show.php');\n }", "title": "" }, { "docid": "4a8ab392ce3a5bd7e073db86d9e37ba1", "score": "0.55989456", "text": "public function indexAction()\n\t{\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Les émissions');\n $breadcrumbs->addItem('Les émissions de A à Z');\n\n if (!empty($_GET['emission'])) {\n $this->redirect($_GET['emission']);\n }\n $em = $this->getDoctrine()->getManager();\n\n $query = $this\n ->getDoctrine()\n ->getRepository('ProgramBundle:Emission')\n ->createQueryBuilder('e')\n ->where('e.published = 1')\n ->orderBy('e.name', 'ASC')\n ;\n\n if (!empty($_GET['theme'])) {\n $query = $query\n ->andWhere('e.collection = :theme')\n ->setParameter('theme', $_GET['theme'])\n ;\n }\n if (!empty($_GET['frequency'])) {\n $query = $query\n ->andWhere('e.frequency = :frequency')\n ->setParameter('frequency', $_GET['frequency'])\n ;\n }\n if (!empty($_GET['archive'])) {\n $query = $query\n ->andWhere('e.archive = :archive')\n ->setParameter('archive', $_GET['archive'])\n ;\n } else{\n $query = $query->andWhere('e.archive = 0');\n }\n\n $query = $query->getQuery();\n\n $paginator = $this->get('knp_paginator');\n\n $entities = $paginator->paginate(\n $query,\n $this->get('request')->query->get('page', 1),\n 6\n );\n\n\t\t$themes = $this\n ->getDoctrine()\n ->getRepository('ApplicationSonataClassificationBundle:Collection')\n ->createQueryBuilder('c')\n ->where('c.context = :context')\n ->setParameter('context', 'emission')\n ->getQuery()\n ->getResult()\n ;\n\n $emissions = $this\n ->getDoctrine()\n ->getRepository('ProgramBundle:Emission')\n ->createQueryBuilder('e')\n ->where('e.published = 1')\n ->andWhere('e.archive = 0')\n ->orderBy('e.name', 'ASC')\n ->getQuery()\n ->getResult()\n ;\n\n $frequencies = $this\n ->getDoctrine()\n ->getRepository('ProgramBundle:EmissionFrequency')\n ->findAll()\n ;\n\n\t\treturn $this->render('ProgramBundle:Emission:index.html.twig', compact('entities', 'emissions', 'frequencies', 'themes'));\n\t}", "title": "" }, { "docid": "d3937851ebe98fad2846dcb97400cfd1", "score": "0.5596713", "text": "public function index()\n {\n $limit = Input::get('limit') ?: 3;\n $securityquestions = SecurityQuestion::paginate($limit);\n\n if( ! $securityquestions->count() > 0)\n {\n return $this->respondNoRecord();\n }\n\n return $this->respondWithPaginator($securityquestions,[\n 'data' => $this->transformWithPaginate($securityquestions)\n ]);\n }", "title": "" }, { "docid": "4f9b28045987fb6b0ea54b55a3b38fa2", "score": "0.5591599", "text": "public function index()\n {\n //\n return view('relationship.index');\n }", "title": "" }, { "docid": "de6abddc6ff8899fbf9d928f85487ba7", "score": "0.5582544", "text": "public function index()\n {\n\n return PersonResource::collection(Person::latest()->paginate(10));\n\n }", "title": "" }, { "docid": "4910e78bbcfd974a8c89b40b374fadfc", "score": "0.5581476", "text": "public function index()\n {\n //\n if(!\\Auth::user()->can('read_page'))\n {\n abort('403', 'Hak Akses Tidak Diijinkan');\n }\n $page = new Pages();\n\n $datapage = $page->search()\n ->paginate(config('app.setting.backend.no_of_records'));\n $rank = $datapage->firstItem();\n return view('admin::page.index', compact('datapage','rank'));\n }", "title": "" }, { "docid": "68055aa7b251828217379d4c481bfa1a", "score": "0.5580977", "text": "public function index()\n {\n $title = \"Dependentes\";\n $funcionarios = Funcionario::all();\n $dependentes = Dependente::all();\n return response()->view('dependente.dependente', compact('dependentes','funcionarios','title'));\n }", "title": "" }, { "docid": "bac68ace063be2a41774642b79bbe295", "score": "0.5578045", "text": "public function index()\n {\n //$this->authorize('viewAny', Lead::class);\n\n $user = Auth::user();\n\n if ($user->isHeadOffice()){\n\n $leads = $this->leadRepository->getAllLeads($this->getRequestParams());\n\n return $this->showPaginated($leads);\n }\n\n $franchiseIds = $user->franchises->pluck('id')->toArray();\n\n $leads = $this->leadRepository->findLeadsByUsersFranchise($franchiseIds, $this->getRequestParams());\n\n// dd($leads);\n\n return $this->showPaginated($leads);\n\n }", "title": "" }, { "docid": "248a3ad976b232ac717ef9091ba2ace9", "score": "0.5576982", "text": "public function index()\r\n {\r\n $this->paginate();\r\n \r\n }", "title": "" }, { "docid": "afd06f4a772f9fb18c2b0ddb5ee8a4c6", "score": "0.5570819", "text": "public function index()\n {\n\t\t\t\tif (Auth::user()->hasPermission('patient_index')){\n\t\t\t\t\t$patients = DB::table('patients')->get();\n\t\t\t\t\treturn view('patient.index', ['patients' => $patients]);\n\t\t\t\t} else {\n\t\t\t\t\treturn view('home');\n\t\t\t\t}\n }", "title": "" }, { "docid": "a58e735ecbf7a537d1cd088ae2c5abb9", "score": "0.5569972", "text": "public function indexAction() {\n// $this->view->entries = $patient->fetchAll();\n }", "title": "" }, { "docid": "5c508b9824ce6855de29bc4d362cb479", "score": "0.5566954", "text": "public function actionIndex() {\n $this->canUser();\n $dataProvider = new ActiveDataProvider([\n 'query' => Page::find(),\n ]);\n Yii::$app->session->setFlash('page', !empty($_GET['page']) ? $_GET['page'] : NULL);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "39204acd492bf4d38d71bb26ac409c0e", "score": "0.55623376", "text": "public function index()\n {\n if (Gate::allows('admin', Auth::user())){\n $manager = manager::paginate(5);\n return view(\"admin.manager.index\", array('model' => $manager));\n }else{\n return view(\"../404\");\n }\n }", "title": "" }, { "docid": "8f139675c01548439910bee134447fb0", "score": "0.5560665", "text": "public function indexAction()\n\t{\n $viewData = [\n 'tables' => $this->model->getAdminLookupTables(),\n 'pageTitle' => $this->pageTitle\n ];\n\n return $this->makeView('admin.crud.crud', $viewData);\n\t}", "title": "" }, { "docid": "d318422367c231cdaf56458763a3a8fe", "score": "0.55599767", "text": "public function index()\n {\n $careers = Career::with(['division'])->paginate(10);\n return view('careers.careerIndex', compact('careers'));\n }", "title": "" }, { "docid": "96c7ff17750199a80203a8b3ed4e4c41", "score": "0.55515057", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist($total, $redirects) = Browser_Service_Redirect::getList($page, $perpage);\n\t\t\n\t\t$this->assign('redirects', $redirects);\n\t\t$this->assign('sorts', $this->sorts);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t}", "title": "" }, { "docid": "05d9c0f06d9fee0ba57ef02e5707d785", "score": "0.55456406", "text": "public function indexAction()\n {\n if ($this->getUser()->getRolePersona() != \"ROLE_ADMIN\") {\n return $this->redirectToRoute('homepage');\n }else{\n $em = $this->getDoctrine()->getManager();\n\n $empresas = $em->getRepository('AppBundle:Empresa')->findAll();\n\n return $this->render('AppBundle:empresa:index.html.twig', array(\n 'empresas' => $empresas,\n ));\n }\n }", "title": "" }, { "docid": "6ed87948854f0d260ed9bc5a998b2974", "score": "0.55444837", "text": "public function index()\n {\n request()->validate([\n 'id' => ['nullable', 'exists:tenant.deals,id'],\n 'user_id' => ['nullable', 'exists:tenant.users,id'],\n 'customer' => ['json', new KeysMatchFields(new Customer())],\n 'trade' => ['json', new KeysMatchFields(new Trade())],\n 'unit' => ['json', new KeysMatchFields(new Unit())],\n ]);\n\n try {\n return response()->json(Deal::canGetAll()->filter()->orderBy('created_at', 'desc')->paginate(20), 201);\n } catch (\\Exception $e) {\n return response()->json(['error' => $e->getMessage()], 422);\n }\n }", "title": "" }, { "docid": "abe99731b6ad2a2b54d77065748ca96e", "score": "0.55440915", "text": "function getAction() {\n\n // Query the database for the resource, depending upon parameters\n // First - Validate GET parameters\n $pageId = $this->validateIntParameter('id');\n $conn = $this->pageViewReference->getSQLConn();\n\n // Acquire the user id if this is an authenticated request.\n $userId = $this->authenticateUser() ?? 0;\n // Build the query\n $sql = <<<SQL\n SELECT\n p.page_id\n ,phb.page_id AS ancestor_page_id\n ,pathname\n ,page_title\n ,page_link_text\n ,pagebuilder_class\n ,pageview_class\n ,p.created_dt\n ,p.modified_dt\n ,redirect_on_error\n ,published\n FROM pages p\n -- join to PHB is to get the parent page ID\n LEFT JOIN page_hierarchy_bridge phb ON p.page_id = phb.descendant_page_id\n LEFT JOIN page_user_access pua ON p.page_id = pua.page_id AND (pua.user_id = :userId)\n LEFT JOIN users u ON u.user_id = :userId\n WHERE\n (p.page_id = :pageId OR :pageId IS NULL)\n AND\n (\n (p.published = 1 AND p.deleted IS NULL)\n OR\n pua.user_id IS NOT NULL\n OR\n u.is_admin = TRUE\n )\n ORDER BY p.page_id ASC\n\nSQL;\n // if the id parameter is 0, it's bogus. Only query if it's null or >= 1.\n $result = null;\n if ($pageId !== 0) {\n $stmt = $conn->prepare($sql);\n $sqlParams = array('userId' => $userId, 'pageId' => $pageId);\n $stmt->execute($sqlParams);\n $result = $stmt->fetchAll();\n }\n\n // Process the response\n if (count($result) > 0) {\n foreach ($result as $row)\n $this->resourceData[$row[0]] = array(\n 'url' => $this->resourceUrl . '?id=' . strval($row['page_id'])\n ,'pageUri' => GrabPageURL::getURL($row['page_id'], $conn)\n ,'ancestorPageId' => intval($row['ancestor_page_id'])\n ,'pathName' => $row['pathname']\n ,'pageTitle' => $row['page_title']\n ,'pageLinkText' => $row['page_link_text']\n ,'pageBuilderClass' => $row['pagebuilder_class']\n ,'pageViewClass' => $row['pageview_class']\n ,'createdDate' => $row['created_dt']\n ,'modifiedDate' => $row['modified_dt']\n ,'redirectOnError' => boolval($row['redirect_on_error'])\n ,'published' => boolval($row['published'])\n );\n\n $this->httpStatus = Enumeration::getOrdinal('HTTP_200_OK', 'EnumHTTPResponse');\n } else {\n // If no result, status is 404.\n // Note: By a design choice, get requests to unauthorized pages return a 404, not a 401;\n // This is intentional as it obfuscates resources that the user isn't explicity authorized to access.\n $this->httpStatus = Enumeration::getOrdinal('HTTP_404_NOT_FOUND', 'EnumHTTPResponse');\n }\n\n return $this->resourceData;\n }", "title": "" }, { "docid": "523bf2f496922afdd0cd21b9bbd0d72b", "score": "0.5543885", "text": "public function index()\n {\n //\n $_doctor = new Doctor();\n\n $documentTypes = DocumentType::all();\n \n return view('doctors.index')->with([\n '_doctor' => $_doctor,\n 'documentTypes' => $documentTypes\n ]);\n }", "title": "" }, { "docid": "813ad5cbefc2793fef3dd4a2421e0d34", "score": "0.5543108", "text": "public function index()\n {\n //\n $doctors = Doctor::paginate(5);\n return view('admin.doctors.index', ['doctors' => $doctors]);\n }", "title": "" }, { "docid": "a6c3f809281eb46f123afce90c779db8", "score": "0.5540563", "text": "public function index()\n {\n if (\\Auth::user()->role != 'SUPER_ADMIN') {\n return redirect()->route('admin.v1.dashboard.index')->withError(\"Access Restricted\");\n }\n $referrals = User::with(['designation','referrals'])\n ->withTrashed()\n ->where('role', 'REFERRAL')\n ->orderBy('deleted_at','asc')\n ->paginate();\n\n return view('admin.v1.referrals.index')->withReferrals($referrals);\n }", "title": "" }, { "docid": "795a61c231fe3e6fb2c37ae533746589", "score": "0.55365425", "text": "public function index()\n {\n \n $doctors = Doctor::orderBy('id','desc')->paginate(10);\n\n return view('doctors.index')->withDoctors($doctors);\n }", "title": "" }, { "docid": "72acf32d5c74c47c8b9938a9501126b3", "score": "0.55326164", "text": "public function index() {\n\t\t$pages = parent::index();\n\n\t\tif (self::isApiCall())\n\t\t\treturn response()->json(remap_for_json($pages->all()));\n\n\t\t$exclude = $this->hasFilters($this->filters);\n\n\t\treturn $this->viewIndex(compact('pages', 'exclude'));\n\t}", "title": "" }, { "docid": "31c45ef92e4eda4bf80b63446a52fd70", "score": "0.5530373", "text": "public function index() {\n $apostadores = Apostador::orderBy('nome')->paginate(10);\n $organizacoes = Organizacao::all();\n if (count($organizacoes) == 0) {\n session()->flash('success', 'Ok, mas primeiro adicione uma organização!!');\n\n session()->flash('alert', '#f8bbd0 pink lighten-4');\n return redirect('/organizacao/create');\n }\n return view('milionarios.apostador.read', compact('apostadores', 'organizacoes'));\n }", "title": "" }, { "docid": "3d9f02ab227264eab59e37e914140bf1", "score": "0.5525228", "text": "public function index()\n {\n\n $perPage = Input::has('entries') ? Input::get('entries') : 10;\n if (Input::has('searchText'))\n return $this->respository->paginateSearch($perPage, Input::get('sort'), Input::get('searchText'));\n return $this->respository->paginate($perPage, Input::get('sort'));\n }", "title": "" }, { "docid": "999b996838867598561c3c5a62a9ca51", "score": "0.55248415", "text": "public function index()\n {\n $doctors = Doctor::orderBy('id','ASC')-> paginate(10);\n return view('hospitals.doctors.index', ['doctors'=>$doctors]);\n }", "title": "" }, { "docid": "8243104e6be950b9a69b9db81f9d858b", "score": "0.5524717", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $query = $em->getRepository('AciliaCmsBundle:Heritage')->getQuery();\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate($query, $this->get('request')->query->get('page', 1), 25);\n\n return $this->render('AciliaCmsBundle:Heritage:index.html.twig', array(\n 'pagination' => $pagination\n ));\n }", "title": "" }, { "docid": "81cc0210c91ad3075d7e8702db90e597", "score": "0.55237293", "text": "public function indexAction()\n {\n $this->dispatcher->setParam('title', 'Index');\n $this->dispatcher->forward(['action' => 'page']);\n }", "title": "" }, { "docid": "ca8dc790cf91dcca952689648afee2a3", "score": "0.5520886", "text": "public function index() {\n $faults = Fault::where('out_date', null)->get();\n\n return view('fault', compact('faults'))->with('page', 'index');\n }", "title": "" }, { "docid": "00e920bae23e5bae18844c3fd3148795", "score": "0.5516247", "text": "public function actionIndex()\n\t{\n\t\t$this->actionError();\n\t}", "title": "" }, { "docid": "afab57f9605c9c58562d608773463364", "score": "0.5513025", "text": "public function index(): Response\n {\n // Get All Room Types\n// $rooms_type = DB::table('room_types')->whereNull('deleted_at')->paginate(10);\n // OR\n $rooms_type = RoomType::withoutTrashed()->paginate(10);\n// dd($room_types);\n return response()->view('dashboard.room_types.index', ['rooms_type' => $rooms_type]);\n }", "title": "" }, { "docid": "fc40443acd4f61f210336983c7b145f7", "score": "0.551071", "text": "public function index()\n {\n $parents = StuParent::all();\n\n return view('page.parents.index')->with('records', $parents);\n }", "title": "" }, { "docid": "167381041c87062e4cb9262237778385", "score": "0.5509898", "text": "public function indexAction() {\n\t\tif(!Engine_Api::_()->core()->hasSubject('list_listing')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET FAQ SUBJECT\n\t\t$this->view->list = $list = Engine_Api::_()->core()->getSubject();\n\t\tif(empty($list)) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET VIEWER DETAIL\n\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n\t\tif(empty($viewer_id) && $list->rating <= 0) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET RATING TABLE\n\t\t$tableRating = Engine_Api::_()->getDbTable('ratings', 'list');\n $this->view->rating_count = $tableRating->countRating($list->getIdentity());\n $this->view->list_rated = $tableRating->isRated($list->getIdentity(), $viewer_id);\n }", "title": "" }, { "docid": "d3c937a54850a594f3594f2e772ab56d", "score": "0.550845", "text": "public function indexAction(){\n\t\t//if($this->_view->User->isLogined('RegisteredUser')) die('d');\n\n\t\t$this->_forward('node',null,null,array('alias'=>'pages'));\n\t}", "title": "" }, { "docid": "be4b1578faeaa9d12c3cc615ba7238b1", "score": "0.55049527", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $datosPersonals = $em->getRepository('IfeeBundle:DatosPersonal')->findAll();\n\n return $this->render('datospersonal/index.html.twig', array(\n 'datosPersonals' => $datosPersonals,\n ));\n }", "title": "" }, { "docid": "545da5d24b5238c5efea3c8d50f7ba50", "score": "0.5502967", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $claims = $em->getRepository('HeavenTNBundle:Claim')->findAll();\n\n return $this->render('claim/index.html.twig', array(\n 'claims' => $claims,\n )); $em = $this->getDoctrine()->getManager();\n\n $claims = $em->getRepository('HeavenTNBundle:Claim')->findAll();\n\n return $this->render('claim/index.html.twig', array(\n 'claims' => $claims,\n ));\n }", "title": "" }, { "docid": "78dcef7a0c691201c92259db07e168d8", "score": "0.5502803", "text": "public function index()\n {\n if (! Gate::allows('employee_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('employee_delete')) {\n return abort(401);\n }\n $employees = Employee::onlyTrashed()->get();\n } else {\n $employees = Employee::all();\n }\n\n return view('admin.employees.index', compact('employees'));\n }", "title": "" }, { "docid": "674bba63513ea7f8ebcf7c9eb14c810c", "score": "0.55003244", "text": "public function index()\n {\n $consultations = Consultation::all();\n return ConsultationResource::collection( $consultations );\n }", "title": "" }, { "docid": "476819084e771e63c084ea3384d26c1d", "score": "0.5499661", "text": "public function GetPage()\n\t{\t\t\n\t\t$this->DisplayIndex();\n\t}", "title": "" }, { "docid": "85c5a68f0818d4055b1f56713e48d768", "score": "0.5498951", "text": "public function index()\n {\n $income = Income::where('deleted_at', NULL)->latest()->paginate(10);\n\n if($income){\n return IncomeResources::collection($income);\n }else {\n return response()->json('No Data Found', 404);\n }\n\n }", "title": "" }, { "docid": "589cb1f3452cd0d77bf7d0b84cb001cf", "score": "0.5491651", "text": "public function index()\n\t{\n\t\t$type = [''=>'','Normal'=>'Normal','Difficult'=>'Difficult','Very Difficult'=>'Very Difficult','HPD Normal'=>'HPD Normal','HPD Difficult'=>'HPD Difficult','HPD Very Difficult'=>'HPD Very Difficult'];\n\t\t$hospitalAll\t= Hospital::orderBy('name')->paginate();\n\t\t$districtAll\t= District::orderBy('name')->lists('name','id');\n\t\t$hospitalCategoryAll\t= HospitalCategory::orderBy('name')->lists('name','id');\n\t\t$index = $hospitalAll->perPage() * ($hospitalAll->currentPage()-1) + 1;\n\n\t\treturn view('hospital.index',compact('hospitalAll','index','type','districtAll','hospitalCategoryAll')); \n\t}", "title": "" }, { "docid": "f74973686710bb877f47bebca5823ef8", "score": "0.5490591", "text": "public function index()\n {\n if(Role::user_role(Auth::id()) != 'partner'){\n return view('admin.company.index', [\n 'companyes' => Company::paginate(10)\n ]);\n } else return view('partners.company.index');\n }", "title": "" }, { "docid": "de74d0803ef218c2e174dc583851e8ea", "score": "0.5490376", "text": "public function indexAction()\n {\n //$this->getDoctrine() no devuelve una instancia del objeto doctrine\n //->getRepository('ManuelPersonasBundle:Personas') obtenemos el repositorio para la entidad Personas de este Bundle\n //->findAll(); obtenemos todos los registros en la bd\n $data['personas'] = $this->getDoctrine()\n ->getRepository('ManuelPersonasBundle:Personas')\n ->findAll();\n return $this->render('ManuelPersonasBundle:Default:index.html.twig', $data);\n }", "title": "" }, { "docid": "db1e65cf3a02bec2152f7454215b0b68", "score": "0.54889196", "text": "public\n function index()\n {\n if (in_array(Auth::user()->typ, ['admin', 'employe'])) {\n $ansprechpartner = ansprechpartner::paginate(25);\n return view('ansprechpartner.index', compact('ansprechpartner'));\n } else {\n return view('welcome');\n }\n }", "title": "" }, { "docid": "d507124d8c24c85293a344becb901d69", "score": "0.54872614", "text": "public function index(){\n $this->notFound();\n }", "title": "" }, { "docid": "236308d446369e1c77c811514d4d1f27", "score": "0.5487114", "text": "public function indexAction()\n\t{\n\t\t\treturn $this->redirect($this->generateUrl('list'));\n }", "title": "" }, { "docid": "666135f0996bf71fc907e1b170f7a0b8", "score": "0.5486394", "text": "public function index()\n {\n $doctors = Doctor::orderBy('specialization', 'asc')->paginate(5);\n return view('doctors.index')->with('doctors', $doctors);\n }", "title": "" }, { "docid": "3ff0a31565db1501530ea3fb22b54225", "score": "0.5485263", "text": "public function index()\n {\n if (Gate::denies('listar_entrada'))\n // abort(403, \"Sem autorizacao\");\n return redirect()->route('noPermission');\n\n\n $entradas = $this->entrada->get();\n $formas_pagamento = DB::table('forma_pagamentos')->pluck('descricao', 'id')->all();\n\n return view('entradas.index_entrada', compact('entradas', 'formas_pagamento'));\n }", "title": "" }, { "docid": "792f6e801c7ece0ff1b444697142c680", "score": "0.5483227", "text": "public function indexEquipoFrontAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('Area4CampeonatoBundle:Equipo')->findAll();\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $entities, \n $this->get('request')->query->get('page', 1),/*page number*/\n 20/*limit per page*/\n );\n\n return array('pagination' => $pagination);\n }", "title": "" } ]
a5b61e6ef0735c4f182b9b2c5e0cab3a
validate the username and password
[ { "docid": "47406230126257e0c197e03993ddc140", "score": "0.0", "text": "private function userAndPassController() {\n\n\t\tif ($this -> userName !== $this -> strippUserName) {\n\t\t\t$this -> regViewClass -> setMessage(\\viewregister\\ViewRegister::NO_VALID_USERNAME);\n\t\t\treturn false;\n\t\t}\n\t\telse if($this -> stripPassword !== $this -> password){\n\t\t\t$this -> regViewClass -> setMessage(\\viewregister\\ViewRegister::UPDATE_NO_VALID_PASS);\n\t\t\treturn false;\n\t\t}\n\t\telse if ($this -> password !== $this -> repRegPass) {\n\t\t\t$this -> regViewClass -> setMessage(\\viewregister\\ViewRegister::PASSWORD_NOT_MATCH);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" } ]
[ { "docid": "a061439a93c96567a3eebb58335cdca5", "score": "0.7383629", "text": "private function __ValidateCredentials($username, $passwd) {\n if (!$username) return false;\n if (!$passwd) return false;\n\n $f3 = Base::instance();\n $db_user = new DB\\SQL\\Mapper($f3->get('DB'), 'users');\n $db_user->load(array('LOWER(username)=LOWER(?)',$username));\n if ($db_user->dry())\n return false;\n\n if ( password_verify($passwd, $db_user->passwd) )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "598ca48512f3859822a8d213878909c0", "score": "0.72645193", "text": "function check_login_vars(){\n $username = false;\n $password=false;\n\n if ( $this->check_var( 'username' , 2 ) ){\n\n $username = true;\n $this->username = $_GET['username'];\n\n }\n\n if ( isset ($_GET['password']) && !empty ($_GET['password']) ){\n\n $password=true;\n $this->password = $_GET['password'];\n\n }\n\n if ( $password && $username ){\n\n return true;\n\n } else {\n\n return false;\n }\n\n }", "title": "" }, { "docid": "0ac83a47f7a5b266359f7940ab9ac741", "score": "0.72367185", "text": "private function validateLogin($username, $password) {\n\t\t\n\t\t// add this to the database class\n\t\t// Ex: mysql_real_escape_string(trim($_POST['username']));\n\t\t\n\t\t//print '<>br />Password entered: '.$password.'<br />';\n\t\t//$sql = 'SELECT password FROM user where username=\"'.($username).'\" limit 1';\n\t\t//$db = DaybookDB::getInstance();\n\t\t//$data = $db->select($sql);\n\t\t\n\t\t// DO NOT access objects directly - only go through factories\n\t\t$uf = new UserFactory();\n\t\t$user = $uf->validateLogin($username, $password);\n\t\t//$user = new User();\n\t\tif ($user->getUser($username, $password)) {\n\t\t\t// verify password\n\t\t\tif ($this->verify()) {\n\t\t\t\t// login good\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// log the attempt\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t\t//return true;\n\t}", "title": "" }, { "docid": "aeaceddfb778916d91151e2c41dcc7a6", "score": "0.7195128", "text": "function validCredentials(){\n\t\tif(isset($_POST['username']) && isset($_POST['pass'])){\n\t\t\t$mysqli = new MysqliDAO();\n\t\t\t$mysqli->query(\"SELECT * FROM `n4d_users` WHERE `username`='\" . $_POST['username'] .\"'\");\n\t\t\tif($mysqli->affected_rows > 0){\n\t\t\t\t$query = $mysqli->query(\"SELECT `hash`, `salt` FROM `n4d_users` WHERE `username`='\" . $_POST['username'] .\"'\");\n\t\t\t\tif($mysqli->affected_rows > 0){\n\t\t\t\t\t$array = $query->fetch_assoc();\n\t\t\t\t\t$hashedPass = hash('md5', $_POST['pass'] . $array['salt']);\n\t\t\t\t\tif($hashedPass == $array['hash']){\n\t\t\t\t\t\t$_SESSION['authKey'] = assignKey();\n\t\t\t\t\t\t$mysqli->query(\"UPDATE `n4d_users` SET `auth_key`='\" . (string)$_SESSION['authKey'] . \"' WHERE `username`='\" . (string)$_POST['username'] . \"'\");\n\t\t\t\t\t\t//die(\"UPDATE `n4d_users` SET `auth_key`='\" . (string)$_SESSION['authKey'] . \"' WHERE `username`'='\" . (string)$_POST['username'] . \"'\");\n\t\t\t\t\t\theader(\"Location: https://graduate-dev.asu.edu/sites/all/modules/playgroundmodule/Test/index.php\");\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "3431a5310674addf33ee1ec4028292af", "score": "0.71544516", "text": "private function _checkAuth()\n { if(!(isset($_SERVER['HTTP_X_USERNAME']) and isset($_SERVER['HTTP_X_PASSWORD']))) {\n // Error: Unauthorized\n $this->_sendResponse(401);\n }\n $username = $_SERVER['HTTP_X_USERNAME'];\n $password = $_SERVER['HTTP_X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: User Password is invalid');\n }\n }", "title": "" }, { "docid": "fcc7f344b6ffae6a7ec85578965ff19f", "score": "0.71152383", "text": "private function isValidCredentials(): bool\n {\n $username = $this->getRequest()->getParam('username');\n $password = $this->getRequest()->getParam('password');\n\n $users = $this->get('db')->find(User::class)\n ->where('username')->is($username);\n\n foreach ($users as $user) {\n if (password_verify($password, $user->password)) {\n $_SESSION['auth_user_id'] = $user->id;\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "a9e00e576d1e832f1277157ec9745fd1", "score": "0.7088255", "text": "public function checkLogin(){\n $errors = false;\n\n if (strlen(trim($this->email)) == 0) {\n $errors= \"Email is mandatory\";\n }else if (strlen(trim($this->email)) > 50 ) {\n $errors= \"Email can't be larger than 50 characters\";\n }else if(!filter_var($this->email, FILTER_VALIDATE_EMAIL)){\n $errors = \"Email format is invalid\";\n }else if(!$this->existsUser()){\n $errors = \"There isn't a user with that email\";\n }else if (strlen(trim($this->password)) == 0 ) {\n $errors= \"Password is mandatory\";\n }else if (strlen(trim($this->password)) < 8) {\n $errors = \"Password can't be less than 8 characters\";\n }else if (strlen(trim($this->password)) > 16 ) {\n $errors = \"Password can't be larger than 16 characters\";\n }else if(!preg_match('/^(?=\\w*\\d)(?=\\w*[A-Z])(?=\\w*[a-z])\\S{8,15}$/', $this->password)){\n $errors = \"Password format is invalid\";\n }\n return $errors;\n }", "title": "" }, { "docid": "dda77a97c7cdaa37e715445a1bf2c24f", "score": "0.70830125", "text": "public function checkLogin(string $username, string $password) // TESTED\r\n {\r\n // Clear excess whitespace\r\n $username = trim($username);\r\n $password = trim($password);\r\n\r\n\r\n // Parameter validation\r\n $e1 = $this->strValidation($username, \"username\", $this->letterNum, __FUNCTION__);\r\n $e2 = $this->strValidation($password, \"password\", $this->letterNum, __FUNCTION__);\r\n\r\n\r\n // If parameters haven't thrown an error\r\n if (!isset($e1) && !isset($e2)) {\r\n $sql = \"SELECT UserName FROM User WHERE UserName = ? AND Password = ? AND Banned = '0' AND Removed = '0'\";\r\n\r\n return $this->doesExistSQL($sql, [$username, $password]);\r\n }\r\n else \r\n $this->errorMessage([$e1, $e2]);\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "666fe3cd932ede965375ef976cd9dea4", "score": "0.7074002", "text": "protected function validateUserPass($username, $password) {\n\t\treturn $this->db->auth($username, $password);\n\t}", "title": "" }, { "docid": "520e027eb9732f4e8ac6cff83f0d016c", "score": "0.7039328", "text": "public function isPasswordValid($password);", "title": "" }, { "docid": "40fb97ebe6a3618b1293db91d21d2906", "score": "0.702767", "text": "public function authenticate($username,$password) {}", "title": "" }, { "docid": "21d8e74ff8b16a2b5db21f7247f1bbed", "score": "0.70219606", "text": "function validatelogin($username,$password) {\n\tlogger_print(\"login attempt u:\".$username.\" p:\".$password.\" ip:\".$_SERVER['REMOTE_ADDR'], 3, \"login\");\n\t$db_query = \"SELECT password FROM \"._DB_PREF_.\"_tblUser WHERE username='$username'\";\n\t$db_result = dba_query($db_query);\n\t$db_row = dba_fetch_array($db_result);\n\t$res_password = trim($db_row['password']);\n\t$password = md5($password);\n\tif ($password && $res_password && ($password==$res_password)) {\n\t\tlogger_print(\"valid login u:\".$username.\" ip:\".$_SERVER['REMOTE_ADDR'], 2, \"login\");\n\t\treturn true;\n\t}\n\tlogger_print(\"invalid login u:\".$username.\" ip:\".$_SERVER['REMOTE_ADDR'], 2, \"login\");\n\treturn false;\n}", "title": "" }, { "docid": "d9274cc80f822df189b90840717cac48", "score": "0.70076185", "text": "private function _checkAuth()\n {\n // Check if we have the USERNAME and PASSWORD HTTP headers set\n if(!(isset($_SERVER['X_USERNAME']) && isset($_SERVER['X_PASSWORD']))) {\n // Error: Unauthorized:\n $this->_sendResponse(401);\n }\n $username = $_SERVER['X_USERNAME'];\n $password = $_SERVER['X_PASSWORD'];\n // Find the user\n $user=User::model()->find('LOWER(username)=?',array(strtolower($username)));\n if($user===null) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: Name is invalid');\n } else if(!$user->validatePassword($password)) {\n // Error: Unauthorized\n $this->_sendResponse(401, 'Error: Password is invalid');\n }\n }", "title": "" }, { "docid": "3482e0092b9f870a49bc0e7765e4d785", "score": "0.6976139", "text": "function validate_user($username, $pwd) {\n\t\n\t\t$mysql = new databaseAcessor();\n\t\t\n\t\t$creds = array($username, md5($pwd));\n\t\t\n\t\t$ensure_credentials = $mysql->verify_username_and_pass( $creds );\t\t//validate users credentials against DB\n\t\t\n\t\t//print_r( $ensure_credentials );\n\t\tif($ensure_credentials) {\n\t\t\t$role = $ensure_credentials[0];\n\t\t\tprint_r( $role );\n\t\t}\n\t\t\n\t\t//if users credentials were successfully validated\n\t\tif( !empty($ensure_credentials) ) {\n\t\t\t$_SESSION['status'] = 'authorized';\t\t//set session status to authorized\n\t\t\t$_SESSION['type'] = $role->role;\n\t\t\t\n\t\t\tif( $_SESSION['type'] === 'ADMIN') {\n\t\t\t\theader(\"location: admin.php\");\t\t\t//set this to location we want to take user\n\t\t\t} else {\n\t\t\t\theader(\"location: index.php\");\t\t\t//set this to location we want to take user\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\treturn \"Please enter a correct username and password.\";\t\t//if username and pwd were not found\n\t\t}\n\t}", "title": "" }, { "docid": "74e48c2387f23b315abdb3c73f4c365e", "score": "0.695455", "text": "public function isValid(string $login, string $password): bool;", "title": "" }, { "docid": "8a80b118fc074a867e3f9d9bccf4f3a8", "score": "0.69415164", "text": "public function authenticate()\n {\n $username = strtolower($this->username);\n \n if (strpos($username, '@') !== false) {\n $user = User::model()->find('LOWER(email)=?', array( $username ));\n } else {\n $user = User::model()->find('LOWER(username)=?', array( $username ));\n }\n \n if ($user === null) {\n $this->errorCode = self::ERROR_USERNAME_INVALID;\n } else if (!$user->validatePassword($this->password)) {\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n } else {\n $this->_id=$user->id;\n\t\t\t$this->username=$user->username;\n\t\t\t$this->errorCode=self::ERROR_NONE;\n }\n return $this->errorCode==self::ERROR_NONE;\n }", "title": "" }, { "docid": "52cf63822074a78539f30d2dd5437949", "score": "0.69296175", "text": "public function validate($username, $password){ \n\t\t$query = $this->db->get($this->db_table);\n\t\tforeach ($query->result() as $user)\n\t\t{\n\t\t\t$login_info = $user->username;\n\t\t\tif($login_info === $username){\n\t\t\t\tif(password_verify($password, $user->password)){\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$this->user_log_in($user->username);\t\t\t\t\t\n\t\t\t\t\treturn null;\n\t\t\t\t} else{\n\t\t\t\t\treturn 'Username/Password combination is incorrect';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "28e342c83becb4110add685a29c63de3", "score": "0.69239664", "text": "function validateUser($username, $password) {\n try {\n $player_query = \"SELECT username, password FROM player WHERE username='$username' AND password='$password'\";\n $player_data = dbSelect($player_query);\n \n if(empty($player_data)) {\n return false;\n }\n return true;\n }\n catch(PDOException $e)\n {\n die ('PDO error in validatePassword()\": ' . $e->getMessage() );\n }\n }", "title": "" }, { "docid": "d68fb393f4523e7234a4210ea736e7c5", "score": "0.69130397", "text": "function is_valid_username()\n{\n\t$pass = sanitize_variable($_REQUEST['password']);\n\t$pass1 = sanitize_variable($_REQUEST['password1']);\n\t$user = sanitize_variable($_REQUEST['username']);\n\t\n\treturn (isset($pass) && $pass != '' &&\n\t\t\tisset($pass1) && $pass1 != '' &&\n\t\t\tisset($user) && $user != '' &&\n\t\t\tstrpos($user,'/') ===false &&\n\t\t\tstrpos($user,\"\\\\\") ===false);\n}", "title": "" }, { "docid": "8e39e9bcfa0d70791f351402542bdf88", "score": "0.68831766", "text": "function validate_auth(string $username, string $password)\n{\n try {\n $user = get_user_by_username($username);\n\n if (password_verify($password, $user['password'])) {\n $_SESSION['user_id'] = $user['id'];\n $_SESSION['fave_flavor'] = $user['fave_flavor'];\n return true;\n }\n\n return false;\n } catch (\\Exception $e) {\n return false;\n }\n}", "title": "" }, { "docid": "1ae662cfd194e68f4f1339e828553988", "score": "0.6869658", "text": "public static function validateUser($username, $password) {\n\t\t$username = trim($username);\n\t\t$password = trim($password);\n\t\t\n\t\t$query = \"SELECT * FROM User WHERE username = '\" . $username . \"' and password = '\" . $password . \"';\";\n\t\t$result = Database::executeQuery($query);\n\t\t\n\t\tif($result == null or $result == false) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($result->num_rows > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f0687b86e0c17f80b35f909c0fabdec1", "score": "0.6858869", "text": "public function checkUserInput($username, $password){\n if(empty($username)){\n throw new \\Exception(\"Username is missing\");\n }\n\n // Validation in model, if validation in view for some reason wont work...\n if(empty($password)){\n throw new \\Exception(\"Password is missing\");\n }\n\n if($username !== self::$username || $password !== self::$password){\n throw new \\Exception(\"Wrong name or password\");\n }\n\n $_SESSION[$this->isLoggedInSession] = true;\n return true;\n }", "title": "" }, { "docid": "8fc5986b3bfa14f407cbcae61f821b9a", "score": "0.6835929", "text": "public function isValidUser($username, $password){\n $query = $this->db->prepare(\"select pass from users where username = :username\");\n $query->bindParam(':username', $username);\n\n $query->execute();\n $result = $query->fetch();\n\n $pass = $result[\"pass\"];\n if($pass === $password){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5b7e9d4b12568022cd5d055824f920bd", "score": "0.682381", "text": "public function authenticate($username, $password)\n {\n // on the proper subclass.\n $userClassName = Enter_Config::getValueByName(\"userClass\");\n $method = array($userClassName, 'getByUsername');\n $user = call_user_func($method, $username);\n // check for trailing space\n if (!$user && substr($username, -1) == ' ') {\n $user = call_user_func($method, rtrim($username));\n if ($user) {\n trigger_error('Username with trailing spaces: \"' . $username . '\"');\n }\n }\n if (!$user) {\n return false;\n }\n\n $passwordOk = $user->checkPassword($password);\n // check for trailing space\n if (!$passwordOk && substr($password, -1) == ' ') {\n $passwordOk = $user->checkPassword(rtrim($password));\n if ($passwordOk) {\n trigger_error('Username with password with trailing spaces: \"' . $username . '\"');\n }\n }\n return $passwordOk;\n }", "title": "" }, { "docid": "633b20d8585b0b7880518c8b61af8eb3", "score": "0.6803622", "text": "function validateLogin(&$result)\n{\n if (!isset($_POST['username']) || !preg_match(USERNAME_PATTERN, $_POST['username'])) {\n $result['username'] = 'Invalid username';\n }\n\n if (!isset($_POST['pass']) || strlen($_POST['pass']) < 8) {\n $result['pass'] = 'Password less than 8 characters';\n }\n\n if (!empty($result)) {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "06a1ebdf63dba0015caf4feeb64c159a", "score": "0.67879504", "text": "public function authenticate( $username, $password);", "title": "" }, { "docid": "1c3be7811e6e6d200f92303ef8b772dc", "score": "0.6783865", "text": "function validate_password($password){\r\n return true;\r\n}", "title": "" }, { "docid": "3ff224a07438d7b4e670442c03b7187c", "score": "0.6776161", "text": "public function isUsernameValid($username);", "title": "" }, { "docid": "7fad2660883b485c43511a3462824d8c", "score": "0.67706877", "text": "function checkLoginData( $username, $password ) {\n\n\n\t$result = getUser( $username );\n\n\tif( empty( $result ) ) {\n\n\t\treturn \"noUser\";\n\n\t}\n\n\tif( !empty($result) ) {\n\n\t\t// hash-password stored in database \n\t\t$storedPasswordHash = $result[0][\"password\"];\n\n\t\t// verify password\n\t\tif ( password_verify( $password, $storedPasswordHash ) ) {\n\t\t\t\n\t\t\treturn \"correct\";\n\n\t\t} else {\n\n\t\t\treturn \"incorrect\";\n\n\t\t}\n\n\t}\n\n}", "title": "" }, { "docid": "5804732b5de96de792536f8cbaf0943d", "score": "0.6769163", "text": "function validate_input() {\n return !empty($_POST['password']) AND !empty($_POST['username']);\n}", "title": "" }, { "docid": "21347f46242ad588442d6fc1ea26ab64", "score": "0.67488444", "text": "public function validateUser()\n {\n if (!$this->user || !$this->user->validateInputPassword($this->password)) {\n return $this->addError('password', Module::t('userauth.models.userloginform.error.username_password'));\n }\n }", "title": "" }, { "docid": "42ee2fa2e37f7a4d04dc3f86b45c31a4", "score": "0.67462313", "text": "public function validateCredentials(string $username, string $password): bool\n {\n $queryBuilder = $this->queryBuilderFactory->makeSelect($this->connectionName);\n $row = $queryBuilder->cols(['password'])\n ->from('users')\n ->whereEquals('username', $username)\n ->first();\n\n if (empty($row)) {\n return false;\n }\n\n return password_verify($password, $row->password);\n }", "title": "" }, { "docid": "14a310fb0eea5760c533a2a336661b27", "score": "0.6736476", "text": "public function validateUser($username,$password)\n\t{\n\t\t// use UserRecord Active Record to look for the (username, password) pair.\n\t\t$ur = UserFERecord::finder()->findBy_username_AND_password($username,$password);\n if ($ur === null)\n return false;\n\n $ur->LastDate = time();\n $ur->LastIP = Prado::getApplication()->Request->UserHostAddress;\n if ($ur->Password != $ur->Password1) {\n $ur->Password3 = $ur->Password2;\n $ur->Password2 = $ur->Password1;\n $ur->Password1 = $ur->Password;\n $ur->LastPasswordChange = time();\n }\n $ur->save();\n \n return true;\n \n\t}", "title": "" }, { "docid": "d4cff7f9745676a24ec5712ef0010d72", "score": "0.6717048", "text": "function validate_credentials ($username, $password)\r\n\t{\r\n\t\t$result = $this->db->get_where('users', array(\r\n\t\t\t'username' => $username , \r\n\t\t\t'password' => $password \r\n\t\t));\r\n\t\tif ($result!=NULL && $result->num_rows() > 0)\r\n\t\t{\r\n\t\t\t$row = $result->row();\r\n\t\t\treturn $row->id;\r\n\t\t} else\r\n\t\t{\r\n\t\t\treturn - 1;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7e42f352e661fdb1335a46f7b9ac53e1", "score": "0.67134964", "text": "private function login_with_form() {\n $username = required_param('rocketchat_username', PARAM_USERNAME);\n $password = required_param('rocketchat_password', PARAM_RAW);\n\n if (empty($username) || empty($password)) {\n $this->error = true;\n }\n\n if (empty($username) && empty($password)) {\n \\core\\notification::info(get_string('credentialserror', 'block_rocketchat'));\n\n return;\n }\n\n if (empty($username)) {\n \\core\\notification::warning(get_string('usernameerror', 'block_rocketchat'));\n\n return;\n }\n\n if (empty($password)) {\n \\core\\notification::warning(get_string('passworderror', 'block_rocketchat'));\n\n return;\n }\n\n $this->verify_login($username, $password);\n }", "title": "" }, { "docid": "5944fe076052e56e0a4b651754e59a2e", "score": "0.6693185", "text": "public function validatePassword($username,$password){\n $statement = $this->connection->prepare(\"SELECT password FROM admins WHERE username = :username LIMIT 1\");\n // References namespace of dog to query\n $statement->bindParam(':username', $username, PDO::PARAM_STR);\n \n $statement->execute();\n while($r=$statement->fetch()){\n $p=$r['password'];\n }\n if($password == $p){\n return true;\n } else{\n return false;\n } \n }", "title": "" }, { "docid": "b075af67138df5459802436ccf1ea2bc", "score": "0.6679018", "text": "public function authenticate() {\n\t\t/** @var $user User */\n\t\t$user = User::model()\n\t\t\t\t->find('LOWER(username) = ?', array(strtolower($this->username)));\n\t\tif ($user === null) {\n\t\t\t$this->errorCode = self::ERROR_USERNAME_INVALID;\n\t\t} else {\n\t\t\tif (!$user->validatePassword($this->password)) {\n\t\t\t\t$this->errorCode = self::ERROR_PASSWORD_INVALID;\n\t\t\t} else {\n\t\t\t\t$this->_id = $user->id;\n\t\t\t\t$this->username = $user->username;\n\t\t\t\t$this->role = $user->role;\n\t\t\t\t$this->errorCode = self::ERROR_NONE;\n\t\t\t}\n\t\t}\n\t\treturn $this->errorCode == self::ERROR_NONE;\n\t}", "title": "" }, { "docid": "f7a9138d4d3e4f743c16351180bd8edb", "score": "0.6668187", "text": "abstract public function check_auth();", "title": "" }, { "docid": "fe4c465599f4e8038f09fd6cc197c854", "score": "0.66680795", "text": "public function login() {\n $user = $this->getUser('username', 'password');\n if (is_string($user)) {\n //invalid user credentials\n }\n }", "title": "" }, { "docid": "4ec50a4b621f7a7aa30041e97d5ffba8", "score": "0.66679937", "text": "function validateLoginFields($fields)\r\r\r\n\t\t\t{\r\r\r\n\t\t\t\t\t$f1 = $fields['userName'];\r\r\r\n\t\t\t\t\t$f2 = $fields['password'];\r\r\r\n\t\t\t\t\tif (($f1 == '') || ($f2 == '')) {\r\r\r\n\t\t\t\t\t\treturn array('userName' => 'User name and Password required');\r\r\r\n\t\t\t\t\t}\r\r\r\n\t\t\t\t\treturn true;\r\r\r\n\t\t\t}", "title": "" }, { "docid": "d8dfe489a2231c6ba6f65883b0e38bad", "score": "0.6665791", "text": "function UserValidation($conn, $username, $password)\n{\n try {\n ///sql query to select password of user with \"username = $username\".\n $sql = \"SELECT password\n FROM loginproj.users\n WHERE (users.username = '$username');\n \";\n ///execute query and save \"query result\" in \"$result\".\n $result = $conn->query($sql);\n ///if user with \"username = $username\" exists then check password.\n if ($result->num_rows > 0) {\n ///get \"hash of User's password\" from query result.\n $userPassword = $result->fetch_assoc()[\"password\"];\n ///if \"$password\" is \"right\" return \"1\".\n if (password_verify($password, $userPassword) === true)\n return 1;\n }\n }\n ///return \"-1\" if unexpected error occur.\n catch (\\Throwable $th) {\n return -1;\n } catch (\\Exception $e) {\n return -1;\n }\n ///if \"$username\" did not existes in database or \"$password\" was \"wrong\" return \"-2\";\n return -2;\n}", "title": "" }, { "docid": "4776a80ec776c457c146711ca1f7ff48", "score": "0.66473275", "text": "protected function checkCredentials($username, $password)\n {\n if (!$username || !$password) {\n throw new LogicException('You must set username and password to login.');\n }\n }", "title": "" }, { "docid": "a5e6425b58b786b8f537d336169ca78e", "score": "0.6641608", "text": "function validateLogin($dbConnexion) {\n return $dbConnexion->verifyUser($_POST['login_username'], $_POST['login_password']);\n}", "title": "" }, { "docid": "00c3495d39c4904c3dd13cfea1443d13", "score": "0.66243935", "text": "Function authenticateUser($strUsername, $strPassword) {\n If (($PHP_AUTH_USER != $strUsername ) OR ($PHP_AUTH_PW != $strPassword)) {\n Header(\"WWW-Authenticate: Basic realm=\\\"Authenticate\\\"\");\n Header(\"HTTP/1.0 401 Unauthorized\");\n echo \"You entered an invalid login or password.\";\n exit;\n }\n }", "title": "" }, { "docid": "a64a9d6904951cc5b80694d60e250981", "score": "0.6613395", "text": "function valid_password($str, $username_field)\n\t{\n\t\tif ( ! $username_field)\n\t\t{\n\t\t\t$username_field = 'username';\n\t\t}\n\t\t\n\t\t// Is password min length correct?\n\t\t\n\t\t$len = $this->EE->config->item('pw_min_len');\n\t\n\t\tif (strlen($str) < $len)\n\t\t{\n\t\t\t$this->set_message('valid_password', str_replace('%x', $len, $this->EE->lang->line('password_too_short'))); \n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t\n\t\t// Is password max length correct?\n\t\t\n\t\tif (strlen($str) > 32)\n\t\t{\n\t\t\t$this->set_message('valid_password', $this->EE->lang->line('username_password_too_long'));\n\t\t}\t\t\n\n\n\t\t// Is password the same as username?\n\t\t// - We check for a reversed password as well\n\n\t\t$username = $_POST[$username_field];\n\n\t\t// Make UN/PW lowercase for testing\n\n\t\t$lc_user = strtolower($username);\n\t\t$lc_pass = strtolower($str);\n\t\t$nm_pass = strtr($lc_pass, 'elos', '3105');\n\n\n\t\tif ($lc_user == $lc_pass OR $lc_user == strrev($lc_pass) OR $lc_user == $nm_pass OR $lc_user == strrev($nm_pass))\n\t\t{\n\t\t\t$this->set_message('valid_password', $this->EE->lang->line('password_based_on_username'));\n\t\t\treturn FALSE;\n\t\t}\t\t\n\n\t\t\n\t\t// Are secure passwords required?\n\n\t\tif ($this->EE->config->item('require_secure_passwords') == 'y')\n\t\t{\n\t\t\t$count = array('uc' => 0, 'lc' => 0, 'num' => 0);\n\t\t\t\t\t\t\n\t\t\t$pass = preg_quote($str, \"/\");\n\n\t\t\t$len = strlen($pass);\n\n\t\t\tfor ($i = 0; $i < $len; $i++)\n\t\t\t{\n\t\t\t\t$n = substr($pass, $i, 1);\n\n\t\t\t\tif (preg_match(\"/^[[:upper:]]$/\", $n))\n\t\t\t\t{\n\t\t\t\t\t$count['uc']++;\n\t\t\t\t}\n\t\t\t\telseif (preg_match(\"/^[[:lower:]]$/\", $n))\n\t\t\t\t{\n\t\t\t\t\t$count['lc']++;\n\t\t\t\t}\n\t\t\t\telseif (preg_match(\"/^[[:digit:]]$/\", $n))\n\t\t\t\t{\n\t\t\t\t\t$count['num']++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($count as $val)\n\t\t\t{\n\t\t\t\tif ($val == 0)\n\t\t\t\t{\n\t\t\t\t\t$this->set_message('valid_password', $this->EE->lang->line('not_secure_password'));\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t// Does password exist in dictionary?\n\n\t\tif ($this->_lookup_dictionary_word($lc_pass) == TRUE)\n\t\t{\n\t\t\t$this->set_message('valid_password', $this->EE->lang->line('password_in_dictionary')); \n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "9ed184570640ae43f617eb85906a2c79", "score": "0.6608764", "text": "abstract protected function authenticate($username, $password);", "title": "" }, { "docid": "07e89362c0e28c177c9e8d0943b21053", "score": "0.6599442", "text": "function validate_username_password_host($argv) {\n $valid = true;\n $error_message = \"\";\n if (!in_array(\"-u\", $argv)) {\n $valid = false;\n $error_message .= \"Please provide the -u command option to specify the database username to insert user into DB\\n\";\n }\n if(!in_array(\"-h\", $argv)) {\n $valid = false;\n $error_message .= \"Please provide the -h command option to specify the database username to insert user into DB\\n\";\n }\n if (!in_array(\"-p\", $argv)) {\n $valid = false;\n $error_message .= \"Please provide the -p command option to specify the database username to insert user into DB\\n\";\n }\n return [\"valid\" => $valid, \"message\" => $error_message];\n}", "title": "" }, { "docid": "1a443fda250047b99a555149ca51db2e", "score": "0.65964586", "text": "function validate_login($username, $password) {\n\t$_SESSION[\"reg_array_of_errs\"] = '';\n\t$_SESSION[\"reg_num_of_errs\"] = 0;\n\tif (valid_username($username) && valid_password($password)) {\n\t\treturn True;\n\t}\n\telse {\n\t\treturn False;\n\t}\n}", "title": "" }, { "docid": "7f297496e6026dbe4eab4560b5568932", "score": "0.6595701", "text": "public function check($username = NULL, $password = NULL)\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$sql_username = \"SELECT username FROM company_information WHERE username = '$username'\";\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$query_username = mysql_query($sql_username);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\twhile ($row_username = mysql_fetch_assoc($query_username))\r\n\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$db_username = $row_username['username'];\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$sql_password = \"SELECT password FROM company_information WHERE password = '$password'\";\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$query_password = mysql_query($sql_password);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\twhile ($row_password = mysql_fetch_assoc($query_password))\r\n\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$db_password = $row_password['password'];\t\t\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t//Check values against each other\r\n\r\n\t\t\t\t\t\t\t\t\t\tIf (($username == $db_username) && ($password == $db_password))\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn true;\t\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "c2548f87bb85b36a85ce89cbd890664d", "score": "0.6594741", "text": "function user_login ($username, $password) {\n return false;\n }", "title": "" }, { "docid": "94b299391066cb71ec525f7f55ac27d2", "score": "0.65934896", "text": "function authenticate($username, $password)\n{\n $connection = connect_to_db();\n\n $user = get_one_user_by_username($connection, $username);\n\n if (null== $user) {\n return false;\n }else {\n $pass = get_one_user_by_password($connection, $username);\n if (null==$pass) {\n return false;\n } else {\n $hashedCorrectPassword = password_hash($pass[0], PASSWORD_DEFAULT);\n if(password_verify($password, $pass[0])){\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "957aa45af2f519afbd6eb15d3e430c3f", "score": "0.6580931", "text": "function yourls_check_username_password() {\n\tglobal $yourls_user_passwords;\n\tif( isset( $yourls_user_passwords[ $_REQUEST['username'] ] ) && yourls_check_password_hash( $_REQUEST['username'], $_REQUEST['password'] ) ) {\n\t\tyourls_set_user( $_REQUEST['username'] );\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "a9691ea9ae8297a74debf9fc4b4be505", "score": "0.65790105", "text": "public function validate() {\n if (!is_null($this->input->post('login'))) {\n\n //Checks if fields are not empty\n if (!empty($this->input->post('username')) && !empty($this->input->post('password'))) {\n\n //Saves posts\n $username = $this->input->post('username');\n $password = $this->input->post('password');\n\n //Checks if username exists in the dbs\n if ($this->Players->exists($username)) {\n\n //Username exists - Gets record from dbs\n $exist = $this->Players->get($this->input->post('username'));\n\n //Checks if password matches\n $valid = password_verify($password, $exist->password);\n\n //When the password is validated\n if ($valid) {\n $this->session->role = $exist->role;\n $this->session->username = $username;\n $this->session->response = \"Login successful! Welcome, \" . $username;\n redirect('');\n } else {\n $this->session->response = \"Wrong password. Try again\";\n }\n } else {\n //Username does not exist\n $this->data['error-message'] = \"Invalid username.\";\n }\n } else {\n $this->data['error-message'] = \"Please enter a username and/or password\";\n }\n }\n }", "title": "" }, { "docid": "e231bcc5ebd47f2cbc9a780fe92d1421", "score": "0.65741724", "text": "public function isCorrectPassword($password);", "title": "" }, { "docid": "c24f51f8eb88f62950f8d8e0e5b4b9cb", "score": "0.6571986", "text": "public function check_password($password) {\n\n }", "title": "" }, { "docid": "8d2d68914b540070076d0efc70058b4d", "score": "0.656287", "text": "public function authenticate()\n\t{\n\t\tif(isset($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']))\n\t\t{\n\t\t\tif(\n\t\t\t\t$_SERVER['PHP_AUTH_USER'] == USERNAME &&\n\t\t\t\t$_SERVER['PHP_AUTH_PW'] == PASSWORD\n\t\t\t)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5058788d7f977353b74956619ae4ff06", "score": "0.655988", "text": "private function checkCredentials() {\n\t\ttry {\n\t\t\n\t\t\t$username = null;\n\t\t\t$password = null;\n\t\t\t\n\t\t\tif (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {\n\t\t\t\t\n\t\t\t\t$username = $_SERVER['PHP_AUTH_USER'];\n\t\t\t\t$password = $_SERVER['PHP_AUTH_PW']; \t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ((strcmp($username,'vcddb') == 0) && (strcmp($password,VCDConfig::getWebservicePassword())==0)) {\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$userObj = UserServices::getUserByUsername($username);\n\t\t\t\t\tif ($userObj instanceof userObj && !$userObj->isDeleted() \n\t\t\t\t\t\t&& strcmp($userObj->getPassword(),$password) == 0) {\n\t\t\t\t\t\t// We have a valid user ...\n\t\t\t\t\t\t// Add userObj to session\n\t\t\t\t\t\t$_SESSION['user'] = $userObj;\n\t\t\t\t\t\tself::$userObj = $userObj;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new VCDSecurityException('Invalid Credentials.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sendAuthHeader();\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $ex) {\n\t\t\treturn VCDSoapService::handleSoapError($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "2a272cd53e5738d5c611071011df4b64", "score": "0.65529734", "text": "function valid_user($username) {\r\n\t\t$r1 = '/[A-Z]/'; //uppercase\r\n\t\t$r2 = '/[a-z]/'; //lowercase\r\n\t\t$r3 = '/[!@#$%^&*()\\-_=+{};:,<.>]/'; //special characters\r\n\t\t$r4 = '/[0-9]/'; //numbers\r\n\t\tif ((!preg_match($r1, $username) &&\r\n\t\t\t !preg_match($r2, $username) &&\r\n\t\t\t !preg_match($r4, $username)) ||\r\n\t\t\t preg_match($r3, $username) ||\r\n\t\t\t(strlen($username) < 3 || strlen($username) > 15))\r\n\t\t\treturn FALSE;\r\n\t\t\t\r\n\t\treturn TRUE;\r\n\t}", "title": "" }, { "docid": "8d75e180451a49bc667062c001f4877d", "score": "0.6550532", "text": "public function checkPassword(){\n $regex = '/^[0-9a-zA-Z.]+$/';\n \n if((!preg_match($regex, $this->password))){\n header(\"Location:register.php?status=warning\");\n die(); \n }\n }", "title": "" }, { "docid": "6f29a1370015986c1444467703278513", "score": "0.654506", "text": "function get_user_from_uname_and_pass($username, $password){\n if ($username == $this->username and $password == $this->password){\n print 'Username and password are correct.';\n return $this;\n }\n return False;\n }", "title": "" }, { "docid": "8c0724bccaa433ef73a519e2541f0a14", "score": "0.65401375", "text": "public function verify($username, $password){\n return $username == self::$correctUser && $password == self::$correctPass;\n }", "title": "" }, { "docid": "254bb91be4c28ef7e4611bae3b5df23f", "score": "0.6536151", "text": "public function validatePassword()\n {\n $val = trim($this->data['password']);\n\n // if password is empty return it to the var errors\n if (empty($val)) {\n $this->addError('password', 'password cannot be empty');\n } else {\n // check if the pasword is 'legal'\n if (!preg_match('/^[a-zA-Z0-9]{3,18}$/', $val)) {\n $this->addError('password', 'enter a valid password');\n }\n }\n }", "title": "" }, { "docid": "1909be38dfe4ba1e374114e38030bdb4", "score": "0.6535196", "text": "public function validate_login ( $username, $password )\n {\n $data = array( 'username' => $username,\n 'password' => $password\n );\n\n $query = $this->db->get_where( 'users', $data );\n\n if ( $query->num_rows() == 0 )\n {\n return 0;\n }\n\n if ( $query->num_rows() == 1 )\n {\n return 1;\n }\n }", "title": "" }, { "docid": "31ae099e5f0837f6f47dc768bb95a232", "score": "0.65193397", "text": "public function check_password($password)\n {\n }", "title": "" }, { "docid": "9c902bd7c99dbcc80c5ef19f99b61954", "score": "0.651754", "text": "public function check_password($password)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "e078e011ad3eed559e3274aa136afedb", "score": "0.65154994", "text": "function authenticate($username, $password) {\n if ($username == '' OR $password == '') {\n return -1; //wrong user or pass\n }\n $sql = \"SELECT * FROM users WHERE (email = ? OR nick = ?) AND password = ? LIMIT 1\";\n $query = $this->db->query($sql, array($username, $username, $password));\n if (!$query->num_rows) {\n return -1; //wrong user or pass\n } else { //ok user and pass\n $data = $query->result();\n return $this->_login($data);\n }\n }", "title": "" }, { "docid": "4504cc32f4f59c75509701f0033d843a", "score": "0.651548", "text": "public function checkCredentials($username, $authpass) {\n $stmt = $this->conn->prepare(\"SELECT username, password FROM User_Accounts WHERE username='$username'\");\n $stmt->bind_param(\"ss\", $username, $password);\n \n if ($stmt->execute()) {\n $stmt->store_result();\n $credCheck = false;\n $stmt->bind_result($username, $password);\n $stmt->fetch();\n\n if (password_verify($authpass, $password)) {\n return true;\n } else {\n return false;\n }\n }\n $stmt->close();\n }", "title": "" }, { "docid": "d976cf625b7028eada5ecf9f198d9528", "score": "0.65120095", "text": "function loginAdmin($username, $password) {\r\n\t\t//fetches info for the chosen user\r\n $storedPass = $this->connect()->prepare(\"SELECT * FROM user where username=?\");\r\n $storedPass->execute([$username]);\r\n\t\t$pass = $storedPass->fetch();\r\n\t\t//checks that the password sent matches the password stored in the database. \r\n\t\t//the password stored in the database is of course hashed and salted\r\n if ($pass && password_verify($password, $pass['password'])) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\t}", "title": "" }, { "docid": "26e3dbd24abbec932dd820b9c4ebaf7a", "score": "0.6509485", "text": "function validatePostParameters()\n {\n $validator = ValidationFunctionsFactory::create();\n $userValidator = UserValidationFunctionsFactory::create();\n return ($userValidator->validateUsername() && $validator->validatePasswordHash());\n }", "title": "" }, { "docid": "ce4da60e070b818c0aa93c193e4dd9fa", "score": "0.65088165", "text": "public function authenticate() {\r\n \t$this->errorCode=self::ERROR_NONE; \t\r\n\t\t$user = Member::model()->find('username=?', array($this->username));\r\n\t\t\r\n\t\tif($user === null)\r\n\t\t\t$this->errorCode=self::ERROR_USERNAME_INVALID;\r\n\t\telse if (! $user->validataPassword($this->password))\r\n\t\t\t\r\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\r\n\t\telse {\r\n\t\t\t$this->_id = $user->uid;\r\n\t\t\t$this->username = $user->username;\r\n\t\t\t$this->errorCode=self::ERROR_NONE;\r\n\t\t\t$this->setState('cpid',$user->cpid);\r\n\t\t}\r\n\t\treturn $this->errorCode; //==self::ERROR_NONE;\r\n\t}", "title": "" }, { "docid": "cc260d7dcd2b7969da2c14a3525451f3", "score": "0.65063083", "text": "public function validateUser($username,$password)\n\t{\n\t\tif($this->_passwordMode===TUserManagerPasswordMode::MD5)\n\t\t\t$password=md5($password);\n\t\telse if($this->_passwordMode===TUserManagerPasswordMode::SHA1)\n\t\t\t$password=sha1($password);\n\t\t$username=strtolower($username);\n\t\treturn (isset($this->_users[$username]) && $this->_users[$username]===$password);\n\t}", "title": "" }, { "docid": "d08a3cc6b6922400e794a80feceda09e", "score": "0.6502623", "text": "function user_validation($username, $password)\n{\n $username = strip_tags(addslashes($username));\n $password = strip_tags(addslashes($password));\n\n $db = connect_to();\n $sql = \"SELECT * FROM users WHERE username = '{$username}' AND password = '{$password}'\";\n $result = mysqli_query($db, $sql);\n if(mysqli_num_rows($result) > 0)\n {\n $row = mysqli_fetch_assoc($result);\n $_SESSION['username'] = $row['username'];\n mysqli_close($db);\n return true;\n }\n mysqli_close($db);\n return false;\n}", "title": "" }, { "docid": "16c6192e0ccc72cda5d03dac6142d46c", "score": "0.6498935", "text": "function authenticate($username, $password){\n\t\t\t$result = false;\n\t\t\t$correctPassword = \"\";\n\t\t\t$password = md5($password);\n\t\t\t$sql = \"SELECT password\n\t\t\t\t\t FROM users\n\t\t\t\t\t WHERE username = :username\"; \n\t\t\t$stmt = $this->conn->prepare($sql); \n\t\t\t$stmt->bindValue('username', $username);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\twhile ($row = $stmt->fetch()) { \n\t\t\t\t$correctPassword = $row['password'];\t\n\t\t\t} \n\t\t\t\n\t\t\tif($correctPassword == $password){\n\t\t\t\t$result = true; \n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "f2c8663a3b267c35d54bcdf29463f12c", "score": "0.6494971", "text": "public function validate_password()\r\n {\r\n return $this->checkProperty('password', !empty(trim($this->password)), '%s is required')\r\n && $this->checkProperty('password', strlen($this->password) >= 8 && strlen($this->password) <= 16, '%s must be between 8 and 16 characters long');\r\n }", "title": "" }, { "docid": "7d05791ab58f4516e3111538a6fc0c9a", "score": "0.64734995", "text": "function authenticate($username,$password){\r\n\t\t//validate a users login credentials\r\n\t\t$returnval=false;\r\n\t\t\r\n\t\tif ($username!=NULL && $password!=NULL){ //prevent null bind\r\n\t\t\t$this->_user_dn=$username.$this->_account_suffix;\r\n\t\t\t$this->_user_pass=$password;\r\n\t\t\t\r\n\t\t\t$this->_bind = @ldap_bind($this->_conn,$this->_user_dn,$this->_user_pass);\r\n\t\t\t\r\n\t\t\tif ($this->_bind){ $returnval=true; }\r\n\t\t}\r\n\t\treturn ($returnval);\r\n\t}", "title": "" }, { "docid": "a96a1dabf2ee3c9cb2bb85c8c1b2a27d", "score": "0.64687204", "text": "function isPasswordOk($username, $password, $usernamefield = '', $passwordfield = '', $logintable1 = '')\n\t{\n\t\tif ($logintable1 == '')\n\t\t\t$logintable = $this->conf['logintable'];\n\t\telse\n\t\t\t$logintable = $logintable1;\n\n\t\tif (!$usernamefield)\n\t\t\t$usernamefield = $logintable['usernamefield'];\n\t\tif (!$passwordfield)\n\t\t\t$passwordfield = $logintable['passwordfield'];\n\t\tif (!$usernamefield)\n\t\t\t$usernamefield = 'username';\n\t\tif (!$passwordfield)\n\t\t\t$passwordfield = 'password';\n\n\t\tif ($logintable['passwordfunction'] == '') {\n\t\t\t$where = \"$usernamefield='$username' and '$password'=$passwordfield\";\n\t\t} elseif ($logintable['passwordfunction'] == 'encrypt') {\n\t\t\t$where = \"$usernamefield='$username' and \" . $logintable['passwordfunction'] . \"('$password','ehcp')=$passwordfield\";\n\t\t} else {\n\t\t\t$where = \"$usernamefield='$username' and \" . $logintable['passwordfunction'] . \"('$password')=$passwordfield\";\n\t\t}\n\n\t\t$where .= \" and status='\" . $this->status_active . \"'\";\n\t\t$this->debugecho2(\"file:\" . __FILE__ . \", Line:\" . __LINE__ . \", Function:\" . __FUNCTION__ . \": $username,$password,$usernamefield,$passwordfield,$logintable, query where: ($where) <BR>\", 4);\n\n\t\t$sayi = $this->recordcount($logintable['tablename'], $where);\n\t\tif ($sayi === false) {\n\t\t\t$this->error_occured(\"dologin2\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($sayi == 0) {\n\t\t\treturn false;\n\t\t} elseif ($sayi > 0) {\n\t\t\treturn True;\n\t\t}\n\t}", "title": "" }, { "docid": "47995feba556a3e61dd18fb26bda0848", "score": "0.64621806", "text": "public function validate_username() {\n \n $query = DB::connection()->prepare('SELECT * FROM Band WHERE username = :username');\n $query->execute(array('username' => $this->username));\n $row = $query->fetch();\n \n if ($row) {\n return 'The username has already been taken. Please try another one';\n }\n \n if (parent::validate_string_length($this->username, 2, 20) == false) {\n return 'Please insert a valid username (4-20 characters)';\n } \n }", "title": "" }, { "docid": "81fa087769b5468c5bfb2e70df4f6300", "score": "0.6458937", "text": "function user_login($username, $password) {\n global $DB, $CFG;\n\n //retrieve the user matching username\n $user = $DB->get_record('user', array('username' => $username,\n 'mnethostid' => $CFG->mnet_localhost_id));\n\n //username must exist and have the right authentication method\n if (!empty($user) && ($user->auth == 'googleoauth2')) {\n $code = optional_param('code', false, PARAM_TEXT);\n if($code === false){\n return false;\n }\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6f32bf46d9d53c3ea52f5dfb700551de", "score": "0.6453052", "text": "function userValidate($user, $pw) {\r\n // variables for access validate\r\n $userValid = false;\r\n $pwValid = false;\r\n \r\n // create database object\r\n $db = new Mysql();\r\n \r\n // *** get user ***\r\n $userobj = $db->getUser($user);\r\n \r\n // *** results? ***\r\n if(isset($userobj)) {\r\n // check username\r\n if($userobj->getUsername() == $user) {\r\n $userValid = true;\r\n }\r\n // check password\r\n if(password_verify($pw, $userobj->getPassword())) {\r\n $pwValid = true;\r\n }\r\n \r\n // set session\r\n if($userValid AND $pwValid) {\r\n setSession($userobj);\r\n }\r\n }\r\n \r\n // set error\r\n setError($userValid, $pwValid);\r\n }", "title": "" }, { "docid": "238e6f161cc26a1f9ba8f96047276e8a", "score": "0.6451793", "text": "private function verify_login(string $username, string $password) {\n $rocketchat = new \\local_rocketchat\\client();\n $response = $rocketchat->authenticate($username, $password);\n\n if (is_null($response)) {\n \\core\\notification::error(get_string('validationerror', 'block_rocketchat'));\n return;\n }\n\n if (isset($response->status) && $response->status === 'success') {\n set_user_preference('local_rocketchat_external_user', $username);\n set_user_preference('local_rocketchat_external_token', $response->data->authToken);\n\n \\core\\notification::success(get_string('validationsuccess', 'block_rocketchat'));\n }\n }", "title": "" }, { "docid": "ce785f83d94ca816043b435c47cee2fd", "score": "0.64514816", "text": "private function validatePassword($username, $password) {\n if (User::exists($username)) {\n $user = new User($username);\n if (hash(\"sha256\", $password) == $user->password) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "ddf90c647a1bd710f76eb1cf877e7838", "score": "0.6451477", "text": "function validsemut($username, $password){\n\t\t$query = $this->db->query(\"SELECT * FROM tb_user WHERE Name = '$username' AND Password = '$password'\");\n\t\tif($query->num_rows === 1){\n\t\t\treturn $query->row();\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8d7aad8444163694efa69cb005494a7f", "score": "0.6450048", "text": "function authenticate($username, $password)\n{\n $sql = new DSConn();\n if(userExist($username))\n {\n $result = $sql->get_assoc(\"users\", array(\"passwordhash\"), \"username like '$username'\");\n return password_verify($password, $result['data'][0][\"passwordhash\"]);\n }\n\n return false;\n}", "title": "" }, { "docid": "07b3d2f5059b0fbc027b38ba03d9e1f3", "score": "0.6447816", "text": "public function validateLogin($username, $password) {\n $username = self::$mysqli->real_escape_string($username);\n $password = self::$mysqli->real_escape_string($password);\n\n $hashedPassword = $this->createHash($password);\n $query = \"SELECT * FROM users where username = '$username'\";\n if($result = self::$mysqli->query($query)) {\n if ($row = $result->fetch_assoc()) {\n if($row[\"password\"] == $hashedPassword)\n return $row['user_id'];\n else\n return false;\n }\n else\n return false;\n }\n else\n return false;\n }", "title": "" }, { "docid": "dfc6cc8639e9ed104a08f86861422fbc", "score": "0.644615", "text": "function validateLogin()\n\t{\t \n\t $user = $_POST[\"username\"];\t \n\t $pw = $_POST[\"password\"];\n\t\t$retStr = null;\n\n\t\tif ($user == null || $pw == null)\n\t\t\treturn null;\n\t\tif ((strlen($user) == 0) || (strlen($pw) == 0))\n\t\t\treturn null;\n\n\t\tinclude 'include/db_credentials.php';\n\t\t$con = sqlsrv_connect($server, $connectionInfo);\n\t\t\n\t\t// TODO: Check if userId and password match some customer account. If so, set retStr to be the username.\n\t\t$sql = \"SELECT customerId, admin FROM customer WHERE userid = ? AND password = ?;\";\t\n\t\t$stmt = sqlsrv_query($con, $sql, array($user, $pw));\n\t\tif(!stmt)\n\t\t\tdie(\"<p>There has been an error in validating your account. I tried and I failed.</p>\");\n\t\tif($rst = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC)){\n\t\t\t// the userid and password fields aren't actually unique. You can have two of the same.\n\t\t\t// so im just checking to see if there is someone.\n\t\t\t$_SESSION['admin'] = $rst['admin'];\n\t\t\t$retStr = $user;\n\n\t\t\t// also I'm saving the customerId to the session because it would really speed up our queries\n\t\t}\n\t\t\n\t\t// i don't think im tehnically using a prepared statement\n\t\tsqlsrv_free_stmt($pstmt);\n\t\tsqlsrv_close($con);\n\t\t\n\t\tif ($retStr != null)\n\t\t{\t$_SESSION[\"loginMessage\"] = null;\n\t \t$_SESSION[\"authenticatedUser\"] = $user;\n\t\t}\n\t\telse\n\t\t $_SESSION[\"loginMessage\"] = \"Could not connect to the system using that username/password.\";\n\n\t\treturn $retStr;\n\t}", "title": "" }, { "docid": "a071d2b36fd204daa7e2f763a6316903", "score": "0.6440831", "text": "function validateLogin()\n\t{\n\t $user = $_POST[\"username\"];\n\t $pw = $_POST[\"password\"];\n\t\t$retStr = null;\n\n\t\tif ($user == null || $pw == null)\n\t\t\treturn null;\n\t\tif ((strlen($user) == 0) || (strlen($pw) == 0))\n\t\t\treturn null;\n\n\t\tinclude 'include/db_credentials.php';\n\n\t\ttry {\n\t\t$sql = \"SELECT * FROM customer WHERE userid = ? AND password = ?\";\n\t\t$retStr = null;\n $fullName = null;\n //get connection\n $pdo = new PDO($dsn,$username,$password,$options);\n\t\t$stmt = $pdo->prepare($sql);\n\t\t$stmt->execute([$user, $pw]);\n //result set if any results returned from query\n while($row = $stmt->fetch()) {\n $retStr = $row['userid'];\n $fullName = $row['firstName'] . ' ' . $row['lastName'];\n if($row['admin']==1)\n $_SESSION['admin'] = true;\n }\n\n\t\tif ($retStr != null){\n $_SESSION[\"loginMessage\"] = null;\n \t$_SESSION[\"authenticatedUser\"] = $user;\n $_SESSION[\"fullname\"] = $fullName;\n\t\t}\n\t\telse\n\t\t $_SESSION[\"loginMessage\"] = \"Could not connect to the system using that username/password.\";\n } catch(\\PDOException $e) {\n $_SESSION[\"loginMessage\"] = \"There was an issue connecting to the database, try again.\";\n \t}\n\t\treturn $retStr;\n\t}", "title": "" }, { "docid": "5b366b5cd40b5dda8586de689d9b312a", "score": "0.6440235", "text": "public function validate($input){\n\n return $input == $this->password;\n }", "title": "" }, { "docid": "e4920496ba090a52af5d71e1f34b2d82", "score": "0.64389586", "text": "public function authenticate($pw)\n /* contract for authenticate: verify the provided password is valid for the loaded user account\n *\n * required:\n * pw (string) the password to check\n *\n * optional:\n * N/A\n *\n * returns:\n * true if the password is valid, false otherwise\n *\n * implementation notes:\n * $this->var_mode must equal 'user'\n *\n */\n {\n \treturn false;\n }", "title": "" }, { "docid": "bbaaaccef6a1c05e95e9af5c7937c6af", "score": "0.64323455", "text": "public function checkCreds($username, $password)\n\t\t{\n\t\t\t\t$table = $this->configs->table;\n\t\t\t\t$user_field = $this->configs->username_field;\n\t\t\t\t$pass_field = $this->configs->password_field;\n\n\t\t\t\t$password = Hash::make($password);\n\n\t\t\t\t$user_check = DB::query('\n\t\t\t\t\t\t\t\tSELECT * FROM '.$table.'\n\t\t\t\t\t\t\t\tWHERE '.$user_field.' = :username\n\t\t\t\t\t\t\t\tAND '.$pass_field.' = :password\n\t\t\t\t\t\t\t')\n\t\t\t\t\t\t\t->params(array(\n\t\t\t\t\t\t\t\t':username' => $username,\n\t\t\t\t\t\t\t\t':password' => $password\n\t\t\t\t\t\t\t))\n\t\t\t\t\t\t\t->count();\n\n\t\t\t\tif($user_check == 1)\n\t\t\t\t{\n\t\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "2d294001b77330737ed8b3a19399f135", "score": "0.64290684", "text": "function validatePassword() {\n\t\textract($this->data[$this->alias]);\n\t\t\n\t\t// user already has a password, no need to validate\n\t\tif (isset($id) && isset($password)) {\n\t\t\t$user = $this->findById($id);\n\t\t\tif (empty($password) && $user[$this->alias]['password']) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// check that passwords match\n\t\tif (empty($password1) || empty($password2) || $password1 != $password2) {\n\t\t\t$this->invalidate('password', 'Passwords must match');\n\t\t\t$this->invalidate('password1', 'Passwords must match');\n\t\t\t$this->invalidate('password2', 'Passwords must match');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// assign to proper password field\n\t\t$this->data[$this->alias]['password'] = Security::hash($this->data[$this->alias]['password1'], null, true);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9c4061b7893d2fe6e7458ce825691d9c", "score": "0.64199966", "text": "public function authenticateUser($username, $password){\r\n\t\tif(!empty ($username) && !empty ($password)){\r\n\t\t\tif($this->CriticsDAO->authenticate($username, $password)) // if the authenticate function in usersdao returns any rows then a users credintials were matched\r\n\t\t\t{\r\n\t\t\t\treturn HTTPSTATUS_OK;\r\n\t\t\t}\r\n\t\t\treturn HTTPSTATUS_FORBIDDEN;\r\n\t\t}\r\n\t\telse \r\n\t\t\treturn HTTPSTATUS_UNAUTHORIZED;\r\n\t}", "title": "" }, { "docid": "1b6fefb7ceb845cb804160d1c742b5a4", "score": "0.64186686", "text": "protected function isUsernameValid() {\n if (isset($_POST['username']) && empty($_POST['username'])) {\n $this->addErrorMessage('Please choose your Insights URL.', 'username');\n }\n $is_valid_username = false;\n if (isset($_POST['username']) && !empty($_POST['username'])) {\n $is_valid_username = UpstartHelper::isUsernameValid($_POST[\"username\"]);\n if (!$is_valid_username) {\n $this->addErrorMessage('Must be between 3 - 15 unaccented numbers or letters',\n 'username');\n }\n }\n return (isset($_POST['username']) && $is_valid_username);\n }", "title": "" }, { "docid": "a76ebb8bcc4c027822f5afdba35a547d", "score": "0.64136577", "text": "public static function validateAdmin($username, $password) {\n\t\t$username = trim($username);\n\t\t$password = trim($password);\n\t\t\n\t\t$query = \"SELECT * FROM Admin WHERE username = '\" . $username . \"' and password = '\" . $password . \"';\";\n\t\t$result = Database::executeQuery($query);\n\t\t\n\t\tif($result == null or $result == false) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif($result->num_rows > 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "ad04039d02351d6ca3335659cbac8f6d", "score": "0.641175", "text": "private function checkPasswordCorrectnessAndLogin()\n {\n // remember: the user can log in with username or email address\n $sql = 'SELECT user_name, user_email, user_password_hash\n FROM users\n WHERE user_name = :user_name OR user_email = :user_name\n LIMIT 1';\n $query = $this->db_connection->prepare($sql);\n $query->bindValue(':user_name', $_POST['user_name']);\n $query->execute();\n\n // Btw that's the weird way to get num_rows in PDO with SQLite:\n // if (count($query->fetchAll(PDO::FETCH_NUM)) == 1) {\n // Holy! But that's how it is. $result->numRows() works with SQLite pure, but not with SQLite PDO.\n // This is so crappy, but that's how PDO works.\n // As there is no numRows() in SQLite/PDO (!!) we have to do it this way:\n // If you meet the inventor of PDO, punch him. Seriously.\n $result_row = $query->fetchObject();\n if ($result_row) {\n // using PHP 5.5's password_verify() function to check password\n if (password_verify($_POST['user_password'], $result_row->user_password_hash)) {\n // write user data into PHP SESSION [a file on your server]\n $_SESSION['user_name'] = $result_row->user_name;\n $_SESSION['user_email'] = $result_row->user_email;\n $_SESSION['user_is_logged_in'] = true;\n $this->user_is_logged_in = true;\n return true;\n } else {\n $this->feedback = \"<div class='alert alert-warning'><strong><i class='fa fa-exclamation-triangle'></i></strong> Password Incorrecto.</div>\";\n }\n } else {\n $this->feedback = \"<div class='alert alert-warning'><strong><i class='fa fa-exclamation-triangle'></i></strong> Este Usuario no existe</div>\";\n }\n // default return\n return false;\n }", "title": "" }, { "docid": "84474ff8f580fc3c06845caba1c7f996", "score": "0.64111096", "text": "function validateCredentials($inputUsername, $inputPassword) {\n include 'dbinfo.php';\n $mysqli = new mysqli($dbHost, $dbUsername, $dbPassword, $database);\n if ($mysqli->connect_error) {\n die('Connect Error ('.$mysqli->connect_errno.')'.$mysqli->connect_error);\n }\n\n $result=FALSE;\n if (isset($inputUsername) && isset($inputPassword)) {\n $query = 'select count(*) as usercount from user where Username = ? and Password = ?';\n if ($preparedStatement = $mysqli->prepare($query)) {\n $preparedStatement->bind_param(\"ss\", $inputUsername, $inputPassword);\n $preparedStatement->execute();\n $preparedStatement->bind_result($count);\n $preparedStatement->fetch();\n if ($count > 0) {\n $result = TRUE;\n }\n $preparedStatement->close();\n }\n }\n $mysqli->close();\n return $result;\n}", "title": "" }, { "docid": "02bd2354e40acf1098db10297a3af224", "score": "0.6408368", "text": "function testPassword(){\n\t \t$uname = \"not empty\"; //empty\n\t \t$pass ;\n\t\t\tassert(isset($pass), 'The password field must not be empty.<br>');\n\t\t}", "title": "" }, { "docid": "85726b5fa479a83e3cc0a0790356a2ee", "score": "0.64056486", "text": "public function validate(){\n return ($this->email != NULL && $this->password_hash != NULL && $this->username != NULL);\n }", "title": "" }, { "docid": "85726b5fa479a83e3cc0a0790356a2ee", "score": "0.64056486", "text": "public function validate(){\n return ($this->email != NULL && $this->password_hash != NULL && $this->username != NULL);\n }", "title": "" }, { "docid": "66b961cd49fa19c62c9d52dcfa1f3d18", "score": "0.64055234", "text": "function userLoginValid($username, $userhash) {\r\n return true;\r\n}", "title": "" }, { "docid": "f07f15e8d0251597331c4138d7baa43e", "score": "0.6403511", "text": "function check_login($username, $password) {\r\n\t\t$db = db_connect();\r\n\t\t$password = md5($password);\r\n\r\n\t\tif(!is_user_exist($username)) {\r\n\t\t\talert(\"User Name does not exist !\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$stmt = $db->query(\"select * from Members where USERNAME = '$username' and PASSWORD ='$password'\");\r\n\t\t$count = $stmt->rowCount();\r\n\t\t\r\n\t\tif($count > 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\talert(\"Wrong password!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b4c4f9891a4ca1906b5e53a80056d6ad", "score": "0.6396339", "text": "public function checkLogin()\n {\n $loginLength = strlen($_POST['login']);\n\n if ($loginLength > 7 && $loginLength < 20) {\n return true;\n }\n\n $this->errors[] = 'login not valid';\n }", "title": "" } ]
cf09fdc8fb617526d37d865b7aa88980
our unknown payload error is really just a very specific type of an error. therefore, we can
[ { "docid": "0d3db8a9d64a6af6b5157fa59e1dd339", "score": "0.7067861", "text": "protected function handleUnknown()\n {\n // just pass a carefully crafted error message over to the error method.\n\n $this->handleError(\"Unexpected payload (\" . get_class($this->payload) . \") in \" . get_class($this));\n }", "title": "" } ]
[ { "docid": "6d973a7f32880f2183f2d0d1316915b6", "score": "0.6381118", "text": "protected function unknownErrorHappenedMsg(){\n\n $code = 503; //Service Unavailable\n $status = 'errors';\n $message = \"Unknown error happened, please try again later\";\n $dataContent = '';\n \n return $this->returnApiResult($code, $status, $message, $dataContent);\n }", "title": "" }, { "docid": "4faee5892f1dc97a40790a8d2d32dc1e", "score": "0.6031797", "text": "protected function processError($body) {\n // The body of every erroneous (non-2xx/3xx) GET/POST/PUT/DELETE \n // response goes through here prior to being used as the 'message'\n // of the resulting Mijireh_Rest_Exception\n return $body;\n }", "title": "" }, { "docid": "d331e65a7ffd22f9a5a4113942365406", "score": "0.5956753", "text": "abstract public function getError();", "title": "" }, { "docid": "4707518aa0acd5765e2b765259d69784", "score": "0.58357865", "text": "function returnEmptyPayload($error)\n {\n returnJsonPayload(-1, \"\", \"\", \"\", \"\", \"\", $error);\n }", "title": "" }, { "docid": "320bc1aab5b5db88772c9cbe376c04fd", "score": "0.5803532", "text": "private function throwErrorForUnknownFormat() {\n\t\t$this->Errors[] = __('This file is not supported. Supported producers of kml-files: '.self::$ALLOWED_PRODUCER.'.');\n\t}", "title": "" }, { "docid": "83ab1d38c55b55437e3c2a9690ca496a", "score": "0.5790144", "text": "public function testContentTypeOnError() {\n $ch = curl_init('https://api-sandbox.foxycart.com/');\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_exec($ch);\n $info = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);\n $this->assertEquals('application/vnd.error+json', $info);\n }", "title": "" }, { "docid": "976c142b9f1671830fd2eeaac904cb5e", "score": "0.5754231", "text": "private function getInvalidBodyResponse()\n {\n return [ \"error\" => \"received invalid response body (not valid json) from external service\" ];\n }", "title": "" }, { "docid": "10607f38d3757df29cd612ee391d64be", "score": "0.5722403", "text": "public function getError(): mixed;", "title": "" }, { "docid": "e1d14d934030305c5033adc737613044", "score": "0.57163864", "text": "abstract public function error ();", "title": "" }, { "docid": "97b8a0cf9a65d4ed45572cc26f8ddf04", "score": "0.571452", "text": "abstract public function error();", "title": "" }, { "docid": "97b8a0cf9a65d4ed45572cc26f8ddf04", "score": "0.571452", "text": "abstract public function error();", "title": "" }, { "docid": "97b8a0cf9a65d4ed45572cc26f8ddf04", "score": "0.571452", "text": "abstract public function error();", "title": "" }, { "docid": "807ab81dfd3eba5c0dc7ea3fdb0e4cb4", "score": "0.5709792", "text": "private static function errors($id)\n {\n $data = [\n // HTTP response errors\n '302' => ['context' => '302 Error: Something is wrong. Redirecting to homepage...' ],\n '400' => ['context' => '400 Error: Valid data was given but the request has failed.' ],\n '401' => ['context' => '401 Error: No valid API Key was given..'],\n '404' => ['context' => '404 Error: The requested resource could not be found.'],\n '422' => ['context' => '422 Error: The payload has missing required parameters or invalid data was given.'],\n '429' => ['context' => '429 Error: The requested resource could not be found.'],\n '500' => ['context' => '500 Error: Request failed due to an internal error in Forge.'],\n '503' => ['context' => '503 Error: Forge is offline for maintenance.'],\n\n // General errors\n 'invalid_token' => ['context' => 'Server is returning NULL. Check your Forge API token!'],\n 'is_array($payload)' => ['context' => '$payload needs to be a valid array.'],\n\n // Servers action errors\n 'is_numeric($server_id)' => ['context' => '$server_id needs to be a valid number.'],\n\n // Daemons action errors\n 'is_numeric($daemon_id)' => ['context' => '$daemon_id needs to be a valid number.'],\n\n // Firewall Rules action errros\n 'is_numeric($rule_id)' => ['context' => 'Firewall $rule_id needs to be a valid number.'],\n\n // Scheduled Jobs action errors\n 'is_numeric($job_id)' => ['context' => 'Scheduled $job_id needs to be a valid number.'],\n\n // MySQL Database action errors\n 'is_numeric($database_id)' => ['context' => 'MySQL $database_id needs to be a valid number.'],\n\n // MySQL Database Users action errors\n 'is_array($databases)' => ['context' => 'MySQL $databases needs to be a valid array.'],\n 'is_numeric($user_id)' => ['context' => 'MySQL $user_id needs to be a valid number.'],\n\n // Sites action errors\n 'is_numeric($site_id)' => ['context' => '$site_id needs to be a valid number.'],\n\n // SSL Certificates action errors\n 'is_numeric($ssl_id)' => ['context' => '$ssl_id needs to be a valid number.'],\n\n // SSH Keys action errors\n 'is_numeric($key_id)' => ['context' => '$key_id needs to be a valid number.'],\n\n // Worker action errors\n 'is_numeric($worker_id)' => ['context' => '$worker_id needs to be a valid number.'],\n\n // Recipes action errors\n 'is_numeric($recipe_id)' => ['context' => '$recipe_id needs to be a valid number.'],\n\n // Let's Encrypt extension errors\n 'is_array($add_domains)' => ['context' => '$add_domains needs to be a valid array.'],\n 'is_array($delete_domains)' => ['context' => '$delete_domains needs to be a valid array.'],\n 'is_ssl_installed == false' => ['context' => '$ssl_id needs to be installed first.'],\n 'is_ssl_active == false' => ['context' => '$ssl_id needs to be activated first.'],\n 'is_numeric($new_ssl_id)' => ['context' => '$new_ssl_id needs to be a valid number.'],\n\n// ### DO NOT REMOVE THE ERROR MESSAGES ABOVE THIS LINE! ADD CUSTOM ERRORS BELOW...###\n\n ];\n return $data[$id];\n }", "title": "" }, { "docid": "523a7bc2b08a6691b789bfe2b932d2cf", "score": "0.5691609", "text": "public function with_invalid_payload()\n {\n // Should Return status 201 and created data\n $payload = array(\n \"name\" => \"seventh\",\n \"isbn\" => \"7\",\n \"authors\" => [\"dsgdg\", \"dafs\"],\n \"country\" => \"Nigeria\",\n \"number_of_pages\" => 345,\n \"publisher\" => \"Adedayojs\",\n );\n $this->postJson('api/v1/book', $payload)\n ->assertStatus(400);\n }", "title": "" }, { "docid": "c90f1791d0ab80c89f66c04729af5cbc", "score": "0.56649", "text": "public function getErrorType(): string;", "title": "" }, { "docid": "865d0c78549650a55f8c40bf6e0a6b5b", "score": "0.5648776", "text": "public function geterror() {}", "title": "" }, { "docid": "fd52498844d560626b7a49ff3a9356e2", "score": "0.56282806", "text": "abstract protected function validateRawPayload(array $rawPayload);", "title": "" }, { "docid": "0bacd205c63a51c27a526c1137b0bc72", "score": "0.56203353", "text": "private function getError() {\n // if ($this->config['serialize']) {\n //\n // }\n }", "title": "" }, { "docid": "711a46829e13ef60f1c85fbb7d0c6722", "score": "0.5603655", "text": "protected function _mockApiUnprocessableEntityErrorResponse()\n {\n return json_decode('{\n \"status\": 422,\n \"code\": \"422\",\n \"message\": \"Unprocessable entity\",\n \"developer_message\":\"Your request was understood, but contained invalid parameters.\",\n \"more_info\": \"https://retailer.urb-it.se/api/docs\"\n }', true);\n }", "title": "" }, { "docid": "01696babab083b2dc3923d62fe379617", "score": "0.5597147", "text": "private function _error_occured(){\n $this->_data = array_merge($this->_data,array('message'=>$this->_error));\n\n\t\t$response_data\t\t=\tarray(\n\t\t\t'language'\t=>\t$this->_lang,\n\t\t\t'message'\t=>\t$this->_error,\n\t\t\t'data'\t\t=>\t$this->_data,\n\t\t\t'response'\t=>\t\"\",\n\t\t\t'status'\t=>\t\"error\",\n\t\t\t'time'\t\t=>\ttime()\n\t\t);\n\t\t$this->response($response_data, $this->_http_error);\n\n\t}", "title": "" }, { "docid": "c6e20d035d4af18df1c3014a573c7c08", "score": "0.5575771", "text": "public function getError()\n\t{\n\t\treturn @$this->accumulator_message[ 'http_body' ][ 'error' ];\n\t}", "title": "" }, { "docid": "adfab15e3dd8f49c45996b05e1c77598", "score": "0.5560846", "text": "function get_response_error($response){\n \n //WP error while trying to get the response\n if (is_wp_error($response)) return $response;\n \n //convert API error in WP error\n \n //TO FIX Hatchet.is should unify its errors. \n //See with @muesli : \n //currently it returns different types of objects.\n \n $body = wp_remote_retrieve_body( $response );\n $body = json_decode($body);\n\n if ( ( is_object($body) ) && (property_exists($body,'error')) ){\n\n if (property_exists($body,'error_description')){\n \n return new WP_Error( 'api_error', $body->error_description );\n \n }else{\n \n return new WP_Error( 'api_error', $body->error->description );\n \n }\n \n \n }\n \n return false;\n }", "title": "" }, { "docid": "585545e2b11d9a7b0279cbb9fa5e64c6", "score": "0.5517673", "text": "public function getErrorData();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.54798806", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.54798806", "text": "public function getError();", "title": "" }, { "docid": "da21fdbfc276eb574acd3c6faf802bae", "score": "0.53914845", "text": "abstract protected function extractType(array $rawPayload);", "title": "" }, { "docid": "edfeb90cc85f89b0866b25b03b0a8879", "score": "0.5381064", "text": "public function testPayloadWithUnknownEventShouldBeRejected()\n {\n $payload = [[\n \"email\" => \"[email protected]\",\n \"timestamp\" => 1554728844,\n \"smtp-id\" => \"<14c5d75ce93.dfd.64b469@ismtpd-555>\",\n \"event\" => \"wrongwrong\",\n \"category\" => \"cat facts\",\n \"sg_event_id\" => \"WiiomrqWErazAXdj782fZw==\",\n \"sg_message_id\" => \"14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0\"\n ]];\n\n $preWebhookCount = SendgridWebhookEvent::count();\n\n /** @var \\Illuminate\\Foundation\\Testing\\TestResponse $result */\n $result = $this->postJson(\n 'sendgrid/webhook',\n $payload\n );\n $result->assertStatus(422);\n $result->assertSee('The selected 0.event is invalid.');\n\n $postWebhookCount = SendgridWebhookEvent::count();\n\n $this->assertEquals($preWebhookCount, $postWebhookCount, \"No new database rows should be created\");\n }", "title": "" }, { "docid": "845cdf8966de5f88c033a4f6ad5727bb", "score": "0.5373045", "text": "private function badRequest() {\n\t\t$response = $this->api->response();\n\t\t$response['Content-Type'] = 'application/json';\t\t\n\t\t$response->status(400);\n\t\t$results = array(\"success\" => false);\n\t\t$response->body(json_encode($results));\n\t}", "title": "" }, { "docid": "845cdf8966de5f88c033a4f6ad5727bb", "score": "0.5373045", "text": "private function badRequest() {\n\t\t$response = $this->api->response();\n\t\t$response['Content-Type'] = 'application/json';\t\t\n\t\t$response->status(400);\n\t\t$results = array(\"success\" => false);\n\t\t$response->body(json_encode($results));\n\t}", "title": "" }, { "docid": "845cdf8966de5f88c033a4f6ad5727bb", "score": "0.5373045", "text": "private function badRequest() {\n\t\t$response = $this->api->response();\n\t\t$response['Content-Type'] = 'application/json';\t\t\n\t\t$response->status(400);\n\t\t$results = array(\"success\" => false);\n\t\t$response->body(json_encode($results));\n\t}", "title": "" }, { "docid": "49712fdef55a8118cb8f38307f8df5a2", "score": "0.5370555", "text": "function error($e)\n\t{\n\t\tif($e->getResponse())\n\t\t\t{\n\t\t\t\t$this->error = ErrorCode::where(['error_code' => $e->getResponse()->getStatusCode()])->first();\n\t\t\t\tif(count((array)$this->error) > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->response['response_type'] \t= \"error\";\n\t\t\t\t\t$this->response['response_code'] \t= $this->error->error_code;\n\t\t\t\t\t$this->response['response_message'] = $this->error->error_message_default;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->response['response_type'] \t= \"error\";\n\t\t\t\t\t$this->response['response_code'] \t= \"HI_100\";\n\t\t\t\t\t$this->response['response_message'] = \"something went wrong\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->response['response_type'] \t= \"error\";\n\t\t\t\t$this->response['response_code'] \t= \"HI_101\";\n\t\t\t\t$this->response['response_message'] = \"invalid url provided or url could not found\";\n\t\t\t}\n\t\t\t\n\t\treturn $this->response;\t\t\n\t}", "title": "" }, { "docid": "c53a28f6ee96bb038829a6d080dd1ad9", "score": "0.5352792", "text": "abstract public function OnDecodeError(EmailSource $oSource, $index, EmailMessage $oEmail);", "title": "" }, { "docid": "56dce5e445ab9da17e59c02a04065fd1", "score": "0.5350274", "text": "abstract protected function getRawPayload(RestPayload $payload);", "title": "" }, { "docid": "862acfb4207c5a505efe7dbc5722c717", "score": "0.5344882", "text": "public function testPostEntity422UnprocessableEntity(): void\n {\n $p_data = [\n // 'name' => self::$faker->words(3, true),\n 'birthDate' => self::$faker->date(),\n 'deathDate' => self::$faker->date(),\n 'imageUrl' => self::$faker->imageUrl(),\n 'wikiUrl' => self::$faker->url\n ];\n $response = $this->runApp(\n 'POST',\n self::RUTA_API,\n $p_data,\n $this->getTokenHeaders(parent::$writer['username'], parent::$writer['password'])\n );\n $this->internalTestError($response, StatusCode::STATUS_UNPROCESSABLE_ENTITY);\n }", "title": "" }, { "docid": "e79ccb514c7a2a881512e16d6fb7a580", "score": "0.5344661", "text": "abstract public function getPayload(): Payload;", "title": "" }, { "docid": "89a2773ad3b98ad2c2071dc2dd6d5773", "score": "0.5337983", "text": "function error_response($error_message)\n{\n return [\n 'statusCode' => 500,\n 'body' => $error_message\n ];\n}", "title": "" }, { "docid": "98b1811a3e579cc883cea2921aa8163b", "score": "0.53369844", "text": "protected function handleInvalid()\n {\n }", "title": "" }, { "docid": "58eb93c9089fe47f3df4e4e40ae69081", "score": "0.53315604", "text": "function display_error_message_from_result( $result ) {\n\t\t$msg = json_decode( $result['body'] )->error->message;\n\t\t$this->display_error_message( $msg );\n\t}", "title": "" }, { "docid": "1b5b0f023db199c37e5c5898bd9e1525", "score": "0.53276074", "text": "function errorInResponse() {\n return $this->feed_unavailable;\n }", "title": "" }, { "docid": "56cde78edab597d23fa8ab50dca92cd6", "score": "0.53251857", "text": "public function testMalformedJsonException()\n {\n new Request(\"no json\");\n }", "title": "" }, { "docid": "2b041db9ae1fbf8080fa80c6323ff3a2", "score": "0.531889", "text": "private function _getTokenError()\n {\n $fieldMapping = array(\n 'email' => self::SSO_ERROR_NO_EMAIL,\n 'firstName' => self::SSO_ERROR_NO_NAME,\n 'lastName' => self::SSO_ERROR_NO_NAME,\n );\n\n foreach($fieldMapping as $field => $error) {\n if ($this->session->getProfileData($field) === '') {\n return $error;\n }\n }\n\n return self::SSO_ERROR_UNKNOWN;\n }", "title": "" }, { "docid": "0e5672f58588b7a20f5f70f9a053d9b8", "score": "0.5316702", "text": "private static function checkForErrors() {\n if( version_compare( PHP_VERSION, '5.3.0', '>=' ) ) {\n\n $errNo = json_last_error();\n\n switch( $errNo ) {\n case JSON_ERROR_DEPTH:\n $error = 'Maximum stack depth exceeded';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $error = 'Underflow or the modes mismatch';\n break;\n case JSON_ERROR_CTRL_CHAR:\n $error = 'Unexpected control character found';\n break;\n case JSON_ERROR_SYNTAX:\n $error = 'Syntax error, malformed JSON';\n break;\n case JSON_ERROR_NONE:\n default:\n $error = '';\n }\n\n // JSON_ERROR_UTF8 introduced in PHP 5.3.3\n if( version_compare( PHP_VERSION, '5.3.3', '>=' ) ) {\n if( $errNo === JSON_ERROR_UTF8 ) {\n $error = 'Malformed UTF-8 characters, possibly incorrectly encoded';\n }\n }\n\n if( $error ) {\n throw new Exception( 'JSON Error: ' . $error );\n }\n }\n }", "title": "" }, { "docid": "38b56aa328c2d8a50e3ffcc4f6d7d26a", "score": "0.5308718", "text": "public function testRequestFail()\n {\n $stream = $this->getStream('Reddit', 'unknown-reddit-user-that-doesnt-exists-as-of-now');\n $stream->getResponse();\n\n $errors = $stream->getErrors();\n $this->assertTrue(!empty($errors));\n }", "title": "" }, { "docid": "651bc74d73c6d93fcf717cbb21a975e7", "score": "0.5301019", "text": "abstract public function error(): string;", "title": "" }, { "docid": "51f5e23a87ab5cccfb5dcffc07615da0", "score": "0.53004277", "text": "public function getError()/*# : array */;", "title": "" }, { "docid": "c4d56ed2291313cb64404fa06a2674b5", "score": "0.5291048", "text": "protected function _mockApiInvalidDeliveryDateTimeErrorResponse()\n {\n return json_decode('{\n \"status\": 500,\n \"code\": \"RET-004\",\n \"message\": \"Invalid delivery datetime\",\n \"developer_message\": \"The specified delivery date and time is invalid for the specified Delivery type.\",\n \"more_info\": \"https://retailer.urb-it.se/api/docs\"\n }', true);\n }", "title": "" }, { "docid": "b20956dec5f61b8e061566541af5eb44", "score": "0.5277287", "text": "function error() {\r\n\t}", "title": "" }, { "docid": "02bda1d3590ec179015a6afdb8785a14", "score": "0.52716887", "text": "public function testShouldParseErrorResponse()\n {\n $data = \"\\xda\\x87\\x00\\x00\\x00\\x03\\x00\\x81\\x03\";\n\n /* @var $response ErrorResponse */\n $response = ResponseFactory::parseResponse($data);\n\n $this->assertInstanceOf(ErrorResponse::class, $response);\n $this->assertEquals(ModbusPacket::READ_COILS, $response->getFunctionCode());\n $this->assertEquals(3, $response->getErrorCode());\n $this->assertEquals('Illegal data value', $response->getErrorMessage());\n }", "title": "" }, { "docid": "939732628ea83256e308247539b682a0", "score": "0.5271547", "text": "abstract protected function getErrorMessage();", "title": "" }, { "docid": "24b060f867fbde19937b4208fb291c5b", "score": "0.5263052", "text": "function kcw_movies_api_Error($msg) {\n $data = array();\n $data[\"message\"] = $msg;\n $data[\"status\"] = \"Error\";\n return $data;\n}", "title": "" }, { "docid": "82504fa7c3af3e8759d6fd6d0f5a6ba2", "score": "0.5253278", "text": "function exception_noParameter(){\n\t\t//meta infomation\n\t\t$meta = metaInformation();\n\n\t\t//error message\n\t\t$error = array(\n\t\t\t'message' => 'Error. user data or content data is NULL'\n\t\t);\n\n\t\t//to json\n\t\t$result = array(\n\t\t\t'meta'=>$meta,\n\t\t\t'error'=>$error\n\t\t);\n\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "fc4536f26f8cc953fd92b7b3cd123569", "score": "0.52502275", "text": "protected function decode()\n {\n /**\n * Preform the actual decode\n */\n $this->body = json_decode($this->body);\n\n /**\n * set the new error code and message\n */\n $this->error->code = json_last_error();\n\n switch (json_last_error()) {\n case JSON_ERROR_DEPTH:\n $this->error->message = 'The maximum stack depth has been exceeded';\n break;\n case JSON_ERROR_STATE_MISMATCH:\n $this->error->message = 'Invalid or malformed JSON';\n break;\n case JSON_ERROR_CTRL_CHAR:\n $this->error->message = 'Control character error, possibly incorrectly encoded';\n break;\n case JSON_ERROR_SYNTAX:\n $this->error->message = 'Syntax error';\n break;\n case JSON_ERROR_UTF8:\n $this->error->message = 'Malformed UTF-8 characters, possibly incorrectly encoded';\n break;\n }\n }", "title": "" }, { "docid": "63ab3c60e0a763f72ba3f082d6c5de45", "score": "0.524535", "text": "public function getError()\n {\n $msgType = $this->data->getMsgType();\n\n return $msgType == 'TOKENRESPONSE' ? null : 'Your transaction was unsuccessful. Please try again';\n }", "title": "" }, { "docid": "236fee76639855c138bb63803926fe8c", "score": "0.5236018", "text": "protected function _mockApiInvalidPickupLocationErrorResponse()\n {\n return json_decode('{\n \"status\": 500,\n \"code\": \"RET-003\",\n \"message\": \"Invalid pickup location\",\n \"developer_message\": \"No valid Pickup location was found for the given Pickup location identifier.\",\n \"more_info\": \"https://retailer.urb-it.se/api/docs\"\n }', true);\n }", "title": "" }, { "docid": "4497430ee7d348e27fedb8b27177d7dd", "score": "0.52299356", "text": "public function error(): string {}", "title": "" }, { "docid": "4497430ee7d348e27fedb8b27177d7dd", "score": "0.52299356", "text": "public function error(): string {}", "title": "" }, { "docid": "99e48b81417f711c5e4cfedeb2f7fcf1", "score": "0.5227556", "text": "function emfl_api_error( $msg ) {\n echo '<h3>ERROR</h3><pre>' . $msg . '</pre>';\n}", "title": "" }, { "docid": "90db852b99db547feb1bcd50dd61654a", "score": "0.52246743", "text": "protected function _mockApiInvalidDeliveryLocationErrorResponse()\n {\n return json_decode('{\n \"status\": 500,\n \"code\": \"RET-002\",\n \"message\": \"The delivery location is located outside of the Urb-it availability zone.\",\n \"developer_message\": \"HMAC authorization failed.\",\n \"more_info\": \"https://retailer.urb-it.se/api/docs\"\n }', true);\n }", "title": "" }, { "docid": "7cef91a36d8ac6df5c05ea39e9b9f2ac", "score": "0.5221373", "text": "public function curlHeaderError($json){\n $ch = curl_init($json); \n $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $header = substr($json, 0, $header_size); \n $body = substr($json, $header_size); \n $content = strstr($body, '{');\n $decoded = json_decode($content, true);\n $error = $decoded['error'];\n\n return $error;\n }", "title": "" }, { "docid": "5f399ca50cc00b5c8eb536d51b9ea015", "score": "0.5216979", "text": "function handleValidationError($response){\n\t$msg = '';\n\tswitch ($response[\"code\"]) {\n\t\tcase \"validation\":\n\t\t\t$msg .= \"<ul class='error'>\";\n\t\t\tif (!empty($response[\"generalErrors\"])) {\n\t\t\t\tforeach ($response[\"generalErrors\"] as $generalError) {\n\t\t\t\t\t$msg .= \"<li>\" . $generalError;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($response[\"propertyErrors\"])) {\n\t\t\t\tforeach ($response[\"propertyErrors\"] as $propertyKey => $propertyValue) {\n\t\t\t\t\t$msg .= \"<li>\" . $propertyValue[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($response[\"customFieldErrors\"])) {\n\t\t\t\tforeach ($response[\"customFieldErrors\"] as $customKey => $customValue) {\n\t\t\t\t\t$msg .= \"<li>\" . $customValue[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$msg .= \"</ul>\";\n\t\t\tbreak;\n\t\tcase \"maxItems\":\n\t\t\t$msg .= lang('error.maxItems');\n\t\t\tif (!empty($response[\"maxItems\"])) {\n\t\t\t\t$msg .= \"<br>\" . lang('error.maxItems.max') . \" \" . $response[\"maxItems\"] . \".\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"queryParse\":\n\t\t\t$msg .= lang('error.queryParse');\n\t\t\tif (!empty($response[\"value\"])) {\n\t\t\t\t$msg .= \"<br>\" . lang('error.queryParse.text') . \" \" . $response[\"value\"] . \".\";\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"dataConversion\":\n\t\t\t$msg .= lang('error.dataConverse');\n\t\t\tif (!empty($response[\"value\"])) {\n\t\t\t\t$msg .= \"<br>\" . lang('error.dataConverse.item') . \" \" . $response[\"value\"] . \".\";\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$msg .= lang('error.unknown');\n\t}\n\treturn $msg;\n}", "title": "" }, { "docid": "e55563d124d89a2d7f9ebef77fe818d8", "score": "0.52126443", "text": "function getError();", "title": "" }, { "docid": "ea018adcbbef1ac6a836004e018781ae", "score": "0.5210801", "text": "public function testThrowsInfluxDBExceptionIfAnyErrorInSeries()\n {\n\n $errorResult = <<<EOD\n{\n \"results\": [\n {\n \"series\": [],\n \"error\": \"There was an error after querying\"\n }\n ]\n}\nEOD;\n new ResultSet($errorResult);\n }", "title": "" }, { "docid": "9bc96b68b5a0abbabffcd082b2c7c095", "score": "0.5208678", "text": "public function testExceptionIsThrownWithInvalidPayload(): void\n {\n $controller = new RenewPasswordController();\n\n $invalidPayload = json_encode([\n 'old_password' => 'titi'\n ]);\n $this->request\n ->expects($this->once())\n ->method('getContent')\n ->willReturn($invalidPayload);\n\n $this->expectException(\\InvalidArgumentException::class);\n $controller($this->useCase, $this->request, $this->presenter, 'admin');\n }", "title": "" }, { "docid": "b4d720ec99ac45095bf182bd4bb4e5fb", "score": "0.5199883", "text": "public function setGenericError()\n\t{\n\t\t$this->_output_fields['response_code'] = 'failure';\n\t\t$this->_output_fields['status'] = ERR_GENERIC_SERVER;\n\t}", "title": "" }, { "docid": "65b20e63b1c4ad564fb6736377b78beb", "score": "0.51849425", "text": "private function logMalformedPayload($payload, array $validationErrors)\n {\n if (config('sendgridwebhooks.log_malformed_payload')) {\n Log::log(\n config('sendgridwebhooks.log_malformed_payload_level'),\n 'Malformed Sendgrid webhook received',\n [\n 'payload' => $payload,\n 'validation_errors' => $validationErrors,\n ]\n );\n }\n }", "title": "" }, { "docid": "c06fdda9fcb87191f3363c42ea69327c", "score": "0.51807135", "text": "function returnWithError( $err)\n {\n // Prepare json file to send error\n $retValue = '{\"id\":0,\"error\":\"' . $err . '\"}';\n sendResultInfoAsJson($retValue);\n }", "title": "" }, { "docid": "d1adc05b9e0594fd163e9348072c0858", "score": "0.51790756", "text": "abstract public function error_code();", "title": "" }, { "docid": "cb442fa17e71b9a7fe5cc5ece181ba43", "score": "0.51729274", "text": "function error($msg){\n\t\t//echo \"\\t\" . $msg;\n\t\t//echo $this->serverApiKey. \" - \", print_r($this->devices);\n\t\texit(1);\n\t}", "title": "" }, { "docid": "bb185d71b0240dccc0110dee5e8f106c", "score": "0.5165712", "text": "function _scalar_rc_die_handler( $message = '' ) {\n if ( is_scalar( $message ) )\n die( (string) $message );\n die();\n }", "title": "" }, { "docid": "5b4eb5f3cfbb791d2cbe9d9023fbc534", "score": "0.5163909", "text": "private function checkMyParcelErrors(): void\n {\n if (! is_array($this->response['response']) || empty($this->response['response']['errors'])) {\n return;\n }\n\n $error = reset($this->result['errors']);\n $this->errorCodes = Arr::pluck($this->response['response']['errors'], 'code');\n\n if ((int) key($error) > 0) {\n $error = current($error);\n }\n\n $this->error = RequestError::getTotalMessage($error, $this->response);\n }", "title": "" }, { "docid": "c8dc86f4aea51dd0bcea29bb016241b1", "score": "0.5160603", "text": "public static function handle_json_decoding_error() {\n switch( json_last_error() ) {\n case JSON_ERROR_NONE:\n return;\n break;\n case JSON_ERROR_DEPTH:\n throw new Exception('JSON Parsing error: Maximum stack depth exceeded', static::CODE_INVALID_JSON);\n break;\n case JSON_ERROR_CTRL_CHAR:\n case JSON_ERROR_UTF8:\n throw new Exception('JSON Parsing error: Unexpected control character found or incorrect character encoding', static::CODE_INVALID_JSON);\n break;\n case JSON_ERROR_SYNTAX:\n case JSON_ERROR_STATE_MISMATCH:\n throw new Exception('JSON Parsing error: Malformed JSON', static::CODE_INVALID_JSON);\n break;\n }\n }", "title": "" }, { "docid": "8bbc3949a4eee78ea4eb82e7cce7ed85", "score": "0.51588553", "text": "function returnWithError( $err)\n {\n $retValue = '{\"id\":0,\"error\":\"' . $err . '\"}';\n sendResultInfoAsJson($retValue);\n }", "title": "" }, { "docid": "8bbc3949a4eee78ea4eb82e7cce7ed85", "score": "0.51588553", "text": "function returnWithError( $err)\n {\n $retValue = '{\"id\":0,\"error\":\"' . $err . '\"}';\n sendResultInfoAsJson($retValue);\n }", "title": "" }, { "docid": "b8565634af131c573ebd0a3cdbc0ec39", "score": "0.5141556", "text": "public function testFeedWithIncorrectPayloadSize()\n {\n // an incorrect payload size that just happens to point to an offset\n // where another valid frame end marker is found.\n $buffer = chr(Constants::FRAME_METHOD)\n . \"\\x00\\x01\" // channel\n . \"\\x00\\x00\\x00\\x11\" // invalid size, payload is ACTUALLY 8 bytes, not 17\n . \"\\x00\\x0a\" // class (connection)\n . \"\\x00\\x14\" // method (secure)\n . \"\\x00\\x00\\x00\\x00\" // channel field - long string reported as zero bytes\n . chr(Constants::FRAME_END)\n . chr(Constants::FRAME_HEARTBEAT)\n . \"\\x00\\x00\" // channel\n . \"\\x00\\x00\\x00\\x00\" // size\n . \"\\x00\" // invalid payload\n . chr(Constants::FRAME_END);\n\n $this->setExpectedException(\n ProtocolException::class,\n 'The AMQP server has sent invalid data: Mismatch between frame size (25) and consumed bytes (16).'\n );\n\n iterator_to_array($this->subject->feed($buffer));\n }", "title": "" }, { "docid": "30f539735ff65362c38d7a79dd655a6a", "score": "0.51410216", "text": "public function lastError () {}", "title": "" }, { "docid": "7ad284cf727bf66af8f85c71e5cceb8a", "score": "0.5138597", "text": "public function createFail() {\n //var_dump($response);\n }", "title": "" }, { "docid": "43e490617ad2f04e26286ee62530ab0b", "score": "0.51365066", "text": "protected function _mockApiServiceUnavailableErrorResponse()\n {\n return json_decode('{\n \"status\": 503,\n \"code\": \"503\",\n \"message\": \"Service unavailable\",\n \"developer_message\": \"Retailer service is temporarily unavailable.\",\n \"more_info\": \"https://retailer.urb-it.se/api/docs\"\n }', true);\n }", "title": "" }, { "docid": "77ff265466a902fae44bcc9c2efd43fa", "score": "0.5136133", "text": "public function error() {\n return $this->emit(Core::object(array(\n 'time' => time(),\n 'body' => func_num_args() > 1 ? func_get_args() : func_get_arg(0),\n 'level' => Log_Level::ERROR)));\n }", "title": "" }, { "docid": "ef2e57639a1fbfc3506e761be99353b9", "score": "0.51346695", "text": "function fbird_errmsg() {}", "title": "" }, { "docid": "0a21d5e8cfb30d1066073114ccb12ddc", "score": "0.5133295", "text": "public function testConvertFromRawExceptionUndefinedEntityMap()\n {\n $rawState = [];\n\n $this\n ->if($converter = new TestedClass())\n ->then\n ->exception(\n function () use ($converter, $rawState) {\n $converter->convertFromRaw($rawState);\n }\n )\n ->isInstanceOf(DraftjsException::class)\n ->hasMessage('Undefined entityMap key not allowed')\n ;\n }", "title": "" }, { "docid": "e5ee1d9fd441d6fa650307b1ab37cd6a", "score": "0.51321834", "text": "function get_err_message($msg){\r\n\t$tmps = explode('{', $msg);\r\n\treturn str_replace($tmps[0], '', $msg);\r\n}", "title": "" }, { "docid": "cc0352629acb198235957271ce64abbf", "score": "0.5125407", "text": "public function requestHasContentTypeHeaderWithBadMediaType()\n {\n // Set config\n config()->set('jsonapi.stopAtFirstError', true);\n\n $mediaType = $this->getMediaType();\n\n // Sends request and gets response\n $headers = ['Content-Type' => 'application/json'];\n $url = route('photos.index');\n $content = [];\n $response = parent::json('GET', $url, $content, $headers);\n\n // Checks the response (status code, headers) and the content\n $response->assertJsonApiResponse400(\n [\n [\n Members::ERROR_STATUS => '400',\n Members::ERROR_TITLE => JsonResponse::$statusTexts[400],\n Members::ERROR_DETAILS => sprintf(Messages::ERROR_CONTENT_TYPE_HEADER_BAD_MEDIA_TYPE, $mediaType)\n ]\n ]\n );\n }", "title": "" }, { "docid": "6ecf3b204f7888b3c9ec556e1345ae83", "score": "0.51214296", "text": "abstract function getErrors();", "title": "" }, { "docid": "7aacd614a9725c6f07925e61a6c1a2c5", "score": "0.5117396", "text": "function fbird_errcode() {}", "title": "" }, { "docid": "da5967b4e6fa0fc7af2664167a5dbabf", "score": "0.510508", "text": "public function getErrorData(): array;", "title": "" }, { "docid": "123676b99a6f51d3877a1842d59e27c7", "score": "0.5102888", "text": "public function get_error()\n {\n return $this->message['error'];\n }", "title": "" }, { "docid": "28ed8e2c5a1cffd19ee547e96fd7f749", "score": "0.5099004", "text": "protected function getErrorData()\n {\n $error = [\n 'message' => $this->error,\n 'type' => $this->getErrorType(),\n 'code' => $this->getErrorCode(),\n ];\n\n if ($this->error instanceof ValidationException) {\n $error['message'] = $this->getErrorMessage();\n\n if ($this->error->validator) {\n $error['fields'] = static::flattenMessageBag($this->error->validator->messages());\n }\n } elseif ($this->error instanceof Exception) {\n $error['message'] = $this->getErrorMessage();\n } else {\n return $this->error;\n }\n\n return $error;\n }", "title": "" }, { "docid": "92ad520dc84e3b48b88cc28a0fb96a93", "score": "0.50943464", "text": "abstract public function getReadableError();", "title": "" }, { "docid": "7c9c309e1d3106ebc4e6ce09daf83b46", "score": "0.50928277", "text": "abstract protected function handle_error( $message );", "title": "" }, { "docid": "f7a9a34314243ea0e6dfbaa4a0a1eff8", "score": "0.50917935", "text": "abstract public function testError();", "title": "" }, { "docid": "fe6b4106b31de17ac537d4bfcc60281f", "score": "0.5087898", "text": "protected function handleError($body)\n {\n $firstMessage = $this->getFirstMessage($body);\n $error = 'An error occurred. Nexmo status code: ' . $firstMessage['status'];\n if ($this->hasProperty($firstMessage, 'error-text')) {\n $error = $firstMessage['error-text'];\n }\n\n $this->throwNotSentException($error, $firstMessage['status']);\n }", "title": "" }, { "docid": "75c43b9460c9b1057a974f916d83ef21", "score": "0.5087254", "text": "public function test_llms_rest_bad_request_error() {\n\n\t\t// Default.\n\t\t$err = llms_rest_bad_request_error();\n\t\t$this->assertIsWPError( $err );\n\t\t$this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $err );\n\t\t$this->assertWPErrorDataEquals( array( 'status' => 400 ), $err );\n\t\t$this->assertWPErrorMessageEquals( 'Invalid or malformed request syntax.', $err );\n\n\t\t// Custom message.\n\t\t$err = llms_rest_bad_request_error( 'My message.' );\n\t\t$this->assertIsWPError( $err );\n\t\t$this->assertWPErrorCodeEquals( 'llms_rest_bad_request', $err );\n\t\t$this->assertWPErrorDataEquals( array( 'status' => 400 ), $err );\n\t\t$this->assertWPErrorMessageEquals( 'My message.', $err );\n\n\t}", "title": "" }, { "docid": "c003aada91841f2c7947b4d6d9381152", "score": "0.5083872", "text": "public function testWithParsedBodyInvalidArgument()\n {\n $serverRequest = $this->getServerRequestForTest();\n $newRequest = $serverRequest->withParsedBody('value cannot be string');\n }", "title": "" }, { "docid": "9b3d25bd5efc38b89f90b6555d4b0597", "score": "0.508266", "text": "public function apiError($data=array()) {\n\t\t\n\t\treturn (object) array(\n\t\t\t\t\t\"RESPONSE\" => 25,\n\t\t\t\t\t\"ERROR\" => \"API Error - Nothing to display\",\n\t\t\t\t\t\"__errorLog\" => ($this->_devMode?\"Error in API Request\":\"\"),\n\t\t\t\t\t\"data\" => array()\n\t\t\t\t);\t\t\t \t\n\t}", "title": "" }, { "docid": "9888475f665b93c56346e1d8058994dc", "score": "0.5074741", "text": "function exception_noParameter(){\n\t\t//meta infomation\n\t\t$meta = metaInformation();\n\n\t\t//error message\n\t\t$error = array(\n\t\t\t'message' => 'Error. user data is NULL'\n\t\t);\n\n\t\t//to json\n\t\t$result = array(\n\t\t\t'meta'=>$meta,\n\t\t\t'error'=>$error\n\t\t);\n \techo json_encode($result);\n\t}", "title": "" }, { "docid": "1126f3bd02246f6958e46d72af7f8b32", "score": "0.50717753", "text": "private function _error_msg_process($errors)\n {\n \t$type_ind = array(3 =>'FATAL ERROR', 0 => 'INFO', 1 => 'WARNING', 2 => 'ERROR', 10 =>'NO SUPPORT');\n \t$type = 'unknown';\n \t\n \tforeach ($errors as $error_obj)\n \t{\n \t\tforeach ($type_ind as $key => $ind)\n \t\t{\n \t\t\t$pos = stripos($error_obj->message, $ind);\n \t\t\t//if indicator string is found somewhere in the beginning\n \t\t\tif ($pos !== FALSE && $pos < 10) \n \t\t\t{\n \t\t\t\t//$type = strtolower($ind);\n \t\t\t\t//all xslt messages are reported as level 2, so need to be adjusted\n \t\t\t\t($key === 10) ? $key = 1 : $key = $key ;\n \t\t\t\t$level = $key;\n \t\t\t\t$error_obj->message = trim(substr($error_obj->message, $pos+strlen($ind)+1));\n \t\t\t\tbreak 1;\n \t\t\t}\n \t\t} \t\n \t\t//$error_obj -> type = $type; \t\t\n \t\tif (isset($level))\n \t\t{\n \t\t\t$error_obj -> level = $level;\n \t\t}\n \t} \t\n return $errors; \n }", "title": "" }, { "docid": "3bcda554b859e8fdb8930b967038f02b", "score": "0.5071501", "text": "abstract public function failed();", "title": "" }, { "docid": "8691f6c12c73d49bad44035abbc0acbb", "score": "0.50693256", "text": "function prd_error_lookup($e) {\n\n\t$errors = array(\n\t\t0\t\t=> array('An unknown, unlisted error occurred','There was an internal error contacting PRD, or the error was not listed in the error database.'),\n\t\t1\t\t=> array('[Internal Execution Error]','There was an internal error processing the card payment.'),\n\t\t3\t\t=> array('USERID not found','There was an internal error processing the card payment.'),\n\t\t5\t\t=> array('NOT Authorized','There was an internal error processing the card payment.'),\n\t\t7\t\t=> array('Internal Web Svc Info not found','There was an internal error processing the card payment.'),\n\t\t8\t\t=> array('Could not LOAD Web Service Option information','There was an internal error processing the card payment.'),\n\t\t10\t\t=> array('Web service inactive','There was an internal error processing the card payment.'),\n\t\t11\t\t=> array('Web service inactive','There was an internal error processing the card payment.'),\n\t\t12\t\t=> array('Web service inactive','There was an internal error processing the card payment.'),\n\t\t13\t\t=> array('Services Disabled','There was an internal error processing the card payment.'),\n\t\t20\t\t=> array('SSL error','There was an internal error processing the card payment.'),\n\t\t21\t\t=> array('[Internal execution error]','There was an internal error processing the card payment.'),\n\t\t23\t\t=> array('IP error','There was an internal error processing the card payment.'),\n\t\t30\t\t=> array('Org on file for your organization is bad','There was an internal error processing the card payment.'),\n\t\t31\t\t=> array('Org parameter is bad','There was an internal error processing the card payment.'),\n\t\t32\t\t=> array('Org parameter and Org on file don’t match','There was an internal error processing the card payment.'),\n\t\t33\t\t=> array('Program Type ID parameter not passed','There was an internal error processing the card payment.'),\n\t\t34\t\t=> array('Program Type ID not registered for your company','There was an internal error processing the card payment.'),\n\t\t35\t\t=> array('Program Type ID bad','There was an internal error processing the card payment.'),\n\t\t36\t\t=> array('Program ID bad','There was an internal error processing the card payment.'),\n\t\t37\t\t=> array('Program type id not valid for web service','There was an internal error processing the card payment.'),\n\t\t40\t\t=> array('Reference ID not valid','There was an internal error processing the card payment.'),\n\t\t41\t\t=> array('Transaction ID not valid','There was an internal error processing the card payment.'),\n\t\t42\t\t=> array('Transcode not valid','There was an internal error processing the card payment.'),\n\t\t1010\t=> array('Payment type not valid','There was an internal error processing the card payment.'),\n\t\t1020\t=> array('Currency type not valid','The selected currency is invalid.'),\n\t\t1030\t=> array('Order amount not valid','The order amount is missing or invalid.'),\n\t\t1040\t=> array('Amount paid not valid','The order amount is missing or invalid.'),\n\t\t1050\t=> array('Sub order (after parsing ecommerce order) has an amount paid that is not valid for payment_type','The order amount is missing or invalid.'),\n\t\t2010\t=> array('No customer information was supplied','Customer information missing or invalid.'),\n\t\t2020\t=> array('Format of customer information not valid','Customer information missing or invalid.'),\n\t\t2030\t=> array('Cust org must be specified if web svc org is a parent and customer_number is set','Customer information missing or invalid.'),\n\t\t2040\t=> array('Cust org not valid','Customer information missing or invalid.'),\n\t\t2050\t=> array('Customer number must be supplied if refresh customer is \"Y\"','Customer information missing or invalid.'),\n\t\t2060\t=> array('Customer number not valid','Customer information missing or invalid.'),\n\t\t2070\t=> array('First name not valid','Customer information missing or invalid.'),\n\t\t2080\t=> array('MI not valid','Customer information missing or invalid.'),\n\t\t2090\t=> array('Last name not valid','Customer information missing or invalid.'),\n\t\t2100\t=> array('Professional Title not valid','Customer information missing or invalid.'),\n\t\t2110\t=> array('Business Name not valid','Customer information missing or invalid.'),\n\t\t2120\t=> array('Add1 not valid','Customer information missing or invalid.'),\n\t\t2130\t=> array('Add2 not valid','Customer information missing or invalid.'),\n\t\t2140\t=> array('Add3 not valid','Customer information missing or invalid.'),\n\t\t2150\t=> array('City not valid','Customer information missing or invalid.'),\n\t\t2160\t=> array('State not valid','Customer information missing or invalid.'),\n\t\t2170\t=> array('Zip not valid','Customer information missing or invalid.'),\n\t\t2180\t=> array('Country not valid','Customer information missing or invalid.'),\n\t\t2190\t=> array('Phone not valid','Customer information missing or invalid.'),\n\t\t2200\t=> array('FAX not valid','Customer information missing or invalid.'),\n\t\t2210\t=> array('Title not valid','Customer information missing or invalid.'),\n\t\t2220\t=> array('Suffix not valid','Customer information missing or invalid.'),\n\t\t2230\t=> array('Email not valid','Customer information missing or invalid.'),\n\t\t2240\t=> array('Alt City not valid','Customer information missing or invalid.'),\n\t\t2250\t=> array('Optin flag not valid','Customer information missing or invalid.'),\n\t\t3010\t=> array('Gift customer array has an invalid format','Customer information missing or invalid.'),\n\t\t3020\t=> array('Gift ref not supplied','Customer information missing or invalid.'),\n\t\t3030\t=> array('The same gift ref is used for more than one gift customer','Customer information missing or invalid.'),\n\t\t3040\t=> array('Gift ref has an invalid format','Customer information missing or invalid.'),\n\t\t3050\t=> array('Gift ref not found on any order','Customer information missing or invalid.'),\n\t\t3060\t=> array('Gift cust org must be specified if web svc org is a parent and customer_number is set','Customer information missing or invalid.'),\n\t\t3070\t=> array('Gift org invalid','Customer information missing or invalid.'),\n\t\t3080\t=> array('Gift customer number not valid','Customer information missing or invalid.'),\n\t\t3090\t=> array('Gift first name not valid','Customer information missing or invalid.'),\n\t\t3100\t=> array('Gift MI not valid','Customer information missing or invalid.'),\n\t\t3110\t=> array('Gift last name not valid','Customer information missing or invalid.'),\n\t\t3120\t=> array('Gift Professional Title not valid','Customer information missing or invalid.'),\n\t\t3130\t=> array('Gift Business Name not valid','Customer information missing or invalid.'),\n\t\t3140\t=> array('Gift add1 not valid','Customer information missing or invalid.'),\n\t\t3150\t=> array('Gift add2 not valid','Customer information missing or invalid.'),\n\t\t3160\t=> array('Gift add3 not valid','Customer information missing or invalid.'),\n\t\t3170\t=> array('Gift city not valid','Customer information missing or invalid.'),\n\t\t3180\t=> array('Gift state not valid','Customer information missing or invalid.'),\n\t\t3190\t=> array('Gift zip not valid','Customer information missing or invalid.'),\n\t\t3200\t=> array('Gift country not valid','Customer information missing or invalid.'),\n\t\t3210\t=> array('Gift phone not valid','Customer information missing or invalid.'),\n\t\t3220\t=> array('Gift FAX not valid','Customer information missing or invalid.'),\n\t\t3230\t=> array('Gift title not valid','Customer information missing or invalid.'),\n\t\t3240\t=> array('Gift suffix not valid','Customer information missing or invalid.'),\n\t\t3250\t=> array('Gift email not valid','Customer information missing or invalid.'),\n\t\t3260\t=> array('Gift Alt City not valid','Customer information missing or invalid.'),\n\t\t3270\t=> array('Gift optin flag not valid','Customer information missing or invalid.'),\n\t\t4010\t=> array('Ship addresses array has an invalid format','Customer information missing or invalid.'),\n\t\t4020\t=> array('Ship ref not supplied','Customer information missing or invalid.'),\n\t\t4030\t=> array('The same ship ref is used for more than one shipping address','Customer information missing or invalid.'),\n\t\t4040\t=> array('Ship ref has an invalid format','Customer information missing or invalid.'),\n\t\t4050\t=> array('Ship ref not found on any order','Customer information missing or invalid.'),\n\t\t4060\t=> array('Ship first name not valid','Customer information missing or invalid.'),\n\t\t4070\t=> array('Ship MI not valid','Customer information missing or invalid.'),\n\t\t4080\t=> array('Ship last name not valid','Customer information missing or invalid.'),\n\t\t4090\t=> array('Ship Professional Title not valid','Customer information missing or invalid.'),\n\t\t4100\t=> array('Ship Business Name not valid','Customer information missing or invalid.'),\n\t\t4110\t=> array('Ship add1 not valid','Customer information missing or invalid.'),\n\t\t4120\t=> array('Ship add2 not valid','Customer information missing or invalid.'),\n\t\t4130\t=> array('Ship add3 not valid','Customer information missing or invalid.'),\n\t\t4140\t=> array('Ship city not valid','Customer information missing or invalid.'),\n\t\t4150\t=> array('Ship state not valid','Customer information missing or invalid.'),\n\t\t4160\t=> array('Ship zip not valid','Customer information missing or invalid.'),\n\t\t4170\t=> array('Ship country not valid','Customer information missing or invalid.'),\n\t\t4180\t=> array('Ship phone not valid','Customer information missing or invalid.'),\n\t\t4190\t=> array('Ship FAX not valid','Customer information missing or invalid.'),\n\t\t4200\t=> array('Ship title not valid','Customer information missing or invalid.'),\n\t\t4210\t=> array('Ship suffix not valid','Customer information missing or invalid.'),\n\t\t5010\t=> array('\"cn_orders\" does not have the correct format','There was an internal error processing the card payment.'),\n\t\t5020\t=> array('\"ca_orders\" does not have the correct format','There was an internal error processing the card payment.'),\n\t\t5030\t=> array('\"su_orders\" does not have the correct format','There was an internal error processing the card payment.'),\n\t\t5040\t=> array('Nothing was ordered','There was an internal error processing the card payment.'),\n\t\t5050\t=> array('Program type id on order not valid','There was an internal error processing the card payment.'),\n\t\t5060\t=> array('Payment type not valid for program type','There was an internal error processing the card payment.'),\n\t\t5070\t=> array('Order org not valid','There was an internal error processing the card payment.'),\n\t\t5080\t=> array('Key code not valid','There was an internal error processing the card payment.'),\n\t\t5090\t=> array('Product on order not valid','There was an internal error processing the card payment.'),\n\t\t5100\t=> array('Could not resolve to a valid brand id','There was an internal error processing the card payment.'),\n\t\t5110\t=> array('Gift ref on order not found in gift_customers','There was an internal error processing the card payment.'),\n\t\t5120\t=> array('Ship ref on order not found in ship_addresses','There was an internal error processing the card payment.'),\n\t\t5130\t=> array('Ship ref on order, but not allowed for program type','There was an internal error processing the card payment.'),\n\t\t5140\t=> array('Both gift_ref and ship_ref on the same order not allowed','There was an internal error processing the card payment.'),\n\t\t5150\t=> array('Qty not valid','The order amount is missing or invalid.'),\n\t\t5160\t=> array('Price not valid','The order amount is missing or invalid.'),\n\t\t5170\t=> array('Shipping not valid','The order amount is missing or invalid.'),\n\t\t5180\t=> array('Tax not valid','The order amount is missing or invalid.'),\n\t\t5190\t=> array('Rush charge not valid','The order amount is missing or invalid.'),\n\t\t5200\t=> array('Net discount not valid','The order amount is missing or invalid.'),\n\t\t5210\t=> array('\"Send email confirmation\" not valid','Customer information missing or invalid.'),\n\t\t5220\t=> array('Auto charge not valid','There was an internal error processing the card payment.'),\n\t\t5230\t=> array('Ref order ID not valid','There was an internal error processing the card payment.'),\n\t\t5240\t=> array('Nickname not valid','There was an internal error processing the card payment.'),\n\t\t5250\t=> array('Priority shipping not valid','There was an internal error processing the card payment.'),\n\t\t5260\t=> array('Allow contract limits not valid','There was an internal error processing the card payment.'),\n\t\t5270\t=> array('Premium 1 not valid','There was an internal error processing the card payment.'),\n\t\t5280\t=> array('Premium 2 not valid','There was an internal error processing the card payment.'),\n\t\t5290\t=> array('Premium 3 not valid','There was an internal error processing the card payment.'),\n\t\t5300\t=> array('Term not valid','There was an internal error processing the card payment.'),\n\t\t5310\t=> array('Start issue not valid','There was an internal error processing the card payment.'),\n\t\t5320\t=> array('Survey Trans ID not valid','There was an internal error processing the card payment.'),\n\t\t5330\t=> array('Survey Trans ID not valid for payment type','There was an internal error processing the card payment.'),\n\t\t5340\t=> array('Price on purchase record was zero, which is not valid','The order amount is missing or invalid.'),\n\t\t5350\t=> array('Price on purchase record was zero, which is not valid if shipping or tax have a value','The order amount is missing or invalid.'),\n\t\t5360\t=> array('Price on purchase record was zero, but free_ok was not Y','The order amount is missing or invalid.'),\n\t\t5370\t=> array('Invalid purchase record customer_number','Customer information missing or invalid.'),\n\t\t5380\t=> array('Customer not found using purchase record customer_number','Customer information missing or invalid.'),\n\t\t5390\t=> array('Product not active / valid (for subscriptions only)','There was an internal error processing the card payment.'),\n\t\t5400\t=> array('Agency code not valid','There was an internal error processing the card payment.'),\n\t\t5410\t=> array('Agency remit amount not valid','There was an internal error processing the card payment.'),\n\t\t5420\t=> array('Agency code supplied but no agency_remit_amt','There was an internal error processing the card payment.'),\n\t\t5430\t=> array('Agency remit amount supplied but no agency_code','There was an internal error processing the card payment.'),\n\t\t5440\t=> array('Invalid ship_code was passed','Shipping information missing or invalid.'),\n\t\t5450\t=> array('When ship_code is specified, priority_shipping cannot be \"Y\" (they are mutually exclusive.)','Shipping information missing or invalid.'),\n\t\t5460\t=> array('Invalid order_ref_id was passed','There was an internal error processing the card payment.'),\n\t\t5470\t=> array('Invalid vendor_id was passed','There was an internal error processing the card payment.'),\n\t\t5480\t=> array('Invalid web_survey was passed','There was an internal error processing the card payment.'),\n\t\t5490\t=> array('Invalid web_survey payment type was passed','There was an internal error processing the card payment.'),\n\t\t5500\t=> array('Invalid entity_id was passed','There was an internal error processing the card payment.'),\n\t\t5510\t=> array('Errors with drop_ship (defaults to “N” if not “Y”)','Shipping information missing or invalid.'),\n\t\t5520\t=> array('Errors with drop_ship_status (defaults to “” if not “S” or drop_ship is not “Y”)','Shipping information missing or invalid.'),\n\t\t5530\t=> array('nickname did not pass validation','Customer information missing or invalid.'),\n\t\t5540\t=> array('access_duration_type did not pass validation','There was an internal error processing the card payment.'),\n\t\t5550\t=> array('access_duration did not pass validation','There was an internal error processing the card payment.'),\n\t\t5560\t=> array('access_eff_date did not pass validation','There was an internal error processing the card payment.'),\n\t\t5570\t=> array('access_duration_type, access_duration, or access_eff_date were passed in, but not all of them (which is required.)','There was an internal error processing the card payment.'),\n\t\t5610\t=> array('\"sp_orders\" does not have the correct format','There was an internal error processing the card payment.'),\n\t\t5620\t=> array('Product was not active/valid','There was an internal error processing the card payment.'),\n\t\t5630\t=> array('No special programs ordered','There was an internal error processing the card payment.'),\n\t\t5640\t=> array('offer_pmt not valid','There was an internal error processing the card payment.'),\n\t\t5650\t=> array('offer_tax not valid','There was an internal error processing the card payment.'),\n\t\t5670\t=> array('offer_baldue not valid','There was an internal error processing the card payment.'),\n\t\t5690\t=> array('offer_baldue_date not valid','There was an internal error processing the card payment.'),\n\t\t5700\t=> array('If offer_baldue > 0, offer_baldue_date is required, but is missing','There was an internal error processing the card payment.'),\n\t\t5710\t=> array('recurring_amt is not valid','There was an internal error processing the card payment.'),\n\t\t5730\t=> array('recurring_date is not valid','There was an internal error processing the card payment.'),\n\t\t5740\t=> array('If recurring_amt > 0, recurring_date is required, but is missing','There was an internal error processing the card payment.'),\n\t\t5750\t=> array('frequency is not valid','There was an internal error processing the card payment.'),\n\t\t5760\t=> array('period is not valid','There was an internal error processing the card payment.'),\n\t\t5770\t=> array('payment_type is not valid based on the amounts on this order','There was an internal error processing the card payment.'),\n\t\t5610\t=> array('\"sp_orders\" does not have the correct format','There was an internal error processing the card payment.'),\n\t\t6010\t=> array('Could not find the customer matchkey using customer number','Customer information missing or invalid.'),\n\t\t6020\t=> array('Could not find the gift customer matchkey using gift customer number','Customer information missing or invalid.'),\n\t\t6030\t=> array('Could not find the customer profile using customer number','Customer information missing or invalid.'),\n\t\t6040\t=> array('Could not find the gift customer profile using gift customer number','Customer information missing or invalid.'),\n\t\t6050\t=> array('DB error adding customer','There was an internal error processing the card payment.'),\n\t\t6060\t=> array('DB error adding gift customer','There was an internal error processing the card payment.'),\n\t\t6070\t=> array('Error adding customer','There was an internal error processing the card payment.'),\n\t\t6080\t=> array('Error adding gift customer','There was an internal error processing the card payment.'),\n\t\t6090\t=> array('No response adding customer','There was an internal error processing the card payment.'),\n\t\t6100\t=> array('No response adding gift customer','There was an internal error processing the card payment.'),\n\t\t6110\t=> array('Customer could not be found OR added','Customer information missing or invalid.'),\n\t\t6120\t=> array('Gift customer could not be found OR added','Customer information missing or invalid.'),\n\t\t7000\t=> array('No transactions allowed in readonly mode','There was an internal error processing the card payment.'),\n\t\t9999\t=> array('Unknown error occurred','There was an internal error processing the card payment.'),\n\t\t10260\t=> array('decline: Declined', 'The card has been declined.')\n\t);\n\tif (!array_key_exists($e, $errors)) {\n\t\t$e = 9999;\n\t}\n\treturn $errors[$e];\n}", "title": "" }, { "docid": "38b705635236a2e197fd6194ade622f8", "score": "0.5064428", "text": "function returnWithError($err)\r\n {\r\n $retVal = '{\"id\":0,\"error\":\"' . $err . '\"}';\r\n sendResultInfoAsJson($retVal);\r\n }", "title": "" }, { "docid": "96b63511a78c399ef4849d3401a7ea9f", "score": "0.5062035", "text": "function createErrorResponse($errors){ \n\t$faults = array();\n\t$faults['faults'] = array();\n\t$errorList = $errors -> getErrorExceptions();\n\tforeach($errorList as $e){\n\t\tarray_push($faults['faults'], $e->getMessage());\n\t}\n\treturn $faults;\n}", "title": "" } ]
935c42acfff2bfd11e2a6f22adf2087c
Creates simple content pages.
[ { "docid": "ef13f7a8afee27b2f3010d1d7ff0fdf4", "score": "0.0", "text": "public function createTextContentPage(SiteInterface $site, string $url, string $title, string $content): void\n {\n $page = $this->pageManager->create();\n $page->setSlug(sprintf('/%s', $url));\n $page->setUrl(sprintf('/%s', $url));\n $page->setName($title);\n $page->setTitle($title);\n $page->setEnabled(true);\n $page->setDecorate(1);\n $page->setRequestMethod('GET|POST|HEAD|DELETE|PUT');\n $page->setTemplateCode('default');\n $page->setRouteName('page_slug');\n $page->setSite($site);\n $page->setParent($this->getReference('page-homepage'));\n\n $page->addBlocks($block = $this->blockInteractor->createNewContainer([\n 'enabled' => true,\n 'page' => $page,\n 'code' => 'content_top',\n ]));\n\n // add the breadcrumb\n $block->addChildren($breadcrumb = $this->blockManager->create());\n $breadcrumb->setType('sonata.page.block.breadcrumb');\n $breadcrumb->setPosition(0);\n $breadcrumb->setEnabled(true);\n $breadcrumb->setPage($page);\n\n // Add text content block\n $block->addChildren($text = $this->blockManager->create());\n $text->setType('sonata.block.service.text');\n $text->setSetting('content', sprintf('<h2>%s</h2><div>%s</div>', $title, $content));\n $text->setPosition(1);\n $text->setEnabled(true);\n $text->setPage($page);\n\n $this->pageManager->save($page);\n }", "title": "" } ]
[ { "docid": "c5f40842b5027f252717a26742db40dd", "score": "0.74788404", "text": "abstract protected function view_generatePageContent();", "title": "" }, { "docid": "ddf8e1ebad9dd5b0d2b64584e92434a0", "score": "0.7325683", "text": "static public function createPages() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "fe929f26c482d7e882c57411af72c0b5", "score": "0.72874653", "text": "function createPage();", "title": "" }, { "docid": "13e46973af2ef1f1dc25619fdd011ab4", "score": "0.7136196", "text": "public function createContentAndCopyLivePage() {}", "title": "" }, { "docid": "b5d8e70e350675dd5cf71766693bb8ae", "score": "0.7081014", "text": "function lb_show_make_page() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'make_page',\n\t\t\t'pages' => lb_get_all_pages_from_pages(),\n\t\t)\n\t);\n}", "title": "" }, { "docid": "8dd75f4e9943ba99bf3bc6d0f4024227", "score": "0.7012443", "text": "function createContent($page)\n{\n\tswitch ($page) \n\t{ \n\t\tcase \"Bio-Home\":\n\t\t\treturn createBioHomeContent();\t\n\t\t\tbreak;\n\t\tcase \"Bio-New\":\n\t\t\treturn createBioNewContent();\t\n\t\t\tbreak;\n\t\tcase \"Bio-New-Organism\":\n\t\t\treturn createBioNewOrgContent();\t\n\t\t\tbreak;\n\t\tcase \"Bio-New-Tank\":\n\t\t\treturn createBioNewTankContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Plate\":\n\t\t\treturn createBioNewPlateContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Bacteria\":\n\t\t\treturn createBioNewBacteriaContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Colony\":\n\t\t\treturn createBioNewColonyContent();\n\t\t\tbreak;\n\t\tcase \"Bio-New-Sequence\":\n\t\t\treturn createBioNewSequenceContent();\n\t\t\tbreak;\n\t\tcase \"Bio-Edit\":\n\t\t\treturn createBioEditContent();\n\t\t\tbreak;\n\t\tcase \"Bio-Blast\":\n\t\t\treturn createBioBlastContent();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn createErrorContent();\n\t\t\tbreak;\n\t}\n\t\n\n}", "title": "" }, { "docid": "ee66732627d7743ca18dcaf1ff6fe316", "score": "0.6818266", "text": "public function testCreatePage()\n {\n // 1. Create Page\n $this->createPage();\n\n // 2. Test if content is created\n $this->assertTrue(Content::first() ? true : false);\n }", "title": "" }, { "docid": "71e14759b97f396ccafb5f656bbb5799", "score": "0.6795535", "text": "function createPages() {\n\t// drop pages table (for development only)\n\tDB::exec(\"DROP TABLE IF EXISTS pages\");\n\n\t// `name` should be unique and cannot be null\n\t// `route` must be unique but can be null (e. g. when a page shouldn't be accessible via an URL)\n\t// `layout` is a foreign key that references ANOTHER row in the pages table,\n\t// \tif the referenced row is deleted the value will be set to NULL\n\tDB::exec(\"CREATE TABLE pages (\n\t\tid INT NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\t\tname VARCHAR(50) NOT NULL UNIQUE,\n\t\troute VARCHAR(50) NULL UNIQUE,\n\t\tcontent TEXT NULL\n\t)\");\n\n\toutput(RESULT_INFO, \"Pages setup successfully completed\");\n\treturn 1;\n}", "title": "" }, { "docid": "b89a6d49d957c23875fef824dd39bd78", "score": "0.6792309", "text": "public function run()\n {\n Page::create([\n 'title' => 'Front Page',\n 'content' => '\n <p>Platanus is an established hotel in Barrio Barretto that offers leisure and recreation\n within the hustle of Barretto, Olongapo City. Only 10 minutes away from the bars and\n restaurants that offer a broad selection of diverse cuisines from all over the world. </p>\n\n <p>The hotel ensures guests comfort and gives them the quality service. With 9 spacious air-conditioned rooms,\n among the amenities offered are complimentary Wi-Fi access, non-smoking rooms, cable TV, air-conditioned rooms,\n private bathroom with hot and cold water, some rooms have access to a balcony.</p>\n\n <p>Take a breather in the hotel\\'s incredible facilities like an outdoor swimming pool, fitness center, massage, and garden area where you can sit back and laze.</p>\n <p>Hotel Platanus is an excellent choice for quality accommodation in Barretto for daily and long term stay.</p>',\n ]);\n\n Page::create([\n 'title' => 'Side Description',\n 'content' => '<p>Set in Clark, 32 km from Mount Pinatubo, Platanus Hotel features an outdoor swimming pool.\n Featuring a restaurant, the property also has a garden. The property offers a 24-hour front desk. </p>',\n ]);\n }", "title": "" }, { "docid": "bd45a1f9da9287a71488199a471148a9", "score": "0.6684696", "text": "public function makePage()\n {\n $db = new DB();\n $page_color = !empty($db->getOptions('page_color')) ? 'style=\"background-color:' . $db->getOptions('page_color') . ';\"' : '';\n $footer_color = !empty($db->getOptions('footer_color')) ? 'style=\"background-color:' . $db->getOptions('footer_color') . ';\"' : '';\n echo '<!DOCTYPE html>\n<html lang=\"en\">\n<head>';\n\n $this->makeMeta();\n $this->setTitle();\n $this->makeStyles();\n $this->makeHeaderScripts();\n echo '<!-- header code -->' . PHP_EOL;\n if (!empty($this->getHeaderCode())) {\n echo $this->getHeaderCode() . PHP_EOL;\n }\n echo '<!-- header code -->' . PHP_EOL;\n echo '</head>\n\n\t\t<body class=\"' . $this->getbodyClass() . '\" ' . $page_color . '>';\n\n echo '<div class=\"main-wrapper\" >';\n if ($this->hasHeader) {\n echo '<header class=\"header\" >';\n if ($this->hasNavbar) {\n require_once 'Navbar.php';\n }\n echo '</header>';\n }\n\n\n//--main content---\n if ($this->hasBreadcrumb) {\n $routes = explode(\"/\", $_SERVER['REQUEST_URI']);\n echo '\n<div class=\"breadcrumb-bar d-print-none\" ' . $footer_color . '>\n\t\t\t\t<div class=\"container-fluid\">\n\t\t\t\t\t<div class=\"row align-items-center\">\n\t\t\t\t\t\t<div class=\"col-md-12 col-12\">\n\t\t\t\t\t\t\t<nav aria-label=\"breadcrumb\" class=\"page-breadcrumb\">\n\t\t\t\t\t\t\t\t<ol class=\"breadcrumb\">\n\t\t\t\t\t\t\t\t\t<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/\"><i class=\"bx bx-home-alt\"></i></a></li>';\n\n for ($i = 1; $i < count($routes) - 1; $i++) {\n if ($i != count($routes) - 1) {\n echo '<li class=\"breadcrumb-item\"><a href=\"' . BASE_PATH . $routes[1] . '/' . $routes[$i] . '/\">' . $routes[$i] . '</a></li>';\n } else {\n echo '<li class=\"breadcrumb-item active\">' . $routes[$i] . '</li>';\n }\n }\n echo '\n\t\t\t\t\t\t\t\t</ol>\n\t\t\t\t\t\t\t</nav>\n\t\t\t\t\t\t\t<h2 class=\"breadcrumb-title\">' . $this->getPageTitle() . '</h2>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>';\n }\n echo '<div class=\"content\">';\n echo '<div class=\"container-fluid\">';\n if ($this->isHasContent()) {\n $this->addPageContent($this->getPageContent());\n }\n\n echo '</div></div>';\n\n echo '<!-- above footer code -->' . PHP_EOL;\n\n /*--footer---*/\n if ($this->hasFooter) {\n require_once 'footer.php';\n }\n echo '</div>';\n $this->makeScripts();\n $this->makeFooterScripts();\n if ($this->ishasError()) {\n $this->showPageError();\n }\n\n echo '<!-- footer code -->' . PHP_EOL;\n if (!empty($this->getFooterCode())) {\n echo $this->getFooterCode() . PHP_EOL;\n }\n echo '<!-- footer code -->' . PHP_EOL;\n echo '</body>\n</html>';\n }", "title": "" }, { "docid": "ee8f456b8de193bccb4a7ce5b2576d95", "score": "0.6670621", "text": "function createPage($name) {\n //Keep track of the new page's location.\n $location = $_SERVER['DOCUMENT_ROOT'] . \"/pages/\" . $name . \".php\";\n //Check to make sure the file doesn't already exist.\n if(file_exists($location)) {\n //If it does exist, just load into that page.\n header('Refresh: 0; URL = /pages/' . $name . '.php');\n }\n //Create a new php page in the pages folder.\n $newPage = fopen($location, \"w\");\n //Ensure that the user can write, and that anyone can read it.\n //If need be, put this in an \"if\" statement in case it throws an error.\n chmod($location, 0644);\n //Add the default stuff like header.php\n $defaultText = '<?php\n include ($_SERVER[\\'DOCUMENT_ROOT\\'] . \"/php/header.php\");\n?>\n<head>\n</head>\n<body id=\"body\" class=\"nested\">\n</body>';\n //Write the default text into the new page.\n fwrite($newPage, $defaultText);\n //Close editing\n fclose($newPage);\n //Load the new page\n header('Refresh: 0; URL = /pages/' . $name . '.php');\n }", "title": "" }, { "docid": "b4eb47d4398ff1c9f29b799dc8dbcc94", "score": "0.665999", "text": "public function index() {\n\t\t$map_content['title_page'] = 'Карта сайта';\n\t\t$this->html_map = '';\n\t\t$this->map_generation();\n\t\t\n\n\t\t$map_content['text'] = $this->html_map;\n\t\t$this->layout='pages';\n\t\t$this->sitemap=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\n\t\t$this->sitemap.=\"<urlset xmlns=\\\"http://www.sitemaps.org/schemas/sitemap/0.9\\\">\";\n\t\t$this->map_generation_xml();\n\t\t$this->sitemap.=\"</urlset>\";\n\n\t\t$file=\"sitemap.xml\";\n\t\t\n\t\t$fp = fopen($file, \"w\"); \n\t\t\n\t\tfwrite($fp,$this->sitemap);\n\t\t\n\t\tfclose($fp);\n\t\t$this->html->render('pages/pages.html', $map_content, 'container');\n\t}", "title": "" }, { "docid": "24dcc6b2a9377b638fe56eb65254b64e", "score": "0.66268736", "text": "protected function defaultdata()\n {\n // create one page with 2 columns and some content\n $page = array('title' => $this->__('Content introduction page'),\n 'urlname' => $this->__('content-introduction-page'),\n 'layout' => 'Column2d6238',\n 'setLeft' => '0',\n 'setRight' => '1',\n 'language' => ZLanguage::getLanguageCode());\n\n // Insert the default page\n if (!($obj = DBUtil::insertObject($page, 'content_page'))) {\n LogUtil::registerStatus($this->__('Warning! Could not create the default Content introductory page.'));\n } else {\n // create the contentitems for this page\n $content = array();\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '0',\n 'position' => '0',\n 'module' => 'Content',\n 'type' => 'Heading',\n 'data' => serialize(array('text' => $this->__('A Content page consists of various content items in a chosen layout'),\n 'headerSize' => 'h3')));\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '1',\n 'position' => '0',\n 'module' => 'Content',\n 'type' => 'Html',\n 'data' => serialize(array('text' => $this->__('<p>Each created page has a specific layout, like 1 column with and without a header, 2 columns, 3 columns. The chosen layout contains various content areas. In each area you can place 1 or more content items of various kinds like:</p> <ul> <li>HTML text;</li> <li>YouTube videos;</li> <li>Google maps;</li> <li>Flickr photos;</li> <li>RSS feeds;</li> <li>Computer Code;</li> <li>the output of another Zikula module.</li> </ul> <p>Within these content areas you can sort the content items by means of drag & drop.<br /> You can make an unlimited number of pages and structure them hierarchical. Your page structure can be displayed in a multi level menu in your website.</p>'),\n 'inputType' => 'text')));\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '1',\n 'position' => '1',\n 'module' => 'Content',\n 'type' => 'Html',\n 'data' => serialize(array('text' => $this->__('<p><strong>This is a second HTML text content item in the left column</strong><br /> Content is an extendible module. You can create your own content plugins and layouts and other Zikula modules can also offer content items. The News published module for instance has a Content plugin for a list of the latest articles.</p>'),\n 'inputType' => 'text')));\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '2',\n 'position' => '0',\n 'module' => 'Content',\n 'type' => 'Quote',\n 'data' => serialize(array('text' => $this->__('No matter what your needs, Zikula can provide the solution.'),\n 'source' => 'http://zikula.org', 'desc' => 'Zikula homepage')));\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '2',\n 'position' => '1',\n 'module' => 'Content',\n 'type' => 'ComputerCode',\n 'data' => serialize(array('text' => $this->__('$this->doAction($var); // just some code'))));\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '2',\n 'position' => '2',\n 'module' => 'Content',\n 'type' => 'Html',\n 'data' => serialize(array('text' => $this->__('<p>So you see that you can place all kinds of content on the page in your own style and liking. This makes Content a really powerful module.</p> <p>This page uses the <strong>2 column (62|38) layout</strong> which has a header, 2 colums with 62% width on the left and 38% width on the right and a footer</p>'),\n 'inputType' => 'text')));\n $content[] = array('pageId' => $obj['id'],\n 'areaIndex' => '3',\n 'position' => '0',\n 'module' => 'Content',\n 'type' => 'Html',\n 'data' => serialize(array('text' => $this->__('This <strong>footer</strong> finishes of this introduction page. Good luck with using Content. The <a href=\"index.php?module=content&type=admin\">Edit Contents</a> interface lets you edit or delete this introduction page. In the <a href=\"index.php?module=content&type=admin\">administration</a> interface you can further control the Content module.'),\n 'inputType' => 'text')));\n\n // write the items to the dbase\n foreach ($content as $contentitem) {\n DBUtil::insertObject($contentitem, 'content_content');\n }\n }\n }", "title": "" }, { "docid": "5d99e5f6b9c91823268734fc15a147e0", "score": "0.66061485", "text": "public function run()\n {\n StaticPage::create([\n \"label\" => StaticPageLabels::TERMS,\n 'en' => ['title' => 'Terms & Conditions', \"content\" => \"Content of the page is right here.\"],\n 'ar' => ['title' => 'الشروط والأحكام', \"content\" => \"محتوى صفحة الشروط هنا بالظبط.\"],\n ]);\n\n StaticPage::create([\n \"label\" => StaticPageLabels::PRIVACY,\n 'en' => ['title' => 'Privacy Policy', \"content\" => \"Content of the page is right here.\"],\n 'ar' => ['title' => 'سياسة الخصوصية', \"content\" => \"محتوى صفحة الخصوصية هنا بالظبط.\"],\n ]);\n\n }", "title": "" }, { "docid": "34e434fe981653b3b2ae3d3cbd1b09b9", "score": "0.6596228", "text": "public function createPage()\n {\n echo $this->output;\n }", "title": "" }, { "docid": "85bd58678177da2c223dca7d08e80dd4", "score": "0.6588529", "text": "public function index()\n {\n $pages = Posts::where('type', '=', 'page')->get();\n $this->layout->title = 'Page - NCCMS';\n $this->layout->with('script', 'nccms::admin.pages.scripts.index')\n ->with('style', 'nccms::admin.pages.styles.index');\n $this->layout->content = \\View::make('nccms::admin.pages.index')\n ->with('pages', $pages)\n ->with('title', 'Page');\n }", "title": "" }, { "docid": "e04972e52f9b637ad7d231284a731609", "score": "0.65868986", "text": "public function index(){\t\n\t\t// var_dump('vchxhh');\n\n\t\t$page_model = new \\Models\\Page;\n\t\t$page_model->cmsPage();\n\t\t$this->data['page_title'] = \\Models\\Page::$pageName;\n\n\t\t$this->data['pagename'] = \\Models\\Page::$pageName;\n\t\t$this->data['subname'] = \\Models\\Page::$subName;\n\t\t$this->data['pagedetails'] = \\Models\\Page::$pagedetails;\n\n\t\tswitch (\\Models\\Page::$controller) {\n\t\t\tcase 'contact-us':\n\t\t\t\tUrl::redirect('page/contact');\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\n\t\tView::renderTemplate('header',$this->data);\n\t\tView::render('page/page.index',$this->data);\n\t\tView::renderTemplate('footer',$this->data);\n\t}", "title": "" }, { "docid": "6e0138ecc0e11ce224570d88459ba461", "score": "0.6565347", "text": "function create_custom_pages() {\n $custom_pages = array(\n 'issues' => 'Issues',\n 'weeklies' => 'Weeklies',\n 'artists' => 'Artists',\n 'contributors' => 'Contributors',\n 'incubator' => 'Incubator',\n 'about' => 'About',\n 'shop' => 'Shop',\n 'contribute' => 'How to Contribute',\n 'contact' => 'Contact Us',\n 'faq' => 'FAQ',\n 'definitions' => 'Definitions',\n 'terms-and-conditions' => 'Terms & Conditions',\n 'bag' => 'Bag',\n );\n foreach($custom_pages as $page_name => $page_title) {\n $page = get_page_by_path($page_name);\n if( empty($page) ) {\n wp_insert_post( array(\n 'post_type' => 'page',\n 'post_title' => $page_title,\n 'post_name' => $page_name,\n 'post_status' => 'publish'\n ));\n }\n }\n}", "title": "" }, { "docid": "8c9c9c9be3c6009f07fe13a831baf5b1", "score": "0.6547115", "text": "private function content() {\n $this->checkPost();\n\n if (isset($_SESSION['CREATE'])) {\n\n switch ($_SESSION['CREATE']['page']) {\n case 0:\n $this->pageAgreement();\n break;\n case 1:\n $this->pageNameIntro();\n break;\n case 2:\n $this->pageMark();\n break;\n case 3:\n $this->pageFinal();\n break;\n default:\n echo '<h1>Error: Page Invalid<h1>';\n break;\n }\n\n }else\n echo '<h1>Error: Session invalid</h1>';\n }", "title": "" }, { "docid": "bd2d2b75f7991aca958f0c76aaf95410", "score": "0.6536631", "text": "static public function createPage() {\n $session = Application::getInstance(\"session\");\n $config = Application::getConfig();\n\n if (isset($config[\"system\"][\"customPageClass\"])) {\n require $config[\"system\"][\"pages-folder\"] . \"/\" . $config[\"system\"][\"customPageClass\"] . \".php\";\n }\n\n include_once $config[\"system\"][\"pages-folder\"] . \"/\" . $session->currentPage . \".page.php\";\n $pageClass = $config[\"system\"][\"namespace\"] . \"\\\\pages\\\\Page\" . ucfirst($session->currentPage);\n\n\n $page = new $pageClass();\n\n Application::setInstance(\"page\", $page);\n }", "title": "" }, { "docid": "a4f1838cf2eaf96921e09a7d97639522", "score": "0.649617", "text": "abstract protected function render_page_content(): void;", "title": "" }, { "docid": "a9561468cee1b6bbdd091f377f1d8ed7", "score": "0.64930785", "text": "public function Index() {\n $content = new CMContent();\n $this->views->SetTitle('Page')\n ->AddInclude(__DIR__ . '/index.tpl.php', array(\n 'content' => null,\n ));\n }", "title": "" }, { "docid": "ba576a38437bfe296da275e0459cfa0b", "score": "0.64922154", "text": "function generate_page_content ( $titre, $res_segments ){\n\t\t\n\t\t// For each segment in page\n\t\twhile ( $row = getLine ( $res_segments ) ){\n\t\t\t\n\t\t\t// Save segment parameters as JSON\n\t\t\t$segments_parmson[$row['id']] = $row['parmson'];\n\t\t\t$segments_element[$row['id']] = $row['element'];\n\t\t\t\n\t\t\t// List all elements involved in page\n\t\t\t$tab_elm[$row['element']] = 1;\n\t\t}\n\t\t\t\n\t\t// Generate page elements\n\t\t$html .= \"\n\t\t\t\t<content>\n\t\t\t\t\t<!--<h3>\".$titre.\"</h3>-->\";\n\t\tforeach ( $segments_parmson as $id=>$parmson ){\n\t\t\tif ( $segments_element[$id] ){\n\t\t\t\t//echo \"<br>SEGMENT id:[$id] ; name:[\".$segments_element[$id].\"]\";\n\t\t\t\t$html .= \"\n\t\t\t\t\t<div id='seg_$id' class='segment'>\";\n\t\t\t\t$fname = $segments_element[$id].\"_start\";\n\t\t\t\t$html .= $fname ( $parmson );\n\t\t\t\t$html .= \"\n\t\t\t\t\t</div>\";\n\t\t\t}\n\t\t}\n\t\t$html .= \"\n\t\t\t\t</content>\";\n\t\t\t\n\t\t// Generate site's footer section\n\t\t$html .= \"\n\t\t\t\t\".generate_site_footer();\n\t\t\n\t\t// Call client side code\n\t\t$html .= \"\n\t\t\t\t<script src='lib/jquery.js'></script>\n\t\t\t\t<script src='lib/site.js'></script>\";\n\t\t// Call each element js file at the end of html\n\t\tforeach ( $tab_elm as $elm=>$v )\t$html .= \"\n\t\t\t\t<script src='lib/$elm/$elm.js'></script>\";\n\t\t// Call _start function for all elements\n\t\t$html .=\"\n\t\t\t\t<script language='javascript'>\";\n\t\tforeach ( $tab_elm as $elm=>$v )\t$html .= \"\n\t\".$elm.\"_start();\";\n\t\t$html .=\"\n\t\t\t\t</script>\";\n\t\t\t\n\t\t// End html code by closing all opened tags\n\t\t$html .= \"\n\t\t\t</div></center>\n\t\t</div>\n\t</body>\n</html>\";\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "b2a953abfd25386eeb34cd8c14b9e6a8", "score": "0.64776784", "text": "private static function _createIndexPages()\n {\n // For each system and its templates create its glossary index page.\n // For each system create its index page and then for each of its templates.\n foreach (self::$_docsInfo as $systemName => $docsInfo) {\n // Create the glossary index for this system.\n self::_createGlossaryIndexPage($docsInfo['glossary'], $systemName);\n\n // Create the index page for this system which has its description and\n // link to its screens.\n self::_createSystemIndexPage($docsInfo, $systemName);\n foreach ($docsInfo['template'] as $templateName => $tplDocsInfo) {\n // Create the glossary index for this template.\n self::_createGlossaryIndexPage($tplDocsInfo['glossary'], $systemName, $templateName);\n\n // Create the index page for the template which shows main article of\n // the template on top and rest of the articles of the template and\n // the mode.\n self::_createTemplateIndexPage($tplDocsInfo['article'], $docsInfo['article'], $systemName, $templateName);\n }\n }//end foreach\n\n }", "title": "" }, { "docid": "2c4c7571d5bc70a948f3ee50b207ab44", "score": "0.6440003", "text": "public function newPage($title,$content,$publish = true) {\n $page = array(\n\t\t\t'post_status' \t\t=> $publish === true ? 'publish' : 'pending',\n\t\t\t'post_type' \t\t=> 'page',\n\t\t\t'post_author' \t\t=> 1,\n\t\t\t'post_name' \t\t=> $this->createSlug($title),\n\t\t\t'post_title' \t\t=> $title,\n\t\t\t'post_content' \t\t=> $content,\n\t\t\t'post_parent' \t\t=> 0,\n\t\t\t'comment_status' \t=> 'closed'\n\t\t);\n return $page;\n }", "title": "" }, { "docid": "2c4c7571d5bc70a948f3ee50b207ab44", "score": "0.6440003", "text": "public function newPage($title,$content,$publish = true) {\n $page = array(\n\t\t\t'post_status' \t\t=> $publish === true ? 'publish' : 'pending',\n\t\t\t'post_type' \t\t=> 'page',\n\t\t\t'post_author' \t\t=> 1,\n\t\t\t'post_name' \t\t=> $this->createSlug($title),\n\t\t\t'post_title' \t\t=> $title,\n\t\t\t'post_content' \t\t=> $content,\n\t\t\t'post_parent' \t\t=> 0,\n\t\t\t'comment_status' \t=> 'closed'\n\t\t);\n return $page;\n }", "title": "" }, { "docid": "db52eaaa3c7e0c0f261924e959b126e3", "score": "0.64363647", "text": "protected function page_default () {\r\n\t\t$skeleton = new xhtml ('skeleton.basic');\r\n\t\t$skeleton->load();\r\n\t\t$content=\"\";\r\n\t\t/**\r\n\t\t * Fetch the body content template\r\n\t\t */\r\n\t\tif(config::get('locale')!='') {\r\n\t\t\t$body = new xhtml ('body.vidtuts.'.config::get('locale'));\r\n\t\t} else {\r\n\t\t\t$body = new xhtml ('body.vidtuts');\r\n\t\t}\r\n\t\t$body->load();\r\n\r\n\t\t/**\r\n\t\t * Fetch the translated terms\r\n\t\t */\r\n\t\t$query = \"SELECT \";\r\n\t\t$query.= \"`html` \";\r\n\t\t$query.= \"FROM \";\r\n\t\t$query.= \"`page_terms_translations` \";\r\n\t\t$query.= \"WHERE \";\r\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\r\n\t\t$query.= \"LIMIT 1\";\r\n\r\n\t\t$result = database::query($query);\r\n\r\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\r\n\t\t\t$row = mysql_fetch_assoc($result);\r\n\r\n\t\t\t$date = date('d/m/Y');\r\n\r\n\t\t\t$content = str_replace('{{ date }}',$date,stripslashes($row['html']));\r\n\t\t}\r\n\r\n\t\t$body->assign('content',$content);\r\n \r\n\t\t/**\r\n\t\t * Fetch the page details\r\n\t\t */\r\n\t\t$page = new page('terms');\r\n\r\n\t\t/**\r\n\t\t * Build the output\r\n\t\t */\r\n\t\t$skeleton->assign (\r\n\t\t\tarray (\r\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Video Tutorials',\r\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\r\n\t\t\t\t'description'\t=> $page->description(),\r\n\t\t\t\t'body'\t\t\t=> $body\r\n\t\t\t)\r\n\t\t);\r\n \r\n\t\toutput::as_html($skeleton,true);\r\n \r\n\t}", "title": "" }, { "docid": "bd3aca050dbd14360cf267c6d7922a92", "score": "0.6430706", "text": "public function run()\n {\n //Permissions\n Permission::generateFor('pages');\n\n //Content\n $page = Page::firstOrNew([\n 'slug' => 'home',\n ]);\n if (!$page->exists) {\n $page->fill([\n 'author_id' => 1,\n 'title' => 'Home',\n 'excerpt' => 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.',\n 'body' => null,\n 'image' => '',\n 'meta_description' => 'Meta Description',\n 'meta_keywords' => 'Keyword1, Keyword2',\n 'status' => Page::STATUS_ACTIVE,\n 'template' => 'home',\n ])->save();\n }\n }", "title": "" }, { "docid": "52caa2c58385ecbc29b97fbd512d822c", "score": "0.64231783", "text": "public function run()\n {\n $pages = Pages::create(\n [\n 'name' => 'Customers', \n 'url' => '/customers/',\n ],\n [\n 'name' => 'Users', \n 'url' => '/users/',\n ],\n [\n 'name' => 'Roles', \n 'url' => '/roles/',\n ],\n );\n }", "title": "" }, { "docid": "2e342d2b48a3675d99d62f15ec948831", "score": "0.6420219", "text": "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }", "title": "" }, { "docid": "3358ebdcffa3ff724f92033fa2746b60", "score": "0.6419187", "text": "protected function newPage()\n {\n $this->addPage();\n $this->variables['page'] = $this->pageNo();\n if ($this->templatePages > 0) {\n $templateIndex = $this->importPage(min($this->pageNo(), $this->templatePages));\n $this->useImportedPage($templateIndex);\n }\n\n $this->setXY($this->layout['pageNoX'], $this->layout['pageNoY']);\n $this->write(5, $this->t('page'));\n $this->setY($this->layout['contentMarginTopPX']);\n }", "title": "" }, { "docid": "9e22e8be56dcb81648751443472ee893", "score": "0.64135486", "text": "public function run()\n {\n Page::create([\n 'title' => 'Obchodní Podmínky',\n 'content' => '',\n 'hide_from_blog' => true\n ]);\n\n Page::create([\n 'title' => 'Ochrana osobních údajů',\n 'content' => '',\n 'hide_from_blog' => true\n ]);\n\n Page::create([\n 'title' => 'Reklamační řád',\n 'content' => '',\n 'hide_from_blog' => true\n ]);\n\n Page::create([\n 'title' => 'Často kladené otázky',\n 'content' => '',\n 'hide_from_blog' => true\n ]);\n }", "title": "" }, { "docid": "d0e9c01794e933743a9b7af9e6b243c5", "score": "0.63987374", "text": "public function run()\n {\n $title = [\n 'en' => 'Welcome to example page',\n 'es' => 'Bienvenidos a la página de ejemplo',\n 'ca' => 'Benvinguts a la página d\\'exemple'\n ];\n\n $slug = [\n 'en' => 'example-page',\n 'es' => 'pagina-ejemplo',\n 'ca' => 'exemple-de-pagina'\n ];\n\n $content = [\n 'ca' => '<h2>Benvinguts</h2><p>Aquesta es una p&aacute;gina d&#39;exemple per a %%_former_company_name_%%. Vost&eacute; pot contactar-nos per email a %%_former_company_email_%% o per correu convencional a:</p><p>%%_former_company_adress_1_%%<br />%%_former_company_adress_2_%%<br />\n %%_former_company_country_%%</p>',\n\n 'en' => '<h2>Welcome</h2><p>This is a simple example page for %%_former_company_name_%%. You can contact us at %%_former_company_email_%% or by post email at this address:</p><p>%%_former_company_adress_1_%%<br />%%_former_company_adress_1_%%<br />\n %%_former_company_country_%%</p>',\n\n\n 'es' => '<h2>Bienvenidos</h2><p>Esta es una p&aacute;gina de ejemplo para %%_former_company_name_%%. Usted puede contactar con nosotros via email en %%_former_company_email_%% o por correo convencional en:</p><p>%%_former_company_adress_1_%%<br />%%_former_company_adress_2_%%<br />\n %%_former_company_country_%%</p>'\n ];\n\n $page = Page::create([\n 'template' => 'main_layout',\n 'name' => 'example page',\n 'title' => $title['en'],\n 'slug' => $slug['en'],\n 'content' => $content['en']\n ]);\n \n $page->setTranslations('title', $title);\n $page->setTranslations('slug', $slug);\n $page->setTranslations('content', $content);\n\n $page->save();\n }", "title": "" }, { "docid": "90d640199ba58a5755d487326586cfdd", "score": "0.63859767", "text": "private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }", "title": "" }, { "docid": "fafdaec450ad5c4a97fb04adb2e81243", "score": "0.6379375", "text": "function page_generatePage($page_id=0,$offset=0,$extravars=array()) {\n\tglobal $Auth,$input_language,$previewMode;\n\n\t## prepare the multiclient support\n\t$client_id = $Auth->auth[\"client_id\"];\t\n\n\t## get the page info- and the homepage if we don't have a page\n\t$pageInfo = frontend_getPageInfo($page_id,$client_id);\n\t$page_id \t\t= intval($pageInfo[\"page_id\"]);\n\t$menu_id \t\t= isset($pageInfo[\"id\"]) ? $pageInfo[\"id\"] : 0;\t\t\n\t$template_id\t= $pageInfo[\"template_id\"];\n\n\t## try to fetch the cached scaffold page\n\t$cached_scaffold = pagecache_getCacheFile($page_id);\n\n\t## check if we have a scaffold\n\tif($cached_scaffold === false) {\n\t\t## we need to create a new scaffold file\n\t\t$cached_scaffold = page_generateScaffold($pageInfo,$offset,$extravars);\n\t}\n\t\t\t\n\t$dbConnection = new DB_Sql();\n\t\t\t\t\n\t## grab the information for this page\n\t$select_query = \"SELECT basename FROM \".PAGE_TEMPLATE.\" WHERE template_id='$template_id' AND client_id='$client_id'\";\n\t$result_pointer = $dbConnection->query($select_query);\n\t\n\tif($dbConnection->next_record()) {\n\t\t$filename = $dbConnection->Record[\"basename\"];\n\t\t$xmlFile = $filename.\".xml\";\n\t\t$filename = $filename.\".tpl\";\n\t} else {\n\t\t## maybe we can come with some good default behavior\n\t\texit();\n\t}\n\n\t## for the body we need to examine the xml file- to find out \n\t## what type of form elements we need to position\n\t$wt = new xmlparser(HTML_DIR.$xmlFile);\n\t$wt->parse();\n\t\n\t## okay we scanned in the xml file- so we now loop through all the elements\n\t$elements = $wt->getCacheElements();\t\n\t$objects = $wt->getCacheObjects();\t\n\t\n\t## we should get the page content\n\t$page_record = page_getPage($page_id,$objects);\n\t\n\t$counter = 0;\n\t$num_elements = count($elements);\n\t\n\twhile($counter < $num_elements) {\n\t\t## okay first we try to find out what type we have\n\t\t## we wrap this up in a switch statemnt- this way we can extend it more easily\n\t\t$element_type = $elements[$counter]['TYPE'];\n\t\t$element_name = $elements[$counter]['NAME'];\t\n\t\tswitch($element_type) {\n\t\t\tcase 'TEXT':\n\t\t\tcase 'COPYTEXT':\n\t\t\tcase 'DATE': \n\t\t\tcase 'LINK' :\n\t\t\tcase 'FILE':\n\t\t\tcase 'IMAGE': \n\t\t\tcase 'LINKLIST': \n\t\t\tcase 'BOX':\n\t\t\t\t## get the data and set the var in the template\n\t\t\t\t$target = strtolower($element_type); \n\t\t\t\tif(isset($page_record[$element_name])) {\n\t\t\t\t\teval(\"\\$element = output_\".$target.\"(\\$page_record[\\$element_name],\\$elements[\\$counter],$menu_id,$page_id);\");\t\n\n\t\t\t\t\tif(is_array($element)) {\n\t\t\t\t\t\t$varkeys = array();\n\t\t\t\t\t\t$varvals = array();\n\t\t\t\t\t\n\t\t\t\t\t\tforeach ($element as $varname => $value) {\t\t\n\t\t\t\t\t\t\t$varkeys[$varname] = \"{\".$varname.\"}\";\n\t\t\t\t\t\t\t$varvals[$varname] = $value; \n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t$cached_scaffold = @str_replace($varkeys, $varvals, $cached_scaffold);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$varkeys[$element_name] = \"{\".$element_name.\"}\";\n\t\t\t\t\t\t$varvals[$element_name] = $element; \t\t\t\t\n\t\t\t\t\t\t$cached_scaffold = @str_replace($varkeys, $varvals, $cached_scaffold);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\n\t\t\tcase 'INCLUDE' : {\n\t\t\t\t## basically we need to call the function output_\"element_type\"\n\t\t\t\t## and the output the results to the template\n\t\t\t\t$target = strtolower($element_type); \n\t\t\t\t\n\t\t\t\teval(\"\\$element = output_\".$target.\"('',\\$elements[\\$counter],$menu_id,$page_id);\");\n\t\t\t\t\n\t\t\t\tif(is_array($element)) {\n\t\t\t\t\t$varkeys = array();\n\t\t\t\t\t$varvals = array();\n\t\t\t\t\n\t\t\t\t\tforeach ($element as $varname => $value) {\t\t\n\t\t\t\t\t\t$varkeys[$varname] = \"{\".$varname.\"}\";\n\t\t\t\t\t\t$varvals[$varname] = $value; \n\t\t\t\t\t}\t\t\t\t\n\n\t\t\t\t\t$cached_scaffold = @str_replace($varkeys, $varvals, $cached_scaffold);\n\t\t\t\t} else {\n\t\t\t\t\t$varkeys[$element_name] = \"{\".$element_name.\"}\";\n\t\t\t\t\t$varvals[$element_name] = $element; \t\t\t\t\n\t\t\t\t\t$cached_scaffold = @str_replace($varkeys, $varvals, $cached_scaffold);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\tdefault: {\n\t\t\t\t## we need to check if we have a module for this datatype\n\t\t\t\t$target = strtolower($element_type);\n\t\t\t\t\n\t\t\t\t## first we try to include the apropriate file \n\t\t\t\t@include_once(\"datatypes/extra_\".$target.\"/\".$target.\".php\");\n\t\t\t\t## now we check if the function exists\n\t\t\t\t\n\t\t\t\tif(function_exists($target.\"_output\")) {\n\t\t\t\t\t## no we call the function\n\t\t\t\t\t## check if the page_record entry is defined\n\t\t\t\t\t## if not we need to pass the whole record\n\t\t\t\t\tif(isset($page_record[$element_name])) {\n\t\t\t\t\t\teval(\"\\$element = \".$target.\"_output(\\$page_record[\\$element_name],\\$elements[\\$counter],$menu_id,\\$page_id);\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t##var_dump(eval();\n\t\t\t\t\t\teval(\"\\$element = \".$target.\"_output(\\$page_record,\\$elements[\\$counter],\\$layout_template,\\$menu_id,\\$page_id);\");\n\t\t\t\t\t}\t\n\t\t\t\n\t\t\t\t\tif(is_array($element)) {\n\t\t\t\t\t\t$varkeys = array();\n\t\t\t\t\t\t$varvals = array();\n\t\t\t\t\t\n\t\t\t\t\t\tforeach ($element as $varname => $value) {\t\t\n\t\t\t\t\t\t\t$varkeys[$varname] = \"{\".$varname.\"}\";\n\t\t\t\t\t\t\t$varvals[$varname] = $value; \n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t$cached_scaffold = @str_replace($varkeys, $varvals, $cached_scaffold);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$varkeys[$element_name] = \"{\".$element_name.\"}\";\n\t\t\t\t\t\t$varvals[$element_name] = $element; \t\n\t\t\n\t\t\t\t\t\t$cached_scaffold = @str_replace($varkeys, $varvals, $cached_scaffold);\n\t\t\t\t\t}\n\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\n\t\t$counter++;\n\t}\n\n\t## finally strip all empty tags\n\t$cached_scaffold = preg_replace('/{[^ \\t\\r\\n}]+}/', \"\", $cached_scaffold); \n\n\t## this is it- so we will flush the template here\t\t\n\treturn $cached_scaffold;\n}", "title": "" }, { "docid": "467037fe7f9b817670da5c0e6a5ac4dd", "score": "0.63680196", "text": "public function create()\n {\n //for the PAGE on which to create\n }", "title": "" }, { "docid": "da23a9dffcaa853b9c41ca59a52ed9ce", "score": "0.6351136", "text": "function templatePage ($s_content, $s_title, $s_header='', $s_footer='') {\n\treturn template_tags (template_load ('base.html'), array (\n\t\t'TITLE' => $s_title, 'HEADER' => $s_header, 'FOOTER' => $s_footer, 'CONTENT' => $s_content\n\t));\n}", "title": "" }, { "docid": "c10b2f69ee8f06cac5d84b1ddc628d9b", "score": "0.6347551", "text": "function app_data_pages($slug) {\n\tglobal $Slim;\n\t$pages = array('home', 'sample');\n\tif ( ! in_array($slug, $pages) ) {\n\t\treturn NULL;\n\t}\n\n\t$content = '';\n\tswitch($slug) {\n\t\tcase 'home':\n $content = <<<HTML\n\n<h1>Home</h1>\n\n<h2>Welcome to Abstract CMS</h2>\n\n<p>Sed ultricies nunc vel posuere euismod. Aenean in sapien adipiscing, scelerisque mauris vel, \ndapibus nisl. Suspendisse venenatis dolor ipsum, vel lobortis dolor commodo ac. Nam ullamcorper \nadipiscing felis, vitae consequat magna sagittis non. Aenean nunc elit, interdum quis dignissim \ndignissim, aliquet nec leo. Quisque fermentum tempor volutpat. Ut ut arcu vel nunc porta \nvehicula.</p>\n\nHTML;\n\t\t\tbreak;\n\t\tcase 'sample':\n $content = <<<HTML\n\n<h1>Sample Page</h1>\n\n<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tincidunt tristique fringilla. \nDuis malesuada, neque vel cursus placerat, augue risus tristique lacus, id tincidunt orci eros in erat. \nDonec adipiscing tincidunt gravida. Suspendisse erat ante, feugiat ac malesuada quis, aliquam eget felis. \nDonec viverra metus enim, ac ultricies justo ultrices vitae. Maecenas adipiscing pharetra augue in \nvolutpat. Morbi tortor lorem, dictum nec sollicitudin eu, venenatis sed massa. Aenean ac ultricies \nmetus. Morbi tristique felis tortor. Pellentesque habitant morbi tristique senectus et netus et \nmalesuada fames ac turpis egestas. In ac elit sed purus fringilla rhoncus. Nam aliquam euismod \nultrices. Morbi condimentum vulputate ipsum, nec elementum nisi sodales id. Aliquam ac euismod \nturpis, vitae porta nibh.</p>\n\n<p>Sed ultricies nunc vel posuere euismod. Aenean in sapien adipiscing, scelerisque mauris vel, \ndapibus nisl. Suspendisse venenatis dolor ipsum, vel lobortis dolor commodo ac. Nam ullamcorper \nadipiscing felis, vitae consequat magna sagittis non. Aenean nunc elit, interdum quis dignissim \ndignissim, aliquet nec leo. Quisque fermentum tempor volutpat. Ut ut arcu vel nunc porta \nvehicula.</p>\n\nHTML;\n\t\t\tbreak;\n\t}\n\n\treturn array(\n\t 'data' => array(),\n 'blocks' => array(),\n 'scripts' => array(),\n 'template' => $content\n );\n}", "title": "" }, { "docid": "0e9587edf8a6139e7a799cf1e341d992", "score": "0.63278836", "text": "function create_pages() {\r\n\r\n $wpc_pages = $this->pre_set_pages();\r\n\r\n $wpc_client_page = get_page_by_title( 'Portal' );\r\n\r\n if ( !isset( $wpc_client_page ) || 0 >= $wpc_client_page->ID ) {\r\n\r\n $current_user = wp_get_current_user();\r\n //Construct args for the new page\r\n $args = array(\r\n 'post_title' => 'Portal',\r\n 'post_status' => 'publish',\r\n 'post_author' => $current_user->ID,\r\n 'post_content' => '[wpc_redirect_on_login_hub]',\r\n 'post_type' => 'page',\r\n 'ping_status' => 'closed',\r\n 'comment_status' => 'closed'\r\n );\r\n $parent_page_id = wp_insert_post( $args );\r\n }\r\n\r\n $settings = get_option( 'wpc_settings' );\r\n\r\n foreach( $wpc_pages as $wpc_page ) {\r\n\r\n $wpc_client_page = get_page_by_title( $wpc_page['name'] );\r\n\r\n if ( !isset( $wpc_client_page ) || 0 >= $wpc_client_page->ID ) {\r\n\r\n $current_user = wp_get_current_user();\r\n //Construct args for the new page\r\n $args = array(\r\n 'post_title' => $wpc_page['name'],\r\n 'post_status' => 'publish',\r\n 'post_author' => $current_user->ID,\r\n 'post_content' => $wpc_page['content'],\r\n 'post_type' => 'page',\r\n 'ping_status' => 'closed',\r\n 'comment_status' => 'closed',\r\n 'post_parent' => $parent_page_id,\r\n );\r\n $page_id = wp_insert_post( $args );\r\n\r\n $settings['pages'][$wpc_page['id']] = $page_id;\r\n }\r\n\r\n\r\n }\r\n\r\n update_option( 'wpc_settings', $settings );\r\n\r\n }", "title": "" }, { "docid": "15200eef60f297a275da335a0b4b9024", "score": "0.63094556", "text": "public function createContentAndCopyDraftPage() {}", "title": "" }, { "docid": "a9028154b05f78528e5975d64db71421", "score": "0.62924397", "text": "public function index() {\n // remaining requests to \"cms/index\".\n \n // Load the required models.\n $this->load->model('pages');\n $this->load->model('users');\n \n // Grab the route the end-user is currently requesting.\n $route = implode('/', $this->router->segments());\n // Does the route exist as a page?\n $page_id = $this->model('pages')->page_exists($route);\n if(!$page_id) {\n show_404();\n }\n \n // Can the current user view the page in question?\n $user = $this->model('users')->get_current();\n if(!$user->can_view($page_id)) {\n show_404();\n }\n \n // Grab the page object containing all its data.\n $page_object = $this->model('pages')->load($page_id);\n \n // Now we want to start templating the final HTML output.\n // Add the page object to a variable called \"page\" which will be available in the final template view.\n $this->template->add('page', $page_object);\n $this->template->load($page_object->layout);\n\t\t}", "title": "" }, { "docid": "d8a66984a101e296e3fc6d304e32cf90", "score": "0.62921673", "text": "function honeycomb_homepage_content() {\n\t\twhile ( have_posts() ) {\n\t\t\tthe_post();\n\n\t\t\tget_template_part( 'content', 'page' );\n\n\t\t} // end of the loop.\n\t}", "title": "" }, { "docid": "2df93ce64b9008641b575a10752e503b", "score": "0.6289117", "text": "public function create()\n {\n //获取公司简介信息\n $com = Page::where(\"type\",'=',1)->first();\n // 加载公司简介视图\n return view('admin.page.create')->with('jianjie',$com);\n }", "title": "" }, { "docid": "4fdb0882af8f6618fb2926ac8b488954", "score": "0.6284077", "text": "protected function generatePagesSitemap() {\n\t\tt3lib_div::requireOnce(t3lib_extMgm::extPath('dd_googlesitemap', 'class.tx_ddgooglesitemap_pages.php'));\n\t\t$generator = t3lib_div::makeInstance('tx_ddgooglesitemap_pages');\n\t\t/* @var $generator tx_ddgooglesitemap_pages */\n\t\t$generator->main();\n\t}", "title": "" }, { "docid": "73f3f52b14455dd90c9739224a2c0898", "score": "0.6281447", "text": "public function createAction() : object\n {\n $title = \"Skapa nytt innehåll\";\n\n // Check if not logged in, redirect to login page\n if (!$this->app->session->get('user')) {\n return $this->app->response->redirect(\"content/login\");\n }\n\n if (hasKeyPost(\"doSave\")) {\n $title = getPost(\"contentTitle\");\n\n $sql = \"INSERT INTO content (title) VALUES (?);\";\n $this->app->db->execute($sql, [$title]);\n\n return $this->app->response->redirect(\"content\");\n }\n\n // Add and render page to add content\n $this->app->page->add(\"content/create\");\n return $this->app->page->render([\"title\" => $title,]);\n }", "title": "" }, { "docid": "10de16622d56860ceebe025ec0f5c7c5", "score": "0.6267083", "text": "public function index()\n {\n $posts = Pagesimple::orderBy('id', 'desc')\n ->paginate(20);\n\n return view('site.pages.simples.index')->with([\n 'title' => 'Բոլորը',\n 'posts' => $posts,\n ]);\n }", "title": "" }, { "docid": "613174b4c4a47f0b4b47d01c1b2863ef", "score": "0.6266775", "text": "public function createActionGet(): object\n {\n // Sets webpage title\n $title = \"Create content\";\n\n // Sets extended webpage title\n $titleExtended = \" | Eshop\";\n\n // Framework variables\n $response = $this->app->response;\n $session = $this->app->session;\n\n // Verifies if user is logged in\n if (!$session->get(\"loggedIn\")) {\n $response->redirect(\"eshop/login\");\n };\n\n // Data array\n $data = [\n \"title\" => $title,\n \"titleExtended\" => $titleExtended\n ];\n\n // Includes admin header\n $this->app->page->add(\"content/header_admin\");\n\n // Adds route and sends data array to view\n $this->app->page->add(\"content/create\", $data);\n\n // Renders page\n return $this->app->page->render($data);\n }", "title": "" }, { "docid": "79499d1ffe04e22aca26cf7f84b9afaa", "score": "0.62610644", "text": "function createPages() {\n\n $pages = \"Store Location,Store Trading Hours,Payment Options,Shipping & Delivery,Return / Refund Policy,Our Brands,Bike Hire,Bike Servicing,Mobile Mechanic Service,Bicycle Size Guide,Component Fitting,Corporate Sales,Our Team,Contact Us,Our Quality Promise,Privacy Statement,Disclaimer,Blog / Articles\";\n $pages = explode(',', $pages);\n\n foreach ($pages as $page) {\n $data = [\n 'page' => [\n 'title' => $page,\n 'body_html' => \"<h2>\".$page.\"</h2>\",\n ]\n ];\n\n try {\n $client = HttpClient::create();\n $response = $client->request('POST', shopifyApiurl . '/pages.json', ['json' => $data]);\n } catch (\\Exception $e) {\n var_dump($e);\n }\n }\n\n\n return new JsonResponse(['status' => 'finish']);\n }", "title": "" }, { "docid": "e8ad42583aac73badde03b4773385875", "score": "0.6257474", "text": "function mkPage($subtitle = '', $menu = 0, $level = 0)\n{\n global $app, $globalSettings;\n\n if ($subtitle == '') {\n $title = $globalSettings[DISPLAY_APP_NAME];\n } else {\n $title = $globalSettings[DISPLAY_APP_NAME] . $globalSettings['sep'] . $subtitle;\n }\n $rot = mkRootUrl();\n $auth = is_authenticated();\n if ($globalSettings[LOGIN_REQUIRED]) {\n $adm = is_admin();\n } else {\n $adm = true;\n } # the admin button should be always visible if no login is required\n $page = ['title' => $title,\n 'rot' => $rot,\n 'h1' => $subtitle,\n 'version' => $globalSettings['version'],\n 'glob' => $globalSettings,\n 'menu' => $menu,\n 'level' => $level,\n 'auth' => $auth,\n 'admin' => $adm];\n return $page;\n}", "title": "" }, { "docid": "65f726fa2114239ee8dcfa4113bcc8ec", "score": "0.62530124", "text": "public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }", "title": "" }, { "docid": "e969699c1c972fe7069dc736dc1441a1", "score": "0.62524086", "text": "function page($page_name=null, $content_type=\"text/html\")\n{\n\t$page_path = PAGES . \"/\" . $page_name . \".php\";\n\tif(!file_exists($page_path)) throw new FrameworkException(\"$page_path: page doesn't exist\");\n\n\theader(\"content-type: \".$content_type);\n\trequire_once $page_path;\n}", "title": "" }, { "docid": "a2e34fb7628bb178ba393d4720541145", "score": "0.62370074", "text": "public function run()\n {\n $index = App\\Page::create([\n \t'name' => 'Home page',\n\t\t\t'name_short' => 'home',\n\t\t\t'background' => '/img/index.jpg',\n\t\t\t'slide_color' => '#d8a5c4'\n\t\t]);\n\n\t\t$about = App\\Page::create([\n\t\t\t'name' => 'About me',\n\t\t\t'name_short' => 'about',\n\t\t\t'background' => '/img/about.jpg',\n\t\t\t'slide_color' => '#1de9b6'\n\t\t]);\n\n\t\t$books = App\\Page::create([\n\t\t\t'name' => 'Books',\n\t\t\t'name_short' => 'books',\n\t\t\t'background' => '/img/books.jpg',\n\t\t\t'slide_color' => '#ffa726'\n\t\t]);\n\n\t\t$links = App\\Page::create([\n\t\t\t'name' => 'Links',\n\t\t\t'name_short' => 'links',\n\t\t\t'background' => '/img/links.jpg',\n\t\t\t'slide_color' => '#ba68c8'\n\t\t]);\n\n\t\t$contact = App\\Page::create([\n\t\t\t'name' => 'Contact me',\n\t\t\t'name_short' => 'contact',\n\t\t\t'background' => '/img/contact.jpg',\n\t\t\t'slide_color' => '#ec407a'\n\t\t]);\n\n\n }", "title": "" }, { "docid": "09807833521cb3e6e9ec429739c2e455", "score": "0.6235865", "text": "public function run()\n {\n \tStaticPage::truncate();\n\t\tStaticPage::create([\n\t\t\t'page_name' => 'About Us',\n\t\t\t'status' => '1'\n\t\t]);\t\n \t\n StaticPage::create([\n 'page_name' => 'T&C',\n 'status' => '1'\n ]);\n }", "title": "" }, { "docid": "78486ef58c27ae71cb04c759e3b4f40f", "score": "0.6231245", "text": "function createSamplePage(){\n\tif(the_slug_exists('custom-page')==false)\n\t{\n\t\tglobal $user_ID;\n\t $new_post = array(\n 'post_title' => 'Custom Page',\n 'post_content' => 'Sample content here',\n 'post_status' => 'publish',\n 'post_date' => date('Y-m-d H:i:s'),\n 'post_author' => $user_ID,\n 'post_type' => 'page',\n );\n $post_id = wp_insert_post($new_post);\n\t}\n}", "title": "" }, { "docid": "3d806f132ccd1123d8fc76c64242be00", "score": "0.62237895", "text": "public function prePageContent();", "title": "" }, { "docid": "fd93315053a0d34f7c53d8e8f50d05ef", "score": "0.62204635", "text": "private function createPage()\n {\n sleep(1);\n\n $response = $this->pages->create([\n 'name' => 'My Super Awesome Post '.uniqid(),\n 'content_group_id' => 351076997,\n ]);\n\n $this->assertEquals(201, $response->getStatusCode());\n\n return $response;\n }", "title": "" }, { "docid": "120a3faa2fba32744db7407ad6937f3e", "score": "0.6208763", "text": "function sh_page_content() {\n\tglobal $post, $wp_query;\n\t\n\t// if there's a specific page template, then redirect to this\n\t$action = get_query_var ( 'sh_action' );\n\t$type = get_query_var ( 'sh_post_type' );\n\t\n\tif ($action == 'new') {\n\t\t$template = locate_template (array('edit/'.$type.'.php') );\n\t\tif ($template != '') {\n\t\t\tinclude ($template);\n\t\t}\n\t\treturn;\n\t} \n\telse if ($action == 'edit') {\n\t\t$template = locate_template ( array (\n\t\t\t\t'edit/' . $post->post_type . '-' . get_query_var ( 'sh_part' ) . '.php',\n\t\t\t\t'edit/' . $post->post_type . '.php' \n\t\t) );\n\t\tif ($template != '') {\n\t\t\tinclude ($template);\n\t\t}\n\t\treturn;\n\t} \n\telse if ($post) {\n\t\t$template = locate_template ( array (\n\t\t\t\t'content/page-' . $post->post_name . '.php',\n\t\t\t\t'content/' . $post->post_type . '.php' \n\t\t) );\n\t\t\n\t\tif ($template != '') {\n\t\t\tinclude ($template);\n\t\t\treturn;\n\t\t}\n\t}\n\t\n\t// otherwise, show the new post form and feed\n\tsh_post_form ();\n\tsh_topic_loop ();\n}", "title": "" }, { "docid": "a8817b40dbc953ec56500d38e566bf8d", "score": "0.6205053", "text": "public function allpagesActionGet() : object\n {\n $page = $this->app->page;\n $title = \"Alla pages i databasen\";\n $db = $this->app->db;\n\n $db->connect();\n $sql = <<<EOD\nSELECT\n *,\n CASE \n WHEN (deleted <= NOW()) THEN \"isDeleted\"\n WHEN (published <= NOW()) THEN \"isPublished\"\n ELSE \"notPublished\"\n END AS status\nFROM content\nWHERE type=?\n;\nEOD;\n $resultset = $db->executeFetchAll($sql, [\"page\"]);\n\n $page->add(\"cms/header\");\n $page->add(\"cms/allpages\", [\n \"resultset\" => $resultset\n ]);\n return $page->render([\n \"title\" => $title\n ]);\n }", "title": "" }, { "docid": "85d043e4b49ecd8a01e1f9ef3df281f4", "score": "0.6199313", "text": "private function create_html_page()\n\t{\n\t\t$m_output_1 = $this->c_input_content[1];\n\t\t$m_output_2 = $this->c_input_content[2];\n\n\t\t$this->c_output_html = <<< HTML\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns = \"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n\t<title>$this->c_page_title</title>\n</head>\n<body>\n\t<h1>Testing the Person class</h1>\n\t<p>$m_output_1</p>\n\t<p>$m_output_2</p>\n</body>\n</html>\nHTML;\n\t}", "title": "" }, { "docid": "2d15612edf5194c3980ccdf584005e14", "score": "0.618347", "text": "public function indexTypo3PageContent() {}", "title": "" }, { "docid": "5a428235273d16e3c4fdd1b8cc32f474", "score": "0.6175991", "text": "public function run()\n {\n \\App\\Models\\Page::create([\n 'title' => 'Terms',\n 'body' => $this->terms(),\n 'post_type' => 'page',\n 'author_id' => 1\n ]);\n\n \\App\\Models\\Page::create([\n 'title' => 'Policy',\n 'body' => $this->privacy(),\n 'post_type' => 'page',\n 'author_id' => 1\n ]);\n\n \\App\\Models\\Page::create([\n 'title' => 'Contact',\n 'body' => null,\n 'post_type' => 'page',\n 'author_id' => 1\n ]);\n }", "title": "" }, { "docid": "b7527b9b84fe9fb3cdef5b510ca2b433", "score": "0.61403143", "text": "public function createPageAndCopyLiveParentPage() {}", "title": "" }, { "docid": "4ad97be6bfaf5cfbe2740a273af39921", "score": "0.613987", "text": "protected function page () {\n\t\t$skeleton\t= make::tpl ('skeleton.basic');\n\n\t\t/**\n\t\t * Fetch the body content\n\t\t */\n\t\t$body\t\t= make::tpl ('body.privacy');\n\n\n\t\t/**\n\t\t * Fetch the translated privacy policy\n\t\t */\n\t\t$query = \"SELECT \";\n\t\t$query.= \"`html` \";\n\t\t$query.= \"FROM \";\n\t\t$query.= \"`page_privacy_translations` \";\n\t\t$query.= \"WHERE \";\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\n\t\t$query.= \"LIMIT 1\";\n\n\t\t$result = database::query($query);\n\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\n\t\t\t$row\t\t= mysql_fetch_assoc($result);\n\t\t\t$date\t\t= date('d/m/Y');\n\t\t\t$content\t= str_replace('{{ date }}',$date,stripslashes($row['html']));\n\t\t}\n\n\t\t$body->assign('content',$content);\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t$page = new page('privacy');\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> $page->title(),\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\n\t\t\t\t'description'\t=> $page->description(),\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\t}", "title": "" }, { "docid": "f2f4df56965fc6c201ba32c87d605539", "score": "0.61165684", "text": "function create_custom_pages() {\n $custom_pages = array(\n 'home' => 'Home',\n );\n foreach($custom_pages as $page_name => $page_title) {\n $page = get_page_by_path($page_name);\n if( empty($page) ) {\n wp_insert_post( array(\n 'post_type' => 'page',\n 'post_title' => $page_title,\n 'post_name' => $page_name,\n 'post_status' => 'publish'\n ));\n }\n }\n\n // Set static Homepage\n $home = get_page_by_path('home');\n update_option( 'page_on_front', $home->ID );\n update_option( 'show_on_front', 'page' );\n}", "title": "" }, { "docid": "514e8db133d6c8055715c18f6fdb06f1", "score": "0.611292", "text": "function page_generateScaffold($pageInfo,$offset=0,$extravars=array()) {\n\tglobal $Auth,$input_language;\n\t\t\t\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\n\t$output = '';\n\t\n\t$page_id \t\t= intval($pageInfo[\"page_id\"]);\n\t$menu_id \t\t= isset($pageInfo[\"id\"]) ? $pageInfo[\"id\"] : 0;\n\t$menu_text \t\t= isset($pageInfo[\"text\"]) ? $pageInfo[\"text\"] : '';\t\t\n\t$template_id\t= $pageInfo[\"template_id\"];\n\t$page_type\t\t= $pageInfo[\"type\"];\t\n\t$modified\t\t= $pageInfo[\"modified\"];\n\t\t\t\n\t$dbConnection = new DB_Sql();\n\t\t\t\n\tif($page_type == 'folder') {\n\t\t## we need to output the folder by calling\n\t\t## the folder output functions\n\t\tfolder_outputFolder($page_id);\n\t\texit();\t\n\t}\n\t\n\t## grab the information for this page\n\t$select_query = \"SELECT basename FROM \".PAGE_TEMPLATE.\" WHERE template_id='$template_id' AND client_id='$client_id'\";\n\t$result_pointer = $dbConnection->query($select_query);\n\t\n\t$dbConnection->next_record();\n\t$filename = $dbConnection->Record[\"basename\"];\n\t$xmlFile = $filename.\".xml\";\n\t$filename = $filename.\".tpl\";\n\n\tif ($filename == \".tpl\") {\n\t\t## maybe we can come with some good default behavior\n\t\texit();\n\t}\n\t\t\t\n\t## prepare the template file\n\t$layout_template = new Template(HTML_DIR);\n\t$layout_template->set_templatefile(array(\"pager\"=>$filename,\"head\" => $filename,\"body\" => $filename,\"foot\" => $filename)); \n\t\n\t## here we set the global vars- the user can set them within the templates:\n\t$layout_template->set_var(\"matrix:TITLE\",$menu_text);\n\t$layout_template->set_var(\"matrix:PAGEID\",$page_id);\n\t$layout_template->set_var(\"matrix:TARGETPAGE\",getTargetURL($page_id));\n\t$layout_template->set_var(\"matrix:MODDATE\",utility_prepareDate(strtotime($modified),DEFAULT_DATE));\n\t\n\t## finally set the others values passed to the script\n\t$layout_template->set_vars($extravars);\n\n\t##$output .= $layout_template->fill_block(\"head\");\n\n\t## for the body we need to examine the xml file- to find out \n\t## what type of form elements we need to position\n\t$wt = new xmlparser(HTML_DIR.$xmlFile);\n\t$wt->parse();\n\t\n\t## okay we scanned in the xml file- so we now loop through all the elements\n\t$elements = $wt->getNormalElements();\t\n\t$objects = $wt->getNormalObjects();\t\n\t\n\t## we should get the page content\n\t$page_record = page_getPage($page_id,$objects);\n\n\t$counter =0;\n\t$num_elements = count($elements);\n\twhile($counter < $num_elements) {\n\t\t## store the output\n\t\t$storage = ' ';\t\n\t\n\t\t## okay first we try to find out what type we have\n\t\t## we wrap this up in a switch statemnt- this way we can extend it more easily\n\t\t$element_type = $elements[$counter]['TYPE'];\n\t\t$element_name = $elements[$counter]['NAME'];\n\n\t\tswitch($element_type) {\n\t\t\tcase 'TEXT':\n\t\t\tcase 'COPYTEXT':\n\t\t\tcase 'DATE': \n\t\t\tcase 'LINK' :\n\t\t\tcase 'FILE':\n\t\t\tcase 'BOX':\n\t\t\tcase 'LINKLIST':\n\t\t\tcase 'IMAGE': {\n\t\t\t\t## get the data and set the var in the template\n\t\t\t\t$target = strtolower($element_type); \n\t\t\t\tif(isset($page_record[$element_name])) {\n\t\t\t\t\t$function = \"output_\".$target;\n\t\t\t\t\t$element = $function($page_record[$element_name],$elements[$counter],$menu_id,$page_id);\n\n\t\t\t\t\tif(is_array($element)) {\n\t\t\t\t\t\t$layout_template->set_vars($element);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$layout_template->set_var($element_name,$element);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 'INCLUDE' : {\n\t\t\t\t## basically we need to call the function output_\"element_type\"\n\t\t\t\t## and the output the results to the template\n\t\t\t\t$target = strtolower($element_type); \n\t\t\t\t$function = \"output_\".$target;\n\t\t\t\t$element = $function('',$elements[$counter],$menu_id,$page_id);\t\t\t\t\n\t\t\t\tif(is_array($element)) {\n\t\t\t\t\t$layout_template->set_vars($element);\n\t\t\t\t} else {\n\t\t\t\t\t$layout_template->set_var($element_name,$element);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\tcase 'LISTVIEW': {\n\t\t\t\t$element = \"\";\n\t\t\t\t\n\t\t\t\t$element = output_listview($page_record,$elements[$counter],$layout_template,$menu_id,$page_id); \n\t\t\t\t$layout_template->set_var($element_name,$element);\t\n\t\t\t\tbreak;\t\n\t\t\t}\t\n\t\t\n\t\t\tcase 'SEARCH': {\n\t\t\t\t## now it's time to check the previous data entered:\n\t\t\t\t$layout_template->set_var($element_name.'.action',\"content.php?name=\".$elements[$counter]['PAGE']);\n\t\t\t\t$layout_template->set_var($element_name.'.name',\"query\");\n\t\t\t\t\n\t\t\t\t## prepare the hidden fields\n\t\t\t\t$hidden ='<input type=\"hidden\" name=\"PAGE\" value=\"'.$elements[$counter]['PAGE'].'\">';\n\t\t\t\t$hidden .='<input type=\"hidden\" name=\"LIMIT\" value=\"'.$elements[$counter]['LIMIT'].'\">';\n\t\t\t\t\n\t\t\t\t$layout_template->set_var($element_name.'.hidden',$hidden);\n\t\t\t\tbreak;\n\t\t\t}\t\n\t\t\tcase 'SEARCHRESULTS': {\n\t\t\t\t## if we hit a searchresult tag, does means we should display\n\t\t\t\t## the results for the current search- we need to check\n\t\t\t\t## if we have a $query.\n\t\t\t\t$query = \"\";\n\t\t\t\tif($_POST[\"query\"]!=\"\" && isset($_POST[\"query\"])) {\n\t\t\t\t\t## we have a query so let's perform the search\n\t\t\t\t\t## we need to process the umlauts\n\t\t\t\t\t$query = convert_general($_POST[\"query\"]);\n\t\t\t\t\t$results = search($query);\n\t\t\t\t}\n\t\t\t\t$db = new DB_Sql();\n\t\t\t\t\n\t\t\t\t$found_pages = array();\t\t\t## used to store the found pages\n\t\t\t\t$box_pages = array();\n\t\t\t\t## we've got the results, but they are in a raw format\n\t\t\t\tfor($i=0; $i < count($results); $i++) {\n\t\t\t\t\t## now loop through the results, and check the type\n\t\t\t\t\tif($results[$i]['type']=='page') {\n\t\t\t\t\t\t## this means everything is fine, we need to check if this page\n\t\t\t\t\t\t## is currently visible (+current version)\n\t\t\t\t\t\t\n\t\t\t\t\t\t## at least we check if it is visible\n\t\t\t\t\t\t$pageInfo = structure_getStructureID($results[$i]['page_id']);\n\t\t\t\t\t\tif (!checkFlag($pageInfo[\"flags\"],PAGE_INVISIBLE) && checkFlag($pageInfo[\"flags\"],PAGE_ACTIVE)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t## first we check if the content element that was found belongs to the latest version of the page\n\t\t\t\t\t\t\t$s_query = \"SELECT content_id FROM \".PAGE_CONTENT.\" WHERE identifier='\".$results[$i]['identifier'].\"' AND page_id='\".$results[$i]['page_id'].\"' AND client_id='$client_id' LIMIT 1\";\n\t\t\t\t\t\t\t$result = $db->query($s_query);\t\n\t\t\t\t\t\t\tif($db->next_record()) {\n\t\t\t\t\t\t\t\tif($db->Record['content_id'] == $results[$i]['content_id']) {\n\t\t\t\t\t\t\t\t\t## this means we can savely output the result\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t## first check if the page_id id is aleady within the found pages\n\t\t\t\t\t\t\t\t\tif(!in_array($results[$i]['page_id'],$found_pages)) {\n\t\t\t\t\t\t\t\t\t\t$found_pages[] = $results[$i]['page_id'];\n\t\t\t\t\t\t\t\t\t}\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} else {\n\t\t\t\t\t\t## if it is a container, we need to check if it is active and if the page it belongs to\n\t\t\t\t\t\t## is current and active\n\t\t\t\t\t\t\n\t\t\t\t\t\t## using this query we get: the page id that hosts the content element. We don't know if the content element of the active version of this page\n\t\t\t\t\t\t## contains the search parameter but we know it has at somepoint- leave it for now\n\t\t\t\t\t\t$s_query = \"SELECT page_id FROM \".DB_PREFIX.\"box_item AS A INNER JOIN \".DB_PREFIX.\"box AS B ON A.box_id=B.box_id WHERE target='\".$results[$i]['page_id'].\"' AND A.client_id='$client_id' ORDER BY B.modified DESC\";\n\t\t\t\t\t\t$result = $db->query($s_query);\n\t\t\t\t\t\twhile($db->next_record()) {\n\t\t\t\t\t\t\t## check if the page is active\n\t\t\t\t\t\t\t$pageInfo = structure_getStructureID($db->Record['page_id']);\n\t\t\t\t\t\t\tif (!checkFlag($pageInfo[\"flags\"],PAGE_INVISIBLE) && checkFlag($pageInfo[\"flags\"],PAGE_ACTIVE)) {\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t## first check if the page_id id is aleady within the found pages\n\t\t\t\t\t\t\t\tif(!in_array($db->Record['page_id'],$found_pages)) {\n\t\t\t\t\t\t\t\t\t$found_pages[] = $db->Record['page_id'];\n\t\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t## set the found page id to the returned page id- otherwise we only have the box\n\t\t\t\t\t\t\t\t$box_pages[] =\t$results[$i]['page_id']; \n\t\t\t\t\t\t\t\t$results[$i]['page_id'] = $db->Record['page_id'];\t\n\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t## now that we have the results, we will set them in the template\n\t\t\t\t$basename = $elements[$counter]['TEMPLATE'];\n\t\t\t\t$filename = $basename.'.tpl';\n\t\t\t\t$xmlFile = $basename.'.xml';\t\n\t\t\t\t\n\t\t\t\t$xmlStructure = new xmlparser(HTML_DIR.$xmlFile);\n\t\t\t\t$xmlStructure->parse();\n\t\t\t\t## parse the template file\n\t\t\t\t$objects \t\t= $xmlStructure->getObjects();\n\t\t\t\t$xmlStructure \t= $xmlStructure->getElements();\t\n\t\t\t\t\t\t\n\t\t\t\t$searchresult_template = new Template(HTML_DIR);\n\t\t\t\t$searchresult_template->set_templatefile(array(\"body\" => $filename)); \n\n\t\t\t\t$displayed_pages = array();\n\t\t\t\t$results_counter = 1;\n\t\t\t\tfor($i=0;$i<count($results); $i++) {\n\t\t\t\t\tif(!in_array($results[$i][\"page_id\"],$displayed_pages)) {\n\t\t\t\t\t\tif(in_array($results[$i][\"page_id\"],$found_pages)) {\n\t\t\t\t\t\t\t$displayed_pages[] = $results[$i][\"page_id\"];\n\t\t\t\t\t\t\t$page_data = array();\n\t\t\t\t\t\t\t## get the page \n\t\t\t\t\t\t\t$page_data = page_getPage($results[$i][\"page_id\"],$objects);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t## output the page\n\t\t\t\t\t\t\t$search_results_counter =0;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t## reset the template\n\t\t\t\t\t\t\t$searchresult_template->varkeys = array(); \n\t\t\t\t\t\t\t$searchresult_template->varvals = array(); \t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twhile($search_results_counter < count($xmlStructure)-1) {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t## okay first we try to find out what type we have\n\t\t\t\t\t\t\t\t## we wrap this up in a switch statemnt- this way we can\n\t\t\t\t\t\t\t\t## extend it more easily\n\t\t\t\t\t\t\t\t$s_element_type = $xmlStructure[$search_results_counter]['TYPE'];\n\t\t\t\t\t\t\t\t$s_element_name = $xmlStructure[$search_results_counter]['NAME'];\n\n\t\t\t\t\t\t\t\tswitch($s_element_type) {\n\t\t\t\t\t\t\t\t\tcase 'TEXT':\n\t\t\t\t\t\t\t\t\tcase 'COPYTEXT':\n\t\t\t\t\t\t\t\t\tcase 'DATE': \n\t\t\t\t\t\t\t\t\tcase 'LINK' :\n\t\t\t\t\t\t\t\t\tcase 'FILE':\n\t\t\t\t\t\t\t\t\t//case 'BOX':\n\t\t\t\t\t\t\t\t\tcase 'LINKLIST':\n\t\t\t\t\t\t\t\t\tcase 'IMAGE': {\n\t\t\t\t\t\t\t\t\t\t## basically we need to call the function output_\"element_type\"\n\t\t\t\t\t\t\t\t\t\t## and the output the results to the template\n\t\t\t\t\t\t\t\t\t\t$s_target = strtolower($s_element_type); \n\t\t\t\t\t\t\t\t\t\tif(isset($page_data[$s_element_name])) {\n\t\t\t\t\t\t\t\t\t\t\teval(\"\\$s_element = output_\".$s_target.\"(\\$page_data[\\$s_element_name],\\$xmlStructure[\\$search_results_counter],0);\");\t\n\t\t\t\t\t\t\t\t\t\t\tif(is_array($s_element)) {\n\t\t\t\t\t\t\t\t\t\t\t\t$searchresult_template->set_vars($s_element);\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\t$searchresult_template->set_var($s_element_name,$s_element);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\tcase 'BOX': {\n\t\t\t\t\t\t\t\t\t\tif($page_data[$s_element_name]['length'] > 0) {\n\t\t\t\t\t\t\t\t\t\t\tfor($bb=0;$bb<$page_data[$s_element_name][\"length\"]; $bb++) {\n\t\t\t\t\t\t\t\t\t\t\t\t$b_target_page = $page_data[$s_element_name][$bb]['target'];\n\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t## now check if the target_page was wihtin the search_result\n\t\t\t\t\t\t\t\t\t\t\t\tif(in_array($b_target_page,$box_pages)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t## okay we need to get this page then\n\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## get the text elements for the page\n\t\t\t\t\t\t\t\t\t\t\t\t\t$b_data = array();\n\t\t\t\t\t\t\t\t\t\t\t\t\ttext_getData($b_target_page,$b_data);\n\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\tforeach($b_data as $b_current_data) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t## prepare the text element\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$b_current_data['text'] = '<p>'.strip_tags($b_current_data['text']).'</p>';\n\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\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$b_current_data['text']= str_colapse($b_current_data['text'],280,\"center\",'...');\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$searchresult_template->set_var($b_current_data['identifier'],$b_current_data['text']);\n\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}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$search_results_counter++;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t## finally we ouptut the link\n\t\t\t\t\t\t$page_id = $results[$i][\"page_id\"];\n\t\t\t\t\t\t$targetURL = getTargetURL($page_id);\t\n\t\t\t\t\t\t$searchresult_template->set_var('matrix:TARGETPAGE',$targetURL);\n\t\t\t\t\t\t$searchresult_template->set_var('matrix:RESULTINDEX',$results_counter);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$results_counter++;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$searchresult_output.=$searchresult_template->fill_block(\"body\");\n\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}\n\t\t\t\t\n\t\t\t\t## finally set the general vars\n\t\t\t\t$layout_template->set_var(\"SEARCHRESULT.query\",$query);\n\t\t\t\t$layout_template->set_var(\"SEARCHRESULT.hits\",count($found_pages));\n\t\t\t\t## finally output the whole thing\t\t\t\t\n\t\t\t\t\n\t\t\t\t$layout_template->set_var($element_name,$searchresult_output);\n\t\t\t\tbreak;\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase 'DIVIDER': {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\t## we need to check if we have a module for this datatype\n\t\t\t\t$target = strtolower($element_type);\n\t\t\t\t\n\t\t\t\t## first we try to include the apropriate file \n\t\t\t\t@include_once(\"datatypes/extra_\".$target.\"/\".$target.\".php\");\n\t\t\t\t## now we check if the function exists\n\t\t\t\t\n\t\t\t\tif(function_exists($target.\"_output\")) {\n\t\t\t\t\t## no we call the function\n\t\t\t\t\t## check if the page_record entry is defined\n\t\t\t\t\t## if not we need to pass the whole record\n\t\t\t\t\t$function = $target.\"_output\";\n\t\t\t\t\tif(isset($page_record[$element_name])) {\n\t\t\t\t\t\t$element = $function($page_record[$element_name],$elements[$counter],$menu_id,$page_id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$element = $function($page_record,$elements[$counter],$layout_template,$menu_id,$page_id);\n\t\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t\t\tif(is_array($element)) {\n\t\t\t\t\t\t$layout_template->set_vars($element);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$layout_template->set_var($element_name,$element);\n\t\t\t\t\t}\n\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\n\t\t$counter++;\n\t}\n\n\t## this is it- so we will flush the template here\t\t\n\t$output .= $layout_template->fill_block(\"body\");\n\t##$output .= $layout_template->fill_block(\"foot\");\n\t##$output = $layout_template->finish($output);\n\tpagecache_createCacheFile($page_id,$output);\n\treturn $output;\n}", "title": "" }, { "docid": "179fa592f51c0fe1400c307f6ad73144", "score": "0.6106665", "text": "public function run()\n {\n $pages = [\n [\n 'name' => 'Home',\n 'is_public' => false,\n 'is_password_protected' => true,\n 'cover_image' => 'cda-interview-guide.jpg',\n 'meta_title' => 'Home Page',\n 'meta_description' => 'Home Page',\n ],\n [\n 'name' => 'Contact Us',\n 'is_public' => false,\n 'is_password_protected' => false,\n 'cover_image' => 'contact-us.png',\n 'meta_title' => 'Contact Us',\n 'meta_description' => 'Contact Us',\n ],\n ];\n\n foreach ($pages as $page) {\n \\App\\Models\\Page::create([\n 'name' => $page['name'],\n 'is_public' => $page['is_public'],\n 'is_password_protected' => $page['is_password_protected'],\n 'cover_image' => $page['cover_image'],\n 'meta_title' => $page['meta_title'],\n 'meta_description' => $page['meta_description'],\n ]);\n }\n }", "title": "" }, { "docid": "b930c216037d11e22def082a7d4a43e9", "score": "0.6101674", "text": "function honeycomb_page_content() {\n\t\t?>\n\t\t<div class=\"entry-content\">\n\t\t\t<?php the_content(); ?>\n\t\t\t<?php\n\t\t\t\twp_link_pages( array(\n\t\t\t\t\t'before' => '<div class=\"page-links\">' . __( 'Pages:', 'honeycomb' ),\n\t\t\t\t\t'after' => '</div>',\n\t\t\t\t) );\n\t\t\t?>\n\t\t</div><!-- .entry-content -->\n\t\t<?php\n\t}", "title": "" }, { "docid": "eac20b6e38468a867a170e85675c91c8", "score": "0.6101205", "text": "public function index()\n {\n $this->data['list'] = $this->cms_page_model->get_all();\n \n $this->template->load_asset(array('datatable', 'dialog', 'bootstrap_switch'));\n \n $this->template->build('admin/cms/page/index', $this->data);\n }", "title": "" }, { "docid": "439cd37796bc5ef2a8fadbc8d5cd3eb4", "score": "0.60912037", "text": "public function createNestedPagesAndCopyLiveParentPage() {}", "title": "" }, { "docid": "0a138457c8a96ea18a53ded64e0867bf", "score": "0.6054888", "text": "public function indexAction()\n {\n $tiles = array();\n $tiles[] = $indexRegion = $this->createIndexRegion();\n return $this->render($this->findTemplatePath('page.html'), [\n 'tiles' => $tiles,\n 'indexRegion' => $indexRegion,\n ]);\n }", "title": "" }, { "docid": "8d1f88c2d612003d48c3c5223a469315", "score": "0.605412", "text": "public function page_theories_create()\n {\n //--- Page title\n $page_sidebar = \"strategy\";\n $page_title = \"create\";\n $page_breadcrumbs = array(\n \"Console\" => \"/admin\",\n \"content->theories\" => \"/admin/page_theories_list\",\n );\n\n //--- Для контента\n\n\n //--- Передаем в вид\n return view('Admin.Content.page_theories_create',[\n 'page_sidebar' => $page_sidebar,\n 'page_title' => $page_title,\n 'page_breadcrumbs' => $page_breadcrumbs,\n // Для контента\n\n ]);\n }", "title": "" }, { "docid": "775f001e0a2605ee98851033b2a03db9", "score": "0.6048245", "text": "public function actionCreatePages()\n {\n $model = new Pages();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view-pages', 'id' => $model->id]);\n } else {\n return $this->render('pages/create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "45c36ac660f0e3e1017729c9682b0409", "score": "0.60407865", "text": "public function main()\n {\n // Produce browse-tree:\n $tree = $this->pagetree->getBrowsableTree();\n // Outputting page tree:\n $this->content .= $tree;\n\n $docHeaderButtons = $this->getButtons();\n\n $markers = array(\n 'IMG_RESET' => '',\n 'WORKSPACEINFO' => '',\n 'CONTENT' => $this->content,\n );\n\n // Build the <body> for the module\n $this->content = $this->doc->startPage(\n $this->getLanguageService()->sl(\n 'LLL:EXT:commerce/Resources/Private/Language/locallang_be.xml:mod_orders.navigation_title'\n )\n );\n\n $subparts = array();\n // Build the <body> for the module\n $this->content .= $this->doc->moduleBody(array(), $docHeaderButtons, $markers, $subparts);\n $this->content .= $this->doc->endPage();\n $this->content = $this->doc->insertStylesAndJS($this->content);\n }", "title": "" }, { "docid": "2484308bae13b37dba9cff8dcab5b282", "score": "0.60354054", "text": "public function run()\n {\n Page::create([\n 'series_id' => Series::where(['route' => 'walnuts'])->first()->id,\n 'author_id' => User::where(['is_author' => true])->first()->id,\n 'title' => 'About',\n 'content' => 'Yeah, just another test, here...',\n ])->setStatus('public', 'seed data');\n }", "title": "" }, { "docid": "2d7f042cd4a4ce5482e2c7c677d01260", "score": "0.6032847", "text": "public function run()\n {\n $pages = [\n [\n 'id' => 1,\n 'title' => 'About Minecrafter',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 2,\n 'title' => 'Privacy policy',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 3,\n 'title' => 'General Terms',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 4,\n 'title' => 'Store Terms',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 5,\n 'title' => 'Reports',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 6,\n 'title' => 'Rules',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n [\n 'id' => 7,\n 'title' => 'Youtuber Apply',\n 'page_text' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque condimentum, enim nec molestie viverra, lacus nisl accumsan enim, at porta eros odio at dui. Integer quis sem pellentesque, consectetur arcu eget, rutrum dolor. Praesent mauris felis, fringilla sit amet hendrerit vel, finibus at sapien. Suspendisse ut feugiat nunc, at dictum turpis. Nam eget tortor sit amet risus iaculis ultrices ac sed elit. Nunc vestibulum fringilla est non tincidunt. Cras sed mauris nec libero aliquet blandit et ut ligula. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Morbi pretium augue tellus, at faucibus urna eleifend sed. Nullam faucibus justo quam, non porta elit eleifend vitae.'\n ],\n ];\n\n ContentPage::insert($pages);\n }", "title": "" }, { "docid": "0e69c6f404eb6635a4346c1cdb6123ad", "score": "0.602514", "text": "public function create()\n {\n return view(\"pages.create\");\n }", "title": "" }, { "docid": "213df5996d55af52b31872373430835a", "score": "0.6022898", "text": "public function create()\n {\n // $templates = $this->getPageTemplates();\n $orderPages = Page::all();\n return view('admin.pages.create')->with('orderPages', $orderPages);\n }", "title": "" }, { "docid": "cd251773e62c302e2c3daf6a05a420b9", "score": "0.6020321", "text": "public function index()\n {\n $customPage = new CustomPage();\n $customPage->title = trans('app.privacy_policy');\n $customPage->text = Config::get('app.privacy_policy');\n\n $this->title($customPage->title);\n $this->pageView('pages::show_custom_page', compact('customPage'));\n }", "title": "" }, { "docid": "559c44bff75595391c07a176a9c3ebe8", "score": "0.6018396", "text": "abstract function render_page();", "title": "" }, { "docid": "f43ff806a9b492abf3078840512ff385", "score": "0.60182786", "text": "private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }", "title": "" }, { "docid": "f9ace4ca20feb8e449bef19f93913526", "score": "0.5996445", "text": "function makeContent($conn, $thisPagename){\n /*\n this creates the content from the content\n table based on the supplied $thisPagename variable.\n It will then loop through all the matching content\n records and export those individually.\n */\n $sql = \"SELECT * FROM test.content WHERE pagename = '$thisPagename'\";\n $result = $conn->query($sql);\n while($row = $result->fetch_assoc()){\n echo $row['contenttitle'];\n echo $row['content'];\n }\n }", "title": "" }, { "docid": "9c6e6287450acf36414168a5aecdb2ee", "score": "0.59899586", "text": "function create_home_page() {\n if(get_page_by_title('Home')) {\n }\n else {\n global $wpdb;\n // First Page\n $first_page = get_site_option( 'first_page');\n $first_post_guid = get_option('home') . '/?page_id=1';\n $wpdb->insert( $wpdb->posts, array(\n 'post_content' => '',\n 'post_excerpt' => '',\n 'post_title' => __( 'Home' ),\n /* translators: Default page slug */\n 'post_name' => __( 'home' ),\n 'guid' => $first_post_guid,\n 'post_type' => 'page',\n 'to_ping' => '',\n 'pinged' => '',\n 'comment_status' => 'closed',\n 'post_content_filtered' => ''\n ));\n\n $wpdb->insert( $wpdb->postmeta, array( 'post_id' => 1, 'meta_key' => '_wp_page_template', 'meta_value' => 'default' ) );\n\n }\n }", "title": "" }, { "docid": "53864ea72dea40d92142e16987533448", "score": "0.5987068", "text": "function view_page($slug){\r\n if(!$slug[0])\r\n return array();\r\n\r\n // create variable to hold the final html output\r\n $content = array();\r\n\r\n // get all content pieces that are submitted to the page\r\n $result = $this->reg->db->GetAll('SELECT system__content.id, title, content, last_edited, show_title, show_date, advanced, head\r\n FROM system__intersect__navigation_content\r\n LEFT JOIN system__content\r\n ON system__intersect__navigation_content.content_id = system__content.id\r\n LEFT JOIN system__navigation\r\n ON system__intersect__navigation_content.navigation_id = system__navigation.id\r\n WHERE system__navigation.url_slug = ?\r\n AND state = ?\r\n ORDER BY created DESC', array($slug[0], 'published'));\r\n\r\n // loop though and create posts for each content piece\r\n if(count($result)){\r\n foreach($result as $row){\r\n // escape data for output\r\n $html['id'] = $this->reg->validation->escape_html($row['id']);\r\n\r\n $content[$html['id']]['title'] \t\t= $this->reg->validation->escape_rich_text($row['title']);\r\n $content[$html['id']]['content'] \t= $this->reg->validation->escape_rich_text($row['content']);\r\n $content[$html['id']]['date'] \t\t= date('M j, Y', $this->reg->validation->escape_html(strtotime($row['last_edited'])));\r\n $content[$html['id']]['advanced'] = (bool)$row['advanced'];\r\n $content[$html['id']]['show_title'] = (bool)$row['show_title'];\r\n $content[$html['id']]['show_date'] = (bool)$row['show_date'];\r\n\r\n // include head if post is set as advanced\r\n if($row['advanced']){\r\n $this->reg->config->set('head.', $row['head']);\r\n }\r\n }\r\n }\r\n\r\n // return final html\r\n return $content;\r\n }", "title": "" }, { "docid": "9ce84fe4ca6411260b2a0b4ddbb949e0", "score": "0.59795886", "text": "protected function prepareQuickTemplate() {\n\t\t$out = $this->getOutput();\n\t\t// add head items\n\t\t$out->addMeta( 'viewport', 'initial-scale=1.0, user-scalable=yes, minimum-scale=0.25, ' .\n\t\t\t\t'maximum-scale=5.0, width=device-width'\n\t\t);\n\n\t\t// Generate skin template\n\t\t$tpl = parent::prepareQuickTemplate();\n\n\t\t$this->doesPageHaveLanguages = $tpl->data['content_navigation']['variants'] ||\n\t\t\t$tpl->data['language_urls'];\n\n\t\t// Set whether or not the page content should be wrapped in div.content (for\n\t\t// example, on a special page)\n\t\t$tpl->set( 'unstyledContent', $out->getProperty( 'unstyledContent' ) );\n\n\t\t// Set the links for the main menu\n\t\t$tpl->set( 'menu_data', $this->getMenuData() );\n\n\t\t// Set the links for page secondary actions\n\t\t$tpl->set( 'secondary_actions', $this->getSecondaryActions( $tpl ) );\n\n\t\t// Construct various Minerva-specific interface elements\n\t\t$this->preparePageContent( $tpl );\n\t\t$this->prepareHeaderAndFooter( $tpl );\n\t\t$this->prepareMenuButton( $tpl );\n\t\t$this->prepareBanners( $tpl );\n\t\t$this->preparePageActions( $tpl );\n\t\t$this->prepareUserButton( $tpl );\n\t\t$this->prepareLanguages( $tpl );\n\n\t\treturn $tpl;\n\t}", "title": "" }, { "docid": "7b8e2c33473d47d04c88cdf82b2b5feb", "score": "0.5977397", "text": "public function startNewPage()\n {\n }", "title": "" }, { "docid": "890a6646bc826b163276c19cfb806181", "score": "0.5972489", "text": "public function generate(array $pageConfiguration);", "title": "" }, { "docid": "2eba22134d5744dfd665378ef82d538f", "score": "0.59721994", "text": "public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}", "title": "" }, { "docid": "1df1fc3bd570d80f9262a14da239afcc", "score": "0.59708965", "text": "function aman_create_page() {\n\trequire_once(get_template_directory() . '/inc/templates/aman-admin.php');\n}", "title": "" }, { "docid": "ea1cb94ea14f6bcd64e7c9f98783b9eb", "score": "0.59680575", "text": "private function buildPage() {\n ob_clean();\n ob_start();\n\n //session_start();\n require_once $this->_template;\n\n $this->_page = ob_get_clean();\n }", "title": "" }, { "docid": "bc388f96235b00c590021d22b42896e1", "score": "0.5962677", "text": "public function create()\n {\n\treturn view('pages.create');\n }", "title": "" }, { "docid": "d0ed47de3d28cf98a1a616e6d0792923", "score": "0.5960169", "text": "public function addPage()\n\t{\n\t\tglobal $cfg;\n\t\t$data = $cfg['data'];\n\n\t\t// Load the content model\n\t\t$content = $this->load_model('Content');\n\n\t\t// Get all the available pages from database\n\t\t$pages[0] = '- New Page -'; \n\t\tforeach ($content->get_pages() as $key) \n\t\t{\n\t\t\t$pages[$key['id']] = $key['name'];\n\t\t}\n\n\t\t// Get all the available regions from the database\n\t\tforeach ($content->get_regions() as $key) {\n\t\t\t$regions[$key['id']] .= $key;\n\t\t}\n\n\t\t$form = new Form();\n\n\t\t$form->set_validate_rules(\"page\", \"Page name\", \"required\");\n\n\t\tif($form->validate())\n\t\t{\n\t\t\t$content = $this->load_model(\"Content\");\n\n\t\t\tif($_POST['page_id'] == 0)\n\t\t\t\t$content->insertPage();\n\t\t\telse\n\t\t\t\t$content->updatePage();\n\n\t\t\tredirect(\"content\");\n\t\t}\n\n\t\t$data['content']['main'] = \"<fieldset class='clearfix inline-block'><legend>New page</legend>\";\n\t\t$data['content']['main'] .= $form->start();\n\t\t$data['content']['main'] .= \"<lable>Parent page</lable>\";\n\t\t$data['content']['main'] .= $form->select($pages, array('style' => 'width:100%', 'name' => 'page_id'));\n\t\t$data['content']['main'] .= \"<lable>Page name</lable>\";\n\t\t$data['content']['main'] .= $form->input('text', array('style' => 'width:100%', 'name' => 'page'));\n\t\t$data['content']['main'] .= $form->input('submit', array('value' => 'Save', 'style' => 'width:100%'));\n\t\t$data['content']['main'] .= \"</form></fieldset>\";\n\t\t$data['content']['main'] .= $form->validate_error();\n\n\t\t$this->load_view('default', $data);\n\t}", "title": "" }, { "docid": "d772f79a9944fdaa54f95cce542e2f5b", "score": "0.5950546", "text": "public function actionCreate()\n {\n $model = new Page();\n if ($model->load($post = Yii::$app->request->post())) {\n\n $SiteContent = new SiteContent();\n $SiteContent->type = 'page';\n $SiteContent->created_by = Yii::$app->user->id;\n $SiteContent->save();\n $langs = active_langauges();\n foreach ($langs as $index => $lang) {\n $model2 = new Page();\n $model2->language = $lang->lang_code;\n $model2->title = $model->title[$lang->lang_code];\n $model2->body = $model->body[$lang->lang_code];\n $model2->status = $model->status;\n $model2->file = $model->image;\n $model2->user_id = Yii::$app->user->identity->id;\n $model2->content_id = $SiteContent->id;\n $model2->save();\n } \n return $this->redirect(['index']);\n }\n $this->registerJs(array(\n 'dist/libs/tinymce/tinymce.min.js',\n 'theme/components/tinymce-editor.js',\n ));\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "2f12a2e0de0035b61f8c50b4d321a9f4", "score": "0.5950374", "text": "protected function setupPage() {}", "title": "" }, { "docid": "31db6ee49dfcf72894cc5ead453a359c", "score": "0.59449744", "text": "function fsnat_create_page() {\n\trequire_once( get_template_directory() . '/inc/templates/fsnat-admin.php');\n}", "title": "" }, { "docid": "fe8d77cbc5fa07f0292ee295a42a93be", "score": "0.5936393", "text": "public function create()\n\t{\n\t \n\t \n\t return view('admin.godpagecontent.create');\n\t}", "title": "" }, { "docid": "e98d524b10c74e991fff331445c27b70", "score": "0.5935155", "text": "public function run()\n\t{\n\t\tDB::table('pages')->delete();\n\t\tPage::create(array(\n\t 'heading1' => '<h2 class=\"red-title\"><span>Driving Network Solution</span></h2>',\n 'body1' => '<p>Established in 2000, OCK Group is principally involved in the provision of telecommunications network services. We are able to provide full turnkey services in that respect.</p>',\n 'heading2' => '',\n 'body2' => '', \n\t ));\n\t\t\n\t}", "title": "" }, { "docid": "3675e0fe7d4031a9c1b1ecd7c618bfa7", "score": "0.59335047", "text": "public function create()\n {\n $page_category = PageCategory::all();\n $list_view = Storage::disk('views')->files();\n $this->viewData = array(\n 'title' => 'Page Manager | Page | Create',\n 'page_category' => $page_category,\n 'list_view' => $list_view\n );\n return view ( 'pages::admin.pages.create', $this->viewData );\n }", "title": "" }, { "docid": "cdea0f6a03818a56c29731e92b532324", "score": "0.59303755", "text": "public function initPage() {}", "title": "" }, { "docid": "cdea0f6a03818a56c29731e92b532324", "score": "0.59303755", "text": "public function initPage() {}", "title": "" }, { "docid": "775369a72f21a8c0ba0f03619bf343c0", "score": "0.5929978", "text": "function index() {\r\n $this->page();\r\n }", "title": "" }, { "docid": "dbbb36390697da45345945947d05c484", "score": "0.5924252", "text": "public function create()\n {\n return view('backend::page.create');\n }", "title": "" } ]
6ae4ab04d1eecb285046966cf4fd05fc
Provides operations to manage the plans property of the microsoft.graph.plannerUser entity.
[ { "docid": "dcf14e0b40b6eb42c9c14ab7b55857ad", "score": "0.0", "text": "public function plans(): PlansRequestBuilder {\n return new PlansRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "title": "" } ]
[ { "docid": "24b9ee151fb46fb3eedcf08c22900352", "score": "0.6018756", "text": "public function setPlanner(?PlannerUser $value): void {\n $this->getBackingStore()->set('planner', $value);\n }", "title": "" }, { "docid": "808192db7f5eb1d9476abb1f181483a5", "score": "0.5851005", "text": "public function created(PlanUser $planUser)\n {\n $planUser->fixReservations();\n \n $planUser->user->updateStatus();\n // $this->updateStatusUser($planUser);\n }", "title": "" }, { "docid": "8e19c57983769f15734ac8c55ed837e9", "score": "0.572026", "text": "public function plan()\n {\n return $this->belongsTo('App\\Models\\Plan');\n }", "title": "" }, { "docid": "8e19c57983769f15734ac8c55ed837e9", "score": "0.572026", "text": "public function plan()\n {\n return $this->belongsTo('App\\Models\\Plan');\n }", "title": "" }, { "docid": "88455a62195957e771cf4e83135bafda", "score": "0.5708472", "text": "public function createPlan()\n {\n return $this->api->request('POST', '/2.0/subscription/plans_create', [\n\n ]);\n }", "title": "" }, { "docid": "83a5000a10df419d23ee87653a6929c5", "score": "0.5671897", "text": "public function applyMembershipPlan($userId, $membershipPlanId)\r\n\t{\r\n\t\t$user = User::findOrFail($userId);\r\n\t\t$membershipPlan = $this->getById($membershipPlanId);\r\n\r\n\t\t//archives all user listings if membership plan is changed\r\n\t\tif (! $membershipPlan->isCurrent($user))\r\n\t\t{\r\n\t\t\t$user->listings()->update(['st_archived' => true]);\r\n\t\t}\r\n\r\n\t\t//expiration date\r\n\t\tif ($membershipPlan->duration)\r\n\t\t{\r\n\t\t\t//if membership plan is not free, if user has the same plan and plan is not expired yet, then plan is extended\r\n\t\t\tif ($membershipPlan->price //saves from manipulation by adding and adding days\r\n\t\t\t\tAND $membershipPlan->isCurrent($user)\r\n\t\t\t\tAND ! $user->isExpired())\r\n\t\t\t{\r\n\t\t\t\t$data['expires_on'] = $user->expires_on->addDays($membershipPlan->duration);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$data['expires_on'] = Carbon::now()->addDays($membershipPlan->duration);\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$data['expires_on'] = null;\r\n\t\t}\r\n\r\n\t\t//membership plan id\r\n\t\t$data['membership_plan_id'] = $membershipPlanId;\r\n\r\n\r\n\t\t//updates user\r\n\t\t$user->update($data);\r\n\t}", "title": "" }, { "docid": "331f4fe5c9bf3809ec7294d02726accf", "score": "0.5615004", "text": "public function membershipPlansAction() {\n \n $PlansModel = Admin_Model_Plans::getInstance();\n $subResult = $PlansModel->getPlanDetails();\n $this->view->subResult = $subResult;\n }", "title": "" }, { "docid": "b323d5713b1fd8b6aa175fd2dfdd58f8", "score": "0.5586477", "text": "public function plan()\n {\n return $this->belongsTo('App\\Plan');\n }", "title": "" }, { "docid": "ef2c94298a492266a65b54dee65b5fbe", "score": "0.5582991", "text": "public function updated(PlanUser $planUser)\n {\n if ($planUser->isCanceled()) {\n foreach ($planUser->reservations as $reservation) {\n if ($reservation->isPending() || $reservation->isConfirmed()) {\n $reservation->delete();\n } elseif ($reservation->isConsumed() || $reservation->isLost()) {\n $reservation->update(['plan_user_id' => null]);\n }\n }\n } else {\n $planUser->fixReservations();\n }\n\n $this->updateStatusUser($planUser);\n }", "title": "" }, { "docid": "a421342b50e3ab61527efc7b46f0940a", "score": "0.5548683", "text": "public function plan()\n {\n \n $planList = $this->Plan->find()->toArray();\n $this->set('planList',$planList);\n }", "title": "" }, { "docid": "f80706c5727c8dc5125c2dc41a76bb1d", "score": "0.5539161", "text": "protected function render_pyramid_user_plan(pyramid_user_plan $plan) {\n\t $o = ''; // Output HTML code.\n\t $numberofphases = count($plan->phases);\n\t $o .= html_writer::start_tag('div', array(\n\t 'class' => 'userplan',\n\t 'aria-labelledby' => 'mod_workshop-userplanheading',\n\t 'aria-describedby' => 'mod_workshop-userplanaccessibilitytitle',\n\t ));\n\t \n\t $o .= html_writer::span(get_string('userplanaccessibilitytitle', 'pyramid', $numberofphases),\n\t 'accesshide', array('id' => 'mod_workshop-userplanaccessibilitytitle'));\n\t $o .= html_writer::link('#mod_workshop-userplancurrenttasks', get_string('userplanaccessibilityskip', 'pyramid'),\n\t array('class' => 'accesshide'));\n\n\t foreach ($plan->phases as $phasecode => $phase) {\n\t $o .= html_writer::start_tag('dl', array('class' => 'phase'));\n\t $actions = '';\n\t if ($phase->active) {\n\t // Mark the section as the current one.\n\t $icon = $this->output->pix_icon('i/marked', '', 'moodle', ['role' => 'presentation']);\n\t $actions .= get_string('userplancurrentphase', 'workshop').' '.$icon;\n\t \n\t } else {\n\t // Display a control widget to switch to the given phase or mark the phase as the current one.\n\t foreach ($phase->actions as $action) {\n\t \n\t if ($action->type === 'switchphase') {\n\t if ($phasecode == pyramid::PHASE_2 && $plan->pyramid->phase == pyramid::PHASE_3\n\t && $plan->pyramid->phaseswitchassessment) {\n\t $icon = new pix_icon('i/scheduled', get_string('switchphaseauto', 'pyramid'));\n\t } else {\n\t $icon = new pix_icon('i/marker', get_string('switchphase'.$phasecode, 'pyramid'));\n\t }\n\t $actions .= $this->output->action_icon($action->url, $icon, null, null, true);\n\t }\n\t }\n\t }\n\t \n\t if (!empty($actions)) {\n\t $actions = $this->output->container($actions, 'actions');\n\t }\n\t $classes = 'phase' . $phasecode;\n\t if ($phase->active) {\n\t $title = html_writer::span($phase->title, 'phasetitle', ['id' => 'mod_workshop-userplancurrenttasks']);\n\t $classes .= ' active';\n\t } else {\n\t $title = html_writer::span($phase->title, 'phasetitle');\n\t $classes .= ' nonactive';\n\t }\n\t $o .= html_writer::start_tag('dt', array('class' => $classes));\n\t $o .= $this->output->container($title . $actions);\n\t $o .= html_writer::start_tag('dd', array('class' => $classes. ' phasetasks'));\n\t $o .= $this->helper_user_plan_tasks($phase->tasks);\n\t $o .= html_writer::end_tag('dd');\n\t $o .= html_writer::end_tag('dl');\n\t }\n\t $o .= html_writer::end_tag('div');\n\t return $o;\n\t}", "title": "" }, { "docid": "389ca7981dca484755b9696aaaf28dca", "score": "0.55301803", "text": "public function plan()\n {\n return $this->belongsTo(Plan::class);\n }", "title": "" }, { "docid": "44ccf1606058ce83e885f8f2d5397c62", "score": "0.5503407", "text": "public function plan()\n {\n return $this->hasOne('App\\Plan');\n\t}", "title": "" }, { "docid": "6b1e660f1a220a4f156c781f84fb0422", "score": "0.5482241", "text": "public function setPlan(&$data)\n {\n $data['Business']['plan_id'] = 1;\n\n }", "title": "" }, { "docid": "ed657535b1c095e23d17eecf04058e4e", "score": "0.5466192", "text": "public function set_plan( $plan )\n\t{\n\t\t$this->_plan = $plan;\n\t}", "title": "" }, { "docid": "7b617f7acf3a31235ebf7b4638c39138", "score": "0.5460626", "text": "public function add_user_plan_fields(){\n\t\t\n\t\t$fields=[];\n\t\t\n\t\t$user_plan = get_post();\n\n\t\tif( !empty($user_plan->post_author) ){\n\t\t\n\t\t\t$layer_plan = $this->get_user_plan_info( intval($user_plan->post_author) );\n\t\t\t$fields[]=array(\n\t\t\t\n\t\t\t\t\"metabox\" =>\n\t\t\t\t\n\t\t\t\t\tarray('name'\t=>\"userPlanValue\"),\n\t\t\t\t\t'id'\t\t\t=>\t\"userPlanValue\",\n\t\t\t\t\t'label'\t\t\t=>\t\"\",\n\t\t\t\t\t'type'\t\t\t=>\t'plan_value',\n\t\t\t\t\t'plan'\t\t\t=>\t$layer_plan,\n\t\t\t\t\t'placeholder'\t=>\t\"Plan Value\",\n\t\t\t\t\t'description'\t=>\t''\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "c4edd36493c52380e6e2664613e516e8", "score": "0.54567647", "text": "public function planner_save_planification() {\n \n // Save planification\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Planify)->planner_save_planification();\n \n }", "title": "" }, { "docid": "8daca95fd85d6a6d8b45bd278d687554", "score": "0.54554826", "text": "public function upgradePlanAction()\n\t\t{\n\t\t\t$usersNs = new Zend_Session_Namespace(\"members\");\n\t $Doctor = new Application_Model_Doctor();\n\t\t\t$User = new Application_Model_User();\n\t $docObject = $Doctor->fetchRow(\"user_id='{$usersNs->userId}'\");\n\t\t\t$userObject = $User->fetchRow(\"id='{$usersNs->userId}'\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$first_name=$userObject->firstName;\n\t\t\t$last_name=$userObject->firstName;\n\t\t\t$address=$docObject->street;\n\t\t\t$city=$docObject->city;\n\t\t\t$state=$docObject->state;\n\t\t\t$country='United State';\n\t\t\t$zip=$docObject->zipcode;\n\t\t\t$billing_address=$docObject->street;\n\t\t\t$billing_city=$docObject->city;\n\t\t\t$billing_state=$docObject->state;\n\t\t\t$billing_country='United State';\n\t\t\t$billing_zip=$docObject->zipcode;\n\t\t\t$email=$userObject->email;\n\t\t\t\n\t\t\t$settings = new Admin_Model_GlobalSettings();\n\t\t\t$premium_monthly_upgrade = $settings->settingValue('premium_monthly_upgrade');\n\t\t\t$premium_annual_upgrade = $settings->settingValue('premium_annual_upgrade');\n\t\t\t$this->view->premium_upgrade=$premium_monthly_upgrade.'?first_name='.$first_name.'&last_name='.$last_name.'&address='.$address.'&city='.$city.'&state='.$state.'&country='.$country.'&zip='.$zip.'&billing_address='.$billing_address.'&billing_city='.$billing_city.'&billing_state='.$billing_state.'&billing_country='.$billing_country.'&billing_zip='.$billing_zip.'&email='.$email.'';\n\t\t\t\n\t\t\t$this->view->yearly=$premium_annual_upgrade.'?first_name='.$first_name.'&last_name='.$last_name.'&address='.$address.'&city='.$city.'&state='.$state.'&country='.$country.'&zip='.$zip.'&billing_address='.$billing_address.'&billing_city='.$billing_city.'&billing_state='.$billing_state.'&billing_country='.$billing_country.'&billing_zip='.$billing_zip.'&email='.$email.'';\n\t\t\t\n\t\t\t$customer_premium_id= $this->_getParam('customer_premium_id');\n\t\t\t$yearly= $this->_getParam('plan');\n\t\t\tif($yearly==\"yearly\"){\n\t\t\t$expiry=strtotime('+12 month', time());\n\t\t\t$subscription_type=\"Yearly\";\n\t\t\t}else\n\t\t\t{\n\t\t\t$expiry=strtotime('+1 month', time());\n\t\t\t$subscription_type=\"Monthly\";\n\t\t\t}\n\t\t\t\n\t\t\tif($customer_premium_id)\n\t\t\t{ \n\t\t\t\t\n\t\t\t\t\t$ids=$docObject->id;\n\t\t\t\t\t//echo $ids;die;\n\t\t\t\t\t$idArray = explode(',', $ids);\n\t\t\t\t\t\t$model = new Application_Model_Doctor();\n\t\t\t\t\t\t\tforeach ($idArray as $id) {\n\t\t\t\t\t\t\t//echo $id;die;\n\t\t\t\t\t\t\t\t$object = $model->fetchRow(\"id=\".$id);\n\t\t\t\t\t\t\tif($object){\n\t\t\t\t\t\t\t\t$object->setStatus('1');\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$object->setSubscriptionType($subscription_type);\t\n\t\t\t\t\t\t\t\t$object->setMembershipLevel(\"Premium\");\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$object->setMembershipLevelNo('3');\t\t\t\t\n\t\t\t\t\t\t\t\t$object->setExpiration($expiry);\n\t\t\t\t\t\t\t\t$object->setCustomerId($customer_premium_id);\n\t\t\t\t\t\t\t\t$object->save();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$this->_helper->redirector('upgrade-plan', 'index', \"user\");\t\t \n\t \n\t\t\t}\n\t\t\n\t\t\t$this->view->membership=$docObject;\t\t\n\t\t\t\n\t\t\n\t\t}", "title": "" }, { "docid": "b131059c9955b3a3a990be050f822879", "score": "0.5434742", "text": "public function create_update_subsciption_plans($plans){\n\t\tif($plans)\n\t\t{\n\t\t\tforeach ($plans as $key => $value) {\n\t\t\t\t$plan_exist = getvalfromtbl(\"plan_id\",\"membership_plan\",\"plan_id = '\".$value->id.\"'\",\"single\");\n\t\t\t\tif($plan_exist != \"\")\n\t\t\t\t{\n\t\t\t\t\t/*update details*/\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'plan_id'=> $value->id,\n\t\t\t\t\t\t'name' => $value->name,\n\t\t\t\t\t\t'description' => $value->description,\n\t\t\t\t\t\t'amount' => $value->price\n\t\t\t\t\t);\n\t\t\t\t\t$this->db->where('plan_id', $value->id);\n\t\t\t\t\t$this->db->update('membership_plan', $data);\n\t\t\t\t\t/*update details ends*/\n\n\t\t\t\t}else{ \n\t\t\t\t\t/*insert new plan*/\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'plan_id'=> $value->id,\n\t\t\t\t\t\t'name' => $value->name,\n\t\t\t\t\t\t'description' => $value->description,\n\t\t\t\t\t\t'amount' => $value->price,\n\t\t\t\t\t\t'createdDate' => date('Y-m-d H:i:s')\n\t\t\t\t\t);\n\t\t\t\t\t$this->db->insert('membership_plan', $data);\n\t\t\t\t\t/*insert new plan ends*/\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\telse{\n\t\t}\n\t}", "title": "" }, { "docid": "22c6d530e5eef9df6e05bc802f5e3298", "score": "0.54160905", "text": "public function getPlan() {\n\t\treturn Omelette::getAccountPlan();\n\t}", "title": "" }, { "docid": "ffe3a8444eada56b8cf808b948080050", "score": "0.5393283", "text": "public function plans()\n {\n return $this->morphedByMany('App\\Models\\Plan', 'cartable');\n }", "title": "" }, { "docid": "1050979aef237165cef9854c9a85ea27", "score": "0.53842115", "text": "abstract public function createPlan();", "title": "" }, { "docid": "1c2c9a6a134ced87d431d5c7f110323d", "score": "0.53479016", "text": "public function userIndex()\n {\n return PlanResource::collection(Plan::where('active', 1)->orderBy('position')->get());\n }", "title": "" }, { "docid": "78edde24fe29c71640de366fc1065477", "score": "0.5338714", "text": "public function get_user_plan_info( $user_id ){\n\t\t\n\t\t$user_id = $this->get_license_holder_id($user_id);\n\t\t\n\t\tif( !isset($this->user_plans[$user_id]) ){\n\t\t\n\t\t\t$user_plan_id \t= $this->get_user_plan_id( $user_id );\n\t\t\t$taxonomies \t= $this->get_plan_taxonomies();\n\n\t\t\t$this->user_plans[$user_id] = [];\n\t\t\t\n\t\t\t$this->user_plans[$user_id]['id'] = $user_plan_id;\n\t\t\t\n\t\t\t$this->user_plans[$user_id]['holder'] = $user_id;\n\t\t\t\n\t\t\t$this->user_plans[$user_id]['options'] = array();\n\t\t\t\n\t\t\t$this->user_plans[$user_id]['info']['total_price_amount'] \t= 0;\n\t\t\t$this->user_plans[$user_id]['info']['total_fee_amount'] \t= 0;\n\t\t\t$this->user_plans[$user_id]['info']['total_price_period'] \t= 'month';\n\t\t\t$this->user_plans[$user_id]['info']['total_fee_period'] \t= 'once';\n\t\t\t$this->user_plans[$user_id]['info']['total_price_currency'] = '$';\n\t\t\t\n\t\t\tforeach($taxonomies as $i => $t){\n\t\t\t\t\n\t\t\t\t$taxonomy \t\t = $t['taxonomy'];\n\t\t\t\t$taxonomy_name \t = $t['name'];\n\t\t\t\t$is_hierarchical = $t['hierarchical'];\n\t\t\t\t\n\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['taxonomy']\t\t= $taxonomy;\n\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['name']\t\t\t= $taxonomy_name;\n\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['is_hierarchical']\t= $is_hierarchical;\n\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms']\t\t\t= [];\n\t\t\t\t\n\t\t\t\t$terms = get_terms( $taxonomy, array( 'hide_empty' => false ) );\n\t\t\t\t\n\t\t\t\tif ( !empty($terms) ) {\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $terms as $term ) {\t\t\t\t\t\t\n\n\t\t\t\t\t\t$term_slug = $term->slug;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$has_term = $in_term = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($user_plan_id > 0 ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$has_term = $in_term = is_object_in_term( $user_plan_id, $taxonomy, $term->term_id );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($is_hierarchical === true && $term->parent > 0 && $has_term === false ){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$parent_id = $term->parent;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\twhile( $parent_id > 0 ){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif($has_term === false){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tforeach($terms as $parent){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif( $parent->term_id == $parent_id ){\n\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$has_term = is_object_in_term( $user_plan_id, $taxonomy, $parent->term_id );\n\n\t\t\t\t\t\t\t\t\t\t\t\t$parent_id = $parent->parent;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\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\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\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\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// push terms\n\t\t\t\t\t\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"slug\"]\t\t\t= $term_slug;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"name\"]\t\t\t= $term->name;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"term_id\"]\t\t= $term->term_id;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"name\"]\t\t\t= $term->name;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"term_group\"]\t\t= $term->term_group;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"term_taxonomy_id\"]= $term->term_taxonomy_id;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"taxonomy\"]\t\t= $term->taxonomy;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"description\"]\t= $term->description;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"parent\"]\t\t\t= $term->parent;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"count\"]\t\t\t= $term->count;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"filter\"]\t\t\t= $term->filter;\n\t\t\t\t\t\t$this->user_plans[$user_id]['taxonomies'][$taxonomy]['terms'][$term_slug][\"has_term\"]\t\t= $has_term;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $has_term === true ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$options = $this->parent->layer->get_options( $taxonomy, $term );\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( empty($term->parent) || !$this->is_parent_in_plan( $user_plan_id, $taxonomy, $term->parent ) ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->user_plans[$user_id]['info']['total_fee_amount']\t \t= $this->sum_total_price_amount( $this->user_plans[$user_id]['info']['total_fee_amount'], $options, $this->user_plans[$user_id]['info']['total_fee_period'] );\n\t\t\t\t\t\t\t\t$this->user_plans[$user_id]['info']['total_price_amount'] \t= $this->sum_total_price_amount( $this->user_plans[$user_id]['info']['total_price_amount'], $options, $this->user_plans[$user_id]['info']['total_price_period'] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->user_plans[$user_id]['info']['total_storage'] = $this->sum_total_storage( $this->user_plans[$user_id]['info']['total_storage'], $options);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( $taxonomy == 'account-option' ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tdo_action('ltple_user_plan_option_total',$user_id,$options);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->user_plans[$user_id]['options'] = array_merge($this->user_plans[$user_id]['options'],$options);\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// get stored user plan value\n\t\t\t\n\t\t\t$user_plan_value = intval( get_post_meta( $user_plan_id, 'userPlanValue',true ) );\n\t\t\t\n\t\t\t// compare it with current value\n\t\t\t\n\t\t\tif( empty($user_plan_value) || $this->user_plans[$user_id]['info']['total_price_amount'] != $user_plan_value ){\n\n\t\t\t\tupdate_post_meta( $user_plan_id, 'userPlanValue', $this->user_plans[$user_id]['info']['total_price_amount'] );\n\t\t\t}\n\t\t\t\n\t\t\tdo_action('ltple_user_plan_info',$user_id);\n\t\t}\n\t\t\n\t\treturn $this->user_plans[$user_id];\t\n\t}", "title": "" }, { "docid": "6c73921b765d9a9b1956cdb22ca88d79", "score": "0.53360474", "text": "public function plan(){\n return $this->belongsTo(Plan::class);\n }", "title": "" }, { "docid": "4d2580f950ff33e7af874e4b05ce35bf", "score": "0.5322243", "text": "function command_member_plan_update () {\n global $esc_post;\n \n // Verify permissions\n if (!user_access('member_plan_edit')) {\n error_register('Permission denied: member_plan_edit');\n return 'index.php?q=plans';\n }\n \n // Update plan\n $sql = \"\n UPDATE `plan`\n SET\n `name`='$esc_post[name]',\n `price`='$esc_post[price]',\n `active`='$esc_post[active]',\n `voting`='$esc_post[voting]'\n WHERE `pid`='$esc_post[pid]'\n \";\n \n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n \n return \"index.php?q=plans\";\n}", "title": "" }, { "docid": "efe3a7b1aa975247bb95a2d67842c2e1", "score": "0.53031486", "text": "private static function _canManagePlans()\n {\n $license = new \\pm_License();\n $properties = $license->getProperties();\n\n $hasHostingPlans = $properties['can-manage-customers'];\n $hasResellerPlans = $properties['can-manage-resellers'];\n\n if (!$hasHostingPlans || !$hasResellerPlans) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "1f917d119549a7c46397fb7c6331e26f", "score": "0.528554", "text": "public function edit(Plan $plan) {\n \n }", "title": "" }, { "docid": "ddd4dbb264b9fb7ac8535b2a8c3ba675", "score": "0.52818763", "text": "public function updatePlanToTrial($user, $id_plan){\n $toupdate = array(\n 'status'=>'t'\n );\n $this->db->where('id_user', $user);\n $this->db->where('id_user', $user);\n $this->db->update('record_user_plan', $toupdate);\n }", "title": "" }, { "docid": "a066684f84646bd656714726b6f57efc", "score": "0.52801657", "text": "public function users() {\n \n // Check if the session exists and if the login user is admin\n $this->check_session($this->user_role, 1);\n \n // Get all plans\n $get_plans = $this->plans->get_all_plans(1);\n \n // Get users template\n $this->body = 'admin/users';\n \n $this->content = [\n 'plans' => $get_plans\n ];\n \n $this->admin_layout();\n \n }", "title": "" }, { "docid": "90a220286dc31a1d9545b228fd7f405c", "score": "0.5266461", "text": "public function test_approve_plan() {\n $data = $this->setup_workflow_data();\n $dg = $data['dg'];\n $lpg = $data['lpg'];\n $user = $data['user'];\n $reviewer = $data['reviewer'];\n $otheruser = $data['otheruser'];\n $plan = $data['plan'];\n $tplplan = $data['tplplan'];\n\n // Set waiting for review.\n $tplplan->set('status', plan::STATUS_IN_REVIEW);\n $tplplan->update();\n $plan->set('status', plan::STATUS_IN_REVIEW);\n $plan->update();\n\n // Foreign user cannot do anything.\n $this->setUser($otheruser);\n try {\n api::approve_plan($plan);\n $this->fail('The user can not read the plan.');\n } catch (required_capability_exception $e) {\n $this->assertEquals('nopermissions', $e->errorcode);\n }\n\n // Can not change a plan based on a template.\n $this->setUser($reviewer);\n try {\n api::approve_plan($tplplan);\n $this->fail('The plan is based on a template.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/Template plans are already approved./', $e->getMessage());\n }\n\n // Can not approve a plan already approved.\n $this->setUser($reviewer);\n $plan->set('status', plan::STATUS_ACTIVE);\n try {\n api::approve_plan($plan);\n $this->fail('The plan cannot be approved at this stage.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/The plan cannot be approved at this stage./', $e->getMessage());\n }\n\n // Can not approve a plan already approved.\n $this->setUser($reviewer);\n $plan->set('status', plan::STATUS_COMPLETE);\n try {\n api::approve_plan($plan);\n $this->fail('The plan cannot be approved at this stage.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/The plan cannot be approved at this stage./', $e->getMessage());\n }\n\n // Approve as the owner.\n $this->setUser($user);\n $plan->set('status', plan::STATUS_IN_REVIEW);\n try {\n api::approve_plan($plan);\n $this->fail('The user can not approve the plan.');\n } catch (required_capability_exception $e) {\n $this->assertEquals('nopermissions', $e->errorcode);\n }\n\n // Approve plan from in review.\n $this->setUser($reviewer);\n api::approve_plan($plan);\n $plan->read();\n $this->assertEquals(plan::STATUS_ACTIVE, $plan->get('status'));\n\n // Approve plan by ID.\n $plan->set('status', plan::STATUS_IN_REVIEW);\n $plan->update();\n api::approve_plan($plan->get('id'));\n $plan->read();\n $this->assertEquals(plan::STATUS_ACTIVE, $plan->get('status'));\n\n // Approve plan from draft.\n $plan->set('status', plan::STATUS_DRAFT);\n $plan->update();\n api::approve_plan($plan);\n $plan->read();\n $this->assertEquals(plan::STATUS_ACTIVE, $plan->get('status'));\n\n // Approve plan from waiting for review.\n $plan->set('status', plan::STATUS_WAITING_FOR_REVIEW);\n $plan->update();\n api::approve_plan($plan);\n $plan->read();\n $this->assertEquals(plan::STATUS_ACTIVE, $plan->get('status'));\n }", "title": "" }, { "docid": "96883ae3e844b3b62fe3ec53618410bf", "score": "0.5259451", "text": "public function edit(Plan $plan)\n {\n //\n }", "title": "" }, { "docid": "054f091e49cc34b112d2858edf1e4481", "score": "0.525318", "text": "public function plan($account)\n {\n return $this->requestGet(\n sprintf('users/%s/plan', $account)\n );\n }", "title": "" }, { "docid": "1142fae87be19a925282d00b3d9cb10f", "score": "0.52407813", "text": "public function updatePlan(Request $request)\n {\n if(ClientExercisePlans::where('userID', $request->clientID)->where('active', '=', '1')\n ->where('exercisePlanID','=', $request->plansList)->exists()){\n return redirect()->back()->with('error', 'This client is already currently assigned this plan.');\n\n }else{\n //The user is not already assigned this plan so we can proceed and assign them a new plan.\n ClientExercisePlans::where('userID', $request->clientID)->where('active', '=', '1')->update(['active' => 0]);\n $details = new ClientExercisePlans();\n $details->userID = $request->clientID;\n $details->exercisePlanID = $request->plansList;\n $details->active = '1'; \n $details->save();\n \n return redirect()->back()->with('success', 'Successfully assigned this plan to your client.');\n }\n\n }", "title": "" }, { "docid": "dc7f2b5a6f96a36aee1ea973d17196f0", "score": "0.5239755", "text": "public function createPlan() {\n $plan = new Plan();\n // # Basic Information\n // Fill up the basic information that is required for the plan\n $plan->setName('Daily Edition')->setDescription('Template creation 20.')->setType('fixed');\n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition();\n // The possible values for such setters are mentioned in the setter method documentation.\n // Just open the class file. e.g. lib/PayPal/Api/PaymentDefinition.php and look for setFrequency method.\n // You should be able to see the acceptable values in the comments.\n $paymentDefinition\n ->setName('Regular Payments')\n ->setType('REGULAR')\n ->setFrequency('DAY')\n ->setFrequencyInterval(\"2\")\n ->setCycles(\"700\")\n ->setAmount(new Currency(array('value' => 1, 'currency' => 'EUR')));\n // Charge Models\n// $chargeModel = new ChargeModel();\n// $chargeModel->setType('SHIPPING')->setAmount(new Currency(array('value' => 10, 'currency' => 'USD')));\n// $paymentDefinition->setChargeModels(array($chargeModel));\n $merchantPreferences = new MerchantPreferences();\n $baseUrl = PaypalManager::getBaseUrl();\n // ReturnURL and CancelURL are not required and used when creating billing agreement with payment_method as \"credit_card\".\n // However, it is generally a good idea to set these values, in case you plan to create billing agreements which accepts \"paypal\" as payment_method.\n // This will keep your plan compatible with both the possible scenarios on how it is being used in agreement.\n $merchantPreferences\n ->setReturnUrl(\"$baseUrl/ExecuteAgreement.php?success=true\")\n ->setCancelUrl(\"$baseUrl/ExecuteAgreement.php?success=false\")\n ->setAutoBillAmount(\"yes\")->setInitialFailAmountAction(\"CONTINUE\")\n ->setMaxFailAttempts(\"0\")\n ->setSetupFee(new Currency(array('value' => 1, 'currency' => 'EUR')));\n\n $plan->setPaymentDefinitions(array($paymentDefinition));\n $plan->setMerchantPreferences($merchantPreferences);\n// For Sample Purposes Only.\n $request = clone $plan;\n// ### Create Plan\n try {\n $output = $plan->create($this->apiContext);\n } catch (\\Exception $ex) {\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n ResultPrinter::printError(\"Created Plan\", \"Plan\", null, $request, $ex);\n exit(1);\n }\n// NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n //ResultPrinter::printResult(\"Created Plan\", \"Plan\", $output->getId(), $request, $output);\n return $output;\n }", "title": "" }, { "docid": "09c3d700e614b5e38815eb9e655b0dec", "score": "0.5210715", "text": "function command_member_plan_add () {\n global $esc_post;\n \n // Verify permissions\n if (!user_access('member_plan_edit')) {\n error_register('Permission denied: member_plan_edit');\n return 'index.php?q=plans';\n }\n \n // Add plan\n $sql = \"\n INSERT INTO `plan`\n (`name`,`price`, `voting`, `active`)\n VALUES\n ('$esc_post[name]', '$esc_post[price]', '$esc_post[voting]', '$esc_post[active]')\n \";\n \n $res = mysql_query($sql);\n if (!$res) die(mysql_error());\n \n return \"index.php?q=plans\";\n}", "title": "" }, { "docid": "636fd6aae95df20a2f9f34888e75de60", "score": "0.5204996", "text": "function plan($clientId, $planId, $addFormOpen = null) {\n\n\t\t/* Load the required models and helpers*/\n\t\t$this->load->model('user');\n\t\t$this->load->model('training_plan');\n\t\t$this->load->helper('form');\n\n\t\t/* Load the client, trainer and plan */\n\t\t$user = $this->user->getById(activeUser()->id);\n\t\t$client = $this->user->getById($clientId);\n\t\t$plan = $this->training_plan->getById($planId);\n\n\t\t/* Make sure the logged in user is trainer and the client belongs to him */\n\t\tif (!$this->verifyTrainer($user, $client->id)) {\n\t\t\treturn;\n\t\t}\n\n\t\t/* Make sure the training plan belongs to the selected client */\n\t\tif (!$this->verifyPlan($plan, $client->id)) {\n\t\t\treturn;\n\t\t}\n\n\t\t/* Get the exercises for this training plan */\n\t\t$exercises = $plan->getExercises();\n\t\tforeach ($exercises AS $exercise) {\n\t\t\t$images = $exercise->getImages();\n\t\t\t$exercise->images = $images;\n\t\t\t$exercise->imageCount = count($images);\n\t\t}\n\n\t\t$data = array(\n\t\t\t'client' => $client,\n\t\t\t'plan' => $plan,\n\t\t\t'exercises' => $exercises,\n\t\t\t'allowedImageCount' => 5,\n\t\t\t'addFormOpen' => $addFormOpen,\n\t\t\t'template' => platform() . '/trainer/client_plan'\n\t\t);\n\n\t\t/* Show template */\n\t\t$this->load->view(platform() . '/page', $data);\n\n\t}", "title": "" }, { "docid": "ea5be777772e82df17a41d990e8abd66", "score": "0.5202983", "text": "public function plan()\n {\n $fromLocationId = $toLocationId = $timeMode = $at = $vehicleTypes = $walkSpeed = $maximumWalkingDistanceM = $serviceTypes = $fareTypes = null;\n extract($this->request->query);\n\n $passedArg = explode(\"/\", $this->passedArgs[0]);\n $fromLocationId = $passedArg[0];\n $toLocationId = $passedArg[1];\n\n $obj = $this->travel_api_client->plan($fromLocationId, $toLocationId, $timeMode, $at, $vehicleTypes, $walkSpeed, $maximumWalkingDistanceM, $serviceTypes, $fareTypes);\n\n $this->set('response', $obj);\n }", "title": "" }, { "docid": "4397ebd46769827c82b4ab2eb7620b21", "score": "0.5200883", "text": "public function planner_get_planification() {\n \n // Get planification's data\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Planify)->planner_get_planification();\n \n }", "title": "" }, { "docid": "e00d6d4be2eecd1173643224559d7210", "score": "0.5194729", "text": "public function doPayPlan($planName)\n\t{\n\t\tif(Input::has('payment_method_nonce'))\n\t\t{\n\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\t// lets see, if the user already has a subscripton\n\t\t\tif ($user->subscriptionId)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$result = Braintree_Subscription::cancel($user->subscriptionId);\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::route('payment.plan')\n\t\t\t\t\t->with('error',\"Couldn't process subscription, try again later.\");\n\t\t\t\t}\n\t\t\t} \n\t\t\t\n\t\t\t$plans = BraintreeHelper::getPlanDictionary();\n\n\t\t\t// create the new subscription\n\t\t\t$result = Braintree_Subscription::create(array(\n\t\t\t\t'planId' => $plans[$planName]->id,\n\t\t\t\t'paymentMethodNonce' => Input::get('payment_method_nonce'),\n\t\t\t));\n\t\t\t\n\t\t\tif($result->success)\n\t\t\t{\n\t\t\t\t// update user plan to subscrition\n\t\t\t\t$user->plan = $plans[$planName]->id;\n\t\t\t\t$user->subscriptionId = $result->subscription->id;\n\t\t\t\t$user->paymentStatus = 'ok';\n\t\t\t\t$user->save();\n\n\t\t\t\t// send event to intercom about subscription\n\t\t\t\tIntercomHelper::subscribed($user,$plans[$planName]->name);\n\n\t\t\t\t// send email to the user\n\t\t\t\ttry {\n\t\t\t\t\t$email = Mailman::make('emails.payment.upgrade')\n\t\t\t\t\t\t->to($user->email)\n\t\t\t\t\t\t->subject('Upgrade')\n\t\t\t\t\t\t->send();\n\t\t\t\t} catch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\tLog::error('Upgrade email sending error');\n\t\t\t\t\tLog::info($e->getMessage());\n\t\t\t\t\tLog::info($user->email);\n\t\t\t\t}\n\n\t\t\t\treturn Redirect::route('connect.connect')\n\t\t\t\t\t->with('success','Subscribed to '.$plans[$planName]->name);\n\t\t\t} else {\n\t\t\t\treturn Redirect::route('payment.plan')\n\t\t\t\t\t->with('error',\"Couldn't process subscription, try again later.\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "74a5cfd1861e2ab0c609a971205c2b03", "score": "0.51641893", "text": "public function getPlans(): Collection\n {\n return $this->plans;\n }", "title": "" }, { "docid": "473c70c754bd1446cc403ba588410727", "score": "0.51619095", "text": "public function add(SubscriptionPlan $entity): void;", "title": "" }, { "docid": "fa12bf40b71e666e47486095c6462bcd", "score": "0.5160276", "text": "public function getPlanID() {\n return $this->PLAN_ID;\n }", "title": "" }, { "docid": "f21061e36383297de554fcc4992e90ec", "score": "0.5152555", "text": "function planningPerPhase()\n {\n global $g_layout; \n \n // Init project totals\n $this->m_project_totals['initial_amount'] = 0;\n $this->m_project_totals['current_amount'] = 0;\n $this->m_project_totals['planned_amount'] = 0;\n $this->m_project_totals['booked_amount'] = 0;\n\n $phases = $this->_getPhases();\n $output = '<b>'.text(\"planning_per_phase\", \"projectplan\").'</b><br><br>';\n $output.= '<form name=\"editform\" action=\"dispatch.php\" method=\"post\">';\n $output.= session_form(SESSION_NESTED);\n $output.= '<input type=\"hidden\" name=\"atknodetype\" value=\"'.$this->atknodetype().'\">';\n $output.= '<input type=\"hidden\" name=\"atkaction\" value=\"update\">';\n\n $output.= $g_layout->data_top();\n $output.= '<tr>'.$g_layout->ret_td_datatitle('', 'rowspan=\"2\"');\n \n foreach($phases as $phase_id=>$phase_info)\n {\n $output.= $g_layout->ret_td_datatitle($phase_info['name'], 'colspan=\"4\"');\n }\n $output.='</tr>';\n\n $output.= '<tr>';\n \n foreach($phases as $phase_id=>$phase_info)\n {\n $output.= $g_layout->ret_td_datatitle(text(\"initial_short\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"current_short\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"planned_short\", \"projectplan\"));\n $output.= $g_layout->ret_td_datatitle(text(\"actual_short\", \"projectplan\"));\n }\n $output.='</tr>';\n \n // And now the users \n $users = array();\n foreach ($phases as $phase_id => $phaseinfo)\n {\n if(count($phaseinfo[\"emps\"])>0)\n {\n foreach($phaseinfo[\"emps\"] as $user_id=>$empinfo)\n { \n if($user_id==\"other\")\n {\n $users[$user_id] = text(\"other\"); \n }\n else\n { \n $users[$user_id] = $empinfo[\"name\"]; \n }\n }\n }\n } \n \n foreach($users as $user_id => $username)\n { \n $output.= '<tr class=\"row1\">';\n $output.= $g_layout->ret_td_datatitle($username);\n foreach($phases as $phase_id => $phaseinfo)\n { \n if ($user_id!='other' && $this->allowed(\"edit\"))\n {\n $current = $this->_getTimeEntry('phase['.$phase_id.']['.$user_id.']' ,$phaseinfo[\"emps\"][$user_id][\"total\"]['current_time']);\n $class=\"row2\";\n }\n else\n {\n $current = $this->minute_format($phaseinfo[\"emps\"][$user_id][\"total\"]['current_time']);\n $class=\"row1\";\n }\n $output.='<td class=\"table\">'.$this->minute_format($phaseinfo[\"emps\"][$user_id][\"total\"]['initial_time'].'</td>');\n $output.='<td class=\"table '.$class.'\">'.$current.'</td>';\n $output.='<td class=\"table\">'.$this->minute_format($phaseinfo[\"emps\"][$user_id]['total']['planned_time']).'</td>';\n if($phaseinfo[\"emps\"][$user_id]['total']['booked_time']>$phaseinfo[\"emps\"][$user_id]['total']['planned_time'])\n {\n $class=\"errortext\"; \n }\n elseif($phaseinfo[\"emps\"][$user_id]['total']['booked_time']<$phaseinfo[\"emps\"][$user_id]['total']['planned_time'])\n {\n $class=\"oktext\";\n }\n else\n {\n $class=\"normaltext\";\n }\n $output.=$g_layout->ret_td($this->minute_format($phaseinfo[\"emps\"][$user_id]['total']['booked_time']), 'class=\"'.$class.'\"'); \n \n }\n $output.='</tr>';\n }\n\n // Totals \n $output.='<tr>'.$g_layout->ret_td_datatitle();\n foreach($phases as $phase_id=>$phase_info)\n {\n $output.= $g_layout->ret_td_datatitle($this->amount_format($phase_info[\"total\"][\"initial_amount\"]));\n $output.= '<td class=\"table\" style=\"background-color: '.($this->m_phase_totals[$phase_id][\"current_amount\"]>$this->m_phase_totals[$phase_id][\"initial_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_phase_totals[$phase_id][\"current_amount\"]).'</td>';\n $output.= '<td class=\"table\" style=\"background-color: '.($this->m_phase_totals[$phase_id][\"planned_amount\"]>$this->m_phase_totals[$phase_id][\"current_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_phase_totals[$phase_id][\"planned_amount\"]).'</td>';\n $output.= '<td class=\"table\" style=\"background-color: '.($this->m_phase_totals[$phase_id][\"booked_amount\"]>$this->m_phase_totals[$phase_id][\"planned_amount\"]?COLOR_ERROR:COLOR_OK).'\">'.$this->amount_format($this->m_phase_totals[$phase_id][\"booked_amount\"]).'</td>';\n $this->m_project_totals[\"initial_amount\"]+=$this->m_phase_totals[$phase_id][\"initial_amount\"];\n $this->m_project_totals[\"current_amount\"]+=$this->m_phase_totals[$phase_id][\"current_amount\"];\n $this->m_project_totals[\"planned_amount\"]+=$this->m_phase_totals[$phase_id][\"planned_amount\"];\n $this->m_project_totals[\"booked_amount\"]+=$this->m_phase_totals[$phase_id][\"booked_amount\"];\n }\n \n $output.='</tr>';\n $output.= $g_layout->data_bottom();\n return $output;\n }", "title": "" }, { "docid": "8b1b7d734a02f23a5b8bb0b6ac750b87", "score": "0.5144526", "text": "public function index()\n {\n return AdminPlanResource::collection(Plan::all());\n }", "title": "" }, { "docid": "ddd354f1f00ee670364270d98d39d500", "score": "0.5144332", "text": "public function update(PlanCreateRequest $request,Plan $plan)\n {\n\t\n\t\tif($plan->id!=''){\n\t\t $plan = Plan::find($plan->id);\n\t\t}else{\n\t\t $plan = new Plan;\n\t\t}\n\t\t\t\n\t\t$plan->name=$request->get('name');\n\t\t$plan->description=$request->get('description');\n\t\t$plan->duration=$request->get('duration');\n\t\t$plan->price=$request->get('price');\n\t\t$plan->autoresponses=$request->get('autoresponses');\n\t\t$plan->contact_forms=$request->get('contact_forms');\n\t\t$plan->image_gallery=$request->get('image_gallery');\n\t\t$plan->gallery_images=$request->get('gallery_images');\n\t\t$plan->bot_commands = $request->get('bot_commands');\n\t\t$plan->manual_message=$request->get('manual_message');\n\t\t$plan->manual_message_interval=$request->get('manual_message_interval');\n\n\t\tif($request->get('custom_image')!=''){\n\t\t $plan->custom_image=$request->get('custom_image');\n\t\t}else{\n\t\t $plan->custom_image=0;\n\t\t}\n\t\tif($request->get('custom_welcome_message')!=''){\n\t\t $plan->custom_welcome_message=$request->get('custom_welcome_message');\n\t\t}else{\n\t\t $plan->custom_welcome_message=0;\n\t\t}\n\t\tif($request->get('custom_not_allowed_message')!=''){\n\t\t $plan->custom_not_allowed_message=$request->get('custom_not_allowed_message');\n\t\t}else{\n\t\t $plan->custom_not_allowed_message=0;\n\t\t}\n\t\tif($request->get('status')!=''){\n\t\t $plan->status=$request->get('status');\n\t\t}else{\n\t\t $plan->status=0;\n\t\t}\n\t\t\n\t\t\n\t\t$stripe = Stripe::make(env('STRIPE_APP_KEY'));\n\t\t\n\t\tif($plan->price>0){\n\t\t\tif($plan->stripeplanid==''){\n\t\t\t\n\t\t\t\t$subscription_plan = $stripe->plans()->create([\n\t\t\t\t\t'id' => $plan->id,\n\t\t\t\t\t'name' => $request->get('name'),\n\t\t\t\t\t'amount' => $request->get('price'),\n\t\t\t\t\t'currency' => 'EUR',\n\t\t\t\t\t'interval' => 'month',\n\t\t\t\t\t'interval_count' => $request->get('duration')\n\t\t\t\t]);\n\t\t\t if(isset($subscription_plan['id']) && $subscription_plan['id']!=''){\n\t\t\t $plan->stripeplanid=$subscription_plan['id'];\n\t\t\t }\n\t\t\t}else{\n\t\t\t\t$subscription_plan = $stripe->plans()->update($plan->stripeplanid, [\n\t\t\t\t\t'name' => $request->get('name'),\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n \n\t\t\n\t\t$plan->save();\n\t\t\n\t\treturn redirect('plan')->with('ok', trans('back/plans.updated'));\n }", "title": "" }, { "docid": "27e55806e4f3486728319b73510fa428", "score": "0.5142141", "text": "public function createPlan() {\n if($this->plan == null) { \n # creando un nuevo modelo\n $plan = new Plan(); \n $plan->cod_car = Auth::user()->cod_car;\n $plan->ano_aca = $this->ano_aca;\n $plan->per_aca = $this->per_aca;\n $plan->save();\n $this->plan = Plan::select('id')\n ->where('cod_car', Auth::user()->cod_car)->where('ano_aca', $this->ano_aca)\n ->where('per_aca', $this->per_aca)\n ->first();\n }\n }", "title": "" }, { "docid": "87b55b6ed3106389b23062f939fa5bfd", "score": "0.5140893", "text": "public function setPlan($planName)\n {\n return $this->setParam(self::PLAN, $planName);\n }", "title": "" }, { "docid": "08dd6932f4260e05ce50c50c76523a56", "score": "0.51273835", "text": "public function index()\n {\n $plans = Plan::all();\n // Check if subscribed\n if($is_subscribed = Auth::user()->subscribed('main')) {\n\n // If subscribed get the subscription\n $subscription = Auth::user()->subscription('main');\n $subscriptionName = Plan::where('plan_id', $subscription->stripe_plan)->firstOrFail();\n }\n\n //Check if hosting is setup\n $is_setup = Auth::user()->hosting_set;\n\n if ($is_setup && !$is_subscribed){\n $gg = new GroundsKeeper();\n $params = ['user' => Auth::user()->username];\n $config = $gg->invokeGet('SHOW_USER_CONFIG', $params);\n $config = (object)$config;\n $suspended = $config->suspended;\n if ($suspended === 'no') {\n $gg->suspendUser(Auth::user()->username);\n }\n }\n\n if (!$is_subscribed){\n return view('user.subscribe', compact('plans'));\n }\n if($is_subscribed && !$is_setup) {\n return view('user.hosting', compact('is_subscribed', 'subscription'));\n }\n if ($is_subscribed && $is_setup) {\n $gk = new GroundsKeeper();\n $daUserContext = $gk->impersonateUser(Auth::user()->username);\n $daUserObject = $daUserContext->getContextUser();\n $params = ['user' => Auth::user()->username];\n $config = $gk->invokeGet('SHOW_USER_CONFIG', $params);\n $config = (object)$config;\n $suspended = $config->suspended;\n if ($suspended === 'yes') {\n $gk->unsuspendUser(Auth::user()->username);\n }\n\n $title = 'Dashboard';\n return view('user.panel', compact('title', 'daUserObject', 'is_subscribed', 'subscription', 'subscriptionName', 'suspended'));\n }\n }", "title": "" }, { "docid": "334aca16a916e48de15648e265e74fcc", "score": "0.5090977", "text": "public function getPlanName() {\n return $this->PLAN_NAME;\n }", "title": "" }, { "docid": "7b33333c3d97924e47fb18409906ec28", "score": "0.5088309", "text": "public function plans()\n\t{\n\t\t$plans=\\Stripe\\Plan::all();\n\t\treturn view('admin.plans.index',compact('plans'));\n\t}", "title": "" }, { "docid": "4042f4d92009374729c865fe1320fafd", "score": "0.5081071", "text": "public function progresos(Plan $plan) {\n\n $proyectos = Proyecto::where('id_plan', $plan->id)->where('estado','Activado')->get();\n\n $cont_progreso = 0;\n\n foreach($proyectos as $proyecto){\n $cont_progreso += (($proyecto->progreso * $proyecto->peso) / 100);\n }\n\n $plan->progreso = $cont_progreso;\n $plan->save();\n\n return $plan;\n }", "title": "" }, { "docid": "06635953243e24f4e51234b5d56d8b12", "score": "0.50777274", "text": "public function MembershipPlan(){\n \treturn $this->hasMany(\"membresia_plan\",\"plan_id\");\n }", "title": "" }, { "docid": "a43cef7ea2e47989675551a035af8231", "score": "0.5074742", "text": "private function _getSubscriptionPlans() {\n $subscriptionDetailsModel = new SubscriptionDetailsModel();\n $this->_subscriptionPlans = $subscriptionDetailsModel->getSubscriptionPlans();\n }", "title": "" }, { "docid": "f34decb830f217593911bc13dd69f517", "score": "0.5069093", "text": "public function updateUserPlan($model_data, $pre_plan_id)\n {\n $data = array(\n 'user_id' => $model_data['user_id'],\n 'plan_id' => $model_data['plan_id'],\n 'remaining_service' => $model_data['remaining_service']-1,\n 'purchase_date' => date('Y-m-d H:i:s'),\n 'expire_date' => $model_data['expire_date'],\n );\n $this->db->where('user_plan_id', $pre_plan_id);\n $this->db->update('user_plans', $data);\n\n return true; \n }", "title": "" }, { "docid": "8598d1763a3d9fe32e84c030cca8f7fa", "score": "0.5065561", "text": "function plan_explore($user_id) {\n \n // Get codeigniter object instance\n $CI = get_instance();\n \n // Return time when started the plan\n return $CI->plans->plan_started($user_id);\n \n }", "title": "" }, { "docid": "477af5955c6274beab6480dbc6bbde4c", "score": "0.5065439", "text": "public function changePlan($data)\n {\n $subscription = app('subscription');\n $company = $subscription->company;\n $plan = Plan::findOrFail($data['plan_id']);\n\n // create plan change request if we are downgrading\n if ( $plan->privilege < $subscription->plan_privilege ) {\n PlanChangeRequest::create([\n 'company_subscription_id' => $subscription->id,\n 'plan_privilege' => $plan->privilege,\n 'plan_name' => $plan->name,\n 'plan_price_month' => $plan->price_month,\n 'plan_price_year' => $plan->price_year,\n ]);\n $type = 'downgrade';\n $message = 'Your plan change request has been received and scheduled successfully!';\n }\n\n // charge card if new plan costs more than current plan\n if ( $plan->{'price_' . $subscription->installment} > $subscription->{'plan_price_' . $subscription->installment} ) {\n $payment_method = CompanyPaymentMethod::findOrFail($data['company_payment_method_id']);\n\n // charge the customer source\n $amount = $plan->{'price_' . $subscription->installment} - $subscription->{'plan_price_' . $subscription->installment};\n $stripe_charge = $this->companyPaymentService->chargeCustomer([\n 'amount' => $amount,\n 'customer_id' => $company->stripe_customer_id,\n 'source' => $payment_method->stripe_source_id\n ]);\n\n // save our payment record\n $payment_data = [\n 'company_id' => $subscription->company->id,\n 'company_subscription_id' => $subscription->id,\n 'company_payment_method_id' => $payment_method->id,\n 'notes' => 'subscription plan upgrade fee',\n 'status' => 'complete'\n ];\n $payment = $this->companyPaymentService->create(array_merge($payment_data, $stripe_charge['company_payment']));\n\n // update subscription plan details now\n $sub_data = [\n 'plan_privilege' => $plan->privilege,\n 'plan_name' => $plan->name,\n 'plan_price_month' => $plan->price_month,\n 'plan_price_year' => $plan->price_year,\n 'amount' => $plan->{'price_' . $subscription->installment}\n ];\n $company_subscription = $this->update($subscription->id, $sub_data);\n\n $type = 'upgrade';\n $message = 'Your subscription plan has been changed successfully!';\n\n }\n\n // send confirmation email\n $mail_data = [\n 'plan' => $plan->name,\n 'amount' => \\Format::currency($plan->{'price_' . $subscription->installment}),\n 'installment' => $subscription->installment,\n 'next_billing_date' => $subscription->next_billing_at->toFormattedDateString(),\n 'type' => $type\n ];\n \\Mail::to($company->email)->send(new PlanChangeConfirmation($mail_data));\n\n return ['message' => $message];\n\n }", "title": "" }, { "docid": "0961211e9dfb37006a043e7214a9aebf", "score": "0.5061951", "text": "function updatePlanForPlanProduct($params){\r\n\t\t//$planId = $params['planId'] ;\r\n\t\t$sql = \"update sc_purchase_plan_details set plan_id = '{@#planId#}' where id='{@#id#}'\" ;\r\n\t\t$this->exeSql($sql, $params) ;\r\n\t}", "title": "" }, { "docid": "9fcdfb2f4fee9ba8cfd0f98cad920d11", "score": "0.50542444", "text": "public function subscribers(Plan $plan);", "title": "" }, { "docid": "e0995b1335e3a926a9986f575bca4586", "score": "0.5048691", "text": "public function store(PlanCreateRequest $request)\n {\n \t$plan = new Plan;\n\t\t\n\t\t$plan->name=$request->get('name');\n\t\t$plan->plan_type = $request->get('plan_type');\n\t\t$plan->description=$request->get('description');\n\t\t$plan->duration=$request->get('duration');\n\t\t$plan->price=$request->get('price');\n\t\t$plan->autoresponses=$request->get('autoresponses');\n\t\t$plan->contact_forms=$request->get('contact_forms');\n\t\t$plan->image_gallery=$request->get('image_gallery');\n\t\t$plan->gallery_images=$request->get('gallery_images');\n\t\t$plan->bot_commands = $request->get('bot_commands');\n\t\t$plan->manual_message=$request->get('manual_message');\n\t\t\n\t\tif($request->get('custom_image')!=''){\n\t\t $plan->custom_image=$request->get('custom_image');\n\t\t}else{\n\t\t $plan->custom_image=0;\n\t\t}\n\t\tif($request->get('custom_welcome_message')!=''){\n\t\t $plan->custom_welcome_message=$request->get('custom_welcome_message');\n\t\t}else{\n\t\t $plan->custom_welcome_message=0;\n\t\t}\n\t\tif($request->get('custom_not_allowed_message')!=''){\n\t\t $plan->custom_not_allowed_message=$request->get('custom_not_allowed_message');\n\t\t}else{\n\t\t $plan->custom_not_allowed_message=0;\n\t\t}\n\t\tif($request->get('status')!=''){\n\t\t $plan->status=$request->get('status');\n\t\t}else{\n\t\t $plan->status=0;\n\t\t}\n\t\t\n\t\t$plan->save();\n\n\t\t$stripe = Stripe::make(env('STRIPE_APP_KEY'));\n\t\tif($plan->price>0){\n\t\t\t$subscription_plan = $stripe->plans()->create([\n\t\t\t\t'id' => $plan->id,\n\t\t\t\t'name' => $request->get('name'),\n\t\t\t\t'amount' => $request->get('price'),\n\t\t\t\t'currency' => 'EUR',\n\t\t\t\t'interval' => 'month',\n\t\t\t\t'interval_count' => $request->get('duration')\n\t\t\t]);\n\t\t\t\n\t\t\tif(isset($subscription_plan['id']) && $subscription_plan['id']!=''){\n\t\t\t $plan = Plan::find($plan->id);\n\t\t\t $plan->stripeplanid=$subscription_plan['id'];\n\t\t\t $plan->save();\n\t\t\t}\n\t\t}\n\t\t\n\n\t\treturn redirect('plan')->with('ok', trans('back/plans.created'));\n }", "title": "" }, { "docid": "4d3828ada1163d0eb88986d372c79a32", "score": "0.5045873", "text": "public function query(StripeSubscriptionsPlans $plan)\n {\n /* only for Package */\n /*$users = DB::Table('users')->select('users.id as id', 'users.first_name', 'users.last_name','users.email','users.country_code','users.mobile_number', 'users.status','companies.name as company_name','users.created_at',DB::raw('CONCAT(\"+\",users.country_code,\" \",users.mobile_number) AS mobile'))\n ->leftJoin('companies', function($join) {\n $join->on('users.company_id', '=', 'companies.id');\n })->where('user_type','Driver')->groupBy('id');*/\n\n $plans = $plan->get();\n\n return $plans;\n }", "title": "" }, { "docid": "aed9360941ef46da87d0895f1bf322b0", "score": "0.4991788", "text": "public static function plan()\n {\n $env = self::getEnv();\n $credentials = self::getCredentials();\n \n return new Plan($credentials, $env);\n }", "title": "" }, { "docid": "dc7004acec868551892f09e3774b1ced", "score": "0.49861762", "text": "public function show(Plan $plan)\n {\n //\n }", "title": "" }, { "docid": "dc7004acec868551892f09e3774b1ced", "score": "0.49861762", "text": "public function show(Plan $plan)\n {\n //\n }", "title": "" }, { "docid": "c85f65713736eef355e20c795377b364", "score": "0.49842852", "text": "public function createplan()\n {\n if($this->request->is(['post','put'])){\n $plan = $this->Plan->newEntity();\n $plan = $this->Plan->patchEntity($plan, $this->request->data);\n if ($this->Plan->save($plan)) {\n $this->Flash->plansuccess(__(\"A new plan has been created.\"));\n\n }else{\n $this->Flash->planerror(__(\"some problem during creation.\"));\n }\n }\n }", "title": "" }, { "docid": "58c104531e79bba652b868533a6b86ac", "score": "0.4982461", "text": "public function getBillingPlans()\n {\n # GET /billing_plans\n }", "title": "" }, { "docid": "19d1ff841d81639b6192c767a956a4b0", "score": "0.4969323", "text": "public function setPlanName($plan_name) {\n $this->PLAN_NAME = $plan_name;\n }", "title": "" }, { "docid": "8ee3df48e23fa544cfb1719aa6b9a8c1", "score": "0.49671715", "text": "public function createUserPlan($model_data)\n {\n $data = array(\n 'user_id' => $model_data['user_id'],\n 'plan_id' => $model_data['plan_id'],\n 'remaining_service' => $model_data['remaining_service'],\n 'purchase_date' => date('Y-m-d H:i:s'),\n 'expire_date' => $model_data['expire_date'],\n );\n $this->db->insert('user_plans', $data); \n return true; \n // $count = $this->user_helper->countUserPlan($model_data['user_id']);\n\n // if($count > 0 && $count != 0)\n // {\n // $CheckUserPlan = $this->user_helper->UpdateCheckUserPlan($model_data['user_id']);\n\n // $this->db->where('user_id', $model_data['user_id']);\n // $this->db->where('deleted_date', '0000-00-00');\n // $delete_plan = array(\n // 'deleted_date' => date('Y-m-d H:i:s'),\n // );\n // $this->db->update('user_plans', $delete_plan);\n\n // // $delete_product = array(\n // // 'product_deleted_date' => date('Y-m-d H:i:s'),\n // // );\n // // $this->db->where('user_id', $model_data['user_id']);\n // // $this->db->update('product', $delete_product);\n\n // if (!empty($CheckUserPlan)) \n // {\n // $currentdate = date('Y-m-d');\n // $datetime1 = strtotime($CheckUserPlan->expire_date);\n // $datetime2 = strtotime($currentdate);\n \n // $secs = $datetime1 - $datetime2;\n // $days = $secs / 86400;\n\n // $actualDate = date('Y-m-d', strtotime($model_data['expire_date']. ' + '.$days.' days'));\n\n // $total_remaining_serive = $model_data['remaining_service'] + $CheckUserPlan->remaining_service;\n\n // $data = array (\n // 'user_id' => $model_data['user_id'],\n // 'plan_id' => $model_data['plan_id'],\n // 'remaining_service' => $total_remaining_serive,\n // 'purchase_date' => date('Y-m-d H:i:s'),\n // 'expire_date' => $actualDate,\n // );\n // $this->db->insert('user_plans', $data);\n // return true;\n // } \n // else \n // { \n // $data = array (\n // 'user_id' => $model_data['user_id'],\n // 'plan_id' => $model_data['plan_id'],\n // 'remaining_service' => $model_data['remaining_service'],\n // 'purchase_date' => date('Y-m-d H:i:s'),\n // 'expire_date' => $model_data['expire_date'],\n // );\n // $this->db->insert('user_plans', $data);\n // return true;\n // }\n // } \n // else \n // {\n // $this->db->where('user_id', $model_data['user_id']);\n // $this->db->where('deleted_date', '0000-00-00');\n // $delete_plan = array(\n // 'deleted_date' => date('Y-m-d H:i:s'),\n // );\n // $this->db->update('user_plans', $delete_plan);\n // // $delete_product = array(\n // // 'product_deleted_date' => date('Y-m-d H:i:s'),\n // // );\n // // $this->db->where('user_id', $model_data['user_id']);\n // // $this->db->update('product', $delete_product);\n\n // $data = array(\n // 'user_id' => $model_data['user_id'],\n // 'plan_id' => $model_data['plan_id'],\n // 'remaining_service' => $model_data['remaining_service'],\n // 'purchase_date' => date('Y-m-d H:i:s'),\n // 'expire_date' => $model_data['expire_date'],\n // );\n // $this->db->insert('user_plans', $data); \n // return true; \n // }\n }", "title": "" }, { "docid": "19c9615c11eb02ec6606d18c6b74fb6c", "score": "0.49622813", "text": "public function addPricePlan()\n {\n $self = 'add-price-plan';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n return view('admin.add-price-plan');\n }", "title": "" }, { "docid": "5479bac7db81b59e884797d7950d0523", "score": "0.49549282", "text": "function addPlan()\n {\n return view ('admin/addPlan');\n }", "title": "" }, { "docid": "67e3068facf67e35f27a5ffe2389dc45", "score": "0.4953171", "text": "public function getPlan()\n {\n return $this->getParam(self::PLAN);\n }", "title": "" }, { "docid": "08876ba17958d34cc761b7daff8bb549", "score": "0.49180678", "text": "public function updateRecurringPlan(Plan $plan)\n {\n }", "title": "" }, { "docid": "728c17ed5cbca02f1012fc1fb30b5f65", "score": "0.49144238", "text": "public function create(Plan $plan)\n {\n return parent::createView($plan);\n }", "title": "" }, { "docid": "26f0cec20c05ec6e6fdfaab06646b9ed", "score": "0.49022946", "text": "public function accountPlans(){\n return view('payment.plans'); \n }", "title": "" }, { "docid": "bf103e1f793bcb3f462c35c2427c8459", "score": "0.48947823", "text": "function jr_reset_user_plan_usage( $user_id, $plan_type ) {\n\t$reset_plans = array();\n\n\t$user_plans = _jr_user_plans_history( $user_id );\n\tforeach ( $user_plans as $plan_id => $usage ) {\n\t\t$curr_plan_type = get_post_type( $plan_id );\n\t\tif ( $plan_type != $curr_plan_type ) {\n\t\t\t$reset_plans[$plan_id] = $usage;\n\t\t}\n\t}\n\tupdate_user_meta( $user_id, '_jr_user_plans_history', $reset_plans );\n}", "title": "" }, { "docid": "1338e73044c674f6b1b410d827f5c468", "score": "0.48906955", "text": "public function update(Request $request, Plan $plan)\n {\n //\n }", "title": "" }, { "docid": "bbdf4cd1059dddbdc1089b73a30e28f3", "score": "0.48898083", "text": "public function changePlan($userId, $plan, $dateTime = null, $custom = array())\n {\n $request = array();\n $url = $this->cbconf->getApiUrl() . \"user/\" . urlencode($userId) . \"/changeplan\";\n if (!empty($plan)) {\n $url = $this->appendTo($url, \"plan\", $plan);\n }\n if (!empty($dateTime)) {\n $url = $this->appendTo($url, \"dateTime\", $dateTime->format(\\DateTime::ISO8601));\n }\n $url .= $this->implode_encode_assoc($custom);\n $request['url'] = $url;\n $request['method'] = CurlUtil::METHOD_GET;\n $this->queue[] = $request;\n\n if ($this->cbconf->isAutoFlush()) {\n $this->flush();\n }\n }", "title": "" }, { "docid": "550274fe1e16244c900f46dbdc6a9d31", "score": "0.48801193", "text": "public function pricePlan()\n {\n $self = 'sms-price-plan';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $price_plan = SMSPricePlan::all();\n return view('admin.sms-price-plan', compact('price_plan'));\n }", "title": "" }, { "docid": "3596a1c14303c3efa78a8d5951973265", "score": "0.4875592", "text": "public function test_update_plan_manage_archived_competencies() {\n global $DB;\n\n $this->resetAfterTest(true);\n $dg = $this->getDataGenerator();\n $lpg = $this->getDataGenerator()->get_plugin_generator('core_competency');\n\n $syscontext = context_system::instance();\n\n // Create users and roles for the test.\n $user = $dg->create_user();\n $manageownrole = $dg->create_role(array(\n 'name' => 'User manage own',\n 'shortname' => 'manageown'\n ));\n assign_capability('moodle/competency:planmanageowndraft', CAP_ALLOW, $manageownrole, $syscontext->id);\n assign_capability('moodle/competency:planviewowndraft', CAP_ALLOW, $manageownrole, $syscontext->id);\n assign_capability('moodle/competency:planmanageown', CAP_ALLOW, $manageownrole, $syscontext->id);\n assign_capability('moodle/competency:planviewown', CAP_ALLOW, $manageownrole, $syscontext->id);\n $dg->role_assign($manageownrole, $user->id, $syscontext->id);\n $this->setUser($user);\n\n // Create a framework and assign competencies.\n $framework = $lpg->create_framework();\n $c1 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id')));\n $c2 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id')));\n $c3 = $lpg->create_competency(array('competencyframeworkid' => $framework->get('id')));\n\n // Create two plans and assign competencies.\n $plan = $lpg->create_plan(array('userid' => $user->id));\n $otherplan = $lpg->create_plan(array('userid' => $user->id));\n\n $lpg->create_plan_competency(array('planid' => $plan->get('id'), 'competencyid' => $c1->get('id')));\n $lpg->create_plan_competency(array('planid' => $plan->get('id'), 'competencyid' => $c2->get('id')));\n $lpg->create_plan_competency(array('planid' => $plan->get('id'), 'competencyid' => $c3->get('id')));\n $lpg->create_plan_competency(array('planid' => $otherplan->get('id'), 'competencyid' => $c1->get('id')));\n\n $uclist = array(\n $lpg->create_user_competency(array(\n 'userid' => $user->id,\n 'competencyid' => $c1->get('id'),\n 'proficiency' => true,\n 'grade' => 1\n )),\n $lpg->create_user_competency(array(\n 'userid' => $user->id,\n 'competencyid' => $c2->get('id'),\n 'proficiency' => false,\n 'grade' => 2\n ))\n );\n\n // Change status of the plan to complete.\n $record = $plan->to_record();\n $record->status = \\core_competency\\plan::STATUS_COMPLETE;\n\n try {\n $plan = api::update_plan($record);\n $this->fail('We cannot complete a plan using api::update_plan().');\n } catch (coding_exception $e) {\n // All good.\n }\n api::complete_plan($plan);\n\n // Check that user compretencies are now in user_competency_plan objects and still in user_competency.\n $this->assertEquals(2, \\core_competency\\user_competency::count_records());\n $this->assertEquals(3, \\core_competency\\user_competency_plan::count_records());\n\n $usercompetenciesplan = \\core_competency\\user_competency_plan::get_records();\n\n $this->assertEquals($uclist[0]->get('userid'), $usercompetenciesplan[0]->get('userid'));\n $this->assertEquals($uclist[0]->get('competencyid'), $usercompetenciesplan[0]->get('competencyid'));\n $this->assertEquals($uclist[0]->get('proficiency'), (bool) $usercompetenciesplan[0]->get('proficiency'));\n $this->assertEquals($uclist[0]->get('grade'), $usercompetenciesplan[0]->get('grade'));\n $this->assertEquals($plan->get('id'), $usercompetenciesplan[0]->get('planid'));\n\n $this->assertEquals($uclist[1]->get('userid'), $usercompetenciesplan[1]->get('userid'));\n $this->assertEquals($uclist[1]->get('competencyid'), $usercompetenciesplan[1]->get('competencyid'));\n $this->assertEquals($uclist[1]->get('proficiency'), (bool) $usercompetenciesplan[1]->get('proficiency'));\n $this->assertEquals($uclist[1]->get('grade'), $usercompetenciesplan[1]->get('grade'));\n $this->assertEquals($plan->get('id'), $usercompetenciesplan[1]->get('planid'));\n\n $this->assertEquals($user->id, $usercompetenciesplan[2]->get('userid'));\n $this->assertEquals($c3->get('id'), $usercompetenciesplan[2]->get('competencyid'));\n $this->assertNull($usercompetenciesplan[2]->get('proficiency'));\n $this->assertNull($usercompetenciesplan[2]->get('grade'));\n $this->assertEquals($plan->get('id'), $usercompetenciesplan[2]->get('planid'));\n\n // Change status of the plan to active.\n $record = $plan->to_record();\n $record->status = \\core_competency\\plan::STATUS_ACTIVE;\n\n try {\n api::update_plan($record);\n $this->fail('Completed plan can not be edited');\n } catch (coding_exception $e) {\n // All good.\n }\n\n api::reopen_plan($record->id);\n // Check that user_competency_plan objects are deleted if the plan status is changed to another status.\n $this->assertEquals(2, \\core_competency\\user_competency::count_records());\n $this->assertEquals(0, \\core_competency\\user_competency_plan::count_records());\n }", "title": "" }, { "docid": "5df6b6ba7cd3936f1a62d43805121a31", "score": "0.4856678", "text": "function stripe_create_plan($api_key, $plan) {\n \\Stripe\\Stripe::setApiKey($api_key);\n\n $plan = \\Stripe\\Plan::create(array(\n \"amount\" => $plan['amount'] . '00',\n \"interval\" => \"month\",\n \"name\" => $plan['plan_name'],\n \"currency\" => 'usd',\n \"id\" => $plan['plan_name'])\n );\n\n return $plan;\n}", "title": "" }, { "docid": "a0d0694570dffb702f8bcd77b72a3092", "score": "0.48544657", "text": "public function show(PlanType $planType)\n {\n //\n }", "title": "" }, { "docid": "0a4707b87d3bfdade184b9cd88ecfdcf", "score": "0.4853327", "text": "public function current()\n {\n if (! auth()->user()->hasRole('owner')) {\n abort(403, 'Unauthorized action.');\n }\n\n $theSelectedProcessor=strtolower(config('settings.subscription_processor','stripe'));\n\n\n if(!($theSelectedProcessor == 'stripe' || $theSelectedProcessor == 'local') ){\n $className = '\\Modules\\\\'.ucfirst($theSelectedProcessor).'Subscribe\\Http\\Controllers\\App';\n $ref = new \\ReflectionClass($className);\n $ref->newInstanceArgs()->validate(auth()->user());\n }\n\n\n $plans = Plans::get()->toArray();\n $colCounter = [4, 12, 6, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];\n\n $currentUserPlan = Plans::withTrashed()->find(auth()->user()->mplanid());\n\n $data = [\n 'col'=>$colCounter[count($plans)],\n 'plans'=>$plans,\n 'currentPlan'=>$currentUserPlan\n ];\n\n \n if ($theSelectedProcessor == 'stripe') {\n $data['intent'] = auth()->user()->createSetupIntent();\n\n if (auth()->user()->subscribed('main')) {\n //Subscribed\n //Switch the user to the free plan\n //auth()->user()->plan_id=config('settings.free_pricing_id');\n //auth()->user()->update();\n //$currentUserPlan=Plans::findOrFail(auth()->user()->mplanid());\n //$data['currentPlan']=$currentUserPlan;\n } else {\n //not subscribed\n }\n }\n\n $data['subscription_processor']=$theSelectedProcessor;\n\n return view('plans.current', $data);\n }", "title": "" }, { "docid": "3ab547d075f436c4b45e2fa0afb5894b", "score": "0.48520228", "text": "public function store(CreatePlanRequest $request)\n {\n if(!Auth::user()->can('Criar planos')){\n return redirect()->route('dashboard.plan.list')->withErrors('Você não esta autorizado para executar esta ação.');\n }\n $preco = str_replace(\",\", \".\", $request->price);\n $reference = md5(str_random(15) . microtime());\n $response = PagSeguroRecorrente::setReference($reference)\n ->sendPreApprovalRequest([\n 'preApprovalName' => (string)$request->name,\n 'preApprovalCharge' => 'Auto',\n 'preApprovalPeriod' => 'MONTHLY',\n 'preApprovalAmountPerPayment' => (string)$preco,\n ]);\n $plan = new Plan();\n $plan->name = $request->name;\n $plan->price = $request->price;\n $plan->reference = $response;\n $plan->save();\n\n \\App\\Models\\PlanFeature::create([\n 'plan_id' => $plan->id,\n 'name' => 'qtd_ads_art',\n 'limit' => $request->qtd_ads_art,\n ]);\n \\App\\Models\\PlanFeature::create([\n 'plan_id' => $plan->id,\n 'name' => 'qtd_ads_pro',\n 'limit' => $request->qtd_ads_pro,\n ]);\n\n\n return redirect()->route('dashboard.plan.list')->withSuccess('Plano criado com sucesso!');\n }", "title": "" }, { "docid": "a497960e5ed9a3b73c55c077e90f6130", "score": "0.48427203", "text": "public function update(Request $request, Plans $plan)\n {\n $this->adminOnly();\n $plan->name = strip_tags($request->name);\n $plan->price = strip_tags($request->price);\n $plan->limit_items = strip_tags($request->limit_items);\n $plan->limit_orders = 0;\n\n //Subscriptions plans\n if(isset($request->subscribe)){\n foreach ($request->subscribe as $key => $value) {\n $plan->$key = strip_tags($value);\n }\n }\n\n //Default stripe\n if(isset($request->stripe_id)){\n $plan->stripe_id=$request->stripe_id;\n }\n\n \n\n $plan->period = $request->period == 'monthly' ? 1 : 2;\n $plan->enable_ordering = $request->ordering == 'enabled' ? 1 : 2;\n $plan->description = $request->description;\n $plan->features = $request->features;\n\n $plan->update();\n\n return redirect()->route('plans.index')->withStatus(__('Plan successfully updated!'));\n }", "title": "" }, { "docid": "44eb88a2fd13bea21dc425557286ea8b", "score": "0.48402628", "text": "public function setPlanId($value)\n {\n return $this->setParameter('planId', $value);\n }", "title": "" }, { "docid": "5b948cf05497bc504e101211c3a0248e", "score": "0.48399892", "text": "public function planner_get_all_planifications() {\n \n // Gets all User's planifications\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Planify)->planner_get_all_planifications();\n \n }", "title": "" }, { "docid": "5a7ac8e9cb6adc8953464e1c6ac0fca4", "score": "0.48338473", "text": "public function test_update_free_access_plan() {\n\t\t// Create free access plan.\n\t\twp_set_current_user( $this->user_allowed );\n\n\t\t$course = $this->factory->course->create_and_get();\n\t\t$sample_args = array_merge(\n\t\t\t$this->sample_access_plan_args,\n\t\t\tarray(\n\t\t\t\t'post_id' => $course->get( 'id' ),\n\t\t\t\t'price' => 0,\n\t\t\t)\n\t\t);\n\n\t\t$response = $this->perform_mock_request(\n\t\t\t'POST',\n\t\t\t$this->route,\n\t\t\t$sample_args\n\t\t);\n\n\t\t$access_plan_id = $response->get_data()['id'];\n\n\t\t// Update the title.\n\t\t$response = $this->perform_mock_request(\n\t\t\t'POST',\n\t\t\t$this->route . '/' . $access_plan_id,\n\t\t\tarray(\n\t\t\t\t'title' => 'Updated Title',\n\t\t\t)\n\t\t);\n\n\t\t// Update is allowed.\n\t\t$this->assertResponseStatusEquals( 200, $response );\n\t\t$ap = new LLMS_Access_Plan( $access_plan_id );\n\t\t$this->assertEquals( $ap->get('title'), 'Updated Title' );\n\n\t}", "title": "" }, { "docid": "d40734295c27ebd1907b66bde3de5888", "score": "0.483344", "text": "public function show(PricingPlan $pricingPlan)\n {\n //\n }", "title": "" }, { "docid": "1e40d909c46b90c5a96a0ecfa2b8d3fa", "score": "0.48260847", "text": "public function deleted(PlanUser $planUser)\n {\n if ($planUser->bill) {\n $plan_income_sum = PlanIncomeSummary::where('month', Carbon::parse($planUser->bill->date)->month)\n ->where('year', Carbon::parse($planUser->bill->date)->year)\n ->where('plan_id', $planUser->plan_id)->first();\n if ($plan_income_sum) {\n $plan_income_sum->amount -= $planUser->bill->amount;\n $plan_income_sum->quantity -= 1;\n $plan_income_sum->save();\n }\n $planUser->bill->delete();\n }\n }", "title": "" }, { "docid": "9a37d107f53e85814e9c1a013523bcf8", "score": "0.48241666", "text": "public static function enforcePlan($plan) {\n\t\tif (!UserConfig::$IGNORE_CURRENT_ACCOUNT_PLAN_VERIFICATION && !$plan) {\n\t\t\theader('Location: ' . UserConfig::$USERSROOTURL . '/plans.php');\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "7f41be1dc6e9347d0add8836053fe35c", "score": "0.4798374", "text": "public function getPlanId()\n {\n return $this->getParameter('planId');\n }", "title": "" }, { "docid": "4777fe41c47e0c137df9fede282a99a5", "score": "0.47972658", "text": "public function createPlan()\n {\n try {\n $validation = Validator::make($this->data,\n ['plan_name' => 'required'],\n ['plan_name.required' => 'Plan name is required']\n );\n if ($validation->fails()) {\n return $this->checkValidate($validation);\n }\n\n $plan = $this->planRepo->createPlan($this->data);\n if (!$plan) {\n return $this->getResponse(false, [\n 'message' => 'Cannot create data'\n ]);\n }\n $this->deleteListPlanKeys(); //Delete all plan lists on redis\n return $this->getResponse(true, $plan, 'Create plan successfully', [],201);\n } catch (\\Exception $e) {\n return $this->catchResponseException($e);\n }\n }", "title": "" }, { "docid": "90ca5742981d22ee8ff257b0b0971333", "score": "0.47957715", "text": "public function edit(Plans $plan)\n {\n $this->adminOnly();\n $theSelectedProcessor=strtolower(config('settings.subscription_processor','Stripe'));\n return view('plans.edit', ['plan' => $plan,\"theSelectedProcessor\"=>$theSelectedProcessor]);\n }", "title": "" }, { "docid": "b9c2bee7477ced1d9e9f95123ac7b7ba", "score": "0.4793811", "text": "public function listUsersInPlan(){\n $response = array();\n \n $query = $this->db->select('u.id, u.username, u.email, u.id_customer_stripe')\n ->from('users u')\n ->join('record_user_plan r', 'r.id_user = u.id')\n ->where('r.status', 'a')\n ->get();\n $response = $query->result_array();\n //$response['num']= $query->num_rows() ;\n return $response;\n }", "title": "" }, { "docid": "72eb2eabdb4361f31e1ee3bbf48026b4", "score": "0.47810745", "text": "public function deploymentPlans()\n {\n return $this->hasMany('App\\Models\\DeploymentPlan');\n }", "title": "" }, { "docid": "fe26ac817033cb3d00d2372159fcd3a1", "score": "0.477882", "text": "public function index()\n {\n $users_id = Auth::user()->id;\n\n $user = User::find($users_id)->profile;\n \n $plans = User::find($users_id)->plans;\n \n return view('userProfile',['user' => $user,'plans' => $plans]);\n }", "title": "" }, { "docid": "3876c1baaa22258abca52e85e059d381", "score": "0.47786108", "text": "function wyzi_subscription_update_user_priveleges_to_business_owner ($user_id) {\n\n if ( current_user_can( 'maage_options' ) )\n return;\n\n $wyzi_subscription_options = get_option ('wyzi_pmpro_subscription_options');\n\n $u = new WP_User( $user_id );\n\n $u->remove_role( 'client' );\n $u->add_role( 'business_owner' );\n\n $points_available = get_user_meta( $user_id, 'points_available', true );\n if ( '' == $points_available ) {\n $points_available = 0;\n } else {\n $points_available = intval( $points_available );\n }\n\n $membership_level = pmpro_getMembershipLevelForUser($user_id);\n \n $points_available = intval($points_available) + intval($wyzi_subscription_options[$membership_level->id]['wyzi_sub_points_added']);\n update_user_meta ($user_id, 'points_available',$points_available);\n\n if( 'on' == get_option( 'wyz_can_become_vendor' ) && WyzHelpers::wyz_sub_can_bus_owner_do( $user_id, 'wyzi_sub_auto_vendorship' ) ) {\n WyzHelpers::make_user_vendor( $u );\n }\n\n WyzHelpers::add_extra_points( $user_id );\n\n }", "title": "" }, { "docid": "88da0288515ef4e21ebe9260a56e8d88", "score": "0.47746307", "text": "public function addApproval(BackendUser $backendUser): void;", "title": "" }, { "docid": "4ce5ecf1fe4d9c42f10848a9a9d7ac51", "score": "0.47684315", "text": "public function authorize(): bool\n {\n return $this->user()->can('edit plans');\n }", "title": "" }, { "docid": "ae738ec016ae049efa7f5f63fc074f03", "score": "0.47668278", "text": "public function display_plans(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$this->data['heading'] = 'Plans Lists';\n\t\t\t$condition = array();\n\t\t\t$this->data['plansList'] = $this->plans_model->get_all_details(PLANS,$condition);\n\t\t\t$this->load->view(ADMIN_PATH.'/plans/display_plans',$this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "3739acc62788960f19e585b6a8ea813c", "score": "0.47638094", "text": "public function showPayPlan($planName)\n\t{\n\t\ttry {\n\t\t\t$customer = Braintree_Customer::find('fruit_analytics_user_'.Auth::user()->id);\n\t\t}\n\t\tcatch(Braintree_Exception_NotFound $e) {\n\t\t\t// no such customer yet, lets make it\n\n\t\t\t$result = Braintree_Customer::create(array(\n\t\t\t\t'id' => 'fruit_analytics_user_'.Auth::user()->id,\n\t\t\t\t'email' => Auth::user()->email,\n\t\t\t\t'firstName' => Auth::user()->email,\n\t\t\t));\n\t\t\tif($result->success)\n\t\t\t{\n\t\t\t\t$customer = $result->customer;\n\t\t\t} else {\n\t\t\t\t// needs error handling\n\t\t\t}\n\t\t}\n\n\t\t// generate clientToken for the user to make payment\n\t\t$clientToken = Braintree_ClientToken::generate(array(\n\t\t\t\"customerId\" => $customer->id\n\t\t));\n\t\t\n\t\t$plans = BraintreeHelper::getPlanDictionary();\n\n\t\treturn View::make('payment.payplan', array(\n\t\t\t'planName' =>$plans[$planName]->name,\n\t\t\t'clientToken' =>$clientToken,\n\t\t)); \n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "6310236e3ff3b5692f49359e094b911d", "score": "0.0", "text": "public function show($id)\n {\n //return \"Show a cat profile\";\n $cat = Cat::find($id);\n\n return view('cats.show')->with('cat', $cat);\n }", "title": "" } ]
[ { "docid": "1b84960e1b92d293ded93b3711f4a5bb", "score": "0.8234836", "text": "public function show(Resource $resource)\n {\n // not available for now\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.819168", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d64ac4d2b3c1bbc8cf47ff61dc6c6145", "score": "0.6828002", "text": "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "title": "" }, { "docid": "6ad7532d4e18e95bb51cb89fd46c6f3e", "score": "0.6499442", "text": "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "title": "" }, { "docid": "75848328c84e5c462b832c957a09b957", "score": "0.64954877", "text": "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "title": "" }, { "docid": "3064d7aadfe085c70cb0f28b932384a7", "score": "0.6470001", "text": "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "title": "" }, { "docid": "1be3fb8370513aa7e96f7c3e96fdff88", "score": "0.64625233", "text": "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "title": "" }, { "docid": "735e1e8b4f110a9df09910db5ed28525", "score": "0.6363549", "text": "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "title": "" }, { "docid": "38d4e6796db39109f0d6935dfd120534", "score": "0.6312893", "text": "public function retrieve(Resource $resource);", "title": "" }, { "docid": "49144664a831cadf4907244f18f7d06f", "score": "0.6281681", "text": "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "title": "" }, { "docid": "823dc10cda9d65e730022e36a51b20f3", "score": "0.6219375", "text": "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "14ed889b850393fe8b1f3290fc49740e", "score": "0.6189237", "text": "public function show(Dispenser $dispenser)\n {\n //\n }", "title": "" }, { "docid": "990c774538153829a382b969fb274ad6", "score": "0.6180439", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.61703014", "text": "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "title": "" }, { "docid": "9b04b4f781eae858e123228d0a912464", "score": "0.61378217", "text": "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "title": "" }, { "docid": "94cb94fffea6c87f520b5646c4b3b44c", "score": "0.612238", "text": "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "title": "" }, { "docid": "6b5130ab64ccaac7d924522f0ef610be", "score": "0.61063963", "text": "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "title": "" }, { "docid": "7b265bdf9d16b71a51ad9b57ecfcc639", "score": "0.6105688", "text": "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "title": "" }, { "docid": "0cbbda716702c495903eacbdf07c4a18", "score": "0.60935533", "text": "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "title": "" }, { "docid": "428541aff5a20db0753edebab2c7fb73", "score": "0.6083926", "text": "public function get(Resource $resource);", "title": "" }, { "docid": "fc99a414bbef1e12734ffe2495724008", "score": "0.6044298", "text": "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "title": "" }, { "docid": "8cb2cf294db063cb41e20820f36641f0", "score": "0.6039034", "text": "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "title": "" }, { "docid": "00e09b84f45fb294c62e0b4f0b454947", "score": "0.6015489", "text": "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.5988134", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "c9bf5b800308923b28214ed9119119bf", "score": "0.5962434", "text": "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "title": "" }, { "docid": "dbf7cb71fa21dced48bad29b90c7f51e", "score": "0.5960018", "text": "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5956016", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.5927984", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "76e0217d28590aa09067602bad097181", "score": "0.59175694", "text": "public function show(Resolucion $resolucion)\n {\n //\n }", "title": "" }, { "docid": "82abbfbc2da0a0d67a546dde5b87ad5e", "score": "0.5905006", "text": "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d2bd10ab674d0671bf2851850995cea8", "score": "0.5891818", "text": "public function show(Resena $resena)\n {\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58699834", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "7690a8f4c2c21e15f750a5c52f83e2ce", "score": "0.58674705", "text": "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "title": "" }, { "docid": "c317189497889a6dd2147691ca7a246a", "score": "0.58664066", "text": "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "title": "" }, { "docid": "4aec6f94d5731faefe27bdf32f7cbd44", "score": "0.5851132", "text": "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "title": "" }, { "docid": "e49111643c873671076e184b3c9c6ad7", "score": "0.5814674", "text": "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "title": "" }, { "docid": "2771b374a21e331a50c3ffd5b3e431ca", "score": "0.581101", "text": "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "title": "" }, { "docid": "d6af1b1d4946c54112fc9b7ca038cb20", "score": "0.5810573", "text": "public function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "e3c1fc60ee75eb693b0090ab8fb943ad", "score": "0.5804113", "text": "public function get_resource();", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58011544", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "216efefddc0fd6c127c01013a3f6329b", "score": "0.5789962", "text": "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "title": "" }, { "docid": "fd37d1765d15b4bc18c928879eeab887", "score": "0.5789819", "text": "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.57814395", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "d7676ee3e8006c108d5effc4a65123cf", "score": "0.57794863", "text": "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.57569635", "text": "public function display(){}", "title": "" }, { "docid": "1e8ae24781dac20c4f5e103867a805e0", "score": "0.57560647", "text": "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "title": "" }, { "docid": "69113639710554fd174b3aaec6536b9c", "score": "0.5755478", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "8340a4efc2a012c537437541539dc80b", "score": "0.5745552", "text": "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "title": "" }, { "docid": "5e79caa6f512ec951cafbf72e8caa6f2", "score": "0.5744877", "text": "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "title": "" }, { "docid": "75559ae77140a4c8b510c90f5026d3d6", "score": "0.57413054", "text": "public function display() {\n echo $this->render();\n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.57365793", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.57365793", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "70b49677ea9b29b09505986b16d55071", "score": "0.5730284", "text": "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "title": "" }, { "docid": "7684a3ad9102aa78b598eb1a828f68c5", "score": "0.5725608", "text": "public function show($id)\n {\n //\n $this->_show($id);\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.57247883", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "e3c948157c6e692386196d78f9677b46", "score": "0.57129806", "text": "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "title": "" }, { "docid": "5d64133f90b57341622dee65af085a52", "score": "0.5708918", "text": "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "b791634a3b29fe8adff71b755317e88e", "score": "0.5706602", "text": "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "title": "" }, { "docid": "7f0ed797ab602b8432aad97e3677d2a1", "score": "0.57063997", "text": "abstract public function resource($resource);", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5705372", "text": "public abstract function display();", "title": "" }, { "docid": "5766cf8c652099e6e707b39bd867a1c0", "score": "0.5703987", "text": "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.5698205", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693245", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
39882502c3c313ee8b844ee1282e1004
A basic test example.
[ { "docid": "a512f41d7f8a036325eb6b1b520a93f1", "score": "0.0", "text": "public function test_category()\n {\n\n $category = new CategoryModel();\n $entity = $category->getCategoryByID(1);\n $this->assertInstanceOf(CategoryEntity::class, $entity);\n $this->assertIsString($entity->name, 'Massa');\n }", "title": "" } ]
[ { "docid": "00a539965df7dcf2762e8364efe391d7", "score": "0.7798981", "text": "public function testExample()\n {\n \n \n\n }", "title": "" }, { "docid": "4fc6137a2fdeb0555a3d1ac619ecb26b", "score": "0.7606664", "text": "public function testSample()\n\t{\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "8b51bead5ad79fd11ff3c698d4b1170c", "score": "0.7557941", "text": "public function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "9bb7d6a32f7db4bf20830ab46f52b6b9", "score": "0.7485507", "text": "public function testMe()\n\t{\n\t}", "title": "" }, { "docid": "fba37bbf137912a875cc9f7d60bf670c", "score": "0.7456904", "text": "public function testBasicExample()\n {\n /*$this->visit('/')\n ->see('Laravel');*/\n\n // Grand 1: On initialise les données exemple :\n $data = [10, 20, 30];\n // Grand 2: On agit sur ces données exemple :\n $result = array_sum($data);\n // Grand 3: On teste le resultat exemple :\n $this->assertEquals(60, $result);\n // Grand 4: On teste si tous ce passe bien avec la commande php phpunit.phar,\n // bien sur le but est que tous passe vert :-)\n }", "title": "" }, { "docid": "60c3061714987994fe20cecf14f46108", "score": "0.74448216", "text": "public function testExample()\n {\n\t try {\n\t\t $this->browse(function (Browser $browser) {\n\t\t\t $browser->visit('/contact')\n\t\t\t\t ->assertSee('Contact')\n\t\t\t\t ->assertSee('Addresses');\n\t\t });\n\t } catch (\\Exception $e) {\n\t } catch (\\Throwable $e) {\n\t }\n }", "title": "" }, { "docid": "036475fe99891606fd4541aa12e64558", "score": "0.7420336", "text": "public function testExample()\n {\n $this->executeTest('google.sk', true);\n $this->executeTest('https://reinto.cz', false);\n $this->executeTest('https://www.reddit.com', true);\n }", "title": "" }, { "docid": "5b40e5ba5d44d63e0150dedd59221a51", "score": "0.73891723", "text": "public function testBasicExample()\n { \n $prepend='http://127.0.0.1/goldobak/public/'; \n $this->visit($prepend)\n ->see('GOLDORAK');\n }", "title": "" }, { "docid": "3d30a7ba42c39a93d3d3e8dd1425202b", "score": "0.7327516", "text": "public function testExampleTest()\n {\n// $this->assertTrue(true);\n $t = app('Lib\\Fz\\src\\Test');\n $t->str = '123456';\n\n $this->assertEquals(\n '123456',\n $t->run()\n );\n }", "title": "" }, { "docid": "6fa04073291900658631ed42606e397d", "score": "0.73045474", "text": "public function testExample()\n {\n $response = $this->get(\"/hunter/\");\n $response->assertStatus(Response::HTTP_OK);\n }", "title": "" }, { "docid": "a148b0d9e2c5737cbbac83bb42a59cf8", "score": "0.72991604", "text": "public function testExample()\n {\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "9bf8d7b259695280c9d5d5db3e56cf11", "score": "0.7295122", "text": "public function testExample()\n {\n $this->visit('/')\n ->see('Welcome To eVolunt');\n }", "title": "" }, { "docid": "710ac0d4bcf4a51f4a75664a3eeaf638", "score": "0.726925", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/project_bookstore/client')\n ->assertSee('Trang chủ');\n });\n }", "title": "" }, { "docid": "cd992fe05706484e8a7dd4197850811d", "score": "0.72569287", "text": "public function testBasicExample()\n\t {\n $user = new User(array('name' => 'Admins'));\n $this->be($user);\n $response = $this->call('GET', '/');\n $this->assertEquals(200, $response->getStatusCode());\n\t }", "title": "" }, { "docid": "5e17d6a48dd3141b60d52efc04bc2f85", "score": "0.7250129", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('MuitxoBem Empregos');\n });\n }", "title": "" }, { "docid": "f7966c192a8d080a33ebbd4daa46fb78", "score": "0.72458464", "text": "function test_sample() {\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "355c99151f633c8c1efcdf9ab8d6e429", "score": "0.7235418", "text": "public function testBasic()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "91d6438e0a157861dba52c544b1ff5a5", "score": "0.71992195", "text": "public function testExample()\n {\n //$this->assertTrue(true);\n $r=$this->get('Services');\n $r->assertStatus(200);\n $r->assertSee('about');\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.7186929", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "72239d27dfd53e20a7148e576a31b146", "score": "0.7186929", "text": "public function testExample() {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "00137a5aa65d712b48b7ccddc0d3c7f8", "score": "0.71810836", "text": "public function testBasicTest()\n {\n $this->seeInDatabase('users', ['email' => '[email protected]']);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.7172588", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "bc2491a0ec9ff25c4f31dd13809eb51e", "score": "0.71721506", "text": "public function testBasicExample()\n\t{\n\t\t$response = $this->call('GET', '/');\n\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t}", "title": "" }, { "docid": "a63b2ecd6b4dae1835ec54d233044435", "score": "0.7144799", "text": "public function testRunLook()\n {\n }", "title": "" }, { "docid": "b618e852b5c1cd010fb2af92e6f725eb", "score": "0.71403795", "text": "public function testBasicExample()\n {\n // 1.\n $this->visit('/');\n\n // 2.\n $this->click('Click me');\n\n // 3.\n $this->see('You\\'ve been clicked, punk.');\n\n // 4.\n\n\n // ->see('Welcome everybody');\n }", "title": "" }, { "docid": "c4cbcd4d25e89bec18372a2d349296f9", "score": "0.713153", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $this->seed();\n\n // ユーザー登録テスト\n $browser->visit('/login')\n ->type('email', '[email protected]')\n ->type('password', 'root')\n ->press('ログイン')\n ->assertPathIs('*/posts');\n\n // tabテスト\n $browser->visit('/users/1')\n ->click('.user-tabs > li:nth-child(2)')\n ->assertSee('今日のランチおいしかった。')\n ->click('.user-tabs > li:nth-child(1)')\n ->assertSee('次は何の本を読もうかな。');\n\n\n $browser->visit('users/1/edit')\n ->assertSee('アカウント編集')\n ->attach('image_name', __DIR__ . '/test.jpg')\n ->press('保存');\n });\n }", "title": "" }, { "docid": "c46e5ff5d963a57692c7667361a38840", "score": "0.71162754", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Want To Sell')\n ->clickLink('Login')\n ->type('email', '[email protected]')\n ->type('password', 'kampkelly')\n ->press('Login')\n ->assertDontSee('Want To Sell')\n ->clickLink('Products')\n ->clickLink('Buy Now')\n ->clickLink('Sell Cryptocurrency')\n ->type('price', 30000)\n ->select('currency', 'Bitcoins')\n ->press('Sell Cryptocurrency')\n ->assertSee('My Products')\n ->clickLink('Products')\n ->clickLink('Site News')\n ->clickLink('Cryptocurrency');\n });\n }", "title": "" }, { "docid": "83b283456ff0eed7dfcfd68a2113c168", "score": "0.7074239", "text": "public function testExample(): void\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "f1e8d531bf7862d87e7d3c5a4d67fc1a", "score": "0.7070466", "text": "public function testLook()\n {\n }", "title": "" }, { "docid": "8d5cdc1ab254942b1ac20223a2f9efaa", "score": "0.70558137", "text": "public function testBasicExample()\n {\n $response = $this->call('GET', '/');\n $this->assertEquals(200, $response->status());\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.70306414", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.70306414", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.70306414", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "a15677eb79b31b24b60063b32635dc71", "score": "0.70259416", "text": "public function testExample()\n {\n $response = $this->get('/home');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "db3a57021bb9980da3f77e6b1d5b0ec3", "score": "0.70215636", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/cliente/')\n ->type('buscador', 'c')\n ->press('.header_search_button')\n ->mouseover('#sorter')\n ->click('#byRate')\n ->assertSeeIn('#product_price_17', '$15.85');\n });\n }", "title": "" }, { "docid": "bcfbd74a05ac0dd9b55f73e640b1a173", "score": "0.7016935", "text": "public function testBasicTest()\n {\n $this->assertTrue(true,\"Basic result\");\n }", "title": "" }, { "docid": "4f4c040a228992397c837133949593f5", "score": "0.70126235", "text": "public function testExample()\n {\n $this->visit('/')\n ->see('About')\n ->see('Campuses')\n ->see('Location')\n ->see('Contact Us');\n }", "title": "" }, { "docid": "899dca00ff0bd6d58f9bd8312410d563", "score": "0.7008021", "text": "public function testExample()\n {\n // dump('token');\n //\n //\n // $this->assertTrue(true);\n }", "title": "" }, { "docid": "455aa34d7cd524f640f3a05227594339", "score": "0.70078695", "text": "public function testExample()\n {\n\n $this->assertTrue(true); // 要素true\n $this->assertFalse(false); // 要素false\n\n $this->assertEquals(100, 100); // 値が同じ\n $this->assertNotEquals(100, 101); // 値が同じではない\n\n $arr = '';\n $this->assertEmpty($arr); // 要素が空orNull\n $this->assertNull(null); // 要素が空orNull\n\n $arr = [1,2,3];\n $this->assertNotEmpty($arr); // 要素が空orNullではない\n $this->assertNotNull($arr); // 要素が空orNull\n\n $msg = \"Hello\";\n $this->assertEquals('Hello', $msg); //要素が同じ\n\n\n $n = random_int(0, 99);\n $this->assertLessThan(100, $n); // 100 > $n\n $this->assertLessThanorEqual(100, 100); // 100 >= $n\n $this->assertGreaterThan($n, 100); // 100 < $n\n $this->assertGreaterThanorEqual(100, 100); // 100 <= $n\n\n $this->assertStringStartsWith('a','abcdef'); // aで始まる文字\n $this->assertStringEndsWith('f','abcdef'); // fで終わる文字\n\n $response = $this->get('/'); // ルートにアクセス\n $response->assertStatus(302); // 200ステータスであること\n }", "title": "" }, { "docid": "6fe1c194b33c0ef2089481d545cab32c", "score": "0.7004092", "text": "public function testBasicExample()\n {\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "8332573711cd1c964294ce5b5291a8a0", "score": "0.70033085", "text": "public function tests() {\n\t}", "title": "" }, { "docid": "be464391389765eaff4886b5e2b8643c", "score": "0.69988763", "text": "public function testBasicExample()\n {\n //check contents in page\n $this->visit('/')\n ->see('highlights');\n\n $this->visit('/')\n ->see('AUTHENTIC ALCOHOL GUARANTEE');\n\n $this->visit('/')\n ->see('BIRTHDAY EVENTS');\n\n $this->visit('/')\n ->see('COCKTAIL GALORE');\n\n $this->visit('/')\n ->see('MOBILE BAR');\n\n $this->visit('/')\n ->see('pundit');\n\n $response = $this->call('GET', '/');\n\n $this->assertEquals(200, $response->getStatusCode());\n\n $this->visit('/menu')\n ->see('menu');\n\n /* $this->visit('/')\n ->click('MENU')\n ->seePageIs('/menu');*/\n\n /*this->visit('/menu')\n ->see('menu');\n\n $this->visit('/promotion')\n ->see('promotion');\n\n $this->visit('/services')\n ->see('services');\n\n $this->visit('gallery')\n ->see('gallery');\n\n $this->visit('/events')\n ->see('events');*/\n\n /* $this->visit('auth/register')\n ->type('bob', 'name')\n ->type('[email protected]', 'email')\n ->type('hello1', 'password')\n ->type('hello1', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/');*/\n }", "title": "" }, { "docid": "63b622a832539bb32a7a5548b5b4e039", "score": "0.6995188", "text": "public function testExample()\n {\n \t$this->visit(\"tachesv/taches\");\n $this->seePageIs('tachesv/taches');\n }", "title": "" }, { "docid": "73f211d306c80514db45a983271ddfbb", "score": "0.6994601", "text": "public function testBasicTest()\n {\n $this->assertTrue(true);\n $names = 'Mwanga';\n $a = 5;\n }", "title": "" } ]
8146ce4fb226d55009bfab8e54e1fbd6
Return une liste de PC dont l'ip d'une des interfaces contient $ip
[ { "docid": "3fcb39cd90db95c2f4ba69cf0a4097de", "score": "0.7065681", "text": "public function getPCListByIPV4($ip) {\n\t\t$PCList;\r\n\t\tforeach ($this->PCArray as $pc) {\n\t\t\tforeach ($pc->getIntferfaces() as $int) {\n\t\t\t\tif (strpos($int[\"Adresse\"], $ip) !== false) $PCList[] = $pc;\n\t\t\t}\n\t\t}\n\t\treturn $PCList;\n\t}", "title": "" } ]
[ { "docid": "82b7bf74d6b15944252f0297da3a7f31", "score": "0.65441245", "text": "function ShowIPMap() {\n\n$this->Error = '';\n\nif( $Status = $this->SockWrite( \"show_ip_map\" )) {\n $this->Error = \"Error - write to Socket failed! $Status\";\n return;\n }\n\n$Status = $this->SockRead();\n\nif( !$this->StatusOk($Status) ) {\n $this->Error = \"command failed - $Status\";\n return;\n }\n\n$Lists = array();\n\n$in = $this->SockRead();\n\nwhile( !$this->DotOnly($in) AND !$this->StatusOk($in) \n AND !$this->StatusError($in) ) {\n list( $IP, $Domain ) = explode( ' ', $in );\n if( !empty( $Lists[ $IP ] )) {\n $Lists[ $IP ] .= \", \" . $Domain;\n }\n\n else { # Not duplicate\n $Lists[ $IP ] = $Domain;\n }\n\n $in = $this->SockRead();\n }\n\nksort( $Lists );\n\nreturn $Lists;\n\n}", "title": "" }, { "docid": "c643e6aa68fbbff5f72211b8f13c9dbc", "score": "0.62987274", "text": "public function get_dhcp_interfaces()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $options['filter_ppp'] = TRUE;\n\n $interfaces = new Iface_Manager();\n\n $ethlist = $interfaces->get_interfaces($options);\n $validlist = array();\n\n foreach ($ethlist as $eth) {\n $ethinfo = new Iface($eth);\n\n $validlist[] = $eth;\n }\n\n return $validlist;\n }", "title": "" }, { "docid": "36f4252459108769d2462337315ba05f", "score": "0.6291941", "text": "public function retrouve_liste_interfaces_par_host() {\n\t\t$this ->onDebug ( __METHOD__, 1 );\n\t\t//On recupere la liste des templates du host\n\t\t$liste_interfaces_host = $this ->getObjetZabbixWsclient () \n\t\t\t->hostGet ( $this ->creer_definition_hostListeInterfaces_ws () );\n\t\tif (isset ( $liste_interfaces_host [0] [\"interfaces\"] )) {\n\t\t\t$this ->onDebug ( $liste_interfaces_host [0] [\"interfaces\"], 2 );\n\t\t\treturn $liste_interfaces_host [0] [\"interfaces\"];\n\t\t}\n\t\t\n\t\t$this ->onDebug ( false, 2 );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1733e32064a3e09a92ad68d1a152efb1", "score": "0.62389034", "text": "function get_ip_list() {\n\t$tmp = array();\n\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && strpos($_SERVER['HTTP_X_FORWARDED_FOR'],',')) {\n\t\t$tmp += explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);\n\t} elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t$tmp[] = $_SERVER['HTTP_X_FORWARDED_FOR'];\n\t}\n\t$tmp[] = $_SERVER['REMOTE_ADDR'];\n\treturn $tmp[0];\n}", "title": "" }, { "docid": "b17a7575c3ccfc22982a098642ea7dd5", "score": "0.61968464", "text": "public function creer_definition_hostListeInterfaces_ws() {\n\t\t$this ->onDebug ( __METHOD__, 1 );\n\t\t$datas = array ( \n\t\t\t\t\"output\" => \"hostid\", \n\t\t\t\t\"selectInterfaces\" => array ( \n\t\t\t\t\t\t'interfaceid', \n\t\t\t\t\t\t'hostid', \n\t\t\t\t\t\t'dns', \n\t\t\t\t\t\t'port', \n\t\t\t\t\t\t'type', \n\t\t\t\t\t\t'main', \n\t\t\t\t\t\t'ip', \n\t\t\t\t\t\t'useip' ), \n\t\t\t\t\"hostids\" => $this ->getHostId () );\n\t\t\n\t\t$this ->onDebug ( $datas, 2 );\n\t\treturn $datas;\n\t}", "title": "" }, { "docid": "4124545a3597adf4c44db18d73ed0ffe", "score": "0.61214274", "text": "public function getLocalIPs() {\n $result = array();\n if ( function_exists('shell_exec') ) {\n $result = $this->readIPs('ip addr');\n if (empty($result)) {\n $result = $this->readIPs('ifconfig -a');\n }\n }\n if (!empty($_SERVER['SERVER_ADDR']) && !in_array($_SERVER['SERVER_ADDR'],$result)) {\n $result[] = $_SERVER['SERVER_ADDR'];\n }\n return $result;\n }", "title": "" }, { "docid": "7474c077506342f6f75811d6c197b888", "score": "0.59739906", "text": "function GetIPMap( $IP ) {\n\n$this->Error = '';\n\nif( $Status = $this->SockWrite( \"get_ip_map $IP\" )) {\n $this->Error = \"Error - write to Socket failed! $Status\";\n return;\n }\n\n$Status = $this->SockRead();\n\nif( $this->StatusErr($Status) ) {\n $this->Error = \"command failed - $Status\";\n return;\n }\n\n$Lists = array();\n\n$in = $this->SockRead();\n\nwhile( !$this->StatusErr($in) AND !$this->StatusOk($in) \n AND !$this->DotOnly($in) ) {\n $Lists[] = $in;\n $in = $this->SockRead();\n }\n\n$Exploded = explode( \" \", $Lists[ 0 ] );\n\n#echo \"Exploded: \"; print_r( $Exploded );\n\nreturn $Exploded[1];\n\n\n\n}", "title": "" }, { "docid": "c9ca03ca57a08026273341aa1586c268", "score": "0.5948827", "text": "function get_ipifs($ip_switch, $key_switch=\"private\")\n {\n $result = array();\n $result[1][\"name\"] = \"System\";\n $soid = $this->ipif_oid.\".7.2.0\";\n $ip = snmp2_get($ip_switch, $key_switch, $soid);\n $result[1][\"ip\"] = str_replace(\"\\\"\", \"\", $ip);\n $soid = $this->ipif_oid.\".7.3.0\";\n $mask = snmp2_get($ip_switch, $key_switch, $soid);\n if (false === $mask) return (false);\n $result[1][\"mask\"] = str_replace(\"\\\"\", \"\", $mask);\n $soid = $this->ipif_oid.\".7.8.0\";\n $vname = snmp2_get($ip_switch, $key_switch, $soid);\n $soid = $this->vlan_oid.\".1\";\n $vlans = snmp2_real_walk($ip_switch, $key_switch, $soid);\n if (false === $vlans) return (false);\n foreach($vlans as $oid => $value)\n {\n if($value === $vname)\n {\n $vid = str_replace($soid.\".\", \"\", $oid);\n if ((false === $vid) or (!is_numeric($vid))) return (false);\n $result[1][\"vid\"] = $vid;\n return ($result);\n\n }\n }\n }", "title": "" }, { "docid": "371a1daeaf132eaf89039e273962feea", "score": "0.59296936", "text": "function pcibus()\r\n {\r\n $results = array();\r\n\r\n if ( $fd = fopen(\"/proc/pci\", \"r\") )\r\n {\r\n while ( $buf = fgets( $fd, 4096 ) )\r\n {\r\n if ( preg_match( \"/Bus/\", $buf ) )\r\n {\r\n $device = 1;\r\n continue;\r\n } \r\n\r\n if ( $device )\r\n { \r\n list($key, $value) = split(\": \", $buf, 2);\r\n\t\r\n if ( !preg_match( \"/bridge/i\", $key ) && !preg_match( \"/USB/i\", $key ) )\r\n {\r\n $results[] = preg_replace(\"/\\([^\\)]+\\)\\.$/\", \"\", trim( $value ) );\r\n }\r\n $device = 0;\r\n }\r\n }\r\n } \r\n\r\n return $results;\r\n }", "title": "" }, { "docid": "dfb0da5e7e7cabb1a5bb50b1548f8468", "score": "0.5892879", "text": "public static function locateIp(){\n\n $ip = $_SERVER['REMOTE_ADDR'];\n\n return array('ip' => $ip);\n }", "title": "" }, { "docid": "e7b3624c7ecf2731b8217c2387716713", "score": "0.5872579", "text": "public function getIPlayers()\n {\n return $this->IPlayers;\n }", "title": "" }, { "docid": "ed5c976b130d1d1206138d96b11e6e98", "score": "0.5870589", "text": "function getNetworkStatus($if)\n\t{\n\t\t//Legacy code for reading network interface via ifconfig\n\t\t$arlines = array();\n\t\texec('ifconfig '.escapeshellarg($if).' '.'2>&1 ', $arlines);\n\n\t\t$str='';\n\t\tforeach($arlines as $line)\n\t\t{\n\t\t\t$str=$str.$line;\n\t\t}\n\n\t\t$regex=array();\n\t\tpreg_match(\"/^([A-z]*\\d)\\s+Link\\s+encap:([A-z]*)\\s+HWaddr\\s+([A-z0-9:]*).*\".\n\t\t\t\"inet addr:([0-9.]+).*Bcast:([0-9.]+).*Mask:([0-9.]+).*\".\n\t\t\t\"/ims\", $str, $regex);\n\n\t\t$interfaces = array();\n\t\tif( !empty($regex) ){\n\t\t\t$interface = array();\n\t\t\t$interface['name'] = $regex[1];\n\t\t\t$interface['type'] = $regex[2];\n\t\t\t$interface['mac'] = $regex[3];\n\t\t\t$interface['ip'] = $regex[4];\n\t\t\t$interface['broadcast'] = $regex[5];\n\t\t\t$interface['netmask'] = $regex[6];\n\t\t\t$interfaces[] = $interface;\n\t\t}\n\n\t\treturn $interfaces;\n\t}", "title": "" }, { "docid": "d54df4e3b29eea229e11bddd608f1fb6", "score": "0.58327264", "text": "public static function searchByIp($ip){\n $db = JFactory::getDBO();\n\n $query = \"SELECT DISTINCT customer.* FROM \" . $db->quoteName('#__jeprolab_customer') . \" AS customer LEFT JOIN \" . $db->quoteName('#__jeprolab_guest') . \" AS guest ON (guest.\" . $db->quoteName('customer_id') . \" = customer.\" . $db->quoteName('customer_id');\n $query .= \") LEFT JOIN \" . $db->quoteName('#__jeprolab_connection') . \" AS connection ON (group.\" . $db->quoteName('guest_id') . \" = connection.\" . $db->quoteName('guest_id') . \" WHERE connection.\" . $db->quoteName('ip_address') . \" = \" . $db->quote(ip2long(trim($ip)));\n\n $db->setQuery($query);\n return $db->loadObjectList();\n }", "title": "" }, { "docid": "7baacd2570baa05e7e5eda4e6b793135", "score": "0.58303255", "text": "function build_port_list($selection) {\n\tglobal $config, $ifacelist;\n\n\t$portlist = array('list' => array(), 'selected' => array());\n\n\tforeach ($ifacelist as $ifn => $ifdescr) {\n\t\tif (substr($config['interfaces'][$ifn]['if'], 0, 6) != \"bridge\") {\n\t\t\t$portlist['list'][$ifn] = $ifdescr;\n\n\t\t\tif (in_array($ifn, explode(',', $selection))) {\n\t\t\t\tarray_push($portlist['selected'], $ifn);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn($portlist);\n}", "title": "" }, { "docid": "41870ea5166c73ff48f5a26de105f1aa", "score": "0.5819762", "text": "public function getAllowedIps()\n {\n $ipsList = array();\n $ipsText = '127.0.0.1,43.252.34.12'; // Comma separated list of allowed IP \n $ipsList = explode(',', $ipsText);\n $ipsList = array_map('trim', $ipsList);\n \n return $ipsList;\n }", "title": "" }, { "docid": "588355d00754b457f724b07f9f7c52dd", "score": "0.5787286", "text": "public function providerIpAddress()\n {\n return [\n [\"\"],\n [\"192.96.76.1\"],\n [\"145.38.5.6\"],\n // [\"35.158.84.49\"],\n // [\"23.34\"],\n // [\"35.158.84.49, 23.34\"],\n ];\n }", "title": "" }, { "docid": "21f9ae0d60cf91916d518d07c77fc766", "score": "0.5778812", "text": "function get_vip_status() {\n\tglobal $config;\n\n\tif(empty($config['vinterfaces']['carp'])):\n\t\treturn '';\n\tendif;\n\t$a_vipaddrs = [];\n\tforeach($config['vinterfaces']['carp'] as $carp):\n\t\t$ifinfo = get_carp_info($carp['if']);\n\t\t//$a_vipaddrs[] = $carp['vipaddr'].\" ({$ifinfo['state']},{$ifinfo['advskew']})\";\n\t\t$a_vipaddrs[] = $carp['vipaddr'].\" ({$ifinfo['state']})\";\n\tendforeach;\n\treturn implode(', ',$a_vipaddrs);\n}", "title": "" }, { "docid": "72355b1e311e40d06b903b4aa28878c2", "score": "0.57566816", "text": "public function getIpis(): IPIList\n {\n return $this->ipis;\n }", "title": "" }, { "docid": "b2865d3d463aba57f491cf45a292b065", "score": "0.5744897", "text": "function GetNumPorts($ip, $ro, $iface) {\n\n$Array_num_ports = snmprealwalk($ip, $ro, \"1.3.6.1.4.1.3320.101.12.1.1.8.$iface\");\nif(count($Array_num_ports)>0)\n foreach($Array_num_ports as $oid => $result)\n {\n $num_ports = $oid;\n }\n\n$tmp = explode(\"12.1.1.8.$iface.\", $num_ports);\n$num_ports = end($tmp);\nreturn $num_ports;\n}", "title": "" }, { "docid": "f4281810b54926113ac0b37613fc56c8", "score": "0.5731989", "text": "public function column_interfaces( $item )\n\t{\n\t\treturn $this->db()->meta()->get( $item->server_id, 'ipv4' );\n\t}", "title": "" }, { "docid": "4f7c100ed0fe7fe500b7db8640fa94d5", "score": "0.5730672", "text": "public function ips()\n {\n return $this->getClientIps();\n }", "title": "" }, { "docid": "6489799ae11aa5bb3ddd916c56eeea20", "score": "0.5723601", "text": "function pfb_collect_localip() {\n\t$pfb_local = $pfb_localsub = array();\n\n\t// Collect gateway IP addresses for inbound/outbound list matching\n\t$int_gateway = get_interfaces_with_gateway();\n\tif (isset($int_gateway)) {\n\t\tforeach ($int_gateway as $gateway) {\n\t\t\t$pfb_local[] = get_interface_ip($gateway) ?: 'Disabled';\n\t\t}\n\t}\n\n\t// Collect virtual IP aliases for inbound/outbound list matching\n\tforeach (config_get_path('virtualip/vip', []) as $list) {\n\t\tif (!empty($list['subnet']) && !empty($list['subnet_bits']) && is_subnet(\"{$list['subnet']}/{$list['subnet_bits']}\")) {\n\t\t\tif (is_ipaddrv4($list['subnet'])) {\n\t\t\t\tif ($list['subnet_bits'] >= 24) {\n\t\t\t\t\t$pfb_local\t= array_merge(subnetv4_expand(\"{$list['subnet']}/{$list['subnet_bits']}\"), $pfb_local);\n\t\t\t\t} else {\n\t\t\t\t\t$pfb_localsub[]\t= \"{$list['subnet']}/{$list['subnet_bits']}\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (is_ipaddrv6($list['subnet'])) {\n\t\t\t\t$pfb_localsub[] = gen_subnetv6(\"{$list['subnet']}\", \"{$list['subnet_bits']}\");\n\t\t\t}\n\t\t}\n\t\telseif (is_ipaddr($list['subnet'])) {\n\t\t\t$pfb_local[] = \"{$list['subnet']}\";\n\t\t}\n\t}\n\n\t// Collect NAT IP addresses for inbound/outbound list matching\n\tforeach (config_get_path('nat/rule', []) as $natent) {\n\t\t$pfb_local[] = $natent['target'];\n\t}\n\n\t// Collect 1:1 NAT IP addresses for inbound/outbound list matching\n\tforeach (config_get_path('nat/onetoone', []) as $onetoone) {\n\t\t$pfb_local[] = $onetoone['source']['address'];\n\t}\n\n\t// Convert any 'Firewall Aliases' to IP address format\n\t$aliases = config_get_path('aliases/alias', []);\n\tif (is_array($aliases)) {\n\t\tfor ($cnt = 0; $cnt <= count($pfb_local); $cnt++) {\n\t\t\tforeach ($aliases as $i=> $alias) {\n\t\t\t\tif (isset($alias['name']) && isset($pfb_local[$cnt])) {\n\t\t\t\t\tif ($alias['name'] == $pfb_local[$cnt]) {\n\t\t\t\t\t\t$pfb_local[$cnt] = $alias['address'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Collect all interface addresses for inbound/outbound list matching\n\tforeach (config_get_path('interfaces', []) as $int) {\n\t\tif ($int['ipaddr'] != 'dhcp') {\n\t\t\tif (!empty($int['ipaddr']) && !empty($int['subnet']) && is_subnet(\"{$int['ipaddr']}/{$int['subnet']}\")) {\n\t\t\t\tif (is_ipaddrv4($int['ipaddr'])) {\n\t\t\t\t\tif ($int['subnet'] >= 24) {\n\t\t\t\t\t\t$pfb_local\t= array_merge(subnetv4_expand(\"{$int['ipaddr']}/{$int['subnet']}\"), $pfb_local);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$pfb_localsub[]\t= \"{$int['ipaddr']}/{$int['subnet']}\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (is_ipaddrv6($int['ipaddr'])) {\n\t\t\t\t\t$pfb_localsub[] = gen_subnetv6(\"{$int['ipaddr']}\", \"{$int['subnet']}\");\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif (is_ipaddr($int['ipaddr'])) {\n\t\t\t\t$pfb_local[] = \"{$int['ipaddr']}\";\n\t\t\t}\n\t\t}\n\t}\n\n\t// Remove any duplicate IPs\n\tif (!empty($pfb_local)) {\n\t\t$pfb_local = array_flip(array_filter(array_unique($pfb_local)));\n\t}\n\t$pfb_localsub = array_unique($pfb_localsub);\n\n\treturn array($pfb_local, $pfb_localsub);\n}", "title": "" }, { "docid": "6618348cfefe498fecf63bb28098b9c8", "score": "0.57232475", "text": "public function getClientIps();", "title": "" }, { "docid": "3ef784e33a48c6098a143195cc63a17c", "score": "0.5722338", "text": "function GetNetworkInfo()\n {\n $mode = \"\";\n $ip = \"\";\n $mask = \"\";\n $gateway = \"\";\n $dns = array();\n $dns[0] = \"\";\n $dns[1] = \"\";\n $interface_name = \"\";\n $fixed_gateway = false;\n \n if (mb_strtolower(substr(PHP_OS, 0, 3)) === 'win') {\n // Windows\n // The last route (without an interface address) is the default one\n $output = array();\n exec(\"route print | find \\\"0.0.0.0\\\"\", $output);\n foreach($output as $line) {\n $line.= \" \";\n if (preg_match(\"/.*0.0.0.0.*[^\\.]+0.0.0.0.*[^\\.]+([[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3})[^\\.]+/\", $line)) {\n $result_array = array();\n preg_match_all(\"/[^\\.[:xdigit:]]+([[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3})/\", $line, $result_array, PREG_SET_ORDER);\n if ((!$fixed_gateway) && (isset($result_array[2][1]))) {\n $temp = trim($result_array[2][1]);\n if ('0.0.0.0' != $temp) {\n $gateway = $temp;\n if (!isset($result_array[3][1])) {\n $fixed_gateway = true;\n }\n }\n }\n }\n }\n $output = array();\n exec(\"ipconfig /all\", $output);\n $next_is_mask = false;\n foreach($output as $line) {\n $line.= \" \";\n if ($next_is_mask || preg_match(\"/.*IPv4.*[^\\.]+([[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3})[^\\.]+/\", $line)) {\n $result_array = array();\n preg_match_all(\"/[^\\.[:xdigit:]]+([[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3})/\", $line, $result_array, PREG_SET_ORDER);\n if (isset($result_array[0][1])) {\n $temp = trim($result_array[0][1]);\n if ($next_is_mask) {\n $mask = $temp;\n $cidr_mask = mask2cidr($mask);\n $gw_long_subnet = (ip2long($gateway) >> (32-$cidr_mask));\n $ip_long_subnet = (ip2long($ip) >> (32-$cidr_mask));\n if ($ip_long_subnet != $gw_long_subnet) {\n $next_is_mask = false;\n } else {\n break;\n }\n } elseif ('0.0.0.0' != $temp) {\n $ip = $temp;\n $next_is_mask = true;\n }\n }\n }\n }\n\n $output = array();\n exec(\"netsh interface dump | find \\\"\".$ip.\"\\\"\", $output);\n foreach($output as $line) {\n $line.= \" \";\n $result_array = array();\n preg_match_all(\"/[^\\\"]+\\\"([^\\\"]*)\\\".*/\", $line, $result_array, PREG_SET_ORDER);\n if (isset($result_array[0][1])) {\n // We receive something back which is probably coded in CP850\n $interface_name = mb_convert_encoding (trim($result_array[0][1]),\"UTF-8\",\"CP850\");\n $mode = \"static\";\n break;\n }\n }\n if (\"\" == $interface_name) {\n $mode = \"dhcp\";\n $output = array();\n exec(\"netsh interface dump\", $output);\n $ip4config = false;\n foreach($output as $line) {\n $line.= \" \";\n if (0 === mb_strpos(trim($line),\"pushd interface ipv4\")) {\n $ip4config = true;\n } elseif ($ip4config && (0 === mb_strpos(trim($line),\"popd\"))) {\n $ip4config = false;\n }\n if ($ip4config) {\n $result_array = array();\n preg_match_all(\"/^set interface[^\\\"]+\\\"([^\\\"]*)\\\".*metric=1.*/\", $line, $result_array, PREG_SET_ORDER);\n if (isset($result_array[0][1])) {\n // We receive something back which is probably coded in CP850\n $interface_name = mb_convert_encoding (trim($result_array[0][1]),\"UTF-8\",\"CP850\");\n break;\n }\n }\n }\n }\n\n $dns_count = 0;\n $output = array();\n exec(\"netsh interface ip show dnsservers \\\"\".mb_convert_encoding ($interface_name,\"ISO-8859-15\",\"UTF-8\").\"\\\"\", $output);\n foreach($output as $line) {\n $line.= \" \";\n if (preg_match(\"/[^\\.[:xdigit:]]+([[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3})[^\\.]+/\", $line)) {\n $result_array = array();\n preg_match_all(\"/[^\\.[:xdigit:]]+([[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3}[\\.][[:xdigit:]]{1,3})/\", $line, $result_array, PREG_SET_ORDER);\n if (($dns_count < 2) && isset($result_array[0][1])) {\n $dns[$dns_count] = trim($result_array[0][1]);\n $dns_count++;\n }\n }\n }\n } else {\n // Linux\n // eth -> works for old (eth0) and new (ether)\n $output = array();\n exec(\"grep -e \\\"^iface\\seth0.*inet\\s.*dhcp\\\" /etc/network/interfaces\", $output);\n $mode = (false !== mb_strpos(mb_strtolower(isset($output[0])?$output[0]:''), \"dhcp\"))?\"dhcp\":\"static\";\n \n $output = array();\n exec(\"ifconfig eth0 | grep \\\"eth\\\" | grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}'\", $output);\n $mac = mb_strtoupper(isset($output[0])?$output[0]:'');\n \n $output = array();\n exec(\"ifconfig eth0 | grep \\\"inet addr\\\" | grep -o -E '([[:xdigit:]]{1,3}\\.){3}[[:xdigit:]]{1,3}'\", $output);\n $ip = (isset($output[0])?$output[0]:'');\n $mask = (isset($output[2])?$output[2]:'');\n if ('' == $ip) {\n exec(\"ifconfig eth0 | grep \\\"inet \\\" | grep -o -E '([[:xdigit:]]{1,3}\\.){3}[[:xdigit:]]{1,3}'\", $output);\n $ip = (isset($output[0])?$output[0]:'');\n $mask = (isset($output[1])?$output[1]:'');\n }\n\n $output = array();\n exec(\"ip route show default | awk '/default/ {print $3}'\", $output);\n $gateway = mb_strtoupper(isset($output[0])?$output[0]:'');\n\n $output = array();\n exec(\"cat /etc/resolv.conf | grep -o -E '([[:xdigit:]]{1,3}\\.){3}[[:xdigit:]]{1,3}'\", $output);\n $dns[0] = (isset($output[0])?$output[0]:'');\n $dns[1] = (isset($output[1])?$output[1]:'');\n }\n $network_info = $mode.\"\\t\".$ip.\"\\t\".$mask.\"\\t\".$gateway.\"\\t\".$dns[0].\"\\t\".$dns[1].\"\\t\";\n $network_array = explode(\"\\t\",$network_info);\n \n for ($i=count($network_array); $i <= 5; $i++) {\n $network_array[$i] = '';\n }\n return $network_array;\n }", "title": "" }, { "docid": "b364f838262db4b3ac35cf6e98b2d9f1", "score": "0.5718094", "text": "public function listips()\n {\n return $this->xmlapi_query('listips');\n }", "title": "" }, { "docid": "34fb58e70855413452f376a98f2b9807", "score": "0.56917274", "text": "protected function getCurrentIpAddresses()\n {\n $ips = [\n GeneralUtility::getIndpEnv('REMOTE_ADDR')\n ];\n $parts = GeneralUtility::trimExplode('.', $ips[0], true);\n $ips[] = '*.*.*.*';\n $ips[] = $parts[0] . '.*.*.*';\n $ips[] = $parts[0] . '.' . $parts[1] . '.*.*';\n $ips[] = $parts[0] . '.' . $parts[1] . '.' . $parts[2] . '.*';\n return $ips;\n }", "title": "" }, { "docid": "7536918b0436866044d58569a4529053", "score": "0.56828654", "text": "public static function findIp(string $ip): array\n\t{\n\t\tif (\\App\\Cache::has('MailRblList', $ip)) {\n\t\t\treturn \\App\\Cache::get('MailRblList', $ip);\n\t\t}\n\t\t$rows = (new \\App\\Db\\Query())->from('s_#__mail_rbl_list')->where(['ip' => $ip])->orderBy(['type' => SORT_ASC])\n\t\t\t->all(\\App\\Db::getInstance('admin'));\n\t\t\\App\\Cache::save('MailRblList', $ip, $rows, \\App\\Cache::LONG);\n\t\treturn $rows;\n\t}", "title": "" }, { "docid": "666a0a1a1fe91ae3cc0fb8d5c9abd262", "score": "0.5653377", "text": "static function get_lista_ips_rechazadas()\r\n\t{\r\n\t\t$schema_logs = toba::instancia()->get_db()->get_schema(). '_logs';\r\n\t\t$sql = \"SELECT momento, ip FROM $schema_logs.apex_log_ip_rechazada;\";\r\n\t\treturn toba::db('toba_usuarios')->consultar($sql);\r\n\t}", "title": "" }, { "docid": "4906e5a4c1cd8a89cc5c289781a0211c", "score": "0.5642125", "text": "public function provider_ip()\n\t{\n\t\treturn [\n\t\t\t['75.125.175.50', FALSE, TRUE],\n\t\t\t['127.0.0.1', FALSE, FALSE],\n\t\t\t['256.257.258.259', FALSE, FALSE],\n\t\t\t['255.255.255.255', FALSE, FALSE],\n\t\t\t['192.168.0.1', FALSE, FALSE],\n\t\t\t['192.168.0.1', TRUE, TRUE],\n\t\t\t// Empty test\n\t\t\t['', TRUE, FALSE],\n\t\t\t[NULL, TRUE, FALSE],\n\t\t\t[FALSE, TRUE, FALSE],\n\t\t];\n\t}", "title": "" }, { "docid": "481015a0780af9ac609043739c7970e0", "score": "0.5640723", "text": "public function getIp();", "title": "" }, { "docid": "481015a0780af9ac609043739c7970e0", "score": "0.5640723", "text": "public function getIp();", "title": "" }, { "docid": "b2b7d867972d96348c22ae805aa284a4", "score": "0.56383115", "text": "public function getIps() {\n\t\treturn $this->ips;\n\t}", "title": "" }, { "docid": "f55f6a0982765f54437b16db04c04664", "score": "0.56336373", "text": "public function ips() : string {\n return preg_replace(\"/[^,.0-9]/\", '', shell_exec(\n \"ps -aux | grep index.php | grep monitor/watch | awk '{print $20}'\"\n ));\n }", "title": "" }, { "docid": "8371e5761f9ee01fd95763093df2fff7", "score": "0.56313646", "text": "function findInterface($ip) {\n\t\tforeach (array_keys($interfaces = $this->getInterfaces()) as $key) {\n\t\t\tif ($interfaces[$key]->getIpAddress() == $ip)\n\t\t\t\treturn $interfaces[$key];\n\t\t}\n\t\t$result = null;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bee7e18c529b5d048441e392b88b65e0", "score": "0.5605893", "text": "public function ipCountry($ip);", "title": "" }, { "docid": "473bc9583a0cc07e798907605fa92ecb", "score": "0.5596979", "text": "private function get_ifaces()\n\t{\n\t\treturn $this->m_ifaces;\n\t}", "title": "" }, { "docid": "ba7221a4e109a8f6bc75adb828510f3d", "score": "0.5585578", "text": "function get_ipm_ports($ip_switch, $key_switch=\"private\")\n {\n $soid = $this->main_oid.\".3\";\n $res = array();\n if (false === ($walk = snmp2_real_walk($ip_switch, $key_switch, $soid))) return (false);\n foreach ($walk as $oid=>$value)\n {\n $ip = str_replace($soid.\".4.\", \"\", $oid);\n $res[$ip] = $value;\n }\n return ($res); \n }", "title": "" }, { "docid": "ef358c9c48363199d32bd35975735d75", "score": "0.5579791", "text": "function getIP() {\n\tif(!empty($_SERVER['REMOTE_ADDR']))\n\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\tif(!empty($_SERVER['HTTP_X_FORWADED_FOR'])) {\n\t\t$ips = explode(\",\", $_SERVER['HTTP_X_FORWARDED_FOR']); \n\t\tif($ip) {\n\t\t\tarray_unshift($ips, $ip); \n\t\t\t$ip = false; \n\t\t}\n\t\tfor($i=0; $i<count($ips); $i++) {\n\t\t\tif(!eregi(\"^(10|172.16|192.168).\", $ips[$i])) {\n\t\t\t\t$ip = $ips[$i]; \n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t}\n\treturn $ip; \n}", "title": "" }, { "docid": "f23a794369fa38d7a392d1c679ff205e", "score": "0.5574562", "text": "function IfaceByMac($ip, $ro, $mac) {\n$mac_spaced = str_replace(':',' ',$mac);\n$mac_spaced = str_replace('a','A',$mac_spaced);\n$mac_spaced = str_replace('b','B',$mac_spaced);\n$mac_spaced = str_replace('c','C',$mac_spaced);\n$mac_spaced = str_replace('d','D',$mac_spaced);\n$mac_spaced = str_replace('e','E',$mac_spaced);\n$mac_spaced = str_replace('f','F',$mac_spaced);\n\n$Array_descr = snmprealwalk($ip, $ro, \".1.3.6.1.4.1.3320.101.10.1.1.3\");\n\nif(count($Array_descr)>0)\n{\n\tforeach($Array_descr as $key => $type)\n\t{\n\n$tmp = explode('10.1.1.3.', $key);\n$key = end($tmp);\n\n$tmp = explode('STRING: ', $type);\n$real_mac_spaced = trim(end($tmp));\nif ($real_mac_spaced == $mac_spaced) {\n$iface = $key;\n}\n\n}\n\n}\nreturn $iface;\n}", "title": "" }, { "docid": "18634c2680c885cfd0a754edca168152", "score": "0.55681086", "text": "function WhoisIP($ip) {\n $whoisInfo = \"\";\n\n if (empty($ip)) {\n return $whoisInfo;\n }\n\n // For every defined server\n $bestresult = \"\";\n $greatestres = 0;\n $lastref = -1;\n for ($i = 0; $i < count($this->arrWhoisIps); $i++) {\n // Create the socket\n $sock = @fsockopen($this->arrWhoisIps[$i]['server'], $this->arrWhoisIps[$i]['port'], $errno, $errdesc, $this->ServerTimeout);\n\n if($sock) {\n // Send the requested IP\n fputs($sock, $this->arrWhoisIps[$i]['prepend'].$ip.$this->arrWhoisIps[$i]['append'].\"\\r\\n\");\n\n // Get all the response\n $resp = \"\";\n while(($response = fgets($sock)))\n $resp .= $response;\n\n // Close the socket\n fclose($sock);\n\n // Get the country: data\n $splresp = spliti(\"country:\", $resp);\n\n// $hascountry = 0;\n// if (count($splresp)>1) {\n// for($j = 1;$j < count($splresp) && $hascountry == 0; $j++) {\n// // Get the country code only\n// $countrycode = $splresp[$j];\n// if (strpos($countrycode, \"\\n\") !== false)\n// $countrycode = substr($countrycode, 0, strpos($countrycode, \"\\n\"));\n// $countrycode = trim($countrycode);\n//\n// if (strpos($countrycode, \".\") === false && strpos($countrycode, \"/\") === false && strpos($countrycode, \"\\\\\") === false) {\n// $hascountry = 1;\n// $arrWhoisInfo['country'] = strtolower($countrycode);\n// } else {\n// $arrWhoisInfo['country'] = \"\";\n// }\n// }\n// } else {\n// $arrWhoisInfo['country'] = \"\";\n// }\n\n if (strstr($resp, \"\\n\".$this->arrWhoisIps[$i]['error']) === false && substr($resp, 0, strlen($this->arrWhoisIps[$i]['error'])) != $this->arrWhoisIps[$i]['error'] && strstr($resp, \"0.0.0.0 - 255.255.255.255\") === false) {\n // If this string contains a netname, get it\n $netname = substr(strstr($resp, \"netname:\"), 8);\n if (strpos($netname, \"\\n\") !== false)\n $netname = substr($netname, 0, strpos($netname, \"\\n\"));\n\n $netname = trim($netname);\n //$arrWhoisInfo['netname'] = $netname;\n\n // If the netname is in the following list, it's the best result but not\n // quite good enough:\n // ERX-NETBLOCK, NETBLK-RIPE, ARIN-CIDR-BLOCK, *-RIPE\n if($netname == \"ERX-NETBLOCK\" || $netname == \"NETBLK-RIPE\" || $netname == \"ARIN-CIDR-BLOCK\" || strstr($netname, \"-RIPE\") !== false || stristr($resp, \"ReferralServer: \")) {\n // Store it as best so far, if there hasn't been a $greatestres yet\n if($greatestres == 0)\n $whoisInfo = $resp;\n } else {\n // If the netname contains BLOCK or NETBLK, try to find a better one\n if (strstr($netname, \"BLOCK\") !== false || strstr($netname, \"NETBLK\")) {\n // Store it as \"possibly not perfect\n if ($greatestres == 0) {\n $whoisInfo = $resp;\n $greatestres = 1;\n }\n } else { // Perfect!\n // Succeeded, bail out\n $whoisInfo = $resp;\n\n return $whoisInfo;\n }\n }\n }\n\n // If the result has \"ReferralServer:\"\n if (($referral = stristr($resp, \"ReferralServer: \")) !== false) {\n $referral = substr($referral, strlen(\"RefferalServer:\"));\n $referral = trim(substr($referral, 0, strpos($referral, \"\\n\")));\n if (substr($referral, 0, 8) == \"whois://\")\n $referral = substr($referral, 8);\n if(substr($referral, -1, 1) == \"/\")\n $referral = substr($referral, 0, -1);\n\n // Make sure this isn't a referral already\n if ($lastref != $i) {\n // Next will be a referral\n $lastref = $i;\n\n list($this->arrWhoisIps[$i]['server'], $this->arrWhoisIps[$i]['port']) = explode(\":\", $referral, 2);\n $i--;\n }\n }\n }\n }\n\n // Tried 'em all, all failed, return the best result\n return $whoisInfo;\n }", "title": "" }, { "docid": "8445d8d250743c1969c64893487138b7", "score": "0.55449796", "text": "public function getIPList()\n {\n return $this->httpPostJson('ConfigSvc/GetIPList');\n }", "title": "" }, { "docid": "5a871e5dc9be3938d89ac2031bda81fa", "score": "0.5538793", "text": "function getCountryCodeAndIpsByIp($data){\n\t//done\n\t$arr[] = array();\n\t\n\t$result = json_decode(file_get_contents('http://www.telize.com/geoip/'.$data));\n\t\n\t\n\tforeach($result as $key => $value){\n\t\tif(strtolower($key) == 'isp' || strtolower($key) == 'country_code' || strtolower($key) == 'region'){\n\t\t \n\t\t\t$arr = array_merge($arr, array($key => $value));\n\t\t\n\t\t}\n\n\t\t\n\t\t\t\n\t}\n\t\n\t\n\tunset($arr['0']);\n\t//sort($arr);\n\treturn json_encode($arr);\n}", "title": "" }, { "docid": "410ad049dee77cc88c937430e1b40bf8", "score": "0.55307084", "text": "function GetCountryNameByIP($ipaddress)\n{\n}", "title": "" }, { "docid": "48450f937d45148ca68401a4e067d4a4", "score": "0.55296457", "text": "public static function getLocation($ip): array\n {\n if ($location = Location::get($ip)) {\n return self::getFields($location);\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "6d5640e4c66ad013e23768d0dfddf2af", "score": "0.5522287", "text": "function getIPProtNumber()\n {\n $query = \"SELECT id,name FROM port WHERE protocol = 'IP'\";\n $result = $this->_DB->fetchTable($query, true);\n if( $result == false ){\n $this->errMsg = $this->_DB->errMsg;\n return array();\n } \n return $result;\n }", "title": "" }, { "docid": "9a91bb9b60da39fc05d126e4f3818f67", "score": "0.5510474", "text": "public function getAllCartsByIp($ip)\n\t{\n\t\treturn $this->cart->where('user_ip', $ip)->where('status','not_ordered')->where('user_id',\"0\")->get();\n\t}", "title": "" }, { "docid": "50df579ee3c1bcc2fa9c76b5c2a1e7b4", "score": "0.5506864", "text": "function get_vpcports_from_UCS(&$themap, $fabricEthLanPc_dn) {\n $returnObject=array();\n $tmpneedle=$fabricEthLanPc_dn.'/';\n $domainname=$themap->ucsstack['physdomainname'];\n $dnArray=explode('/',$tmpneedle);\n $fabricname=$domainname.'-'.$dnArray[2];\n $tmpVPCid=$dnArray[3];\n $buildIt=false;\n // do a search for the interfaces on the UCS\n foreach($themap->storageindex_class as $key => $value1) {\n if(strpos($key,\"<=>CLASS\") !== false && $themap->storage[$key] === 'fabricEthLanPcEp') {\n\t $tmphaystack=$themap->storage[get_newindex($key,'<=>','dn')];\n\t if(strstr($tmphaystack, $tmpneedle) != NULL) {\n\t $interfaceName=\"Ethernet\".$themap->storage[get_newindex($key,'<=>','slotId')].'/'.$themap->storage[get_newindex($key,'<=>','portId')];\n\t $returnObject[$domainname][$fabricname][$tmpVPCid][]=$interfaceName;\n\t }\n\t}\n }\n return $returnObject;\n}", "title": "" }, { "docid": "3e01c451242b3db346febdc6bda25dc9", "score": "0.5503229", "text": "public function getFirstIP();", "title": "" }, { "docid": "0ebdb932204d871b27df7b325a014457", "score": "0.5472817", "text": "static function getNetAdress($ip, $mask)\n {\n $octetos_ip = explode('.', $ip);\n $octetos_net = array(0, 0, 0, 0);\n if ($mask <= 0 || $mask > 32) return NULL;\n for ($k = 0; $k < 4 && $mask; $k++) {\n \t$octetmask = ($mask >= 8) ? 8 : $mask;\n $mask -= $octetmask;\n $octetos_net[$k] = (int)$octetos_ip[$k] & ((0xFF << (8 - $octetmask)) & 0xFF);\n } \n return implode('.', $octetos_net);\n }", "title": "" }, { "docid": "bf0d91c432e7ed201648fda181d5847b", "score": "0.5466951", "text": "function getDhcpRange($interface)\n\t{\n\t\tdebug('dhcp_controller.inc|getDhcp: $interface = ', $interface); \t//DEBUG\n\t\t\n\t\t$startip = $endip = $dhcp = null;\n\t\t\n\t\tswitch ($interface)\n\t\t{\n\t\t\tcase ethernet:\n\t\t\t\t$startip = $this->dbconfig->getDbconfigData('system', 'eth0startip');\n\t\t\t\t$endip = $this->dbconfig->getDbconfigData('system', 'eth0endip');\n\t\t\t\tbreak;\n\t\t\tcase wireless:\n\t\t\t\t$startip = $this->dbconfig->getDbconfigData('system', 'ra0startip');\n\t\t\t\t$endip = $this->dbconfig->getDbconfigData('system', 'ra0endip');\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif($startip && $endip){ $dhcp = array($startip, $endip); }\n\t\t\t\t\n\t\treturn $dhcp;\n\t\t\n\t}", "title": "" }, { "docid": "0c818d2e4a522f62df52cc873e8744b7", "score": "0.54464316", "text": "public function read()\n {\n $devices = is_local_envorioment() ? ['eth0', 'eth1'] : $this->readDevices();\n $array = [];\n foreach ($devices as $device) {\n $array[$device] = new NetworkInterface($device);\n }\n\n return $array;\n }", "title": "" }, { "docid": "3f3cb7e39d090a4680077a276e9a3de5", "score": "0.54363114", "text": "protected function readIPs( $cmd ) {\n $result = array();\n $lines = explode( \"\\n\", trim(shell_exec($cmd.' 2>/dev/null')) );\n foreach( $lines as $line ) {\n $matches = array();\n if ( preg_match('|inet6?\\s+(?:addr\\:\\s*)?([\\:\\.\\w]+)|',$line,$matches) ) {\n $result[$matches[1]] = 1;\n }\n }\n unset( $result['127.0.0.1'] );\n unset( $result['::1'] );\n return array_keys($result);\n }", "title": "" }, { "docid": "fe4192cd3f24127cf5ee655d054586ba", "score": "0.5428752", "text": "function learn_ip()\n\t{\n\t\tif ( $this->ipsclass->input['ip'] == \"\" )\n\t\t{\n\t\t\t$this->show_index(\"You did not enter an IP address to search by\");\n\t\t}\n\t\t\n\t\t$ip = trim($this->ipsclass->input['ip']);\n\t\t\n\t\t$resolved = 'N/A - Partial IP Address';\n\t\t$exact = 0;\n\t\t\n\t\tif ( substr_count( $ip, '.' ) == 3 )\n\t\t{\n\t\t\t$exact = 1;\n\t\t}\n\t\t\n\t\tif ( strstr( $ip, '*' ) )\n\t\t{\n\t\t\t$exact = 0;\n\t\t\t$ip = str_replace( \"*\", \"\", $ip );\n\t\t}\n\t\t\t\n\t\tif ( $exact != 0 )\n\t\t{\n\t\t\t$resolved = @gethostbyaddr($ip);\n\t\t\t$query = \"='\".$ip.\"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \" LIKE '\".$ip.\"%'\";\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Host Address for {$this->ipsclass->input['ip']}\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>IP address resolves to</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $resolved\n\t\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Find registered members\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Name\" , \"30%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Email\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Posts\" , \"10%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"IP\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Registered\" , \"20%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Members using that IP when REGISTERING\" );\n\t\t\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => 'id, members_display_name, email, posts, ip_address, joined',\n\t\t\t\t\t\t\t\t\t 'from' => 'members',\n\t\t\t\t\t\t\t\t\t 'where' => \"ip_address{$query}\",\n\t\t\t\t\t\t\t\t\t 'order' => 'joined DESC',\n\t\t\t\t\t\t\t\t\t 'limit' => array( 0,250) ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\tif ( ! $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( \"No Matches Found\", \"center\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile ( $m = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['members_display_name'] ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['email'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['posts'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['ip_address'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->get_date( $m['joined'], 'SHORT' )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Find Names posted under\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Name\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Email\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"IP\" , \"15%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"First Used\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"View Post\" , \"15%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Members using that IP when POSTING\" );\n\t\t\n\t\t$this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_one', array( 'query' => $query) );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n\t\tif ( ! $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( \"No Matches Found\", \"center\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile ( $m = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$m['name'] = $m['name'] ? $m['name'] : \"Guest\";\n\t\t\t\t$m['email'] = $m['email'] ? $m['email'] : \"<i>Not Available</i>\";\n\t\t\t\t\n\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['name'] ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['email'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['ip_address'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->get_date( $m['post_date'], 'SHORT' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<center><a href='{$this->ipsclass->vars['board_url']}/index.php?showtopic={$m['topic_id']}&view=findpost&p={$m['pid']}' target='_blank'>View Post</a></center>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Find Names VOTED under\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Name\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Email\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"IP\" , \"15%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"First Used\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"View Poll\" , \"15%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Members using that IP when VOTING\" );\n\t\t\n\t\t$this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_two', array( 'query' => $query) );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n\t\tif ( ! $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( \"No Matches Found\", \"center\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile ( $m = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['name'] ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['email'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['ip_address'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->get_date( $m['vote_date'], 'SHORT' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \"<center><a href='{$this->ipsclass->vars['board_url']}/index.php?showtopic={$m['tid']}' target='_blank'>View Poll</a></center>\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Find Names EMAILING under\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Name\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Email\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"IP\" , \"15%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"First Used\" , \"20%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Members using that IP when EMAILING other members\" );\n\t\t\n\t\t$this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_three', array( 'query' => $query) );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n\t\tif ( ! $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( \"No Matches Found\", \"center\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile ( $m = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['name'] ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['email'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['from_ip_address'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->get_date( $m['email_date'], 'SHORT' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t\n\t\t//-----------------------------------------\n\t\t// Find Names VALIDATING under\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Name\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"Email\" , \"20%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"IP\" , \"15%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"First Used\" , \"20%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Members using that IP while VALIDATING their accounts\" );\n\t\t\n\t\t$this->ipsclass->DB->cache_add_query( 'member_tools_learn_ip_four', array( 'query' => $query) );\n\t\t$this->ipsclass->DB->cache_exec_query();\n\t\t\n\t\tif ( ! $this->ipsclass->DB->get_num_rows() )\n\t\t{\n\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( \"No Matches Found\", \"center\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\twhile ( $m = $this->ipsclass->DB->fetch_row() )\n\t\t\t{\n\t\t\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $m['name'] ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['email'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $m['ip_address'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->get_date( $m['entry_date'], 'SHORT' ),\n\t\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t}", "title": "" }, { "docid": "f4920d6b9c5c953b3597c5aad46c0805", "score": "0.5425229", "text": "function osc_item_ip() {\n return osc_item_field(\"s_ip\");\n }", "title": "" }, { "docid": "6a2eb1a22851c36a1112a68d257ef7c8", "score": "0.5421965", "text": "private function getIpInfo($ip) {\n\t\t\treturn json_decode(file_get_contents(\"http://ipinfo.io/{$ip}/json\"), true);\n\t\t}", "title": "" }, { "docid": "2209ebbfef5b21f28ce6916cc1d81e1a", "score": "0.54079103", "text": "private function filter($ip)\r\n {\r\n if(!isset($this->check)) $this->check = array();\r\n for($i=0; $i<count($this->check); $i++) {\r\n if($ip == $this->check[$i]['ip']) {\r\n return $this->check[$i];\r\n }\r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "1e9b3edef5ea2419d7c96049fb7e728a", "score": "0.53959626", "text": "function get_ip_location($IP) {\n $APIKEY = \"189dadc9f0e4de1b77feaf12215cf5e9\";\n $info = json_decode(get_data(\"http://api.ipstack.com/$IP?access_key=$APIKEY&format=1\"));\n return $info->city . \", \" . $info->region_name . \", \" . $info->country_name;\n}", "title": "" }, { "docid": "62d3425ab82f336cecbb6fc8a7b415d0", "score": "0.53913754", "text": "public function getIPs(): array {\n return $this->ips;\n }", "title": "" }, { "docid": "0257ffdf31d9b1df84064577b05fc0a3", "score": "0.5389605", "text": "function proc_net_dev()\n\t{\n\t// THIS FUNCTION RETURNS THE INTERFACES INFO TAKEN FROM /PROC/NET/DEV\n\t// TO KNOW THE STRCUTURE OF THE DATA, CALL THIS FUNCTION AND MAKE A print_r($result);\n\tunset ($list);\n\tunset ($line);\n\tunset ($value);\n\tunset ($start);\n\tunset ($result);\n\tunset ($handle);\n\t\n\t$handle=exec('cat /proc/net/dev',$list); \n\t\n\tforeach ($list as $line)\n\t{\n\t\t$line=trim ($line);\n\t\t\n\t\t$start=substr($line,0,2);\n\t\tswitch ($start)\n\t\t{\n\t\t\tcase 'lo':\n\t\t\t\t$value[0]=explode(':',$line,2);\n\t\t\t\tfor ($i=0;$i<17;$i++)\n\t\t\t\t{\t\t\n\t\t\t\t\t$value[$i][1]=trim ($value[$i][1]);\t\t\t\n\t\t\t\t\t$value[$i+1]=explode(' ',$value[$i][1],2);\n\t\t\t\t\t$result[$value[0][0]][$i]=$value[$i][0];\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'et':\n\t\t\t\t$value[0]=explode(':',$line,2);\n\t\t\t\tfor ($i=0;$i<17;$i++)\n\t\t\t\t{\t\t\n\t\t\t\t\t$value[$i][1]=trim ($value[$i][1]);\t\t\t\n\t\t\t\t\t$value[$i+1]=explode(' ',$value[$i][1],2);\n\t\t\t\t\t$result[$value[0][0]][$i]=$value[$i][0];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'at':\n\t\t\t\t$value[0]=explode(':',$line,2);\n\t\t\t\tfor ($i=0;$i<17;$i++)\n\t\t\t\t{\t\t\n\t\t\t\t\t$value[$i][1]=trim ($value[$i][1]);\t\t\t\n\t\t\t\t\t$value[$i+1]=explode(' ',$value[$i][1],2);\n\t\t\t\t\t$result[$value[0][0]][$i]=$value[$i][0];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'pp':\n\t\t\t\t$value[0]=explode(':',$line,2);\n\t\t\t\tfor ($i=0;$i<17;$i++)\n\t\t\t\t{\t\t\n\t\t\t\t\t$value[$i][1]=trim ($value[$i][1]);\t\t\t\n\t\t\t\t\t$value[$i+1]=explode(' ',$value[$i][1],2);\n\t\t\t\t\t$result[$value[0][0]][$i]=$value[$i][0];\n\t\t\t\t}\n\t\t\t\tbreak; \n\t\t}\t\n\t\t\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "7a4d38e0294fe6726bebb08313166fa7", "score": "0.53856426", "text": "function nombreequipo()\r\n {\r\n //return $hostname[0]; \r\n //ip equipo intranet\t\r\n if($_SERVER[\"HTTP_X_FORWARDED_FOR\"]){\r\n //Si hay proxy\t \r\n $proxy = $_SERVER[\"REMOTE_ADDR\"];\t \r\n\t $ipequipo = $_SERVER[\"HTTP_X_FORWARDED_FOR\"];\r\n\t \r\n\t}\r\n\telse\r\n\t{ //No hay proxy\r\n\t $ipequipo = $_SERVER[\"REMOTE_ADDR\"];\r\n\t}\r\n\treturn $ipequipo;\r\n }", "title": "" }, { "docid": "5be02fd3de1620772fdb4bc78456f1d6", "score": "0.5372197", "text": "function getIpsToConnect() {\n return $this->portIps;\n }", "title": "" }, { "docid": "84b00e92a84e0479855453bc32d05760", "score": "0.5365916", "text": "private function ip() {\n\n $ip = 'ip';\n\n return $this->ping->$ip;\n\n }", "title": "" }, { "docid": "1668e39841c0bd27441f462145aceb77", "score": "0.53644675", "text": "function ip_explode($ip) {\n\n\t$ix1\t= '';\n\t$ix\t= explode('.', $ip);\n\tforeach ($ix as $key => $octet) {\n\t\tif ($key != 3) {\n\t\t\t$ix1 .= \"{$octet}.\";\n\t\t}\n\t}\n\tarray_unshift($ix, $ip);\n\t$ix[] = \"{$ix1}0/24\";\n\t$ix[] = \"{$ix1}\";\n\n\treturn $ix;\n}", "title": "" }, { "docid": "2a951322354f7c7bb1284a0183790bb9", "score": "0.5360711", "text": "public function location(string $ip): array;", "title": "" }, { "docid": "a20f30d19d3b1c57373758a91330b43d", "score": "0.53558743", "text": "public function getPCListByName($name) {\n\t\t$PCList;\r\n\t\tforeach ($this->PCArray as $pc) {\n\t\t\t\tif (strpos($pc->getName(), $name) !== false) $PCList[] = $pc;\n\t\t}\n\t\treturn $PCList;\n\t}", "title": "" }, { "docid": "d0745b2c76766484556fb3cf555b2b13", "score": "0.53518045", "text": "function get_langlat_ip($ip){\n$key ='675622ec293a3a7d50b28b6e8f757968478750a25e356a459a91a47bda674ec4';\n$data = file_get_contents(\"http://api.ipinfodb.com/v3/ip-city/?key=\".$key.\"&ip=\".$ip);\n$data_arr = explode(\";\",$data);\nreturn $data_arr;\n}", "title": "" }, { "docid": "89664ae8f916e50a2fe313e837ec0f19", "score": "0.5336573", "text": "public function getIPHint() : array\n {\n return $this->IPHint;\n }", "title": "" }, { "docid": "24b3b6a68969f81811eaac7285d3938a", "score": "0.53287584", "text": "function GetCountryCodeByIP($ipaddress)\n{\n}", "title": "" }, { "docid": "9e40d7775599b0e5645f1efcc7acd3f3", "score": "0.532704", "text": "function ProcessLay1Interface($interface){\n\t\tif (stristr($interface, \"WiFi\")){\n\t\t\tif (stristr($interface, \"WiFi.SSID.1\")) {\n\t\t\t\t$host['networkType'] = \"Private\";\n\t\t\t\t$host['connectionType'] = \"Wi-Fi 2.4G\";\n\t\t\t}\n\t\t\telseif (stristr($interface, \"WiFi.SSID.2\")) {\n\t\t\t\t$host['networkType'] = \"Private\";\n\t\t\t\t$host['connectionType'] = \"Wi-Fi 5G\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$host['networkType'] = \"Public\";\n\t\t\t\t$host['connectionType'] = \"Wi-Fi\";\n\t\t\t}\n\t\t}\n\t\telseif (stristr($interface, \"MoCA\")) {\n\t\t\t$host['connectionType'] = \"MoCA\";\n\t\t\t$host['networkType'] = \"Private\";\n\t\t}\n\t\telseif (stristr($interface, \"Ethernet\")) {\n\t\t\t$host['connectionType'] = \"Ethernet\";\n\t\t\t$host['networkType'] = \"Private\";\n\t\t} \n\t\telse{\n\t\t\t$host['connectionType'] = \"Unknown\";\n\t\t\t$host['networkType'] = \"Private\";\n\t\t}\n \treturn $host;\n\t}", "title": "" }, { "docid": "4d07b610c4af1ffbbedcd8593a208c97", "score": "0.5321113", "text": "public function getOnu($ip,$index);", "title": "" }, { "docid": "07ba55b0bc6e61a4986fedb0c6df223e", "score": "0.5320083", "text": "function NameById($ip, $ro, $iface) {\n$iface_name = snmp2_get($ip, $ro, \"1.3.6.1.2.1.2.2.1.2.$iface\");\n\n//Get CLEAN name\n$tmp = explode(' ', $iface_name);\n$iface_name = end($tmp);\n$iface_name = str_replace(\"\\\"\", \"\", $iface_name);\n\n\nreturn $iface_name;\n}", "title": "" }, { "docid": "dfc6c1f26f71e3dd178277737ca78af9", "score": "0.5318723", "text": "public function testIpListsIpListIdIpsGet()\n {\n }", "title": "" }, { "docid": "d5a22ec4799c561beb145bde5f16f329", "score": "0.52976984", "text": "private function getConnectionToSwitchIndex() {\n global $DB;\n\n $macs='';\n $ptp = new PluginFusioninventoryPort;\n foreach($this->portsToConnect as $index=>$portConnection) {\n if ($macs!='') $macs.=', ';\n $ptp->load($portConnection);\n $macs.=\"'\".$ptp->getValue('ifmac').\"'\";\n $ifmac[$index]=$ptp->getValue('ifmac');\n }\n if ($macs!='') {\n $query = \"SELECT `ifmac`\n FROM `glpi_networking`\n WHERE `ifmac` IN (\".$macs.\");\";\n $result=$DB->query($query);\n if ($DB->numrows($result) == 1) {\n $switch = $DB->fetch_assoc($result);\n return array_search($switch['ifmac'], $ifmac);\n }\n }\n return '';\n }", "title": "" }, { "docid": "bd66bc44ef690351708567445b49b93b", "score": "0.5295162", "text": "function liste_parc($parc) {\n $mp_all = gof_members($parc, \"parcs\", 1);\n foreach ($mp_all as $key => $value) {\n//\t print $value;\n//\t if (preg_match( \"printerName=\".$, $value)) {\n//\t $ret['printers'][]=$value;\n//\t }\n//\t else {\n $ret['computers'][] = $value;\n//\t }\n }\n return $ret;\n}", "title": "" }, { "docid": "80dd5bf81113af0d56997d57e89f79ae", "score": "0.52942485", "text": "function get_ip_address() {\n foreach (array(\n'HTTP_CLIENT_IP',\n 'HTTP_X_FORWARDED_FOR',\n 'HTTP_X_FORWARDED',\n 'HTTP_X_CLUSTER_CLIENT_IP',\n 'HTTP_FORWARDED_FOR',\n 'HTTP_FORWARDED',\n 'REMOTE_ADDR'\n ) as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP) !== false) {\n return $ip;\n }\n }\n }\n }\n}", "title": "" }, { "docid": "2932e51441c496a2411fb505f89e17ac", "score": "0.52937275", "text": "public function index()\n {\n return NetworkInterfacesManager::read();\n }", "title": "" }, { "docid": "b396439f33c677296f4d2d81336eb3b6", "score": "0.52936226", "text": "public function ip($ip)\n {\n return $this->ip->get($ip);\n }", "title": "" }, { "docid": "14086d485fd4a3305d4b35661bfc931c", "score": "0.5291187", "text": "private function getIp(): string\n {\n foreach (array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR') as $key) {\n if (array_key_exists($key, $_SERVER) === true) {\n foreach (explode(',', $_SERVER[$key]) as $ip) {\n $ip = trim($ip); // just to be safe\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) !== false) {\n return $ip;\n }\n }\n }\n }\n return \"\";\n }", "title": "" }, { "docid": "3cc1c5b249b5200f773fa39576afb467", "score": "0.52782166", "text": "public function getIP() : string\n {\n return $this->iP;\n }", "title": "" }, { "docid": "559320e2d21a798e3df362247e2af3c2", "score": "0.52728915", "text": "function geoCheckIP($ip)\n {\n //check, if the provided ip is valid\n if(!filter_var($ip, FILTER_VALIDATE_IP))\n {\n throw new InvalidArgumentException(\"IP is not valid\");\n }\n\n //contact ip-server\n $response=@file_get_contents('http://www.netip.de/search?query='.$ip);\n if (empty($response))\n {\n throw new InvalidArgumentException(\"Error contacting Geo-IP-Server\");\n }\n\n //Array containing all regex-patterns necessary to extract ip-geoinfo from page\n $patterns=array();\n $patterns[\"domain\"] = '#Domain: (.*?)&nbsp;#i';\n $patterns[\"country\"] = '#Country: (.*?)&nbsp;#i';\n $patterns[\"state\"] = '#State/Region: (.*?)<br#i';\n $patterns[\"town\"] = '#City: (.*?)<br#i';\n\n //Array where results will be stored\n $ipInfo=array();\n\n //check response from ipserver for above patterns\n foreach ($patterns as $key => $pattern)\n {\n //store the result in array\n $ipInfo[$key] = preg_match($pattern,$response,$value) && !empty($value[1]) ? $value[1] : 'not found';\n }\n\n return $ipInfo;\n }", "title": "" }, { "docid": "c35b883159eeddf22c631404a05bb2dc", "score": "0.52699244", "text": "function get_countryname_by_ip($ip = false)\n{\n $data = get_geo_location_by_ip($ip);\n if(avail($data, 'countryName'))\n return $data->countryName;\n return false;\n}", "title": "" }, { "docid": "7c93b0b7cee7dd55bec7736504c09259", "score": "0.52488315", "text": "public function getLocationByIp();", "title": "" }, { "docid": "8c67fa1b56f78ca18bd47d18645065cc", "score": "0.52455544", "text": "function get_coordinates_by_ip($ip = false)\n{\n\t// ip could be something like \"1.1 ironportweb01.gouda.lok:80 (IronPort-WSA/7.1.1-038)\" from proxies\n\t$data = get_geo_location_by_ip($ip);\n if(avail($data, 'longitude') && avail($data, 'latitude'))\n return [\n 'latitude' => $data->latitude,\n 'longitude' => $data->longitude\n ];\n return false;\n}", "title": "" }, { "docid": "102c74602e2e547765cfd58f9c54048e", "score": "0.52439076", "text": "function MacById($ip, $ro, $iface) {\n$mac = snmp2_get($ip, $ro, \"1.3.6.1.4.1.3320.101.10.1.1.3.$iface\");\n$mac = trim(end(explode(':', $mac)));\n$mac = str_replace (\" \", \":\", $mac);\nreturn $mac;\n}", "title": "" }, { "docid": "024d6e120a3ffb6463624525cd2297c0", "score": "0.52365345", "text": "private function _parse_ip() {\n $vals = array();\n if (isset($_SERVER[\"HTTP_X_FORWARDED_FOR\"])) {\n $vals = Array($_SERVER[\"HTTP_X_FORWARDED_FOR\"], true, $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT']);\n }\n else if (isset($_SERVER[\"HTTP_CLIENT_IP\"])) {\n $vals = Array($_SERVER[\"HTTP_CLIENT_IP\"], true, $_SERVER['REMOTE_ADDR'], $_SERVER['REMOTE_PORT']);\n }\n else {\n $vals = Array($_SERVER['REMOTE_ADDR'], false, null, null);\n }\n list($this->ip, $this->proxied, $this->proxy_ip, $this->proxy_port) = $vals;\n }", "title": "" }, { "docid": "bee20dab48eeabaf4dc94d9a15cb05c7", "score": "0.52319884", "text": "function getPortList()\n {\n $return = $this->callCommand(\"serverlist\");\n $matches = array();\n if (preg_match_all(\"/virtualserver_port=(\\d+)/\", $return, $matches) && isset($matches[1])) {\n return $matches[1];\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "41eda3cd1d5398eb58c13374fcbdd990", "score": "0.52308273", "text": "function get_ip_address() {\n $ipaddress = '';\n\n foreach ( array( 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR' ) as $key ) {\n if ( array_key_exists( $key, $_SERVER ) === TRUE ) {\n foreach ( explode( ',', $_SERVER[$key] ) as $ip ) {\n if ( filter_var( $ip, FILTER_VALIDATE_IP ) !== FALSE ) {\n if ( $this->is_ip_valid( $ip ) ) {\n $ipaddress = $ip;\n } else {\n $ipaddress = '0.0.0.0';\n }\n }\n }\n }\n }\n\n return $ipaddress;\n }", "title": "" }, { "docid": "89f208e3dbc2a21226416220c7c72fad", "score": "0.5226581", "text": "public static function getIP () {\n\t\t$client_ip = \"\";\n\n\t\t$server = FilterServer::getInstance();\n\n\t\tif ( $server->getIp( \"HTTP_X_FORWARDED_FOR\" ) )\n\t\t{\n\t\t\t$ip = $server->getIp( \"HTTP_X_FORWARDED_FOR\" );\n\t\t}\n\t\telseif ( $server->getIp( \"HTTP_CLIENT_IP\" ) )\n\t\t{\n\t\t\t$ip = $server->getIp( \"HTTP_CLIENT_IP\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t $ip = $server->getIp( \"REMOTE_ADDR\" );\n\t\t}\n\n\t\t// Simulated IP, only when a local IP is detected, to allow geolocation services work.\n\t\tif ( strstr( $ip, '127.0.0.' ) || strstr( $ip, '192.168.' ) )\n\t\t{\n\t\t\t$ip = '89.140.161.225';\n\t\t}\n\n\t\t// From http://www.eslomas.com/index.php/archives/2005/04/26/obtencion-ip-real-php/\n\t\t$entries = preg_split ( '/[,\\s]/' , $ip );\n\n\t\treset ( $entries );\n\n\t\twhile ( list (, $entry ) = each( $entries ) )\n\t\t{\n\t\t\t$entry = trim ( $entry );\n\n\t\t\tif ( preg_match (\"/^([0-9]+.[0-9]+.[0-9]+.[0-9]+)/\", $entry, $ip_list ) )\n\t\t\t{\n\t\t\t\t// http://www.faqs.org/rfcs/rfc1918.html\n\t\t\t\t$private_ip = array(\n\t\t\t\t\t '/^0./',\n\t\t\t\t\t '/^127.0.0.1/',\n\t\t\t\t\t '/^192.168..*/',\n\t\t\t\t\t '/^172.((1[6-9])|(2[0-9])|(3[0-1]))..*/',\n\t\t\t\t\t '/^10..*/');\n\n\t\t\t\t$found_ip = preg_replace ($private_ip, $client_ip, $ip_list[1]);\n\n\t\t\t\tif ( $client_ip != $found_ip )\n\t\t\t\t{\n\t\t\t\t $ip = $found_ip;\n\t\t\t\t break;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn trim ( $ip );\n\t}", "title": "" }, { "docid": "fea0a4da8dcc50c04ba3aa7c9aa4d4bd", "score": "0.5222024", "text": "static function es_ip_rechazada($ip);", "title": "" }, { "docid": "36938babe3234387c56654acc4a63a1a", "score": "0.521617", "text": "function whitelistGetNetBIOSIP() {\n\t\t$ret = array();\n\t\tforeach(file(dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'whitelist-domains.txt') as $domain) {\n\t\t\t$ip = gethostbyname($domain);\n\t\t\t$ret[$ip] = $ip;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "90e6b819e37a5612e89d312fac11fdc4", "score": "0.52143985", "text": "private function _ip() {\n\t\tglobal $_SERVER;\n\n\t\tif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {\n\t\t\t$ip_adr_array\t\t=\texplode(',',$_SERVER['HTTP_X_FORWARDED_FOR']);\n\t\t} else {\n\t\t\t$ip_adr_array\t\t=\tarray();\n\t\t}\n\t\t$ip_adr_array[]\t\t\t=\t$_SERVER['REMOTE_ADDR'];\n\t\treturn addslashes(implode(\",\",$ip_adr_array));\n\t}", "title": "" }, { "docid": "20c15b911806170473cc397593cde173", "score": "0.5213475", "text": "public function getClientIp();", "title": "" }, { "docid": "de3ac20a554ca2d060ef855f7748a52c", "score": "0.52039015", "text": "function getIp () {\n \treturn $this -> ip;\n }", "title": "" }, { "docid": "d3234020901a7ec1281032af92418203", "score": "0.5203868", "text": "function whitelistGetNetBIOSIP() {\n\t\t$ret = array();\n\t\tforeach(file(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'whitelist-domains.txt') as $domain) {\n\t\t\t$ip = gethostbyname($domain);\n\t\t\t$ret[$ip] = $ip;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "6d5a64429647e2fdb717728f60ef1bf6", "score": "0.52010244", "text": "public function locateIP($inputIP)\n {\n $result = \"Not valid IP-address.\";\n\n if ($this->validateIPv4($inputIP) || $this->validateIPv6($inputIP)) {\n $result = [\n \"ip\" => \"{$inputIP}\",\n \"ipv4\" => \"\",\n \"ipv6\" => \"\",\n \"domain\" => \"\",\n \"country\" => \"\",\n \"city\" => \"\",\n \"latitude\" => \"1.1\",\n \"longitude\" => \"2.2\",\n \"maplink\" => \"\",\n \"country_name\" => \"\",\n ];\n }\n\n return $result;\n }", "title": "" }, { "docid": "5d90bc36aada2873dd0e7903e391858f", "score": "0.51943713", "text": "public function ip(): string {\n return $this->ip;\n }", "title": "" }, { "docid": "0455401d797fee9e4a21d2b1674f4940", "score": "0.5194072", "text": "protected function getIpAddress()\n {\n $ips = array();\n // get the cofig file\n $conf = $this->getConfig();\n // if the conf has returned and error return it\n if ($conf != 'SAFE_MODE' && $conf != 'ERROR_OPEN') {\n // if anyone has any clues for windows environments\n // or other server types let me know\n $os = strtolower(PHP_OS);\n if (substr($os, 0, 3)=='win') {\n // anyone any clues on win ip's\n } else {\n // explode the conf into seperate lines for searching\n $lines = explode(PHP_EOL, $conf);\n // get the ip delim\n $ipDelim = $this->getOsVar('ip', $os);\n\n // ip pregmatch\n $num = \"(\\\\d|[1-9]\\\\d|1\\\\d\\\\d|2[0-4]\\\\d|25[0-5])\";\n // seperate the lines\n foreach ($lines as $key => $line) {\n // check for the ip signature in the line\n if (!preg_match(\"/^$num\\\\.$num\\\\.$num\\\\.$num$/\", $line) && strpos($line, $ipDelim)) {\n // seperate out the ip\n $ip = substr($line, strpos($line, $ipDelim)+strlen($ipDelim));\n $ip = trim(substr($ip, 0, strpos($ip, \" \")));\n // add the ip to the collection\n if (!isset($ips[$ip])) {\n $ips[$ip] = $ip;\n }\n }\n }\n }\n }\n\n // if the conf has returned nothing\n // attempt to use the $server data\n if (isset($this->serverVars['SERVER_NAME'])) {\n $ip = gethostbyname($this->serverVars['SERVER_NAME']);\n if (!isset($ips[$ip])) {\n $ips[$ip] = $ip;\n }\n }\n if (isset($this->serverVars['SERVER_ADDR'])) {\n $name = gethostbyaddr($this->serverVars['SERVER_ADDR']);\n $ip = gethostbyname($name);\n if (!isset($ips[$ip])) {\n $ips[$ip] = $ip;\n }\n // if the $server addr is not the same as the returned ip include it aswell\n if (isset($addr) && $addr != $this->serverVars['SERVER_ADDR']) {\n if (!isset($ips[$this->serverVars['SERVER_ADDR']])) {\n $ips[$this->serverVars['SERVER_ADDR']] = $this->serverVars['SERVER_ADDR'];\n }\n }\n }\n // count return ips and return if found\n if (count($ips) > 0) {\n return $ips;\n }\n // failed to find an ip check for conf error or return 404\n if ($conf == 'SAFE_MODE' || $conf == 'ERROR_OPEN') {\n return $conf;\n }\n return 'IP_404';\n }", "title": "" }, { "docid": "52ab9cf63c9b78c4438573a8f82b1874", "score": "0.51917785", "text": "function getNetwork() {\n global $config;\n $networkFileParsed=@parse_ini_file($config[\"interfacesDirectory\"].$config[\"interfacesFile\"]);\n\n $dhcp=\"dhcp\";\n if ($networkFileParsed!=null) {\n if (array_key_exists(\"DHCP\", $networkFileParsed) && $networkFileParsed[\"DHCP\"] == 1) {\n $dhcp = \"dhcp\";\n } else {\n $dhcp = \"static\";\n }\n }\n $ip = exec(\"ifconfig | grep inet | sed -n '1p' | awk '{print $2}' | awk -F ':' '{print $2}'\");\n $netmask= exec(\"ifconfig |grep inet| sed -n '1p'|awk '{print $4}'|awk -F ':' '{print $2}'\");\n $gw = exec(\"route -n | grep eth0 | grep UG | awk '{print $2}'\");\n $dns[0]=\"\";\n $dns[1]=\"\";\n if (file_exists($config[\"resolvFile\"])) {\n $dnsContent = file($config[\"resolvFile\"], FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n $i=0;\n foreach ($dnsContent as $item) {\n $dnsParts=explode(\"nameserver \",$item);\n if(isset($dnsParts[1])) {\n $dns[$i]=trim($dnsParts[1]);\n $i++;\n }\n }\n }\n return array(\n \"dhcp\"=>$dhcp,\n \"ipaddress\"=>$ip,\n \"netmask\"=>$netmask,\n \"gateway\"=>$gw,\n \"dns1\"=>$dns[0],\n \"dns2\"=>$dns[1]);\n}", "title": "" }, { "docid": "d78fd60b2a603ca58955a553325964f4", "score": "0.51816374", "text": "function getTCPortNumbers()\n {\n $query = \"SELECT id,name FROM port WHERE protocol = 'TCP'\";\n $result = $this->_DB->fetchTable($query, true);\n if( $result == false ){\n $this->errMsg = $this->_DB->errMsg;\n return array();\n }\n return $result;\n }", "title": "" }, { "docid": "3f681111757e44a4b34b8fc8b831d9e8", "score": "0.516973", "text": "public function getCustomerCircuit($ip,$gpon_id);", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "a433e4db90e8b2bc1724f47789dc0d06", "score": "0.0", "text": "public function edit($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "5a5e25617e1019b0143435d1dcee143b", "score": "0.7874048", "text": "public function edit(Resource $resource) {\n $resource = Resource::find($resource->id);\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.78550774", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1ff9b967571a69048601f797857ac47d", "score": "0.73630536", "text": "public function edit($resource)\n {\n throw new NotSupportingFormException('Current collection has no support for the edit form.');\n }", "title": "" }, { "docid": "f66128bcb2c9ae0f04bda448b36d1ea3", "score": "0.7304177", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('supplier', array('action' => 'new')));\n\t\t} // if\n\n\t\t$model = ORM::factory('Supplier')->where('id', '=', $id)->find();\n\n\t\t$this->content = View::factory('supplier/form', array(\n\t\t\t'title' => __('Edit supplier \":supplier\"', array(':supplier' => $model->company)),\n\t\t\t'supplier' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'ajax_url' => Route::url('supplier', array('action' => 'save', 'id' => $id))\n\t\t));\n\t}", "title": "" }, { "docid": "a6d17bc99368cf15347d963b4a54b8cb", "score": "0.72696465", "text": "public function edit($id)\n {\n $this->authorize('update', $this->resource->getModel());\n\n $this->data['data'] = $this->resource->findById($id);\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['routeUrl'] = route($this->module->getName().'.update', $id);\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "1e6b8a74cda64a99e6e6466577d76d2f", "score": "0.7234951", "text": "public function edit($id)\n {\n $resource = AclResource::find($id);\n\n if (!$resource) {\n return Redirect::route('acl.resource.index')->withErrors('记录不存在, 请先创建');\n }\n\n return view('Admin.acl.resource.form')->withResource($resource);\n }", "title": "" }, { "docid": "fc7a52b0df8bda8ac30893be852d1863", "score": "0.71763575", "text": "public function edit($id)\n {\n $resources = Resources::findOrFail($id);\n return view('Backend/Resources/editResource', compact('resources'));\n }", "title": "" }, { "docid": "249b9ac88f9aafdb17c5a7306cf6b6c7", "score": "0.70568776", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n $model = $this->resource;\n $providers = User::whereType('provider')->orderby('name')->get();\n $categories = Category::where('parent_id', 0)->get();\n $isEdit = true;\n if (is_null($resource)) {\n return redirect()->route('resources.index');\n }\n\n return view('backend.resources.edit', compact('model', 'resource', 'providers', 'categories', 'isEdit'));\n }", "title": "" }, { "docid": "c255d729fa42f0248fba1ee54f13f6eb", "score": "0.70553356", "text": "public function edit()\n {\n // show view\n return view('admin/product/edit')\n -> with('product', Product::find(Input::get('id')));\n }", "title": "" }, { "docid": "a843a929a9e78ec732c8ae4feef35927", "score": "0.70016015", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n if (is_null($resource) || (Auth::user()->id != $resource->author_id)) {\n return redirect()->route('resources.create');\n }\n return view(\n 'resources.edit',\n ['resource' => $resource ]\n );\n }", "title": "" }, { "docid": "96884a0d55f36349b743e3d913248156", "score": "0.70006657", "text": "function edit()\n {\n $this->_view_edit('edit');\n }", "title": "" }, { "docid": "e696e47d677bec983660ef15b297afa5", "score": "0.6963453", "text": "public function edit(ResourceInterface $resource)\n\t{\n if(Auth::user()->can('edit',$resource)) {\n $variables = [];\n $variables['extends'] = Config::get('roles::extends');\n $variables['resource'] = $resource;\n $response = View::make('roles::resource.edit', $variables);\n } else {\n $errors = new MessageBag();\n $errors->add('error', trans('roles::resource.edit permission denied'));\n $response = Redirect::back()->withErrors($errors);\n }\n\n return $response;\n\t}", "title": "" }, { "docid": "f63e50b2035a4ef854d8b740f3db22d1", "score": "0.6944645", "text": "public function editForm($id)\n\t{\n\t\t$region = \\App\\Region::find($id);\n \t\t\t\n \t\n\t\treturn view('region/editForm',array('region'=>$region));\n\t}", "title": "" }, { "docid": "c0ca6d3bd6305ff71d6c76321811b1bc", "score": "0.69353485", "text": "public function edit()\n {\n return view('kontraktor::edit');\n }", "title": "" }, { "docid": "7a2fce152c2e7ee4b6d45eb755a98f48", "score": "0.6893516", "text": "public function edit($id)\n {\n $titulo = 'Cursos';\n $subtitulo = 'Editando os dados do professor';\n $professor = Professor::find($id);\n\n $action = route('professores.update', $professor->id);\n\n return view('admin.professores.form_professor', compact('professor', 'action','titulo','subtitulo'));\n }", "title": "" }, { "docid": "e292b670ed6fb92f93f41ebc0c959c87", "score": "0.6882936", "text": "public function editAction()\n { \n $profile_id = $this->_getParam('profile');\n $this->_includeForm($profile_id);\n }", "title": "" }, { "docid": "34a8fc606e2e5031dcfc0be2c4eda232", "score": "0.6881411", "text": "function resource($resource_id)\n\t{\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t# Check that it exists (in case of URL editing in the browser)\n\t\tif ($q -> num_rows() == 0) \n\t\t{ \n\t\t\t$data['title'] = \"No such resource\"; $data['heading'] = \"Resource not found\"; \n\t\t\t$data['error'] = \"There is no resource with the ID $resource_id. Tough mazoomas.\n\t\t\t\t\t\t\t\tPlease choose another resource to edit.\"; \n\t\t\t$data['message'] = \"\";\n\t\t\t$this -> load -> view('resourcedb/database_error_view', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resource_title = $q -> row() -> title;\n\t\t\t$data['title'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['heading'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['resource__id'] = $resource_id; \n\t\t\t\n\t\t\t# Get the user ID to save as record editor\n\t\t\t$user_id = $this->ion_auth->user()->row()-> id;\n\t\t\t# Set messages for the view file\n\t\t\t$data['title'] = 'Global health repository: edit resource';\n\t\t\t$data['heading'] = 'Edit resource';\n\t\t\t# Set user message and error as blanks, to prevent PHP warning if one or t'other isn't set\n\t\t\t$data['message'] = \"\"; $data['error'] = \"\";\n\t\t\t\n\t\t\t# Populate form elements.\n\t\t\t# Get full resource record first \n\t\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\n\t\t\t# -- SUBJECTS ---\n\t\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t\t# by existing resources\n\t\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t\t$old_subjects_ary = array();\n\t\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t\t}\n\t\t\t# Pass currently attached subjects to the view page\n\t\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\t\t\n\t\t\t\n\t\t\t# -- ORIGINS --\n\t\t\t$data['origins_query'] = $this -> ResourceDB_model -> get_origins();\n\n\t\t\t# -- RESOURCE TYPES ---\n\t\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types();\n\t\t\t\n\t\t\t# -- TAGS --\n\t\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t\t$old_tags_ary = array();\n\t\t\tforeach ($tags_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t\t}\n\t\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\t\n\t\t\t# ==== FORM VALIDATION ======\n\t\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t\t# validation rules, hence a rul for all elements below. See CI Forum thread at:\n\t\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t\t# sqare brackets, as just checking for the title existing would always \n\t\t\t# return true - we need to check that the edited title exists or not. \n\t\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean|callback_title_check[$resource_title]\");\n\t\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\t\n\t\t\t\n\t\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t\t# (re)populate with user data\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t\t$this -> load -> view('resourcedb/editview', $data);\n\n\t\t\t}\n\t\t\t# If form validates, update record\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Get form values for fields in RESOURCE table\n\t\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t\t# DATETIME data type\n\t\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\t\n\t\t\t\t$record_data = array (\n\t\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t\t'creator' => $_POST['creator'], \n\t\t\t\t\t\t\t\t'source' => $_POST['source'], \n\t\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t\t'metadata_created' => $now, \n\t\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t# Run update query in model\n\t\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\t\n\t\t\t\t# TAGS\n\t\t\t\t# First, get tag(s) user's inserted. Get cleaned field text...\n\t\t\t\t$tags = $this -> security -> xss_clean($_POST['tags']);\n\t\t\t\t# ...then split string by the semicolon delimiter...\n\t\t\t\t$tags_ary = explode(';', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from reource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> keyword_num;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t\t\n\t\t\t\t# SUBJECTS\n\t\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t\t# empty array so as not to generate a runtime error\n\t\t\t\tif (isset($_POST['subjects']))\n\t\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\t\telse\n\t\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t\t{\n\t\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t# Set messages etc for the result page\n\t\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t\t# Load results page with data array\n\t\t\t\t$this->load->view('resourcedb/edit_result_view', $data);\n\t\t\t} // end if validates\n\t\t} // end else \n\t\t\n\t}", "title": "" }, { "docid": "dae5724ce6ffe9f8168d9376dad37a3c", "score": "0.68776023", "text": "public function edit($id)\n\t{\n return View::make('clerks.edit');\n\t}", "title": "" }, { "docid": "8d1e7e6a0adf154febe8b2162826c974", "score": "0.687279", "text": "public function edit()\n {\n return view('employee::edit');\n }", "title": "" }, { "docid": "56e50a150ef946fc5f8f9a4336ac22c4", "score": "0.687256", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n $serviceProviders = ServiceProvider::getServideProvidersByCurrentUser();\n\n return view('resources.edit', compact('resource','serviceProviders'));\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859945", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "2eb64c6122690d9bd44bef3e37f29ae1", "score": "0.68540037", "text": "public function edit($id)\n\t{\n return View::make('formularios.edit');\n\t}", "title": "" }, { "docid": "0ebc42a2c069d423feda158807f26b6e", "score": "0.68417704", "text": "public function edit($id)\n\t{\n\t\t$product = Product::findOrFail($id);\n\t\treturn view('admin.product.form', compact('product'));\n\t}", "title": "" }, { "docid": "e849bb86c22e491ed440629e1cb932c0", "score": "0.68406576", "text": "public static function edit_form()\n {\n $user = Users::findOne($_SESSION['user']);\n\n View::make('user/edit.html', array('user' => $user));\n }", "title": "" }, { "docid": "f4e108d9c623dad5e9c0bf37e72c018e", "score": "0.68275845", "text": "public function edit($id)\n {\n $model = Kamar::find($id);\n return view('backend.kamar.form',[\n 'model'=>$model,\n 'update'=>true\n ]);\n }", "title": "" }, { "docid": "53b816599a714759eada473e1669b37a", "score": "0.6820256", "text": "public function action_edit() {\n $id = $this->request->param('id');\n // Validate id\n if (!(Valid::not_empty($id) && Valid::numeric($id))) {\n Session::instance()->set('feedbackMessage', array('Invalid supplier id.'));\n $this->redirect ('supplier/findAll');\n }\n \n // Get the supplier to edit\n $repo = new Repository_Supplier();\n $supplier = $repo->get($id);\n\n // The id do not refer to a valid supplier\n if (!is_object($supplier)) {\n Session::instance()->set('feedbackMessage', array('Invalid supplier id.'));\n $this->redirect ('supplier/findAll');\n }\n\n $view = View::factory('supplier/supplier')\n ->set('supplier', $supplier)\n ->set('submitAction', 'supplier/update')\n ->set('pageName', 'Edit Supplier');\n \n $this->template->title = __('Edit Supplier');\n $this->template->content = $view;\n }", "title": "" }, { "docid": "b809b5f4d9b19fe4e64b0a804c260af6", "score": "0.6819058", "text": "public function edit(Article $article)\t\t//show a view to edit an resource\n\t{\n\t\treturn view('articles.edit', ['article' => $article]);\n\t\t//show.php에서 수정하기 버튼을 누르면 edit.php라는 view로 연결된다.\n\t}", "title": "" }, { "docid": "7bbf6d07f503a6053d1acc0618190289", "score": "0.6808986", "text": "public function edit($id)\n\t{\n\t\t$form_field = FormField::findOrFail($id);\n $forms = Form::all();\n $inputs = InputType::getInputTypeList();\n\t\treturn view('form_fields.edit', compact('form_field','forms','inputs'));\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "473907cd032774e632ea528635229c87", "score": "0.6778619", "text": "public function edit($id)\n {\n // Get the resource\n $object = $this->api()->show($id);\n\n // Get the form options\n $options = method_exists($this, 'formOptions') ? $this->formOptions($object) : [$this->package => $object];\n\n // Render edit view\n return $this->modal('edit', $options);\n }", "title": "" }, { "docid": "d6495d04a5e03f110ae6c217d9781bb9", "score": "0.6769503", "text": "public function editAction()\n {\n $entity = $this->getUser();\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('ObjectsKarasBundle:Contact:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "443a24b8da09b0254ac060ac7ebcd487", "score": "0.67667174", "text": "public function EditForm() {\n\t\treturn $this()->formForModel(self::ActionName);\n\t}", "title": "" }, { "docid": "8ca6a3fffdb80c62aabbae4f640f1300", "score": "0.6762604", "text": "public function edit()\n {\n return view('mobileapi::edit');\n }", "title": "" }, { "docid": "2001fffae750ada7415691f3d6806e42", "score": "0.67607874", "text": "public function edit($id)\n {\n return view(\"front/employee/edit\");\n }", "title": "" }, { "docid": "42e7fe6b6312ec2fd12370e91e58bba7", "score": "0.67601913", "text": "public function edit()\n {\n return view('fepage::edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "21678750d7f108aafc004364ba1a5179", "score": "0.6744123", "text": "public function edit($id, Request $oRequest)\n {\n $oItem = $this->oRepository\n ->getFillFromView($this->sPath.'/form')\n ->find($id);\n \n $sPageTitle = $this->sName;\n \n $aRepositories = Dataflow::getRepositories();\n \n return view($this->sPath.'/form', compact('oItem','sPageTitle', 'aRepositories'));\n }", "title": "" }, { "docid": "fba9cdde4084bf4830e5a2ea66fabfc3", "score": "0.6742783", "text": "public function edit($resource, $id)\n {\n $model = CRMConfigHelper::getModel($resource);\n $isColor = $model->isColor || false;\n $lists = $model->all();\n $data = $model->find($id);\n return view('crm::config.index', compact('resource', 'lists', 'data', 'isColor'));\n }", "title": "" }, { "docid": "595bca04db144887247b5ddae1c28ad1", "score": "0.6738425", "text": "public function edit($id)\n {\n $form = Form::find($id);\n return view('admin.editForm', compact('form'));\n }", "title": "" }, { "docid": "ef5010f7c6f6d428af2acec52a7d8840", "score": "0.673721", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_enquete_opcao\n\t\t$fbf_enquete_opcao = FbfEnqueteOpcao::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_enquete_opcao\n\t\t$this->layout->content = View::make('fbf_enquete_opcao.edit')\n->with('fbf_enquete_opcao', $fbf_enquete_opcao);\n\t}", "title": "" }, { "docid": "3283f390a233a9c8e1fdb85b649e4532", "score": "0.6729257", "text": "public function editAction()\n\t{\n\t\t$id = $this->request->get('id');\n\n\t\t// get the user from the database\n\t\t$user = Users::findFirst($id);\n\n\t\t// validate no fields are empty\n\t\tif(empty($user)) {\n\t\t\tdie(\"The user selected does not exist\");\n\t\t}\n\n\t\t// send data to the view\n\t\t$this->view->user = $user;\n\t}", "title": "" }, { "docid": "001dd3f38242708d4c2962fb34afcaae", "score": "0.6728129", "text": "public function edit($id)\n {\n // if(!auth()->user()->can('edit-'.$module) && !auth()->user()->hasAnyRole('SuperAdmin|Admin')){\n // abort(403);\n // }\n $model = $this->model;\n if(null == $options =json_decode($model->options)){\n $options = [];\n }\n\n $resource = $this->get_resource_with_relations($id);\n\n return view('admin-panel::shop.'.$this->module.'.create_edit', [ \n 'resource' => $resource, \n 'module' => $this->module, \n 'options' => ['slug', 'ckeditor', 'languages', 'thumbnail'],\n 'additional_options' => [\n // [\n // 'type' => 'editor',\n // 'label' => 'Short Description',\n // 'name' => 'short_description',\n // 'location' => 'default',\n // ],\n [\n 'type' => 'image',\n 'label' => 'Logo',\n 'name' => 'logo',\n 'location' => 'righ-sidebar'\n ]\n ],\n 'languages' => $this->languages, \n 'order' => isset($resource) ? $resource->order : $this->CRUD->getMaxOrderNumber(),\n ]);\n }", "title": "" }, { "docid": "0c8ed2ee69abf13db25af738101ab386", "score": "0.6722425", "text": "public function edit($id)\n {\n $this->data['product'] = Product::findOrFail($id);\n $this->data['categories'] = Category::arrayForSelect();\n $this->data['mode'] = 'edit';\n $this->data['headline'] = 'Update Product Information';\n\n return view('products.form', $this->data);\n }", "title": "" }, { "docid": "637fbe7fc2e9d34d1cb401f6515c23ae", "score": "0.6707887", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view(\"{$this->view}.form\", compact('model'));\n }", "title": "" }, { "docid": "8114d9dc60ee481ddec4f3eee676caa9", "score": "0.67022294", "text": "public function edit($modelInstance)\n {\n //Retrieve the model instance\n $modelInstance = Otter::getModelInstance($modelInstance, $this->modelName, $this->resourceRouteKeyName);\n //Retrieve all the otter resource names that are available\n $allResourceNames = $this->allResourceNames;\n $prettyResourceName = $this->prettyResourceName;\n $resourceName = $this->resourceName;\n $resource = $this->resource;\n $resourceFields = json_encode($resource::fields());\n $resourceId = $modelInstance->{$modelInstance->getRouteKeyName()};\n $relationalFields = json_encode(Otter::getRelationalFields($resource, $modelInstance));\n\n $validationRules = ($resource::validations() && $resource::validations()['client'] && $resource::validations()['client']['update']) ? $resource::validations()['client']['update'] : null;\n $validationFields = json_encode($validationRules);\n\n return view('otter::pages.edit', compact('allResourceNames', 'prettyResourceName', 'resourceId', 'resourceName', 'resourceFields', 'relationalFields', 'validationFields'));\n }", "title": "" }, { "docid": "eb05ed4b194d950755a7fbf5ca2e5f0c", "score": "0.67013955", "text": "public function edit()\n {\n return view('mgtrafico::edit');\n }", "title": "" }, { "docid": "c7ffdd26e9089a22d4871a4030407d80", "score": "0.66876835", "text": "public function edit()\n {\n return view('mgproyectosproductor::edit');\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.66855204", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "09281d67cb4365afcde07c8a8c05582d", "score": "0.668469", "text": "public function edit($id)\n {\n //\n if(!Gate::allows('isEmployee') && !Gate::allows('isAdmin'))\n {\n abort(404,\"soory\");\n }\n\n $sponserform = Sponserform::find($id);\n \n \n //return the view ans pass in the variable\n //dd($id);\n return view('sponserforms.edit')->withSponserform($sponserform);\n }", "title": "" }, { "docid": "3a01012946e59416d948f2e41720412b", "score": "0.66846806", "text": "public function edit()\n {\n return view('wahana::edit');\n }", "title": "" }, { "docid": "2d91be15ec2cb984fbc95cca2d3f2c8e", "score": "0.6673119", "text": "public static function edit()\n {\n\n $templateName = 'edit';\n $templateVars = [\"isSubmitted\" => !empty($_POST[self::getEntityClass()])];\n\n if ($templateVars[\"isSubmitted\"]) { // if we arrived here by way of the submit button in the edit view\n $entity = self::getEntity();\n EntityUtil::setFromArray($entity, $_POST[self::getEntityClass()]);\n\n if (self::getEntity()->isValid()) {\n $templateName = null; // null template will redirect to default action\n } else {\n $templateVars[\"errors\"] = self::getEntity()->getErrors();\n }\n }\n\n // template remains \"edit\" if no POST user parameters, or if user parameters in POST are invalid\n self::render($templateName, $templateVars);\n }", "title": "" }, { "docid": "269ffc48bd221192472c5da183031582", "score": "0.66713", "text": "public function editAction(Question $question) {\n\t\t$this->view->assign('question', $question);\n\t}", "title": "" }, { "docid": "d58aeddc51a32d8c85adcbf8fc206a39", "score": "0.66662043", "text": "public function editAction($id)\n {\n $this->initializeScaffolding();\n\n $this->beforeRead();\n $this->view->record = $this->scaffolding->doRead($id);\n $this->afterRead();\n\n $this->beforeEdit();\n $this->view->form = $this->scaffolding->getForm($this->view->record);\n $this->afterEdit();\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "f564301fc41fe27ab49da6b7c3dd6bea", "score": "0.66622895", "text": "public function edit($id){\n $product = Product::find($id);\n\n //load form view\n return view('products.edit', ['product' => $product]);\n }", "title": "" }, { "docid": "9bbc99aca2aa030dd44476fbe3540b28", "score": "0.66615427", "text": "public function edit($id)\n {\n $metadata = Metadata::find($id);\n $source = $this->source();\n $category = $this->category();\n $subcategory = $this->subcategory();\n $subject = $this->subject();\n $record = $this->record();\n $media = $this->media();\n $language = $this->language();\n $location = $this->location();\n return view('website.form', compact('metadata', 'source', 'category', 'subcategory', 'subject', 'record', 'media', 'language', 'location'));\n }", "title": "" }, { "docid": "1d05f8aa41e8f09497a449a4c46adc6b", "score": "0.66520095", "text": "public function edit($id)\n {\n $data = Form::find($id);\n return View('edit',compact('data'));\n }", "title": "" }, { "docid": "008b71c2b4f88bc4f5b81d1ab75bfb19", "score": "0.6641717", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AreasBundle:Reactivos')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Reactivos entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AreasBundle:Reactivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f4bffb1a26d526c70f624cd8ee655531", "score": "0.66296065", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FormBundle:Formations')->find($id);\n\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Formations entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('FormBundle:Formations:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "e7cc901cf8767e9c3d3e64b75713843f", "score": "0.66294926", "text": "public function frontEdit($id)\n {\n $resource = Resource::findOrFail($id);\n $countries = Countries::all();\n $cities = City::orderby('name')->get();\n $categories = Category::with('subCategories')->whereParentId(0)->orderby('name')->get();\n $isEdit = true;\n\n return view('frontend.resources.edit', compact(\n 'resource', 'countries', 'cities', 'categories', 'isEdit'\n ));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "a674d7a119925eea9e883dc29ae826c4", "score": "0.66260767", "text": "public function show($id)\n {\n $this->authorize('view', $this->resource->getModel());\n\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['data'] = $this->resource->findById($id);\n $this->data['routeUrl'] = route($this->module->getName().'.update', $id);\n\n return view('vellum::form', $this->data);\n }", "title": "" }, { "docid": "6d258b4e5796ae72422c103b9cfeea0a", "score": "0.6624084", "text": "public function edit($id)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\treturn view('resources.edit')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "1ca9fd6ddbbabc198259116a33d90512", "score": "0.66192096", "text": "public function editForm()\n {\n $trader = App::get('database')->select('users', 'id', $_GET['id']);\n return view('traders.edit', compact('trader'));\n }", "title": "" }, { "docid": "3c0278ba2842e73f7154906855c3a6d3", "score": "0.6619196", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$Empresas = Empresas::find($id);\n\t\treturn\\View::make('EMPRESAS/UpdateEmpresas',compact('Empresas'));\n\n\t}", "title": "" }, { "docid": "89950828e722c727dfc18a4d54701a6a", "score": "0.6618409", "text": "public function edit($id) {\n $viewData = $this->getDefaultViewData();\n\n $viewData[\"equipment\"] = Equipment::find($id);\n $viewData[\"mode\"] = \"edit\";\n\n return view(\"pages.equipments.form\", $viewData);\n }", "title": "" }, { "docid": "6089f3b15fb30da8161f0e824d5ef80d", "score": "0.6609523", "text": "public function edit($id)\n {\n // Get the employee\n $employee = Employee::findOrFail($id);\n\n // View\n return view('admin/employee/edit', [\n 'employee' => $employee\n ]);\n }", "title": "" }, { "docid": "bf327f0deebd5c98011f095a58a3e3d7", "score": "0.66089773", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('task.form');\n\t\t$form->task = Task::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\TaskController@update', $form->task->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "2c37007f9d48092fc6a698887b6348d0", "score": "0.6607414", "text": "public function editForm ()\n {\n /**\n * Ist ein User eingeloggt?\n */\n if (User::isLoggedIn()) {\n /**\n * Eingeloggten User aus der Datenbank abfragen.\n */\n $user = User::getLoggedInUser();\n\n /**\n * View laden und User übergeben.\n */\n View::load('account-edit', [\n 'user' => $user\n ]);\n } else {\n /**\n * Ist kein User eingeloggt, leiten wir auf den Login weiter.\n */\n header(\"Location: login\");\n }\n }", "title": "" }, { "docid": "0bd8987bba756d36c76437f581237452", "score": "0.6607211", "text": "public function editAction()\r\n {\r\n $this->redirectPlugin()->redirectToLogout();\r\n $id = $this->params()->fromRoute('sess', NULL);\r\n $em = $this->entityManager;\r\n if ($id == NULL) {\r\n $this->redirect()->toRoute('offer/default', array(\r\n 'action' => 'view-all'\r\n ));\r\n }\r\n $id = \\strip_tags($id);\r\n $offerInfoForm = NULL;\r\n $offerPremiumForm = NULL;\r\n $offerObjetForm = NULL;\r\n $OfferInfo = $em->find('Offer\\Entity\\Offer', $id);\r\n // $offerInfoForm->bind($OfferInfo);\r\n $userInfo = $this->identity();\r\n \r\n $view = new ViewModel(array(\r\n 'offerInfo' => $OfferInfo,\r\n 'userInfo' => $userInfo\r\n ));\r\n \r\n return $view;\r\n }", "title": "" }, { "docid": "b7de458feabfdbd5872a54ecaa070f4c", "score": "0.6604974", "text": "public function edit($id)\n {\n $employee = EmployeeManagement::find($id);\n return view('EmployeeManagement::edit')->with(['employee' => $employee]);\n }", "title": "" }, { "docid": "dfbae1c76e8376876e167bfdda34a588", "score": "0.66006404", "text": "public function edit($entity);", "title": "" }, { "docid": "b24ebc55abfc21b1300f6153dbc6f292", "score": "0.6599799", "text": "public function edit($id)\n\t{\n\t\t$data = $this->getModel()->find($id);\n\t\treturn view($this->path.'.edit', ['data' => $data]);\n\t}", "title": "" }, { "docid": "019074af2cef1b756dc42a7596b8ecb8", "score": "0.65966266", "text": "public function edit(Person $person)\n\t{\n\t\treturn view('admin.people.form', ['person' => $person]);\n\t}", "title": "" }, { "docid": "bc783a8d888232c3357e49ff894937dd", "score": "0.6593036", "text": "public function edit($id)\n {\n $consultorio = Consultorio::find($id);\n return view('admin.consultorios.edit')->with('consultorio', $consultorio);\n }", "title": "" }, { "docid": "876276aa312111f9e43f28258cc4a178", "score": "0.65904295", "text": "public function edit($id)\n {\n return view('update');\n }", "title": "" }, { "docid": "645e2c6f1254ac9ce28e10a3140607e8", "score": "0.65895754", "text": "public function edit($id) {\n $item = Employee::find($id);\n return view('admin/employees/update')->with(['item' => $item]); \n }", "title": "" }, { "docid": "ced00a3017255bbcbba274e84e79e0e1", "score": "0.6589034", "text": "function editRecord() {\n\t\t$this->checkPermission();\n\t\t$this->loadRecord();\n\t\treturn $this->getEditForm();\n\t}", "title": "" }, { "docid": "148f2b795f1a0e6fbe96ee1b1579717f", "score": "0.6588934", "text": "public function edit()\n {\n // return view('api::edit');\n }", "title": "" }, { "docid": "28ae32f996d436e7cae8c79ced9fa5f4", "score": "0.65878385", "text": "public function edit($formID) {\n $form = Form::findOrFail($formID,['id','title','questions']);\n return view('create',compact('form'));\n }", "title": "" }, { "docid": "2e49b594eaa39cc083c2b2d9105a18a7", "score": "0.6584271", "text": "public function editAction()\r\n {\r\n $objectManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\r\n\r\n // Create the form and inject the ObjectManager\r\n $form = new $this->formEdit($objectManager);\r\n\r\n // Create a new, empty entity and bind it to the form\r\n $repository = $this->getEm()->getRepository($this->entity);\r\n $id = $this->params()->fromRoute('id', 0);\r\n\r\n $entity = $repository->find($id);\r\n\r\n $form->bind($entity);\r\n\r\n $request = $this->getRequest();\r\n\r\n if ($request->isPost()) {\r\n\r\n $form->setData($request->getPost());\r\n\r\n if ($form->isValid()) {\r\n\r\n $service = $this->getServiceLocator()->get($this->service);\r\n $service->update($entity);\r\n\r\n $this->flashMessenger()->setNamespace('Tenil')->addSuccessMessage('Atualizado com sucesso!');\r\n\r\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller, 'action' => 'edit', 'id' => $id ));\r\n }\r\n }\r\n\r\n return new ViewModel(array('form' => $form));\r\n\r\n }", "title": "" }, { "docid": "a43a0eba451e269dc212e1398a18e1d4", "score": "0.6581375", "text": "public function edit($id)\n\t{\n\t\t$specialization = Specialization::find($id);\n\t \n\t \n\t\treturn view('admin.specialization.edit', compact('specialization'));\n\t}", "title": "" }, { "docid": "db98a716aa6be23df73999f55c3166b2", "score": "0.65789884", "text": "public function edit($id)\n {\n //\n $infor = Information::find($id);\n return view('admin.infor.edit', compact('infor'));\n }", "title": "" }, { "docid": "50dbef337fda507081f20e53f9045886", "score": "0.65770215", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('TopGamesBundle:Plataforma')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Plataforma entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('TopGamesBundle:Plataforma:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1458051dfc97d0a20c103d39be5d2324", "score": "0.65739626", "text": "public function edit()\n {\n return view('website::edit');\n }", "title": "" }, { "docid": "1a75786a7e2eadb5eb40fa30d9a98768", "score": "0.6573916", "text": "public function edit($id)\n {\n return view('enquirymanager::edit');\n }", "title": "" }, { "docid": "22f1fcbffb0684b40a93604cf8cd30a5", "score": "0.656882", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n $formMethod = 'PATCH';\n $formRoute = ['news.update',$model->id];\n return view($this->view.'form',[\n 'model'=>$model,\n 'formMethod'=>$formMethod,\n 'formRoute'=>$formRoute,\n ]);\n }", "title": "" }, { "docid": "67eababb666f337f38209bfc208267d6", "score": "0.6568242", "text": "public function edit($id)\n {\n $this->authorize(__FUNCTION__);\n\n $specie = Specie::find($id);\n\n return view('species.form')->with(['specie' => $specie]);\n }", "title": "" }, { "docid": "2c9bd3ce4e86603f0963a10ed0087fe1", "score": "0.65671444", "text": "public function edit($id)\n {\n $role = $this->role_model->findOrFail($id);\n $data = [\n 'title' => \"Role Form\",\n 'method' => \"PUT\",\n 'role' => $role\n ];\n return view('admin.role.role_form', $data);\n }", "title": "" }, { "docid": "39a2aa07572165164181b1e275b08f5c", "score": "0.65579695", "text": "public function edit(InstanceFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "fd5bf8e7777e72f95481869ab3143c03", "score": "0.65569633", "text": "public function edit($id)\n\t{\n\t\t// get the autor\n\t\t$autor = Autor::find($id);\n\n\t\t// show the edit form and pass the autor\n\t\t$this->layout->content = View::make('autor.edit')\n\t\t\t->with('autor', $autor);\n\t}", "title": "" }, { "docid": "92a9dd66c4fe3f411f884f62eaa039c8", "score": "0.6552419", "text": "public function edit($id)\n\t{\n\t\t$company = Company::find($id);\n\t \n\t \n\t\treturn view('admin.company.edit', compact('company'));\n\t}", "title": "" }, { "docid": "b2253141b6b8bfb4cd1e7d881bde781f", "score": "0.6548214", "text": "public function edit($id)\n {\n return view('installer::edit');\n }", "title": "" }, { "docid": "52d1a92c9ab22807eff7e836435b8795", "score": "0.6546999", "text": "public function edit($id)\n {\n $product = $this->products->findOrFail($id);\n\n return view('admin.products.form',compact('product'));\n }", "title": "" }, { "docid": "56a3247a313557a3b9e0c9473676be1b", "score": "0.65466416", "text": "public function edit()\r\r {\r\r $this->page_title->push(lang('outlet_edit'));\r\r $this->data['pagetitle'] = $this->page_title->show();\r\r\r /* Breadcrumbs :: Common */\r\r $this->breadcrumbs->unshift(1, lang('outlet_edit'), 'admin/client/company/outlet/edit');\r\r\r /* Breadcrumbs */\r\r $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\r\r /* Data */\r\r $this->data['error'] = NULL;\r\r $this->data['charset'] = 'utf-8';\r\r $this->data['form_url'] = 'admin/client/company/outlet/update';\r\r\r /* Load Template */\r\r $this->template->admin_render('admin/companies/outlets/edit', $this->data);\r\r\r }", "title": "" }, { "docid": "979ed1c77f9a8a6cd0408a320f9f8224", "score": "0.6544806", "text": "public function edit($id)\n {\n $form = Form::where('id',$id)->first();\n $job = Job::where('id',$form->job_id)->first();\n $this->authorize('edit', $form);\n\n if($form)\n return view('appl.recruit.form.createedit')\n ->with('stub','Update')\n ->with('job',$job)\n ->with('recaptcha',true)\n ->with('form',$form);\n else\n abort(404);\n }", "title": "" } ]
920c22cfeaae5abf30fca46da26be274
This function will find out all closing information of daily closing.
[ { "docid": "eec1f24f8dd99a3849b5983baaac0ed7", "score": "0.61470455", "text": "public function accounts_closing_data() {\n $last_closing_amount = $this->get_last_closing_amount();\n $cash_in = $this->cash_data_receipt();\n $cash_out = $this->cash_data();\n if ($last_closing_amount != null) {\n $last_closing_amount = $last_closing_amount[0]['amount'];\n $cash_in_hand = ($last_closing_amount+$cash_in) - $cash_out;\n } else {\n $last_closing_amount = 0;\n $cash_in_hand = $cash_in - $cash_out;\n }\n\n $company_info = $this->Reports->retrieve_company();\n return array(\n \"last_day_closing\" => number_format($last_closing_amount, 2, '.', ','),\n \"cash_in\" => number_format($cash_in, 2, '.', ','),\n \"cash_out\" => number_format($cash_out, 2, '.', ','),\n \"company_info\" => $company_info,\n \"cash_in_hand\" => number_format($cash_in_hand, 2, '.', ',')\n );\n }", "title": "" } ]
[ { "docid": "b18bfce5b388f6509288e2e0b9c2574c", "score": "0.5996685", "text": "public function getCloseDate() {\r\n return inship_fedexship_get($this->handle, 2 );\r\n }", "title": "" }, { "docid": "258e97dd7d089437a2291d543dfe0c9d", "score": "0.5873773", "text": "public function date_wise_closing_reports() {\n $from_date = $this->input->post('from_date');\n $to_date = $this->input->post('to_date');\n\n $content = $this->laccounts->get_date_wise_closing_reports($from_date, $to_date);\n\n $this->template->full_admin_html_view($content);\n }", "title": "" }, { "docid": "f9577e82a38431c7c5ae6cae73731e4c", "score": "0.57860184", "text": "function calculateEverything($symbolSpecificData,$noOfDays){\n\t$closingPrices50 = array();\n\t$volumes = array();\n\t$candleHeight = array();\n\t$candleBody = array();\n\t$change=array();\n\t$percentageChange=array();\n\t$closingPrices20 = array();\n\t$count=0;\n\tforeach($symbolSpecificData as $data){\n\t\t$closingPrices50[] = $data['close'];\n\t\t$volumes[] = $data['volume'];\n\t\t$candleBodies[] = abs($data['close']-$data['open']);\n\t\t$candleHeights[] =abs($data['high']-$data['low']);\n\t\t$change = ($data['close']-$data['prevclose']);\n\t\tif($count>=30){\n\t\t\t$closingPrices20[]= $data['close'];\n\t\t}\n\t\t$count++;\n\t\t$symbol=$data['symbol'];\n\t\t$timestamp=$data['timestamp'];\n\t\t$open=$data['open'];\n\t\t$high=$data['high'];\n\t\t$low=$data['low'];\n\t\t$close=$data['close'];\n\t\t$prevclose=$data['prevclose'];\n\t\t$volume=$data['volume'];\n\t\t$candleBody=abs($data['close']-$data['open']);\n\t\t$candleHeight=abs($data['high']-$data['low']);\n\t}\n\t$change=round($symbolSpecificData[$noOfDays-1]['close']-$symbolSpecificData[$noOfDays-1]['prevclose'],2);\n\t$changePercent=calculateChangePercent($symbolSpecificData[$noOfDays-1]['close'],$symbolSpecificData[$noOfDays-1]['prevclose']);\n\t$ma20= calculateAverage($closingPrices20);\n\t$ma50= calculateAverage($closingPrices50);\n\t$avgVol= calculateAverage($volumes);\n\t$avgCandleBody=calculateAverage($candleBodies);\n\t$avgCandleHeight=calculateAverage($candleHeights);\n\t//echo(\"SYMBOL=$symbol, timestamp=$timestamp, Close=$close,candleBody=$candleBody,candleHeight=$candleHeight, avgVol=$avgVol , avgCandleHeight=$avgCandleHeight , avgCandleBody=$avgCandleBody ,MA50=$ma50, MA20=$ma20,Change=$change, ChangePercent= $changePercent\");\n\treturn array('symbol' => $symbol,\n\t\t\t'timestamp' => $timestamp,\n\t\t\t'open' => $open,\n\t\t\t'high' => $high,\n\t\t\t'low' => $low,\n\t\t\t'close' => $close,\n\t\t\t'prevclose' => $prevclose,\n\t\t\t'volume' => $volume,\n\t\t\t'candleBody' => $candleBody,\n\t\t\t'candleHeight' => $candleHeight,\n\t\t\t'change'=>$change,\n\t\t\t'changePercent'=>$changePercent,\n\t\t\t'avgVol'=>$avgVol,\n\t\t\t'ma20'=>$ma20,\n\t\t\t'ma50'=>$ma50,\t\n\t\t\t'avgCandleBody'=>$avgCandleBody,\n\t\t\t'avgCandleHeight'=>$avgCandleHeight\n\t\t\t);\n\t}", "title": "" }, { "docid": "d087efdcfc88e3bd796f72a0a93d73dd", "score": "0.5682507", "text": "public function days()\n\t{\n\t\t$list=array();\n\t\t$month = date(\"m\");\n\t\t$year = date(\"Y\");\n\n\t\tfor($d=1; $d<=31; $d++)\n\t\t{\n\t\t $time=mktime(12, 0, 0, $month, $d, $year); \n\t\t if (date('m', $time)==$month) \n\t\t $list[]=date('Y-m-d', $time);\n\t\t}\n\t\techo \"<pre>\";\n\t\tprint_r($list);\n\t\techo \"</pre>\";\n\n\n\t\t// use below qry in loop\n\t\t// SELECT CAST( SUM( CASE \n\t\t // WHEN (ROUND(o.total_amount)) < o.total_amount \n\t\t // THEN ROUND(o.total_amount) - o.total_amount\n\t\t // WHEN (ROUND(o.total_amount)) > o.total_amount\n\t\t // THEN CONCAT(\"+\", ROUND(o.total_amount) - o.total_amount) \n\t\t // WHEN (ROUND(o.total_amount)) = o.total_amount\n\t\t // THEN ROUND(o.total_amount) - o.total_amount\n\t\t // END ) AS DECIMAL(10,2) ) AS roundoff_value,\n\t\t // SUM((o.sub_total * o.discount_amount/100)) AS discount, \n\t\t // SUM(o.total_amount) AS bill_amount, \n\t\t // SUM(ROUND(o.total_amount)) AS roundoff,\n\t\t // (SELECT SUM(otx.tax_percent) FROM order_detail sod LEFT JOIN order_tax otx ON (sod.order_id = otx.order_id) WHERE sod.order_id=o.order_id ) AS totalTax\n\t\t // FROM order_detail o \n\t\t // LEFT JOIN branch b ON b.branch_id = o.branch_id\n\t\t // WHERE ( o.order_date_time >= '2016-10-26 00:00:00' AND o.order_date_time <= '2016-10-26 23:59:59' )\n\t\t // GROUP BY DATE(o.order_date_time)\n\t}", "title": "" }, { "docid": "1d57930ff48815d197a38ef5fdfae203", "score": "0.5664105", "text": "public function closeDay()\n\t{\n\t\t$args = [\n\t\t\t'command' => 'b',\n\t\t];\n\n\t\treturn parent::closeDay($args);\n\t}", "title": "" }, { "docid": "dba0fc7bfa4ce9f952968b2bb3989229", "score": "0.56581116", "text": "public function index()\n {\n $dates = CloseDay::get();\n return view('admin.close.index', compact('dates'));\n }", "title": "" }, { "docid": "ed726dacd1acc082235f6014ec0bc946", "score": "0.56124634", "text": "protected function todaysSquares() {\n if (array_key_exists($this->current->format(\"Y-m-d\"), $this->holiday[0])) {\n $this->calendar[$this->z]['class'] = 'item holiday';\n $this->calendar[$this->z]['date'] = $this->current->format(\"j\");\n } else {\n $this->calendar[$this->z]['class'] = 'item date';\n $this->calendar[$this->z]['date'] = $this->current->format(\"j\");\n }\n }", "title": "" }, { "docid": "8bb6a47733fe1aef2393c12932708fed", "score": "0.5583879", "text": "public function index(Request $req)\n {\n //\n\n\n $today= date(\"Y-m-d\", time());\n $c_=Company::find($req->id);\n $c_name=$c_->name;\n\n global $open1;\n global $close1;\n global $open2;\n global $close2;\n\n $d1=DB::table('stocks')->where([['date',$today],['comp_id',$req->id]])->get();\n\n foreach ($d1 as $data) {\n $open1=$data->open;\n $close1=$data->close;\n\n } \n \n\n \n $yday = date('Y.m.d',strtotime(\"-1 days\"));\n $nday =date('Y.m.d',strtotime(\"+1 days\"));\n $aweek =date('Y.m.d',strtotime(\"+7 days\"));\n $d2=DB::table('stocks')->where([['date',$yday],['comp_id',$req->id]])->get();\n \n foreach ($d2 as $ydata) {\n $open2=$ydata->open;\n $close2=$ydata->close;\n\n } \n \n //# starting open Section Cal \n\n if($open1!=\"\"){\n $p_open=$open1/$open2;\n $open_p=($p_open-1)*100;\n\n\n $open_sum=$open1+$open2;\n\n $f_open=$open1*(1+(0.01*1));\n $open_per=($f_open/$open_sum)*100;\n \n $w_open=$open1*(1+(0.01*7));\n\n\n\n //#end Opening section cal \n\n //close Section\n $pclose=$close1/$close2;\n\n\n $yclose=$close2/$open2;\n $ypl1_value=($yclose-1)*100;\n $yp_sum=$close2+$open2;\n $yph1_value=($ypl1_value/$yp_sum)*100;\n $yph_value=round($yph1_value, 3);\n $ypl_value=round($ypl1_value,3); \n\n\n $nclose=$close1/$open1;\n $npl1_value=($nclose-1)*100;\n $np_sum=$close1+$open1;\n $nph1_value=($npl1_value/$np_sum)*100;\n $nph_value=round($nph1_value,3);\n $npl_value=round($npl1_value,3);\n\n $pvalue=($pclose-1)*100;\n\n\n $f_close=$close1*(1+(0.01*1));\n $w_close=$close1*(1+(0.01*7));\n $per_close=$close1+$close2;\n $pre_cl=($pvalue/$per_close)*100;\n\n $pre_ch=($f_close/$per_close)*100;\n $w_value=$w_close/$w_open;\n $wpl=($w_value-1)*100;\n $w_sum=$w_open+$w_close;\n $wph=($wpl/$w_sum)*100;\n $w_pl=round($wpl,3);\n $w_ph=round($wph,3);\n\n\n $preh_cl=round($pre_cl,3);\n $pl_value=round($pvalue,3);\n\n return view('users.pre',compact(['c_name','open1','open2','f_open','w_open','close1','close2','open_per','open_p','f_close','w_close','pre_cl','nday','today','yday','aweek','ypl_value','yph_value','nph_value','npl_value','preh_cl','pl_value','w_pl','w_ph','pre_ch']));\n }\n \n else{\n return back()->with('n_data','ss');\n }\n\n }", "title": "" }, { "docid": "1749a91c81dcc96ed2593ac0b1874456", "score": "0.5408552", "text": "public function getCloseTime() {\r\n return inship_fedexship_get($this->handle, 5 );\r\n }", "title": "" }, { "docid": "bd8bb3f85075a19788f513630380ac24", "score": "0.5385896", "text": "public function getrestaurantnextopencloseTime($restaurantData) {\n\t\t$closeDays = ($restaurantData->closeDays !='') ? explode(',',$restaurantData->closeDays): array();\n\t\tif(count($closeDays) >= 7 )\n\t\t\treturn \"00:00\";\n\t\t$today = strtolower(date('l'));\n\t\t/*Open Days*/\t\n\t\t// $day = ( $restaurantData->isRestaurantOpen == 1 ) ? $this->getNextOpenDays($closeDays, date('Y-m-d')) : $this->getNextOpenDays($closeDays, date('Y-m-d', strtotime('+1 days')));\n\t\t$day = $this->getNextOpenDays($closeDays, date('Y-m-d'));\t\n\t\t// echo($day); exit;\n\t\t$restaurantTime = $restaurantData->$day;\n\t\t$times = explode(' - ', $restaurantTime);\n $time0 = strtotime($times[0]); // 1:30\n $time1 = strtotime($times[1]); //1:00\n $time2 = strtotime(date('H:i')); // 3:30\n $result = array('day' => $day, 'isSame' => 1,'time' => strtotime('00:00'));\n\t\tif($day == $today) {\n\t\t\tif($time0 > $time1){\n\t if(($time2 <= $time1) || ($time2 >= $time0))\n\t \t$result['time'] = $time1;\n\t else\n\t \t$result['time'] = $time0;\n\n\t }else if($time0 < $time1){\n\t if($time0 <= $time2 && $time1 >= $time2 )\n\t $result['time'] = $time1;\n\t else if($time0 > $time2 )\n\t \t$result['time'] = $time0;\n\t else {\n\t \t$day = $this->getNextOpenDays($closeDays, date('Y-m-d', strtotime('+1 days')));\n\t \t$restaurantTime = $restaurantData->$day;\n\t\t\t\t\t$times = explode(' - ', $restaurantTime);\n\t\t\t $time0 = strtotime($times[0]);\n\t\t\t $time1 = strtotime($times[1]);\n\t\t\t $time2 = strtotime(date('H:i'));\n\t\t\t $result['time'] = $time0;\n\t }\n\t }\n\t\t}\n\t\telse {\n\t\t\t$result['time'] = $time0;\n\t\t\t$result['isSame'] = 0;\n\t\t} \n\t\t$result['time'] = date('H:i', $result['time']);\n\t\treturn $result;\n\t\t\t \n\t}", "title": "" }, { "docid": "57e9071ffa12a1f56896507cd51eb23c", "score": "0.5371644", "text": "public function closings()\n {\n return $this->belongsToMany('Closing');\n }", "title": "" }, { "docid": "e90a63905ba0da69e5fe2a08264e3ddb", "score": "0.5336551", "text": "function callsclosedinlastday($data) {\n\tglobal $DBH;\n\t$STH = $DBH->Prepare(\"SELECT COUNT(callID) AS count FROM calls WHERE closed >= DATE_SUB(CURDATE(),INTERVAL 1 DAY)\");\n\t$STH->setFetchMode(PDO::FETCH_OBJ);\n\t$STH->execute();\n\twhile($row = $STH->fetch()) {\n\t\t$data = $row->count;\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "4f94390f9d0368e62fdfdd612b15c789", "score": "0.5333937", "text": "public function findAdvertisementToClose() {\n\t\t$where = $this->select()\n\t\t->where(\"DATE(stop_date)<=?\", date(\"Y-m-d\"))\n\t\t->where(\"status=?\", PostStatus::ACTIVE);\n\t\treturn $this->fetchAll($where);\n\t}", "title": "" }, { "docid": "50b013a5be8b2ba09b34415a14d55d87", "score": "0.53190225", "text": "function getBuys( $date )\n{\n\n $sql = \"select stock, count(*), max(thedate), max(price) price from signals group by stock having count(*) = 3 and max(thedate) = '\" . $date . \"'\";\n $rows1 = mysql_query ( $sql );\n while ( $cols1 = mysql_fetch_array ( $rows1 ) )\n {\n // Get Funds That Track it\n\n $stock = $cols1['stock'];\n $price = $cols1['price'];\n $sql = \"select fund from fundstocks where stock = \" . $stock;\n $rows2 = mysql_query ( $sql );\n while ( $cols2 = mysql_fetch_array ( $rows2 ) )\n { \n $fund = $cols2['fund'];\n\n // Get Signal Dates & Prices\n\n $sql = \"select thedate, price from signals where stock = \" . $stock . \" order by thedate\";\n $rows = mysql_query ( $sql );\n\n $cols = mysql_fetch_array ( $rows );\n $s1date = $cols['thedate'];\n $s1price = $cols['price'];\n\n $cols = mysql_fetch_array ( $rows );\n $s2date = $cols['thedate'];\n $s2price = $cols['price'];\n\n // Get High120 & Low120\n\n $sql = \"select low120, high120 from prices where stock = \" . $stock . \" and thedate = '\" . $date . \"'\";\n $rows = mysql_query ( $sql );\n $cols = mysql_fetch_array ( $rows );\n $low120 = $cols['low120'];\n $high120 = $cols['high120'];\n $stop = $low120 + (($price - $low120) * 0.5); \n\n // Get Deposits\n\n $sql = \"select ifnull(sum(amount),0) deposits from deposits where fund = \" . $fund . \" and thedate < '\" . $date . \"'\";\n $rows = mysql_query ( $sql );\n $cols = mysql_fetch_array ( $rows );\n $deposits = $cols['deposits'];\n\n // Get Profits\n\n $sql = \"select ifnull(sum((amount / buyprice) * (sellprice - buyprice)),0) profit from trades where fund = \" . $fund . \" and selldate < '\" . $date . \"'\";\n $rows = mysql_query ( $sql );\n $cols = mysql_fetch_array ( $rows );\n $profit = $cols['profit'];\n\n // Get Gain & Holdings\n $sql = \"select ifnull(sum(t.amount),0) holdings, ifnull(sum((t.amount / t.buyprice) * (ifnull(t.sellprice,p.price) - t.buyprice) ),0) gain from trades t, prices p where t.stock = p.stock and p.thedate = '\" . $date . \"' and t.fund = \" . $fund . \" and ifnull(t.selldate,'\" . $date . \"') >= '\" . $date . \"'\";\n $rows = mysql_query ( $sql );\n $cols = mysql_fetch_array ( $rows );\n $holdings = $cols['holdings'];\n $gain = $cols['gain'];\n\n // Calculate Cash & Equity\n\n $cash = $deposits + $profit - $holdings;\n $equity = $deposits + $profit + $gain;\n $portfolio = $equity - $cash;\n\n // Get Fund Settings\n $risk = getorset( $fund, 'Percentage of Equity Risked Per Trade', '2' );\n $diversity = getorset( $fund, 'Number of Concurrent Open Positions', '15' );\n $maxprice = getorset( $fund, 'Maximum Price Per Share', '30' );\n\n\n \n // AMOUNT - Set Risk As Percentage Of Equity\n $amount = ((($equity) * ($risk / 100)) / ($price - $stop)) * $price;\n\n // AMOUNT - Adjust Amount To Achieve Diversity\n if ($amount > ($equity) * (1 / $diversity)) $amount = ($equity) * (1 / $diversity); \n \n // AMOUNT - Set Amount Bases On Available Cash\n if ($amount > $cash) $amount = $cash;\n\n // AMOUNT - Set Amount Bases On Available Cash\n if ($cash - $amount < 50) $amount = $cash;\n\n // AMOUNT - Cheap Stocks Only\n if ($maxprice != 0 && $price > $maxprice) $amount = 0;\n\n // AMOUNT - Out of money\n if ($amount < 50) $amount = 0;\n \n if ($amount > 0)\n {\n $sql = \"insert into trades ( fund, stock, s1date, s1price, s2date, s2price, buydate, buyprice, amount, stop ) values ( \" . $fund . \", \" . $stock . \", '\" . $s1date . \"', \" . $s1price . \", '\" . $s2date . \"', \" . $s2price . \", '\" . $date . \"', \" . $price . \", \" . $amount . \", \" . $stop . \" )\";\n if ( !mysql_query ( $sql ) ) return 0;\n }\n }\n }\n return 1;\n}", "title": "" }, { "docid": "37dc40c02a4672f64088de07d5883bea", "score": "0.5314326", "text": "protected function get_closed_tickets() {\n $query = \"SELECT * FROM client_address\n JOIN client_info USING(ticket_id)\n JOIN client_service USING(ticket_id)\n JOIN tickets USING(ticket_id)\n JOIN status USING(ticket_id) \n WHERE status = 'Closed' ORDER BY tickets.id DESC\";\n $conn = $this->connect();\n $stmt = $conn->prepare($query);\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "f5d89ee11630b501e57335bfec2b41bd", "score": "0.530871", "text": "public function businessHours()\n {\n $hours = \\DB::table('hours')\n ->where('venue_id', $this->id)\n ->whereIn('closed', [Hour::OPEN, Hour::CLOSED])\n ->get();\n\n $hours = Hour::convertToArray($hours);\n\n $hours['Closed'] = $this->closed_days;\n\n return $hours;\n }", "title": "" }, { "docid": "93f9b2416d473c38867ddd399c1fd914", "score": "0.5276284", "text": "function get_location_stock($params)\n {\n\t\t// var_dump($params);\n //var_dump( date(\"Y-m-d\",$params['opening_date']));\n //var_dump( date(\"Y-m-d\",$params['closing_date']));\n // $this->db->order_by('date', 'desc');\n // return $this->db->get_where('stock',array('location_id'=>$location_id))->result_array();\n\t\t$this->db->where('(date >= \"'. $params['opening_date'] . '\" and date <= \"'. $params['closing_date'] .'\" )and location_id='. $params['location_id']);\n\t\treturn $this->db->get('stock')->result_array();\n }", "title": "" }, { "docid": "3f5272193ef305d6af2832b38144c74b", "score": "0.5256572", "text": "function get_all_stock($params)\n {\n // $this->db->order_by('location_id', 'desc');\n // return $this->db->get('stock')->result_array();\n\t\t$this->db->where('(date >= \"'. $params['opening_date'] . '\" and date <= \"'. $params['closing_date'] .'\" )and location_id='. $params['location_id']);\n\t\treturn $this->db->get('stock')->result_array();\n }", "title": "" }, { "docid": "eea2e6cce390d1b7c014a47fe858599f", "score": "0.5250897", "text": "private function getDays()\n {\n $day_num = 1;\n $day_count = $this->firstDayNum + 1;\n $day_events = [];\n $dt = new \\DateTime();\n $dt->setTimeZone(new \\DateTimeZone(Craft::$app->getTimeZone()));\n $today = $dt->format('Ymd');\n while($day_num <= $this->days_in_month)\n {\n $day_obj = [];\n\n if(($this->month < 10) && ($day_num < 10)){\n $day_id = $this->year. 0 .$this->month. 0 .$day_num;\n }elseif(($this->month < 10)){\n $day_id = $this->year. 0 .$this->month.$day_num;\n }elseif(($day_num < 10)){\n $day_id = $this->year.$this->month. 0 .$day_num;\n }else{\n $day_id = $this->year.$this->month.$day_num;\n }\n\n $day_obj[\"day\"] = $day_num;\n $day_obj[\"today\"] = $today == $day_id ? true : false;\n $time = strtotime($this->month.\"/\".$day_num.\"/\".$this->year);\n $day_obj[\"date\"] = new DateTime(date(\"Y-m-d\",$time),new \\DateTimeZone(Craft::$app->getTimeZone()));\n $day_obj[\"events\"] = $this->array_msort($this->eventsGroupedByDay[$day_id]['events'], array('dateString'=>SORT_ASC));\n array_push($day_events, $day_obj);\n\n $day_num++;\n $day_count++;\n\n if($day_count > 7)\n {\n $day_count = 1;\n }\n }\n return $day_events;\n }", "title": "" }, { "docid": "099ff2bf9b9e5fd35722596fa9f1fbae", "score": "0.5238452", "text": "public function getAverageOpenTime() {\n // Move this to a command and cache the result.\n\n $issues = $this->findAll();\n $curDate = new \\DateTime('+1 day');\n $date = new \\DateTime('-2 weeks');\n $data = array();\n while($date < $curDate) {\n $key = $date->format('Y-m-d');\n $data[$key] = array();\n\n foreach($issues as $issue) {\n $closed = $issue->getClosedAt();\n $created = $issue->getCreatedAt();\n\n if($issue->wasOpenOn($date)) {\n $data[$key][] = $issue;\n }\n }\n\n $date->modify('+1 day');\n }\n\n foreach($data as $date => $issues) {\n $averageOpenTime = 0;\n if(count($issues) > 0) {\n $data[$date] = array('time' => 0, 'count' => 0);\n foreach($issues as $issue) {\n $closed = $issue->getClosedAt();\n $created = $issue->getCreatedAt();\n if(!$created) {\n continue;\n }\n\n if(!($closed instanceof \\DateTime)) {\n $closed = new \\DateTime();\n }\n\n $averageOpenTime += $closed->getTimestamp() - $created->getTimestamp();\n }\n $averageOpenTime = ($averageOpenTime / count($issues));\n }\n\n $data[$date] = array('time' => $averageOpenTime, 'count' => count($issues));\n }\n\n return $data;\n }", "title": "" }, { "docid": "c8f2c125d5c9012eeebaa2989a3a088f", "score": "0.52372307", "text": "public function getHistory(array $stocksToUpdate)\n {\n $yesterday = new \\DateTime('yesterday', new \\DateTimeZone('America/New_York'));\n\n $startDate = min($stocksToUpdate); //Gotta know the earliest date\n\n $data = [];\n /* We gonna be effective. There is no data on Yahoo API max results, but we assume it's around ~170,\n so we gonna split big intervals into smaller ones. For multiple quotes we gonna check their start dates and\n only query the data we really need.\n */\n do {\n $endDate = clone $startDate;\n if ($startDate->diff($yesterday)->days > $this->maxDays) {\n //Too many days - split! Btw, trades only happen on workdays so we take 200 calendar days\n $endDate->modify($this->maxDays.' days');\n } else {\n $endDate = $yesterday; //Time to finish this\n }\n\n $stocksToFetch = [];\n foreach ($stocksToUpdate as $symbol => $date) { //Optimizing query data\n if($date > $endDate) {\n continue; //Too early for this one\n } elseif($date < $endDate && $date > $startDate) {\n $stocksToFetch[$symbol] = ['start' => $date, 'end' => $endDate]; //A little bit too early\n } else {\n $stocksToFetch[$symbol] = ['start' => $startDate, 'end' => $endDate];\n }\n }\n\n if(!$stocksToFetch) {\n continue; //wtf but ok\n }\n\n if ($startDate->diff($endDate)->days*count($stocksToFetch) > $this->maxDays) {\n foreach ($stocksToFetch as $symbol => $dates) { //Too many queries - one query for each stock\n $res = $this->getHistoricalData([$symbol], $dates['start'], $dates['end']);\n foreach ($res as $row) { //Format\n $data[$row['Symbol']][$row['Date']] = $row['Close'];\n }\n }\n } else {\n $res = $this->getMultiHistoricalData($stocksToFetch);\n foreach ($res as $row) {\n $data[$row['Symbol']][$row['Date']] = $row['Close'];\n }\n }\n $startDate->modify($this->maxDays.' days'); //Next 200 days\n } while($endDate != $yesterday); //Until yesterday\n\n return $data;\n }", "title": "" }, { "docid": "200e7d960670301addb7dba6228bed1f", "score": "0.5235814", "text": "public function getCompanyCloseTime() {\r\n return inship_fedexship_get($this->handle, 12 );\r\n }", "title": "" }, { "docid": "76314ac6d5a4a0f66ab0fb6664d04674", "score": "0.5156639", "text": "public function weekDaysTiming($restaurantId, $openCloseType, $openCloseData){\n\n\t\t$CI = &get_instance();\n\t\t$responce = array('monday'=>'','tuesday'=>'','wednesday'=>'','thursday'=>'','friday'=>'','saturday'=>'','sunday'=>'');\n $day = strtolower(date('l'));\n $remainsdays = $this->daysfortimes($day);\n $condT = '';\n\t if ($openCloseType == 'weekDays') {\n\t $condT = \" AND week = '\".$openCloseData['currentWeek'].\"'\";\n\t }elseif ($openCloseType == 'specificDate') {\n\t $condT = \" AND day >= '\".date('Y-m-d').\"'\";\n\t }\n $timeData = $CI->Common_model->exequery(\"Select * from vm_restaurant_time where restaurantId=\".$restaurantId.\" AND openCloseType='\".$openCloseType.\"' AND status = 0 \".$condT.\" ORDER BY day asc \");\n if ($timeData) {\n if ($openCloseType == 'specificDate') {\n \tforeach ($timeData as $time) {\n if (in_array($time->day, $remainsdays['dates'])) {\n if ($time->day == date('Y-m-d')) {\n if ($openCloseData['isOpen'] == 1 || ($openCloseData['isOpen'] == 0 && $openCloseData['nextOpenDate'] == date('Y-m-d')))\n $responce[strtolower(date(\"l\", strtotime($time->day)))] = $time->open.' - '.$time->close;\n \n }else\n $responce[strtolower(date(\"l\", strtotime($time->day)))] = $time->open.' - '.$time->close;\n }\n }\n }else if ($openCloseType =='specificDateOfMonth') {\n \tforeach ($timeData as $time) {\n if (in_array($time->day, $remainsdays['monthday'])) {\n if ($time->day == date('d')) {\n if ($openCloseData['isOpen'] == 1 || ($openCloseData['isOpen'] == 0 && $openCloseData['nextOpenDate'] == date('Y-m-d')))\n $responce[$remainsdays['days'][array_search($time->day, $remainsdays['monthday'])]] = $time->open.' - '.$time->close;\n \n }else\n $responce[$remainsdays['days'][array_search($time->day, $remainsdays['monthday'])]] = $time->open.' - '.$time->close;\n }\n }\n }else if($openCloseType == 'weekDays'){\n \tforeach ($timeData as $time) {\n if (in_array($time->day, $remainsdays['days'])) {\n if ($time->day == $day) {\n if ($openCloseData['isOpen'] == 1 || ($openCloseData['isOpen'] == 0 && $openCloseData['nextOpenDate'] == date('Y-m-d')))\n $responce[$time->day] = $time->open.' - '.$time->close;\n \n }else\n $responce[$time->day] = $time->open.' - '.$time->close;\n }\n }\n }else{\n \tforeach ($timeData as $time) {\n if ($time->day == $day) {\n if ($openCloseData['isOpen'] == 1 || ($openCloseData['isOpen'] == 0 && $openCloseData['nextOpenDate'] == date('Y-m-d')))\n $responce[$time->day] = $time->open.' - '.$time->close;\n \n }else\n $responce[$time->day] = $time->open.' - '.$time->close;\n }\n }\n }\n\n\t\treturn $responce;\t\n\t}", "title": "" }, { "docid": "c7fc6be363a27f0eb9c138b83cd0f151", "score": "0.5106618", "text": "public function providerIsOpen()\n\t{\n\t\treturn array(\n\t\t\t// Single Day closed override\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Mon', 'end' => 'Mon'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '01:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Thu', 'end' => 'Wed'),\n\t\t\t\t\t\t\t'time' => array('start' => '02:00', 'end' => '03:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'Monday 12:00',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// Day Range closed override\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Mon', 'end' => 'Wed'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '01:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Thu', 'end' => 'Wed'),\n\t\t\t\t\t\t\t'time' => array('start' => '02:00', 'end' => '03:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'Tuesday 12:00',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// Date closed override\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'dates' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2009-01-01', 'end' => '2009-01-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '01:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2008-12-01', 'end' => '2009-02-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '18:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2006-01-01', 'end' => '2009-01-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '03:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'2009-01-01',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// Date range closed override\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'dates' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2009-01-01', 'end' => '2009-05-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '01:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2008-12-01', 'end' => '2009-02-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '18:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2006-01-01', 'end' => '2009-01-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '03:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'2009-03-01',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// Date override over valid day\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'dates' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2009-01-01', 'end' => '2009-05-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '01:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2008-12-01', 'end' => '2009-02-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '18:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2006-01-01', 'end' => '2009-01-01'),\n\t\t\t\t\t\t\t'time' => array('start' => '01:00', 'end' => '03:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'2001-01-01',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// No days in range\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Mon', 'end' => 'Sat'),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Sun', 'end' => 'Sun'),\n\t\t\t\t\t\t\t'time' => array('start' => '12:01', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'Sun 12:00',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// Valid day\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Mon', 'end' => 'Sat'),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => 'Sun', 'end' => 'Sun'),\n\t\t\t\t\t\t\t'time' => array('start' => '12:01', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'Mon 12:00',\n\t\t\t\tTRUE\n\t\t\t),\n\t\t\t// Date value overrides day value\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => date('D', strtotime('2009-06-22')), 'end' => date('D', strtotime('2009-06-22'))),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '00:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'dates' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2009-06-22', 'end' => '2009-06-22'),\n\t\t\t\t\t\t\t'time' => array('start' => '17:00', 'end' => '19:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'2009-06-22 18:00',\n\t\t\t\tTRUE\n\t\t\t),\n\t\t\t// Day closed value overrides other day values\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => date('D', strtotime('2009-06-22')), 'end' => date('D', strtotime('2009-06-22'))),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '00:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => date('D', strtotime('2009-06-22')), 'end' => date('D', strtotime('2009-06-22'))),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'2009-06-22 18:00',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t\t// Date closed value overrides day and date value\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'days' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'day' => array('start' => date('D', strtotime('2009-06-22')), 'end' => date('D', strtotime('2009-06-22'))),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\t'dates' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2009-01-22', 'end' => '2009-12-22'),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '23:59')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'date' => array('start' => '2009-06-22', 'end' => '2009-06-22'),\n\t\t\t\t\t\t\t'time' => array('start' => '00:00', 'end' => '00:00')\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'2009-06-22 18:00',\n\t\t\t\tFALSE\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "4b0cfb6494f2e254c5bc285d32a4fde1", "score": "0.51049376", "text": "function getPrice( $symbol, $date )\n{\n if ( isToday( $date ) == true )\n {\n $url = 'http://finance.yahoo.com/q/ecn?s=' . $symbol;\n if ( ($file = fopen($url, \"r\")) == false ) return -1;\n\n $r = \"\";\n do \n {\n $data = fread( $file, 8192 );\n $r .= $data;\n }\n while(strlen($data) != 0); \n\n $idx = strpos ( $r, 'Last Trade:', 0 );\n $idx = strpos ( $r, '<b>', $idx );\n $end = strpos ( $r, '</b>', $idx );\n\n $val = substr ( $r, $idx + 3, $end - $idx - 3 );\n\n if (is_numeric($val) == false) return -1;\n\n return $val;\n }\n else\n {\n $mm = intval(substr($date,5,2)) - 1;\n $dd = substr($date,8,2);\n $yyyy = substr($date,0,4);\n\n $url = 'http://finance.yahoo.com/q/hp?s=' . $symbol . '&a=' . $mm . '&b=' . $dd . '&c=' . $yyyy . '&d=' . $mm . '&e=' . $dd . '&f=' . $yyyy . '&g=d';\n if ( ($file = fopen($url, \"r\")) == false ) return -1;\n\n $r = \"\";\n do \n {\n $data = fread( $file, 8192 );\n $r .= $data;\n }\n while(strlen($data) != 0); \n\n $idx = strpos ( $r, '>Adj Close*<', 0 );\n $idx = strpos ( $r, '<td class=', $idx );\n $idx = strpos ( $r, '<td class=', $idx + 1 );\n $idx = strpos ( $r, '<td class=', $idx + 1 );\n $idx = strpos ( $r, '<td class=', $idx + 1 );\n $idx = strpos ( $r, '<td class=', $idx + 1 );\n $idx = strpos ( $r, '<td class=', $idx + 1 );\n $idx = strpos ( $r, '<td class=', $idx + 1 );\n $idx = strpos ( $r, '>', $idx );\n\n $end = strpos ( $r, '</td>', $idx );\n\n $val = substr ( $r, $idx + 1, $end - $idx - 1 );\n\n if (is_numeric($val) == false) return -1;\n\n return $val;\n }\n}", "title": "" }, { "docid": "6bae3cde644779f53aaffa841f8c1660", "score": "0.5073491", "text": "public function check_restaurant_open($data)\n {\n $is_open = 0;\n $current_time = date('Y-m-d H:i:s');\n $date = date(\"Y-m-d\");\n $is_weekend = $this->isWeekend($date);\n if(!empty($data->RestaurantTimer))\n {\n foreach($data->RestaurantTimer as $value)\n {\n if($is_weekend==true){ \n if($value->is_weekend==1)\n {\n $opening_time = date(\"Y-m-d \".$value->opening_time);\n $closing_time = date(\"Y-m-d \".$value->closing_time);\n if(strtotime($value->opening_time) > strtotime($value->closing_time))\n { \n $closing_time = date(\"Y-m-d \".$value->closing_time); \n $closing_time = date(\"Y-m-d H:i:s\", strtotime($closing_time. ' +1 day'));\n }\n if((strtotime($opening_time)<=strtotime($current_time)) && (strtotime($closing_time)>=strtotime($current_time))){\n $is_open = 1;\n }\n } \n \n }else{ \n if($value->is_weekend==0)\n {\n $opening_time = date(\"Y-m-d \".$value->opening_time); \n $closing_time = date(\"Y-m-d \".$value->closing_time);\n if(strtotime($value->opening_time) > strtotime($value->closing_time))\n {\n $closing_time = date(\"Y-m-d \".$value->closing_time);\n $closing_time = date(\"Y-m-d H:i:s\", strtotime($closing_time. ' +1 day'));\n }\n if((strtotime($opening_time)<=strtotime($current_time)) && (strtotime($closing_time)>=strtotime($current_time))){\n $is_open = 1; \n }\n }\n }\n }\n }\n return $is_open;\n }", "title": "" }, { "docid": "403ccf19485167d6139a4ccfcc9c74d2", "score": "0.5073057", "text": "public function specialNonWorkingDays()\n {\n return Hour::convertToArray($this->hours->where('closed', Hour::SPECIAL_NON_WORKING_DAY));\n }", "title": "" }, { "docid": "2eaa396d238ac38dc7b8c3cdc1857ded", "score": "0.5069847", "text": "public function getList()\n {\n $em = $this->container->get('doctrine')->getManager();\n $company_id = $this->ds->getCompanyId();\n\n return $em->createQuery(\"SELECT c.id, c.companyId, c.startDate, c.endDate, c.status, c.createdAt, c.summary FROM JCSGYKAdminBundle:MonthlyClosing c WHERE c.companyId = :company_id ORDER BY c.createdAt DESC\")\n ->setParameter('company_id', $company_id)\n ->setMaxResults(20)\n ->getResult();\n }", "title": "" }, { "docid": "8913d77d848befaaf8d994cc48429cc5", "score": "0.5064758", "text": "public function getOpeningTime() {\n return DB::table('timings AS st')\n ->select(\"st.day AS day\")\n ->addSelect(DB::raw(\"SUBSTR(st.close_time,1,5) AS close_time\"))\n ->addSelect('st.id')\n ->addSelect('st.is_24hrs')\n ->addSelect(DB::raw(\"SUBSTR(st.open_time,1,5) AS open_time\"))\n ->addSelect('st.is_closed')\n ->where('fk_user_id', '=', 1)\n ->orderBy('day', 'asc')\n ->orderBy('open_time', 'asc') \n ->get();\n }", "title": "" }, { "docid": "1791b2e328fe95df845f0e363fea7790", "score": "0.50392", "text": "public function getStockInfo();", "title": "" }, { "docid": "6c0f1800fc222a09e9942ee5c011f6c3", "score": "0.50306", "text": "public function havingClose()\n {\n return $this->andHavingClose();\n }", "title": "" }, { "docid": "fbb9bccb9a3649888cab4d804b404cf9", "score": "0.5029579", "text": "public function getClosed()\n {\n return $this->closed;\n }", "title": "" }, { "docid": "1debff3f1413fad88e33d8b846a35e5a", "score": "0.50218785", "text": "public function getCloseTime()\r\n {\r\n return $this->close_time;\r\n }", "title": "" }, { "docid": "3e1bb84b80ce4fb4188a24d3b7e577b9", "score": "0.5015826", "text": "function CheckCloseAllExtraTime($FechaIni,$FechaFin,$NitEmpresa){\n\t\t$cnx=cnx();\n\t\t$Fin= new DateTime($FechaFin);\n\t\t$Fin =$Fin->modify( '+1 day' );\n\t\t$daterange = new DatePeriod(\n\t\t new DateTime($FechaIni),\n\t\t new DateInterval('P1D'),\n\t\t $Fin\n\t\t);\n\t\tforeach($daterange as $date){\n\t\t\t// para obtener el dia echo $date->format(\"Y-m-d\").\"<br>\";\n\t\t\t$idHorasExtras=getHorasExtras($date->format(\"Y-m-d\"),$NitEmpresa);\n\t\t\tif($idHorasExtras[\"exist\"]==1){\n\t\t\t\t\t$query = sprintf(\"UPDATE horas_extras SET EstadoHorasExternas = '%s' WHERE idHorasExtras = '%s'\",\n\t\t\t\t\tmysqli_real_escape_string($cnx,\"1\"),\n\t\t\t\t\tmysqli_real_escape_string($cnx,$idHorasExtras[\"idHorasExtras\"])\n\t\t\t\t\t);\n\t\t\t\t\t$estado = mysqli_query($cnx,$query);\n\t\t }\n\t }\n\tmysqli_close($cnx);\n}", "title": "" }, { "docid": "2c1b7e20dd4ea8537e4ce354a1c531c2", "score": "0.49830753", "text": "public function closingReasons()\n {\n return $this->hasMany('PanicHD\\PanicHD\\Models\\Closingreason', 'status_id');\n }", "title": "" }, { "docid": "00506327e60721f13b2735096a386689", "score": "0.49606776", "text": "public function getAll($data, $period = 100) {\n $ret = array();\n\n\n //TODO - limit data to $period - max number of periods to consider\n\n\n\n $open = array_column($data, 'open');\n $high = array_column($data, 'high');\n $low = array_column($data, 'low');\n $close = array_column($data, 'close');\n\n\n\n\n\n foreach($this->candles as $cdlfunc => $name) {\n\n $tempdata = Trader::$cdlfunc($open, $high, $low, $close);\n if (empty($tempdata)) {\n continue;\n }\n\n $cdlfunc = str_replace('trader_cdl','', $cdlfunc);\n\n $tmp = array_map('abs', $tempdata); // remove negatives\n $sum = array_sum($tmp); // sum it all\n if ($sum == 0) {\n $ret['notfound'][$cdlfunc] = $name;\n }\n foreach ($tempdata as $key => $temp) {\n $ret['all'][$cdlfunc] = $temp;\n if (abs($temp) > 0) {\n $ret['range'][$cdlfunc] = $name; // that we found this candle\n $ret['location'][$cdlfunc][] = $key; // the location in the dataset where this candle is\n }\n }\n\n $tempdataReIndexed = array_values($tempdata);\n $closeData = array_values($close);\n foreach ($tempdataReIndexed as $idx => $cand) {\n $sindex = (($idx)-3 < 0 ? 3 : $idx);\n if ($sindex+4 > count($closeData)){\n $sindex = $sindex - 4;\n }\n $currents = array_slice($closeData, $sindex-3, 7);\n if ($cand <> 0) {\n $lastfive = @implode(\",\", $currents);\n $ret['datafor'][$cdlfunc] = $lastfive;\n }\n }\n\n $lastBit = array_slice($tempdata, -3, 3);\n foreach ($lastBit as $test) {\n if ($test <> 0) {\n $ret['recently'][$cdlfunc] = $test;\n }\n }\n $last = array_pop($tempdata);\n if ($last <> 0) {\n $ret['current'][$cdlfunc] = $last;\n }\n\n }\n\n\n return $ret;\n }", "title": "" }, { "docid": "145ebacbf92a68e7fca528fa0cf91517", "score": "0.49587148", "text": "public function getClosingPositions(): array {\n\t\treturn $this->_closingPositions;\n\t}", "title": "" }, { "docid": "be3193e6e2ca4aa70e0c72b0ee1149d8", "score": "0.49524125", "text": "public function dieselstock()\n {\n return $this->stocks->where('fuel', 'diesel')->sum('in_stock');\n }", "title": "" }, { "docid": "c3d60e19dbafc0a26a0dc96bb9580508", "score": "0.49420282", "text": "function KDJfunction($StockName)\r\n{\r\n\r\n // get data from database\r\n $conn = @mysql_connect(\"localhost\", \"root\", \"\");\r\n if (!$conn) {\r\n die(\"Fail to connect database:\" . mysql_error());\r\n } else {\r\n\r\n }\r\n mysql_select_db(\"seteam\", $conn);\r\n\r\n //calculate K9\r\n $K9=50;\r\n //calculate D9\r\n $D9=50;\r\n\r\n for ($x=30; $x>=0; $x--)\r\n {\r\n //select the latest day\r\n $sql = \"SELECT date FROM {$StockName}_historical LIMIT $x,1\";\r\n $query=mysql_query($sql) or die($query.\"<br/><br/>\".mysql_error());\r\n $d1=mysql_result($query,0);\r\n\r\n //select the last 9th day\r\n $y=$x+9;\r\n $sql = \"SELECT date FROM {$StockName}_historical LIMIT $y,1\";\r\n $query=mysql_query($sql) or die($query.\"<br/><br/>\".mysql_error());\r\n $d9=mysql_result($query,0);\r\n\r\n //select the highest price during the last 9 days\r\n $sql = \"SELECT MAX(high) FROM {$StockName}_historical WHERE date>='$d9' AND date<='$d1'\";\r\n $query=mysql_query($sql) or die($query.\"<br/><br/>\".mysql_error());\r\n $H9=mysql_result($query,0);\r\n\r\n //select the lowest price during the last 9 days\r\n $sql = \"SELECT MIN(low) FROM {$StockName}_historical WHERE date>='$d9' AND date<='$d1'\";\r\n $query=mysql_query($sql) or die($query.\"<br/><br/>\".mysql_error());\r\n $L9=mysql_result($query,0);\r\n\r\n //select the closing price of the latest day\r\n $sql = \"SELECT close FROM {$StockName}_historical WHERE date='$d1'\";\r\n $query=mysql_query($sql) or die($query.\"<br/><br/>\".mysql_error());\r\n $C=mysql_result($query,0);\r\n\r\n //caculate RSV9\r\n $RSV9=($C-$L9)/($H9-$L9)*100;\r\n //calculate K9\r\n $K9=2/3*$K9+1/3*$RSV9;\r\n //calculate D9\r\n $D9=2/3*$D9+1/3*$K9;\r\n\r\n }\r\n\r\n //calculate J9\r\n $J9=3*$K9-2*$D9;\r\n\r\n echo \"RSV= \",$RSV9,\"<br>\";\r\n echo \"K = \",$K9,\"<br>\";\r\n echo \"D = \",$D9,\"<br>\";\r\n echo \"J = \",$J9,\"<br>\";\r\n\r\n if ($K9<10||$D9<20||$J9<0){\r\n echo \"It's a Oversold Zone, Suggestion: BUY! \";\r\n }else if ($K9>90||$D9>80||$J9>100){\r\n echo \"It's a Overbought Area, Suggestion: SELL! \";\r\n }else\r\n echo \"It's a Trade Balance Area, Suggestion: HOLD or SITOUT! \";\r\n\r\n}", "title": "" }, { "docid": "875d99a50ef1f8267d8d861e4e7ae16a", "score": "0.49397585", "text": "private function build_daily_data()\r\n {\r\n $arr = array();\r\n $query = mysql_query(\"SELECT * FROM daily_data WHERE ticker_id = '\".$this->id.\"' ORDER BY date DESC LIMIT 5\");\r\n if(mysql_num_rows($query) < 1)\r\n {\r\n return null;\r\n }\r\n $i = 0;\r\n while($array = mysql_fetch_array($query))\r\n {\r\n $data = new DailyData($array);\r\n $arr[$i] = $data;\r\n $i = $i + 1;\r\n }\r\n return $arr;\r\n }", "title": "" }, { "docid": "f8b1be69c907a02fe998060cdc47e1b4", "score": "0.4919278", "text": "public function getCloseReportFile() {\r\n return inship_fedexship_get($this->handle, 3 );\r\n }", "title": "" }, { "docid": "07a54fd897640d92c332fc9b02abedac", "score": "0.48982486", "text": "function getAllClosedSwaps() {\n $db = DB::getInstance();\n $query = $db->query(\"SELECT * FROM sage_shift_swaps WHERE respondent_id IS NOT NULL LIMIT 10\")->results();\n return $query;\n}", "title": "" }, { "docid": "9fada1dd4c554ca6faa965f8deabd125", "score": "0.48953453", "text": "function getWeeklyPriceRange($symbol,$lowerPrice=0,$upperPrice=0,$startDay,$endDay){\n\t$queryResults=getDatabaseRecords($symbol);\n\tif(empty($queryResults)){\n\t\techo(\"No Result to Display, data not present.\");\n\t\treturn;\n\t}\n\techo(\"<b>Symbol : </b>\".strtoupper($symbol).\"&nbsp;&nbsp;\");\n\techo(\"<b>Start Date &nbsp; : &nbsp;</b>\".$queryResults[0]['recorddate']);\n\techo(\"<b>&nbsp;&nbsp;End Date &nbsp; : &nbsp;</b>\".$queryResults[count($queryResults)-1]['recorddate'].\"<br/>\");\n\t\n\t$startDate=null;\n\t$endDate=null;\n\t$high=0;\n\t$low=0;\n\t$open=0;\n\t$close=0;\n\t$dayNo=0;\n\t$i=0;\n\t\n\t//To get the difference between start day and end day.\n\tif(getDayNumber($startDay)<=getDayNumber($endDay)){\n\t\t$dayCount=getDayNumber($endDay)-getDayNumber($startDay) +1;\n\t}else if(getDayNumber($startDay)>getDayNumber($endDay)){\n\t\t$dayCount=7+ getDayNumber($endDay)-getDayNumber($startDay) +1;\n\t}\n\t\n\tforeach($queryResults as $result){\n\t $dayNo=getDayNumber(date('l',strtotime($result['recorddate'])));\n\t\t$prevRecord=$queryResults[$i-1>0?$i-1:0];\n\t\t$nextRecord=$queryResults[$i+1<count($queryResults)?$i+1:count($queryResults)-1];\n\t\t\t\t\n\t\t//To check start of calculation period of the week\n\t\tif($dayNo==getDayNumber($startDay) ){\n\t\t\t$startDate=$result['recorddate'];\n\t\t\t$open=$result['open'];\n\t\t\t$high=$result['high'];\n\t\t\t$low=$result['low'];\n\t\t}\n\t\t//To calculate High and Low\n\t\tif($result['high']>$high){\n\t\t\t$high=$result['high'];\n\t\t}\n\t\tif($result['low']<$low){\n\t\t\t$low=$result['low'];\n\t\t}\n\t\t//To get end of calculation period for the week.\n\t\tif($startDate !=null && ($dayNo==getDayNumber($endDay) || getDayDifference($startDate,$nextRecord['recorddate']) >$dayCount)){\n\t\t\t$endDate=$result['recorddate'];\n\t\t\t$close=$result['close'];\n\t\t\t\n\t\t\t$weeklyResults[] = array('startDate' => $startDate,\n\t\t\t'endDate' => $endDate,\n\t\t\t'open'=>$open,\n\t\t\t'close'=>$close,\n\t\t\t'high'=>$high,\n\t\t\t'low'=>$low);\n\t\t\t\n\t\t\t$startDate=null;\n\t\t\t$endDate=null;\n\t\t}\n\t\t$i++;\n\t}\n\t\n\t//Printing the results\n\t$k=1;\n\techo(\"</br>Weeks on which <b>\".strtoupper($symbol).\"</b> traded below<b>$lowerPrice</b> or traded above <b>$upperPrice</b> between $startDay and $endDay</br></br>\");\n\techo(\"<table class='table table-striped'><tr><th>Sl No.</th><th>Start Date</th><th>End Date</th><th>Days</th><th>Week's High</th><th>Week's Low</th><th>Open - Close</th></tr>\");\n\tforeach($weeklyResults as $weekResult){\n\t\t$maxUp=$weekResult['high']-$weekResult['open'];\n\t\t$maxDown=$weekResult['low']-$weekResult['open'];\n\t\t$priceDiff=abs($weekResult['open']-$weekResult['close']);\n\t\tif($maxUp>=$upperPrice || $maxDown<=$lowerPrice){\n\t\t\techo(\"<tr><td>\".$k.\"</td><td>\".$weekResult['startDate'].\"</td><td>\".$weekResult['endDate'].\"</td><td>\".getDayDifference($weekResult['startDate'],$weekResult['endDate']).\"</td><td>\".$maxUp.\"</td><td>\".$maxDown.\"</td><td>\".$priceDiff.\"</td></tr>\");\n\t\t\t$k++;\n\t\t}\n\t}\n\techo(\"</table>\");\n}", "title": "" }, { "docid": "7bbd1895c50a3e48819601fd7e71efea", "score": "0.48899165", "text": "public function bins_collected_daily()\n {\n $binsCollectedDaily = $this->daily_scope('collections.created_at', $this->bins_collected());\n\n return $binsCollectedDaily;\n }", "title": "" }, { "docid": "62d693d41282523fb151317527be4c8f", "score": "0.48874494", "text": "public function getDailyRestockGraph();", "title": "" }, { "docid": "c21ba1301a7c1540e0f98b9d1b0e1359", "score": "0.48763162", "text": "public function isClosed();", "title": "" }, { "docid": "30c1f536dae0930b2fbdb1c3249ac733", "score": "0.48699328", "text": "public function getDateFrecuency();", "title": "" }, { "docid": "f14909ceda2078cc5d814429d3868634", "score": "0.48672885", "text": "function getAllBookingsCleaningDay($date , $cleaningFrequency){\n return $this->db->getAllBookingsCleaningDay($date , $cleaningFrequency);\n }", "title": "" }, { "docid": "4e4b7e42b63ed1de31783c1a33430cfd", "score": "0.48635626", "text": "function get_closed_count($project)\n{\n\tglobal $db, $mybb;\n\tif($mybb->usergroup['canmodtrack'] || $mybb->user['developer'])\n\t{\n\t\t$query = $db->simple_select(\"tracker_issues\", \"COUNT(issid) AS closedissues\", \"complete = '100' AND projid = '\".$project.\"'\");\n\t}\n\telse\n\t{\n\t\t$query = $db->simple_select(\"tracker_issues\", \"COUNT(issid) AS closedissues\", \"complete = '100' AND projid = '\".$project.\"' AND visible = '1'\");\n\t}\n\treturn $db->fetch_field($query, \"closedissues\");\n}", "title": "" }, { "docid": "7e2fcee95c8582931bf83f260939bbbf", "score": "0.48607293", "text": "public function getBranchByDateOpened()\n {\n $values = array();\n $result = array();\n $branch = new Branch();\n $data = $branch->getBranchByDateOpened();\n\n foreach($data as $row) {\n array_push($values, floatval($row->date_opened * 1000));\n array_push($values, floatval($row->count));\n array_push($result, $values);\n $values = array();\n }\n\n return $result;\n }", "title": "" }, { "docid": "139aa314b0a827ad90e18be3b3ed2217", "score": "0.48508155", "text": "public function getBillsByClosing($closing_id = ''){\n \t$bills = $this->find('all', array(\n 'joins' => array(\n array(\n 'table' => 'bills',\n 'alias' => 'b',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'b.id = DetailsClosing.bill_id'\n )\n ),array(\n 'table' => 'people',\n 'alias' => 'p',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'p.id = b.people_id'\n )\n ),\n array(\n 'table' => 'invoices_payments',\n 'alias' => 'ip',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'ip.bill_id = DetailsClosing.bill_id'\n )\n ),\n array(\n 'table' => 'modes_bills',\n 'alias' => 'mb',\n 'type' => 'LEFT',\n 'conditions' => array(\n 'mb.id = ip.mode_bill_id'\n )\n )\n ),\n 'conditions' => array('DetailsClosing.closing_id' => $closing_id),\n 'fields' => array('b.bill_code,b.date_payment,ip.subscribed_amount,b.status,mb.name,\n p.name, mb.id, ip.observation')\n ));\n return $bills;\n }", "title": "" }, { "docid": "8f31dfc9d0bd277d2b43cbb757c97edc", "score": "0.48358423", "text": "public function getClosedAt(): ?\\DateTime;", "title": "" }, { "docid": "0e09b8cef290019e2797eee3daa1c9eb", "score": "0.4828504", "text": "public function fetchVdDates()\n {\n\t\t$vdDetailsArr =array();\n $sql =\"select * from billing.VARIABLE_DISCOUNT_DURATION ORDER BY ENTRY_DT DESC LIMIT 1\";\n $res =mysql_query_decide($sql,$this->myDb) or LoggingWrapper::getInstance()->sendLogAndDie(LoggingEnums::LOG_ERROR, new Exception($sql.mysql_error($this->myDb)));\n $row =mysql_fetch_array($res);\n $vdDetailsArr['SDATE'] =$row['SDATE'];\n $vdDetailsArr['EDATE'] =$row['EDATE'];\n $vdDetailsArr['ENTRY_DT'] =$row['ENTRY_DT'];\n\t\treturn $vdDetailsArr;\n\t}", "title": "" }, { "docid": "d767ac9d2273a3d5160705b1f958cda6", "score": "0.48281264", "text": "public function getClosedActivities() {\n\t\t$result = array();\n\t\tforeach ($this->getAppointments()->getValues() as $activity) {\n\t\t\tif(!$this->isOpenActivity($activity)) {\n\t\t\t\t$result[] = $activity;\n\t\t\t}\n\t\t}\n\t\tforeach ($this->getInteractions()->getValues() as $activity) {\n\t\t\tif(!$this->isOpenActivity($activity)) {\n\t\t\t\t$result[] = $activity;\n\t\t\t}\n\t\t}\n\t\tforeach ($this->getAnnotations()->getValues() as $activity) {\n\t\t\t$result[] = $activity;\n\t\t}\n\t\tforeach ($this->getTasks()->getValues() as $activity) {\n\t\t\tif(!$this->isOpenActivity($activity)) {\n\t\t\t\t$result[] = $activity;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$comparator = new OrderClosedActivitiesRequest($result);\n\t\t$response = $comparator->execute();\n\t\tif($response->getResult()) {\n\t\t\t$result = $response->getCollection();\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4176c7032d117e11b74e98d5c2cb9b0d", "score": "0.48254332", "text": "function allTimingsDay ($ID, $curdttm) {\n\t$db = Cnnct(); //setup the db connection for those queries in the if statements\n\t$curdttm = getCurDttm(false);\n\t$resultarr = array();\n\t$sth = $db->prepare(\"SELECT Row_ID, Time_Cur, In_Out, Brk_Lnch FROM ROST_HIST_TIME WHERE ID = '\".$ID.\"' AND DATE(Time_Cur) = DATE('\".$curdttm.\"') ORDER BY Row_ID\");\n\t$sth->execute();\n\t$r = $sth->fetchAll(PDO::FETCH_ASSOC);\n\t$i = 0;\n\tforeach($r as $row){\n\t\t$resultarr[$i] = array('Row_ID' => $row['Row_ID'], 'Time_Cur' => $row['Time_Cur'], 'In_Out' => $row['In_Out'], 'Brk_Lnch' => $row['Brk_Lnch']);\n\t\t//to check what they came back in from prior\n\t\tif($resultarr[$i]['In_Out'] == 'i' && $resultarr[$i]['Row_ID'] != 1){\n\t\t\t$j = $i - 1; //get the row before the current row to see what they came back from\n\t\t\t//if they came back in from a break previously\n\t\t\tif($resultarr[$j]['Brk_Lnch'] == 'b'){\n\t\t\t\t$resultarr[$i]['Status'] = \"Clocked In from Break\";\n\t\t\t}\n\t\t\t//if they came back from a lunch previously\n\t\t\telse if($resultarr[$j]['Brk_Lnch'] == 'l'){\n\t\t\t\t$resultarr[$i]['Status'] = \"Clocked In from Lunch\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t//if they clocked out for any reason\n\t\t\tif($resultarr[$i]['In_Out'] == 'o'){\n\t\t\t\t//if they clocked out for break\n\t\t\t\tif($resultarr[$i]['Brk_Lnch'] == 'b'){\n\t\t\t\t\t$resultarr[$i]['Status'] = \"Clocked Out for Break\";\n\t\t\t\t}\n\t\t\t\t//if they clocked out for lunch\n\t\t\t\telse if($resultarr[$i]['Brk_Lnch'] == 'l'){\n\t\t\t\t\t$resultarr[$i]['Status'] = \"Clocked Out for Lunch\";\n\t\t\t\t}\n\t\t\t\t//if they clocked out for the day\n\t\t\t\telse{\n\t\t\t\t\t$resultarr[$i]['Status'] = \"Clocked Out For the Day\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if the status shows as \"Clocked In\" but is the first row for the day\n\t\t\telse{\n\t\t\t\t$resultarr[$i]['Status'] = \"Clocked In\";\n\t\t\t}\n\t\t}\n\t\t$i += 1;\n\t}\n\treturn $resultarr;\n}", "title": "" }, { "docid": "def5f7c79124ac01cdd6892d43e5c655", "score": "0.48212612", "text": "public function getFullDayMarkerEntries() {\n\t\t$entries = \\OOEntryQuery::create()\n\t\t\t\t\t\t\t\t->filterByOOBooking($this)\n\t\t\t\t\t\t\t\t->filterByType(\\OOEntry::TYPE_MARKER_FULL_DAY)\n\t\t\t\t\t\t\t\t->find();\n\t\t\t\t\t\t\t\t\n\t\treturn $entries;\n\t}", "title": "" }, { "docid": "6e44d0cd1a3cf09c4946d7c3f7cf9540", "score": "0.47926053", "text": "public function having_close()\n {\n return $this->and_having_close();\n }", "title": "" }, { "docid": "56b69a0edaee41a1ec0575fae6611c68", "score": "0.478952", "text": "public function daily()\n\t{\n\t\t$this->betriebFetchWarning();\n\n\t\t/*\n\t\t * update bezirk ids\n\t\t * there is this old 1:n relation foodsaver <=> bezirk we just check in one step the relation table\n\t\t */\n\t\t//$this->updateBezirkIds();\n\n\t\t/*\n\t\t * fill memcache with info about users if they want information mails etc..\n\t\t */\n\t\t$this->memcacheUserInfo();\n\n\t\t/*\n\t\t * delete old bells\n\t\t */\n\t\t$this->deleteBells();\n\n\t\t/*\n\t\t * delete unuser images\n\t\t */\n\t\t$this->deleteImages();\n\n\t\t/*\n\t\t * delete unconfirmed Betrieb dates in the past\n\t\t */\n\t\t$this->deleteUnconformedFetchDates();\n\n\t\t/*\n\t\t * deactivate too old food baskets\n\t\t */\n\t\t$this->deactivateBaskets();\n\n\t\t/* \n\t\t * Update Bezirk closure table\n\t\t *\n\t\t * it gets crashed by some updates sometimes, workaround: Rebuild every day\n\t\t */\n\t\t$this->rebuildBezirkClosure();\n\n\t\t/*\n\t\t * Master Bezirk Update\n\t\t *\n\t\t * we have master bezirk that mean any user hierarchical under this bezirk have to be also in master self\n\t\t */\n\t\t$this->masterBezirkUpdate();\n\n\t\t/*\n\t\t * Delete old blocked ips\n\t\t */\n\t\t$this->model->deleteOldIpBlocks();\n\n\t\t/*\n\t\t * check inactive users and send wake up emails or set in sleeping mode\n\t\t */\n\t\t//$this->sleepingMode();\n\n\t\t/*\n\t\t * There may be some groups where people should automatically be added\n\t\t * (e.g. Hamburgs BIEB group)\n\t\t */\n\t\t$this->updateSpecialGroupMemberships();\n\n\t\t/**\n\t\t * sleeping users, where the time period of sleepiness ended\n\t\t */\n\t\t$this->wakeupSleepingUsers();\n\n\n\t}", "title": "" }, { "docid": "4bca10c52b8169e0779430d15aa757e7", "score": "0.47816545", "text": "function getTransferClosingEntry($data)\n\t{\n\t\t$column = empty($data['column']) ? 'qtyApproved' : $data['column'];\n\t\t$sql = \" SELECT\n \t\t\t\tSUM(td.$column) AS qtyTransfer\n \t\tFROM\n\t \t\tst_transferstock AS t,\n\t \t\t`st_transferstock_detail` td\n \t\tWHERE t.id=td.transferId \";\n\n\t\tif (!empty($data['start_date'])) {\n\t\t\t$from_date = (empty($data['start_date'])) ? '1' : \" t.transferDate >= '\" . $data['start_date'] . \" 00:00:00'\";\n\t\t\t$to_date = (empty($data['end_date'])) ? '1' : \" t.transferDate <= '\" . $data['end_date'] . \" 00:00:00'\";\n\t\t\t$sql .= \" AND \" . $from_date . \" AND \" . $to_date;\n\t\t}\n\n\t\tif (!empty($data['projectId'])) {\n\t\t\t$sql .= \" AND t.fromProjectId=\" . $data['projectId'];\n\t\t}\n\t\tif (!empty($data['toProjectId'])) { //received\n\t\t\t$sql .= \" AND t.toProjectId=\" . $data['toProjectId'];\n\t\t}\n\t\tif (!empty($data['proId'])) {\n\t\t\t$sql .= \" AND td.proId=\" . $data['proId'];\n\t\t}\n\t\t$sql .= \" GROUP BY td.proId \";\n\t\treturn $this->getAdapter()->fetchOne($sql);\n\t}", "title": "" }, { "docid": "e03f49f0836a69f0536490f7df9dd15b", "score": "0.47808063", "text": "protected function queryDateChildren()\n {\n foreach ($this->childrenCenter as $son) {\n\n switch ($this->type) {\n case 0:\n $this->dataBallots[$son->centro] = Paciente::where('centro_id', $this->centerCondition, $son->id)\n ->where($this->field, $this->request->condition, $this->request->number)\n ->whereHas('conclusion', function ($query) {\n $query->where('fecha', '>=', $this->request->begin_date)\n ->where('fecha', '<=', $this->request->final_date);\n })->get();\n break;\n case 1:\n $this->secondQueryDate('antecedentes', $son->centro, $son->id);\n break;\n case 2:\n $this->secondQueryDate('embarazoActual', $son->centro, $son->id);\n break;\n case 3:\n $this->secondQueryDate('historiaClinica', $son->centro, $son->id);\n break;\n default:\n $this->error = true;\n break;\n }\n }\n }", "title": "" }, { "docid": "96014a2a30ff0ec68d1bcd5f9eae2da7", "score": "0.47795537", "text": "function updateCalculations($calcDate,$noOfDays=50){\n\t/*$errorDates=checkDataInTable($noOfDays);\n\tif(!empty($errorDates)){\n\t\techo(\"</br><h3>Please check the following dates in the <b>Daily Candlesticks</b> table:</h3></br>\");\n\t\tfor($errorDates as $errorDate){\n\t\t\techo(\"<br>\"+$errorDate);\n\t\t}\n\t\treturn;\n\t}*/\n\t$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\n\t// Check connection\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t}\n\t/* create a prepared statement */\n\t$stmt = $conn->prepare(DATE_LIST_QUERY);\n\n /* bind parameters for markers */\n $stmt->bind_param(\"s\", $noOfDays);\n\n /* execute query */\n $stmt->execute();\n\n /* bind result variables */\n $stmt->bind_result($symbol,$timestamp,$open,$high,$low,$close,$prevclose,$volume);\n\t$i=0;\n\twhile ($stmt->fetch()) {\n\t\t$queryResults[] = array('symbol' => $symbol,\n\t\t\t'timestamp' => $timestamp,\n\t\t\t'open' => $open,\n\t\t\t'high' => $high,\n\t\t\t'low' => $low,\n\t\t\t'close' => $close,\n\t\t\t'prevclose' => $prevclose,\n\t\t\t'volume' => $volume);\n\t\tif(($i+1)%$noOfDays == 0){\n\t\t\t$symbolSpecificResults[] = array('symbol' => $symbol,\n\t\t\t\t'values' => $queryResults);\n\t\t\t$queryResults = [];\t\n\t\t}\n\t\t$i++;\t\n\t}\n\t$stmt->close();\n\t$conn->close();\n\t\n\tforeach($symbolSpecificResults as $symbolSpecificResult) {\n\t\t$calculationResults[] =calculateEverything($symbolSpecificResult['values'],$noOfDays);\n\t}\n\tif(!empty($calculationResults)){\n\t\tstoreCalculationsInDatabase($calculationResults);\n\t}\n}", "title": "" }, { "docid": "74ca5b2939228c56597ba7946d8f95ea", "score": "0.47766674", "text": "public function getFullDayAllotmentEntries() {\n\t\t$entries = \\OOEntryQuery::create()\n\t\t\t\t\t\t\t\t->filterByOOBooking($this)\n\t\t\t\t\t\t\t\t->filterByType(\\OOEntry::TYPE_ALLOTMENT_FULL_DAY)\n\t\t\t\t\t\t\t\t->find();\n\t\t\t\t\t\t\t\t\n\t\treturn $entries;\n\t}", "title": "" }, { "docid": "485c0ad5f2a3e9f3bb06ed2ac9cd22c6", "score": "0.47590432", "text": "function getGuestClosedTicketList()\n\t\t{\n\t\t\t//for getting list of tickets which are closed\n\t\t\t$ticket_list=$this->manage_content->getValueMultipleCondtnDesc('contact_us','*', array('status'), array('1'));\n\t\t\tif(!empty($ticket_list[0]))\n\t\t\t{\n\t\t\t\tforeach($ticket_list as $ticket)\n\t\t\t\t{\n\t\t\t\t\t echo '<tr>\n\t\t\t\t\t\t\t<td>'.$ticket['email'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['name'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['title'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['subject'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['date'].'</td>\n\t\t\t\t\t\t\t<td>'.$ticket['time'].'</td>\n\t\t\t\t\t\t\t<td><a href=\"ticketDetails.php?rid='.$ticket['request_id'].'\"><button class=\"btn btn-info\">Details</button></a></td>\n\t\t\t\t\t\t</tr>' ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a4903877e9ee7d85f50afc34206b0a29", "score": "0.47554854", "text": "function reverse_close($item_details, $cron_closed = false)\n\t{\n\t\t$cnt_details = $this->get_sql_row(\"SELECT reverse_id, active, closed, deleted, category_id, addl_category_id, end_time FROM\n\t\t\t\" . DB_PREFIX . \"reverse_auctions WHERE reverse_id='\" . $item_details['reverse_id'] . \"'\");\n\n\t\tif ($cnt_details['active'] == 1 && $cnt_details['closed'] == 0 && $cnt_details['deleted'] == 0)\n\t\t{\n\t\t\treverse_counter($cnt_details['category_id'], 'remove');\n\t\t\treverse_counter($cnt_details['addl_category_id'], 'remove');\n\t\t}\n\n\t\tif ($cnt_details['closed'] == 0)\n\t\t{\n\t\t\t$update_end_time = ($cron_closed) ? '' : \", end_time='\" . CURRENT_TIME . \"'\";\n\t\t\t\n\t\t\t$this->query(\"UPDATE \" . DB_PREFIX . \"reverse_auctions SET closed=1 \" . $update_end_time . \" WHERE\n\t\t\t\treverse_id=\" . $item_details['reverse_id']);\n\t\t}\n\t}", "title": "" }, { "docid": "81a2c54f5c2b86e8262502b4a2020162", "score": "0.47475895", "text": "function scrapeOpening($data) {\n\t\t$html = new simple_html_dom();\n\t\t$html->load($data);\n\t\t$single = $html->find('#OPENINGS_DESCRIPTION', 0);\n\t\t$output = array();\n\t\t$output['html'] = $single->innertext;\n\t\t$output['text'] = $single->plaintext;\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "33f5ef871e24bbe54d2a563fdf9a6c20", "score": "0.47436547", "text": "public function getDayOffsNumber()\r\n { \r\n $allHolidays = $this->getDayOffsByAge($this->getAge()) + $this->getPlusDayOffsByChildren($this->childrenNumber);\r\n $usedHolidays = CHolidays::GetUsedHolidayNumber($this->holidayList);\r\n $remainHolidays = $allHolidays - $usedHolidays; \r\n \r\n $time = strtotime($this->regDate);\r\n $year = date(\"Y\",$time); \r\n if($year == date('Y'))\r\n {\r\n $partHolidayNumber = $this->getPartDayOffsNumber(); \r\n if($remainHolidays > $partHolidayNumber)\r\n {\r\n $holidayNumber = $partHolidayNumber; \r\n }\r\n else\r\n {\r\n $holidayNumber = $remainHolidays; \r\n }\r\n }\r\n else\r\n {\r\n $holidayNumber = $remainHolidays;\r\n }\r\n \r\n return $holidayNumber;\r\n }", "title": "" }, { "docid": "7fc2541560e3852942f2b4162bd95a1e", "score": "0.47369602", "text": "public static function thirtydays()\n {\n $output = array();\n \n //SET CURRENT DATE\n $month = date(\"m\");\n $day = date(\"d\");\n $year = date(\"Y\");\n $num = date(\"t\", mktime(0,0,0, date(\"n\") - 1)); //get the days number from the LAST month to keep it right.\n \n //LOOP THROUGH DAYS\n for($i=0; $i<=($num); $i++){\n $results[] = date('Ymd',mktime(0,0,0,$month,($day-$i),$year));\n }\n \n foreach ($results as $result)\n {\n $output[$result] = 0;\n }\n //RETURN DATE ARRAY\n return $output;\n }", "title": "" }, { "docid": "dfe2b7460f51701caf865eca8f9c3ae6", "score": "0.47351998", "text": "function find_elapsed_days_page_wise($page_url){\n\t$html = file_get_html($page_url);\n\t$curr_date = date(\"Y-m-d H:i:s\");\n\t$tz = new DateTimeZone('Asia/Kolkata'); // Set time zone of india\n\t$count1 = 0;\n\t$count2 = 0;\n\tforeach($html->find('relative-time') as $element){\n\t\t$utc = $element->datetime;\n\t\t$dt = new DateTime($utc); \n \t$dt->setTimezone($tz); // convert UTC to Indian time zone\n\t\t$date = $dt->format('Y-m-d H:i:s'); // Set a time format\n\t\t$datetime1 = new DateTime(); // current date and time\n\t\t$datetime2 = new DateTime($date); // openned issues' time and date\n\t\t$interval = $datetime1->diff($datetime2); // find difference of to time and date\n\t\t$elapsed = $interval->format('%a days'); // set format of difference\n\t\t$days = find_elapsed_days($elapsed); // get days in integer\n\t\t\n\t\tif($days<=0){ // Issues openned within 24 Hours\n\t\t\t$count1 = $count1 + 1;\n\t\t}\n\t\tif($days<7 && $days>0){ // Issues openned within 1 week and after 24 hours\n\t\t\t$count2 = $count2 + 1;\n\t\t}\n\t}\n\treturn $count1.\" \".$count2;\n}", "title": "" }, { "docid": "1f8fefa9c7ff41a483685b689a78aea1", "score": "0.47225127", "text": "public function daysWithReducedWorkingHours()\n {\n return Hour::convertToArray($this->hours->where('closed', Hour::OPEN_WITH_REDUCED_WORKING_HOURS));\n }", "title": "" }, { "docid": "2c55a9dec942161e91a016245f981285", "score": "0.47218102", "text": "public function getHistoricalData($symbol, \\DateTime $startDate, \\DateTime $endDate)\n {\n $query = \"select * from yahoo.finance.historicaldata where startDate='\".$startDate->format(\"Y-m-d\").\"' and endDate='\".$endDate->format(\"Y-m-d\").\"' and symbol='\".$symbol.\"'\";\n return $this->execQuery($query);\n }", "title": "" }, { "docid": "16bd01bd875897c0eb79222bde93c721", "score": "0.47208104", "text": "public function getAllDays($date){\n $month = $this->getMonthDays($date);\n $num = date(\"t\",strtotime($date))-1;\n $uFirst = $month[0]['date'];\n $uLast = $month[$num]['date'];\n $q=\"SELECT date,\n holiday_type_id,\n time\n FROM holiday,\n holiday_type\n WHERE date>='$uFirst' \n AND date<='$uLast' \n AND holiday_type.id=holiday.holiday_type_id\";\n $result = $this->fetchAll($q);\n for ($i=0;$i<=$num;$i++){\n foreach ($result as $holiday){\n list($hDay,$hMonth,$hYear)=explode(\".\",$month[$i][\"date\"]);\n $hDate=$hYear.\"-\".$hMonth.\"-\".$hDay;\n if ($hDate==$holiday['date']){\n $month[$i]['type']=$holiday['holiday_type_id'];\n $month[$i]['time']=$holiday['time'];\n }\n }\n }\n return $month;\n }", "title": "" }, { "docid": "455e0d090f8fda55073851d8ca2e75f7", "score": "0.4705897", "text": "private function getBlankDays($blanks,$pos)\n {\n $blank_days = $blanks;\n $blank_array = [];\n $day_count = $pos == 'begin' ? 1 : 6;\n $lastMonthLastDay = $this->getPreviousMonthDay($this->month,$this->year) - $blanks;\n $nextMonthFirstDay = $this->getNextMonthDay($this->month,$this->year);\n $nextMonth = $this->getNextMonth($this->month,$this->year);\n $prevMonth = $this->getPreviousMonth($this->month, $this->year);\n\n if($pos == 'begin')\n {\n\n while($blank_days > 0)\n {\n $lastMonthLastDay = $lastMonthLastDay + 1;\n $year = $prevMonth == 12 ? $this->year - 1 : $this->year;\n $date = $this->getDate($prevMonth .'/'.$lastMonthLastDay.'/'. $year);\n array_push($blank_array,[\"day\"=>$lastMonthLastDay,\"today\"=>\"\",\"date\"=>$date,\"events\"=>[]]);\n $blank_days = $blank_days - 1;\n }\n $day_count ++;\n\n }\n else\n {\n\n while($blank_days < 6)\n {\n $year = $nextMonth == 1 ? $this->year + 1 : $this->year;\n $date = $this->getDate($nextMonth .'/'. $nextMonthFirstDay .'/'. $year);\n array_push($blank_array,[\"day\"=>$nextMonthFirstDay,\"today\"=>\"\",\"date\"=>$date,\"events\"=>[]]);\n $nextMonthFirstDay = $nextMonthFirstDay + 1;\n $blank_days = $blank_days + 1;\n }\n $day_count --;\n\n }\n\n return $blank_array;\n }", "title": "" }, { "docid": "3e39dc952b8961e6acbeb0777d1095d4", "score": "0.47051743", "text": "function getHolidays($date) {\n die('Error: pure virtual function NativeCalendar::getHoliday() called');\n }", "title": "" }, { "docid": "a80381d99b194531b06a1fbff223855d", "score": "0.47017372", "text": "function day_summary_for_station($station_symbol, $day) {\n // local function to produce SQL queries\n $make_query = function ($station_id, $parameter_id, $date) {\n $query = \"SELECT wert FROM moswerte WHERE station_id = $station_id AND parameter_id = $parameter_id AND Datumzeit = '$date'\";\n return $query;\n };\n\n // local function to run SQL queries\n $run_query = function ($name, $query) {\n $value = '';\n $result = mysql_query($query[$name]) OR die (mysql_error());\n while ($row = mysql_fetch_assoc($result))\n {\n $value = $row['wert'];\n } \n return $value;\n };\n\n // current station\n $station = array();\n $station['symbol'] = $station_symbol;\n $station['id'] = station_id_for($station_symbol);\n $station['name'] = station_name_for($station_symbol);\n\n $query['temp_min'] = $make_query( $station['id'], 4, $day . ' 06:00:00' );\n $query['temp_max'] = $make_query( $station['id'], 2, $day . ' 18:00:00' );\n\n $query['sun_time'] = $make_query( $station['id'], 701, date('Y-m-d 00:00:00', strtotime($day . ' + 1 day')) );\n $query['rain_amount'] = $make_query( $station['id'], 405, date('Y-m-d 00:00:00', strtotime($day . ' + 1 day')) );\n\n $query['clouds_12'] = $make_query( $station['id'], 552, $day . ' 12:00:00' );\n $query['clouds_18'] = $make_query( $station['id'], 552, $day . ' 18:00:00' );\n $query['clouds_00'] = $make_query( $station['id'], 552, date('Y-m-d 00:00:00', strtotime($day . ' + 1 day')) );\n\n $query['weather_12'] = $make_query( $station['id'], 353, $day . ' 12:00:00' );\n $query['weather_18'] = $make_query( $station['id'], 353, $day . ' 18:00:00' );\n $query['weather_00'] = $make_query( $station['id'], 353, date('Y-m-d 00:00:00', strtotime($day . ' + 1 day')) );\n\n $station['temp_min'] = $run_query('temp_min', $query);\n $station['temp_max'] = $run_query('temp_max', $query);\n\n $station['sun_time'] = $run_query('sun_time', $query);\n $station['rain_amount'] = $run_query('rain_amount', $query);\n\n $station['clouds_12'] = $run_query('clouds_12', $query);\n $station['clouds_18'] = $run_query('clouds_18', $query);\n $station['clouds_00'] = $run_query('clouds_00', $query);\n\n $station['weather_12'] = $run_query('weather_12', $query);\n $station['weather_18'] = $run_query('weather_18', $query);\n $station['weather_00'] = $run_query('weather_00', $query);\n\n $station['icon_12'] = $station['icon'] = substr( basename(symbol($station['clouds_12'], $station['weather_12'], 12)), 0, -4 ); \n $station['icon_18'] = $station['icon'] = substr( basename(symbol($station['clouds_18'], $station['weather_18'], 18)), 0, -4 ); \n $station['icon_00'] = $station['icon'] = substr( basename(symbol($station['clouds_00'], $station['weather_00'], 0)), 0, -4 ); \n\n return $station;\n\n}", "title": "" }, { "docid": "e9f6fc910840de813d5c932e877152ee", "score": "0.46988967", "text": "function closeDay(){\n\t\tif(rand(1,2) == 1) {\n\t\t\tplaceBetsRandomlyFromOtherUsers();\n\t\t\trandomlyAddGame();\n\t\t\tif(rand(1,6) == 2) {\n\t\t\t\trandomlyAddGame();\n\t\t\t}\n\t\t\t\n\t\t\trandomlyPlayThisDayGame();\n\t\t\tdistributeWinningPoints(getCurrentGameId(), getWinnerForTheGame(getCurrentGameId()));\n\t\t\taddDay();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8fb61be75f3a397511751f99598fbbbf", "score": "0.46966523", "text": "public function index()\n {\n $branchesclosed = BranchesClosed::getAllBranchesClosed();\n return BranchesClosedResource::collection($branchesclosed);\n }", "title": "" }, { "docid": "d780f8904324ab20d5776defb05b2f7f", "score": "0.46957818", "text": "public function findAllOpen()\n {\n return $this->app[\"db\"]->fetchAll('SELECT chamados_sac.ID_SAC, chamados_sac.CODIGO_CONTRATO, chamados_sac.CODIGO, chamados_sac.ENDERECO, chamados_sac.STATUS, chamados_sac.RP_ABERTURA, chamados_sac.PRIORIDADE,\n chamados_sac.DATA_ABERTURA, prestadores_financeiro.ID_FINANCEIRO\n FROM chamados_sac\n LEFT JOIN prestadores_financeiro ON prestadores_financeiro.ID_CHAMADO = chamados_sac.ID_SAC\n WHERE status = ?',array('aberta'));\n }", "title": "" }, { "docid": "9f786b751b40fd866bb54da744f4f3d9", "score": "0.46954608", "text": "public function getHistoricalData()\n {\n }", "title": "" }, { "docid": "abb23348869d29aacdc939795abf10c5", "score": "0.46941358", "text": "public function getAllByDateDesc();", "title": "" }, { "docid": "d935bcb6d9da27cebade23a58dbaae9b", "score": "0.4687574", "text": "function getReceiveTransferClosingEntry($data)\n\t{\n\t\t$sql = \" SELECT\n \t\tSUM(td.qtyReceive) AS qtyReceive\n \tFROM\n \t\tst_transfer_receive AS t,\n \t\t`st_transfer_receive_detail` td\n \tWHERE t.id=td.receiveId \";\n\n\t\tif (!empty($data['start_date'])) {\n\t\t\t$from_date = (empty($data['start_date'])) ? '1' : \" t.receiveDate >= '\" . $data['start_date'] . \" 00:00:00'\";\n\t\t\t$to_date = (empty($data['end_date'])) ? '1' : \" t.receiveDate < '\" . $data['end_date'] . \" 00:00:00'\";\n\t\t\t$sql .= \" AND \" . $from_date . \" AND \" . $to_date;\n\t\t}\n\n\t\tif (!empty($data['projectId'])) {\n\t\t\t$sql .= \" AND t.projectId=\" . $data['projectId'];\n\t\t}\n\t\tif (!empty($data['proId'])) {\n\t\t\t$sql .= \" AND td.proId=\" . $data['proId'];\n\t\t}\n\t\t$sql .= \" GROUP BY td.proId \";\n\t\treturn $this->getAdapter()->fetchOne($sql);\n\t}", "title": "" }, { "docid": "2cc4f3fb54994091d74ea86055a5c3d2", "score": "0.46867937", "text": "public function closing_save(Request $r){\n $closing_date = date('Y-m-d',strtotime($r->closing_date));\n $closing = DB::table('cash_closings')->whereDate('closing_date',$closing_date)->exists();\n if($closing == false){\n $cash = new CashClosing();\n $cash->closing_date = $closing_date;\n $cash->lastday_balance = $r->lastday_balance;\n $cash->receipt = $r->receipt;\n $cash->payment = $r->payment;\n $cash->balance = $r->current_balance;\n $cash->save();\n\n return redirect()->route('admin.cash.closing_index')->with('success','Cash Closing Save Success');\n }else{\n return redirect()->back()->with('error','Woops! this day`s cash has been closed');\n }\n }", "title": "" }, { "docid": "31e703b2ff83ca7a7d1f57577b72c199", "score": "0.46775806", "text": "public function getCloseReportType() {\r\n return inship_fedexship_get($this->handle, 4 );\r\n }", "title": "" }, { "docid": "f4f8ee950c12e9c25c4ab68852da287a", "score": "0.46709836", "text": "function getRecordDates($noOfDays){\n\t$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);\n\t// Check connection\n\tif ($conn->connect_error) {\n\t\tdie(\"Connection failed: \" . $conn->connect_error);\n\t}\n\t/* create a prepared statement */\n\t$stmt = $conn->prepare(\"SELECT DISTINCT timestamp FROM daily_candlesticks_fo ORDER BY timestamp desc limit ?\");\n\n /* bind parameters for markers */\n $stmt->bind_param(\"s\", $noOfDays);\n\n /* execute query */\n $stmt->execute();\n\n /* bind result variables */\n $stmt->bind_result($timestamp);\n\t// Loop the results and fetch into an array\n\t$dates = array();\n\twhile ($stmt->fetch()) {\n\t\t$dates[] = $timestamp;\n\t}\n\t\n\t$stmt->close();\n\t$conn->close();\n\t\n\treturn $dates;\n}", "title": "" }, { "docid": "31622ae653165ec717df81f1353ed42f", "score": "0.46624613", "text": "public function daily()\n {\n return $this->createPlan(0, 0, 0);\n }", "title": "" }, { "docid": "326fc639043a7ad467b457a2c3c9a042", "score": "0.46576455", "text": "private function getPeriod($closing_type)\n {\n // home help is always the previous month\n if (MonthlyClosing::HOMEHELP == $closing_type) {\n $start = new \\DateTime('first day of last month');\n $end = new \\DateTime('last day of last month');\n $process_title = 'Gondozás zárás';\n }\n elseif (MonthlyClosing::MONTHLY == $closing_type) {\n // next month\n $start = new \\DateTime('first day of next month');\n $end = new \\DateTime('last day of next month');\n $process_title = 'Havi zárás';\n } else {\n // actual month\n $start = new \\DateTime('+1 day');\n $process_title = 'Napi zárás';\n // after the monthly closing, the daily closing also must create the orders and invoice for the next month\n if (date('j') < 25) {\n $end = new \\DateTime('last day of this month');\n } else {\n $end = new \\DateTime('last day of next month');\n }\n }\n\n return array($start, $end, $process_title);\n }", "title": "" }, { "docid": "3ca4f573d6d08e2083dfb81ad86b9a69", "score": "0.46467343", "text": "function days()\r\n{\t\t\r\n\tglobal $gConfig;\t\t\r\n\tif($_GET['period'] == 'month')\r\n\t{\r\n\t\tif(isset($_GET['date']))\r\n\t\t{\r\n\t\t\t$date = $_GET['date']; \r\n\t\t\t$mdate = explode(\"-\",$date);\r\n\t\t\t$m = $mdate[1];\r\n\t\t\t$y = $mdate[0];\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$date = date(\"Y-m\");\r\n\t\t\t$m = date(\"m\");\r\n\t\t\t$y = date(\"Y\");\r\n\t\t}\r\n\t\t\r\n\t\tprint '<a href=\"' . $gConfig['site_url'] . 'admin/stat_banners.php?period='.$_GET['period'].'&action=days&date='.date(\"Y-m\",mktime(5,5,5,$m-1,5,$y)).'\">'.date(\"Y-m\",mktime(5,5,5,$m-1,5,$y)).'</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\tprint '<b>'.$date.'</b> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\tif ($date != date(\"Y-m\")) \r\n\t\t\tprint '<a href=\"' . $gConfig['site_url'] . 'admin/stat_banners.php?period='.$_GET['period'].'&action=days&date='.date(\"Y-m\",mktime(5,5,5,$m+1,5,$y)).'\">'.date(\"Y-m\",mktime(5,5,5,$m+1,5,$y)).'</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\t$cond = \" Date like '{$date}%'\";\r\n\t}\r\n\telseif($_GET['period'] == 'week')\r\n\t{\r\n\t\tif(isset($_GET['date']))\r\n\t\t{\r\n\t\t\t$date = $_GET['date']; \r\n\t\t\t$y = substr($date,0,4);\r\n\t\t\t$w = substr($date,4);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$date = date(\"YW\");\r\n\t\t\t$y = date('Y');\r\n\t\t\t$w = date('W');\r\n\t\t}\r\n\t\t\r\n\t\tprint '<a href=\"' . $gConfig['site_url'] . 'admin/stat_banners.php?period='.$_GET['period'].'&action=days&date='.(($w-1)<1?($y-1).'52':$y.($w-1)).'\">'.(($w-1)<1?'52/'.($y-1):($w-1).'/'.$y).'</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\tprint '<b>'.$w.'/'.$y.'</b> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\tif ($date != date(\"YW\")) \r\n\t\t\tprint '<a href=\"' . $gConfig['site_url'] . 'admin/stat_banners.php?period='.$_GET['period'].'&action=days&date='.(($w+1)>52?($y+1).'1':$y.($w+1)).'\">'.(($w+1)>52?'1/'.($y+1):($w+1).'/'.$y).'</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\t$cond = \" Week='{$date}'\";\r\n\t}\r\n\telse \r\n\t{\r\n\t\tif(isset($_GET['date']))\r\n\t\t{\r\n\t\t\t$date = $_GET['date']; \r\n\t\t\t$mdate = explode(\"-\",$date);\r\n\t\t\t$d = $mdate[2];\r\n\t\t\t$m = $mdate[1];\r\n\t\t\t$y = $mdate[0];\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\t$date = date(\"Y-m-d\");\r\n\t\t\t$d = date(\"d\");\r\n\t\t\t$m = date(\"m\");\r\n\t\t\t$y = date(\"Y\");\r\n\t\t}\r\n\t\t\r\n\t\tprint '<a href=\"' . $gConfig['site_url'] . 'admin/stat_banners.php?period='.$_GET['period'].'&action=days&date='.date(\"Y-m-d\",mktime(5,5,5,$m,$d-1,$y)).'\">'.date(\"Y-m-d\",mktime(5,5,5,$m,$d-1,$y)).'</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\tprint '<b>'.$date.'</b> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\tif ($date != date(\"Y-m-d\")) \r\n\t\t\tprint '<a href=\"' . $gConfig['site_url'] . 'admin/stat_banners.php?period='.$_GET['period'].'&action=days&date='.date(\"Y-m-d\",mktime(5,5,5,$m,$d+1,$y)).'\">'.date(\"Y-m-d\",mktime(5,5,5,$m,$d+1,$y)).'</a> &nbsp;&nbsp;|&nbsp;&nbsp; ';\r\n\t\t$cond = \" Date='{$date}'\";\r\n\t}\r\n\t\r\n\tprint '<br><br><table width=100%>\r\n\t<tr><td><b>Banner</b></td><td><b>Clicks</b></td><td><b>Clicks from Unique IP</b></td><td><b>Shows</b></td></tr>';\r\n\t$bannersq = mysql_query(\"select * from Banners\");\r\n\twhile($bannersa = mysql_fetch_assoc($bannersq)) \r\n\t{\r\n\t\t$tempq = mysql_query(\"select * from BannersShows where ID={$bannersa['ID']} and $cond\");\r\n\t\t$numshows = mysql_numrows($tempq);\r\n\t\t$tempq = mysql_query(\"select * from BannersClicks where ID={$bannersa['ID']} and $cond\");\r\n\t\t$numclicks = mysql_numrows($tempq);\r\n\t\t$tempq = mysql_query(\"select * from BannersClicks where ID={$bannersa['ID']} and $cond group by IP\");\r\n\t\t$numclicksq = mysql_numrows($tempq);\r\n\t\tprint '<tr><td>'.$bannersa['Title'].'</td><td>'.$numclicks.'</td><td>'.$numclicksq.'</td><td>'.$numshows.'</td></tr>';\r\n\t}\r\n\tprint '</table>';\t\r\n}", "title": "" }, { "docid": "eceb79c10cdbded9a97637759594df16", "score": "0.46412197", "text": "public function completed_schedules_daily()\n {\n $completedSchedulesDaily = $this->daily_scope('pickupdate', $this->completed_schedules());\n\n return $completedSchedulesDaily;\n }", "title": "" }, { "docid": "9473c6435c3467a8deb83ef2b2ff683c", "score": "0.4638244", "text": "private function getHolidays() {\n if (NULL == $this->holidays) {\n $this->holidays = Holidays::getInstance();\n }\n return $this->holidays;\n }", "title": "" }, { "docid": "e4cffcf848fcb6f18521bbf9e3c34a60", "score": "0.46360523", "text": "public function getHolidays()\n {\n return $this->holidays;\n }", "title": "" }, { "docid": "1db4a180d0394de6626995877ce94bf1", "score": "0.46296802", "text": "public function getHalfDayMarkerEntriesPM() {\n\t\t$entries = \\OOEntryQuery::create()\n\t\t\t\t\t\t\t\t->filterByOOBooking($this)\n\t\t\t\t\t\t\t\t->filterByType(\\OOEntry::TYPE_MARKER_HALF_DAY_PM)\n\t\t\t\t\t\t\t\t->find();\n\t\t\t\t\t\t\t\t\n\t\treturn $entries;\n\t}", "title": "" }, { "docid": "be3523aeb32cc4a3924326e391358203", "score": "0.4618236", "text": "public function subBusinessHourProvider(): array\n {\n return [\n ['Wednesday 2018-05-23 10:00', 'Wednesday 2018-05-23 09:00'],\n ['Wednesday 2018-05-23 10:15', 'Wednesday 2018-05-23 09:15'],\n ['Wednesday 2018-05-23 10:30', 'Wednesday 2018-05-23 09:30'],\n ['Wednesday 2018-05-23 10:45', 'Wednesday 2018-05-23 09:45'],\n ['Wednesday 2018-05-23 11:00', 'Wednesday 2018-05-23 10:00'],\n ['Wednesday 2018-05-23 12:00', 'Wednesday 2018-05-23 11:00'],\n ['Wednesday 2018-05-23 13:00', 'Wednesday 2018-05-23 12:00'],\n ['Wednesday 2018-05-23 14:00', 'Wednesday 2018-05-23 13:00'],\n ['Wednesday 2018-05-23 15:00', 'Wednesday 2018-05-23 14:00'],\n ['Wednesday 2018-05-23 16:00', 'Wednesday 2018-05-23 15:00'],\n ['Wednesday 2018-05-23 17:00', 'Wednesday 2018-05-23 16:00'],\n ['Wednesday 2018-05-23 18:00', 'Wednesday 2018-05-23 16:00'],\n ['Wednesday 2018-05-23 23:00', 'Wednesday 2018-05-23 16:00'],\n ['Monday 2018-05-21 00:00', 'Friday 2018-05-18 16:00'],\n ['Monday 2018-05-21 09:00', 'Friday 2018-05-18 16:00'],\n ['Monday 2018-05-21 09:30', 'Friday 2018-05-18 16:30'],\n ['Sunday 2018-05-20 02:00', 'Friday 2018-05-18 16:00'],\n ['Saturday 2018-05-19 03:00', 'Friday 2018-05-18 16:00'],\n ];\n }", "title": "" }, { "docid": "ba36abe62c56102e6f1dd98451a41d5b", "score": "0.46180204", "text": "public function addClosedDate() {\n $this->autoRender = false;\n if ($this->request->data) {\n $this->request->data = $this->Common->trimValue($this->request->data);\n $data['store_id'] = $this->Session->read('admin_store_id');\n $holidayDate = $this->Dateform->formatDate($this->request->data['StoreHoliday']['holiday_date']);\n $data['holiday_date'] = trim($holidayDate);\n $data['description'] = trim($this->request->data['StoreHoliday']['description']);\n if ($this->StoreHoliday->storeHolidayNotExists($holidayDate)) {\n if ($this->StoreHoliday->saveStoreHolidayInfo($data)) {\n $this->Session->setFlash(__(\"Closed Holiday Successfully added\"), 'alert_success');\n $this->redirect(array('controller' => 'Stores', 'action' => 'manageTimings'));\n } else {\n $this->Session->setFlash(__(\"Some Problem occured\"), 'alert_failed');\n $this->redirect(array('controller' => 'Stores', 'action' => 'manageTimings'));\n }\n } else {\n $this->Session->setFlash(__(\"Closed Date already exists\"), 'alert_failed');\n $this->redirect(array('controller' => 'Stores', 'action' => 'manageTimings'));\n }\n }\n }", "title": "" }, { "docid": "5a4a2216b0c4b1eaa3ccef5c7e8ce197", "score": "0.4615801", "text": "function get_date_list($branch_id=null,$member_id=null,$samity_id=null,$product_id=null)\n\t{\n\t\t//Transaction Date is collected from loan advance collection Register \n\t\t$date_info_sql_loan_advance_collection_register=\"SELECT transaction_date FROM loan_advance_collection_register,loans \n\t\t where loans.member_id=? and loan_advance_collection_register.product_id=? and loans.id=loan_advance_collection_register.loan_id\";\n $date_info_sql_loan_advance_collection_register=$this->db->query($date_info_sql_loan_advance_collection_register,array($member_id,$product_id));\n\t\tforeach ($date_info_sql_loan_advance_collection_register->result_array() as $date_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$date_info_row['transaction_date']]['date']=$date_info_row['transaction_date'];\n\t\t\t\t// $date_info[$date_info_row['schedule_date']]['recoverable_amount']=$date_info_row['recoverable_amount'];\n\t\t\t\t$date_info[$date_info_row['transaction_date']]['installment_number']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_amount']=0;\n\t\t}\n\t\t// Transaction Date is collected from loan due collection Register\n\t\t$date_info_sql_loan_due_collection_register=\"SELECT transaction_date FROM loan_due_collection_register,loans \n\t\t where loans.member_id=? and loan_due_collection_register.product_id=? and loans.id=loan_due_collection_register.loan_id\";\n $date_info_sql_loan_due_collection_register=$this->db->query($date_info_sql_loan_due_collection_register,array($member_id,$product_id));\n\t\tforeach ($date_info_sql_loan_due_collection_register->result_array() as $date_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$date_info_row['transaction_date']]['date']=$date_info_row['transaction_date'];\n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_number']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_amount']=0;\n\t\t}\n\t\t// Transaction Date is collected from Saving Deposit\n\t\t$date_info_sql_deposits=\"SELECT transaction_date FROM saving_deposits \n\t\t where saving_deposits.member_id=? and saving_deposits.member_primary_product_id=?\";\n $date_info_sql_deposits=$this->db->query($date_info_sql_deposits,array($member_id,$product_id));\n\t\tforeach ($date_info_sql_deposits->result_array() as $date_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$date_info_row['transaction_date']]['date']=$date_info_row['transaction_date'];\n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_number']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_amount']=0;\n\t\t}\n\t\t//Transaction Date is collected from Loan Transaction Table\n\t\t$date_info_sql_loan_transactions=\"SELECT transaction_date FROM loan_transactions,loans \n\t\t where loans.member_id=? and loan_transactions.product_id=? and loans.id=loan_transactions. loan_id\";\n $date_info_sql_loan_transactions=$this->db->query($date_info_sql_loan_transactions,array($member_id,$product_id));\n\t\tforeach ($date_info_sql_loan_transactions->result_array() as $date_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$date_info_row['transaction_date']]['date']=$date_info_row['transaction_date'];\n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_number']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_amount']=0;\n\t\t}\n\t\t// Transaction Date is collected from saving_withdraw table\n $date_info_sql_withdraws=\"SELECT transaction_date FROM saving_withdraws\n where saving_withdraws.member_id=? and saving_withdraws.member_primary_product_id=? \";\n $date_info_sql_withdraws=$this->db->query($date_info_sql_withdraws,array($member_id,$product_id)); \n \n\t\tforeach ($date_info_sql_withdraws->result_array() as $date_info_row)\t\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$date_info_row['transaction_date']]['date']=$date_info_row['transaction_date'];\n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_number']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_amount']=0;\n\t\t}\n\t\t// Get Recoverable Amount,Schedule Date,installment number from scheduler1.php\n\t\t $date_info_sql_loan_schedule = $this->scheduler1->get_loan_schedules_by_memeberlist_branch_product(array($member_id),$branch_id,$product_id,$samity_id);\n\t\t //echo \"<pre>\";print_r($date_info_sql_loan_schedule);die;\n\t\tforeach ($date_info_sql_loan_schedule as $date_info_rows)\n\t\t{\t\n\t\t\tforeach ($date_info_rows as $date_info_row1)\n\t\t\t{\t\n\t\t\t\tforeach ($date_info_row1 as $date_info_row)\n\t\t\t{\n\t\t\t\t//echo \"<pre>\";print_r($date_info_row);die;\t\t\t\t\n\t\t\t\t$date_info[$date_info_row['schedule_date']]['date']=$date_info_row['schedule_date'];\n\t\t\t\t// $date_info[$date_info_row['schedule_date']]['recoverable_amount']=$date_info_row['recoverable_amount'];\n\t\t\t\t$date_info[$date_info_row['schedule_date']]['installment_number']=$date_info_row['installment_number'];\n\t\t\t$date_info[$date_info_row['schedule_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['schedule_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['schedule_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['schedule_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['schedule_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['schedule_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['schedule_date']]['installment_amount']=$date_info_row['installment_amount']; \n\t\t\t}\n\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (!empty($date_info))\n\t\tksort($date_info); // Sort All Transaction Date\n\t\t// Get weekly deposit\n $saving_deposit_info=$this->get_saving_deposit_information($member_id,$product_id);\n foreach ($saving_deposit_info as $saving_deposit_info_row)\n\t\t{\t\t\t\n\t\t\t$date_info[$saving_deposit_info_row['saving_date']]['weekly_deposit']=$saving_deposit_info_row['weekly_deposit']; \t\t\t\n\t\t}\n\t\t// Get Saving Refund\n\t\t$saving_withdraw_info=$this->get_saving_withdraw_information($member_id,$product_id);\n\n foreach ($saving_withdraw_info as $saving_withdraw_info_row)\n\t\t{\t\t\t\n\t\t\t$date_info[$saving_withdraw_info_row['withdraw_date']]['saving_refund']=$saving_withdraw_info_row['saving_refund']; \n\t\t\t$date_info[$date_info_row['withdraw_date']]['installment_number']=0;\n\t\t\t$date_info[$date_info_row['withdraw_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['withdraw_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['withdraw_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['withdraw_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['withdraw_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['withdraw_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['withdraw_date']]['installment_amount']=0;\t\t\t\n\t\t}\n\t\t// Get Weekly Recovery,current repay week no and current outstanding amount\n\t\t$loan_info=$this->get_loan_info($member_id,$product_id);\n foreach ($loan_info as $loan_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$loan_info_row['transaction_date']]['weekly_recovery']=$loan_info_row['weekly_recovery'];\n $date_info[$loan_info_row['transaction_date']]['current_repay_week_no']=$loan_info_row['current_repay_week_no'];\n $date_info[$loan_info_row['transaction_date']]['current_outstanding_amount']=$loan_info_row['current_outstanding_amount'];\n $date_info[$date_info_row['transaction_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['advance_collection_amount']=0;\n\t\t\t$date_info[$date_info_row['transaction_date']]['due_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['transaction_date']]['installment_amount']=0;\n \t\t\t\n\t\t}\n\t\t// Get Advance Collection Amount\n\t\t$loan_advance_collection_info=$this->get_loan_advance_collection_info($member_id,$product_id);\n foreach ($loan_advance_collection_info as $loan_advance_collection_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$loan_advance_collection_info_row['advance_collection_date']]['advance_collection_amount']=$loan_advance_collection_info_row['advance_collection_amount'];\t\n\t\t\t$date_info[$date_info_row['advance_collection_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['advance_collection_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['advance_collection_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['advance_collection_date']]['advance_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['advance_collection_date']]['installment_amount']=0;\n\t\t}\n\t\t// Get Due Collection Amount\n\t\t$loan_due_collection_info=$this->get_loan_due_collection_info($member_id,$product_id);\n foreach ($loan_due_collection_info as $loan_due_collection_info_row)\n\t\t{\t\t\t\t\t\t\t\n\t\t\t$date_info[$loan_due_collection_info_row['due_collection_date']]['due_collection_amount']=$loan_due_collection_info_row['due_collection_amount'];\n\t\t\t $date_info[$date_info_row['due_collection_date']]['weekly_deposit']=0;\n\t\t\t$date_info[$date_info_row['due_collection_date']]['saving_refund']=0;\n\t\t\t$date_info[$date_info_row['due_collection_date']]['weekly_recovery']=0;\n\t\t\t$date_info[$date_info_row['due_collection_date']]['repay_week_no']=0;\n\t\t\t$date_info[$date_info_row['due_collection_date']]['advance_collection_amount']=0; \n\t\t\t$date_info[$date_info_row['due_collection_date']]['installment_amount']=0;\n\t\t}\n\t\treturn $date_info;\t\n\t}", "title": "" }, { "docid": "e2238d2c85b807691d7e35b1323bdbbe", "score": "0.46110904", "text": "public function getSaleDaily()\n {\n $sale_daily = [];\n $factors = Factor::select('id', 'total_price', 'status', 'created_at')\n ->where('status', '>', '2')\n ->orderBy('created_at', 'asc')\n ->get();\n\n $day_carbon = $factors->first()->created_at;\n $day_timestamp = $day_carbon->timestamp;\n\n while( $day_carbon <= Carbon::now() )\n {\n $sale_daily[] = [\n $day_timestamp * 1000, \n $factors->where('created_at', '>=', $day_carbon)\n ->where('created_at', '<', $day_carbon->addDays(1))\n ->sum('total_price')\n ];\n $day_timestamp += 86400; \n $day_carbon = $day_carbon->addDays(1);\n }\n\n return $sale_daily;\n }", "title": "" }, { "docid": "9cda11830d317db29541c923984da423", "score": "0.4608206", "text": "static function getClosedInfo($topic_id)\n {\n \n \n $stmt = DBManager::get()->prepare(\"SELECT closed\n FROM forum_entries\n WHERE topic_id = ?\");\n $stmt->execute(array($topic_id));\n\n $info = $stmt->fetchColumn();\n \n\n return $info;\n }", "title": "" }, { "docid": "685b2e3b131a29bd862fbe182a101bb3", "score": "0.46048614", "text": "public function getClosedCount(): int;", "title": "" }, { "docid": "ed1e1b805428ed8f6e855b9de0c3d451", "score": "0.46046644", "text": "function getMonthlyPriceRange($symbol,$lowerPrice=0,$upperPrice=0){\n\t$queryResults=getDatabaseRecords($symbol);\n\tif(empty($queryResults)){\n\t\techo(\"No Result to Display, data not present.\");\n\t\treturn;\n\t}\n\techo(\"<b>Symbol : </b>\".strtoupper($symbol).\"&nbsp;&nbsp;\");\n\techo(\"<b>Start Date &nbsp; : &nbsp;</b>\".$queryResults[0]['recorddate']);\n\techo(\"<b>&nbsp;&nbsp;End Date &nbsp; : &nbsp;</b>\".$queryResults[count($queryResults)-1]['recorddate'].\"<br/>\");\n\t\n\t$startDate=null;\n\t$endDate=null;\n\t$high=0;\n\t$low=0;\n\t$open=0;\n\t$close=0;\n\t$i=0;\n\t\n\tforeach($queryResults as $result){\n\t\t$todaysDate = new DateTime($result['recorddate'], new DateTimeZone(\"Asia/Kolkata\"));\n\t\t$nextRecord = $queryResults[$i+1<count($queryResults)?$i+1:count($queryResults)-1];\n\t\t$tomorrowsDate = new DateTime($nextRecord['recorddate'], new DateTimeZone(\"Asia/Kolkata\"));\n\t\t\n\t\t//To check start of calculation period of the month\n\t\tif($startDate==null){\n\t\t\t$startDate=$result['recorddate'];\n\t\t\t$currentMonth=$todaysDate->format('m');\n\t\t\t$open=$result['open'];\n\t\t\t$high=$result['high'];\n\t\t\t$low=$result['low'];\n\t\t}\n\t\t//To calculate High and Low\n\t\tif($result['high']>$high){\n\t\t\t$high=$result['high'];\n\t\t}\n\t\tif($result['low']<$low){\n\t\t\t$low=$result['low'];\n\t\t}\n\t\t//To get end of calculation period for the month.\n\t\tif($currentMonth != $tomorrowsDate->format('m') || count($queryResults)==$i+1){\n\t\t\t$endDate=$result['recorddate'];\n\t\t\t$close=$result['close'];\n\t\t\t\n\t\t\t$monthlyResults[] = array('startDate' => $startDate,\n\t\t\t'endDate' => $endDate,\n\t\t\t'open'=>$open,\n\t\t\t'close'=>$close,\n\t\t\t'high'=>$high,\n\t\t\t'low'=>$low);\n\t\t\t\n\t\t\t$startDate=null;\n\t\t\t$endDate=null;\n\t\t}\n\t\t$i++;\n\t}\n\t//Printing the results\n\t$k=1;\n\techo(\"</br>Months on which <b>\".strtoupper($symbol).\"</b> traded below<b>$lowerPrice</b> or traded above <b>$upperPrice</b></br></br>\");\n\techo(\"<table class='table table-striped'><tr><th>Sl No.</th><th>Start Date</th><th>End Date</th><th>Days</th><th>Month's High</th><th>Month's Low</th><th>Open - Close</th></tr>\");\n\tforeach($monthlyResults as $monthResult){\n\t\t$maxUp=$monthResult['high']-$monthResult['open'];\n\t\t$maxDown=$monthResult['low']-$monthResult['open'];\n\t\t$priceDiff=abs($monthResult['open']-$monthResult['close']);\n\t\tif($maxUp>=$upperPrice || $maxDown<=$lowerPrice){\n\t\t\techo(\"<tr><td>\".$k.\"</td><td>\".$monthResult['startDate'].\"</td><td>\".$monthResult['endDate'].\"</td><td>\".getDayDifference($monthResult['startDate'],$monthResult['endDate']).\"</td><td>\".$maxUp.\"</td><td>\".$maxDown.\"</td><td>\".$priceDiff.\"</td></tr>\");\n\t\t\t$k++;\n\t\t}\n\t}\n\techo(\"</table>\");\t\n}", "title": "" }, { "docid": "59b893bfdef7bc4694f26a96da1b49b6", "score": "0.4602198", "text": "public function schedules_daily()\n {\n $schedulesDaily = $this->daily_scope('pickupdate', $this->schedules());\n\n return $schedulesDaily;\n }", "title": "" }, { "docid": "3191d5ba368eafde6c4bd76651520403", "score": "0.45984343", "text": "public function getOpeningHoursDataAttribute()\n {\n $weekdays = self::getWeekdays();\n $values = $this->hours->mapWithKeys(function ($day) use ($weekdays) {\n $key = $weekdays[$day->weekday] ?? $day->weekday;\n $values = self::toTimeRange($day->hours);\n if ($day->note !== '') {\n $values['data'] = $day->note;\n }\n\n return [$key => $values];\n })->filter();\n\n $values['exceptions'] = $this->exceptions->mapWithKeys(function ($exception) {\n $format = $exception->yearly ? 'm-d' : 'Y-m-d';\n $key = $exception->for_date->format($format);\n $values = self::toTimeRange($exception->hours);\n if ($exception->note !== '') {\n $values['data'] = $exception->note;\n }\n\n return [$key => $values];\n });\n\n $values['overflow'] = true;\n\n return $values->toArray();\n }", "title": "" }, { "docid": "40dead42b62f5652c497047700e622d3", "score": "0.4594641", "text": "public function getDates()\n {\n return ['created_at', 'updated_at', 'openingbalancedate'];\n }", "title": "" } ]
8dce310cad6c1f39e8475676528b19af
Fires requested event by calling all its registered handlers.
[ { "docid": "cc8d8977ea2159097244ec73a2fdd826", "score": "0.62306446", "text": "protected function fire(Event $event)\n {\n $eventClass = get_class($event);\n if (!empty($this->handlers[$eventClass])) {\n foreach ($this->handlers[$eventClass] as $handler) {\n call_user_func($handler, $event);\n }\n }\n }", "title": "" } ]
[ { "docid": "892b36311161f020c422c9b92da371d7", "score": "0.66633755", "text": "abstract public function fire($event);", "title": "" }, { "docid": "ced05bb8cc33c3a4a7b36e616208269d", "score": "0.6616351", "text": "function fire(): void {\n ///echo 'onFire:', var_dump($this->_callbacks);\n foreach ($this->_callbacks as $i => $callback) {\n if (is_string($callback)) {\n call_user_func($callback, $this->owner);\n } else {\n call_user_func([$callback[0], $callback[1]], $this->owner);\n }\n }\n }", "title": "" }, { "docid": "6eee237e632d36ae582c8b9f7f7083c1", "score": "0.653374", "text": "public function fireEvent()\n {\n $args = func_get_args();\n $hook_id = array_shift($args);\n $no_timing_hooks = array('onAfterPageProcessed','onAfterFolderProcessed', 'onAfterCollectionProcessed');\n\n if (!empty($this->plugins)) {\n foreach ($this->plugins as $plugin) {\n if (is_callable(array($plugin, $hook_id))) {\n call_user_func_array(array($plugin, $hook_id), $args);\n }\n }\n }\n\n if ($this->config->get('system.debugger.log.timing') && !in_array($hook_id, $no_timing_hooks)) {\n static::log($hook_id.': %f ms');\n }\n }", "title": "" }, { "docid": "3cd39b7754fe12c4ced839037e399034", "score": "0.6316923", "text": "public function fireEvent($event, $data = false) {\n foreach ($this->listener as $value) {\n $value->actionPerformed($event, $data);\n }\n }", "title": "" }, { "docid": "a3aa5d5e8de1c1c8b8c9710ab41ffa66", "score": "0.6246576", "text": "public function dispatch() {\n EventBus::dispatch($this);\n }", "title": "" }, { "docid": "112221e629b530e24af8d5cfd9bcd181", "score": "0.62238246", "text": "abstract public function fire($action, $args);", "title": "" }, { "docid": "a1b8b3b167d426e01efef13fc67812f6", "score": "0.6222711", "text": "final public function Dispatch(): void {\n Modules::EventDispatcher()::Dispatch($this);\n }", "title": "" }, { "docid": "9586ce4157ce56350048238bfb26017f", "score": "0.61276305", "text": "public function fireEvent($eventName)\n {\n if (method_exists($this, $eventName)){\n $this->$eventName();\n }\n }", "title": "" }, { "docid": "48ef6c03765378e4d9053f62a9a004ec", "score": "0.5997916", "text": "public function raise(Event $event): void\n {\n if ($this->hasEventListener($event->Type)) {\n foreach ($this->listeners[$event->Type] as $listener) {\n $listener($event);\n }\n }\n }", "title": "" }, { "docid": "c7a826bfb366bdc6d2d6665920d86d3c", "score": "0.59491223", "text": "public static function fireEvent(Event $event) {\n\t\t\n\t\tif(empty(self::$listeners[get_class($event)])) return; // no listeners\n\n\t\tforeach(self::$listeners[get_class($event)] as $listenerInfos) {\n\t\t\t$instance = $listenerInfos['listener'];\n\t\t\t$method = $listenerInfos['method'];\n\t\t\t\n\t\t\t$instance->$method($event); // actual call\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "8177711fd30269785a208d2eae7e0366", "score": "0.5899502", "text": "public function trigger($event);", "title": "" }, { "docid": "a8cb4da615ee18702e117b36d0edab9a", "score": "0.5895292", "text": "function dispatch(){\n # variables, then in POST variables, and if not found\n # call the 'main' event\n\n if (\n array_key_exists($this->event_var,$_GET) && \n $_GET[$this->event_var] != '' &&\n $this->_isa_child_class_method($_GET[$this->event_var])\n ){\n $event = $_GET[$this->event_var];\n } elseif (\n array_key_exists($this->event_var,$_POST) && \n $_POST[$this->event_var] != '' &&\n $this->_isa_child_class_method($_POST[$this->event_var])\n ){\n $event = $_POST[$this->event_var];\n } else {\n $event = 'main';\n }\n\n # Invoke event; Make method call\n $this->$event();\n\n }", "title": "" }, { "docid": "65cddde5f441dd02b01dc2cb4764383c", "score": "0.5851693", "text": "public function handle()\n {\n $this->action();\n\n if (method_exists($this, 'fire')) {\n return parent::fire();\n } else {\n return parent::handle();\n }\n }", "title": "" }, { "docid": "50992cb1e6c7289e7fc6e521cee6262f", "score": "0.583963", "text": "public function fireEvent($event, array $args = []): array;", "title": "" }, { "docid": "2317199ad75b5cf3d719323dd5491902", "score": "0.5835905", "text": "public function dispatch() {\n\t\tforeach ( self::$handlers as $event => $args ) {\n\t\t\t$class\t= 'BB\\\\'. $event\n\t\t\t\n\t\t\tif ( null == $args ) {\n\t\t\t\tself::$loaded[] = new $class();\n\t\t\t} else {\n\t\t\t\tself::$loaded[] = new $class( $args );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f9b8cd77e00ba4bf814a8addaa59cb88", "score": "0.5820752", "text": "public function trigger(string $event, array $payload = []): void\n {\n $events = $this->getDispatchableEvents($event);\n\n if ($events->isEmpty()) {\n return;\n }\n\n foreach ($events as $event) {\n\n if (! $event->endpoint->shouldDeliverWebhook($event, $payload)) {\n continue;\n }\n\n $this->dispatchWebhook($event->endpoint, $event->endpoint->getWebhookPayload($event, $payload));\n }\n }", "title": "" }, { "docid": "26b4001a925af95f34abce17ca4c7e02", "score": "0.5776837", "text": "public function dispatch( string $event_name, ...$args );", "title": "" }, { "docid": "eeb34f1c89ebff1cf3ec6f1eee5c9aaa", "score": "0.5767155", "text": "private function firePendingEvents()\n\t{\n\t\tif (!empty($this->_pendingEvents)) {\n\t\t\tforeach ($this->_pendingEvents as $event) {\n\t\t\t\t$this->owner->trigger($event->name, $event);\n\t\t\t}\n\t\t\t$this->_pendingEvents = [];\n\n\t\t\tif ($this->_statusAccessor) {\n\t\t\t\t$this->_statusAccessor->commitStatus($this->owner);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3a5cebe5cad230799ca0a702b6723c63", "score": "0.5764703", "text": "function trigger ($eventName, $args);", "title": "" }, { "docid": "f0dd80191d532d79bf30f5e1a3bd314f", "score": "0.57604975", "text": "public function fire()\n {\n parent::fire();\n }", "title": "" }, { "docid": "d8cbf59a715afca23bbdd7bbc65570fd", "score": "0.56918585", "text": "private function dispatchEvent(string $eventName, FlushDataHandlerContext $context): void\n {\n $entityContexts = $context->getEntityContexts();\n foreach ($entityContexts as $entityContext) {\n $this->dispatch($eventName, $entityContext);\n $this->collectFormErrors($entityContext);\n }\n }", "title": "" }, { "docid": "87acceb46346509dc81d66d26c3dcd1b", "score": "0.56887984", "text": "public static function dispatch()\n {\n $uri = strtok($_SERVER[\"REQUEST_URI\"],'?');\n $qs = parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_QUERY);\n $method = $_SERVER['REQUEST_METHOD'];\n \n \n foreach (self::$routes as $name=>$route) {\n\n\n $route = self::parsePattern($route);\n\n $matched = array();\n if ($route=='' || preg_match('#' . $route . '#', $uri, $matched) && (self::$methods[$name] == 'ANY' || self::$methods[$name] == $method)) {\n \n array_shift($matched);\n\n if (self::$qs[$name]!='' && preg_match('#' . self::$qs[$name] . '#', $qs, $qsmatched)) {\n\n array_shift($qsmatched);\n\n $matched = array_merge($matched, $qsmatched);\n self::$catched[] = $name;\n BurpEvent::listen($name, self::$callbacks[$name]);\n BurpEvent::queue($name, $matched);\n\n } elseif (self::$qs[$name] == '') {\n self::$catched[] = $name;\n BurpEvent::listen($name, self::$callbacks[$name]);\n BurpEvent::queue($name, $matched);\n }\n }\n\n }\n\n //call missing if needed\n if (!is_null(self::$missing_callback) ) {\n $diff = array_diff(self::$tocatch, self::$catched);\n if (count($diff) >= count(self::$tocatch)) {\n call_user_func(self::$missing_callback);\n BurpEvent::listen('missing', self::$callbacks[$name]);\n BurpEvent::fire('missing');\n\n }\n\n }\n\n BurpEvent::flushAll();\n }", "title": "" }, { "docid": "7fe397597bf8417981fc454343749db0", "score": "0.5671724", "text": "public static function fire () {\n\n\t\t$request = Request::load();\n\n\t\tif ( $request->method === \"GET\" ) {\n\t\t\tVisitors::save();\n\t\t\tLayout::fire();\n\t\t} else if ( $request->method === \"POST\" ) {\n\t\t\tActions::fire();\n\t\t}\n\t}", "title": "" }, { "docid": "ce4b2d6a4d97c4e9a4796d77e44e4161", "score": "0.5641235", "text": "public function trigger($eventIdentifier, $data);", "title": "" }, { "docid": "4800e31d91ac1536c45b81441334f88b", "score": "0.5587945", "text": "public function dispatch($eventName,array $args=[]){\n $returns=[];\n if(isset($this->events[$eventName]))\n {\n foreach($this->events[$eventName] as $func){\n $returns[]=call_user_func_array($func, $args);\n }\n }\n return $returns;\n }", "title": "" }, { "docid": "7c15ca27f9f4c4869de14d93ecf10a9a", "score": "0.5583678", "text": "public function handle()\n {\n $this->fire();\n }", "title": "" }, { "docid": "ad1cbc2af025ad0228679bc10f77a28c", "score": "0.5571899", "text": "function trigger($sEvent, $aArgs = array()) {\n if (array_key_exists($sEvent, $this->aHooks)) {\n foreach ($this->aHooks[$sEvent] as $key => $Binding) {\n $Binding->trigger($aArgs);\n }\n }\n }", "title": "" }, { "docid": "69f8cfaf7729d478966a79c1522d11dc", "score": "0.5566349", "text": "function handleEvents(){\n\t\t//see if this page has any event handlers (implemented by extending\n\t\t//classes)\n\t\t$event = util::getData(\"event\");\n\t\tif($event) {\n\t\t\t$eventHandler = \"event\" . $event;\n\t\t\tif(method_exists($this, $eventHandler)) {\n\t\t\t\t$this->$eventHandler();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "91ab99cdab5ceda3ccf6ea92556f6642", "score": "0.5566089", "text": "public static function invokeAction( $action ) {\r\n\t\tself::$event_manager->called( $action );\r\n\t}", "title": "" }, { "docid": "46c3ac99a1eeae57b2acd544a3d9031f", "score": "0.5494379", "text": "private function trigger_event() {\n switch ($this->view) {\n case SURVEYPRO_NOVIEW:\n case SURVEYPRO_EDITRESPONSE: // Item_modified will be, eventually, logged.\n case SURVEYPRO_NEWRESPONSE: // Item_created will be, eventually, logged.\n break;\n case SURVEYPRO_READONLYRESPONSE:\n // Event: submission_viewed.\n $eventdata = ['context' => $this->context, 'objectid' => $this->surveypro->id];\n $eventdata['other'] = ['view' => SURVEYPRO_READONLYRESPONSE];\n $event = \\mod_surveypro\\event\\submission_viewed::create($eventdata);\n $event->trigger();\n break;\n default:\n $message = 'Unexpected $this->view = '.$this->view;\n debugging('Error at line '.__LINE__.' of '.__FILE__.'. '.$message , DEBUG_DEVELOPER);\n }\n }", "title": "" }, { "docid": "cdcc51ca4330ac62d4cd7f458f288292", "score": "0.54919624", "text": "private function trigger_event() {\n switch ($this->view) {\n case SURVEYPRO_NOVIEW:\n case SURVEYPRO_EDITRESPONSE: // Item_modified will be, eventually, logged.\n case SURVEYPRO_NEWRESPONSE: // Item_created will be, eventually, logged.\n break;\n case SURVEYPRO_READONLYRESPONSE:\n // Event: submission_viewed.\n $eventdata = array('context' => $this->context, 'objectid' => $this->surveypro->id);\n $eventdata['other'] = array('view' => SURVEYPRO_READONLYRESPONSE);\n $event = \\mod_surveypro\\event\\submission_viewed::create($eventdata);\n $event->trigger();\n break;\n default:\n $message = 'Unexpected $this->view = '.$this->view;\n debugging('Error at line '.__LINE__.' of '.__FILE__.'. '.$message , DEBUG_DEVELOPER);\n }\n }", "title": "" }, { "docid": "a786bb74c8e9e7ead1073352711b6cee", "score": "0.54727715", "text": "public static function dispatch()\n {\n return event(new static(...func_get_args()));\n }", "title": "" }, { "docid": "3379d5dd66b0608759c3b41ce6903e64", "score": "0.5461021", "text": "abstract public function trigger(string $event, $payload = null);", "title": "" }, { "docid": "2a4bb07b4a27279ef6b14497434285d4", "score": "0.5452503", "text": "protected function dispatch($evt)\n {\n $name = $this->eventPrefix . '.' . ($this->hasName() == true ? $this->getName() . '.' . $evt->getType() : $evt->getType());\n \n $this->eventDispatcher->dispatch($name, $evt);\n }", "title": "" }, { "docid": "70e3b5a5f670940a03389fdc98f2b95f", "score": "0.5428645", "text": "protected function raise($event)\n {\n $qualified = get_class($event);\n $name = str_replace('\\\\', '.', $qualified);\n\n $this->events->fire($name, [$event]);\n }", "title": "" }, { "docid": "6e2542d45de758d916a0c3f9e0a556ca", "score": "0.54281074", "text": "public function handled($handler, $trigger) {\n\t\t$this->events['handled'][] = array($handler, $trigger);\n\t\t\n\t}", "title": "" }, { "docid": "34dc5ec11670d9c141e6369d75a107ce", "score": "0.54258883", "text": "public function logEventFired()\n {\n // Add log to buffer.\n $this->data['logs'][] = func_get_args();\n }", "title": "" }, { "docid": "9ddd13b9bdfde6fb81bb05347f38645f", "score": "0.5403602", "text": "public function fireAll()\r\n\t{\r\n\t\twhile ( ! empty($this->jobs))\r\n\t\t{\r\n\t\t\tlist($job, $data) = array_shift($this->jobs);\r\n\r\n\t\t\t$this->resolveJob($job, $data)->fire();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8ecc9139d6431673256f223316da9c9a", "score": "0.5400618", "text": "public function on($eventName, $calllable);", "title": "" }, { "docid": "1033f9b04f87093679826bfd59eea555", "score": "0.5398255", "text": "function dispatch($eventName, EventInterface $event = null);", "title": "" }, { "docid": "f21e50c4ed5f5687d5895118f8a3a3c5", "score": "0.5398034", "text": "public function fire($eventType, $source, $data = null, $cancelable = null);", "title": "" }, { "docid": "24254bc2b85e505268c5947c10c7a6f8", "score": "0.53941554", "text": "public function testEventListenerAndDispatch() {\n $eventId = uniqid('event_');\n\n $this->eventDispatcher->addEvent($eventId);\n $this->eventDispatcher->addEventListener($eventId, array($this, 'eventDispatched')); \n\n $this->assertTrue($this->eventDispatcher->dispatch($eventId));\n $this->assertFalse($this->eventDispatcher->dispatch(uniqid('event2_')));\n\n // Make sure the callback was called\n $this->assertEquals(1, $this->calls);\n }", "title": "" }, { "docid": "c7876d8b8482867d6b777675ace8ac92", "score": "0.5384928", "text": "protected function dispatchRequestSendingEvent()\n {\n if ($dispatcher = optional($this->factory)->getDispatcher()) {\n $dispatcher->dispatch(new RequestSending($this->request));\n }\n }", "title": "" }, { "docid": "34aae6b28532b99c2fb2e1e2b691c6b6", "score": "0.5382212", "text": "abstract public function runHandler();", "title": "" }, { "docid": "89763f8e59a1657036301ca3c920a9f3", "score": "0.53818285", "text": "private function fireEvent($event)\n {\n $eventName = sprintf('modules.%s.' . $event, $this->getLowerName());\n\n $this->events->fire($eventName, [$this]);\n }", "title": "" }, { "docid": "211eb984384e0c887518577c8a097d38", "score": "0.5370774", "text": "protected function dispatchRequestSendingEvent()\n {\n event(new RequestSending($this->request));\n }", "title": "" }, { "docid": "cad18e862ad9d5190fee086dcc705d7f", "score": "0.53576136", "text": "public function trigger(string $events, ...$callbackArguments);", "title": "" }, { "docid": "bc42f57587cc546ae6b2b7ba5692c2d0", "score": "0.53368014", "text": "public function dispatch(Event $event)\n {\n $this->dispatcher->dispatch($event);\n }", "title": "" }, { "docid": "87c14b23ed8ea45795bf264b575d83d6", "score": "0.53280115", "text": "public function registerAllHandlers();", "title": "" }, { "docid": "aa6ea0870e2ac3d83d21e254b1141233", "score": "0.5316212", "text": "function handleEvent($action=\"\",$target=array(),$all=array())\n {\n // Detect whether this event is scheduled or triggered.\n $triggered = TRUE;\n if(preg_match(\"/^S_/\",$action)){\n $triggered = FALSE;\n }\n\n // Detect triggere or scheduled actions \n $headpage = $this->getHeadpage();\n $event = preg_replace(\"/^[TS]_/\",\"\",$action); \n if(preg_match(\"/^[TS]_/\", $action)){\n\n // Send special reinstall action for opsi hosts\n if($event == \"DaemonEvent_reinstall\" && $this->si_active && $this->opsi){\n foreach($target as $key => $dn){\n $type = $headpage->getType($dn);\n\n // Send Reinstall event for opsi hosts\n if($type == \"FAKE_OC_OpsiHost\"){\n $obj = $headpage->getEntry($dn);\n $this->opsi->job_opsi_install_client($obj['cn'][0],$obj['macAddress'][0]);\n unset($target[$key]);\n }\n }\n }\n } \n\n // Now send remaining FAI/GOsa-si events here.\n if(count($target) && $this->si_active){\n $mac= array();\n\n // Collect target mac addresses\n $ldap = $this->config->get_ldap_link();\n $tD = $this->getObjectDefinitions();\n $events = DaemonEvent::get_event_types(SYSTEM_EVENT);\n foreach($target as $dn){\n $type = $headpage->getType($dn);\n if($tD[$type]['sendEvents']){\n $obj = $headpage->getEntry($dn);\n if(isset($obj['macAddress'][0])){\n $mac[] = $obj['macAddress'][0];\n }\n }\n }\n\n\n // Prepare event to be added\n if(count($mac) && isset($events['BY_CLASS'][$event]) && $this->si_active){\n $event = $events['BY_CLASS'][$event];\n $this->dialogObject = new $event['CLASS_NAME']($this->config);\n $this->dialogObject->add_targets($mac);\n\n if($triggered){\n $this->dialogObject->set_type(TRIGGERED_EVENT);\n $this->closeDialogs();\n }else{\n $this->dialogObject->set_type(SCHEDULED_EVENT);\n }\n }\n }\n }", "title": "" }, { "docid": "c27392c9919a1d6461d2ce2105a7126a", "score": "0.52928174", "text": "private function dispatch($event, &$opt) {\n foreach($this->observers[$event] as $callable) {\n call_user_func($callable, $event, $opt);\n }\n }", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.526225", "text": "public function dispatch();", "title": "" }, { "docid": "d95ad8fdede5b1e70ac46843e5e4af70", "score": "0.526225", "text": "public function dispatch();", "title": "" }, { "docid": "88455c4310bdd25a76f49254d141352d", "score": "0.5261543", "text": "public function dispatch()\n\t{\n\t\t// Check everything is setup\n\t\tif (!count($this->_actionMap)) {\n\t\t\tthrow new Exception('Cannot execute - no actions defined');\n\t\t}\n\t\t\n\t\t// Parse the URI\n\t\t$requestName\t= $this->_getRequestAction();\n\t\t\n\t\t// Populate PHP _GET variable\n\t\t$this->_populateGet();\n\t\t\n\t\t// Find the action to execute\n\t\t$action\t= $this->_getActionHandler($requestName);\n\t\t\n\t\t// Execute the action\n\t\tswitch (HagfishController::getActionType($action)) {\n\t\t\t\n\t\t\tcase HagfishController::TYPE_CLASS:\n\t\t\t\t$this->_executeClassAction($action); \n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase HagfishController::TYPE_HAGFISH_ACTION:\n\t\t\t\t$this->_executeHagfishAction($action); \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase HagfishController::TYPE_OBJECT:\n\t\t\t\t$this->_executeObjectAction($action); \n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase HagfishController::TYPE_FUNCTION:\n\t\t\t\t$this->_executeFunctionAction($action);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase HagfishController::TYPE_CLOSURE:\n\t\t\t\t$this->_executeClosureAction($action);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase HagfishController::TYPE_UNKNOWN:\n\t\t\t\tthrow new Exception('No valid handler for ' . $requestName);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "0e3c82c48fb43efff632703eacf93938", "score": "0.52486646", "text": "private function fireResponseEvent()\n {\n // The event will get the Response object as a payload, which they simply need to modify.\n event('response.created', $this->response);\n }", "title": "" }, { "docid": "84db46249f90171416f3cd0ba7eac782", "score": "0.5245895", "text": "public static function fire($name, $args = null) {\n $store = self::$store;\n $name = explode(':', $name);\n foreach ($name as $ns) {\n $store = $store[$ns];\n }\n foreach ((array) $store as $fn) {\n if (is_callable($fn)) {\n call_user_func_array($fn, $args);\n }\n }\n }", "title": "" }, { "docid": "419e78d0c2b704faee1c610cc6c41c40", "score": "0.5241751", "text": "function _dav_dispatch($hook) {\n $args = func_get_args();\n //_dav_trace('dispatch', $args); // DEBUG\n\n foreach (_dav_implements($hook, array_slice($args, 1)) as $module) {\n $func_args = array_merge(array($module), $args);\n if (($result = call_user_func_array('_dav_invoke', $func_args)) !== NULL)\n return $result;\n }\n\n return NULL; // no handler\n}", "title": "" }, { "docid": "fe8e25024a1813b8ac9dfe2debb726f1", "score": "0.52248996", "text": "public function dispatchEvent($event, $data)\n {\n // Iterate through the list of listeners\n foreach ($this->listeners as $listener) {\n // Dispatch the event to the listener\n $listener($event, $data);\n }\n }", "title": "" }, { "docid": "0d81460e59b1e6ff199f9711cdc050df", "score": "0.52212936", "text": "public function handle($params)\n { if (array_key_exists('event',$this->handler))\n {\n return call_user_func_array($this->handler['event'],array($params));\n }\n }", "title": "" }, { "docid": "2025cfda6b8ef36a86b8c3ec28eac26f", "score": "0.52188987", "text": "function run() {\n dispatching\\run_default(actions_namespace, error_handler);\n}", "title": "" }, { "docid": "36efe053315b8d81f053a635755847a5", "score": "0.5214638", "text": "static public function trigger($event, array $args = [])\r\n {\r\n $result = null;\r\n\r\n foreach ((array) self::$handlers[$event] as $name => $handler) {\r\n $result = $handler(...$args);\r\n\r\n if ($result) {\r\n return $result;\r\n }\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "5aa514f900a4d0af9ccb446545621f3b", "score": "0.5209974", "text": "public function fire(string $event, $attachments = [])\n {\n // Notify listeners that an event was fired.\n $this->fireInternal(static::FIRED, [$event, $attachments]);\n }", "title": "" }, { "docid": "f1fef613cd17d2508402e4e811b196b6", "score": "0.52015144", "text": "public function eventDispatched() {\n\t\t\t$this->calls++;\n }", "title": "" }, { "docid": "3ac42989b2aa724075da815e1b176bb5", "score": "0.51961094", "text": "public static function actionHandler()\n\t{\n\t\treturn tgsfEventFactory::handler( eventACTION );\n\t}", "title": "" }, { "docid": "4c3d00be9c6fd01592a8c960d3bb79fb", "score": "0.51933295", "text": "public function DoEvent($nEvent) {}", "title": "" }, { "docid": "3d097486bafb351b1c88810281110006", "score": "0.5187817", "text": "public function dispatchEvent(Swift_Events_EventObject $evt, $target)\n {\n $bubbleQueue = $this->prepareBubbleQueue($evt);\n $this->bubble($bubbleQueue, $evt, $target);\n }", "title": "" }, { "docid": "93d57849f1418a2723b4fe19df4a6077", "score": "0.51760787", "text": "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "title": "" }, { "docid": "5d58eea162016814c6f03d608268fc87", "score": "0.5166435", "text": "function event(...$args)\n {\n return app('events')->dispatch(...$args);\n }", "title": "" }, { "docid": "5d58eea162016814c6f03d608268fc87", "score": "0.5166435", "text": "function event(...$args)\n {\n return app('events')->dispatch(...$args);\n }", "title": "" }, { "docid": "5d58eea162016814c6f03d608268fc87", "score": "0.5166435", "text": "function event(...$args)\n {\n return app('events')->dispatch(...$args);\n }", "title": "" }, { "docid": "0cb8f380840432d84ac78c4ef09743dc", "score": "0.5161288", "text": "public function dispatchEvent($eventName, FeedEvent $event = null)\n {\n if (isset($this->_listeners[$eventName])) {\n foreach ($this->_listeners[$eventName] as $listener) {\n $listener->$eventName($event);\n }\n }\n }", "title": "" }, { "docid": "26d8f7ec1cd73e999b38c3b6238a6a00", "score": "0.51513344", "text": "protected function fire($event)\n {\n return method_exists($this->events, 'dispatch')\n ? $this->events->dispatch($event)\n : $this->events->fire($event);\n }", "title": "" }, { "docid": "bda83e8f1dd65bbfcc03b21d00f93e47", "score": "0.5149952", "text": "public function dispatchEvent($eventName, ?EventArgs $eventArgs = null)\n {\n if (! isset($this->listeners[$eventName])) {\n return;\n }\n\n $eventArgs = $eventArgs ?? EventArgs::getEmptyInstance();\n\n foreach ($this->listeners[$eventName] as $listener) {\n $listener->$eventName($eventArgs);\n }\n }", "title": "" }, { "docid": "3efe43b4535137fe7cb388d9a5725ac6", "score": "0.5148605", "text": "abstract protected function dispatch(MessageEnvelope $message, ActionEvent $actionEvent): void;", "title": "" }, { "docid": "b6f999f7bd7163d17f625fa1eca6df2c", "score": "0.51395303", "text": "public function dispatch() {}", "title": "" }, { "docid": "d966858ec519d2e605641315ea4c3f5d", "score": "0.51367325", "text": "public function fire() {\n\t\t//\n\t}", "title": "" }, { "docid": "d966858ec519d2e605641315ea4c3f5d", "score": "0.51367325", "text": "public function fire() {\n\t\t//\n\t}", "title": "" }, { "docid": "d966858ec519d2e605641315ea4c3f5d", "score": "0.51367325", "text": "public function fire() {\n\t\t//\n\t}", "title": "" }, { "docid": "eb5c0786ad9537442b10a2273dfc1097", "score": "0.51311433", "text": "public function triggerBroadcastEvent()\n {\n event(new ReportSubmittedEvent($this->fecha_ms, $this->location));\n }", "title": "" }, { "docid": "e0e231f63f9a6216a49a46ad436fd5d7", "score": "0.51288885", "text": "public function testAttachEventHandler()\n {\n $request = Curl\\Request::newRequest('http://www.google.com');\n $eventTypes = array('beforeSend', 'success', 'complete');\n $handledEvents = 0;\n $callback = function() use (&$handledEvents) {\n $handledEvents++;\n };\n foreach ($eventTypes as $k) {\n $request->on($k, $callback);\n }\n $request->send();\n $this->assertEquals(count($eventTypes), $handledEvents);\n }", "title": "" }, { "docid": "f9a4bc1a6b52927d8baa607827863489", "score": "0.5122826", "text": "public function dispatch(): void {}", "title": "" }, { "docid": "3cb8bc44d5d36dea79dfb686cac6bd04", "score": "0.51214886", "text": "public function run()\n {\n foreach ($this->filters as $hook) {\n add_filter(\n $hook['hook'],\n array($hook['component'],$hook['callback']),\n $hook['priority'],\n $hook['accepted_args']\n );\n }\n\n foreach ($this->actions as $hook) {\n add_action(\n $hook['hook'],\n array($hook['component'],$hook['callback']),\n $hook['priority'],\n $hook['accepted_args']\n );\n }\n }", "title": "" }, { "docid": "25a6e45bf96801dc9fa2b6a2cadf8b1f", "score": "0.5120398", "text": "public function trigger($event, $parameters = null);", "title": "" }, { "docid": "d7d7e185738b5f8777f655068ef45050", "score": "0.51195085", "text": "public function dispatch(): void;", "title": "" }, { "docid": "8cf7fe33c6ec8b035606b71c58444cc2", "score": "0.5112317", "text": "public function actionTest(){ \n $this->on(self::EVENT_DEMO,[$this,'upperData'],'hello world');\n $this->trigger(self::EVENT_DEMO);\n $this->off(self::EVENT_DEMO); \n }", "title": "" }, { "docid": "f2dd758e20ac210230c833fc5e091212", "score": "0.5107825", "text": "public function on($event, Callable $action);", "title": "" }, { "docid": "53c2233d0e8e28b63b720e6d052a7afe", "score": "0.51045865", "text": "public function fire($event_name, array $event_data){\n if ($this->hasHandler($event_name) and\n is_callable($this->event_handlers[$event_name]))\n {\n #a handler exists for the event\n $handler = $this->event_handlers[$event_name];\n $events = array(\n PhpCSVParserEventType::EVENT_ON_CLOSE,\n PhpCSVParserEventType::EVENT_ON_DATA,\n PhpCSVParserEventType::EVENT_ON_END,\n PhpCSVParserEventType::EVENT_ON_ERROR,\n PhpCSVParserEventType::EVENT_ON_RECORD\n );\n if (in_array($event_name, $events))\n {\n call_user_func_array($handler, $event_data);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "1f516a4e6a4286663c5e9c15dc751176", "score": "0.50927544", "text": "public function dispatch(array $event, array $args = array())\n {\n if (!isset($event[0]) || !isset($this->callbacks[$event[0]]))\n return;\n\n // A specific callback is being dispatched...\n if (isset($event[1]) && isset($this->callbacks[$event[0]][$event[1]])) {\n $callback =& $this->callbacks[$event[0]][$event[1]];\n\n if ($callback['throttle'] && time() < $callback['call_at'])\n return;\n\n if (is_callable($callback['criteria']) && !$callback['criteria']($args))\n return;\n\n $callback['call_at'] = time() + (int)$callback['throttle'];\n call_user_func_array($callback['callback'], $args);\n return;\n }\n\n // All callbacks attached to a given event are being dispatched...\n foreach($this->callbacks[$event[0]] as $callback_id => $callback) {\n\n if ($callback['throttle'] && time() < $callback['call_at'])\n continue;\n\n if (is_callable($callback['criteria']) && !$callback['criteria']($args))\n return;\n\n $this->callbacks[$event[0]][$callback_id]['call_at'] = time() + (int)$callback['throttle'];\n call_user_func_array($callback['callback'], $args);\n }\n }", "title": "" }, { "docid": "d203f14ec8c09c9be4916dd7968bb002", "score": "0.50901496", "text": "public function fire()\n {\n $watches = array();\n\n $in = inotify_init();\n\n // add watches starting from root directory\n $root = Path::fromRelative('');\n $this->addWatches($in, $root, $watches);\n\n printf(\"\\nReading for events\\n\");\n while(true) {\n $events = inotify_read($in);\n\n foreach($events as $event) {\n $path = $watches[$event['wd']];\n\n $expanded = $this->expandMask($event['mask']);\n $eventName = trim(implode(', ', $expanded), ', ');\n\n // if the event has a name attached, then index that\n if($event['name']) {\n $newPathName = $path->getPathname().'/'.$event['name'];\n $newPath = new Path($newPathName);\n Indexer::index($newPath, 1);\n\n // this may be a new directory, so add a watch to it anyway\n if($newPath->exists() && $newPath->isDir()) {\n try {\n $wd = inotify_add_watch($in, $newPath->getPathname(), $this->computedMask);\n $watches[$wd] = $newPath;\n } catch (Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n }\n }\n }\n else {\n // event must apply to this directory, so index it, 1 level deep\n Indexer::index($path, 1);\n }\n }\n }\n }", "title": "" }, { "docid": "ce5139b78ab2e3d2f5870babf891512e", "score": "0.50893986", "text": "function trigger(Model_DevblocksEvent $event) {\r\n\t\t$events = DevblocksPlatform::getEventRegistry();\r\n\n\t\tif(null == ($listeners = @$events[$event->id])) {\r\n\t\t $listeners = array();\r\n\t\t}\r\n\r\n\t\t// [TODO] Make sure we can't get a double listener\r\n\t if(is_array($events['*']))\r\n\t foreach($events['*'] as $evt) {\r\n\t $listeners[] = $evt;\r\n\t }\r\n\t\t\n\t\tif(is_array($listeners) && !empty($listeners))\r\n\t\tforeach($listeners as $listener) { /* @var $listener DevblocksExtensionManifest */\n\t\t\t// Extensions can be invoked on these plugins even by workers who cannot see them\n if(null != ($manifest = DevblocksPlatform::getExtension($listener,false,true))) {\n \tif(method_exists($manifest, 'createInstance')) {\n\t\t \t\t$inst = $manifest->createInstance(); /* @var $inst DevblocksEventListenerExtension */\n\t\t \t\tif($inst instanceof DevblocksEventListenerExtension)\r\n \t\t\t$inst->handleEvent($event);\n \t}\n }\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c9b26180f22f8e6dfd06e5d0a416c165", "score": "0.50852513", "text": "function go() {\r\n $this->basic_handler();\r\n }", "title": "" }, { "docid": "c9b26180f22f8e6dfd06e5d0a416c165", "score": "0.50852513", "text": "function go() {\r\n $this->basic_handler();\r\n }", "title": "" }, { "docid": "c9b26180f22f8e6dfd06e5d0a416c165", "score": "0.50852513", "text": "function go() {\r\n $this->basic_handler();\r\n }", "title": "" }, { "docid": "c9b26180f22f8e6dfd06e5d0a416c165", "score": "0.50852513", "text": "function go() {\r\n $this->basic_handler();\r\n }", "title": "" }, { "docid": "a1d9b59f09ab15065a1cfbe5010b3b15", "score": "0.50765437", "text": "public function dispatchEvent($method, $request, $clientID)\n {\n return call_user_func(\"Libraries\\\\Api\\\\ApiCore::$method\", $request, $clientID);\n }", "title": "" }, { "docid": "da1de076ac8dd4de588ba3b33fb2fc0e", "score": "0.50708604", "text": "public function trigger(\n /*# string */ $eventName,\n array $parameters = []\n );", "title": "" }, { "docid": "9d98759f737538da826062d5dd04dcf0", "score": "0.5050245", "text": "public function run()\n {\n $method = $_SERVER['REQUEST_METHOD'];\n $url = ltrim(preg_split('/\\?/', $_SERVER['REQUEST_URI'])[0], '/');\n\n if (isset($this->handlers[$method][$url])) {\n echo $this->handlers[$method][$url]();\n } else {\n echo '404 :(';\n }\n }", "title": "" }, { "docid": "7ef1de08b540b41557dbc63cb6eb8aff", "score": "0.5049596", "text": "public function registerEventHandler();", "title": "" }, { "docid": "6e5b6efaacb840dc60689eba88f80d0d", "score": "0.50481653", "text": "public function perform()\n {\n $this->action->perform();\n }", "title": "" }, { "docid": "f0ba9be04974428a9352e651e50c47ec", "score": "0.50459564", "text": "public function fireEvent($event)\n {\n return $this->getEventsManager()->fire(\"microController:$event\", $this);\n }", "title": "" } ]
8f92e1206cefd9cc33c3bb4a8541f00b
Devuelve la informacion de los impuestos aplicados al pedido.
[ { "docid": "5fb0ed7ddef6b587529765ab5e641a83", "score": "0.0", "text": "function get_taxes() \n\t{\n\t\treturn $this->_aIVAs;\n\t}", "title": "" } ]
[ { "docid": "a8ac5a8e4ebf210ba555f5620bab1091", "score": "0.5859793", "text": "public function infoAction()\n {\n $em = $this->getDoctrine()->getManager();\n $session = $this->getRequest()->getSession();\n //$session = new Session();\n //$session->migrate();\n $escuela = $em->getRepository('AdminUnadBundle:Escuela')->find($session->get('escuelaid'));\n $periodose = $em->getRepository('AdminMedBundle:Periodoe')->findby(array(),array('id' => 'DESC'));\n $programas = $em->getRepository('AdminUnadBundle:Programa')->findBy(array('escuela' => $escuela),array('nivel' => 'DESC'));\n \n $ofertado = $em->getRepository('AdminUnadBundle:ProgramaPeriodo')->findby(array('programa' => $programas, 'periodo' => $this->container->getParameter('appmed.periodo')));\n\n \n if (!$escuela) {\n throw $this->createNotFoundException('Unable to find Escuela entity.');\n }\n return array(\n 'entity' => $escuela,\n 'ofertado' => $ofertado,\n 'periodos' => $periodose\n );\n }", "title": "" }, { "docid": "0bc4761f11121f5c3a75290e12947244", "score": "0.5791884", "text": "public function Reporte_Atenciones_Derivadas_Pendientes()\n {\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $id = \\Session::get('Id_Usuario');\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Atenciones_Pendientes($Parametros)->Atenciones_PendientesResult;\n $Atenciones_Pendientes = json_decode($result,true);\n\n\n $Lista_Prod = $Servicios_Atencion->Listar_Articulos_Almacen()->Listar_Articulos_AlmacenResult;\n $Lista_Productos = json_decode($Lista_Prod,true);\n\n $Sevicio_Usuarios = $this->Servicio_Usuarios;\n\n $result2 = $Sevicio_Usuarios->Listar_Usuarios()->Listar_UsuariosResult;\n $Lista_Usuarios = json_decode($result2,true);\n $Parametros = array(\n 'InfoUsuario'=>$json\n );\n $result3 = $Sevicio_Usuarios->Registro_Usuario($Parametros)->Registro_UsuarioResult;\n $resultado3 = json_decode($result3,true);\n $Datos_Usuario = $resultado3[0];\n\n $Accesos = $Sevicio_Usuarios->Recuperar_Accesos($Parametros)->Recuperar_AccesosResult;\n $Accesos = json_decode($Accesos,true);\n\n $Arreglo_Modulos = array();\n\n foreach ($Accesos as $Acceso) {\n array_push($Arreglo_Modulos,$Acceso['COD_MODULO']);\n }\n\n $Actividades = $Sevicio_Usuarios->Recuperar_Actividades_Para_Hoy($Parametros)->Recuperar_Actividades_Para_HoyResult;\n $Actividades_Hoy = json_decode($Actividades,true);\n\n\n //Metodo para obetener los datos del reporte\n $Servicios_Atencion = $this->Servicios_Atencion;\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Atenciones_Derivadas_Pendientes($Parametros)->Atenciones_Derivadas_PendientesResult;\n\n $Datos_Reporte = json_decode($result,true);\n\n $id = \\Session::get('Id_Usuario');\n //return view('Reportes.Atenciones_Derivadas_Pendientes',compact(['resultado','resultado2','Datos_Usuario','Datos_Reporte','Lista_Productos']));\n\n return view('DS_SOPORTE.Sistema_Soporte.Reportes.Atenciones_Derivadas_Pendientes',compact(['Atenciones_Pendientes','Lista_Usuarios','Datos_Usuario','Datos_Reporte','Lista_Productos','Arreglo_Modulos','Actividades_Hoy']));\n }", "title": "" }, { "docid": "dbd4efc4aaec04286c496048d295b799", "score": "0.5737961", "text": "function evt__pasar_imprimir(){\r\n $pi=$this->controlador()->controlador()->controlador()->dep('datos')->tabla('pinvestigacion')->get();\r\n if($pi['estado']=='A'){\r\n //si selecciono para imprimir entonces muestra el botón para generar pdf\r\n if(count($this->s__seleccionadas_bajas)>0 or count($this->s__seleccionadas_altas)>0 or count($this->s__seleccionadas_mov)>0){\r\n //$this->set_pantalla('pant_mov_imprimir');\r\n $this->set_pantalla('pant_imprimir');\r\n } else{\r\n toba::notificacion()->agregar('Debe seleccionar registros para generar la planilla de movimientos', 'info'); \r\n } \r\n } else{\r\n toba::notificacion()->agregar('El proyecto debe estar Activo para poder imprimir la Planilla de Movimientos', 'info'); \r\n } \r\n }", "title": "" }, { "docid": "9567297d947f589ea32fbf36473f779f", "score": "0.5722129", "text": "public function InformeIngresos()\n {\n $this->fechaActual = date('Y-m-d');\n $datos = [\n 'tituloModulo' => 'Registro Ingreso Vehículos',\n 'titulo_vista' => 'Informe Ingreso Vehículos',\n 'fechaFinFiltro' => $this->fechaActual,\n 'fechaInicioFiltro' => date(\"Y-m-d\",strtotime($this->fechaActual.\"- 1 month\"))\n ];\n $this->vista('InformeIngresos', $datos, $this->nombreModulo);\n }", "title": "" }, { "docid": "0c098907f62a33ead61a16bf596f4304", "score": "0.5702046", "text": "public function DA_ConsultarOpcionAplicacion();", "title": "" }, { "docid": "5633e1fcac54168175eca813c214ee1f", "score": "0.5693661", "text": "private function getArregloAplicacionesConInactivas()\n {\n /* @var Aplicaciones[] $aplicaciones */\n $aplicaciones = $this->backendAplicaciones->getAplicaciones();\n $resultado = array();\n foreach ($aplicaciones as $aplicacion) {\n $resultado[$aplicacion->getAppUniqueId()] = $aplicacion;\n }\n\n return $resultado;\n }", "title": "" }, { "docid": "d174b696108cbdea909ccaa08f2f73ae", "score": "0.5675179", "text": "public function Reporte_Atenciones_Pendientes_General(Request $request)\n {\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $id = \\Session::get('Id_Usuario');\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Atenciones_Pendientes($Parametros)->Atenciones_PendientesResult;\n $Atenciones_Pendientes = json_decode($result,true);\n\n\n $Lista_Prod = $Servicios_Atencion->Listar_Articulos_Almacen()->Listar_Articulos_AlmacenResult;\n $Lista_Productos = json_decode($Lista_Prod,true);\n\n $Sevicio_Usuarios = $this->Servicio_Usuarios;\n\n $result2 = $Sevicio_Usuarios->Listar_Usuarios()->Listar_UsuariosResult;\n $Lista_Usuarios = json_decode($result2,true);\n $Parametros = array(\n 'InfoUsuario'=>$json\n );\n $result3 = $Sevicio_Usuarios->Registro_Usuario($Parametros)->Registro_UsuarioResult;\n $resultado3 = json_decode($result3,true);\n $Datos_Usuario = $resultado3[0];\n\n $Accesos = $Sevicio_Usuarios->Recuperar_Accesos($Parametros)->Recuperar_AccesosResult;\n $Accesos = json_decode($Accesos,true);\n\n $Arreglo_Modulos = array();\n\n foreach ($Accesos as $Acceso) {\n array_push($Arreglo_Modulos,$Acceso['COD_MODULO']);\n }\n\n $Actividades = $Sevicio_Usuarios->Recuperar_Actividades_Para_Hoy($Parametros)->Recuperar_Actividades_Para_HoyResult;\n $Actividades_Hoy = json_decode($Actividades,true);\n\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $result = $Servicios_Atencion->Registro_Atenciones_Pendientes()->Registro_Atenciones_PendientesResult;\n $Datos_Reporte = json_decode($result,true);\n\n return view('DS_SOPORTE.Sistema_Soporte.Reportes_Admin.Reporte_Registro_Atenciones_Pendientes',compact(['Atenciones_Pendientes','Lista_Usuarios','Datos_Usuario','Datos_Reporte','Lista_Productos','Arreglo_Modulos','Actividades_Hoy']));\n }", "title": "" }, { "docid": "d8ea8d1a8bd4670f0c74686bed09bf57", "score": "0.5661511", "text": "public function getImpuestoIVA()\n {\n return SRI_TipoImpuestoIva::orderBy('nametipoimpuestoiva', 'asc')->get();\n }", "title": "" }, { "docid": "8281b16a7f99100fda53d361689ac161", "score": "0.56033915", "text": "private function procesar() {\r\n\t\t\t$entidad = new Entidades($this->aplicacion, $this->conexion, $this->entorno);\r\n\t\t\t$entidad->ejecutar();\r\n\t\t\techo \"\\n\".sprintf('Se ha finalizado el proceso correspondiente en la aplicación: %s', $this->aplicacion).\"\\n\\n\";\r\n\t\t}", "title": "" }, { "docid": "8d4c8ccc93a9039a0bf070697aac6675", "score": "0.5596619", "text": "public static function pintarInfoSesion()\r\n {\r\n if (self::haySesionRamIniciada()) {\r\n echo \"<span class='text-center'>Sesión iniciada por <a href='UsuarioPerfilVer.php'>$_SESSION[identificador]</a> ($_SESSION[nombre] $_SESSION[apellidos]) <a href='SesionCerrar.php'>Cerrar sesión</a></span>\";\r\n } else {\r\n echo \"<div class='text-center'>\";\r\n echo \"<a class='btn btn-outline-danger col-sm-5' href='SesionInicioFormulario.php'>Iniciar sesión</a> <br />\";\r\n echo \"<a class='btn btn-outline-danger col-sm-5' href='UsuarioNuevoFormulario.php'>Registrarse</a>\";\r\n echo \"</div>\";\r\n }\r\n }", "title": "" }, { "docid": "da2494cff55b056c3af7d7782bf33a03", "score": "0.5554331", "text": "function informe() {\n $this->vista->setTitle(\"Informe de Egresados\");\n if (!is_blank($this->params['cod_programa'])) {\n $informes = TEgresado::informe($this->params['cod_programa']);\n if($informes == null){\n $this->vista->set('informe', FALSE);\n }else{\n $this->vista->set(\"universidades\", $informes['universidades']);\n $this->vista->set(\"carreras\", $informes['carreras']);\n $this->vista->set(\"totalIES\", $informes['IES']);\n }\n }\n $this->vista->display();\n }", "title": "" }, { "docid": "336570d10b95a4b70d04ccaae83e63c1", "score": "0.5537577", "text": "function buscarAlumnoInfo(){\n $this -> set_response(\"view\");\n\t\t \n\tif($this -> post('registro') == \"\" || count($this -> post('registro')) == 0){\n\t //Mensaje de error\n\t echo '<input type=\"hidden\" id=\"status\" name=\"status\" readonly=\"readonly\" value=\"FALSE\" maxlength=\"0\"/>';\n\t echo '<input type=\"hidden\" id=\"msg\" name=\"msg\" readonly=\"readonly\" value=\"Es necesario ingresar un registro\" maxlength=\"0\"/>';\n\t $this -> result = \"\";\n\t}\n\t\t\t\n\telse{\n\t $objeto = new alumnos(); \n\t $this -> result = $objeto -> buscar_registro_alumno($this -> post('registro'));\n\t $this -> registroB = $this -> post('registro');\n\t $this -> render_partial('actualizarDatos');\n\t}\n }", "title": "" }, { "docid": "f24e2f65cf9ec4d2e9e8248295ad167c", "score": "0.55302364", "text": "public function Reporte_Atenciones_Por_Usuario(Request $request)\n {\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $id = \\Session::get('Id_Usuario');\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Atenciones_Pendientes($Parametros)->Atenciones_PendientesResult;\n $Atenciones_Pendientes = json_decode($result,true);\n\n\n $Lista_Prod = $Servicios_Atencion->Listar_Articulos_Almacen()->Listar_Articulos_AlmacenResult;\n $Lista_Productos = json_decode($Lista_Prod,true);\n\n $Sevicio_Usuarios = $this->Servicio_Usuarios;\n\n $result2 = $Sevicio_Usuarios->Listar_Usuarios()->Listar_UsuariosResult;\n $Lista_Usuarios = json_decode($result2,true);\n $Parametros = array(\n 'InfoUsuario'=>$json\n );\n $result3 = $Sevicio_Usuarios->Registro_Usuario($Parametros)->Registro_UsuarioResult;\n $resultado3 = json_decode($result3,true);\n $Datos_Usuario = $resultado3[0];\n\n\n $Accesos = $Sevicio_Usuarios->Recuperar_Accesos($Parametros)->Recuperar_AccesosResult;\n $Accesos = json_decode($Accesos,true);\n\n $Arreglo_Modulos = array();\n\n foreach ($Accesos as $Acceso) {\n array_push($Arreglo_Modulos,$Acceso['COD_MODULO']);\n }\n\n $Actividades = $Sevicio_Usuarios->Recuperar_Actividades_Para_Hoy($Parametros)->Recuperar_Actividades_Para_HoyResult;\n $Actividades_Hoy = json_decode($Actividades,true);\n\n $Fecha_Inicial = $request['Fecha_Inicial_Reporte_Usuario'];\n $Fecha_Final = $request['Fecha_Final_Reporte_Usuario'];\n\n if(($Fecha_Inicial==null)||($Fecha_Final==null))\n {\n $Servicios_Atencion = $this->Servicios_Atencion;\n $ArregloDatos = array(\n $request['Id_Usuario_Reporte']\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Listar_Atenciones_Por_Usuario($Parametros)->Listar_Atenciones_Por_UsuarioResult;\n $Datos_Reporte = json_decode($result,true);\n }\n else {\n $Servicios_Atencion = $this->Servicios_Atencion;\n $ArregloDatos = array(\n $request['Id_Usuario_Reporte'],\n $request['Fecha_Inicial_Reporte_Usuario'],\n $request['Fecha_Final_Reporte_Usuario']\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Listar_Atenciones_Por_Usuario_Por_Intervalo_Fechas($Parametros)->Listar_Atenciones_Por_Usuario_Por_Intervalo_FechasResult;\n $Datos_Reporte = json_decode($result,true);\n }\n\n $Id_Usuario_Reporte = $request['Id_Usuario_Reporte'];\n\n return view('DS_SOPORTE.Sistema_Soporte.Reportes_Admin.Reporte_Registro_Atenciones_Usuario',compact(['Atenciones_Pendientes','Lista_Usuarios','Datos_Usuario','Datos_Reporte','Lista_Productos','Arreglo_Modulos','Actividades_Hoy','Id_Usuario_Reporte']));\n }", "title": "" }, { "docid": "f4896ae721a86dce77858ffe2f7a8566", "score": "0.55214137", "text": "public function exibe(){\n\n return array(\n \"modelo\"=>$this->getModelo(),\n \"motor\"=>$this->getMotor(),\n \"ano\"=>$this->getAno()\n );\n\n }", "title": "" }, { "docid": "6bc804826d2e176b56a3a5847720d5f4", "score": "0.551411", "text": "public function DA_ConsultarPagosAplicadosAvales();", "title": "" }, { "docid": "2de7cc5920b3eb32e021346d7615e8cb", "score": "0.54696673", "text": "public function actionCargarImpuestoRenta() {\n if(isset ($_POST['cod_ret_fuente_1'])){\n $codigoRetencion = $_POST['cod_ret_fuente_1'];\n if($codigoRetencion != ''){ \n $data=CodigoRetencionFuente::model()->findAllBySql(\"SELECT * FROM codigoretencionfuente WHERE idcodretfuente=\".$codigoRetencion, array(':secuencial'=> $_POST['cod_ret_fuente_1']));\n $data=CHtml::listData($data,'porcentaje','codigo'); \n foreach($data as $value=>$name){\n echo $value;\n }\n }else\n echo \"vacio\";\n }else{\n echo \"vacio\";\n }\n\t}", "title": "" }, { "docid": "90111262f7c01ca68259c4a0c6dca8b5", "score": "0.5468594", "text": "public function Reporte_Atenciones_Por_Cliente(Request $request)\n {\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $id = \\Session::get('Id_Usuario');\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Atenciones_Pendientes($Parametros)->Atenciones_PendientesResult;\n $Atenciones_Pendientes = json_decode($result,true);\n\n\n $Lista_Prod = $Servicios_Atencion->Listar_Articulos_Almacen()->Listar_Articulos_AlmacenResult;\n $Lista_Productos = json_decode($Lista_Prod,true);\n\n $Sevicio_Usuarios = $this->Servicio_Usuarios;\n\n $result2 = $Sevicio_Usuarios->Listar_Usuarios()->Listar_UsuariosResult;\n $Lista_Usuarios = json_decode($result2,true);\n $Parametros = array(\n 'InfoUsuario'=>$json\n );\n $result3 = $Sevicio_Usuarios->Registro_Usuario($Parametros)->Registro_UsuarioResult;\n $resultado3 = json_decode($result3,true);\n $Datos_Usuario = $resultado3[0];\n\n $Accesos = $Sevicio_Usuarios->Recuperar_Accesos($Parametros)->Recuperar_AccesosResult;\n $Accesos = json_decode($Accesos,true);\n\n $Arreglo_Modulos = array();\n\n foreach ($Accesos as $Acceso) {\n array_push($Arreglo_Modulos,$Acceso['COD_MODULO']);\n }\n\n $Actividades = $Sevicio_Usuarios->Recuperar_Actividades_Para_Hoy($Parametros)->Recuperar_Actividades_Para_HoyResult;\n $Actividades_Hoy = json_decode($Actividades,true);\n\n //Servicio que obtiene la información del reporte\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $Fecha_Inicial = $request['Fecha_Inicial_Buscar_Cliente'];\n $Fecha_Final = $request['Fecha_Final_Buscar_Cliente'];\n\n if(($Fecha_Inicial==null)||($Fecha_Final==null))\n {\n $ArregloDatos = array(\n $request['Id_Cliente_Reporte_Buscar']\n );\n $json=json_encode($ArregloDatos);\n\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Listar_Atenciones_Por_Cliente($Parametros)->Listar_Atenciones_Por_ClienteResult;\n }\n else {\n $ArregloDatos = array(\n $request['Id_Cliente_Reporte_Buscar'],\n $Fecha_Inicial,\n $Fecha_Final\n );\n $json=json_encode($ArregloDatos);\n\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Listar_Atenciones_Por_Cliente_Por_Intervalo_Fechas($Parametros)->Listar_Atenciones_Por_Cliente_Por_Intervalo_FechasResult;\n }\n\n\n $Datos_Reporte = json_decode($result,true);\n\n\n return view('DS_SOPORTE.Sistema_Soporte.Reportes.Atenciones_Por_Cliente',compact(['Atenciones_Pendientes','Lista_Usuarios','Datos_Usuario','Datos_Reporte','Lista_Productos','Arreglo_Modulos','Actividades_Hoy']));\n }", "title": "" }, { "docid": "a8225a8a5d6c3749ff3f4d9f131eeb6e", "score": "0.5461388", "text": "public function obtenerImpresoras(){\n echo json_encode($this->model_impresora->obtenerImpresoras());\n }", "title": "" }, { "docid": "ab15bbc1b867a4fe1209adb5e266725a", "score": "0.546023", "text": "public function getOficioNotificacionAction(){\r\n\r\n if(isset($_REQUEST['id_oficio'])){\r\n try {\r\n if (!$this->validate->numero($_REQUEST['id_oficio']))\r\n throw new Exception(\"Accion no encontrada\");\r\n\r\n $id_usuario = '';\r\n if($_SESSION['data_user']['privilegios'] == 3){\r\n $id_usuario = $_SESSION['data_user']['id'];\r\n }\r\n\r\n $id_oficio = $_REQUEST['id_oficio'];\r\n $oficio = new Oficio();\r\n $objOficio = $oficio->getOficio($id_oficio,$id_usuario);\r\n\r\n if(!empty($objOficio))\r\n echo json_encode(array('success' => true,'msg' => 'Se econtrro datos','data' => $objOficio));\r\n else\r\n echo json_encode(array('success' => false,'msg' => 'No se encontraron datos'));\r\n exit;\r\n\r\n\r\n \r\n } catch (Exception $e) {\r\n echo json_encode(array('success' => false,'msg' => 'Error al recuperar datos'));\r\n exit;\r\n \r\n }\r\n\r\n }\r\n else{\r\n echo json_encode(array('success' => false,'msg' => 'No se encontraron Datos'));\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "95e3379e26c98deefaeda9dc47bd03ca", "score": "0.5450487", "text": "private function getNoticias(){\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n \n $pdoNoticias= new NoticiasPDO();\n $noticias = $pdoNoticias->getAll();\n \n $this->response($this->json($noticias),200);\n }", "title": "" }, { "docid": "4e7443316ffc371320faa4cb7ac95d8b", "score": "0.5433155", "text": "static private function getMotivosNotificaciones(){\r\n\t\t// O SI SIEMPRE DEVUELVO EL ARRAY DE MOTIVOS\r\n\t}", "title": "" }, { "docid": "3acebe41bbae753152747ed625b11738", "score": "0.5419104", "text": "public function Reporte_Atenciones_Usuario(Request $request)\n {\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $id = \\Session::get('Id_Usuario');\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Atenciones_Pendientes($Parametros)->Atenciones_PendientesResult;\n $Atenciones_Pendientes = json_decode($result,true);\n\n\n $Lista_Prod = $Servicios_Atencion->Listar_Articulos_Almacen()->Listar_Articulos_AlmacenResult;\n $Lista_Productos = json_decode($Lista_Prod,true);\n\n $Sevicio_Usuarios = $this->Servicio_Usuarios;\n\n $result2 = $Sevicio_Usuarios->Listar_Usuarios()->Listar_UsuariosResult;\n $Lista_Usuarios = json_decode($result2,true);\n $Parametros = array(\n 'InfoUsuario'=>$json\n );\n $result3 = $Sevicio_Usuarios->Registro_Usuario($Parametros)->Registro_UsuarioResult;\n $resultado3 = json_decode($result3,true);\n $Datos_Usuario = $resultado3[0];\n\n $Accesos = $Sevicio_Usuarios->Recuperar_Accesos($Parametros)->Recuperar_AccesosResult;\n $Accesos = json_decode($Accesos,true);\n\n $Arreglo_Modulos = array();\n\n foreach ($Accesos as $Acceso) {\n array_push($Arreglo_Modulos,$Acceso['COD_MODULO']);\n }\n\n $Actividades = $Sevicio_Usuarios->Recuperar_Actividades_Para_Hoy($Parametros)->Recuperar_Actividades_Para_HoyResult;\n $Actividades_Hoy = json_decode($Actividades,true);\n\n //Servicio que obtiene la información del reporte\n $Servicios_Atencion = $this->Servicios_Atencion;\n\n $Fecha_Inicial = $request['Fecha_Inicial'];\n $Fecha_Final = $request['Fecha_Final'];\n\n if(($Fecha_Inicial==null)||($Fecha_Final==null))\n {\n $ArregloDatos = array(\n $id\n );\n $json=json_encode($ArregloDatos);\n\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Listar_Atenciones_Por_Usuario($Parametros)->Listar_Atenciones_Por_UsuarioResult;\n\n }else {\n $ArregloDatos = array(\n $id,\n $request['Fecha_Inicial'],\n $request['Fecha_Final']\n );\n $json=json_encode($ArregloDatos);\n\n $Parametros = array(\n 'Info_Atencion'=>$json\n );\n $result = $Servicios_Atencion->Listar_Atenciones_Por_Usuario_Por_Intervalo_Fechas($Parametros)->Listar_Atenciones_Por_Usuario_Por_Intervalo_FechasResult;\n }\n\n\n\n $Datos_Reporte = json_decode($result,true);\n\n return view('DS_SOPORTE.Sistema_Soporte.Reportes.Atenciones_Por_Usuario',compact(['Atenciones_Pendientes','Lista_Usuarios','Datos_Usuario','Datos_Reporte','Lista_Productos','Arreglo_Modulos','Actividades_Hoy']));\n\n }", "title": "" }, { "docid": "c0deeae6b970a62daef53539d06ee542", "score": "0.5412747", "text": "function res_inicial($mensaje = 'El proceso no fue ejecutado')\n {\n $resultado['ejecutado'] = 0;\n $resultado['mensaje'] = $mensaje;\n $resultado['clase'] = 'alert-danger';\n $resultado['icono'] = 'fa-times';\n \n return $resultado;\n }", "title": "" }, { "docid": "795bf7bd579882b76057748b97d05f0e", "score": "0.53903455", "text": "function ProcesaPeticionAplicacion() {\n\t\t\n\t\tif(isset($_GET['accion']))\n\t\t{\n\t\t\t$accion=$_GET['accion'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$accion='';\n\t\t}\n\t\t\t\t\n\t\tswitch ($accion) {\n\t\t\tcase \"ver_lista\" :\n\t\t\t\techo CTRL_DIR;\n\t\t\t\treturn include CTRL_DIR . 'contr_Listar.php';\n\t\t\tcase \"Añadir_envio\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_Anadir.php';\n\t\t\tcase \"Modificar_envio\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_Mod.php';\n\t\t\tcase \"Eliminar_envio\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_Eliminar.php';\n\t\t\tcase \"Anotar_recepcion\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_Recepcion.php';\n\t\t\tcase \"Buscar_envio\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_Buscar.php';\n\t\t\tcase \"BorraFiltro\" :\n\t\t\t\tunset ( $_SESSION [\"campo\"] );\n\t\t\t\tunset ( $_SESSION [\"texto\"] );\n\t\t\t\treturn include CTRL_DIR . 'contr_Listar.php';\n\t\t\tcase \"Añadir_usu\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_anadir_usu.php';\n\t\t\tcase \"fuera\" :\n\t\t\t\tsession_destroy();\n\t\t\t\theader('Location:http://localhost/Envios/Problema%201/app/');\n\t\t\tcase \"Ver_usu\" :\n\t\t\t\treturn include CTRL_DIR . 'contr_ListarUsu.php';\n\t\t\tcase \"Modificar_usu\" :\n\t\t\t\treturn include CTRL_DIR.'contr_ModUsu.php';\n\t\t\tcase \"Eliminar_usu\" :\n\t\t\t\treturn include CTRL_DIR.'contr_EliminarUsu.php';\n\t\t\tdefault :\n\t\t\t\treturn include VIEW_DIR . 'cuerpo.php';\n\t\t}\n\t\tinclude VIEW_DIR . 'base.php';\n\t}", "title": "" }, { "docid": "2c3589d572b4bf6bcd1a328818b4208f", "score": "0.5385891", "text": "public function obterInformacoesPorCpfAction() {\n\t\t$oUsuBusiness = new Fnde_Sice_Business_Usuario();\n\t\t$this->_helper->layout()->disableLayout();\n\n\t\t$arParam = $this->_getAllParams();\n\t\t$form = $this->getForm($arParam);\n\t\t$form->populate($arParam);\n\n\t\t$cpf = preg_replace('/[^0-9]/', '', $arParam['NU_CPF']);\n\t\t$cpf = trim($cpf);\n\n\t\t$cpfValido = Fnde_Sice_Business_Usuario::validaCPF($cpf, $form);\n\t\t$cursistaValido = $oUsuBusiness->validaCursista($cpf, $form);\n\n\t\tif ( $cpfValido && $cursistaValido ) {\n\t\t\t$oUsuBusiness->preencheDadosPorCpf($form, $arParam['NU_CPF']);\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->render('form');\n\t}", "title": "" }, { "docid": "f12c8c3ccb1e082149a2a524b0cd970d", "score": "0.5367834", "text": "public static function notifyAnnulation(){\n return['title'=>'Votre chauffeur s\\'est désisté !',\n 'body'=>'Votre demande a automatiquement été remise en attente',\n 'datas'=>['url'=>'courses']];\n }", "title": "" }, { "docid": "ca088c9d4ab4408dba3e25fa32b2769e", "score": "0.53629863", "text": "public function recuperaResponsaveis() {\n\t\t\n\t\tif( in_array( ADMINISTRADOR_INST, $this->arPerfil ) ){\n\t\t\t$sql = \"SELECT resid FROM emenda.usuarioresponsabilidade WHERE usucpf = '\".$_SESSION['usucpf'].\"' AND rpustatus = 'A' AND resid is not null\";\n\t\t\t$responsaveis = $this->carregarColuna($sql);\n\t\t} else {\n\t\t\t$responsaveis = array();\n\t\t}\n\t\n\t\treturn $responsaveis;\n\t}", "title": "" }, { "docid": "669de9795100f5b66d5a16649bbf7a65", "score": "0.5343723", "text": "public function DA_ConsultarInfoPrefacturaUfeg();", "title": "" }, { "docid": "269aa3b517bb1d0195c4580ef6a89d96", "score": "0.5342367", "text": "function mostrar_observaciones(){}", "title": "" }, { "docid": "b7d8127961891cfe752dea0058ac1f50", "score": "0.53409827", "text": "public function getImpuestos()\r\n {\r\n return $this->hasOne(Impuesto::className(), ['impuesto' => 'impuesto']);\r\n }", "title": "" }, { "docid": "77b91d1e2a42a64754784d626190d5a2", "score": "0.53192234", "text": "public function apresentar() {\n echo \"{$this->nome}, {$this->idade} anos! <br>\"; \n\n }", "title": "" }, { "docid": "2c3356c65b5c81fb75e187961011334a", "score": "0.5298504", "text": "public function getCondicionImpositiva()\r\n {\r\n return $this->condicionImpositiva;\r\n }", "title": "" }, { "docid": "cca721ede5e0816e960f90b72ea57e3c", "score": "0.5294952", "text": "private function pagoefectivoNotificacion($input)\n {\n $return = new \\stdClass();\n $return->status = false;\n $return->success = new \\stdClass();\n $return->success->isPago = false;\n $return->success->isFinalizado = false;\n $return->error = new \\stdClass();\n\n $isExtorno = false;\n\n $mTransaccion = $this->mTransaccion;\n\n try {\n\n if (empty($input)) {\n throw new \\Exception(\"Intruso.\");\n }\n\n $inpData = $input['data'];\n $inpVersion = $input['version'];\n\n $this->getEvent()->trigger(\n \\Pagos\\Event\\Listener::NOTIFICACION_HISTORIAL_EVENT, $this,\n array(\n 'idTransaccion' => \"\",\n 'msj' => \"notificacion pago efectivo intento\",\n 'service' => \"\",\n 'input' => $input,\n )\n );\n \n \n $objData = $this->peSrv->desencriptarData($inpData);\n\n if (!$objData->status) {\n throw new \\Exception($objData->error . ' data:'.$inpData);\n }\n $objData = $objData->success;\n\n $idTransaction = (int) $objData->CodTrans;\n\n $this->getEvent()->trigger(\n \\Pagos\\Event\\Listener::NOTIFICACION_HISTORIAL_EVENT, $this,\n array(\n 'idTransaccion' => $idTransaction,\n 'msj' => \"notificacion pago efectivo\",\n 'service' => (array) $objData,\n 'input' => $inpData,\n )\n );\n\n $arrTrans = $mTransaccion->getTransaccionById($idTransaction);\n\n if (empty($inpVersion) || empty($objData) || empty($arrTrans)) {\n throw new \\Exception(\"Intruso.\");\n }\n\n if ($arrTrans['estado'] == $mTransaccion::TRANS_EST_PAGADO) {\n throw new \\Exception('Error estado transaccion');\n }\n\n $nrCip = (string) $objData->CIP->NumeroOrdenPago;\n\n //$idPE = $objData->idResSolPago;\n //$encode = Zend_Json::encode($objData);\n $dataEncode = Json::encode($objData);\n\n $estadoPE = (int) $objData->Estado;\n\n $estGenerado = $mTransaccion::TRANS_EST_GENERADO;\n $estPagado = $mTransaccion::TRANS_EST_PAGADO;\n $estSolicitudExpirada = $mTransaccion::TRANS_EST_SOLICITUD_EXPIRADO;\n $estVencido = $mTransaccion::TRANS_EST_PAGO_VENCIDO;\n $estExtornado = $mTransaccion::TRANS_EST_EXTORNADO_PE;\n\n $apCondicion['592'] = $estGenerado;\n $apCondicion['593'] = $estPagado;\n $apCondicion['594'] = $estSolicitudExpirada;\n $apCondicion['595'] = $estVencido;\n\n $estado = $apCondicion[$estadoPE];\n\n if ($estadoPE == 593) {\n $return->success->isPago = true;\n }\n\n if ($estadoPE == 594 || $estadoPE == 595) {\n $return->success->isFinalizado = true;\n }\n\n if (empty($estado)) {\n throw new \\Exception(\"Estado incorrecto.\");\n }\n\n if ($arrTrans['estado'] == $estPagado && $estado == $estGenerado) {\n $estado = $estExtornado;\n $isExtorno = true;\n }\n\n $idAvisoDet = empty($arrTrans['idAvisoDetalle']) ? 0 : $arrTrans['idAvisoDetalle'];\n $idPackAgeDet = empty($arrTrans['idPaqAgeDet']) ? 0 : $arrTrans['idPaqAgeDet'];\n $idPqProyecto = empty($arrTrans['idPqProyecto']) ? 0 : $arrTrans['idPqProyecto']; //--\n $idPerfilPago = empty($arrTrans['idPerfilPago']) ? 0 : $arrTrans['idPerfilPago'];\n\n $updDatos['nrOrden'] = $nrCip;\n $updDatos['estado'] = $estado;\n\n $success = $mTransaccion->updDatos($idTransaction, $updDatos);\n\n if (!$success) {\n throw new \\Exception(\"update estado.\");\n }\n\n //>Extornado procesos para los avisos\n if ($isExtorno) {\n $extornoModel = $this->serviceManager->get('Extorno\\Service\\Extorno');\n $extornoModel->extornar($idTransaction);\n }\n\n// $mTransaccionHistorial->saveLog(\n// $idTransaction, $arrTrans['idUser'],\n// \"pagoefectivoNotificacion\", $inpVersion . \"&\" . $dataEncode\n// );\n\n $return->success->idTransaction = $idTransaction;\n $return->success->idAvisoDetalle = $idAvisoDet;\n $return->success->idPackAgeDet = $idPackAgeDet;\n $return->success->idPqProyecto = $idPqProyecto; //--\n $return->success->idPerfilPago = $idPerfilPago;\n $return->status = true;\n } catch (\\Exception $exc) {\n $return->error->msgHid = $exc->getMessage();\n// $mTransaccionHistorial->saveLog(\n// \"\", 0,\n// \"/pagos/plugin/pagos->pagoefectivoNotificacion error\",\n// $return->error->msgHid\n// );\n }\n\n return $return;\n }", "title": "" }, { "docid": "368a8fd5b95cc79c3c1dbd8a09f5dc73", "score": "0.52855146", "text": "function enviarNotificacionProfesor($idPrograma) {\n $programa = new Programa($idPrograma);\n $asignatura = new Asignatura($programa->getIdAsignatura());\n $profesor = new Profesor($asignatura->getIdProfesor());\n $nombreAsignatura = $asignatura->getNombre();\n\n /* Configuracion de variables para enviar el correo \n usar correo gmail */\n\n $mail_username = MAIL_SISTEMA; //Correo electronico saliente ejemplo: [email protected]\n $mail_userpassword = CONTRASENA_SISTEMA; //Tu contraseña de gmail\n $mail_addAddress = $profesor->getEmail(); //correo electronico que recibira el mensaje\n \n // chequeamos el estado del programa (aprobado/desaprobado)\n $aprobado = '';\n $observaciones = '';\n if ($programa->getAprobadoSa() && $programa->getAprobadoDepto()){\n $aprobado = 'aprobado';\n $observaciones = '<br><p>Puede descargar el programa de dicha asignatura, ingresando '\n . 'al <a href=\"'.Constantes::HOMEURL.'\">Sistema VASPA</a>, o bien puede solicitarlo en Secretar&iacute;a '\n . 'Acad&eacute;mica.</p>';\n } else {\n $aprobado = 'desaprobado';\n $observaciones = '<br><p>A continuaci&oacute;n las observaciones realizadas por la cual el programa no fue aprobado:</p>';\n if (!$programa->getAprobadoDepto()){\n $observaciones .= '<br><p><u>Observaciones del Director del Departamento:</u></p>'\n . '<p>'.$programa->getComentarioDepto().'</p>';\n }\n if (!$programa->getAprobadoSa()){\n $observaciones .= '<br><p><u>Observaciones de Secretar&iacute;a Acad&eacute;mica:</u></p>'\n . '<p>'.$programa->getComentarioSa().'</p>';\n }\n $observaciones .= '<br><p>De acuerdo a las observaciones marcadas, tenga a bien modificar y corregir el '\n . 'programa de la asignatura, puede hacerlo ingresando al <a href=\"'.Constantes::HOMEURL.'\">Sistema VASPA</a>.</p>';\n }\n \n // variable donde se alamcenara el mensaje a ser enviado al profesor\n $mensaje = '<html>\n <head>\n </head>\n <body>\n <div>\n <p>Estimado/a profesor/a, por medio del presente se le informa el resultado \n de la revisi&oacute;n del programa de la asignatura: <b>'.$asignatura->getId().'</b> - <b>'.$asignatura->getNombre().'</b>.</p>\n <p>\n El programa est&aacute; <b>'.$aprobado.'</b>\n </p>\n '.$observaciones.'\n <br>\n <br>\n <p>Saludos</p>\n <p>Sistema VASPA</p>\n </div>\n </body>\n </html>';\n \n //$template = \"../lib/notificacionesMail/plantillaMail/mail_Secretaria_Academica_Nuevo_Programa.html\"; //Ruta de la plantilla HTML para enviar nuestro mensaje\n $mail_subject = \"Resultado de la revisión del programa de: {$asignatura->getId()} - $nombreAsignatura\";\n\n sendemail($mail_username, $mail_userpassword, $mail_addAddress, $mail_subject, $mensaje); //Enviar el correo\n}", "title": "" }, { "docid": "f0828ca9eca5e12d403b71945525ed90", "score": "0.52849096", "text": "public function DA_ConsultarPagosNoAplicadosAvales();", "title": "" }, { "docid": "2138947d920cac50d2b0f126b5e5620f", "score": "0.5281508", "text": "public function reporteProductosEliminados()\n {\n try {\n $consulta= DB::table('producto_deleted');\n $consulta->select(DB::raw('COUNT(id) as cantidad'),DB::raw('\"ELIMINADOS\" as name'));\n return ['codigo_respuesta'=>1,'nombre'=>$consulta->get()];\n } catch (\\Throwable $th) {\n return ['codigo_respuesta'=>0,'nombre'=>'Error al cargar datos de producto eliminado'];\n }\n }", "title": "" }, { "docid": "b83879a41b1b071bd6ca32052a5e7271", "score": "0.5271349", "text": "public function historicoProcesos()\n {\n echo __METHOD__;\n }", "title": "" }, { "docid": "42c405b114448276a3794c8d34a5eb8c", "score": "0.52677125", "text": "public function DA_ConsultarPagosAplicados();", "title": "" }, { "docid": "45c7e2b1d6acd3ec20727796c6ef7c65", "score": "0.5266312", "text": "public function respostacontato()\n {\n //\n }", "title": "" }, { "docid": "eeadb8d67824a11d068980a8339f483d", "score": "0.52656686", "text": "public function getMesCompetencia () {\n return $this->getServidor()->getMesCompetencia();\n }", "title": "" }, { "docid": "e1a69e661a0213a74f9e08eb4e8ca929", "score": "0.5258788", "text": "public function setNotaServicio(array $datos) {\n $usuario = $this->Usuario->getDatosUsuario();\n $fechaCaptura = mdate('%Y-%m-%d %H:%i:%s', now('America/Mexico_City'));\n if (!empty($_FILES)) {\n $CI = parent::getCI();\n $carpeta = 'Servicios/Servicio-' . $datos['servicio'] . '/EvidenciasNota/';\n $archivos = setMultiplesArchivos($CI, 'archivosAgregarNotas', $carpeta);\n if (!empty($archivos)) {\n $cont = 0;\n $host = $_SERVER['SERVER_NAME'];\n $linkImagenes = 'IMAGENES';\n foreach ($archivos as $value) {\n $cont++;\n $linkImagenes .= \"<div><a href='http://\" . $host . $value . \"'>Archivo\" . $cont . \"</a></div>\";\n }\n $archivos = implode(',', $archivos);\n $nuevo = $this->DBS->setNuevoElemento('t_notas_servicio', array(\n 'IdUsuario' => $usuario['Id'],\n 'IdServicio' => $datos['servicio'],\n 'Nota' => $datos['observaciones'],\n 'Archivos' => $archivos,\n 'Fecha' => $fechaCaptura\n )\n );\n $datosResolucion = \"<div>\" . $fechaCaptura . \"</div><div>NOTA</div><div>\" . $datos['observaciones'] . \"</div>\" . $linkImagenes;\n }\n } else {\n $nuevo = $this->DBS->setNuevoElemento('t_notas_servicio', array(\n 'IdUsuario' => $usuario['Id'],\n 'IdServicio' => $datos['servicio'],\n 'Nota' => $datos['observaciones'],\n 'Fecha' => $fechaCaptura\n )\n );\n $datosResolucion = \"<div>\" . $fechaCaptura . \"</div><div>NOTA</div><div>\" . $datos['observaciones'] . \"</div>\";\n }\n if (!empty($nuevo)) {\n return $nuevo;\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "a97c45d5bb039e995567b1c1ba862c5b", "score": "0.5257987", "text": "public function exibe() {\n\t\tforeach ( $this->produtos as $produto ) {\n\t\t\techo $produto->nome . '<br>';\n\t\t}\n\t}", "title": "" }, { "docid": "d827ab72093a3ab7976ee18809cd1c95", "score": "0.52571136", "text": "public function get_app_infos_content()\n\t{\t\n\t\techo $this->get_app_info();\n\t\t//call the app_content function\n\t\techo $this->app_infos_content();\n\t\texit();\n\t}", "title": "" }, { "docid": "ace7fb834f7d1963517336a0761bdc5f", "score": "0.52466136", "text": "public function respuestaAprobado(Request $request)\n {\n if($request->RTA_Titulo == null && $request->RTA_Respuesta == null) {\n return redirect()->back()->withErrors('Los campos titulo y observaciones no deben estar vacíos.');\n }\n \n $idUsuario = session()->get('Usuario_Id');\n\n $rtaTest = Respuesta::obtenerRespuestaValidador($request->id);\n \n if ($rtaTest!=null) {\n Respuesta::actualizarRespuestaCliente(\n $request,\n 7,\n $idUsuario\n );\n \n ActividadesFinalizadas::actualizarRevisadoActividad(\n $rtaTest->RTA_Actividad_Finalizada_Id\n );\n \n $actividad = ActividadesFinalizadas::obtenerActividadFinalizadaSola(\n $request->id\n );\n \n HistorialEstados::crearHistorialEstado($actividad->id, 7);\n Actividades::actualizarFechaFinEntrega($actividad->id);\n $datos = Usuarios::findOrFail($idUsuario);\n $trabajador = Usuarios::obtenerPerfilAsociado($actividad->id);\n \n Notificaciones::crearNotificacion(\n 'El Cliente '.\n $datos->USR_Nombres_Usuario.\n ' ha aprobado la entrega de la Actividad.',\n $idUsuario,\n $trabajador->ACT_Trabajador_Id,\n 'actividades_perfil_operacion',\n null,\n null,\n 'done_all'\n );\n\n Notificaciones::crearNotificacion(\n 'El Cliente '.$datos->USR_Nombres_Usuario.' ha aprobado la entrega una tarea',\n $idUsuario,\n $datos->USR_Supervisor_Id,\n 'cobros',\n null,\n null,\n 'done_all'\n );\n \n $para = Usuarios::findOrFail($datos->USR_Supervisor_Id);\n $de = Usuarios::findOrFail($idUsuario);\n \n Mail::send('general.correo.informacion', [\n 'nombre' => $de['USR_Nombre_Usuario'],\n 'contenido' => 'Aprobó la entrega de la tarea '.$actividad->ACT_Nombre_Actividad.'.'\n ], function($message) use ($para, $actividad){\n $message->from('[email protected]', 'InkBrutalPry');\n $message->to(\n $para['USR_Correo_Usuario'],\n 'InkBrutalPRY, Software de Gestión de Proyectos'\n )->subject('Tarea '.$actividad->ACT_Nombre_Actividad.' finalizada');\n });\n }\n \n return redirect()\n ->route('actividades_cliente')\n ->with('mensaje', 'Respuesta envíada');\n }", "title": "" }, { "docid": "d273ff92432f33c3ad26081e5fc7ea57", "score": "0.5246217", "text": "public function infoPerso()\n {\n echo $this->_nom;\n echo ' ';\n echo $this->_prenom;\n echo ' ';\n echo $this->_age;\n echo ' ';\n echo $this->_sexe;\n }", "title": "" }, { "docid": "3bc7537f0dbb02fe7606267c685d7540", "score": "0.523625", "text": "function mostrar_ayuda()\r\n\t{\r\n\t\t$this->consola->titulo( $this->get_info() );\r\n\t\t$this->mostrar_observaciones();\r\n\t\t$this->consola->subtitulo( 'Lista de opciones' );\r\n\t\t$opciones = $this->inspeccionar_opciones();\r\n\t\t$salida = array();\r\n\t\t$i=0;\r\n\t\tforeach ($opciones as $id => $opcion) {\r\n\t\t\tif (!isset($opcion['tags']['consola_no_mostrar'])) {\r\n\t\t\t\t$salida[$id] = $opcion['ayuda'];\r\n\t\t\t\tif (isset($opcion['tags']['consola_parametros'])) {\r\n\t\t\t\t\t$salida[$id] .= \"\\n\".$opcion['tags']['consola_parametros'];\r\n\t\t\t\t}\r\n\t\t\t\tif (isset($opcion['tags']['consola_separador']) && $i+1 < count($opciones)) {\r\n\t\t\t\t\t$salida [$id] .= \"\\n_________________________________\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\t$this->consola->coleccion($salida);\r\n\t}", "title": "" }, { "docid": "85f9ad6ed713c080130ac86de6aa85f1", "score": "0.5216445", "text": "public function notificacao()\n {\n /**\n * Query de notificacao de equipamento e ambiente pendente de vinculo\n *\n * 1 - Equipamento por Cliente\n * 2 - Equipamento por Filial\n * 3 - Ambiente por Cliente\n * 4 - Ambiente por Filial\n */\n $query = array();\n\n array_push($query, \"SELECT\n se.id, se.id_sim AS sim, e.tipo_equipamento AS nome_equip, 'vinculo' AS modo , 'e' AS tipo , concat(s.id_cliente, '-c') AS cliente , c.nome\n FROM tb_sim_equipamento se\n INNER JOIN tb_equipamento e on e.id = se.id_equipamento\n INNER JOIN tb_sim s on s.num_sim = se.id_sim\n INNER JOIN tb_cliente c on c.id = s.id_cliente\n WHERE\n id_equipamento is not null\n and s.id_cliente is not null\n and se.vinc_tabela = 0\n order by (se.dt_criacao) desc\");\n\n array_push($query, \"SELECT\n se.id, se.id_sim as sim, e.tipo_equipamento as nome_equip, 'vinculo' as modo , 'e' as tipo , concat(s.id_filial, '-f') as cliente , f.nome\n from tb_sim_equipamento se\n inner join tb_equipamento e on e.id = se.id_equipamento\n inner join tb_sim s on s.num_sim = se.id_sim\n inner join tb_filial f on f.id = s.id_filial\n where\n id_equipamento is not null\n and s.id_filial is not null\n and se.vinc_tabela = 0\n order by (se.dt_criacao) desc\");\n\n\n // Realiza o loop nas posicoes do array das querys\n // Salva os valores do select no array\n foreach ($query as $busca)\n {\n // Monta a result\n $result = $this->db->select($busca);\n\n // Verifica se existe retorno\n if (!empty($result))\n {\n foreach ($result as $row) {\n $valorNot[] = $row;\n }\n\n // Verifica se existe valor\n // if (@mysql_num_rows($result) > 0)\n // {\n // // Guarda os valores no array\n // while ($row = @mysql_fetch_assoc($result))\n // $valorNot[] = $row;\n // }\n }\n }\n\n // Verifica se existe valor e eh um array\n if (! empty($valorNot) && is_array ($valorNot))\n // Retorna resultado\n return $valorNot;\n else\n // Fim\n return false;\n }", "title": "" }, { "docid": "01d844387a81ba5dfa3be42b099a658e", "score": "0.52106017", "text": "public function actionPerfil()\n {\n //URL: http://api.iete.test/user/perfil\n $usuario = \\Yii::$app->request->post('idestudiante');\n $usuario = Estudiante::findOne($usuario);\n return [\n 'id'=>$usuario->id,\n 'nombre_completo'=>$usuario->nombre_completo,\n 'dni'=>$usuario->dni,\n 'email'=>$usuario->email,\n 'foto'=>$usuario->strFoto,\n 'centro'=>$usuario->centro->numero_id,\n ];\n }", "title": "" }, { "docid": "c83597d8251da4ee238328867b9eb2e2", "score": "0.5196906", "text": "public function info()\n {\n return array(\n 'module' => $this->name,\n 'text_type' => $this->__('ShowUnconfirmed'),\n 'text_type_long' => $this->__(\"Show new buddies awaiting your acception\"),\n 'allow_multiple' => true,\n 'form_content' => false,\n 'form_refresh' => false,\n 'show_preview' => true,\n );\n }", "title": "" }, { "docid": "e8b042c0d7dd1db7580e7be8109c330e", "score": "0.5195459", "text": "function view_datos()\r\n\t{\r\n\t\techo \"codigo encuesta = \".$this->codigo_encuesta.\"<br>\";\r\n\t\techo \"titulo encuesta = \".$this->titulo_encuesta.\"<br>\";\r\n\t\techo \"fecha inicio = \".$this->fecha_inicio.\"<br>\";\r\n\t\techo \"fecha fin = \".$this->fecha_fin.\"<br>\";\r\n\t\techo \"codigo administrador = \".$this->codigo_administrador.\"<br>\";\r\n\t\t\r\n\t\techo \"cuantas preguntas lleva? \".$this->contador_preguntas.\"<br>\";\r\n\t}", "title": "" }, { "docid": "7dd68dc68bcd4b7ff70ab412fee2e9c9", "score": "0.5193836", "text": "public function extremaAction()\n {\n return Cima::with('provincia','communidad','vertientes','vertientes.enlaces','substitute')->withCount('logros')\n ->whereIn('id',[225,246,158,421,446,38,605,609,578])->get()->toJSON();\n }", "title": "" }, { "docid": "e47e8a049c3eb8312d3ee5fd04649733", "score": "0.51825976", "text": "function instalaciones(){ \n $data['titulo'] = 'Reporte de Instalaciones';\n $this->_cargarView('consultas/instalaciones', $data);\n }", "title": "" }, { "docid": "e247c7da3adf8f160ee01afbfbd1b295", "score": "0.5182186", "text": "protected function fijarAtributos(){\n \n return array(\"cod_valoracion\",\"cod_comentario\",\"cod_usuario\",\"opinion\",\"reportado\");\n \n }", "title": "" }, { "docid": "3423398bbf840a5b9e2babbb69bf5880", "score": "0.51763093", "text": "public static function notifyArrivee(){\n return ['title'=>'Vos bagages sont arrivés !',\n 'body'=>'Vos bagages sont arrivés à leur lieu de destination.',\n 'datas'=>['url'=>'courses']];\n }", "title": "" }, { "docid": "2e0d3059fd63eb643fff10a2b60062c5", "score": "0.51656", "text": "public function getDispo(){\n\n }", "title": "" }, { "docid": "643bc1bcae8fc8162cd8ecfb216ffa65", "score": "0.51641375", "text": "function noConfirmados()\r\n\t{\r\n\t\t$opt = $this->uri->segment(1);\r\n\t\t$op['opt'] = $this->data_model->cargarOptimizacion($opt);\r\n\t\t\r\n\t\t//validacion para identificar tipo de usuario y desglosar info\r\n\t\t$user\t\t\t= $this->session->userdata('user');\r\n\t\t$op['info']\t\t= array();\r\n\t\t\r\n\t\tif ($user['uid'] != '') {\r\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\r\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\r\n\t\t}\r\n\t\t\r\n\t\t//Carga menu locales//\r\n\t\t$op['menuLocal'] = $this->milocal_model->cargarMenuLocal();\r\n\t\t$op['noConf'] \t = $this->milocal_model->porConf($user['uid']);\r\n\t\t\t\t \r\n\t\t$op['sinConfirmar'] = $this->milocal_model->porConf($user['uid']);\r\n\t\t\r\n\t\t//Vista//\r\n\t\t$this->layouts->milocal('noConfirmados-view' ,$op);\r\n\t}", "title": "" }, { "docid": "65f4b795bd28b38b485d419ca5a209e8", "score": "0.51525795", "text": "function reporte_comunidad(){\n\t\t$data['query'] = $this->Comunidad_model->obt_todos();\n\t\t$this->mostrar($data, \"reporte_comunidad_view\");\n\t}", "title": "" }, { "docid": "0d7d4a63488f42f12807fd24ce4e0c9e", "score": "0.51522017", "text": "function info() {\n\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->converterInterface->echoContent('APPLICATION INFORMATION ');\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->showTypoVariables();\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->converterInterface->echoContent('');\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->converterInterface->echoContent('DATABASE INFORMATION ');\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->showDatabaseVariables();\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->converterInterface->echoContent('');\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->converterInterface->echoContent('TABLE INFORMATION ');\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->showTableInformation();\n\t\t$this->converterInterface->echoContent($this->converterInterface->getLineMarker());\n\t\t$this->converterInterface->echoContent('');\n\n\t}", "title": "" }, { "docid": "1b0c52643f852674d6cbd96735f7abdd", "score": "0.51513815", "text": "public function messages()\n {\n $array = [\n 'devi_id.required' => 'devi_id - Identificador del dispositivo es requerido',\n 'devi_id.max' => 'devi_id - Identificador del dispositivo maximo de caracteres permitidos 50',\n\n 'pers_id.required' => 'pers_id - Identificador del usuario es requerido',\n 'pers_id.exists' => 'pers_id - Identificador del usuario debe existir en tabla Userpicking',\n\n 'devi_name.required' => 'devi_name - Nombre del dispositivo es requerido',\n 'devi_name.max' => 'devi_name - Nombre del dispositivo maximo de caracteres permitidos 50',\n\n 'devi_active.required' => 'devi_active - Estado dispositivo es requerido',\n 'devi_active.boolean' => 'devi_active - Estado dispositivo debe ser formato booleano 0, 1',\n\n 'devi_record.required' => 'devi_record - Estado sincronización es requerido',\n 'devi_record.boolean' => 'devi_record - Estado sincronización debe ser formato booleano 0, 1',\n\n ];\n\n return $array;\n }", "title": "" }, { "docid": "b4f343b0cb526951470a205e520ac627", "score": "0.5136622", "text": "public static function returnInfo() {\n return array(\n \t'name' => self::$name,\n \t'group' => self::$group,\n 'title' => 'Extrem',\n 'visible' => '1',\n );\n }", "title": "" }, { "docid": "cd90a43d61657f3bb34567894539c36d", "score": "0.51289475", "text": "public function actionPresupuesto()\n {\n \n if(!isset($mensaje)){\n $mensaje = false;\n }\n \n\n $model1 = new SpCabeceraReportes;\n\n //------------------cabecera de la vista----------------------- \n $resultados1 = $model1->procedimiento2();\n\n foreach ($resultados1 as $key) {\n $nombre = $key['EMPCOD'];\n $nit = $key['NIT'];\n }\n //------------------cabecera de la vista-----------------------\n //\n //------------------opciones posibles del formulario -----------------------\n //Opciones de fuerza\n $fuerza = $model1->procedimiento3(1);\n //opciones de modalidad\n $modalidad = $model1->procedimiento3(2);\n //opcion de vigencia\n $vigencia = $model1->procedimiento3(3);\n //------------------opciones posibles del formulario -----------------------\n\n\t\tif(isset(Yii::$app->session['sesion'])){\n\t\t\n $this->layout='main_rep'; \n return $this->render('presupuesto',[\"nombre\"=>$nombre, \"nit\"=>$nit, \"fuerza\"=>$fuerza, \"modalidad\"=>$modalidad, \"vigencia\"=>$vigencia,\n \"mensaje\"=>$mensaje]);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t}else{\n\t\t\t\t\t\t\n\t\t\tYii::$app->session['sesion'];\n\t\t\t\n\t\t\tYii::$app->session->destroy();\n\t\t\n\t\treturn $this->redirect(['site/salida']);\n\t\t\n\t\t}\n }", "title": "" }, { "docid": "41846520f970a04b6de56477f3e32645", "score": "0.5128811", "text": "public function solicitar()\n {\n\n $cantidad = Session::get('colegio')['entradas'];\n\n //Realizar la inserción de los datos\n $solicitud = (New Solicitud)->ingresar(); //Ingreso de solicitud\n $usuarios = (New Usuarios)->ingresar(); //Ingreso de los invitados\n $conteo = (New Configuracion)->contador_cupos($usuarios);\n if($cantidad == $usuarios){\n Email::gratis();\n }\n $this->data = 1;\n View::select(null, 'json');\n }", "title": "" }, { "docid": "04e45d08a20c621029f6343f0696ea06", "score": "0.5127494", "text": "function TipoIndicador() {\r\n extract($GLOBALS);\r\n global $w_Disabled;\r\n $w_chave = $_REQUEST['w_chave'];\r\n if ($w_troca>'' && $O!='E') {\r\n // Se for recarga da página\r\n $w_chave = $_REQUEST['w_chave'];\r\n $w_nome = $_REQUEST['w_nome'];\r\n $w_ativo = $_REQUEST['w_ativo'];\r\n } elseif ($O=='L') {\r\n // Recupera todos os registros para a listagem\r\n $sql = new db_getTipoIndicador; $RS = $sql->getInstanceOf($dbms,$w_cliente,null,null,null,'REGISTROS');\r\n $RS = SortArray($RS,'nome','asc');\r\n } elseif (!(strpos('AEV',$O)===false)) {\r\n // Recupera os dados do endereço informado\r\n $sql = new db_getTipoIndicador; $RS = $sql->getInstanceOf($dbms,$w_cliente,$w_chave,null,null,'REGISTROS');\r\n foreach ($RS as $row) {$RS = $row; break;}\r\n $w_chave = f($RS,'chave');\r\n $w_cliente = f($RS,'cliente');\r\n $w_nome = f($RS,'nome');\r\n $w_ativo = f($RS,'ativo');\r\n } \r\n Cabecalho();\r\n head();\r\n if (!(strpos('IAEP',$O)===false)) {\r\n ScriptOpen('JavaScript');\r\n ValidateOpen('Validacao');\r\n if (!(strpos('IA',$O)===false)) {\r\n Validate('w_nome','Nome','1','1','4','30','1','1');\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n } elseif ($O=='E') {\r\n Validate('w_assinatura',$_SESSION['LABEL_ALERTA'],'1','1','3','30','1','1');\r\n ShowHTML(' if (confirm(\\'Confirma a exclusão deste registro?\\')) ');\r\n ShowHTML(' { return (true); }; ');\r\n ShowHTML(' { return (false); }; ');\r\n } \r\n ShowHTML(' theForm.Botao[0].disabled=true;');\r\n ShowHTML(' theForm.Botao[1].disabled=true;');\r\n ValidateClose();\r\n ScriptClose();\r\n } \r\n ShowHTML('</HEAD>');\r\n ShowHTML('<BASE HREF=\"'.$conRootSIW.'\">');\r\n if ($w_troca>'') {\r\n BodyOpen('onLoad=\"document.Form.'.$w_troca.'.focus()\";');\r\n } elseif (!(strpos('IA',$O)===false)) {\r\n BodyOpen('onLoad=\"document.Form.w_nome.focus()\";');\r\n } elseif ($O=='E') {\r\n BodyOpen('onLoad=\"document.Form.w_assinatura.focus()\";');\r\n } else {\r\n BodyOpen('onLoad=\"this.focus()\";');\r\n } \r\n ShowHTML('<B><FONT COLOR=\"#000000\">'.$w_TP.'</FONT></B>');\r\n ShowHTML('<HR>');\r\n ShowHTML('<div align=center><center>');\r\n ShowHTML('<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">');\r\n if ($O=='L') {\r\n // Exibe a quantidade de registros apresentados na listagem e o cabeçalho da tabela de listagem\r\n ShowHTML('<tr><td><a accesskey=\"I\" class=\"SS\" href=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=I&w_chave='.$w_chave.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"><u>I</u>ncluir</a>&nbsp;');\r\n ShowHTML(' <td align=\"right\">'.exportaOffice().'<b>Registros: '.count($RS));\r\n ShowHTML('<tr><td align=\"center\" colspan=3>');\r\n ShowHTML(' <TABLE class=\"tudo\" WIDTH=\"100%\" bgcolor=\"'.$conTableBgColor.'\" BORDER=\"'.$conTableBorder.'\" CELLSPACING=\"'.$conTableCellSpacing.'\" CELLPADDING=\"'.$conTableCellPadding.'\" BorderColorDark=\"'.$conTableBorderColorDark.'\" BorderColorLight=\"'.$conTableBorderColorLight.'\">');\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\" align=\"center\">');\r\n ShowHTML(' <td><b>Nome</td>');\r\n ShowHTML(' <td><b>Ativo</td>');\r\n ShowHTML(' <td><b>Operações</td>');\r\n ShowHTML(' </tr>');\r\n if (count($RS)<=0) {\r\n // Se não foram selecionados registros, exibe mensagem\r\n ShowHTML(' <tr bgcolor=\"'.$conTrBgColor.'\"><td colspan=3 align=\"center\"><b>Não foram encontrados registros.</b></td></tr>');\r\n } else {\r\n // Lista os registros selecionados para listagem\r\n foreach ($RS as $row) {\r\n $w_cor = ($w_cor==$conTrBgColor || $w_cor=='') ? $w_cor=$conTrAlternateBgColor : $w_cor=$conTrBgColor;\r\n ShowHTML(' <tr bgcolor=\"'.$w_cor.'\" valign=\"top\">');\r\n ShowHTML(' <td>'.f($row,'nome').'</td>');\r\n ShowHTML(' <td align=\"center\">'.f($row,'nm_ativo').'</td>');\r\n ShowHTML(' <td align=\"top\" nowrap>');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=A&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"title=\"Alterar\">AL</A>&nbsp');\r\n ShowHTML(' <A class=\"HL\" HREF=\"'.$w_dir.$w_pagina.$par.'&R='.$w_pagina.$par.'&O=E&w_chave='.f($row,'chave').'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG.'\"title=\"Excluir\">EX</A>&nbsp');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n } \r\n } \r\n ShowHTML(' </center>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </td>');\r\n ShowHTML('</tr>');\r\n } elseif (!(strpos('IAEV',$O)===false)) {\r\n if (!(strpos('EV',$O)===false)) {\r\n $w_Disabled=' DISABLED ';\r\n } \r\n AbreForm('Form',$w_dir.$w_pagina.'Grava','POST','return(Validacao(this));',null,$P1,$P2,$P3,$P4,$TP,$SG,$R,$O);\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_chave\" value=\"'.$w_chave.'\">');\r\n ShowHTML('<INPUT type=\"hidden\" name=\"w_troca\" value=\"\">');\r\n ShowHTML('<tr bgcolor=\"'.$conTrBgColor.'\"><td align=\"center\">');\r\n ShowHTML(' <table width=\"97%\" border=\"0\">');\r\n ShowHTML(' <tr><td><table border=0 width=\"100%\" cellspacing=0 cellpadding=0><tr valign=\"top\">');\r\n ShowHTML(' <td colspan=3><b><u>N</u>ome:</b><br><input '.$w_Disabled.' accesskey=\"N\" type=\"text\" name=\"w_nome\" class=\"sti\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"'.$w_nome.'\"></td>'); \r\n ShowHTML(' <tr valign=\"top\">');\r\n MontaRadioSN('<b>Ativo?</b>',$w_ativo,'w_ativo');\r\n ShowHTML(' </table>');\r\n ShowHTML(' <tr><td align=\"LEFT\"><b>'.$_SESSION['LABEL_CAMPO'].':<BR> <INPUT ACCESSKEY=\"A\" class=\"sti\" type=\"PASSWORD\" name=\"w_assinatura\" size=\"30\" maxlength=\"30\" value=\"\"></td></tr>');\r\n ShowHTML(' <tr><td align=\"center\"><hr>');\r\n if ($O=='E') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Excluir\">');\r\n } else {\r\n if ($O=='I') {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Incluir\">');\r\n } else {\r\n ShowHTML(' <input class=\"STB\" type=\"submit\" name=\"Botao\" value=\"Atualizar\">');\r\n } \r\n } \r\n ShowHTML(' <input class=\"stb\" type=\"button\" onClick=\"location.href=\\''.montaURL_JS($w_dir,$R.'&O=L&w_cliente='.$w_cliente.'&P1='.$P1.'&P2='.$P2.'&P3='.$P3.'&P4='.$P4.'&TP='.$TP.'&SG='.$SG).'\\';\" name=\"Botao\" value=\"Cancelar\">');\r\n ShowHTML(' </td>');\r\n ShowHTML(' </tr>');\r\n ShowHTML(' </table>');\r\n ShowHTML(' </TD>');\r\n ShowHTML('</tr>');\r\n ShowHTML('</FORM>');\r\n } else {\r\n ScriptOpen('JavaScript');\r\n ShowHTML(' alert(\"Opção não disponível\");');\r\n ScriptClose();\r\n } \r\n ShowHTML('</table>');\r\n ShowHTML('</center>');\r\n Rodape(); \r\n}", "title": "" }, { "docid": "3f4285444028c12f3666c54b9cb3e7a2", "score": "0.51265883", "text": "function infoVendido($ofertaID,$localID,$folio)\r\n\t{\r\n\t\t$opt = $this->uri->segment(1);\r\n\t\t$op['opt'] = $this->data_model->cargarOptimizacion($opt);\r\n\t\t\r\n\t\t//validacion para identificar tipo de usuario y desglosar info\r\n\t\t$user\t\t\t= $this->session->userdata('user');\r\n\t\t$op['info']\t\t= array();\r\n\t\t\r\n\t\t//Carga menu de no publicados//\r\n\t\t$op['nopublicados'] = $this->ofertas_model->cargarPendientesLocal($user['uid']);\r\n\t\t\r\n\t\tif ($user['uid'] != '') {\r\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\r\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\r\n\t\t}\r\n\r\n\t\t//Carga menu locales//\r\n\t\t$op['menuLocal'] = $this->milocal_model->cargarMenuLocal();\r\n\t\t$op['noConf'] \t = $this->milocal_model->porConf($user['uid']);\r\n\t\t\r\n\t\t//validacion para identificar tipo de usuario y desglosar info\r\n\t\t$user\t\t\t= $this->session->userdata('user');\r\n\t\t$op['info']\t\t= array();\r\n\t\t\r\n\t\tif ($user['uid'] != '') {\r\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\r\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\r\n\t\t}\r\n\t\t\r\n\t\t$ofertaID\t\t= $this->uri->segment(3);\r\n\t\t$op['ventas'] \t= $ventas = $this->data_model->cargarVenta($ofertaID, $user['uid'],$folio);\r\n\t\t\r\n\t\tif($ventas){\r\n\t\t\t//Vista//\r\n\t\t\t$producto\t\t= $op['producto'] = $this->ofertas_model->cargarOferta($this->uri->segment(3),$extra='');\r\n\t\t\t$op['catTipo']\t= $this->ofertas_model->cargarCatTipoRama($ventas[0]->ramaID);\r\n\t\t\t\t\r\n\t\t\t$this->layouts->milocal('infoVendidos-view' ,$op);\r\n\t\t}\r\n\t\t\r\n\t\telse{\r\n\t\t\t$this->session->set_flashdata('msg', '<strong class=\"msgSuccess\">Esta venta ya fue confirmada o no existe en el sistema.</strong>');\r\n\t\t\tredirect('mi_local/misProductos');\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6f148273896bd1557b544a635a413eed", "score": "0.51262915", "text": "public function notificaciones(){\n $userID = Auth::id(); // Obtiene el id del usuario logueado\n\n // Obtiene los avisos que contienen notificaciones pertenecientes al usuario\n $notificaciones = DB::select(\"SELECT id, titulo, comentario, activadoPor\n FROM avisos\n WHERE idUsuario = $userID\n AND activo = '-1'\");\n\n // Devuelve un JSON con los avisos que tienen notificiaciones\n return $notificaciones;\n }", "title": "" }, { "docid": "eaea282a45bbe951dffbc430b1f310ca", "score": "0.511658", "text": "public function fetchImpiegati(){\n //join azienda a on a.id=u.impiego where impiego='\".$azienda.\"'\";\n $impiegati=Azienda::find(request('aziende'))->impiegati()->select('username','propic','impiego')->get();\n if(count($impiegati)>0){\n foreach($impiegati as $impiegato){\n $impiegato->impiego=Azienda::find(request('aziende'))->nome;\n }\n }\n return $impiegati;\n }", "title": "" }, { "docid": "f3e0cdb5aec6dc42839f9cd2fc0214ea", "score": "0.51113445", "text": "public function receberNotificacao() {\r\n $this->db->tabela = \"forma_pagamento\";\r\n\r\n if ($this->parametros[0] == \"pagseguro\") {\r\n $consulta = $this->db->consulta(\"WHERE classe = 'PAGSEGURO'\");\r\n\r\n if (mysql_num_rows($consulta)) {\r\n $formaPagamento = mysql_fetch_assoc($consulta);\r\n \r\n $modelo = $this->loadModel(\"formapagamento/pagseguro/model-notificacoes\");\r\n $modelo->token = $formaPagamento[\"token\"];\r\n $modelo->emailLoja = $formaPagamento[\"email\"];\r\n $modelo->receberNotificacao();\r\n }\r\n } else {\r\n $parametros[\"formaPagamento\"] = \"Não especificada\";\r\n $parametros[\"retorno\"] = \"Post não validado no controller - \" . serialize($_POST);\r\n\r\n $this->db->tabela = \"log_retorno_pagamento\"; \r\n $this->db->importArray($parametros);\r\n $this->db->persist();\r\n }\r\n }", "title": "" }, { "docid": "dc5d0fafc6510c4fd702aaf1475912c6", "score": "0.51061845", "text": "public function utentiBannati(){\n if(self::isLogged()){\n $view = new VAmministratore();\n $pm = FPersistentManager::getInstance();\n $utentiBannati=$pm->loadList(\"FUtenteRegistrato\");\n $result=array();\n if($utentiBannati!=null){\n foreach ($utentiBannati as $value){\n $array=array();\n $array[\"motivoBan\"]=$value->getMotivazione();\n $array[\"username\"]=$value->getUsername();\n $utente=$pm->load($value->getUsername(),\"FUtente\");\n $array[\"pic64\"]=base64_encode($utente->getImmagine());\n $result[]=$array;\n }\n }\n\n $view->showUtentiBannati($result);\n }\n else{\n header('Location: /PolisportivaDDD/Utente/home');\n }\n\n\n }", "title": "" }, { "docid": "929d2e078b4dbef8484b45ed2e733f3c", "score": "0.5105039", "text": "public function DA_ConsultarPagosNoAplicados();", "title": "" }, { "docid": "b9512318269e12b8684cad6774f24fd1", "score": "0.5103069", "text": "public function obterEmendasAprovadas(){\n\t\t\n\t\t$caminho_certificado\t= APPRAIZ.\"spo/certificados/sof_siop.pem\";\n\t\t$senha_certificado\t\t= \"simec\"; \n\t\t\t\t\n\t\t$context = stream_context_create(array(\n\t\t\t\t\t\t\t\t\t\t'ssl' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t'verify_peer' => false,\n\t\t\t\t\t\t\t\t\t\t\t\t'allow_self_signed' => true,\n\t\t\t\t\t\t\t\t\t\t\t\t'cafile' => $caminho_certificado,\n\t\t\t\t\t\t\t\t\t\t\t\t'local_cert' => $caminho_certificado,\n\t\t\t\t\t\t\t\t\t\t\t\t'passphrase ' \t=> $senha_certificado\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t); \n\t\n\t\t$obEnvio = $this->getObterEmendasAprovadas();\n\t\t//$obEnvio = $this->getBeneficiariosEmenda();\n\t\t//ver($obEnvio,d);\n\t\t$wsProposta = new SimecWsObterEmendasAprovadas($this->urlWsdl, array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'exceptions'\t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'trace'\t\t\t=> true,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'cache_wsdl'\t=> WSDL_CACHE_NONE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'soap_version'\t=> SOAP_1_2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'encoding'\t\t=> 'ISO-8859-1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'stream_context' => $context\n\t\t\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);\n\t\t//ver($wsProposta,d);\n\t\t//$wsProposta->__setUsernameToken($this->usuario, md5($this->senha) );\n\t\t//ver($wsProposta,d);\n\t\t$retorno = $wsProposta->obterEmendasAprovadas( $obEnvio );\n\t\t\n\t\tif( (int)$retorno->return->sucesso == 1 ){\n\t\t\t$arrRetorno = $retorno->return->emendasAprovadas->emendaAprovada;\n\t\t\t$this->cargaEmendaBase( $arrRetorno );\n\t\t} else {\n\t\t\tver($retorno->return->mensagensErro, d);\n\t\t}\n\t\t//return (int)$retorno->return->sucesso;\n\t\treturn (int)$retorno->return->sucesso;\n\t}", "title": "" }, { "docid": "2035392e4125b7a37136cbbf569a52a3", "score": "0.5090515", "text": "private function profesionales(){\t\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n \n $pdoProfesionales= new ProfesionalPDO();\n $profesionales = $pdoProfesionales->getAll();\n \n $this->response($this->json($profesionales),200);\n \n\t\t}", "title": "" }, { "docid": "0bd83e4b70c9342d3ede76a4f5951d3d", "score": "0.50903", "text": "public function getInstituicao()\n {\n return $this->instituicao;\n }", "title": "" }, { "docid": "7f4ab280784f96c68314096a3d854795", "score": "0.5089921", "text": "function verificarHistoricoApostas() {\r\n\t\t$dg = DataGetter::getInstance();\r\n\t\treturn $dg->getData('apostas_' . $this->cpf);\r\n\t}", "title": "" }, { "docid": "45ca679afb08c6fa996f00800c7576e1", "score": "0.50828934", "text": "function generar_archivo_siap() {\n\n if (!empty($this->data['Formulario']['accion']) && ($this->data['Formulario']['accion'] === 'generar' || $this->data['Formulario']['accion'] === 'asignar') && !empty($this->data['Condicion']['Bar-version'])) {\n\n if (empty($this->data['Condicion']['Bar-periodo_largo'])) {\n return $this->Session->setFlash('Debe especificar un periodo valido de la forma AAAAMM.', 'error');\n } else if (!isset($this->data['Condicion']['Bar-numero'])) {\n return $this->Session->setFlash('Debe ingresar el número de liquidación.', 'error');\n } else if (empty($this->data['Condicion']['Bar-empleador_id'])) {\n return $this->Session->setFlash('Debe seleccionar el empleador.', 'error');\n } else {\n $periodo = $this->Util->format($this->data['Condicion']['Bar-periodo_largo'], 'periodo');\n $conditions = array('Liquidacion.estado' => 'Confirmada',\n 'Liquidacion.tipo' => $this->data['Condicion']['Liquidacion-tipo'],\n 'Liquidacion.ano' => $periodo['ano'],\n 'Liquidacion.mes'\t => $periodo['mes']);\n if (!empty($periodo['periodo'])) {\n $conditions['Liquidacion.periodo'] = $periodo['periodo'];\n }\n\n if (!empty($this->data['Condicion']['Bar-empleador_id'])) {\n $conditions['Liquidacion.empleador_id'] = $this->data['Condicion']['Bar-empleador_id'];\n $contain = array('Empleador' => array('EmployersType'));\n } else {\n $groupParams = User::getGroupParams($this->data['Condicion']['Bar-grupo_id']);\n $contain = array();\n }\n $conditions['(Liquidacion.group_id & ' . $this->data['Condicion']['Bar-grupo_id'] . ') >'] = 0;\n\n\n if ($this->data['Formulario']['accion'] === 'asignar') {\n\t\t\t\t\tif ($this->Liquidacion->updateAll(array('numero'=> $this->data['Condicion']['Bar-numero']), $conditions)) {\n return $this->Session->setFlash('Se asignó correctamente el número de liquidación', 'ok');\n } else {\n return $this->Session->setFlash('No fué posible asignar el número de liquidación.', 'error');\n }\n\n }\n\n $r = ClassRegistry::init('AusenciasSeguimiento')->find('all', array(\n 'contain' => array('Liquidacion', 'Ausencia' => array('order' => 'Ausencia.desde')),\n 'conditions' => array('(Liquidacion.group_id & ' . $this->data['Condicion']['Bar-grupo_id'] . ') >' => 0,\n 'Liquidacion.estado' => 'Confirmada',\n 'AusenciasSeguimiento.estado' => 'Liquidado',\n 'Liquidacion.ano' => $periodo['ano'],\n 'Liquidacion.mes' => $periodo['mes'])));\n\n $ausencias = array();\n foreach ($r as $ausencia) {\n if (!empty($ausencia['Liquidacion']['trabajador_cuil'])) {\n $ausencias[$ausencia['Liquidacion']['trabajador_cuil']][] = $ausencia;\n }\n }\n\n\n App::import('Vendor', 'dates', 'pragmatia');\n $remuneraciones = null;\n // $remuneracionesDelPeriodo = null;\n $compone = null;\n $cantidadSueldo = $cantidadHorasExtras = $dias = $diasLiquidacionActual = $horas = $aporteAdicionalObraSocial = null;\n\n // $conditions['Liquidacion.id'] = 188379;\n // $conditions['Liquidacion.id'] = [177315, 177312, 177345,175515];\n // $conditions['Liquidacion.id'] = [175516];\n // $conditions['Trabajador.cuit'] = '20-25280294-1';\n\n $step = 0;\n do {\n $r = $this->Liquidacion->find('all',\n array( 'checkSecurity' => false,\n 'limit' => $step . ',' . 500,\n 'contain' => array_merge($contain, array(\n 'LiquidacionesDetalle' => array('Concepto', 'conditions' => array('OR' => array('LiquidacionesDetalle.concepto_imprimir' => 'Si', array('LiquidacionesDetalle.concepto_imprimir' => 'Solo con valor', 'ABS(LiquidacionesDetalle.valor) >' => 0)))),\n 'Relacion' => array(\n 'RelacionesHistorial' => array(\n 'limit' => 1,\n 'conditions' => array(\n 'RelacionesHistorial.estado' => 'Confirmado'),\n 'order' => 'RelacionesHistorial.id DESC'),\n 'Actividad',\n 'Situacion',\n 'ConveniosCategoria' => array('Convenio'),\n 'Modalidad'),\n 'Trabajador' => array('ObrasSocial', 'Condicion', 'Siniestrado', 'Localidad'))),\n 'conditions' => $conditions));\n $step+=500;\n if (empty($r)) {\n break;\n }\n\n $opcionesConcepto = $this->Liquidacion->LiquidacionesDetalle->Concepto->opciones;\n\n $ausenciasMotivo = $this->Liquidacion->Relacion->Ausencia->AusenciasMotivo->find('all',\n\t\t\t\t\t\t array('conditions' => array('NOT' => array('AusenciasMotivo.situacion_id' => null))));\n $ausenciasMotivo = Set::combine($ausenciasMotivo, '{n}.AusenciasMotivo.id', '{n}.Situacion');\n\n\n $data = ClassRegistry::init('Siap')->findById($this->data['Condicion']['Bar-version']);\n foreach ($data['SiapsDetalle'] as $k => $v) {\n $detalles[$v['elemento']] = $v;\n }\n\n $cuils = [ ];\n $valores = [ ];\n foreach ($r as $liquidacion) {\n $cuils[$liquidacion['Liquidacion']['trabajador_cuil']] = $liquidacion['Liquidacion']['trabajador_cuil'];\n\n /** Inicialize arrays */\n if (!isset($remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']])) {\n\n $bruto[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n $cantidadHorasExtras[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n\t\t\t\t\t\t\t$cantidadSueldo[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n\t\t\t\t\t\t\t$horas[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n\t\t\t\t\t\t\t$dias[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n\t\t\t\t\t\t\t$diasLiquidacionActual[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n\t\t\t\t\t\t\t$aporteAdicionalObraSocial[$liquidacion['Liquidacion']['trabajador_cuil']] = 0;\n if ($liquidacion['Liquidacion']['tipo'] == 'Normal') {\n $dias_totales_a_proporcionar = 30;\n } else if ($liquidacion['Liquidacion']['tipo'] == 'Sac' || $liquidacion['Liquidacion']['tipo'] == 'Final') {\n $dias_totales_a_proporcionar = 180;\n } else if ($liquidacion['Liquidacion']['tipo'] == 'Vacaciones') {\n $dias_totales_a_proporcionar = 30;\n } else {\n $dias_totales_a_proporcionar = 30;\n }\n\n foreach ($opcionesConcepto['remuneracion'] as $k => $v) {\n $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']][$v] = 0;\n // $remuneracionesDelPeriodo[$liquidacion['Liquidacion']['trabajador_cuil']][$v] = 0;\n }\n\n foreach ($opcionesConcepto['compone'] as $k => $v) {\n $compone[$liquidacion['Liquidacion']['trabajador_cuil']][$k] = 0;\n }\n }\n $bruto[$liquidacion['Liquidacion']['trabajador_cuil']] += $liquidacion['Liquidacion']['remunerativo'];\n $bruto[$liquidacion['Liquidacion']['trabajador_cuil']] += $liquidacion['Liquidacion']['no_remunerativo'];\n\n foreach ($liquidacion['LiquidacionesDetalle'] as $detalle) {\n if (!isset($valores[$liquidacion['Liquidacion']['trabajador_cuil']][$detalle['concepto_id']])) {\n $valores[$liquidacion['Liquidacion']['trabajador_cuil']][$detalle['concepto_id']] = 0;\n }\n $valores[$liquidacion['Liquidacion']['trabajador_cuil']][$detalle['concepto_id']] += 1 * str_replace('.', '', $detalle['valor']);\n if ($detalle['concepto_codigo'] == 'horas') {\n $horas[$liquidacion['Liquidacion']['trabajador_cuil']] = $detalle['valor_cantidad'];\n }\n if ($detalle['concepto_codigo'] == 'aporte_adicional_obra_social' || $detalle['concepto_codigo'] == 'adherente_obra_social') {\n $aporteAdicionalObraSocial[$liquidacion['Liquidacion']['trabajador_cuil']] += $detalle['valor'];\n }\n if ($detalle['concepto_codigo'] == 'sueldo_basico'\n || $detalle['concepto_codigo'] == 'sac'\n || $detalle['concepto_codigo'] == 'vacaciones'\n || $detalle['concepto_codigo'] == 'ausencias_enfermedad'\n || $detalle['concepto_codigo'] == 'ausencias_enfermedad_familiar'\n || $detalle['concepto_codigo'] == 'ausencias_licencia'\n || $detalle['concepto_codigo'] == 'ausencias_accidente'\n || $detalle['concepto_codigo'] == 'ausencias_accidente_art'\n || $detalle['concepto_codigo'] == 'ausencias_permiso_gremial'\n || $detalle['concepto_codigo'] == 'suspension_art_223_bis'\n ) {\n $dias[$liquidacion['Liquidacion']['trabajador_cuil']] += $detalle['valor_cantidad'];\n $diasLiquidacionActual[$liquidacion['Liquidacion']['trabajador_cuil']] += $detalle['valor_cantidad'];\n }\n\n if (!empty($detalle['concepto_compone'])) {\n $compone[$liquidacion['Liquidacion']['trabajador_cuil']][$detalle['concepto_compone']] += $detalle['valor'];\n\n\t\t\t\t\t\t\t\tif ($detalle['concepto_compone'] === 'Importe Horas Extras') {\n\t\t\t\t\t\t\t\t\t$cantidadHorasExtras[$liquidacion['Liquidacion']['trabajador_cuil']] += $detalle['valor_cantidad'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ($detalle['concepto_compone'] === 'Sueldo') {\n\t\t\t\t\t\t\t\t\t$cantidadSueldo[$liquidacion['Liquidacion']['trabajador_cuil']] += $detalle['valor_cantidad'];\n\t\t\t\t\t\t\t\t}\n }\n if (!empty($detalle['concepto_remuneracion'])) {\n foreach ($opcionesConcepto['remuneracion'] as $k => $v) {\n if ($detalle['Concepto']['remuneracion'] & (int)$k) {\n $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']][$v] += $detalle['valor'];\n // $remuneracionesDelPeriodo[$liquidacion['Liquidacion']['trabajador_cuil']][$v] += $detalle['valor'];\n }\n }\n }\n }\n\n\n /** Must sumarize. Can't do in by query because of contain. */\n if (!isset($liquidaciones[$liquidacion['Liquidacion']['trabajador_cuil']])) {\n $liquidaciones[$liquidacion['Liquidacion']['trabajador_cuil']] = $liquidacion;\n } else {\n foreach (array('remunerativo', 'no_remunerativo', 'deduccion', 'total_pesos', 'total_beneficios', 'total') as $total) {\n $liquidaciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Liquidacion'][$total] += $liquidacion['Liquidacion'][$total];\n }\n }\n }\n\n\n foreach ($cuils as $k => $cuil) {\n // search prev\n $prevLiquidaciones = $this->Liquidacion->find('all',\n array( 'checkSecurity' => false,\n 'contain' => array('LiquidacionesDetalle' => array('Concepto', 'conditions' => array('OR' => array('LiquidacionesDetalle.concepto_imprimir' => 'Si', array('LiquidacionesDetalle.concepto_imprimir' => 'Solo con valor', 'ABS(LiquidacionesDetalle.valor) >' => 0))))),\n 'conditions' => array(\n 'Liquidacion.ano' => $periodo['ano'],\n 'Liquidacion.mes'\t => $periodo['mes'],\n 'Liquidacion.trabajador_cuil' => $cuil,\n 'Liquidacion.numero' => explode(',', $this->data['Condicion']['Bar-numero']))\n ));\n // debug($prevLiquidaciones);die;\n\n foreach ($prevLiquidaciones as $prevLiquidacion) {\n $bruto[$prevLiquidacion['Liquidacion']['trabajador_cuil']] += $prevLiquidacion['Liquidacion']['remunerativo'];\n $bruto[$prevLiquidacion['Liquidacion']['trabajador_cuil']] += $prevLiquidacion['Liquidacion']['no_remunerativo'];\n\n foreach ($prevLiquidacion['LiquidacionesDetalle'] as $prevDetalle) {\n if ($prevDetalle['concepto_codigo'] == 'sueldo_basico'\n || $prevDetalle['concepto_codigo'] == 'sac'\n || $prevDetalle['concepto_codigo'] == 'vacaciones'\n || $prevDetalle['concepto_codigo'] == 'ausencias_enfermedad'\n || $prevDetalle['concepto_codigo'] == 'ausencias_enfermedad_familiar'\n || $prevDetalle['concepto_codigo'] == 'ausencias_licencia'\n || $prevDetalle['concepto_codigo'] == 'ausencias_accidente'\n || $prevDetalle['concepto_codigo'] == 'ausencias_accidente_art'\n || $prevDetalle['concepto_codigo'] == 'ausencias_permiso_gremial'\n || $prevDetalle['concepto_codigo'] == 'suspension_art_223_bis'\n ) {\n $dias[$prevLiquidacion['Liquidacion']['trabajador_cuil']] += $prevDetalle['valor_cantidad'];\n }\n\n if (!empty($prevDetalle['concepto_remuneracion'])) {\n foreach ($opcionesConcepto['remuneracion'] as $k => $v) {\n if ($prevDetalle['Concepto']['remuneracion'] & (int)$k) {\n $remuneraciones[$prevLiquidacion['Liquidacion']['trabajador_cuil']][$v] += $prevDetalle['valor'];\n }\n }\n }\n }\n }\n }\n\n\n foreach ($bruto as $k => $v) {\n $bruto[$k] = $this->Util->format($v, array('type' => 'number', 'decimals' => ''));\n }\n\n\n // foreach ($remuneracionesDelPeriodo as $cuit => $remuneracion) {\n // foreach ($remuneracion as $k => $v) {\n // $remuneracionesDelPeriodo[$cuit][$k] = $this->Util->format($v, array('type' => 'numero', 'decimals' => ''));\n // }\n // }\n\n foreach ($remuneraciones as $cuit => $remuneracion) {\n foreach ($remuneracion as $k => $v) {\n $remuneraciones[$cuit][$k] = $this->Util->format($v, array('type' => 'numero', 'decimals' => ''));\n if ($remuneraciones[$cuit][$k] - $bruto[$cuit] == 1 || $remuneraciones[$cuit][$k] - $bruto[$cuit] == 2 || $remuneraciones[$cuit][$k] - $bruto[$cuit] == 3 || $remuneraciones[$cuit][$k] - $bruto[$cuit] == 4) {\n $remuneraciones[$cuit][$k] = $bruto[$cuit];\n }\n }\n }\n\n\n $variables = Set::combine(ClassRegistry::init('Variable')->find('all', array(\n 'recursive' => -1,\n 'conditions' => array('Variable.nombre' => array('#tope_maximo_aportes', '#a_detraer')),\n 'order' => false)), '{n}.Variable.nombre', '{n}.Variable');\n // debug($variables);die;\n\n $lineas = null;\n foreach ($liquidaciones as $liquidacion) {\n $campos = $detalles;\n\n if ($data['Siap']['tipo'] == 'Libro Sueldo Digital') {\n\n if (empty($lineas['r1'])) {\n $campos['r1c1']['valor'] = '1'; //Identificador de registro\n $campos['r1c2']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['empleador_cuit']); //CUIT\n // $campos['r1c3']['valor'] = 'SJ'; //Identificación del envío\n $campos['r1c4']['valor'] = $periodo['periodoCompleto']; //Período\n $campos['r1c5']['valor'] = 'M'; // TODO //Tipo liquidación\n $campos['r1c6']['valor'] = max(explode(',', $this->data['Condicion']['Bar-numero'])) + 1; //Número de liquidación\n $campos['r1c7']['valor'] = 30; // Días base\n $campos['r1c8']['valor'] = count($liquidaciones); // Cantidad Registros 04\n\n $tmp = array();\n foreach ($campos as $k => $campo) {\n if (substr($k, 0, 2) == 'r1') {\n $tmp[] =$campo;\n }\n }\n $lineas['r1'][] = $this->__generarRegistro($tmp);\n }\n\n $campos['r2c1']['valor'] = '2'; //Identificador de registro\n $campos['r2c2']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['trabajador_cuil']); //CUIL\n $campos['r2c3']['valor'] = $liquidacion['Liquidacion']['relacion_legajo']; //Legajo\n $campos['r2c4']['valor'] = $liquidacion['Liquidacion']['relacion_area_id']; //TODO, area nombre //Dependencia de Revista\n $campos['r2c5']['valor'] = ''; //CBU\n // $campos['r2c5']['valor'] = $liquidacion['Liquidacion']['trabajador_cbu']; //CBU\n // $campos['r2c6']['valor'] = 0;\n if ($dias[$liquidacion['Liquidacion']['trabajador_cuil']] != $dias_totales_a_proporcionar) {\n $campos['r2c6']['valor'] = $dias[$liquidacion['Liquidacion']['trabajador_cuil']] - $diasLiquidacionActual[$liquidacion['Liquidacion']['trabajador_cuil']]; //TODO: ver liq final //Cant. de días para proporcionar el tope\n }\n $campos['r2c7']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['pago']);\n // $campos['r2c8']['valor'] = ''; //TODO: ver Fecha de rúbrica //Fecha de rúbrica\n // $campos['r2c9']['valor'] = '1'; //TODO: ver Forma de pago //Forma de pago\n\n $tmp = array();\n foreach ($campos as $k => $campo) {\n if (substr($k, 0, 2) == 'r2') {\n $tmp[] =$campo;\n }\n }\n $lineas['r2'][] = $this->__generarRegistro($tmp);\n\n foreach ($liquidacion['LiquidacionesDetalle'] as $detalle) {\n $campos['r3c1']['valor'] = '3'; //Identificador de registro\n $campos['r3c2']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['trabajador_cuil']); //CUIL\n $campos['r3c3']['valor'] = $detalle['concepto_id']; // Código Concepto\n $campos['r3c4']['valor'] = str_replace('.', '', $detalle['valor_cantidad']); // Cantidad\n $campos['r3c5']['valor'] = ''; // Unidades\n // $campos['r3c6']['valor'] = str_replace('.', '', $detalle['valor']); // Importe\n $campos['r3c6']['valor'] = str_replace('.', '', $valores[$liquidacion['Liquidacion']['trabajador_cuil']][$detalle['concepto_id']]); // Importe\n\n $campos['r3c7']['valor'] = ($detalle['concepto_tipo'] == 'Deduccion')?'D':'C'; // Débito Crédito\n $campos['r3c8']['valor'] = ''; // Período ajuste\n\n $tmp = array();\n foreach ($campos as $k => $campo) {\n if (substr($k, 0, 2) == 'r3') {\n $tmp[] =$campo;\n }\n }\n $lineas['r3'][] = $this->__generarRegistro($tmp);\n }\n\n $campos['r4c1']['valor'] = '4'; //Identificador de registro\n $campos['r4c2']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['trabajador_cuil']); //CUIL\n // $campos['r4c3']['valor'] = ''; //TODO ver conyugue // Cónyuge\n // $campos['r4c4']['valor'] = ''; // Cantidad de hijos\n $campos['r4c5']['valor'] = $liquidacion['Relacion']['ConveniosCategoria']['Convenio']['numero']=='0'?'0':'1'; // Marca CCT\n //$campos['r4c6']['valor'] = ''; // Marca SCVO\n // $campos['r4c7']['valor'] = ''; // Marca corresponde reducción\n $campos['r4c8']['valor'] = $liquidacion['Empleador']['EmployersType']['code']; // Tipo empresa\n // $campos['r4c9']['valor'] = ''; // Tipo de operación\n $campos['r4c10']['valor'] = $liquidacion['Relacion']['Situacion']['codigo']; // Código situación\n $campos['r4c11']['valor'] = $liquidacion['Trabajador']['Condicion']['codigo']; // Código condición\n $campos['r4c12']['valor'] = $liquidacion['Relacion']['Actividad']['codigo']; // Código actividad\n $campos['r4c13']['valor'] = $liquidacion['Relacion']['Modalidad']['codigo']; // Código modalidad contratación\n $campos['r4c14']['valor'] = $liquidacion['Trabajador']['Siniestrado']['codigo']; // Código siniestrado\n $campos['r4c15']['valor'] = $liquidacion['Trabajador']['Localidad']['codigo_zona']; // Código de Localidad\n $campos['r4c16']['valor'] = '1'; // Situación de Revista 1\n $campos['r4c17']['valor'] = '1'; // Día inicio Situación de Revista 1\n $campos['r4c18']['valor'] = '0'; // Situación de Revista 2\n $campos['r4c19']['valor'] = '0'; // Día inicio Situación de Revista 2\n $campos['r4c20']['valor'] = '0'; // Situación de Revista 3\n $campos['r4c21']['valor'] = '0'; // Día inicio Situación de Revista 3\n // $campos['r4c22']['valor'] = $liquidacion['Liquidacion']['convenio_categoria_jornada'] == 'Mensual'?$dias[$liquidacion['Liquidacion']['trabajador_cuil']]:0; // Cant. días trabajados\n $campos['r4c22']['valor'] = $liquidacion['Liquidacion']['convenio_categoria_jornada'] == 'Mensual'?30:0; // Cant. días trabajados\n $campos['r4c23']['valor'] = $liquidacion['Liquidacion']['convenio_categoria_jornada'] == 'Por Hora'?$horas[$liquidacion['Liquidacion']['trabajador_cuil']]:0; // Horas trabajadas\n // $campos['r4c24']['valor'] = ''; // Porcentaje aporte adicional SS\n $campos['r4c25']['valor'] = $liquidacion['Trabajador']['Condicion']['codigo'] == '5'?'500':'0'; // Contribución tarea diferencial\n $campos['r4c26']['valor'] = $liquidacion['Trabajador']['ObrasSocial']['codigo']; // Código Obra social\n $campos['r4c27']['valor'] = $liquidacion['Trabajador']['adherentes_os']; // Cantidad adherentes\n // $campos['r4c28']['valor'] = str_replace('.', '', $liquidacion['Trabajador']['aporte_adicional_os']); // Aporte Adicional OS\n $campos['r4c28']['valor'] = str_replace('.', '', $aporteAdicionalObraSocial[$liquidacion['Liquidacion']['trabajador_cuil']]) * 100; // Aporte Adicional OS\n // $campos['r4c29']['valor'] = '0'; // Contribución Adicional OS\n // $campos['r4c30']['valor'] = '0'; // Base cálculo Diferencial Aportes OS y FSR\n // $campos['r4c31']['valor'] = '0'; // Base cálculo Diferencial OS y FSR\n // $campos['r4c32']['valor'] = '0'; // Base cálculo Diferencial LRT\n // $campos['r4c33']['valor'] = '0'; // Remuneración Maternidad ANSeS\n $campos['r4c34']['valor'] = $bruto[$liquidacion['Liquidacion']['trabajador_cuil']]; // Remuneración bruta\n\n // $tope = 22517169;\n $tope = trim(str_replace('=', '', str_replace('.', '', $variables['#tope_maximo_aportes']['formula'])));\n if ($dias_totales_a_proporcionar == 180) {\n $tope = $tope * 1.5;\n }\n $tmp_tope = (int)($tope / $dias_totales_a_proporcionar * $dias[$liquidacion['Liquidacion']['trabajador_cuil']]);\n // $tmp_tope = $tope;\n $campos['r4c35']['valor'] = ($tmp_tope > $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 1']?$remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 1']:$tmp_tope); // Base imponible 1\n\n\n $campos['r4c36']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 2']; // Base imponible 2\n $campos['r4c37']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 3']; // Base imponible 3\n\n $campos['r4c38']['valor'] = ($tmp_tope > $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 4']?$remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 4']:$tmp_tope); // Base imponible 4\n $campos['r4c39']['valor'] = ($tmp_tope > $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5']?$remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5']:$tmp_tope); // Base imponible 5\n\n // if ($liquidacion['Liquidacion']['trabajador_cuil'] == '20-25280294-1') {\n // echo '<br/>rem 1: ' . $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 1'];\n // echo '<br/>rem 4: ' . $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 4'];\n // echo '<br/>rem 5: ' . $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5'];\n\n // echo '<br/>val 1: ' . $campos['r4c35']['valor'];\n // echo '<br/>val 4: ' . $campos['r4c38']['valor'];\n // echo '<br/>val 5: ' . $campos['r4c39']['valor'];\n\n // // 1 * $tmp_tope > 1 * $remuneracionesDelPeriodo[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5']\n // // echo '<br/>val max: ' . $campos['r4c35']['valor'];\n // echo '<br/>dias: ' . $dias[$liquidacion['Liquidacion']['trabajador_cuil']];\n // echo '<br/>$dias_totales_a_proporcionar: ' . $dias_totales_a_proporcionar;\n // echo '<br/>$tope: ' . $tope;\n // echo '<br/>$tmp_tope: ' . $tmp_tope;\n // echo '<br/>$bruto: ' . $bruto[$liquidacion['Liquidacion']['trabajador_cuil']];\n // // debug($remuneraciones);\n // echo '<br/>$dias_totales_a_proporcionar: ' . $dias_totales_a_proporcionar;\n // echo '<br/>res: ' . $campos['r4c35']['valor'];die;\n // }\n\n\n // $campos['r4c38']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 4']; // Base imponible 6\n // $campos['r4c39']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5']; // Base imponible 6\n $campos['r4c40']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 6']; // Base imponible 6\n $campos['r4c41']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 7']; // Base imponible 7\n $campos['r4c42']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 8']; // Base imponible 8\n $campos['r4c43']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 9']; // Base imponible 9\n // $campos['r4c36']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 2']; // Base imponible 2\n // $campos['r4c37']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 3']; // Base imponible 3\n // $campos['r4c38']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 4']; // Base imponible 4\n // $campos['r4c39']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5']; // Base imponible 5\n // $campos['r4c40']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 6']; // Base imponible 6\n // $campos['r4c41']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 7']; // Base imponible 7\n // $campos['r4c42']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 8']; // Base imponible 8\n // $campos['r4c43']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 9']; // Base imponible 9\n\n // $campos['r4c44']['valor'] = ''; // Base para el cálculo diferencial de aporte de Seg. Social\n // $campos['r4c45']['valor'] = ''; // Base para el cálculo diferencial de contribuciones de Seg. Social\n $aDetraer = trim(str_replace('=', '', $variables['#a_detraer']['formula']));\n if (($remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 2'] / 100) > $aDetraer) {\n $aDetraer = $aDetraer / 8 * floatval($liquidacion['Liquidacion']['relacion_horas']);\n $campos['r4c46']['valor'] = $this->Util->format(($remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 2'] / 100) - $aDetraer, array('type' => 'number', 'decimals' => '')); // Base imponible 10\n $campos['r4c47']['valor'] = str_replace('.', '', $aDetraer); // Importe a detraer\n }\n\n $tmp = array();\n foreach ($campos as $k => $campo) {\n if (substr($k, 0, 2) == 'r4') {\n $tmp[] = $campo;\n }\n }\n $lineas['r4'][] = $this->__generarRegistro($tmp);\n\n\n // opcional\n // $campos['r5c1']['valor'] = '5'; //Identificador de registro\n // $campos['r5c2']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['trabajador_cuil']); //CUIL\n // $campos['r5c3']['valor'] = ''; // Categoría profesional\n // $campos['r5c4']['valor'] = ''; // Puesto desempeñado\n // $campos['r5c5']['valor'] = ''; // Fecha de ingreso\n // $campos['r5c6']['valor'] = ''; // Fecha de egreso\n // $campos['r5c7']['valor'] = ''; // Remuneración\n // $campos['r5c8']['valor'] = str_replace('-', '', $liquidacion['Liquidacion']['empleador_cuit']); //CUIT\n\n // $tmp = array();\n // foreach ($campos as $k => $campo) {\n // if (substr($k, 0, 2) == 'r4') {\n // $tmp[] =$campo;\n // }\n // }\n // $lineas['r5'][] = $this->__generarRegistro($tmp);\n\n\t\t\t\t\t\t\t// $diff = Dates::dateDiff($from, $to);\n // $firstDayNextMonth = date('Y-m-d', strtotime('first day of -0 month'));\n // $firstDayNextMonth = date('Y-m-d', strtotime('first day of next month'));\n // d($firstDayNextMonth);\n\n // d($lineasFinales);\n } else if ($data['Siap']['tipo'] == 'Siap') {\n\n\n if ($liquidacion['Liquidacion']['no_remunerativo'] < 0) {\n $liquidacion['Liquidacion']['no_remunerativo'] = '0';\n }\n\n $campos['c1']['valor'] = str_replace('-', '', $liquidacion['Trabajador']['cuil']);\n $campos['c2']['valor'] = $liquidacion['Trabajador']['apellido'] . ' ' . $liquidacion['Trabajador']['nombre'];\n\n if (!empty($liquidacion['Relacion']['situacion_id'])) {\n $campos['c5']['valor'] = $liquidacion['Relacion']['Situacion']['codigo'];\n }\n if (!empty($liquidacion['Trabajador']['condicion_id'])) {\n $campos['c6']['valor'] = $liquidacion['Trabajador']['Condicion']['codigo'];\n }\n $campos['c7']['valor'] = $liquidacion['Relacion']['Actividad']['codigo'];\n $campos['c8']['valor'] = $liquidacion['Trabajador']['Localidad']['codigo_zona'];\n\n if (!empty($liquidacion['Relacion']['modalidad_id'])) {\n $campos['c10']['valor'] = $liquidacion['Relacion']['Modalidad']['codigo'];\n }\n if (!empty($liquidacion['Trabajador']['obra_social_id'])) {\n $campos['c11']['valor'] = $liquidacion['Trabajador']['ObrasSocial']['codigo'];\n }\n $campos['c12']['valor'] = $liquidacion['Trabajador']['adherentes_os'];\n\n $campos['c13']['valor'] = array_sum($compone[$liquidacion['Liquidacion']['trabajador_cuil']]) + $liquidacion['Liquidacion']['no_remunerativo'];\n\n $campos['c14']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 1'];\n $campos['c20']['valor'] = $liquidacion['Trabajador']['Localidad']['nombre'];\n $campos['c21']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 2'];\n $campos['c22']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 3'];\n\n $campos['c23']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 4'];\n\n if (!empty($liquidacion['Trabajador']['siniestrado_id'])) {\n $campos['c24']['valor'] = $liquidacion['Trabajador']['Siniestrado']['codigo'];\n }\n\n if (!empty($this->data['Condicion']['Bar-empleador_id'])) {\n if ($liquidacion['Empleador']['corresponde_reduccion'] === 'Si') {\n $campos['c25']['valor'] = 'S';\n } else {\n $campos['c25']['valor'] = ' ';\n }\n } else {\n $campos['c25']['valor'] = $groupParams['siap_corresponde_reduccion'];\n }\n\n if (!empty($this->data['Condicion']['Bar-empleador_id'])) {\n $campos['c27']['valor'] = $liquidacion['Empleador']['EmployersType']['code'];\n } else {\n $campos['c27']['valor'] = $groupParams['siap_tipo_empleador'];\n }\n\n if ($liquidacion['Trabajador']['jubilacion'] === 'Reparto') {\n $campos['c29']['valor'] = '1';\n } else {\n $campos['c29']['valor'] = '0';\n }\n\n\n $camposTmp = null;\n $camposTmp[0]['situacion'] = '1';\n $camposTmp[0]['dia'] = '01';\n $camposTmp[1]['situacion'] = '0';\n $camposTmp[1]['dia'] = '00';\n $camposTmp[2]['situacion'] = '0';\n $camposTmp[2]['dia'] = '00';\n $previous = null;\n $diasRevista = 0;\n $c = 0;\n if (!empty($ausencias[$liquidacion['Liquidacion']['trabajador_cuil']])) {\n $fin = 0;\n foreach ($ausencias[$liquidacion['Liquidacion']['trabajador_cuil']] as $k => $ausencia) {\n if ($ausenciasMotivo[$ausencia['Ausencia']['ausencia_motivo_id']]['codigo'] != '1') {\n if ($ausencia['Ausencia']['desde'] <= $periodo['desde']) {\n unset($camposTmp[0]);\n }\n\n if ($previous !== $ausenciasMotivo[$ausencia['Ausencia']['ausencia_motivo_id']]['codigo']) {\n $previous = $ausenciasMotivo[$ausencia['Ausencia']['ausencia_motivo_id']]['codigo'];\n $camposTmp[$c]['situacion'] = $ausenciasMotivo[$ausencia['Ausencia']['ausencia_motivo_id']]['codigo'];\n\n if ($ausencia['Ausencia']['desde'] > $periodo['desde']) {\n $camposTmp[$c]['dia'] = array_pop(explode('-', $ausencia['Ausencia']['desde']));\n } else {\n $camposTmp[$c]['dia'] = array_pop(explode('-', $periodo['desde']));\n }\n\n if ($ausencia['AusenciasSeguimiento']['estado'] == 'Liquidado') {\n $fin += $ausencia['AusenciasSeguimiento']['dias'];\n }\n $diasRevista += $fin;\n\n if (!empty($ausencias[$liquidacion['Liquidacion']['trabajador_cuil']][$k+1]['desde'])) {\n $tmpNuevoInicio = array_pop(explode('-', $ausencias[$liquidacion['Liquidacion']['trabajador_cuil']][$k+1]['desde']));\n if ($tmpNuevoInicio == ($camposTmp[$c]['dia'] + $fin)) {\n continue;\n }\n }\n $c++;\n $camposTmp[$c]['situacion'] = '1';\n $camposTmp[$c]['dia'] = $camposTmp[($c-1)]['dia'] + $fin;\n }\n }\n }\n }\n\n ksort($camposTmp);\n $campoNumero = 30;\n foreach ($camposTmp as $k => $tmp) {\n if ($k > 2) {\n break;\n }\n $campoNumero += ($k * 2);\n $campos['c' . $campoNumero]['valor'] = $tmp['situacion'];\n $campos['c' . ($campoNumero + 1)]['valor'] = $tmp['dia'];\n if ($tmp['situacion'] != '0') {\n $campos['c5']['valor'] = $tmp['situacion'];\n }\n }\n\n\n $campos['c36']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Sueldo'];\n $campos['c37']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['SAC'];\n $campos['c38']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Importe Horas Extras'];\n $campos['c39']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Plus Zona Desfavorable'];\n $campos['c40']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Vacaciones'];\n\n if ($liquidacion['Relacion']['ingreso'] > $periodo['desde']) {\n $from = $liquidacion['Relacion']['ingreso'];\n } else {\n $from = $periodo['desde'];\n }\n\n if ($liquidacion['Relacion']['estado'] == 'Historica'\n && !empty($liquidacion['Relacion']['RelacionesHistorial'][0]['fin'])\n && $liquidacion['Relacion']['RelacionesHistorial'][0]['fin'] < $periodo['hasta']) {\n\n $to = $liquidacion['Relacion']['RelacionesHistorial'][0]['fin'];\n } else {\n $to = $periodo['hasta'];\n }\n\n\n if ($liquidacion['Relacion']['ConveniosCategoria']['jornada'] == 'Por Hora') {\n $campos['c41']['valor'] = 0;\n } else {\n $diff = Dates::dateDiff($from, $to);\n $campos['c41']['valor'] = $diff['dias'] - $diasRevista;\n }\n\n\n $campos['c42']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 5'];\n if ($liquidacion['Relacion']['ConveniosCategoria']['nombre'] === 'Fuera de convenio') {\n $campos['c43']['valor'] = '0';\n } else {\n $campos['c43']['valor'] = '1';\n }\n $campos['c44']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 6'];\n $campos['c46']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Adicionales'];\n $campos['c47']['valor'] = $compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Premios'];\n $campos['c48']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 8'];\n $campos['c49']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 7'];\n\n if ($compone[$liquidacion['Liquidacion']['trabajador_cuil']]['Importe Horas Extras'] > 0) {\n if (round($cantidadHorasExtras[$liquidacion['Liquidacion']['trabajador_cuil']]) > 1) {\n $campos['c50']['valor'] = round($cantidadHorasExtras[$liquidacion['Liquidacion']['trabajador_cuil']]);\n } else {\n $campos['c50']['valor'] = 1;\n }\n }\n $campos['c51']['valor'] = $liquidacion['Liquidacion']['no_remunerativo'];\n $campos['c54']['valor'] = $remuneraciones[$liquidacion['Liquidacion']['trabajador_cuil']]['Remuneracion 9'];\n\n if ($liquidacion['Relacion']['tarea_diferencial'] == 'Si') {\n $campos['c55']['valor'] = '2';\n }\n\n\n if ($liquidacion['Relacion']['ConveniosCategoria']['jornada'] == 'Por Hora') {\n $campos['c56']['valor'] = round($cantidadSueldo[$liquidacion['Liquidacion']['trabajador_cuil']]);\n } else {\n $campos['c56']['valor'] = 0;\n\n }\n\n $lineas[] = $this->__generarRegistro($campos);\n }\n }\n } while (!empty($r));\n }\n\n if (!empty($lineas)) {\n\n if ($data['Siap']['tipo'] == 'Libro Sueldo Digital') {\n $lineasFinales = [ ];\n foreach ($lineas as $tipos) {\n foreach ($tipos as $linea) {\n $lineasFinales[] = $linea;\n }\n }\n $lineas = $lineasFinales;\n }\n\n $this->set('archivo', array(\n 'contenido' => implode(\"\\r\\n\", $lineas),\n 'nombre' => ($data['Siap']['tipo'] == 'Siap'?'SICOSS_':'Libro_Sueldo_Digital_') . $periodo['ano'] . '-' . $periodo['mes'] . '.txt'));\n $this->render('..' . DS . 'elements' . DS . 'txt', 'txt');\n } else {\n $this->Session->setFlash('No se han encontrado liquidaciones confirmadas para el periodo seleccioando segun los criterios especificados.', 'error');\n }\n }\n }", "title": "" }, { "docid": "d921a84b045b0e8ce06bd593730a4a6b", "score": "0.50791144", "text": "public function codIva()\n {\n $codigos = [];\n if ($this->ws == 'wsfe') {\n $codigos = (new FeSinItemsParam())->FEParamGetTiposIva($this->client, $this->authRequest);\n $codigos = array_map(function ($o) {\n return $o->Id;\n }, $codigos->IvaTipo);\n } elseif ($this->ws == 'wsmtxca') {\n $codigos = (new FeConItemsParam())->consultarAlicuotasIVA($this->client, $this->authRequest);\n $codigos = array_map(function ($o) {\n return $o->codigo;\n }, $codigos->arrayAlicuotasIVA->codigoDescripcion);\n }\n\n return $codigos;\n }", "title": "" }, { "docid": "b3c684e496e23233c9ff06fb9e1f3d0d", "score": "0.507909", "text": "function prueba(){\n // AppLoader::load_model('Extra/IRespuestas');\n//hallar estudiantes de la prueba actualq eu ya alla llenado el simulacro con respuestas\n $pruebaActual=DB::query(\"select valor from sys_configuraciones where nombre='I.COD_CUESTIONARIO_ACTUAL';\");\n \n \n $estudiantesD=ICuestionario::codigoInterno_estudiantePrueba($pruebaActual);\n //print_r ($estudiantesD);\n //echo \"miremos si sale en esa vaina\";\n GeneraPuntaje::GeneraPuntaje($pruebaActual);\n}", "title": "" }, { "docid": "9faeb00308ddeae024310df7b8217ca4", "score": "0.5073537", "text": "public function notificacionAprobacion($evento)\n {\n \n if($this->aprobado==1)\n {\n //Ids de los usuarios con el rol \"proyecto_pedido\"\n $usuarios =AcEspUej::find()\n ->select([\"accion_centralizada_asignar.usuario\"])\n ->innerjoin('accion_centralizada_asignar', 'accion_centralizada_ac_especifica_uej.id=accion_centralizada_asignar.accion_especifica_ue')\n ->where(['accion_centralizada_asignar.accion_especifica_ue' => $this->id])\n ->andWhere(['accion_centralizada_ac_especifica_uej.estatus' => 1])\n ->asArray()\n ->all();\n $bandera=0;\n foreach ($usuarios as $key => $value) \n {\n //verificar si quien aprueba/desaprueba esta asociado al proyecto\n if($value['usuario']==\\Yii::$app->user->id)\n {\n $bandera=1;\n }\n // usuarios pertenecientes a esa unidad ejecutora\n Notificaciones::notify(Notificaciones::KEY_ACPEDIDOAPROBADO, $value['usuario'], $this->id);\n }\n \n if($bandera==0)\n {\n //enviar a quien lo hace, pues no necesariamente este asociada al proyecto\n Notificaciones::notify(Notificaciones::KEY_ACPEDIDOAPROBADO, \\Yii::$app->user->id, $this->id);\n }\n /**\n /*NOTA\n /*puede darse el caso que existan usuarios del backend que no este asociados, pero igual por su rol \n /*deben llegarle las notificaciones, una vez definidos estos roles se les debe enviar las notificaciones.\n */\n \n }\n else\n {\n $usuarios =AcEspUej::find()\n ->select([\"accion_centralizada_asignar.usuario\"])\n ->innerjoin('accion_centralizada_asignar', 'accion_centralizada_ac_especifica_uej.id=accion_centralizada_asignar.accion_especifica_ue')\n ->where(['accion_centralizada_asignar.accion_especifica_ue' => $this->id])\n ->andWhere(['accion_centralizada_ac_especifica_uej.estatus' => 1])\n ->asArray()\n ->all();\n $bandera=0;\n foreach ($usuarios as $key => $value) \n {\n //verificar si quien aprueba/desaprueba esta asociado al proyecto\n if($value['usuario']==\\Yii::$app->user->id)\n {\n $bandera=1;\n }\n // usuarios pertenecientes a esa unidad ejecutora\n Notificaciones::notify(Notificaciones::KEY_ACPEDIDODESAPROBADO, $value['usuario'], $this->id); \n }\n if($bandera==0)\n {\n //enviar a quien lo hace, pues no necesariamente este asociada al proyecto\n Notificaciones::notify(Notificaciones::KEY_ACPEDIDOAPROBADO, \\Yii::$app->user->id, $this->id);\n }\n /**\n /*NOTA\n /*puede darse el caso que existan usuarios del backend que no este asociados, pero igual por su rol \n /*deben llegarle las notificaciones, una vez definidos estos roles se les debe enviar las notificaciones.\n */\n\n }\n }", "title": "" }, { "docid": "724a1eddc3a3b014b83abd9234c8611b", "score": "0.50591964", "text": "public function listar(){\n try{\n $productos = $this->productos->getProductos();\n if($productos == NULL){\n throw new Exception('No hay productos disponibles en la base de datos');\n }\n $this->data['productos'] = $productos; \n \n } catch (Exception $e){\n $this->data['errorProductos'] = $e->getMessage();\n }\n }", "title": "" }, { "docid": "517774d072ca7389740b1a2fa0fb9b4b", "score": "0.50574034", "text": "public function NotificacionListar() \n {\n if(isset($_GET['setflash'])){\n $this->view->setFlash($_GET['setflash']);\n }\n $notificaciones = $this->notificacionMapper->listar();\n $tipoUsuario = $this->permisos->comprobarTipo();\n $this->view->setVariable(\"notificaciones\",$notificaciones);\n $this->view->setVariable(\"tipoUsuario\", $tipoUsuario);\n $this->view->render(\"notificacion\",\"notificacionSHOWALL\");\n }", "title": "" }, { "docid": "6eef1c059a191c91912413b10bcb6490", "score": "0.5056603", "text": "protected function _checkAppInfo()\n\t{\n\t\n\t\t$msg['type']='new_app_info';\n\t\treturn array();\n\t}", "title": "" }, { "docid": "2febe61b4621fcf914a68dce1db07d99", "score": "0.5055504", "text": "function listaTodasAplicaciones($conexion){\r\n\t\t$stmt=null;\r\n\t\ttry{\r\n\t\t\t$stmt=$conexion->query(\"SELECT * FROM aplicaciones ORDER BY idAplicacion DESC\");\r\n\t\t\t$stmt->execute();\r\n\t\t}catch(PDOException $e){\r\n\t\t\t$_SESSION[\"exception\"]=\"Error al obtener la lista de todas las aplicaciones\";\r\n\t\t\theader(\"Location: ../exception.php\");\r\n\t\t\tdie();\r\n\t\t}\r\n\t\treturn $stmt;\r\n\t}", "title": "" }, { "docid": "22fd7f560cd0204c679661fea43cf62b", "score": "0.5054828", "text": "static function plInfo()\n {\n return array(\n 'plShortName' => _('Argonaut server'),\n 'plDescription' => _('Argonaut server').' ('._('Services').')',\n 'plIcon' => 'geticon.php?context=applications&icon=argonaut&size=16',\n\n 'plProvidedAcls' => parent::generatePlProvidedAcls(self::getAttributesInfo())\n );\n }", "title": "" }, { "docid": "07ef0315a68ca7e67c40d7bad389597d", "score": "0.5054507", "text": "public function actionCliente(){\n $cadB = '';\n $height = '2.0em';\n $height2 = '3.0em';\n \n $cadB .= Ayuda::toHtml('panel_clientes');\n \n $cad = '';\n \n $c1 = '#eeffee';\n $c2 = '#f6f6ff';\n $c3 = '#ffffee';\n $c = $c1;\n $vctSt['1'] = '<span style=\"color:#000099;\">Activo</span>';\n $vctSt['2'] = '<span style=\"color:#999900;\">Pendiente</span>';\n \n $proyectos = $this->proyectos();\n \n\n \n foreach( $proyectos as $proyecto ){\n $cad .= '<div class=\"row\" style=\"background-color:#ccc;\"><div class=\"col-sm-12\"> &nbsp; &nbsp; ' .$proyecto->de .'</div></div>';\n \n $sql1 = \"select schema_name from information_schema.schemata where schema_name = '\" .$proyecto->codigo .\"';\";\n $obj = Aux::findBySql($sql1)->one();\n if( isset($obj->schema_name) && $obj->schema_name != '' ){\n $sql2 = \"select id, de, barrida, codigo, st from \" .$obj->schema_name .\".instrumento where st != '0' order by id DESC;\";\n \n $vctInstrumento = Aux::findBySql($sql2)->all();\n \n foreach( $vctInstrumento as $instrumento ){\n if( $c == $c1 ) $c = $c2;\n else if( $c == $c2 ) $c = $c3;\n else $c = $c1;\n \n if( true ){\n \n if( file_exists(Yii::$app->params['baseUrl'] .'controller/proyecto/' .ucFirst($instrumento->codigo) .'Controller') )\n $pathController = Yii::$app->params['baseUrl'] .'index.php?r=proyecto/' .$instrumento->codigo;\n else if( file_exists(Yii::$app->params['baseUrl'] .'controller/proyecto/' .ucFirst($obj->schema_name) .'Controller') )\n $pathController = Yii::$app->params['baseUrl'] .'index.php?r=proyecto/' .$obj->schema_name;\n else\n $pathController = Yii::$app->params['baseUrl'] .'index.php?r=crm/operacion/encuesta';\n \n $estilo = ' style=\"float:left; padding: 0.5em; padding-left: 1.5em; text-align:center;\" ';\n \n $cad .= '<div class=\"row\" style=\"background-color:' .$c .';\"><div class=\"col-sm-9\" style=\"line-height:' .$height2 .';\"> '.$instrumento->de .'</div>';\n $cad .= '<div class=\"col-sm-3\" style=\"\">';\n\n\n $cad .= '<div ' .$estilo .' ><a href=\"'.Yii::$app->params['baseUrl'] .'index.php?r=crm/operacion/encuesta/ver&x3proy=' .$obj->schema_name .'&x3inst=' .$instrumento->id .'\" style=\"color: #0000aa;\" title=\"Ver Instrumento\"> \n<img src=\"'.Yii::$app->params['baseUrl'] .'img/icons/ver.png\" style=\"height:' .$height .';\"/>\n</a></div>';\n \n if( false ) \n $cad .= '<div ' .$estilo .' ><a href=\"'.Yii::$app->params['baseUrl'] .'index.php?r=soporte/carga/xlsup&x3proy=' .$obj->schema_name .'&x3inst=' .$instrumento->id .'\" style=\"color: #0000aa;\" title=\"Cargar data\"> \n<img src=\"'.Yii::$app->params['baseUrl'] .'img/icons/data.png\" style=\"height:' .$height .';\"/>\n</a></div>';\n if( false )\n $cad .= '<div ' .$estilo .'> <a href=\"'.Yii::$app->params['baseUrl'] .'index.php?r=soporte/carga/cuotaform&x3proy=' .$obj->schema_name .'&x3inst=' .$instrumento->id .'\" style=\"color: #0000aa;\" title=\"Cargar cuota\">\n<img src=\"'.Yii::$app->params['baseUrl'] .'img/icons/cuota.png\" style=\"height:' .$height .';\"/>\n</a></div>';\n \n $cad .= '<div ' .$estilo .'><a href=\"'.Yii::$app->params['baseUrl'] .'index.php?r=soporte/carga/viz&x3proy=' .$obj->schema_name .'&x3inst=' .$instrumento->id .'\" style=\"color: #0000aa;\" title=\"Ruta de las preguntas\">\n<img src=\"'.Yii::$app->params['baseUrl'] .'img/icons/ruta.png\" style=\"height:' .$height .';\"/>\n</a></div>';\n \n $cad .= '<div ' .$estilo .'><a href=\"' .$pathController .'/reportes&x3proy=' .$obj->schema_name .'&x3inst=' .$instrumento->id .'\" style=\"color: #0000aa;\" title=\"Acceder al Listado de Reportes\">\n<img src=\"'.Yii::$app->params['baseUrl'] .'img/icons/reportes.png\" style=\"height:' .$height .';\"/>\n</a></div>';\n \n\n \n $cad .= '</div></div>';\n \n }\n \n }\n \n $cad .= '<div class=\"row\"><div class=\"col-sm-12\">&nbsp;</div></div>';\n \n }\n } \n return $this->render('@views/soporte/index',array(\n 'menu' => '',\n 'titulo' => ' Panel de Instrumentos',\n 'txt' => '<div style=\"font-size: 1.2em;\">' .Mensaje::mostrar() .$cadB .'<br/>' .$cad .'</div>',\n 'ayuda' => '',\n )); \n }", "title": "" }, { "docid": "6fc4dbc4396af52f9db8c182a1fd39ee", "score": "0.5053941", "text": "public function getAccesos()\n {\n return $this->accesos;\n }", "title": "" }, { "docid": "0c75ada528216a94c2147d7b78287de1", "score": "0.5052657", "text": "public function getId() {\n return $this->contratoimpuesto->getId_improp();\n }", "title": "" }, { "docid": "c160fc53960e7f96f407f7033f5cf4d4", "score": "0.5049455", "text": "public static function notifyDemandeAvis(){\n return ['title'=>'Notez votre expérience DeliverBag !',\n 'body'=>'Améliorez nos services en notant votre chauffeur.',\n 'datas'=>['url'=>'courses']];\n }", "title": "" }, { "docid": "a05c75a864f64862f5d0af19905eba83", "score": "0.5047926", "text": "function InsereNotificacaoManual(){\n\t$conteudo = file_get_contents(\"php://input\");\n\t$resposta = array();\n\n\t//Verifica se o conteudo foi recebido\n\tif(empty($conteudo)){\n\t\t$resposta = mensagens(2);\n\t}\n\telse{\n\t\t//Converte o json recebido pra array\n\t\t$dados = json_decode($conteudo,true);\n\t\t\n\t\t//Verifica se as infromações esperadas foram recebidas\n\t\tif(!isset($dados[\"Mensagem\"]) || !isset($dados[\"idAnimal\"]) || !isset($dados[\"Email\"]))\n\t\t{\n\t\t\t$resposta = mensagens(3);\n\t\t}\n\t\telse{\n\t\t\tinclude(\"conectar.php\");\n\t\t\t\n\t\t\t$idAnimal = mysqli_real_escape_string($conexao,$dados[\"idAnimal\"]); \n\t\t\t$Mensagem = mysqli_real_escape_string($conexao,$dados[\"Mensagem\"]);\n\t\t\t$Email = mysqli_real_escape_string($conexao,$dados[\"Email\"]); \n\t\t\t\n\t\t\t//Recupera idUsuario e nome do animal\n\t\t\t$idUsuario = 0;\n\t\t\t$NomeAnimal = \"\";\n\t\t\t$query = mysqli_query($conexao, \"SELECT idUsuario, Nome FROM Animal WHERE idAnimal = \" .$idAnimal) or die(mysqli_error($conexao));\n\t\t\twhile($dados = mysqli_fetch_array($query)){\n\t\t\t\t$idUsuario = $dados[\"idUsuario\"];\n\t\t\t\t$NomeAnimal = $dados[\"Nome\"];\n\t\t\t}\n\t\t\t\n\t\t\t$NomeUsuario = \"\";\n\t\t\t$TelefoneUsuario = \"\";\n\t\t\t$query = mysqli_query($conexao, \"SELECT Nome, Telefone FROM Usuario WHERE Email = '\" .$Email .\"'\") or die(mysqli_error($conexao));\n\t\t\twhile($dados = mysqli_fetch_array($query)){\n\t\t\t\t$NomeUsuario = $dados[\"Nome\"];\n\t\t\t\t$TelefoneUsuario = $dados[\"Telefone\"];\n\t\t\t}\n\t\t\t\n\t\t\t//Carrega data/hora atual\n\t\t\tdate_default_timezone_set('America/Brasilia');\n\t\t\t$startDate = time();\n\t\t\t$DataNotificacao = date('Y/m/d H:i:s', strtotime('-2 hour', $startDate));\n\t\t\t$DataNotificacaoTexto = date('d/m/Y H:i:s', strtotime('-2 hour', $startDate));\t\n\t\t\t\n\t\t\t$MensagemFinal = \"Seu pet \" .$NomeAnimal . \" foi localizado pelo usuário \" .$NomeUsuario . \" na data \" .$DataNotificacaoTexto . \".\\nMensagem: \" .$Mensagem . \"\\nContato: \" .$TelefoneUsuario;\n\t\t\t\n\t\t\t//Recupera o próximo ID de Notificacao\n\t\t\t$idNotificacao = 1;\n\t\t\t$query = mysqli_query($conexao, \"SELECT idNotificacao FROM Notificacao ORDER BY idNotificacao DESC LIMIT 1\") or die(mysqli_error($conexao));\n\t\t\twhile($dados = mysqli_fetch_array($query)){\n\t\t\t\t$idNotificacao = $dados[\"idNotificacao\"];\n\t\t\t}\n\t\t\t$idNotificacao++;\n\t\t\t\n\t\t\t//Insere notificação\n\t\t\t$query = mysqli_query($conexao,\"INSERT INTO Notificacao VALUES(\" .$idNotificacao .\",'\" .$MensagemFinal .\"','\" .$DataNotificacao .\"',\" .$idUsuario .\",0,0)\") or die(mysqli_error($conexao));\n\t\t\t\n\t\t\t$resposta = mensagens(18);\n\n\t\t}\n\t}\n\n\treturn $resposta;\n}", "title": "" }, { "docid": "9f7c1014bb4e366547e747758aea8796", "score": "0.5045575", "text": "public function imprimirHorario()\n {\n //Deberemos llamar a los otros modelos para que nos cargue los dias y actividadees por nombre en vez de por id.\n $diasModel= new DiasModel();\n $dias=$diasModel->listDias();\n\n $actividadesModel= new ActivitiesModel();\n $actividades=$actividadesModel->getAllActivities();\n\n $tramos=$this->modelo->listHorario(); \n $totalRegistros=$this->modelo->countTotalTable();\n\n if($tramos[\"correct\"] && $dias[\"correct\"] && $actividades[\"correct\"]){\n //Si todo es correcto, imprimimos.\n\n require 'vendor/autoload.php';\n \n $parametros = [\n \"horario\" => $tramos\n ];\n \n $params=[\n \"data\"=>$tramos,\n \"days\"=>$dias[\"data\"],\n \"activities\"=>$actividades[\"data\"]\n ];\n ob_start();\n $this->view->showBody(\"impriHorario\", $params);\n $html = ob_get_clean();\n $html2pdf = new Html2Pdf('P', 'A4', 'es', 'true', 'UTF-8');\n $html2pdf->writeHTML($html);\n $html2pdf->output(\"horario_gimnasio_lavanda.pdf\"); // Como parámetro opcional nombre de fichero a descargar\n ob_end_clean();\n }else{\n //Sino, manda a un lugar de error\n $params=[\n \"type\"=>\"unexpected\"\n ];\n $this->redirect(\"error\",\"index\",$params);\n }\n \n\n\n }", "title": "" }, { "docid": "8e583339c6669021246d14a9cfa43d2e", "score": "0.504413", "text": "function _getDatosGuardados(){\n\t\tif(($this->_getCodigoEscuela() == '')){\n\t\t\treturn 'Codigo de escuela vacia, introduzca una escuela';\n\t\t}else{\n\t\t\t$sql = $this->mysqli->prepare(\"SELECT * FROM escuela WHERE codigoEscuela = ?\");\n\t\t\t$sql->bind_param(\"i\", $this->codigoEscuela);\n\t\t\t$sql->execute();\n\n\t\t\t$resultado = $sql->get_result();\n\t\t\t \n\t\t\tif(!$resultado){\n\t\t\t\treturn 'No se ha podido conectar con la BD';\n\t\t\t}else if($resultado->num_rows == 0){\n\t\t\t\treturn 'No existe la escuela';\n\t\t\t}else{\n\t\t\t\t$fila = $resultado->fetch_row();\n\t\t\t\n\t\t\t\t$this->_setNombreEscuela($fila[1]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "38984c25aaad458ba6112d5888647e3f", "score": "0.50427777", "text": "public function ImprimirAlistamientoOrdenMagistralAction() \n {\n $peticion = $this->getRequest();\n $id = $peticion->query->get('id', 0);\n\n $now = new \\DateTime(\"now\");\n $usuario = $this->get('security.context')->getToken()->getUser();\n $em = $this->getDoctrine()->getManager();\n \n $OrdenProduccion= $em->getRepository('ProgBundle:TtOrdenProduccion')->findOrdenesProduccionId($id);\n $detalle= $em->getRepository('ProgBundle:TtDetalleOrdenproduccion')->findDetallesOrdenPorIdEncabezado($id);\n \n $empresa[\"empnombre\"] = \"SANTA SOFIA\";\n $empresa[\"empnit\"] = \"Hospital Departamental Universitario de Caldas\";\n\n return $this->render('ProgBundle:Operacionales:OrdenProduccion/ImpresionOrdenProduccion.html.twig', array(\n 'empresa' => $empresa,\n 'OrdenProduccion' => $OrdenProduccion,\n 'detalle' => $detalle\n ));\n\n }", "title": "" }, { "docid": "b262d2db69b5cc6ebcaede2acf72cf5c", "score": "0.5041156", "text": "public static function getInfo() {\n\t\treturn array(\n\t\t\t'name' => 'Administration Interface',\n\t\t\t'description' => 'Default Administrative interface for Cumula',\n\t\t\t'version' => '0.1.0',\n\t\t\t'dependencies' => array('UserManager', 'MenuManager', 'FormHelper'),\n\t\t);\n\t}", "title": "" }, { "docid": "ab4f765ac48103e2a23ce1457d6b3b38", "score": "0.50396776", "text": "function misProductos()\r\n\t{\r\n\t\t$user\t\t\t\t= $this->session->userdata('user');\r\n\t\t$op['info']\t\t\t= array();\r\n\t\t\r\n if ($user['uid'] != '') {\r\n\t\t\t$tipo = 'info_'.$user['tipoUsuario'];\r\n\t\t\t$op['info']\t= $this->data_model->$tipo($user['uid']);\r\n\t\t}\r\n \r\n //Optimizacion y conexion de tags para SEO//\r\n\t\t$opt = $this->uri->segment(1);\r\n\t\t$op['opt'] \t\t\t= $this->data_model->cargarOptimizacion($opt);\r\n\t\t//Carga menu locales//\r\n\t\t$op['menuLocal'] \t= $this->milocal_model->cargarMenuLocal();\r\n\t\t$op['noConf'] \t\t= $this->milocal_model->porConf($user['uid']);\r\n\t\t//Carga los productos que tiene un local y los agrupa por rama para sacar las ramas que tiene disponibles\r\n\t\t$op['localRama'] \t= $this->milocal_model->productoLocalRama($user['uid']);\r\n\t\t$op['pendientes'] \t= $this->ofertas_model->cargarPendientes($user['uid']);\r\n\t\t//Carga inbox locales//\r\n\t\t$op['inbox'] = $this->milocal_model->cargarInbox($user['uid']);\r\n\t\t//Carga menu de no publicados//\r\n\t\t$op['nopublicados'] = $this->ofertas_model->cargarPendientesLocal($user['uid']);\r\n\t\t\r\n\t\t$url = $this->uri->uri_string(); // Genera Variable del Url\r\n\t\t$op['bannerSky'] = $this->data_model->cargarSkyHome($url);\r\n\t\t\r\n\t\t$this->layouts->add_include('assets/js/jquery-ui.js')\r\n\t\t\t\t\t ->add_include('assets/js/jquery.dataTables.min.js');\r\n\t\t\r\n\t\t//Vista//\r\n\t\t$this->layouts->milocal('misProductos-view' ,$op);\r\n\t}", "title": "" }, { "docid": "0baf2ff2c87d3543afde57bee7625197", "score": "0.503911", "text": "public function escreverComentario()\n {\n }", "title": "" }, { "docid": "e53be7e8cc1ccc225cf2de3a56c20cfa", "score": "0.50388944", "text": "public function listeIndispoAction(){\n $parametres=array();\n $parametres['parametresJson']=array(\"id\",\"dateDebut\",\"dateFin\",\"chambre\");\n $parametres['parametresTab']=array(\"n°\",\"Date de début\",\"Date de Fin\",\"Chambre\");\n $parametres['titre']='Liste des indispos';\n $parametres['nom']='Indispo';\n return $this->render('ResanetMainBundle:Admin:affichageListe.html.twig',$parametres);\n }", "title": "" }, { "docid": "e136bbf2f1346b1efbf8d76ec3b4b49c", "score": "0.50370073", "text": "public function getInfoEquipo(){\n\t\t\t\n\t\t$res = $this->Backlogs->getInfoEquipos($this->input->post());\n\t\t echo json_encode($res);\n\t}", "title": "" }, { "docid": "b187d619bdfa8bf021af2467cb6f5dec", "score": "0.50348884", "text": "static public function ctrMpOsPendiente(){\n\n\n\t\t$respuesta = ModeloOrdenServicio::mdlMpOsPendiente();\n\n\t\treturn $respuesta;\n\t\t\n\t}", "title": "" }, { "docid": "3b1b58fc07bbb8f27cbaf3794bb977a1", "score": "0.503459", "text": "public function DA_ConsultarNotasCredito();", "title": "" }, { "docid": "3b464200d9a5d8a48bc0aa3f11d3e27c", "score": "0.5029175", "text": "public function palcospreimpresos_all()\n {\n \n $palcospre = PalcoPreimpreso::with('palco_evento', 'puntoventa_evento', 'preventa_palco')->get();\n return $this->sendResponse($palcospre->toArray(), 'Palcos preimpresos devueltos con éxito');\n }", "title": "" }, { "docid": "a89f01a2696ca913ab2e15251a8f563a", "score": "0.50285196", "text": "public function infoCreditoGastado(Request $request){\n\n if($request->isMethod('post')){\n\n // validaciones para los datos\n $reglaDatos = array(\n 'id' => 'required'\n );\n\n $mensajeDatos = array(\n 'id.required' => 'Device id es requerido.'\n );\n\n $validarDatos = Validator::make($request->all(), $reglaDatos, $mensajeDatos );\n\n if($validarDatos->fails())\n {\n return [\n 'success' => 0,\n 'message' => $validarDatos->errors()->all()\n ];\n }\n\n // verificar si utilizo cupon\n\n if($datos = Ordenes::where('id', $request->id)->first()){\n\n $final = $datos->precio_total + $datos->precio_envio;\n\n // buscar si aplico cupon\n if($oc = OrdenesCupones::where('ordenes_id', $request->id)->first()){\n\n // buscar tipo de cupon\n $tipo = Cupones::where('id', $oc->cupones_id)->first();\n\n // ver que tipo se aplico\n // el precio envio ya esta modificado\n if($tipo->tipo_cupon_id == 1){\n\n // NO HACER NADA\n\n }else if($tipo->tipo_cupon_id == 2){\n\n // modificar precio\n $data = AplicaCuponDos::where('ordenes_id', $request->id)->first();\n\n $total = $datos->precio_total - $data->dinero;\n if($total <= 0){\n $total = 0;\n }\n\n $final = $total + $datos->precio_envio; // si aplico envio gratis, este sera $0.00\n\n }else if($tipo->tipo_cupon_id == 3){\n\n $porcentaje = AplicaCuponTres::where('ordenes_id', $request->id)->pluck('porcentaje')->first();\n $resta = $datos->precio_total * ($porcentaje / 100);\n $total = $datos->precio_total - $resta;\n\n if($total <= 0){\n $total = 0;\n }\n\n $final = $total + $datos->precio_envio;\n\n }else if($tipo->tipo_cupon_id == 4){\n\n // NO HACER NADA\n\n }\n else if($tipo->tipo_cupon_id == 5){\n\n // sumar sub total + envio + donacion\n $data = AplicaCuponCinco::where('ordenes_id', $request->id)->first();\n $ins = Instituciones::where('id', $data->instituciones_id)->pluck('nombre')->first();\n\n\n $total = $datos->precio_total + $datos->precio_envio;\n $final = $total + $data->dinero;\n\n }\n\n }\n\n $final = number_format((float)$final, 2, '.', '');\n return ['success' => 1, 'credito' => $final];\n\n }else{\n return ['success' => 2];\n }\n\n }\n }", "title": "" }, { "docid": "ad0d1c0fee267179b8d26cc56c529cc0", "score": "0.50253826", "text": "public function getinfoAction(){\n $cu=$this->aaac->getCurrentUser();\n if($cu->ID_role==Constants::DEVELOPER){\n $rag_soc=Constants::GRUPPO_DEVELOPER;\n }else {\n $organization=Doctrine_Query::create()\n \t->from('Organizations')\n \t->where('orgid=?',A::orgid())\n \t->fetchOne();\n $rag_soc=$organization->rag_soc;\n }\n if($cu){\n $res=array(\n \"ID\"=>$cu->ID,\n \"nome\"=>$cu->nome,\n \"cognome\"=>$cu->cognome,\n \"role\"=>$cu->Role->role,\n \"superuser\"=>$cu->Role->superuser,\n \"developer\"=>$cu->Role->developer,\n \"internal_resource\"=>$cu->Role->internal_resource,\n \"organization\"=>$rag_soc\n );\n $this->emitLoadData($res);\n }\n }", "title": "" }, { "docid": "a1363ec043f1b69c4509871eb5887a8a", "score": "0.5021333", "text": "public function listar_infoingresorechazo_controlador(/*$privilegio,$codigo*/){\n\n\n\t\t\t//$privilegio=mainModel::limpiar_cadena($privilegio);\n\t\t\t//$codigo=mainModel::limpiar_cadena($codigo);\n\n\n\t\t\t\t\t$tabla=\"\";\n\n\n\n\t\t//Consulta para la búsqueda del informe rechazado de ingreso de hardware requerido\n\t\t//Para la búsqueda se utilizo una tabla dinamica de la plantilla F¿Gentellas Master\n\t\t$consulta=\"SELECT *,T1.icodigo FROM informe_ingreso_hardware as T1, hardware_ingreso as T3, tipo_hardware as T5, marca_hardware as T6, modelo_hardware as T7, color_hardware as T8, estado_info_hardware as T9 WHERE T3.icodigo=T1.icodigo AND T3.tipohardwarecodigo=T5.tipohardwarecodigo AND T3.marcahardwarecodigo=T6.marcahardwarecodigo AND T3.modelohardwarecodigo=T7.modelohardwarecodigo AND T3.colorhardwarecodigo=T8.colorhardwarecodigo AND T3.estadoinfoharcodigo=T9.estadoinfoharcodigo AND T9.estadoinfoharnombre='RECHAZADO'\";\n\n\n\t\t\t\t\t$conexion = mainModel::conectar();\n\n\t\t\t\t\t$datos = $conexion->query($consulta);\n\t\t\t\t\t$datos= $datos->fetchAll();\n\n\n\n\n\t\t\t//InicioTabla_______________________________________________________________\n\t$tabla.='\n\n\t<thead>\n\t<tr>\n\t<th>#</th>\n\t<th>TITULO DEL INFORME</th>\n\t<th>COD INVENTARIO</th>\n\t<th>SERIE DEL HARDWARE</th>\n\t'./*<th>HARDWARE DE INGRESO</th>*/'\n\t<th>TIPO DE HARDWARE</th>\n\t<th>MARCA DE HARDWARE</th>\n\t<th>MODELO DE HARDWARE</th>\n\t<th>COLOR DE HARDWARE</th>\n\t<th>ESTADO DE VERIFICACIÓN</th>\n\t<th>FECHA DE VERIFICACIÓN</th>\n\n\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t$tabla.='\n\t<th>ACCIONES</th>\n\n\t';\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\n\t\t\t\t\t\t//}\n\t$tabla.='</tr>\n\t</thead>\n\t<tbody>';\n\n\n\t$contador=0;\n\tforeach ($datos as $rows) {\n\t\t$contador=$contador+1;\n\t\t$tabla.='\n\t\t<tr>\n\t\t<td>'.$contador.'</td>\n\t\t<td>'.$rows['itema'].'</td>\n\t\t<td>'.$rows['hiserie'].'</td>\n\t\t<td>'.$rows['serireexterno'].'</td>\n\t\t'./*<td>'.$rows['hititulo'].'</td>*/'\n\t\t<td>'.$rows['tipohardwarenombre'].'</td>\n\t\t<td>'.$rows['marcahardwarenombre'].'</td>\n\t\t<td>'.$rows['modelohardwarenombre'].'</td>\n\t\t<td>'.$rows['colorhardwarenombre'].'</td>\n\t\t<td>'.$rows['estadoinfoharnombre'].'</td>\n\t\t<td>'.$rows['hifecha'].'</td>\n\t\t';\n\t\t\t\t\t\t//if ($privilegio<=2) {\n\t\t$tabla.='\n\t\t<td>\n\t\t<form method=\"POST\" action=\"'.SERVERURL.'inforingresohardinfo/\">\n\t\t<input type=\"hidden\" value=\"'.$rows['hiserie'].'\" name=\"codigo\">\n\t\t<button style=\"font-size:15px; borderbox:0px; width:100px;\" type=\"submit\" class=\"btn btn-primary\"> Informe</button>\n\t\t</form>\n\t\t<form method=\"POST\" action=\"'.SERVERURL.'informacionharingreso/\">\n\t\t<input type=\"hidden\" value=\"'.$rows['hiserie'].'\" name=\"codigo\">\n\t\t<button style=\"font-size:15px; borderbox:0px; width:100px;\" type=\"submit\" class=\"btn btn-primary\"> Hardware</button>\n\t\t</form>\n\n\n\n\n\t\t<a style=\"font-size:15px; borderbox:0px; width:100px;\" method=\"post\" height:36px;\" href=\"'.SERVERURL.'Reportes/Informe.php?Cod='.$rows['hiserie'].'/\" title=\"Visualizar Informe\" target=\"_blank\" class=\"btn btn-secondary\">\n\t\t<i class=\"fa fa-print\"></i>\n\t\t</a>\n\n\n\n\t\t</td>\n\n\n\t\t';\n\n\t\t\t\t\t\t//}\n\t\t\t\t\t\t//if ($privilegio==1) {\n\t\t\t\t\t\t\t/*$tabla.='\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t<form action=\"'.SERVERURL.'ajax/administradorAjax.php\" method=\"POST\" class=\"FormularioAjax\" data-form=\"delete\" entype=\"multipart/form-data\" autocomplete=\"off\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"codigo-del\" value=\"'.mainModel::encryption($rows['CuentaCodigo']).'\"></input>\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"privilegio-admin\" value=\"'.mainModel::encryption($privilegio).'\"></input>\n\t\t\t\t\t\t\t\t\t<button type=\"submit\" class=\"btn btn-danger btn-raised btn-xs\">\n\t\t\t\t\t\t\t\t\t\t<i class=\"zmdi zmdi-delete\"></i>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t\t<div class=\"RespuestaAjax\"></div>\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t';*/\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$contador++;\n\t\t\t\t//}\n\n\n\t\t\t\t\t\t$tabla.='\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t';\n\t\t\t//Fin Tabla__________________________________________________________________\n\n\n\n\t\t\t\t\t\treturn $tabla;\n\t\t\t\t\t}", "title": "" } ]
58d7adbfd6fa6a1199f0fec0f588ffa6
Use any HTML inside icons (e.g. Font Awesome)
[ { "docid": "3edcd9185dbe4ea7a3f157c7c1bd013f", "score": "0.0", "text": "public function iconHtml($iconHtml)\n {\n $this->config['iconHtml'] = $iconHtml;\n\n $this->flash();\n return $this;\n }", "title": "" } ]
[ { "docid": "eb28181d51519d4411862ad51dabb28b", "score": "0.72799915", "text": "public function htmlIcon(){\n return '<i class=\"'.$this->icon.'\" aria-hidden=\"true\"></i>';\n }", "title": "" }, { "docid": "354957f77a8e5e4875fef6841cc2ce24", "score": "0.71630687", "text": "private function icon($icon, $font_awesome = true) {\n\n $html = \"<i class=\\\"\";\n\n if ($font_awesome == true) {\n $html .= \"fa fa-{$icon}\\\">\";\n }\n else {\n $html .= \"glyphicon glyphicon-{$icon}\\\">\";\n }\n\n $html .= \"</i> \";\n\n return $html;\n }", "title": "" }, { "docid": "0cd34811687614817e8a1b9b417db001", "score": "0.7090342", "text": "public function icon($icon,$text){\n\t\treturn $this->iconHtml($icon,h($text));\n\t}", "title": "" }, { "docid": "9ef1bf1e21fa4f5cb5c0ebe9ed029725", "score": "0.70005405", "text": "function icon(string $iconType, string $iconName)\n{\n $iconHtml = <<<HTML\n <i class=\"icon fa$iconType fa-$iconName fa-fw\"></i>\nHTML;\n\n return new HtmlString($iconHtml);\n}", "title": "" }, { "docid": "7ec02db6a960ebd1b15fe18dba8cac5b", "score": "0.6993704", "text": "function icon($icon = null, $opt = null)\n{\n\n if ($icon == null) {\n return '';\n }\n\n// Reset variables\n\n $out = '';\n\n // Get options\n $txt = isset($opt['txt']) ? $opt['txt'] : '';\n $url = isset($opt['url']) ? $opt['url'] : '#';\n $t_blank = isset($opt['t_blank']) && $opt['t_blank'] == true ? \"target='_blank'\" : '';\n $width = isset($opt['width']) ? $opt['width'] : 25;\n $height = isset($opt['height']) ? $opt['height'] : 25;\n $color = isset($opt['color']) ? $opt['color'] : '#303438';\n $stroke = isset($opt['stroke']) ? $opt['stroke'] : 1;\n $class = isset($opt['class']) ? $opt['class'] : 'font-class';\n $a_class = isset($opt['a_class']) ? $opt['a_class'] : 'a-class';\n\n // custom Url\n if (isset($opt['url'])) {\n $out .= \"<a class='$a_class' href='$url' $t_blank>\";\n }\n\n // html elements like h1 h2 h3 h4 h5 span p ...\n $out .= isset($opt['html_el']) ? \"<{$opt['html_el']} class='$class'>\" : '';\n\n // Show Custom Text Before\n if (isset($opt['before']) && $opt['before'] == true) {\n $out .= $txt;\n }\n\n $out .= \"<i data-feather='$icon'\n width=$width\n height=$height\n stroke-width=$stroke\n color=$color>\n </i>\";\n\n // Show Custom Text\n if (!isset($opt['before'])) {\n $out .= $txt;\n }\n\n // End custom html elements\n $out .= isset($opt['html_el']) ? \"</{$opt['html_el']}>\" : '';\n\n // /End custom url\n if (isset($opt['url'])) {\n $out .= \"</a>\";\n }\n\n return $out;\n}", "title": "" }, { "docid": "3577fddffe7ba26868f2c26a144e568c", "score": "0.69281065", "text": "function fett_icon_link($text, $path, array $options = array()){\n if(function_exists('fawesome_text') && $icon = fawesome_match($text)){\n $options['html'] = TRUE;\n if($visibility = fett_get_setting('icon_hide_labels')){\n $cache = &drupal_static(__FUNCTION__, 0);\n $options['attributes']['class'][] = 'tip-' . $cache;\n fett_tooltip_add('.' . 'tip-' . $cache, $text, array('maxWidth' => 400, 'touchDevices' => FALSE, 'delay' => 100));\n $text = '<i class=\"fa fa-' . $icon['icon'] . '\"></i> <span class=\"hide-' . $visibility . '\"> ' . $text . '</span>';\n $cache++;\n }\n else{\n $text = '<i class=\"fa fa-' . $icon['icon'] . '\"></i> ' . $text;\n }\n }\n return l($text, $path, $options);\n}", "title": "" }, { "docid": "930ed310bd72af078229994e7b181830", "score": "0.69190514", "text": "public static function hIcon($icon,$htmlOptions=array()){\n $htmlOptions['class']='glyphicon glyphicon-'.$icon.(isset($htmlOptions['class'])?' '.$htmlOptions['class']:'');\n return CHtml::tag('span',$htmlOptions,'',true);\n }", "title": "" }, { "docid": "a14ebf52895457b5b572a62ed6c23f1c", "score": "0.6739131", "text": "function FontAwesome_icons() {\n echo '<link href=\"//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css\" rel=\"stylesheet\">\n <style type=\"text/css\">\n #adminmenu #menu-posts-custom-post-type .wp-menu-image:before {\n content: \"\\f135\";\n font-family: \"FontAwesome\" !important;\n font-size: 18px !important;\n }\n </style>\n ';\n}", "title": "" }, { "docid": "0c63b60f949cb46615e94522a53467dd", "score": "0.6652456", "text": "public function iconHtml($icon,$html){\n\t\t/*#if DEV */ if(!empty($this->content)) throw new Exception('$this->content is not empty'); /*#/if*/\n\t\t$this->content='<span class=\"icon '.h($icon).'\"></span>'.$html;\n\t\t$this->contentEscape=false;\n\t\t/*#if DEV */ if(isset($this->attributes['class'])) throw new Exception('specify your attr \"class\" after calling icon() or iconHtml()'); /*#/if*/\n\t\t$this->setClass('aicon');\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "08d785172c6a6fd769a99bb17afff04f", "score": "0.6610802", "text": "public static function icon( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t'name' => 'fa-asterisk',\r\n\t\t\t'size' => 'inherit',\r\n\t\t\t'spin' => 'false',\r\n\t\t\t'color' => 'inherit',\r\n\t\t\t'rotate' => '',\r\n\t\t\t'class' => '',\r\n\t\t\t'align' => ''\r\n\t\t), $atts ) );\r\n\r\n\t\t$styles = array( );\r\n\t\tif ( $color != 'inherit' ) $styles[] = 'color: ' . $color;\r\n\t\tif ( $size != 'inherit' ) $styles[] = 'font-size: ' . $size . 'px';\r\n\r\n\t\treturn '<i class=\"fa ' . esc_attr( $name ) . ( $spin != 'false' ? ' fa-spin' : '' ) . ( ! empty( $align ) ? ' pull-' . esc_attr( $align ) : '' ) . ( ! empty( $rotate ) ? ' fa-' . esc_attr( $rotate ) : '' ) . ( ! empty( $class ) ? ' ' . esc_attr( $class ) : '' ) . '\"' . ( count( $styles ) > 0 ? 'style=\"' . esc_attr( implode( '; ', $styles ) ) . '\"' : '' ) . '></i>' . ( ! empty( $content ) ? ' ' . do_shortcode( $content ) : '' );\r\n\t}", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.6602408", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.6602408", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "c1ca3b904138bbe1cbb59e1161e60064", "score": "0.65984964", "text": "function oicon($icon) {\n\treturn '<i class=\"fa fa-'.$icon.' fa-fw optionsicon\"></i>';\n}", "title": "" }, { "docid": "d6fc8e333280de09ae9876bbf6d150a9", "score": "0.6560567", "text": "function hestia_display_fa_icon( $value ) {\n\t\thestia_load_fa();\n\t\tif ( strpos( $value, 'fa-' ) !== 0 ) {\n\t\t\treturn $value;\n\t\t}\n\t\treturn 'fa ' . $value;\n\t}", "title": "" }, { "docid": "4a76667a218384d281807bda205c0323", "score": "0.655455", "text": "public function testIcon(): void {\n\t\t$result = $this->helper->icon('foo-bar');\n\t\t$this->assertTextContains('fa fa-foo-bar', $result);\n\t}", "title": "" }, { "docid": "c742f38f7fe74e47df06a5eae08af08c", "score": "0.6527037", "text": "public function getIcon()\n {\n if (!isset($this->data['icon']) || empty($this->data['icon'])) {\n return '<img src=\"/app/images/logo.svg\" />';\n }\n\n $name = $this->getName();\n $icon = htmlspecialchars($this->data['icon']);\n\n if (strpos($icon, 'fa-') === false) {\n $path = '/modules/'.$name.'/'.$icon;\n $html = '<img src=\"'.$path.'\" />';\n } else {\n $html = '<span class=\"'.$icon.'\"></span>';\n }\n\n return $html;\n }", "title": "" }, { "docid": "91b21b114ed5c0f4f440433b47663f78", "score": "0.6516172", "text": "public function renderIcon()\n\t{\n\t\tif (empty($this->icon))\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\treturn '<i class=\"fa fa-' . $this->icon . '\"></i>';\n\t}", "title": "" }, { "docid": "daeedd8108722ecdb694624c3487e4fd", "score": "0.650422", "text": "function erika_icon_format($icon){\n if(substr($icon, 0, 3) == 'pe-'){\n $out = $icon;\n } else {\n $out = 'fa fa-'.$icon;\n }\n return $out;\n}", "title": "" }, { "docid": "822a06a327f8c036a5369032b8cb9cca", "score": "0.64945287", "text": "public function shortcode_icon() {\r\n\t\t\treturn '<span class=\"icon_54047278-twitter\"></span>';\r\n\t\t}", "title": "" }, { "docid": "d18928069e8c10d30c3f621f32e7084f", "score": "0.6476327", "text": "function glyphicon($iconName){\n\treturn \"<span class=\\\"glyphicon glyphicon-$iconName\\\"></span>\";\n}", "title": "" }, { "docid": "165e26afa9949a8ea127ab97820b7bc4", "score": "0.63546306", "text": "public static function icon($icon='',$extraClass=null){\n return self::hIcon($icon.($extraClass?' '.$extraClass:''));\n }", "title": "" }, { "docid": "93bac51eb0e08128f92f3e9614136de9", "score": "0.6310027", "text": "public function fa($icon) {\n return $this->prepend($this->icon($icon));\n }", "title": "" }, { "docid": "0fffc51eea2604f41c527635df58bfe4", "score": "0.63023883", "text": "public function getAuthenticationTypeIconHTML()\n {\n return '<i class=\"fa fa-user\"></i>';\n }", "title": "" }, { "docid": "89c520e8c350467f89180edbe9aa645d", "score": "0.62745714", "text": "public function testIcon(): void {\n\t\t$result = $this->helper->icon('foo-bar', ['iconNamespace' => 'bi']);\n\t\t$this->assertTextContains('bi bi-foo-bar', $result);\n\t}", "title": "" }, { "docid": "e4cec2462e27d36419d7908fb955e4e9", "score": "0.62608844", "text": "function icon($name) {\n return '<img src=\"/img/icons/'. $name .'.png\" />';\n}", "title": "" }, { "docid": "adc8d659a7e6e4051f9617f44e86844c", "score": "0.62607294", "text": "function get_unliked_icon() {\n\t/* If already using Font Awesome with your theme, replace svg with: <i class=\"fa fa-heart-o\"></i> */\n\t$icon = '<span class=\"sl-icon\"><small>like</small> <i class=\"fa fa-heart-o\" aria-hidden=\"true\"></i></span>';\n\treturn $icon;\n}", "title": "" }, { "docid": "cf577ced3287f6fc5b347975f58f5546", "score": "0.62575334", "text": "public static function icon()\n {\n return '<i class=\"far fa-id-card sidebar-icon\"></i>';\n }", "title": "" }, { "docid": "c39cd001ef9d36b5297a9b0c4d39185e", "score": "0.6249783", "text": "function get_comment_unliked_icon() {\n\t/* If already using Font Awesome with your theme, replace svg with: <i class=\"fa fa-heart-o\"></i> */\n\t$icon = '<span class=\"sl-icon\"><i class=\"fa fa-thumbs-up text-silver\" aria-hidden=\"true\"></i></span>';\n\treturn $icon;\n}", "title": "" }, { "docid": "bdd9397d25721bb2cc0f7483b86523f0", "score": "0.6237741", "text": "function get_liked_icon() {\n\t/* If already using Font Awesome with your theme, replace svg with: <i class=\"fa fa-heart\"></i> */\n $icon = '<span class=\"sl-icon\"><small>unlike</small> <i class=\"fa fa-heart\" aria-hidden=\"true\"></i></span>';\n\treturn $icon;\n}", "title": "" }, { "docid": "3f5812af4b47f15774ebaa726599f0c3", "score": "0.62049395", "text": "public static function icon()\n {\n return '<i class=\"fab fa-pied-piper-hat sidebar-icon\"></i>';\n }", "title": "" }, { "docid": "294365f6d10cb81fdd4de1f04d0011ca", "score": "0.6175734", "text": "public function getFontAwesomeIconAttribute()\n {\n $mime_type = $this->tipo;\n\n // List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml\n static $font_awesome_file_icon_classes = [\n // Images\n 'image' => 'fa-file-image',\n // Audio\n 'audio' => 'fa-file-audio',\n // Video\n 'video' => 'fa-file-video',\n // Documents\n 'application/pdf' => 'fa-file-pdf',\n 'application/msword' => 'fa-file-word',\n 'application/vnd.ms-word' => 'fa-file-word',\n 'application/vnd.oasis.opendocument.text' => 'fa-file-word',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml' => 'fa-file-word',\n 'application/vnd.ms-excel' => 'fa-file-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml' => 'fa-file-excel',\n 'application/vnd.oasis.opendocument.spreadsheet' => 'fa-file-excel',\n 'application/vnd.ms-powerpoint' => 'fa-file-powerpoint',\n 'application/vnd.openxmlformats-officedocument.presentationml' => 'ffa-file-powerpoint',\n 'application/vnd.oasis.opendocument.presentation' => 'fa-file-powerpoint',\n 'text/plain' => 'fa-file-alt',\n 'text/html' => 'fa-file-code',\n 'application/json' => 'fa-file-code',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'fa-file-word',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'fa-file-excel',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => 'fa-file-powerpoint',\n // Archives\n 'application/gzip' => 'fa-file-archive',\n 'application/zip' => 'fa-file-archive',\n 'application/x-zip-compressed' => 'fa-file-archive',\n // Misc\n 'application/octet-stream' => 'fa-file-archive',\n ];\n\n if (isset($font_awesome_file_icon_classes[$mime_type]))\n return $font_awesome_file_icon_classes[$mime_type];\n\n $mime_group = explode('/', $mime_type, 2)[0];\n return (isset($font_awesome_file_icon_classes[$mime_group])) ? $font_awesome_file_icon_classes[$mime_group] : 'fa-file';\n }", "title": "" }, { "docid": "82615c2a487b0dcf0e3a658a4d4ee0a1", "score": "0.61531484", "text": "public function get_icon() {\n\t\treturn 'eicon-text';\n\t}", "title": "" }, { "docid": "82615c2a487b0dcf0e3a658a4d4ee0a1", "score": "0.61531484", "text": "public function get_icon() {\n\t\treturn 'eicon-text';\n\t}", "title": "" }, { "docid": "2967b29110f706025c518c3939f60cbd", "score": "0.6114915", "text": "public function get_icon() {\n return 'fa fa-code';\n }", "title": "" }, { "docid": "9c603527dc2d5b9cbb5f9f739334cd04", "score": "0.6100565", "text": "function iconify($text)\n{\n\n $text = str_replace(\":)\", \"<img src=\\\"images/smiley.gif\\\">\", $text);\n $text = str_replace(\":-)\", \"<img src=\\\"images/smiley.gif\\\">\", $text);\n $text = str_replace(\";)\", \"<img src=\\\"images/wink.gif\\\">\", $text);\n $text = str_replace(\";-)\", \"<img src=\\\"images/wink.gif\\\">\", $text);\n $text = str_replace(\":D\", \"<img src=\\\"images/mrgreen.gif\\\">\", $text);\n $text = str_replace(\":-D\", \"<img src=\\\"images/mrgreen.gif\\\">\", $text);\n $text = str_replace(\":p\", \"<img src=\\\"images/tongue.gif\\\">\", $text);\n $text = str_replace(\":-p\", \"<img src=\\\"images/tongue.gif\\\">\", $text);\n $text = str_replace(\":-P\", \"<img src=\\\"images/tongue.gif\\\">\", $text);\n $text = str_replace(\":P\", \"<img src=\\\"images/tongue.gif\\\">\", $text);\n $text = str_replace(\":(\", \"<img src=\\\"images/sad.gif\\\">\", $text);\n $text = str_replace(\":-(\", \"<img src=\\\"images/sad.gif\\\">\", $text);\n\n return $text;\n}", "title": "" }, { "docid": "da4d15e4aac96946f3e4dce3955ea651", "score": "0.61000705", "text": "function addscFontAwesome($atts) {\n extract(shortcode_atts(array(\n 'type' => '',\n 'size' => '',\n 'rotate' => '',\n 'flip' => '',\n 'pull' => '',\n 'animated' => '',\n 'class' => '',\n \n ), $atts));\n \n $classes = ($type) ? 'fa-'.$type. '' : 'fa-star';\n $classes .= ($size) ? ' fa-'.$size.'' : '';\n $classes .= ($rotate) ? ' fa-rotate-'.$rotate.'' : '';\n $classes .= ($flip) ? ' fa-flip-'.$flip.'' : '';\n $classes .= ($pull) ? ' pull-'.$pull.'' : '';\n $classes .= ($animated) ? ' fa-spin' : '';\n $classes .= ($class) ? ' '.$class : '';\n \n $theAwesomeFont = '<i class=\"fa '.esc_html($classes).'\"></i>';\n \n return $theAwesomeFont;\n}", "title": "" }, { "docid": "82c86f7bec6f3c58fcb2fd6284d056be", "score": "0.60923976", "text": "function get_comment_liked_icon() {\n\t/* If already using Font Awesome with your theme, replace svg with: <i class=\"fa fa-heart\"></i> */\n\t$icon = '<span class=\"sl-icon\"><i class=\"fa fa-thumbs-up text-primary\" aria-hidden=\"true\"></i></span>';\n\treturn $icon;\n}", "title": "" }, { "docid": "fb5e8bbd76f2e3da2bde19d782a0a51d", "score": "0.60674226", "text": "function zilla_post_format_icon() {\n\t$format = get_post_format();\n\n\t$formats = array(\n\t\t'audio' => 'fa-volume-up',\n\t\t'link' => 'fa-link',\n\t\t'quote' => 'fa-quote-right',\n\t\t'video' => 'fa-play-circle-o'\n\t);\n\n\techo '<i class=\"fa ' . $formats[$format] . '\"></i>';\n}", "title": "" }, { "docid": "45d5cfe469393a089bb015fa4881922f", "score": "0.6061779", "text": "function icon($image,$link,$text) {\n global $permf;\n\n // sprawdz uprawnienia uzytkwonika\n if (! $permf->check_link($link)) return;\n\n $o=\"<center><a href='$link'><img src=\".$this->img(\"/_icons/\".$image,false).\" border=0></a><br><nobr>$text</nobr></center>\";\n\n return $o;\n }", "title": "" }, { "docid": "6d199a4611213c5c300ec4a5c3b4709e", "score": "0.60485053", "text": "function avia_add_custom_icon( $icons ) \n{\n\t$icons['telegram'] = array( \n\t\t\t\t\t\t'font' => 'entypo-fontello', \n\t\t\t\t\t\t'icon' => 'ue8b7' \n\t\t\t\t\t);\n\treturn $icons;\n}", "title": "" }, { "docid": "4616fbe8720afa02bf6901ad2293af2c", "score": "0.6043398", "text": "function get_octopus_fontawesome_list() {\n\t\t$fa = locate_template ( array (\n\t\t\t\t'/inc/fontawesome-icons.php',\n\t\t\t\t'/fontawesome-icons.php' \n\t\t) );\n\t\t\n\t\t// if none found use the default file\n\t\tif ($fa == '')\n\t\t\t$fa = '/inc/fontawesome-icons.php';\n\t\t\n\t\tinclude ($fa);\n\t\t\n\t\treturn $fa_icon;\n\t}", "title": "" }, { "docid": "363d1c4d626bf96b1cb800f95cfbb63a", "score": "0.6042629", "text": "static function getIcon($icon)\n\t{\n\t\tif(!$icon){\n\t\t\t//Icons are not mandatory\n\t\t\treturn false;\n\t\t}\n\n\t\tif(str::isNumericArray($icon)){\n\t\t\t//only a single icon is allowed\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!is_array($icon)){\n\t\t\t$icon_array = [\"name\" => $icon];\n\t\t}\n\t\telse {\n\t\t\t$icon_array = $icon;\n\t\t}\n\n\t\t# Make the icons thin\n\t\t$icon_array['type'] = \"thin\";\n\n\t\t$icon_html = Icon::generate($icon_array);\n\n\t\t$icon_title = $icon_array['title'] ? \" {$icon_array['title']}\" : false;\n\n\t\t$colour = str::getColour($icon_array['colour']);\n\t\t$span_class_array = str::getAttrArray($colour, \"input-group-text\");\n\t\t$span_class_tag = str::getAttrTag(\"class\", $span_class_array);\n\n\t\treturn \"<span{$span_class_tag}>{$icon_html}{$icon_title}</span>\";\n\t\t//\t\treturn \"<div class=\\\"input-group-{$prepend_or_append}\\\"><span{$span_class_tag}>{$icon_html}{$icon_title}</span></div>\";\n\t}", "title": "" }, { "docid": "b82b4b3f51dd2d894fbadb2af99e1958", "score": "0.6039494", "text": "public static function renderIcon($icon)\n {\n if (Metronic::isSVG($icon)) {\n echo Metronic::getSVG($icon, 'menu-icon');\n } else {\n echo '<i class=\"menu-icon '.$icon.'\"></i>';\n }\n }", "title": "" }, { "docid": "8117ba78286ffbf33d2c6cf7fa18dca3", "score": "0.6032811", "text": "function sf_icon($atts, $content = null) {\n\t\textract(shortcode_atts(array(\n\t\t\t\"size\"\t\t\t=> \"\",\n\t\t\t\"image\"\t\t\t=> \"\",\n\t\t\t\"cont\" \t\t\t=> \"\",\n\t\t\t\"float\" \t\t=> \"\"\n\t\t), $atts));\n\t\t\n\t\tif ($cont == \"yes\") {\n\t\t\treturn '<div class=\"sf-icon-cont cont-'.$size.' sf-icon-float-'.$float.'\"><i class=\"icon-'.$image.' sf-icon icon-'.$size.'\"></i></div>';\n\t\t} else {\n\t\t\treturn '<i class=\"icon-'.$image.' sf-icon sf-icon-float-'.$float.' icon-'.$size.'\"></i>';\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "2c9290f33f3a622df7fc1b1ac3650c78", "score": "0.6024426", "text": "function icon(string $name, string $color = null, array $attributes = []): string\n{\n return icon_theme()->render($name, ThemeColor::create($color), $attributes);\n}", "title": "" }, { "docid": "e6cf8b6c007b129c904e8fd9fb8cc9cd", "score": "0.60222447", "text": "public function glyph($icon) {\n return $this->prepend($this->icon($icon, false));\n }", "title": "" }, { "docid": "74c917d3a3142288f4e70c211aaf66f2", "score": "0.59856826", "text": "protected function renderGlyph ()\n {\n return \"<span style=\\\"color:#FFFFFF;\\\" class=\\\"fa fa-{$this->icone} btn btn-sm btn-primary\\\"></span>\";\n }", "title": "" }, { "docid": "4a5774762bef15fc8c5a09b720dd80f2", "score": "0.59851074", "text": "function si2_svg_icon( $name ){\n\t\tob_start();\n\t\tget_template_part( 'template-parts/icon', $name );\n\t\t$icon = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $icon;\n\t}", "title": "" }, { "docid": "f6f525e727a26a9649998fd447954be6", "score": "0.5964252", "text": "function html_info_icon( $text ) {\n\n\tif( $text ) {\n\t\treturn \"<img src='images/info.gif' title=\\\"$text\\\" alt='Info'>\";\n\t} else {\n\t\treturn \"&nbsp;\". NEWLINE;\n\t}\n}", "title": "" }, { "docid": "5cf7ff113a1daf2c5524ea5178bc64d3", "score": "0.596353", "text": "function dt_sc_icon_box($attrs, $content = null, $shortcodename = \"\") {\n\t\textract ( shortcode_atts ( array (\n\t\t\t\t'type' => '',\n\t\t\t\t'fontawesome_icon' => '',\n\t\t\t\t'title' => '',\n\t\t\t\t'link' => '',\n\t\t\t\t'target' => ''\n\t\t), $attrs ) );\n\t\t\n\t\t$content = DTCoreShortcodesDefination::dtShortcodeHelper ( $content );\n\t\t\n\t\t$out = \"<div class='dt-sc-ico-content {$type}'>\";\n\t\tif( !empty($fontawesome_icon) ){\n\t\t\t$out .= \"<div class='icon'> <span class='fa fa-{$fontawesome_icon}'> </span> </div>\";\n\t\t\n\t\t}\n\t\t$out .= empty( $title ) ? $out : \"<h5><a href='{$link}' target='{$target}'> {$title} </a></h5>\";\n\t\t$out .= $content;\n\t\t$out .= \"</div>\";\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "eb14e6cabfbd30c0309b60260a838ffe", "score": "0.59540886", "text": "public function getIconMarkup()\n\t{\n\t\t$iconElement = config('log.action_icon.element');\n\t\t$iconClassPrefix = config('log.action_icon.class_prefix');\n\n\t\treturn '<'.$iconElement.' class=\"'.$iconClassPrefix.$this->getIcon().'\" title=\"'.$this->action.'\"></'.$iconElement.'>';\n\t}", "title": "" }, { "docid": "1b88af64ec901dd4fb1ced2efae3d309", "score": "0.59431696", "text": "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "title": "" }, { "docid": "1b88af64ec901dd4fb1ced2efae3d309", "score": "0.59431696", "text": "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "title": "" }, { "docid": "689a6f7fb282f7e909a7e7b952234eb8", "score": "0.5929715", "text": "function event_css() {\r\n echo \"<style type='text/css' media='screen'>\r\n #adminmenu .menu-icon-event div.wp-menu-image:before {\r\n font-family: FontAwesome !important;\r\n content: '\\\\f073'; // this is where you enter the fontaweseom font code\r\n }\r\n #adminmenu .menu-icon-products div.wp-menu-image:before {\r\n font-family: FontAwesome !important;\r\n content: '\\\\f07a'; // this is where you enter the fontaweseom font code\r\n }\r\n #adminmenu .menu-icon-gallery div.wp-menu-image:before {\r\n font-family: FontAwesome !important;\r\n content: '\\\\f083'; // this is where you enter the fontaweseom font code\r\n }\r\n #adminmenu .menu-icon-selected-talks div.wp-menu-image:before {\r\n font-family: FontAwesome !important;\r\n content: '\\\\f0e5'; // this is where you enter the fontaweseom font code\r\n }\r\n\r\n\r\n </style>\";\r\n}", "title": "" }, { "docid": "046792498ac7dd27d5833e1e97906d89", "score": "0.59282327", "text": "public function icon($name, array $options = [])\n {\n $options += [\n 'tag' => 'i',\n 'iconSet' => 'glyphicon',\n 'class' => null,\n ];\n\n $classes = [$options['iconSet'], $options['iconSet'] . '-' . $name];\n $options = $this->injectClasses($classes, $options);\n\n return $this->formatTemplate('tag', [\n 'tag' => $options['tag'],\n 'attrs' => $this->templater()->formatAttributes($options, ['tag', 'iconSet']),\n ]);\n }", "title": "" }, { "docid": "123760755b21deaa14b12aec53ae642b", "score": "0.5898526", "text": "function bs_icon_func($atts) {\n\n\textract( \n\t\tshortcode_atts( \n\t\t\tarray(\n\t\t\t'type' => '',\n\t\t\t'class' => ''\n\t\t\t), \n\t\t\t$atts\n\t\t)\n\t);\n\t\n\tif ( $class != '' ) {\n\t\t$class = \" \" . $class;\n\t}\n\t\t\n\t$icon_content = \"<i class='icon-\" . $type . $class . \"'></i>\";\n\t\n\treturn $icon_content;\n\t\n}", "title": "" }, { "docid": "e5e015c0114f0b4a7fdb0e54a7304191", "score": "0.5895046", "text": "function si2_icon( $name, $echo=false ){\n\t\t$icon = si2_svg_icon( $name );\n\t\tif( $echo )\n\t\t\techo $icon;\n\t\treturn $icon;\n\t}", "title": "" }, { "docid": "f9323f792656e3fd4ba6e1e0de9ad560", "score": "0.5853872", "text": "function wponion_icon( $icon ) {\n\t\treturn ( ! empty( $icon ) ) ? '<i class=\"' . $icon . ' wponion-icon\"> </i>' : '';\n\t}", "title": "" }, { "docid": "4df94a1dddd25b58d9869467db7210a9", "score": "0.5839101", "text": "function SummittServices1_feed_icon($variables) {\n $text = t('Subscribe to @feed-title', array('@feed-title' => $variables['title']));\n return l(NULL, $variables['url'], array('html' => TRUE, 'attributes' => array('class' => array('feed-icon', 'art-rss-tag-icon'), 'title' => $text)));\n}", "title": "" }, { "docid": "59ff92af4f3cecb180c098f828d3d95b", "score": "0.58256483", "text": "function separator_shortcode($atts) {\n ob_start();\n extract(shortcode_atts(array(\n 'icon' => $icon\n ), $atts));\n ?>\n <div class=\"text-separator\">\n <?php\n if ($icon === \"star\") {\n echo file_get_contents(get_template_directory_uri() . '/assets/icons/icon-star.svg');\n } else if ($icon === \"flower\") {\n echo file_get_contents(get_template_directory_uri() . '/assets/icons/icon-flower.svg');\n } else if ($icon === \"lines\") {\n echo file_get_contents(get_template_directory_uri() . '/assets/icons/icon-lines.svg');\n }\n ?>\n </div>\n <?php\n return ob_get_clean();\n }", "title": "" }, { "docid": "bae2eecb85d15dca0426d583c750ce5b", "score": "0.5823545", "text": "protected function renderHeaderIcon(): string\n {\n $hasWrapTag = strpos($this->headerIcon, '<') === false;\n if ($hasWrapTag && $this->headerIcon !== '') {\n return Html::tag('i', '', ['class' => $this->headerIcon]);\n }\n return $this->headerIcon;\n }", "title": "" }, { "docid": "b736766dcbd1c0e55c5b627b5fec88ca", "score": "0.58208156", "text": "public function fontIcon($icon, array $options = [], array $attributes = []) {\n\t\t$defaults = [\n\t\t\t'namespace' => $this->_config['iconNamespace']\n\t\t];\n\t\t$options += $defaults;\n\t\t$icon = (array)$icon;\n\t\t$class = [$options['namespace']];\n\t\tforeach ($icon as $i) {\n\t\t\t$class[] = $options['namespace'] . '-' . $i;\n\t\t}\n\t\tif (!empty($options['extra'])) {\n\t\t\tforeach ($options['extra'] as $i) {\n\t\t\t\t$class[] = $options['namespace'] . '-' . $i;\n\t\t\t}\n\t\t}\n\t\tif (!empty($options['size'])) {\n\t\t\t$class[] = $options['namespace'] . '-' . ($options['size'] === 'large' ? 'large' : $options['size'] . 'x');\n\t\t}\n\t\tif (!empty($options['pull'])) {\n\t\t\t$class[] = 'pull-' . $options['pull'];\n\t\t}\n\t\tif (!empty($options['rotate'])) {\n\t\t\t$class[] = $options['namespace'] . '-rotate-' . (int)$options['rotate'];\n\t\t}\n\t\tif (!empty($options['spin'])) {\n\t\t\t$class[] = $options['namespace'] . '-spin';\n\t\t}\n\t\treturn '<i class=\"' . implode(' ', $class) . '\"></i>';\n\t}", "title": "" }, { "docid": "0e718deac34b8ad34f08d687ef446325", "score": "0.58086085", "text": "public function html()\n\t\t{\n\t\t\t$this->html = '';\n\n\t\t\tif( ! empty( $this->icons ) )\n\t\t\t{\n\t\t\t\t$this->html .= \"<{$this->args['outside']} class='noLightbox {$this->args['class']} icon_count_\" . count( $this->icons ) . \"'>\";\n\n\t\t\t\tforeach ( $this->icons as $icon )\n\t\t\t\t{\n\t\t\t\t\tif( ! empty( $icon['social_icon'] ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->html .= $this->build_icon( $icon );\n\t\t\t\t\t\t$this->counter ++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->html .= $this->args['append'];\n\t\t\t\t$this->html .= \"</{$this->args['outside']}>\";\n\t\t\t}\n\n\t\t\treturn $this->html;\n\t\t}", "title": "" }, { "docid": "8e99d7d4ac4ca68862d42587bbad56ba", "score": "0.58052534", "text": "function esc_html( $text ) {}", "title": "" }, { "docid": "7f7d5868da9f4aa9a2d29aa48a3266d3", "score": "0.5792979", "text": "function convert_icons($string)\n{\n// aa=width\n// bb=padded width\n// cc=source image offset\n// title=title\n $pagebits = preg_split(\"/\\[ICON\\]|\\[\\/ICON\\]/\", $string);\n if (count($pagebits)<=1) {\n return $string;\n }\n $checksum = System::get_item_version('icons');\n $renderedbit = array();\n $out = \"\";\n $plaintext = true;\n foreach ($pagebits as $bit) {\n if ($plaintext) {\n $out.= $bit;\n } else {\n if (in_array($bit, $renderedbit)) {\n $out.= $renderedbit[$bit];\n } else {\n $bit_arr = explode(' ', $bit);\n $width = array_shift($bit_arr);\n $padded_width = array_shift($bit_arr);\n $padding = $padded_width-$width;\n $offset = array_shift($bit_arr);\n $text = implode(' ', $bit_arr);\n $out.=\n \"<img class=\\\"toolbar_icon\\\" src=\\\"\".BASE_PATH.\"img/spacer\\\"\"\n .\" alt=\\\"\".$bit.\"\\\" title=\\\"\".$text.\"\\\" width=\\\"\".$width.\"\\\" height=\\\"16\\\"\"\n .\" style=\\\"background-position:-\".$offset.\"px 0px\\\" />\"\n .($padding>0 ?\n \"<img class='b fl' style=\\\"border:none;\\\" src=\\\"\".BASE_PATH.\"img/spacer\\\"\"\n .\" width=\\\"\".$padding.\"\\\" height=\\\"16\\\" alt=\\\"\\\"/>\"\n :\n \"\"\n );\n }\n }\n $plaintext = !$plaintext;\n }\n return $out;\n}", "title": "" }, { "docid": "5656340c382622340650485debebb337", "score": "0.57763463", "text": "function afford_get_social_section_individual_icon($option, $title, $icon) {\n $output = '';\n\n if(afford_get_option($option)){\n $output .= '<a href=\"'.esc_url(afford_get_option($option)).'\" title=\"'.esc_attr($title).'\" target=\"_blank\"><i class=\"mdf mdf-'.esc_attr($icon).'\"></i></a>';\n }\n return $output;\n \n}", "title": "" }, { "docid": "825493e9267c05f58a015ccc059764d1", "score": "0.5750902", "text": "public function getIcon(): string;", "title": "" }, { "docid": "9d5df5c980d66fc2afee1af48f34f568", "score": "0.5743756", "text": "public function get_icon()\n {\n return 'fa fa-link';\n }", "title": "" }, { "docid": "f534aa75e3b213bae85e49be6c34f2a7", "score": "0.57392114", "text": "function wpex_get_awesome_icons() {\n\t$icons = array('none'=>'','adjust'=>'adjust','anchor'=>'anchor','archive'=>'archive','arrows'=>'arrows','arrows-h'=>'arrows-h','arrows-v'=>'arrows-v','asterisk'=>'asterisk','automobile'=>'automobile','ban'=>'ban','bank'=>'bank','bar-chart'=>'bar-chart','bar-chart-o'=>'bar-chart-o','barcode'=>'barcode','bars'=>'bars','beer'=>'beer','bell'=>'bell','bell-o'=>'bell-o','bolt'=>'bolt','bomb'=>'bomb','book'=>'book','bookmark'=>'bookmark','bookmark-o'=>'bookmark-o','briefcase'=>'briefcase','bug'=>'bug','building'=>'building','building-o'=>'building-o','bullhorn'=>'bullhorn','bullseye'=>'bullseye','cab'=>'cab','calendar'=>'calendar','calendar-o'=>'calendar-o','camera'=>'camera','camera-retro'=>'camera-retro','car'=>'car','caret-square-o-down'=>'caret-square-o-down','caret-square-o-left'=>'caret-square-o-left','caret-square-o-right'=>'caret-square-o-right','caret-square-o-up'=>'caret-square-o-up','certificate'=>'certificate','check'=>'check','check-circle'=>'check-circle','check-circle-o'=>'check-circle-o','check-square'=>'check-square','check-square-o'=>'check-square-o','child'=>'child','circle'=>'circle','circle-o'=>'circle-o','circle-o-notch'=>'circle-o-notch','circle-thin'=>'circle-thin','clock-o'=>'clock-o','cloud'=>'cloud','cloud-download'=>'cloud-download','cloud-upload'=>'cloud-upload','code'=>'code','code-fork'=>'code-fork','coffee'=>'coffee','cog'=>'cog','cogs'=>'cogs','comment'=>'comment','comment-o'=>'comment-o','comments'=>'comments','comments-o'=>'comments-o','compass'=>'compass','credit-card'=>'credit-card','crop'=>'crop','crosshairs'=>'crosshairs','cube'=>'cube','cubes'=>'cubes','cutlery'=>'cutlery','dashboard'=>'dashboard','database'=>'database','desktop'=>'desktop','dot-circle-o'=>'dot-circle-o','download'=>'download','edit'=>'edit','ellipsis-h'=>'ellipsis-h','ellipsis-v'=>'ellipsis-v','envelope'=>'envelope','envelope-o'=>'envelope-o','envelope-square'=>'envelope-square','eraser'=>'eraser','exchange'=>'exchange','exclamation'=>'exclamation','exclamation-circle'=>'exclamation-circle','exclamation-triangle'=>'exclamation-triangle','external-link'=>'external-link','external-link-square'=>'external-link-square','eye'=>'eye','eye-slash'=>'eye-slash','fax'=>'fax','female'=>'female','fighter-jet'=>'fighter-jet','file-archive-o'=>'file-archive-o','file-audio-o'=>'file-audio-o','file-code-o'=>'file-code-o','file-excel-o'=>'file-excel-o','file-image-o'=>'file-image-o','file-movie-o'=>'file-movie-o','file-pdf-o'=>'file-pdf-o','file-photo-o'=>'file-photo-o','file-picture-o'=>'file-picture-o','file-powerpoint-o'=>'file-powerpoint-o','file-sound-o'=>'file-sound-o','file-video-o'=>'file-video-o','file-word-o'=>'file-word-o','file-zip-o'=>'file-zip-o','film'=>'film','filter'=>'filter','fire'=>'fire','fire-extinguisher'=>'fire-extinguisher','flag'=>'flag','flag-checkered'=>'flag-checkered','flag-o'=>'flag-o','flash'=>'flash','flask'=>'flask','folder'=>'folder','folder-o'=>'folder-o','folder-open'=>'folder-open','folder-open-o'=>'folder-open-o','frown-o'=>'frown-o','gamepad'=>'gamepad','gavel'=>'gavel','gear'=>'gear','gears'=>'gears','gift'=>'gift','glass'=>'glass','globe'=>'globe','graduation-cap'=>'graduation-cap','group'=>'group','hdd-o'=>'hdd-o','headphones'=>'headphones','heart'=>'heart','heart-o'=>'heart-o','history'=>'history','home'=>'home','image'=>'image','inbox'=>'inbox','info'=>'info','info-circle'=>'info-circle','institution'=>'institution','key'=>'key','keyboard-o'=>'keyboard-o','language'=>'language','laptop'=>'laptop','leaf'=>'leaf','legal'=>'legal','lemon-o'=>'lemon-o','level-down'=>'level-down','level-up'=>'level-up','life-bouy'=>'life-bouy','life-ring'=>'life-ring','life-saver'=>'life-saver','lightbulb-o'=>'lightbulb-o','location-arrow'=>'location-arrow','lock'=>'lock','magic'=>'magic','magnet'=>'magnet','mail-forward'=>'mail-forward','mail-reply'=>'mail-reply','mail-reply-all'=>'mail-reply-all','male'=>'male','map-marker'=>'map-marker','meh-o'=>'meh-o','microphone'=>'microphone','microphone-slash'=>'microphone-slash','minus'=>'minus','minus-circle'=>'minus-circle','minus-square'=>'minus-square','minus-square-o'=>'minus-square-o','mobile'=>'mobile','mobile-phone'=>'mobile-phone','money'=>'money','moon-o'=>'moon-o','mortar-board'=>'mortar-board','music'=>'music','navicon'=>'navicon','paper-plane'=>'paper-plane','paper-plane-o'=>'paper-plane-o','paw'=>'paw','pencil'=>'pencil','pencil-square'=>'pencil-square','pencil-square-o'=>'pencil-square-o','phone'=>'phone','phone-square'=>'phone-square','photo'=>'photo','picture-o'=>'picture-o','plane'=>'plane','plus'=>'plus','plus-circle'=>'plus-circle','plus-square'=>'plus-square','plus-square-o'=>'plus-square-o','power-off'=>'power-off','print'=>'print','puzzle-piece'=>'puzzle-piece','qrcode'=>'qrcode','question'=>'question','question-circle'=>'question-circle','quote-left'=>'quote-left','quote-right'=>'quote-right','random'=>'random','recycle'=>'recycle','refresh'=>'refresh','reorder'=>'reorder','reply'=>'reply','reply-all'=>'reply-all','retweet'=>'retweet','road'=>'road','rocket'=>'rocket','rss'=>'rss','rss-square'=>'rss-square','search'=>'search','search-minus'=>'search-minus','search-plus'=>'search-plus','send'=>'send','send-o'=>'send-o','share'=>'share','share-alt'=>'share-alt','share-alt-square'=>'share-alt-square','share-square'=>'share-square','share-square-o'=>'share-square-o','shield'=>'shield','shopping-cart'=>'shopping-cart','sign-in'=>'sign-in','sign-out'=>'sign-out','signal'=>'signal','sitemap'=>'sitemap','sliders'=>'sliders','smile-o'=>'smile-o','sort'=>'sort','sort-alpha-asc'=>'sort-alpha-asc','sort-alpha-desc'=>'sort-alpha-desc','sort-amount-asc'=>'sort-amount-asc','sort-amount-desc'=>'sort-amount-desc','sort-asc'=>'sort-asc','sort-desc'=>'sort-desc','sort-down'=>'sort-down','sort-numeric-asc'=>'sort-numeric-asc','sort-numeric-desc'=>'sort-numeric-desc','sort-up'=>'sort-up','space-shuttle'=>'space-shuttle','spinner'=>'spinner','spoon'=>'spoon','square'=>'square','square-o'=>'square-o','star'=>'star','star-half'=>'star-half','star-half-empty'=>'star-half-empty','star-half-full'=>'star-half-full','star-half-o'=>'star-half-o','star-o'=>'star-o','suitcase'=>'suitcase','sun-o'=>'sun-o','support'=>'support','tablet'=>'tablet','tachometer'=>'tachometer','tag'=>'tag','tags'=>'tags','tasks'=>'tasks','taxi'=>'taxi','terminal'=>'terminal','thumb-tack'=>'thumb-tack','thumbs-down'=>'thumbs-down','thumbs-o-down'=>'thumbs-o-down','thumbs-o-up'=>'thumbs-o-up','thumbs-up'=>'thumbs-up','ticket'=>'ticket','times'=>'times','times-circle'=>'times-circle','times-circle-o'=>'times-circle-o','tint'=>'tint','toggle-down'=>'toggle-down','toggle-left'=>'toggle-left','toggle-right'=>'toggle-right','toggle-up'=>'toggle-up','trash-o'=>'trash-o','tree'=>'tree','trophy'=>'trophy','truck'=>'truck','umbrella'=>'umbrella','university'=>'university','unlock'=>'unlock','unlock-alt'=>'unlock-alt','unsorted'=>'unsorted','upload'=>'upload','user'=>'user','users'=>'users','video-camera'=>'video-camera','volume-down'=>'volume-down','volume-off'=>'volume-off','volume-up'=>'volume-up','warning'=>'warning','wheelchair'=>'wheelchair','wrench'=>'wrench','file'=>'file','file-archive-o'=>'file-archive-o','file-audio-o'=>'file-audio-o','file-code-o'=>'file-code-o','file-excel-o'=>'file-excel-o','file-image-o'=>'file-image-o','file-movie-o'=>'file-movie-o','file-o'=>'file-o','file-pdf-o'=>'file-pdf-o','file-photo-o'=>'file-photo-o','file-picture-o'=>'file-picture-o','file-powerpoint-o'=>'file-powerpoint-o','file-sound-o'=>'file-sound-o','file-text'=>'file-text','file-text-o'=>'file-text-o','file-video-o'=>'file-video-o','file-word-o'=>'file-word-o','file-zip-o'=>'file-zip-o','circle-o-notch'=>'circle-o-notch','cog'=>'cog','gear'=>'gear','refresh'=>'refresh','spinner'=>'spinner','check-square'=>'check-square','check-square-o'=>'check-square-o','circle'=>'circle','circle-o'=>'circle-o','dot-circle-o'=>'dot-circle-o','minus-square'=>'minus-square','minus-square-o'=>'minus-square-o','plus-square'=>'plus-square','plus-square-o'=>'plus-square-o','square'=>'square','square-o'=>'square-o','bitcoin'=>'bitcoin','btc'=>'btc','cny'=>'cny','dollar'=>'dollar','eur'=>'eur','euro'=>'euro','gbp'=>'gbp','inr'=>'inr','jpy'=>'jpy','krw'=>'krw','money'=>'money','rmb'=>'rmb','rouble'=>'rouble','rub'=>'rub','ruble'=>'ruble','rupee'=>'rupee','try'=>'try','turkish-lira'=>'turkish-lira','usd'=>'usd','won'=>'won','yen'=>'yen','align-center'=>'align-center','align-justify'=>'align-justify','align-left'=>'align-left','align-right'=>'align-right','bold'=>'bold','chain'=>'chain','chain-broken'=>'chain-broken','clipboard'=>'clipboard','columns'=>'columns','copy'=>'copy','cut'=>'cut','dedent'=>'dedent','eraser'=>'eraser','file'=>'file','file-o'=>'file-o','file-text'=>'file-text','file-text-o'=>'file-text-o','files-o'=>'files-o','floppy-o'=>'floppy-o','font'=>'font','header'=>'header','indent'=>'indent','italic'=>'italic','link'=>'link','list'=>'list','list-alt'=>'list-alt','list-ol'=>'list-ol','list-ul'=>'list-ul','outdent'=>'outdent','paperclip'=>'paperclip','paragraph'=>'paragraph','paste'=>'paste','repeat'=>'repeat','rotate-left'=>'rotate-left','rotate-right'=>'rotate-right','save'=>'save','scissors'=>'scissors','strikethrough'=>'strikethrough','subscript'=>'subscript','superscript'=>'superscript','table'=>'table','text-height'=>'text-height','text-width'=>'text-width','th'=>'th','th-large'=>'th-large','th-list'=>'th-list','underline'=>'underline','undo'=>'undo','unlink'=>'unlink','angle-double-down'=>'angle-double-down','angle-double-left'=>'angle-double-left','angle-double-right'=>'angle-double-right','angle-double-up'=>'angle-double-up','angle-down'=>'angle-down','angle-left'=>'angle-left','angle-right'=>'angle-right','angle-up'=>'angle-up','arrow-circle-down'=>'arrow-circle-down','arrow-circle-left'=>'arrow-circle-left','arrow-circle-o-down'=>'arrow-circle-o-down','arrow-circle-o-left'=>'arrow-circle-o-left','arrow-circle-o-right'=>'arrow-circle-o-right','arrow-circle-o-up'=>'arrow-circle-o-up','arrow-circle-right'=>'arrow-circle-right','arrow-circle-up'=>'arrow-circle-up','arrow-down'=>'arrow-down','arrow-left'=>'arrow-left','arrow-right'=>'arrow-right','arrow-up'=>'arrow-up','arrows'=>'arrows','arrows-alt'=>'arrows-alt','arrows-h'=>'arrows-h','arrows-v'=>'arrows-v','caret-down'=>'caret-down','caret-left'=>'caret-left','caret-right'=>'caret-right','caret-square-o-down'=>'caret-square-o-down','caret-square-o-left'=>'caret-square-o-left','caret-square-o-right'=>'caret-square-o-right','caret-square-o-up'=>'caret-square-o-up','caret-up'=>'caret-up','chevron-circle-down'=>'chevron-circle-down','chevron-circle-left'=>'chevron-circle-left','chevron-circle-right'=>'chevron-circle-right','chevron-circle-up'=>'chevron-circle-up','chevron-down'=>'chevron-down','chevron-left'=>'chevron-left','chevron-right'=>'chevron-right','chevron-up'=>'chevron-up','hand-o-down'=>'hand-o-down','hand-o-left'=>'hand-o-left','hand-o-right'=>'hand-o-right','hand-o-up'=>'hand-o-up','long-arrow-down'=>'long-arrow-down','long-arrow-left'=>'long-arrow-left','long-arrow-right'=>'long-arrow-right','long-arrow-up'=>'long-arrow-up','toggle-down'=>'toggle-down','toggle-left'=>'toggle-left','toggle-right'=>'toggle-right','toggle-up'=>'toggle-up','arrows-alt'=>'arrows-alt','backward'=>'backward','compress'=>'compress','eject'=>'eject','expand'=>'expand','fast-backward'=>'fast-backward','fast-forward'=>'fast-forward','forward'=>'forward','pause'=>'pause','play'=>'play','play-circle'=>'play-circle','play-circle-o'=>'play-circle-o','step-backward'=>'step-backward','step-forward'=>'step-forward','stop'=>'stop','youtube-play'=>'youtube-play','adn'=>'adn','android'=>'android','apple'=>'apple','behance'=>'behance','behance-square'=>'behance-square','bitbucket'=>'bitbucket','bitbucket-square'=>'bitbucket-square','bitcoin'=>'bitcoin','btc'=>'btc','codepen'=>'codepen','css3'=>'css3','delicious'=>'delicious','deviantart'=>'deviantart','digg'=>'digg','dribbble'=>'dribbble','dropbox'=>'dropbox','drupal'=>'drupal','empire'=>'empire','facebook'=>'facebook','facebook-square'=>'facebook-square','flickr'=>'flickr','foursquare'=>'foursquare','ge'=>'ge','git'=>'git','git-square'=>'git-square','github'=>'github','github-alt'=>'github-alt','github-square'=>'github-square','gittip'=>'gittip','google'=>'google','google-plus'=>'google-plus','google-plus-square'=>'google-plus-square','hacker-news'=>'hacker-news','html5'=>'html5','instagram'=>'instagram','joomla'=>'joomla','jsfiddle'=>'jsfiddle','linkedin'=>'linkedin','linkedin-square'=>'linkedin-square','linux'=>'linux','maxcdn'=>'maxcdn','openid'=>'openid','pagelines'=>'pagelines','pied-piper'=>'pied-piper','pied-piper-alt'=>'pied-piper-alt','pied-piper-square'=>'pied-piper-square','pinterest'=>'pinterest','pinterest-square'=>'pinterest-square','qq'=>'qq','ra'=>'ra','rebel'=>'rebel','reddit'=>'reddit','reddit-square'=>'reddit-square','renren'=>'renren','share-alt'=>'share-alt','share-alt-square'=>'share-alt-square','skype'=>'skype','slack'=>'slack','soundcloud'=>'soundcloud','spotify'=>'spotify','stack-exchange'=>'stack-exchange','stack-overflow'=>'stack-overflow','steam'=>'steam','steam-square'=>'steam-square','stumbleupon'=>'stumbleupon','stumbleupon-circle'=>'stumbleupon-circle','tencent-weibo'=>'tencent-weibo','trello'=>'trello','tumblr'=>'tumblr','tumblr-square'=>'tumblr-square','twitter'=>'twitter','twitter-square'=>'twitter-square','vimeo-square'=>'vimeo-square','vine'=>'vine','vk'=>'vk','wechat'=>'wechat','weibo'=>'weibo','weixin'=>'weixin','windows'=>'windows','wordpress'=>'wordpress','xing'=>'xing','xing-square'=>'xing-square','yahoo'=>'yahoo','youtube'=>'youtube','youtube-play'=>'youtube-play','youtube-square'=>'youtube-square','ambulance'=>'ambulance','h-square'=>'h-square','hospital-o'=>'hospital-o','medkit'=>'medkit','plus-square'=>'plus-square','stethoscope'=>'stethoscope','user-md'=>'user-md','wheelchair'=>'wheelchair','angellist'=>'angellist','area-chart'=>'fa-area-chart','at'=>'at','bell-slash'=>'bell-slash','bell-slash-o'=>'bell-slash-o','bicycle'=>'bicycle','binoculars'=>'binoculars','birthday-cake'=>'birthday-cake','bus'=>'bus','calculator'=>'calculator','cc'=>'cc','cc-amex'=>'cc-amex','cc-discover'=>'cc-discover','cc-paypal'=>'cc-paypal','cc-stripe'=>'cc-stripe','cc-visa'=>'cc-visa','copyright'=>'copyright','eyedropper'=>'eyedropper','futbol-o'=>'futbol-o','google-wallet'=>'google-wallet','ils'=>'ils','ioxhost'=>'ioxhost','lastfm'=>'lastfm','lastfm-square'=>'lastfm-square','line-chart'=>'line-chart','meanpath'=>'meanpath','newspaper-o'=>'newspaper-o','paint-brush'=>'paint-brush','paypal'=>'paypal','pie-chart'=>'pie-chart','plug'=>'plug','shekel'=>'shekel','sheqel'=>'sheqel','slideshare'=>'slideshare','soccer-ball-o'=>'soccer-ball-o','toggle-off'=>'toggle-off','toggle-on'=>'toggle-on','trash'=>'trash','tty'=>'tty','twitch'=>'twitch','wifi'=>'wifi','yelp'=>'yelp');\n\treturn apply_filters( 'wpex_get_awesome_icons', $icons );\n}", "title": "" }, { "docid": "a65435078e35b31da73ffbf632af4d22", "score": "0.5735661", "text": "public static function setHTML($tag, $classes, $content) {\n echo \"<$tag class='$classes'><i class='fa fa-exclamation'></i> $content</$tag>\";\n }", "title": "" }, { "docid": "3fdf7aac4495dbc5d51b4efb5f541b2a", "score": "0.5724055", "text": "public function registerIcons()\r\n {\r\n \r\n }", "title": "" }, { "docid": "97b3cc97c24f98369e04cd62621d71df", "score": "0.57204765", "text": "function themify_register_fontello_font( $icon_picker ) {\n\tinclude_once( trailingslashit( THEMIFY_DIR ) . 'themify-fontello-icon-picker.php' );\n\t$icon_picker->register( 'Themify_Icon_Picker_Fontello' );\n}", "title": "" }, { "docid": "0ce5f105986ae51ad80ac633ddebbd56", "score": "0.5712827", "text": "function icon_btn($url = '', $type = '', $class = 'btn-default', $attributes = [])\n{\n $_url = '#';\n if (_startsWith($url, 'http')) {\n $_url = $url;\n } elseif ($url !== '#') {\n $_url = admin_url($url);\n }\n\n return '<a href=\"' . $_url . '\" class=\"btn ' . $class . ' btn-icon\"' . _attributes_to_string($attributes) . '>\n <i class=\"fa fa-' . $type . '\"></i>\n </a>';\n}", "title": "" }, { "docid": "647e431f4a336b2130d71e70ff1532f2", "score": "0.5689824", "text": "public function icon($name, $options = [])\n {\n $options = $this->parseOptions($options);\n\n $options['class'] = $this->getClasses($name, Arr::pull($options, 'class'));\n\n return new HtmlString(\n $this->openTag($this->attributes($options)) . $this->closeTag()\n );\n }", "title": "" }, { "docid": "33ff8a65d53058e1f93a8fea13c337b7", "score": "0.568823", "text": "function imagen_ull_process_font_awesome_classes( $classes, $args ) {\n\t$before = true;\n\t$fontawesome_classes = array();\n\t$other_classes = array();\n\tforeach ( $classes as $class ) {\n\t\tif ( substr( $class, 0, 2 ) == 'fa' ) {\n\t\t\tif ( $class == 'fa-after' ) {\n\t\t\t\t$before = false;\n\t\t\t} elseif ( $class != 'fa' ) {\n\t\t\t\t$fontawesome_classes[] = $class;\n\t\t\t}\n\t\t} else {\n\t\t\t$other_classes[] = $class;\n\t\t}\n\t}\n\n\t$args->link_before = '';\n\t$args->link_after = '';\n\n\tif ( !empty( $fontawesome_classes ) ) {\n\t\t$fontawesome_classes[] = 'fa';\n\t\t$class_names = implode( ' ', $fontawesome_classes );\n\t\tif( $before ){\n\t\t\t$args->link_before = '<i class=\"'.$class_names.'\"></i>&nbsp;';\n\t\t} else {\n\t\t\t$args->link_after = '&nbsp;<i class=\"'.$class_names.'\"></i>';\n\t\t}\n\t}\n\n\treturn $other_classes;\n}", "title": "" }, { "docid": "31b68cf3961d94e3bb737d95959cf8d4", "score": "0.5666532", "text": "public function get_icon() {\n return 'fa fa-link';\n }", "title": "" }, { "docid": "0e173fedbc249d163d48790a4a74a32c", "score": "0.56628484", "text": "protected function _display_as_html ($obj)\n {\n if ($obj->icon_url)\n {\n $this->context->start_icon_container($obj->icon_url, Fifty_px);\n parent::_display_as_html($obj);\n $this->context->finish_icon_container();\n }\n else\n {\n parent::_display_as_html($obj);\n }\n }", "title": "" }, { "docid": "4678edd3c21cf5620143e02363085183", "score": "0.56596535", "text": "function get_icon_menu($meny){\n return '<span class=\"'.$meny->icon.'\"></span>';\n}", "title": "" }, { "docid": "3ed6554f3b57aef0afa41bf97bec733c", "score": "0.5642307", "text": "function kivnew_file_icon($variables) {\n $retst=\"\";\n $file = $variables['file'];\n $icon_directory = $variables['icon_directory'];\n\n $mime = check_plain($file->filemime);\n $icon_url = file_icon_url($file, $icon_directory);\n \n $retst = '<img class=\"file-icon\" alt=\"START'. base_path() .'\" title=\"' . $mime . '\" src=\"' . $icon_url . '\" />';\n if($mime == \"application/pdf\"){\n // tabort bilden framför om det är en pdf\n\t $retst =\"\";\n\t// Detta är om man vill lägga till egen icon framför: \n\t//$retst = '<img class=\"file-icon\" alt=\"START\" title=\"' . $mime . '\" src=\"'. $GLOBALS['base_url'] .'/sites/all/themes/kivnew/images/icondownarrow.png\" />';\n\t// sköter det via css istället\n }\n if($mime == \"audio/mpeg\"){\n // tabort bilden framför om det är en ljudfil\n $retst=\"\";\t\n }\n \n return $retst;\n}", "title": "" }, { "docid": "bb10c77abebf37cc7c5cd8e61b2aabe1", "score": "0.563618", "text": "function dt_sc_icon_box_process($attrs, $content = null, $shortcodename = \"\") {\n extract ( shortcode_atts ( array (\n 'type' => '',\n 'value' => '',\n 'title' => '',\n 'link' => '',\n ), $attrs ) );\n \n $content = DTCoreShortcodesDefination::dtShortcodeHelper ( $content );\n \n $out = \"<div class='dt-sc-ico-content {$type}'>\";\n $out .= empty($value) ? $out : \"<div class='icon'> <span> {$value} </span> </div>\";\n $out .= empty( $title ) ? $out : \"<h5><a href='{$link}' target='_blank'> {$title} </a></h5>\";\n $out .= $content;\n $out .= \"</div>\";\n return $out;\n }", "title": "" }, { "docid": "753bc0d63c93f1fa4f7fdbec083a4273", "score": "0.5631814", "text": "public function get_icon() {\n return 'fa fa-plug';\n }", "title": "" }, { "docid": "753bc0d63c93f1fa4f7fdbec083a4273", "score": "0.5631814", "text": "public function get_icon() {\n return 'fa fa-plug';\n }", "title": "" }, { "docid": "753bc0d63c93f1fa4f7fdbec083a4273", "score": "0.5631814", "text": "public function get_icon() {\n return 'fa fa-plug';\n }", "title": "" }, { "docid": "3fd6d8ee2eae241006792bb7af0ba7ed", "score": "0.56246775", "text": "static function to_icon($name) {\n $full_name = 'dashicons-' . str_replace('dashicons-', '', $name);\n return $full_name;\n }", "title": "" }, { "docid": "eee56d5949730db5ba57454bc01d5c4b", "score": "0.5623644", "text": "public static function icon()\n {\n // return view('nova::icon.svg-lock-open-outline', [\n // 'height' => 20,\n // 'width' => 20,\n // 'color' => 'var(--sidebar-icon)',\n // 'class' => 'sidebar-icon'\n // ])->render();\n }", "title": "" }, { "docid": "9377c114c6a81263c1563c687b3a6c79", "score": "0.5617363", "text": "function theme_asset_file_icon($vars) {\n $file = $vars['file'];\n $icon_directory = $vars['icon_directory'];\n\n $mime = check_plain($file->filemime);\n $icon_url = file_icon_url($file, $icon_directory);\n return '<img class=\"file-icon\" alt=\"\" title=\"' . $mime . '\" src=\"' . $icon_url . '\" />';\n}", "title": "" }, { "docid": "79dc7aa1b943ce1575dbd6bc30123f74", "score": "0.5606627", "text": "public function get_icon() {\n\t\treturn 'fa fa-ellipsis-h';\n\t}", "title": "" }, { "docid": "56de1b5a853a6ce198e92aa45a39ac94", "score": "0.56033874", "text": "public function icon_attr() {\n\t\treturn array(\n\t\t\t'class' => 'fa ' . FusionBuilder::font_awesome_name_handler( self::$args['icon'] ),\n\t\t\t'style' => 'color:' . self::$args['sep_color'] . ';',\n\t\t);\n\t}", "title": "" }, { "docid": "e0f996916992d2d2f957c8ab4d4289f5", "score": "0.55989504", "text": "public function getIcon()\n {\n return 'fa-envelope';\n }", "title": "" }, { "docid": "b267ad48261c255fca0121ed402ca0ab", "score": "0.5592649", "text": "function setIcon($icon){}", "title": "" }, { "docid": "43e1ca7e3253419af02f3b696d3d6e99", "score": "0.55892247", "text": "function zen_svg_icon( $slug, $class = 'icon' ) {\r\n\t$svg = get_template_directory() . '/lib/assets/' . $slug .'.svg';\r\n\tif ( is_file( $svg ) ){\r\n\t\treturn str_replace( '<svg', '<svg class=\"' . $class . '\"', file_get_contents( $svg ) );\r\n\t}\r\n}", "title": "" }, { "docid": "fcd1ae26e52da69b15cd91af805caf7a", "score": "0.5577207", "text": "public static function icon() \n {\n return view('icons.grid')->render();\n }", "title": "" }, { "docid": "ebed0100075122ebbbc704f5cc4f6b6f", "score": "0.55621725", "text": "public function get_icon() {\n switch ($this->get_level()) {\n case self::LEVEL_SUCCESS:\n return 'fa-check';\n\n case self::LEVEL_INFO:\n return 'fa-info-circle';\n\n case self::LEVEL_WARNING:\n return 'fa-exclamation-triangle';\n\n case self::LEVEL_DANGER:\n return 'fa-times-circle';\n }\n\n return 'fa-question';\n }", "title": "" }, { "docid": "8d525809e138bec8e377144d4011b604", "score": "0.5558134", "text": "function rovoko_iconpicker_fontname_icons(){\n\t// struct ['icon-class-name' => 'icon name']\n\t// icon name need in array\n\t$default_icons = [\n\t\t['default' => 'default']\n\t];\n\treturn array_merge($default_icons, apply_filters('rovoko_iconpicker_fontname_icons', []));\n}", "title": "" }, { "docid": "3f0afa751b2840b597bf595d28fb8f17", "score": "0.55574644", "text": "public function createIcon();", "title": "" }, { "docid": "5f0ac0a2ab329b14621b2c21e1f2b048", "score": "0.55546224", "text": "public function icon_attr() {\n\n\t\t\t\t$attr = [];\n\n\t\t\t\tif ( $this->child_args['image'] ) {\n\t\t\t\t\t$attr['class'] = 'image';\n\t\t\t\t} elseif ( $this->child_args['icon'] ) {\n\t\t\t\t\t$attr['class'] = fusion_font_awesome_name_handler( $this->child_args['icon'] );\n\t\t\t\t}\n\n\t\t\t\tif ( $this->child_args['icon_color'] ) {\n\t\t\t\t\t$attr['style'] = 'color:' . $this->child_args['icon_color'] . ';';\n\t\t\t\t}\n\n\t\t\t\tif ( $this->child_args['icon_flip'] && 'none' !== $this->child_args['icon_flip'] ) {\n\t\t\t\t\t$attr['class'] .= ' fa-flip-' . $this->child_args['icon_flip'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->child_args['icon_rotate'] && 'none' !== $this->child_args['icon_rotate'] ) {\n\t\t\t\t\t$attr['class'] .= ' fa-rotate-' . $this->child_args['icon_rotate'];\n\t\t\t\t}\n\n\t\t\t\tif ( 'yes' === $this->child_args['icon_spin'] && 'none' !== $this->child_args['icon_spin'] ) {\n\t\t\t\t\t$attr['class'] .= ' fa-spin';\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}", "title": "" }, { "docid": "c5107b17df3588640b7f402534fc7944", "score": "0.5554283", "text": "protected function render( $attributes ) {\n\t\tif ( isset( $attributes['className'] ) && strpos( $attributes['className'], 'is-style-icons' ) !== false ) {\n\t\t\t$class = 'wp-block-themeisle-blocks-sharing-icons';\n\t\t} else {\n\t\t\t$class = 'wp-block-themeisle-blocks-sharing-icons has-label';\n\t\t}\n\n\t\tif ( isset( $attributes['className'] ) ) {\n\t\t\t$class .= ' ' . esc_attr( $attributes['className'] );\n\t\t}\n\n\t\t$style = '';\n\n\t\tif ( isset( $attributes['align'] ) ) {\n\t\t\t$style .= 'style=\"text-align: ' . $attributes['align'] .';\"';\n\t\t}\n\n\t\t$html = '<div class=\"' . esc_attr( $class ) . '\" ' . $style . '>';\n\t\tforeach ( $this->social_attributes as $key => $icon ) {\n\t\t\tif ( $key !== 'className' && $attributes[ $key ] == 1 ) {\n\t\t\t\t$html .= '<a class=\"social-icon is-' . esc_html( $key ) . '\" href=\"' . esc_url( $icon['url'] ) . '\" target=\"_blank\">';\n\t\t\t\t$html .= '<i class=\"fab fa-' . esc_html( $icon['icon'] ) . '\"></i>';\n\t\t\t\tif ( strpos( $attributes['className'], 'is-style-icons' ) === false ) {\n\t\t\t\t\t$html .= esc_html( $icon['label'] );\n\t\t\t\t}\n\t\t\t\t$html .= '</a>';\n\t\t\t}\n\t\t}\n\t\t$html .= '</div>';\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "c8a42765ddb8cd72ff2be8be7763a95f", "score": "0.5551358", "text": "function thb_getIconArray(){\n\t$icons = array(\n\t\t'' => '', 'fa-glass' => 'fa-glass', 'fa-music' => 'fa-music', 'fa-search' => 'fa-search', 'fa-envelope-o' => 'fa-envelope-o', 'fa-heart' => 'fa-heart', 'fa-star' => 'fa-star', 'fa-star-o' => 'fa-star-o', 'fa-user' => 'fa-user', 'fa-film' => 'fa-film', 'fa-th-large' => 'fa-th-large', 'fa-th' => 'fa-th', 'fa-th-list' => 'fa-th-list', 'fa-check' => 'fa-check', 'fa-times' => 'fa-times', 'fa-search-plus' => 'fa-search-plus', 'fa-search-minus' => 'fa-search-minus', 'fa-power-off' => 'fa-power-off', 'fa-signal' => 'fa-signal', 'fa-cog' => 'fa-cog', 'fa-trash-o' => 'fa-trash-o', 'fa-home' => 'fa-home', 'fa-file-o' => 'fa-file-o', 'fa-clock-o' => 'fa-clock-o', 'fa-road' => 'fa-road', 'fa-download' => 'fa-download', 'fa-arrow-circle-o-down' => 'fa-arrow-circle-o-down', 'fa-arrow-circle-o-up' => 'fa-arrow-circle-o-up', 'fa-inbox' => 'fa-inbox', 'fa-play-circle-o' => 'fa-play-circle-o', 'fa-repeat' => 'fa-repeat', 'fa-refresh' => 'fa-refresh', 'fa-list-alt' => 'fa-list-alt', 'fa-lock' => 'fa-lock', 'fa-flag' => 'fa-flag', 'fa-headphones' => 'fa-headphones', 'fa-volume-off' => 'fa-volume-off', 'fa-volume-down' => 'fa-volume-down', 'fa-volume-up' => 'fa-volume-up', 'fa-qrcode' => 'fa-qrcode', 'fa-barcode' => 'fa-barcode', 'fa-tag' => 'fa-tag', 'fa-tags' => 'fa-tags', 'fa-book' => 'fa-book', 'fa-bookmark' => 'fa-bookmark', 'fa-print' => 'fa-print', 'fa-camera' => 'fa-camera', 'fa-font' => 'fa-font', 'fa-bold' => 'fa-bold', 'fa-italic' => 'fa-italic', 'fa-text-height' => 'fa-text-height', 'fa-text-width' => 'fa-text-width', 'fa-align-left' => 'fa-align-left', 'fa-align-center' => 'fa-align-center', 'fa-align-right' => 'fa-align-right', 'fa-align-justify' => 'fa-align-justify', 'fa-list' => 'fa-list', 'fa-outdent' => 'fa-outdent', 'fa-indent' => 'fa-indent', 'fa-video-camera' => 'fa-video-camera', 'fa-picture-o' => 'fa-picture-o', 'fa-pencil' => 'fa-pencil', 'fa-map-marker' => 'fa-map-marker', 'fa-adjust' => 'fa-adjust', 'fa-tint' => 'fa-tint', 'fa-pencil-square-o' => 'fa-pencil-square-o', 'fa-share-square-o' => 'fa-share-square-o', 'fa-check-square-o' => 'fa-check-square-o', 'fa-arrows' => 'fa-arrows', 'fa-step-backward' => 'fa-step-backward', 'fa-fast-backward' => 'fa-fast-backward', 'fa-backward' => 'fa-backward', 'fa-play' => 'fa-play', 'fa-pause' => 'fa-pause', 'fa-stop' => 'fa-stop', 'fa-forward' => 'fa-forward', 'fa-fast-forward' => 'fa-fast-forward', 'fa-step-forward' => 'fa-step-forward', 'fa-eject' => 'fa-eject', 'fa-chevron-left' => 'fa-chevron-left', 'fa-chevron-right' => 'fa-chevron-right', 'fa-plus-circle' => 'fa-plus-circle', 'fa-minus-circle' => 'fa-minus-circle', 'fa-times-circle' => 'fa-times-circle', 'fa-check-circle' => 'fa-check-circle', 'fa-question-circle' => 'fa-question-circle', 'fa-info-circle' => 'fa-info-circle', 'fa-crosshairs' => 'fa-crosshairs', 'fa-times-circle-o' => 'fa-times-circle-o', 'fa-check-circle-o' => 'fa-check-circle-o', 'fa-ban' => 'fa-ban', 'fa-arrow-left' => 'fa-arrow-left', 'fa-arrow-right' => 'fa-arrow-right', 'fa-arrow-up' => 'fa-arrow-up', 'fa-arrow-down' => 'fa-arrow-down', 'fa-share' => 'fa-share', 'fa-expand' => 'fa-expand', 'fa-compress' => 'fa-compress', 'fa-plus' => 'fa-plus', 'fa-minus' => 'fa-minus', 'fa-asterisk' => 'fa-asterisk', 'fa-exclamation-circle' => 'fa-exclamation-circle', 'fa-gift' => 'fa-gift', 'fa-leaf' => 'fa-leaf', 'fa-fire' => 'fa-fire', 'fa-eye' => 'fa-eye', 'fa-eye-slash' => 'fa-eye-slash', 'fa-exclamation-triangle' => 'fa-exclamation-triangle', 'fa-plane' => 'fa-plane', 'fa-calendar' => 'fa-calendar', 'fa-random' => 'fa-random', 'fa-comment' => 'fa-comment', 'fa-magnet' => 'fa-magnet', 'fa-chevron-up' => 'fa-chevron-up', 'fa-chevron-down' => 'fa-chevron-down', 'fa-retweet' => 'fa-retweet', 'fa-shopping-cart' => 'fa-shopping-cart', 'fa-folder' => 'fa-folder', 'fa-folder-open' => 'fa-folder-open', 'fa-arrows-v' => 'fa-arrows-v', 'fa-arrows-h' => 'fa-arrows-h', 'fa-bar-chart' => 'fa-bar-chart', 'fa-twitter-square' => 'fa-twitter-square', 'fa-facebook-square' => 'fa-facebook-square', 'fa-camera-retro' => 'fa-camera-retro', 'fa-key' => 'fa-key', 'fa-cogs' => 'fa-cogs', 'fa-comments' => 'fa-comments', 'fa-thumbs-o-up' => 'fa-thumbs-o-up', 'fa-thumbs-o-down' => 'fa-thumbs-o-down', 'fa-star-half' => 'fa-star-half', 'fa-heart-o' => 'fa-heart-o', 'fa-sign-out' => 'fa-sign-out', 'fa-linkedin-square' => 'fa-linkedin-square', 'fa-thumb-tack' => 'fa-thumb-tack', 'fa-external-link' => 'fa-external-link', 'fa-sign-in' => 'fa-sign-in', 'fa-trophy' => 'fa-trophy', 'fa-github-square' => 'fa-github-square', 'fa-upload' => 'fa-upload', 'fa-lemon-o' => 'fa-lemon-o', 'fa-phone' => 'fa-phone', 'fa-square-o' => 'fa-square-o', 'fa-bookmark-o' => 'fa-bookmark-o', 'fa-phone-square' => 'fa-phone-square', 'fa-twitter' => 'fa-twitter', 'fa-facebook' => 'fa-facebook', 'fa-github' => 'fa-github', 'fa-unlock' => 'fa-unlock', 'fa-credit-card' => 'fa-credit-card', 'fa-rss' => 'fa-rss', 'fa-hdd-o' => 'fa-hdd-o', 'fa-bullhorn' => 'fa-bullhorn', 'fa-bell' => 'fa-bell', 'fa-certificate' => 'fa-certificate', 'fa-hand-o-right' => 'fa-hand-o-right', 'fa-hand-o-left' => 'fa-hand-o-left', 'fa-hand-o-up' => 'fa-hand-o-up', 'fa-hand-o-down' => 'fa-hand-o-down', 'fa-arrow-circle-left' => 'fa-arrow-circle-left', 'fa-arrow-circle-right' => 'fa-arrow-circle-right', 'fa-arrow-circle-up' => 'fa-arrow-circle-up', 'fa-arrow-circle-down' => 'fa-arrow-circle-down', 'fa-globe' => 'fa-globe', 'fa-wrench' => 'fa-wrench', 'fa-tasks' => 'fa-tasks', 'fa-filter' => 'fa-filter', 'fa-briefcase' => 'fa-briefcase', 'fa-arrows-alt' => 'fa-arrows-alt', 'fa-users' => 'fa-users', 'fa-link' => 'fa-link', 'fa-cloud' => 'fa-cloud', 'fa-flask' => 'fa-flask', 'fa-scissors' => 'fa-scissors', 'fa-files-o' => 'fa-files-o', 'fa-paperclip' => 'fa-paperclip', 'fa-floppy-o' => 'fa-floppy-o', 'fa-square' => 'fa-square', 'fa-bars' => 'fa-bars', 'fa-list-ul' => 'fa-list-ul', 'fa-list-ol' => 'fa-list-ol', 'fa-strikethrough' => 'fa-strikethrough', 'fa-underline' => 'fa-underline', 'fa-table' => 'fa-table', 'fa-magic' => 'fa-magic', 'fa-truck' => 'fa-truck', 'fa-pinterest' => 'fa-pinterest', 'fa-pinterest-square' => 'fa-pinterest-square', 'fa-google-plus-square' => 'fa-google-plus-square', 'fa-google-plus' => 'fa-google-plus', 'fa-money' => 'fa-money', 'fa-caret-down' => 'fa-caret-down', 'fa-caret-up' => 'fa-caret-up', 'fa-caret-left' => 'fa-caret-left', 'fa-caret-right' => 'fa-caret-right', 'fa-columns' => 'fa-columns', 'fa-sort' => 'fa-sort', 'fa-sort-desc' => 'fa-sort-desc', 'fa-sort-asc' => 'fa-sort-asc', 'fa-envelope' => 'fa-envelope', 'fa-linkedin' => 'fa-linkedin', 'fa-undo' => 'fa-undo', 'fa-gavel' => 'fa-gavel', 'fa-tachometer' => 'fa-tachometer', 'fa-comment-o' => 'fa-comment-o', 'fa-comments-o' => 'fa-comments-o', 'fa-bolt' => 'fa-bolt', 'fa-sitemap' => 'fa-sitemap', 'fa-umbrella' => 'fa-umbrella', 'fa-clipboard' => 'fa-clipboard', 'fa-lightbulb-o' => 'fa-lightbulb-o', 'fa-exchange' => 'fa-exchange', 'fa-cloud-download' => 'fa-cloud-download', 'fa-cloud-upload' => 'fa-cloud-upload', 'fa-user-md' => 'fa-user-md', 'fa-stethoscope' => 'fa-stethoscope', 'fa-suitcase' => 'fa-suitcase', 'fa-bell-o' => 'fa-bell-o', 'fa-coffee' => 'fa-coffee', 'fa-cutlery' => 'fa-cutlery', 'fa-file-text-o' => 'fa-file-text-o', 'fa-building-o' => 'fa-building-o', 'fa-hospital-o' => 'fa-hospital-o', 'fa-ambulance' => 'fa-ambulance', 'fa-medkit' => 'fa-medkit', 'fa-fighter-jet' => 'fa-fighter-jet', 'fa-beer' => 'fa-beer', 'fa-h-square' => 'fa-h-square', 'fa-plus-square' => 'fa-plus-square', 'fa-angle-double-left' => 'fa-angle-double-left', 'fa-angle-double-right' => 'fa-angle-double-right', 'fa-angle-double-up' => 'fa-angle-double-up', 'fa-angle-double-down' => 'fa-angle-double-down', 'fa-angle-left' => 'fa-angle-left', 'fa-angle-right' => 'fa-angle-right', 'fa-angle-up' => 'fa-angle-up', 'fa-angle-down' => 'fa-angle-down', 'fa-desktop' => 'fa-desktop', 'fa-laptop' => 'fa-laptop', 'fa-tablet' => 'fa-tablet', 'fa-mobile' => 'fa-mobile', 'fa-circle-o' => 'fa-circle-o', 'fa-quote-left' => 'fa-quote-left', 'fa-quote-right' => 'fa-quote-right', 'fa-spinner' => 'fa-spinner', 'fa-circle' => 'fa-circle', 'fa-reply' => 'fa-reply', 'fa-github-alt' => 'fa-github-alt', 'fa-folder-o' => 'fa-folder-o', 'fa-folder-open-o' => 'fa-folder-open-o', 'fa-smile-o' => 'fa-smile-o', 'fa-frown-o' => 'fa-frown-o', 'fa-meh-o' => 'fa-meh-o', 'fa-gamepad' => 'fa-gamepad', 'fa-keyboard-o' => 'fa-keyboard-o', 'fa-flag-o' => 'fa-flag-o', 'fa-flag-checkered' => 'fa-flag-checkered', 'fa-terminal' => 'fa-terminal', 'fa-code' => 'fa-code', 'fa-reply-all' => 'fa-reply-all', 'fa-star-half-o' => 'fa-star-half-o', 'fa-location-arrow' => 'fa-location-arrow', 'fa-crop' => 'fa-crop', 'fa-code-fork' => 'fa-code-fork', 'fa-chain-broken' => 'fa-chain-broken', 'fa-question' => 'fa-question', 'fa-info' => 'fa-info', 'fa-exclamation' => 'fa-exclamation', 'fa-superscript' => 'fa-superscript', 'fa-subscript' => 'fa-subscript', 'fa-eraser' => 'fa-eraser', 'fa-puzzle-piece' => 'fa-puzzle-piece', 'fa-microphone' => 'fa-microphone', 'fa-microphone-slash' => 'fa-microphone-slash', 'fa-shield' => 'fa-shield', 'fa-calendar-o' => 'fa-calendar-o', 'fa-fire-extinguisher' => 'fa-fire-extinguisher', 'fa-rocket' => 'fa-rocket', 'fa-maxcdn' => 'fa-maxcdn', 'fa-chevron-circle-left' => 'fa-chevron-circle-left', 'fa-chevron-circle-right' => 'fa-chevron-circle-right', 'fa-chevron-circle-up' => 'fa-chevron-circle-up', 'fa-chevron-circle-down' => 'fa-chevron-circle-down', 'fa-html5' => 'fa-html5', 'fa-css3' => 'fa-css3', 'fa-anchor' => 'fa-anchor', 'fa-unlock-alt' => 'fa-unlock-alt', 'fa-bullseye' => 'fa-bullseye', 'fa-ellipsis-h' => 'fa-ellipsis-h', 'fa-ellipsis-v' => 'fa-ellipsis-v', 'fa-rss-square' => 'fa-rss-square', 'fa-play-circle' => 'fa-play-circle', 'fa-ticket' => 'fa-ticket', 'fa-minus-square' => 'fa-minus-square', 'fa-minus-square-o' => 'fa-minus-square-o', 'fa-level-up' => 'fa-level-up', 'fa-level-down' => 'fa-level-down', 'fa-check-square' => 'fa-check-square', 'fa-pencil-square' => 'fa-pencil-square', 'fa-external-link-square' => 'fa-external-link-square', 'fa-share-square' => 'fa-share-square', 'fa-compass' => 'fa-compass', 'fa-caret-square-o-down' => 'fa-caret-square-o-down', 'fa-caret-square-o-up' => 'fa-caret-square-o-up', 'fa-caret-square-o-right' => 'fa-caret-square-o-right', 'fa-eur' => 'fa-eur', 'fa-gbp' => 'fa-gbp', 'fa-usd' => 'fa-usd', 'fa-inr' => 'fa-inr', 'fa-jpy' => 'fa-jpy', 'fa-rub' => 'fa-rub', 'fa-krw' => 'fa-krw', 'fa-btc' => 'fa-btc', 'fa-file' => 'fa-file', 'fa-file-text' => 'fa-file-text', 'fa-sort-alpha-asc' => 'fa-sort-alpha-asc', 'fa-sort-alpha-desc' => 'fa-sort-alpha-desc', 'fa-sort-amount-asc' => 'fa-sort-amount-asc', 'fa-sort-amount-desc' => 'fa-sort-amount-desc', 'fa-sort-numeric-asc' => 'fa-sort-numeric-asc', 'fa-sort-numeric-desc' => 'fa-sort-numeric-desc', 'fa-thumbs-up' => 'fa-thumbs-up', 'fa-thumbs-down' => 'fa-thumbs-down', 'fa-youtube-square' => 'fa-youtube-square', 'fa-youtube' => 'fa-youtube', 'fa-xing' => 'fa-xing', 'fa-xing-square' => 'fa-xing-square', 'fa-youtube-play' => 'fa-youtube-play', 'fa-dropbox' => 'fa-dropbox', 'fa-stack-overflow' => 'fa-stack-overflow', 'fa-instagram' => 'fa-instagram', 'fa-flickr' => 'fa-flickr', 'fa-adn' => 'fa-adn', 'fa-bitbucket' => 'fa-bitbucket', 'fa-bitbucket-square' => 'fa-bitbucket-square', 'fa-tumblr' => 'fa-tumblr', 'fa-tumblr-square' => 'fa-tumblr-square', 'fa-long-arrow-down' => 'fa-long-arrow-down', 'fa-long-arrow-up' => 'fa-long-arrow-up', 'fa-long-arrow-left' => 'fa-long-arrow-left', 'fa-long-arrow-right' => 'fa-long-arrow-right', 'fa-apple' => 'fa-apple', 'fa-windows' => 'fa-windows', 'fa-android' => 'fa-android', 'fa-linux' => 'fa-linux', 'fa-dribbble' => 'fa-dribbble', 'fa-skype' => 'fa-skype', 'fa-foursquare' => 'fa-foursquare', 'fa-trello' => 'fa-trello', 'fa-female' => 'fa-female', 'fa-male' => 'fa-male', 'fa-gratipay' => 'fa-gratipay', 'fa-sun-o' => 'fa-sun-o', 'fa-moon-o' => 'fa-moon-o', 'fa-archive' => 'fa-archive', 'fa-bug' => 'fa-bug', 'fa-vk' => 'fa-vk', 'fa-weibo' => 'fa-weibo', 'fa-renren' => 'fa-renren', 'fa-pagelines' => 'fa-pagelines', 'fa-stack-exchange' => 'fa-stack-exchange', 'fa-arrow-circle-o-right' => 'fa-arrow-circle-o-right', 'fa-arrow-circle-o-left' => 'fa-arrow-circle-o-left', 'fa-caret-square-o-left' => 'fa-caret-square-o-left', 'fa-dot-circle-o' => 'fa-dot-circle-o', 'fa-wheelchair' => 'fa-wheelchair', 'fa-vimeo-square' => 'fa-vimeo-square', 'fa-try' => 'fa-try', 'fa-plus-square-o' => 'fa-plus-square-o', 'fa-space-shuttle' => 'fa-space-shuttle', 'fa-slack' => 'fa-slack', 'fa-envelope-square' => 'fa-envelope-square', 'fa-wordpress' => 'fa-wordpress', 'fa-openid' => 'fa-openid', 'fa-university' => 'fa-university', 'fa-graduation-cap' => 'fa-graduation-cap', 'fa-yahoo' => 'fa-yahoo', 'fa-google' => 'fa-google', 'fa-reddit' => 'fa-reddit', 'fa-reddit-square' => 'fa-reddit-square', 'fa-stumbleupon-circle' => 'fa-stumbleupon-circle', 'fa-stumbleupon' => 'fa-stumbleupon', 'fa-delicious' => 'fa-delicious', 'fa-digg' => 'fa-digg', 'fa-pied-piper-pp' => 'fa-pied-piper-pp', 'fa-pied-piper-alt' => 'fa-pied-piper-alt', 'fa-drupal' => 'fa-drupal', 'fa-joomla' => 'fa-joomla', 'fa-language' => 'fa-language', 'fa-fax' => 'fa-fax', 'fa-building' => 'fa-building', 'fa-child' => 'fa-child', 'fa-paw' => 'fa-paw', 'fa-spoon' => 'fa-spoon', 'fa-cube' => 'fa-cube', 'fa-cubes' => 'fa-cubes', 'fa-behance' => 'fa-behance', 'fa-behance-square' => 'fa-behance-square', 'fa-steam' => 'fa-steam', 'fa-steam-square' => 'fa-steam-square', 'fa-recycle' => 'fa-recycle', 'fa-car' => 'fa-car', 'fa-taxi' => 'fa-taxi', 'fa-tree' => 'fa-tree', 'fa-spotify' => 'fa-spotify', 'fa-deviantart' => 'fa-deviantart', 'fa-soundcloud' => 'fa-soundcloud', 'fa-database' => 'fa-database', 'fa-file-pdf-o' => 'fa-file-pdf-o', 'fa-file-word-o' => 'fa-file-word-o', 'fa-file-excel-o' => 'fa-file-excel-o', 'fa-file-powerpoint-o' => 'fa-file-powerpoint-o', 'fa-file-image-o' => 'fa-file-image-o', 'fa-file-archive-o' => 'fa-file-archive-o', 'fa-file-audio-o' => 'fa-file-audio-o', 'fa-file-video-o' => 'fa-file-video-o', 'fa-file-code-o' => 'fa-file-code-o', 'fa-vine' => 'fa-vine', 'fa-codepen' => 'fa-codepen', 'fa-jsfiddle' => 'fa-jsfiddle', 'fa-life-ring' => 'fa-life-ring', 'fa-circle-o-notch' => 'fa-circle-o-notch', 'fa-rebel' => 'fa-rebel', 'fa-empire' => 'fa-empire', 'fa-git-square' => 'fa-git-square', 'fa-git' => 'fa-git', 'fa-hacker-news' => 'fa-hacker-news', 'fa-tencent-weibo' => 'fa-tencent-weibo', 'fa-qq' => 'fa-qq', 'fa-weixin' => 'fa-weixin', 'fa-paper-plane' => 'fa-paper-plane', 'fa-paper-plane-o' => 'fa-paper-plane-o', 'fa-history' => 'fa-history', 'fa-circle-thin' => 'fa-circle-thin', 'fa-header' => 'fa-header', 'fa-paragraph' => 'fa-paragraph', 'fa-sliders' => 'fa-sliders', 'fa-share-alt' => 'fa-share-alt', 'fa-share-alt-square' => 'fa-share-alt-square', 'fa-bomb' => 'fa-bomb', 'fa-futbol-o' => 'fa-futbol-o', 'fa-tty' => 'fa-tty', 'fa-binoculars' => 'fa-binoculars', 'fa-plug' => 'fa-plug', 'fa-slideshare' => 'fa-slideshare', 'fa-twitch' => 'fa-twitch', 'fa-yelp' => 'fa-yelp', 'fa-newspaper-o' => 'fa-newspaper-o', 'fa-wifi' => 'fa-wifi', 'fa-calculator' => 'fa-calculator', 'fa-paypal' => 'fa-paypal', 'fa-google-wallet' => 'fa-google-wallet', 'fa-cc-visa' => 'fa-cc-visa', 'fa-cc-mastercard' => 'fa-cc-mastercard', 'fa-cc-discover' => 'fa-cc-discover', 'fa-cc-amex' => 'fa-cc-amex', 'fa-cc-paypal' => 'fa-cc-paypal', 'fa-cc-stripe' => 'fa-cc-stripe', 'fa-bell-slash' => 'fa-bell-slash', 'fa-bell-slash-o' => 'fa-bell-slash-o', 'fa-trash' => 'fa-trash', 'fa-copyright' => 'fa-copyright', 'fa-at' => 'fa-at', 'fa-eyedropper' => 'fa-eyedropper', 'fa-paint-brush' => 'fa-paint-brush', 'fa-birthday-cake' => 'fa-birthday-cake', 'fa-area-chart' => 'fa-area-chart', 'fa-pie-chart' => 'fa-pie-chart', 'fa-line-chart' => 'fa-line-chart', 'fa-lastfm' => 'fa-lastfm', 'fa-lastfm-square' => 'fa-lastfm-square', 'fa-toggle-off' => 'fa-toggle-off', 'fa-toggle-on' => 'fa-toggle-on', 'fa-bicycle' => 'fa-bicycle', 'fa-bus' => 'fa-bus', 'fa-ioxhost' => 'fa-ioxhost', 'fa-angellist' => 'fa-angellist', 'fa-cc' => 'fa-cc', 'fa-ils' => 'fa-ils', 'fa-meanpath' => 'fa-meanpath', 'fa-buysellads' => 'fa-buysellads', 'fa-connectdevelop' => 'fa-connectdevelop', 'fa-dashcube' => 'fa-dashcube', 'fa-forumbee' => 'fa-forumbee', 'fa-leanpub' => 'fa-leanpub', 'fa-sellsy' => 'fa-sellsy', 'fa-shirtsinbulk' => 'fa-shirtsinbulk', 'fa-simplybuilt' => 'fa-simplybuilt', 'fa-skyatlas' => 'fa-skyatlas', 'fa-cart-plus' => 'fa-cart-plus', 'fa-cart-arrow-down' => 'fa-cart-arrow-down', 'fa-diamond' => 'fa-diamond', 'fa-ship' => 'fa-ship', 'fa-user-secret' => 'fa-user-secret', 'fa-motorcycle' => 'fa-motorcycle', 'fa-street-view' => 'fa-street-view', 'fa-heartbeat' => 'fa-heartbeat', 'fa-venus' => 'fa-venus', 'fa-mars' => 'fa-mars', 'fa-mercury' => 'fa-mercury', 'fa-transgender' => 'fa-transgender', 'fa-transgender-alt' => 'fa-transgender-alt', 'fa-venus-double' => 'fa-venus-double', 'fa-mars-double' => 'fa-mars-double', 'fa-venus-mars' => 'fa-venus-mars', 'fa-mars-stroke' => 'fa-mars-stroke', 'fa-mars-stroke-v' => 'fa-mars-stroke-v', 'fa-mars-stroke-h' => 'fa-mars-stroke-h', 'fa-neuter' => 'fa-neuter', 'fa-genderless' => 'fa-genderless', 'fa-facebook-official' => 'fa-facebook-official', 'fa-pinterest-p' => 'fa-pinterest-p', 'fa-whatsapp' => 'fa-whatsapp', 'fa-server' => 'fa-server', 'fa-user-plus' => 'fa-user-plus', 'fa-user-times' => 'fa-user-times', 'fa-bed' => 'fa-bed', 'fa-viacoin' => 'fa-viacoin', 'fa-train' => 'fa-train', 'fa-subway' => 'fa-subway', 'fa-medium' => 'fa-medium', 'fa-y-combinator' => 'fa-y-combinator', 'fa-optin-monster' => 'fa-optin-monster', 'fa-opencart' => 'fa-opencart', 'fa-expeditedssl' => 'fa-expeditedssl', 'fa-battery-full' => 'fa-battery-full', 'fa-battery-three-quarters' => 'fa-battery-three-quarters', 'fa-battery-half' => 'fa-battery-half', 'fa-battery-quarter' => 'fa-battery-quarter', 'fa-battery-empty' => 'fa-battery-empty', 'fa-mouse-pointer' => 'fa-mouse-pointer', 'fa-i-cursor' => 'fa-i-cursor', 'fa-object-group' => 'fa-object-group', 'fa-object-ungroup' => 'fa-object-ungroup', 'fa-sticky-note' => 'fa-sticky-note', 'fa-sticky-note-o' => 'fa-sticky-note-o', 'fa-cc-jcb' => 'fa-cc-jcb', 'fa-cc-diners-club' => 'fa-cc-diners-club', 'fa-clone' => 'fa-clone', 'fa-balance-scale' => 'fa-balance-scale', 'fa-hourglass-o' => 'fa-hourglass-o', 'fa-hourglass-start' => 'fa-hourglass-start', 'fa-hourglass-half' => 'fa-hourglass-half', 'fa-hourglass-end' => 'fa-hourglass-end', 'fa-hourglass' => 'fa-hourglass', 'fa-hand-rock-o' => 'fa-hand-rock-o', 'fa-hand-paper-o' => 'fa-hand-paper-o', 'fa-hand-scissors-o' => 'fa-hand-scissors-o', 'fa-hand-lizard-o' => 'fa-hand-lizard-o', 'fa-hand-spock-o' => 'fa-hand-spock-o', 'fa-hand-pointer-o' => 'fa-hand-pointer-o', 'fa-hand-peace-o' => 'fa-hand-peace-o', 'fa-trademark' => 'fa-trademark', 'fa-registered' => 'fa-registered', 'fa-creative-commons' => 'fa-creative-commons', 'fa-gg' => 'fa-gg', 'fa-gg-circle' => 'fa-gg-circle', 'fa-tripadvisor' => 'fa-tripadvisor', 'fa-odnoklassniki' => 'fa-odnoklassniki', 'fa-odnoklassniki-square' => 'fa-odnoklassniki-square', 'fa-get-pocket' => 'fa-get-pocket', 'fa-wikipedia-w' => 'fa-wikipedia-w', 'fa-safari' => 'fa-safari', 'fa-chrome' => 'fa-chrome', 'fa-firefox' => 'fa-firefox', 'fa-opera' => 'fa-opera', 'fa-internet-explorer' => 'fa-internet-explorer', 'fa-television' => 'fa-television', 'fa-contao' => 'fa-contao', 'fa-500px' => 'fa-500px', 'fa-amazon' => 'fa-amazon', 'fa-calendar-plus-o' => 'fa-calendar-plus-o', 'fa-calendar-minus-o' => 'fa-calendar-minus-o', 'fa-calendar-times-o' => 'fa-calendar-times-o', 'fa-calendar-check-o' => 'fa-calendar-check-o', 'fa-industry' => 'fa-industry', 'fa-map-pin' => 'fa-map-pin', 'fa-map-signs' => 'fa-map-signs', 'fa-map-o' => 'fa-map-o', 'fa-map' => 'fa-map', 'fa-commenting' => 'fa-commenting', 'fa-commenting-o' => 'fa-commenting-o', 'fa-houzz' => 'fa-houzz', 'fa-vimeo' => 'fa-vimeo', 'fa-black-tie' => 'fa-black-tie', 'fa-fonticons' => 'fa-fonticons', 'fa-reddit-alien' => 'fa-reddit-alien', 'fa-edge' => 'fa-edge', 'fa-credit-card-alt' => 'fa-credit-card-alt', 'fa-codiepie' => 'fa-codiepie', 'fa-modx' => 'fa-modx', 'fa-fort-awesome' => 'fa-fort-awesome', 'fa-usb' => 'fa-usb', 'fa-product-hunt' => 'fa-product-hunt', 'fa-mixcloud' => 'fa-mixcloud', 'fa-scribd' => 'fa-scribd', 'fa-pause-circle' => 'fa-pause-circle', 'fa-pause-circle-o' => 'fa-pause-circle-o', 'fa-stop-circle' => 'fa-stop-circle', 'fa-stop-circle-o' => 'fa-stop-circle-o', 'fa-shopping-bag' => 'fa-shopping-bag', 'fa-shopping-basket' => 'fa-shopping-basket', 'fa-hashtag' => 'fa-hashtag', 'fa-bluetooth' => 'fa-bluetooth', 'fa-bluetooth-b' => 'fa-bluetooth-b', 'fa-percent' => 'fa-percent', 'fa-gitlab' => 'fa-gitlab', 'fa-wpbeginner' => 'fa-wpbeginner', 'fa-wpforms' => 'fa-wpforms', 'fa-envira' => 'fa-envira', 'fa-universal-access' => 'fa-universal-access', 'fa-wheelchair-alt' => 'fa-wheelchair-alt', 'fa-question-circle-o' => 'fa-question-circle-o', 'fa-blind' => 'fa-blind', 'fa-audio-description' => 'fa-audio-description', 'fa-volume-control-phone' => 'fa-volume-control-phone', 'fa-braille' => 'fa-braille', 'fa-assistive-listening-systems' => 'fa-assistive-listening-systems', 'fa-american-sign-language-interpreting' => 'fa-american-sign-language-interpreting', 'fa-deaf' => 'fa-deaf', 'fa-glide' => 'fa-glide', 'fa-glide-g' => 'fa-glide-g', 'fa-sign-language' => 'fa-sign-language', 'fa-low-vision' => 'fa-low-vision', 'fa-viadeo' => 'fa-viadeo', 'fa-viadeo-square' => 'fa-viadeo-square', 'fa-snapchat' => 'fa-snapchat', 'fa-snapchat-ghost' => 'fa-snapchat-ghost', 'fa-snapchat-square' => 'fa-snapchat-square', 'fa-pied-piper' => 'fa-pied-piper', 'fa-first-order' => 'fa-first-order', 'fa-yoast' => 'fa-yoast', 'fa-themeisle' => 'fa-themeisle', 'fa-google-plus-official' => 'fa-google-plus-official', 'fa-font-awesome' => 'fa-font-awesome'\n\t);\n return $icons;\n}", "title": "" }, { "docid": "640fb605f6a64a4139e46c2260509a57", "score": "0.5550352", "text": "function bloggy_get_icon($icon): string\n{\n return BloggyIcons::getIcon($icon);\n}", "title": "" }, { "docid": "24ae8586964ba88fb07c11c4cc971504", "score": "0.55430186", "text": "public function insert_favicons() {\n\t\t?>\n\t\t<?php if ( '' !== Avada()->settings->get( 'favicon', 'url' ) ) : ?>\n\t\t\t<link rel=\"shortcut icon\" href=\"<?php echo esc_url_raw( Avada()->settings->get( 'favicon', 'url' ) ); ?>\" type=\"image/x-icon\" />\n\t\t<?php endif; ?>\n\n\t\t<?php if ( '' !== Avada()->settings->get( 'iphone_icon', 'url' ) ) : ?>\n\t\t\t<!-- For iPhone -->\n\t\t\t<link rel=\"apple-touch-icon\" href=\"<?php echo esc_url_raw( Avada()->settings->get( 'iphone_icon', 'url' ) ); ?>\">\n\t\t<?php endif; ?>\n\n\t\t<?php if ( '' !== Avada()->settings->get( 'iphone_icon_retina', 'url' ) ) : ?>\n\t\t\t<!-- For iPhone Retina display -->\n\t\t\t<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"<?php echo esc_url_raw( Avada()->settings->get( 'iphone_icon_retina', 'url' ) ); ?>\">\n\t\t<?php endif; ?>\n\n\t\t<?php if ( '' !== Avada()->settings->get( 'ipad_icon', 'url' ) ) : ?>\n\t\t\t<!-- For iPad -->\n\t\t\t<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"<?php echo esc_url_raw( Avada()->settings->get( 'ipad_icon', 'url' ) ); ?>\">\n\t\t<?php endif; ?>\n\n\t\t<?php if ( '' !== Avada()->settings->get( 'ipad_icon_retina', 'url' ) ) : ?>\n\t\t\t<!-- For iPad Retina display -->\n\t\t\t<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"<?php echo esc_url_raw( Avada()->settings->get( 'ipad_icon_retina', 'url' ) ); ?>\">\n\t\t<?php endif; ?>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "ffafbc3115de43b96d3f971fe1b8d057", "score": "0.55387145", "text": "public function fontIcon(string $icon, string $color = null, string $class = null, string $category = null) : string\n {\n if ($color) {\n $color = ' style=\"color: '.$color.'\"';\n }\n\n if (! $category) {\n $category = 'fas';\n\n // Brand icons have their own category class. The only way to find out which class\n // we have to use is to maintain a list with the names of all brand icons and then\n // to check if the current icon name is in this list.\n if (in_array($icon, $this->getBrandIconNames())) {\n $category = 'fab';\n }\n }\n\n return '<i class=\"'.$category.' fa-'.$icon.' '.$class.'\"'.$color.'></i>';\n }", "title": "" } ]
d852edb47e98d37a474125022193e73b
Seed the content relations of a content
[ { "docid": "ee7fa61803c51615227d038b4f98b5bc", "score": "0.6306566", "text": "protected function seedRelations($content_id, $relations)\n {\n // Loop through the sets of relations, first index is the relation type, the second index is the relation value\n collect($relations)->each(function ($relation) use ($content_id) {\n\n $relation_type_record = content_id($relation[0]);//Content::where('key', $relation[0])->first();\n $relation_record = content_id($relation[1]);\n\n if (!$relation_type_record || !$relation_record) {\n return false;\n }\n\n (new ContentRelation([\n 'content_id' => $content_id,\n 'relation_type_id' => $relation_type_record,\n 'relation_id' => $relation_record,\n ]))->save();\n });\n\n return;\n }", "title": "" } ]
[ { "docid": "e9ca3be063582776fcb702249ab9a2dd", "score": "0.59045416", "text": "protected function seedStructure($databaseStructure)\n {\n $relations = [];\n\n collect($databaseStructure)->each(function ($databaseItem) use (&$relations) {\n\n $databaseItemProperties = collect($databaseItem);\n\n $recordData = $databaseItemProperties->except(['meta', 'relations'])->all();\n\n // Create the new record\n $record = (new Content)->create($recordData);\n\n // Save the relationship data\n $this->seedMeta($record, $databaseItemProperties->get('meta'));\n\n $relations[$record->id] = $databaseItemProperties->get('relations');\n });\n\n foreach ($relations as $id => $relation) {\n $this->seedRelations($id, $relation);\n }\n\n return;\n }", "title": "" }, { "docid": "6524f6163536937dfd794c8cd009bff1", "score": "0.5812819", "text": "public function run()\n {\n $content = Content::firstOrNew([\n 'key' => 'apa-itu-pintaria',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'apa-itu-pintaria',\n 'title' => 'APA ITU PINTARIA?',\n 'description' => 'PINTARIA ADALAH SEBUAH SITUS YANG MENAWARKAN PRODUK-PRODUK PENDIDIKAN DAN PELATIHAN YANG BERKUALITAS DENGAN BERBAGAI MACAM KATEGORI YANG DITUJUKAN UNTUK MASYARAKAT YANG INGIN MENINGKATKAN PENGETAHUAN DAN KEAHLIAN.'\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'tambah-pintar-dalam-60-detik',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'tambah-pintar-dalam-60-detik',\n 'title' => 'TAMBAH PINTAR DALAM 60 DETIK',\n 'description' => ''\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'punya-waktu-lebih-banyak',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'punya-waktu-lebih-banyak',\n 'title' => 'PUNYA WAKTU LEBIH BANYAK?',\n 'description' => ''\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'jadilah-partner-kami',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'jadilah-partner-kami',\n 'title' => 'JADILAH PARTNER KAMI!',\n 'description' => 'Anda menyelenggarakan program pendidikan atau kursus/pelatihan dan ingin menjangkau lebih banyak orang melalui e-learning? Hubungi kami untuk mendiskusikan kemungkinan kerjasama!'\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'ingin-informasi-lebih-lengkap',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'ingin-informasi-lebih-lengkap',\n 'title' => 'INGIN INFORMASI LEBIH LENGKAP?',\n 'description' => 'Anda ingin mendapatkan informasi lengkap seputar program kuliah atau kursus/pelatihan? Silahkan lengkapi formulir di bawah ini dan kami akan menghubungi Anda kembali.'\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'berlangganan-newsletter',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'berlangganan-newsletter',\n 'title' => 'BERLANGGANAN NEWSLETTER',\n 'description' => 'Dapatkan informasi terkini mengenai program kuliah dan kursus/pelatihan serta promosi yang kami tawarkan.'\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'homepage-seo-description',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'homepage-seo-description',\n 'title' => '',\n 'description' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed elit diam nonummy nibh euismod tincidunt ut laoreet dolore magna aluam erat volutpat. Ut wisi enim ad minim veniam quis nostrud exerci et tation diam nisl ut aliquip ex ea commodo consequat euismod tincidunt ut laoreet dolore magna aluam.\n\n Lorem ipsum dolor sit amet, consectetuer euismod tincidunt ut laoreet dolore magna aluam erat volutpat. Ut wisi enim ad minim veniam quis nostrud exerci et tation diam nisl ut aliquip ex ea commodo consequat euismod tincidunt ut laoreet dolore magna aluam.\n\n Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed elit diam nonummy nibh euismod tincidunt ut laoreet dolore.'\n ])->save();\n }\n\n $content = Content::firstOrNew([\n 'key' => 'search-placeholder',\n ]);\n if (!$content->exists) {\n $content->fill([\n 'key' => 'search-placeholder',\n 'title' => 'SEARCH PLACEHOLDER',\n 'description' => 'Coba ketik \"Data Science\"'\n ])->save();\n }\n }", "title": "" }, { "docid": "4d4bff89c8a6a4a7dbc09152f7fc2e4b", "score": "0.58106035", "text": "public function run()\n {\n //\n// DB::table('contents')->insert([\n// 'name' => $faker->name,\n// 'desc' => 'desc',\n// 'id_catagory' => rand(1, 10),\n// 'id_publisher' => rand(1, 20)\n// ]);\n \n factory(App\\Content::class, 10)->create()->each(function ($u) {\n $u->image()->save(factory(App\\ContentImage::class)->make());\n });\n }", "title": "" }, { "docid": "6db1282e6b614eb2d2439a0e8a7495dc", "score": "0.56524885", "text": "public function contents()\n {\n return $this->hasMany(Content::class);\n }", "title": "" }, { "docid": "619150475a35d299bc3e68869ff34887", "score": "0.56156456", "text": "protected function seedMeta($content, $meta = [])\n {\n if(is_null($meta)) {\n $meta = [];\n }\n\n if(!array_key_exists('author_id', $meta)) {\n $meta['author_id'] = 1;\n }\n\n foreach ($meta as $key => $value) {\n $metaRecord = (new ContentMeta(['language' => \\App::getLocale(), 'key' => $key, 'value' => $value]));\n\n $content->meta()->save($metaRecord);\n\n $metaRecord->save();\n }\n\n return;\n }", "title": "" }, { "docid": "8ff7186dfa2faf678bc259d1d816d8ee", "score": "0.56089664", "text": "public function load_content() {\t\n\t\tif ($this->content_list != null) {\n\t\t\treturn;\n\t\t}\n\t\t$this->content_list = array();\n\t\tif ($this->loaded()) {\n\t\t\t$list = ORM::factory('content')\n\t\t\t->join('submission_contents','LEFT')\n\t\t\t->on('content.id','=','submission_contents.content_id')\n\t\t\t->where('submission_contents.submission_id' ,'=', $this->id)\n\t\t\t->find_all();\n\t\t\tforeach($list as $content) {\n\t\t\t\t$this->content_list[] = $content;\n\t\t\t}\n }\n\t}", "title": "" }, { "docid": "a50f37b8e69face9f2502a79e6043f8f", "score": "0.5588091", "text": "public function run()\n {\n DB::table('news')->truncate();\n DB::table('news_language')->truncate();\n \n factory(News::class, 5)\n ->create()\n ->each(function($news) {\n $faker = Factory::create();\n\n foreach (Language::all() as $key => $language) {\n $news->languages()->attach(\n $language->id, \n [\n 'title' => $faker->sentence, \n 'description' => $faker->paragraph\n ]\n );\n }\n });\n }", "title": "" }, { "docid": "b5c150aa0acd14b5572b49a769c422ba", "score": "0.55824107", "text": "public static function run()\n {\n DB::table(static::$table)->truncate();\n\n /**\n * Page translations\n *\n */\n $page_groups = [\n [1, 2, 3],\n [4, 5, 6],\n [7, 8, 9],\n ];\n\n foreach ($page_groups as $page_group) {\n foreach ($page_group as $page_id) {\n foreach (Page::find($page_group) as $translation) {\n Page::attachTranslation($page_id, $translation->id, $translation->language_code);\n }\n }\n }\n\n /**\n * Article categories\n *\n */\n foreach (Article::get() as $article) {\n for ($i = 0; $i < rand(0, 10); $i++) {\n $category = Category::where('content_type_id', $article->content_type_id)->inRandomOrder()->first();\n\n if ($category) {\n Relationship::updateOrCreate([\n 'source_id' => $article->id,\n 'target_id' => $category->id,\n 'key' => config('constants.relationships.category.article'),\n ]);\n }\n }\n }\n }", "title": "" }, { "docid": "f8f1cf9485c715668b38bd0832f6f4cc", "score": "0.55615675", "text": "public function run()\n\t{\n\t\tfactory(Article::class, 100)->create()->each(function(Article $article) {\n\t\t\t$article->category()->saveMany(factory(Article::class, random_int(0, 3))->create());\n\t\t\t$article->author()->saveMany(factory(Article::class, random_int(0, 1))->create());\n\t\t\t});\n\t}", "title": "" }, { "docid": "c3b8f7fb828bd167b375350c3a16fa23", "score": "0.55365676", "text": "public function run()\n {\n DB::table('pages_content')->insert([\n ['page_id' => 1, 'type_id' => 1, 'name' => 'Title', 'order' => 0],\n ['page_id' => 1, 'type_id' => 2, 'name' => 'Content', 'order' => 1],\n\n ['page_id' => 2, 'type_id' => 1, 'name' => 'Title', 'order' => 0],\n ['page_id' => 2, 'type_id' => 2, 'name' => 'Content', 'order' => 1],\n\n ['page_id' => 3, 'type_id' => 1, 'name' => 'Title', 'order' => 0],\n ['page_id' => 3, 'type_id' => 2, 'name' => 'Content', 'order' => 1],\n\n ['page_id' => 4, 'type_id' => 1, 'name' => 'Title', 'order' => 0],\n ['page_id' => 4, 'type_id' => 2, 'name' => 'Content', 'order' => 1],\n ]);\n }", "title": "" }, { "docid": "a33d92490069dbf765089a441309076f", "score": "0.546842", "text": "public function setUp(): void\n {\n $this->contentRepository->setUp();\n $csId = ContentStreamId::fromString('live');\n\n if (!$this->contentRepository->getContentStreamFinder()->hasContentStream($csId)) {\n $this->contentRepository->handle(new CreateContentStream($csId))->block();\n }\n\n $tagsNode = $this->subgraph()->findNodeById(self::tagsNodeId());\n if ($tagsNode === null) {\n $this->contentRepository->handle(new CreateRootNodeAggregateWithNode(\n $csId,\n self::tagsNodeId(),\n AssetNodeTypes::Tags->name(),\n ));\n }\n\n $assetsRootNode = $this->subgraph()->findNodeById(self::assetsRootNodeId());\n if ($assetsRootNode === null) {\n $this->contentRepository->handle(new CreateRootNodeAggregateWithNode(\n $csId,\n self::assetsRootNodeId(),\n AssetNodeTypes::Assets->name(),\n ))->block();\n }\n }", "title": "" }, { "docid": "79a51b904a4b2b572174017fbafce0a8", "score": "0.5455522", "text": "public function createDomainContent() {\n foreach ($this->domains as $id => $domain) {\n for ($i = 0; $i < 5; $i++) {\n $this->drupalCreateNode([\n 'type' => 'article',\n DomainAccessManagerInterface::DOMAIN_ACCESS_FIELD => [$id],\n DomainAccessManagerInterface::DOMAIN_ACCESS_ALL_FIELD => ($id == 'one_example_com') ? 1 : 0,\n ]);\n }\n }\n // Rebuild node access rules.\n node_access_rebuild();\n }", "title": "" }, { "docid": "9dc718d46c7e2f89020175d11ead151c", "score": "0.54554445", "text": "public function run()\n {\n Post::find(1)->sections()->attach([1,2]);\n Post::find(2)->sections()->attach([2,3]);\n Post::find(3)->sections()->attach([3,4]);\n Post::find(4)->sections()->attach([4,1]);\n Post::find(5)->sections()->attach([1,2]);\n Post::find(6)->sections()->attach([2,3]);\n Post::find(7)->sections()->attach([3,4]);\n Post::find(8)->sections()->attach([4,1]);\n Post::find(9)->sections()->attach([1,2]);\n Post::find(10)->sections()->attach([2,3]);\n }", "title": "" }, { "docid": "df50743fee31fbbd2269a778dc6656c1", "score": "0.5452388", "text": "public function run()\n {\n factory(App\\Article::class, 5)\n ->create()\n ->each(function ($u) {\n $u->comments()->save(factory(App\\Comment::class)->create());\n });\n factory(App\\People::class, 2)->create();\n\n factory(App\\Article::class, 3)->create();\n }", "title": "" }, { "docid": "fe0574170664a330930338927e7bac64", "score": "0.5418922", "text": "public function run()\n {\n \tfactory(App\\Major::class, 5)->create()->each(function ($major) {\n // Seed the relation with 3 subcategories\n $subjects = factory(App\\Subject::class, 3)->make();\n $major->subjects()->saveMany($subjects);\n });\n \t\n \n }", "title": "" }, { "docid": "4e776a726e04e0922855ca9146df7445", "score": "0.5351163", "text": "public function update() {\n $contentDescriptionList = $this->get_content_description_list();\n if (sizeof($contentDescriptionList) > 0) {\n foreach($contentDescriptionList as $contentDescription) {\n if ($contentDescription->get_content_description_id() == 0) {\n $contentDescription->set_content_id($this->get_content_id());\n $contentDescription->insert();\n }else {\n $contentDescription->update();\n }\n }\n }\n }", "title": "" }, { "docid": "2516647725cd07eda82edf50190cbc66", "score": "0.534015", "text": "public function run()\n {\n factory(Page::class)->create([\n 'slug' => 'article-1',\n 'link' => 'blog/article-1',\n ]);\n\n factory(Page::class)->create([\n 'slug' => 'article-10',\n 'link' => 'blog/article-10',\n ]);\n\n $parentPage = factory(Page::class)->create([\n 'slug' => 'page-1',\n 'link' => 'page-1',\n 'title' => 'Parent page',\n ]);\n\n $this->createChildren($parentPage);\n \n // Will be published\n factory(Page::class, 5)->create([\n 'published_at' => new DateTime('tomorrow'),\n 'keywords_tag' => 'tomorrow',\n ]);\n\n factory(Page::class, 10)->create([\n 'keywords_tag' => 'other',\n ]);\n\n $pageWithManyChildren = factory(Page::class)->create([\n 'slug' => 'page-children',\n 'link' => 'page-children',\n 'title' => 'Parent page',\n ]);\n\n $this->createManyChildren($pageWithManyChildren, 2, 5);\n }", "title": "" }, { "docid": "130a47748ad73cfbedc98847c2c60dfb", "score": "0.53314745", "text": "public function testRecipesRelationship()\n {\n $recipeDietType = factory(RecipeDietType::class)->create();\n $this->assertEquals(0, $recipeDietType->recipes->count());\n\n // attaching models\n $recipe = factory(Recipe::class)->create();\n $recipeDietType->recipes()->save($recipe);\n $recipeDietType->save();\n \n // reload the relationship\n $recipeDietType->load('recipes');\n\n // all the associated models are related\n $this->assertEquals(1, $recipeDietType->recipes->count());\n }", "title": "" }, { "docid": "2eb71b58f8f9ab8b200aac34f6637cfc", "score": "0.5327191", "text": "public function run()\n\t{\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\t$users = \\Ibec\\Acl\\User::lists('id');\n\n\t\t$allCategories = [];\n\t\t$rootCategories = [];\n\n\t\tforeach (['Articles', 'News', 'Blog', 'Pages'] as $rootName)\n\t\t{\n\t\t\t$root = new \\Ibec\\Content\\Root();\n\t\t\t$root->getConnection()->beginTransaction();\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$category = new \\Ibec\\Content\\Category();\n\t\t\t\t$category->save();\n\t\t\t\t$category->makeRoot();\n\n\t\t\t\t$root->slug = str_slug($rootName);\n\t\t\t\t$root->title = ['en' => $rootName];\n\t\t\t\t$root->id = $category->id;\n\t\t\t\t$root->save();\n\n\t\t\t\t$node = $category->en;\n\n\t\t\t\t$ok = $node->fill([\n\t\t\t\t\t'category_id' => $category->id,\n\t\t\t\t\t'language_id' => 'en',\n\t\t\t\t\t'title' => $rootName,\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'slug' => str_slug($rootName)\n\t\t\t\t]);\n\t\t\t}\n\t\t\tcatch (\\Exception $e)\n\t\t\t{\n\t\t\t\t$root->getConnection()->rollback();\n\t\t\t\t$this->command->error($e->getMessage());\n\t\t\t\t$ok = false;\n\t\t\t}\n\n\t\t\tif ($ok)\n\t\t\t{\n\t\t\t\t$rootCategories[$category->id] = $category;\n\t\t\t\t$allCategories[] = $category->id;\n\t\t\t\t$root->getConnection()->commit();\n\t\t\t}\n\t\t}\n\n\t\tforeach($rootCategories as $id => $rootCategory)\n\t\t{\n\t\t\t$children = [];\n\t\t\tfor ($i = 0; $i < 20; $i ++)\n\t\t\t{\n\t\t\t\t$child = new \\Ibec\\Content\\Category();\n\t\t\t\t$child->getConnection()->beginTransaction();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$child->save();\n\n\t\t\t\t\tif (empty($children) || rand(0, 3) < 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$child->makeChildOf($rootCategory);\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$child->makeChildOf($children[array_rand($children)]);\n\t\t\t\t\t}\n\n\t\t\t\t\t$name = $faker->city;\n\n\t\t\t\t\t$node = $child->en;\n\t\t\t\t\t$ok = $node->fill([\n\t\t\t\t\t\t'category_id' => $child->id,\n\t\t\t\t\t\t'language_id' => 'en',\n\t\t\t\t\t\t'title' => $name,\n\t\t\t\t\t\t'description' => $faker->text,\n\t\t\t\t\t\t'slug' => str_slug($name)\n\t\t\t\t\t])->save();\n\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\t$child->getConnection()->rollback();\n\t\t\t\t\t$this->command->error($e->getMessage());\n\t\t\t\t\t$ok = false;\n\t\t\t\t}\n\n\t\t\t\tif ($ok)\n\t\t\t\t{\n\t\t\t\t\t$allCategories[] = $child->id;\n\t\t\t\t\t$child->getConnection()->commit();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor ($i = 0; $i < 0; $i++)\n\t\t{\n\t\t\t$post = new \\Ibec\\Content\\Post();\n\t\t\t$post->getConnection()->beginTransaction();\n\t\t\ttry {\n\n\t\t\t\t$post->fill([\n\t\t\t\t\t'user_id' => $users[array_rand($users)],\n\t\t\t\t\t'category_id' => $allCategories[array_rand($allCategories)],\n\t\t\t\t])->save();\n\n\t\t\t\t$node = $post->en;\n\n\t\t\t\t$name = $faker->sentence;\n\n\t\t\t\t$ok = $node->fill([\n\t\t\t\t\t'post_id' => $post->id,\n\t\t\t\t\t'language_id' => 'en',\n\t\t\t\t\t'slug' => str_slug($name),\n\t\t\t\t\t'title' => $name,\n\t\t\t\t\t'teaser' => $faker->text(150),\n\t\t\t\t\t'content' => $faker->text(500),\n\t\t\t\t])->save();\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$post->getConnection()->rollBack();\n\t\t\t\t$this->command->error($e->getMessage());\n\t\t\t\t$ok = false;\n\t\t\t}\n\n\t\t\tif ($ok)\n\t\t\t{\n\t\t\t\t$post->getConnection()->commit();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1fca47983d21fd1e4d738c8c45de6485", "score": "0.53039145", "text": "public function run()\n {\n // $defaultPostType = ['tutu', 'yoyo', 'haha'];\n // foreach ($defaultPostType as $idx => $postType) {\n // echo $idx; \n // try {\n // PostTypeEloquent::create([\n // 'name' => $postType,\n // 'id' => $idx + 1,\n // ]);\n // } catch (Exception $e) {\n // echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n // }\n // }\n $postTypes = factory(PostTypeEloquent::class, 6)->create();\n $users = factory(UserEloquent::class, 20)->create()->each(function ($user) {\n // $user->posts()->save(factory(PostEloquent::class)->make());\n // collect(range(1, 3))->each(function () use ($user) {\n // $user->posts()->save(factory(PostEloquent::class)->make());\n // });\n });\n $posts = factory(PostEloquent::class, 20)->make()->each(function ($post) use ($postTypes, $users) {\n $post->user_id = $users[mt_rand(0, count($users) - 1)]->id;\n $post->type = $postTypes[mt_rand(0, count($postTypes) - 1)]->id;\n $post->save();\n });\n $contents = factory(CommentEloquent::class, 20)->make()->each(function ($comment) use ($posts, $users) {\n $comment->user_id = $users[mt_rand(0, count($users) - 1)]->id;\n $comment->post_id = $posts[mt_rand(0, count($posts) - 1)]->id;\n $comment->save();\n });\n }", "title": "" }, { "docid": "ee05d32ff11250834a2a48d50f5ebaa9", "score": "0.5292615", "text": "public function run()\n {\n $products = Product::all()->pluck('id')->toArray();\n\n $posts = Post::all()->pluck('id')->toArray();\n\n $pp = [];\n while (count($pp) < 10) {\n $pp[] = [\n 'product_id' => array_random($products),\n 'post_id' => array_random($posts)\n ];\n }\n\n DB::table('product_post_relations')->insert($pp);\n }", "title": "" }, { "docid": "2a1a72b52210b00d2ac18eeda7d53bcb", "score": "0.52889097", "text": "public function initialize()\n {\n // \n $this->setSource(\"meta\");\n $this->hasMany('id', 'WC\\Models\\BlogMeta', 'meta_id', ['alias' => 'BlogMeta']);\n }", "title": "" }, { "docid": "6b2493de5fea9a371dd5078ec9616986", "score": "0.5272527", "text": "public function run() {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Article::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'category_id' => Category::all()->random()->id,\n 'user_id' => User::where('name', '!=', 'administrator')->get()->random()->id\n ]);\n }\n }", "title": "" }, { "docid": "0ca3f9b632672cddcfd0a41c42fbf875", "score": "0.5269158", "text": "public function seedAuthors()\n {\n //Databaseen datuak ezabatzeko\n DB::table('authors')->delete();\n\n //\n foreach( $this->arrayAutores as $autor ) {\n \t\t$p = new Author;\n\t\t $p->nom_autor = $autor['nom_autor'];\n\t\t $p->des_autor = $autor['des_autor'];\n\t\t $p->save();\n\t\t}\n }", "title": "" }, { "docid": "d7a2d84ae2460d9492b81d2a473057fe", "score": "0.52644986", "text": "public function run()\n {\n foreach (static::$content as $slug => $value) {\n if (is_numeric($slug)) {\n // if we have a raw array, slug the value instead.\n $slug = str_slug($value);\n }\n\n $model = $this->getModel();\n\n if ($model->newQuery()->where(static::$slug, $slug)->exists()) {\n continue;\n }\n\n $model->newQuery()->create([\n static::$slug => $slug,\n static::$name => $value,\n ]);\n }\n }", "title": "" }, { "docid": "c2bff02fce68be4c5df8637cca2936bd", "score": "0.5255948", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->cleanCollection( 'contents' );\n }", "title": "" }, { "docid": "3b9b2696e9181a6d34ccb703cd422589", "score": "0.52513987", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Tag::class, 3)->create();\n factory(App\\Category::class, 3)->create();\n factory(App\\Post::class, 24)->create();\n $posts = Post::all();\n App\\Category::all()->each(function ($category) use ($posts){\n $category->posts()->attach(\n $posts->random(3)->pluck('id')->toArray()\n );\n });\n\n App\\Tag::all()->each(function ($tag) use ($posts){\n $tag->posts()->attach(\n $posts->random(3)->pluck('id')->toArray()\n );\n });\n factory(App\\Comment::class, 20)->create(); \n }", "title": "" }, { "docid": "ec68b5a2b7603fb34bd14bbdd27b3ed6", "score": "0.5248272", "text": "public function run()\n {\n //\n factory(\\Modules\\Content\\Models\\BaiHatContent::class,100)->create();\n factory(\\Modules\\Content\\Models\\VideoContent::class,100)->create();\n factory(\\Modules\\Content\\Models\\TacGiaContent::class,100)->create();\n }", "title": "" }, { "docid": "05f62d2077649cc354e7fc6010ff79c0", "score": "0.52433807", "text": "public function created(Content $content)\n {\n if($content->section){\n Cache::forget(\"item.{$content->section->id}\");\n }\n \n if($content->section_category != null){\n Cache::forget(\"item_category.{$content->section_category_id}\");\n } \n }", "title": "" }, { "docid": "1ba819ff19ad0fc45d743573c1e36941", "score": "0.52429086", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n // a page without any content\n $this->pages[] = factory(Page::class)->create();\n\n // 2 pages with contents (status draft and live)\n $this->pages[] = tap(factory(Page::class)->create(['status' => 'Live']))->each(function ($page) {\n $page->content()->save(factory(PageContent::class)->make());\n });\n\n $this->pages[] = tap(factory(Page::class)->create(['status' => 'Draft']))->each(function ($page) {\n $page->content()->save(factory(PageContent::class)->make());\n });\n }", "title": "" }, { "docid": "87f73df0948a224b14b8c2cd1b831bdc", "score": "0.5235785", "text": "public function run()\n {\n \tUser::find(1)->posts()->createMany([\n \t\t[\n \t\t\t'title' => 'Bloodhound Gang - The Bad Touch (Official Video)',\n \t\t\t'video_url' => 'https://www.youtube.com/embed/xat1GVnl8-k',\n \t\t\t'image_url' => 'https://i.ytimg.com/vi/xat1GVnl8-k/hqdefault.jpg',\n \t\t],\n \t\t[\n \t\t\t'title' => 'Tony Igy - Astronomia (Official Video)',\n \t\t\t'video_url' => 'https://www.youtube.com/embed/--cxZbnmmoc',\n \t\t\t'image_url' => 'https://i.ytimg.com/vi/jl9xKw_xEas/maxresdefault.jpg',\n \t\t],\n \t\t[\n \t\t\t'title' => 'Vitas - The 7th Element',\n \t\t\t'video_url' => 'https://www.youtube.com/embed/IwzUs1IMdyQ',\n \t\t\t'image_url' => 'https://i.ytimg.com/vi/IwzUs1IMdyQ/hqdefault.jpg',\n \t\t],\n \t\t[\n \t\t\t'title' => 'Afroman - Because I Got High (Official Video)',\n \t\t\t'video_url' => 'https://www.youtube.com/embed/WeYsTmIzjkw',\n \t\t\t'image_url' => 'https://i0.wp.com/souvienstoi.net/wp-content/uploads/2020/06/Afroman-Because-I-Got-High.jpg?fit=400%2C225&ssl=1&resize=1280%2C720',\n \t\t],\n \t\t[\n \t\t\t'title' => 'Eminem - Godzilla ft. Juice WRLD (Dir. by @_ColeBennett_)',\n \t\t\t'video_url' => 'https://www.youtube.com/embed/r_0JjYUe5jo',\n \t\t\t'image_url' => 'https://i.ytimg.com/vi/r_0JjYUe5jo/maxresdefault.jpg',\n \t\t]\n \t]);\n }", "title": "" }, { "docid": "0dc1592607172342830e60661dfc0496", "score": "0.5224823", "text": "public function run()\n {\n $categories = DB::table('article_categories')->select('id')->get()->toArray();\n\n $faker = Faker\\Factory::create();\n\n for ($i=1; $i<=15; $i++) {\n $key = array_rand($categories);\n $obj = $categories[$key];\n DB::table('articles')->insert([\n 'slug' => 'blog-post-' . $i,\n 'article_category_id' => $obj->id,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n DB::table('article_translations')->insert([\n 'title' => 'Запись блога ' . $i,\n 'content' => $faker->text($maxNbChars = 300),\n 'locale' => 'ru',\n 'article_id' => $i,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n DB::table('article_translations')->insert([\n 'title' => 'Blog post ' . $i,\n 'content' => $faker->text($maxNbChars = 300),\n 'locale' => 'en',\n 'article_id' => $i,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\t DB::table('article_translations')->insert([\n 'title' => 'Blog post ' . $i,\n 'content' => $faker->text($maxNbChars = 300),\n 'locale' => 'pt',\n 'article_id' => $i,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n\n DB::table('article_translations')->insert([\n 'title' => 'Запис блогу ' . $i,\n 'content' => $faker->text($maxNbChars = 300),\n 'locale' => 'ua',\n 'article_id' => $i,\n 'created_at' => \\Carbon\\Carbon::now()\n ]);\n }\n\n// TODO: fix images insert\n// $articles = Article::all();\n\n// foreach($articles as $article) {\n// $faker = Faker\\Factory::create();\n// $image = $faker->imageUrl(800, 600, 'cats');\n// $unique = md5(Carbon::now());\n// $this->imageRepository->imageStore($article, $image, $image, $unique, 'image');\n// $article->update(['image' => $unique]);\n// }\n }", "title": "" }, { "docid": "aafc5021b3d16568f5744b8c1b06ef17", "score": "0.5217782", "text": "function db_seed_db() {\n db_populate_users();\n db_populate_accounts();\n db_populate_transactions();\n}", "title": "" }, { "docid": "fc61ae8cc920ab38c3b387629e79ce27", "score": "0.5215572", "text": "public function __construct()\n {\n $model = static::$contentModel;\n $model::$content = $this;\n }", "title": "" }, { "docid": "31f13a10c6bbbcc7f5349c054213cecc", "score": "0.5199422", "text": "public function testMigrateContent() {\n $migration_id = 'recipe_node';\n $migration = \\Drupal::service('plugin.manager.migration')->createInstance($migration_id);\n $migration->getIdMap()->prepareUpdate();\n $executable = new MigrateExecutable($migration, new MigrateMessage());\n $executable->import();\n }", "title": "" }, { "docid": "6f2801af40b185eed207ce6bd4aae540", "score": "0.5189945", "text": "public function run()\n {\n /*factory(App\\Category::class, 10)->create();\n\n factory(App\\Post::class, 100)\n ->create()\n ->each(function ($u) {\n $u->categories()->attach([random_int(1, 10), random_int(1, 10)]);\n });*/\n\n $category = new Category; //1\n $category->name = 'auto';\n $category->displayname = 'авто';\n $category->has_child = 1;\n $category->save();\n\n $category1 = new Category; //2\n $category1->name = 'auto-reviews';\n $category1->displayname = 'обзоры автомобилей';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category1 = new Category; //3\n $category1->name = 'auto-repairs';\n $category1->displayname = 'ремонт автомобиля';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category1 = new Category; //4\n $category1->name = 'car-care';\n $category1->displayname = 'уход за автомобилем';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category1 = new Category; //5\n $category1->name = 'car-device';\n $category1->displayname = 'устройство автомобиля';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category1 = new Category; //6\n $category1->name = 'auto-tips-for-begining';\n $category1->displayname = 'советы начинающим';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category = new Category; //7\n $category->name = 'moto';\n $category->displayname = 'мото';\n $category->has_child = 1;\n $category->save();\n\n $category1 = new Category; //8\n $category1->name = 'moto-reviews';\n $category1->displayname = 'обзоры мотоциклов';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category1 = new Category; //9\n $category1->name = 'moto-repairs';\n $category1->displayname = 'ремонт мотоцикла';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category1 = new Category; //10\n $category1->name = 'moto-care';\n $category1->displayname = 'уход за мотоциклом';\n $category1->has_child = 0;\n $category1->parent_id = $category->id;\n $category1->save();\n\n $category = new Category; //11\n $category->name = 'law';\n $category->displayname = 'право';\n $category->has_child = 0;\n $category->save();\n\n $category = new Category; //12\n $category->name = 'helpful';\n $category->displayname = 'полезное';\n $category->has_child = 0;\n $category->save();\n\n }", "title": "" }, { "docid": "c1b72ff9db8a4b781ef444a5c99888bf", "score": "0.51892424", "text": "public function getSetup()\n {\n Schema::dropIfExists('demo_users');\n Schema::dropIfExists('demo_articles');\n Schema::dropIfExists('demo_article_detail');\n Schema::dropIfExists('demo_comments');\n Schema::dropIfExists('demo_categories');\n Schema::dropIfExists('demo_article_category');\n\n //create all tables\n Schema::table('demo_users', function ($table) {\n $table->create();\n $table->increments('id');\n $table->string('firstname', 100);\n $table->string('lastname', 100);\n $table->timestamps();\n });\n Schema::table('demo_articles', function ($table) {\n $table->create();\n $table->increments('id');\n $table->integer('author_id')->unsigned();\n $table->string('title', 200);\n $table->text('body');\n $table->string('photo', 200);\n $table->boolean('public');\n $table->timestamp('publication_date');\n $table->timestamps();\n });\n Schema::table('demo_article_detail', function ($table) {\n $table->create();\n $table->increments('id');\n $table->integer('article_id')->unsigned();\n $table->text('note');\n $table->string('note_tags', 200);\n });\n Schema::table('demo_comments', function ($table) {\n $table->create();\n $table->increments('id');\n $table->integer('user_id')->unsigned();\n $table->integer('article_id')->unsigned();\n $table->text('comment');\n $table->timestamps();\n });\n Schema::table('demo_categories', function ($table) {\n $table->create();\n $table->increments('id');\n $table->integer('parent_id')->unsigned();\n $table->string('name', 100);\n $table->timestamps();\n });\n Schema::table('demo_article_category', function ($table) {\n $table->create();\n $table->integer('article_id')->unsigned();\n $table->integer('category_id')->unsigned();\n $table->timestamps();\n });\n\n //populate all tables\n $users = DB::table('demo_users');\n $users->insert(array('firstname' => 'Jhon', 'lastname' => 'Doe'));\n $users->insert(array('firstname' => 'Jane', 'lastname' => 'Doe'));\n\n $categories = DB::table('demo_categories');\n for ($i = 1; $i <= 5; ++$i) {\n $categories->insert(array(\n 'name' => 'Category '.$i,\n )\n );\n }\n $articles = DB::table('demo_articles');\n for ($i = 1; $i <= 20; ++$i) {\n $articles->insert(array(\n 'author_id' => rand(1, 2),\n 'title' => 'Article '.$i,\n 'body' => 'Body of article '.$i,\n 'publication_date' => date('Y-m-d'),\n 'public' => true,\n )\n );\n }\n $categories = DB::table('demo_article_category');\n $categories->insert(array('article_id' => 1, 'category_id' => 1));\n $categories->insert(array('article_id' => 1, 'category_id' => 2));\n $categories->insert(array('article_id' => 20, 'category_id' => 2));\n $categories->insert(array('article_id' => 20, 'category_id' => 3));\n\n $comments = DB::table('demo_comments');\n $comments->insert(array(\n 'user_id' => 1,\n 'article_id' => 2,\n 'comment' => 'Comment for Article 2',\n )\n );\n\n $files = glob(public_path().'/uploads/demo/*');\n foreach ($files as $file) {\n if (is_file($file)) {\n @unlink($file);\n }\n }\n\n echo 'All set!';\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.51803076", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "c373067632374c1925a1299dd67e1604", "score": "0.5177527", "text": "public function testRelations()\n {\n $this->tester->execute([\n 'path' => __DIR__ . '/fixtures/relations.yml'\n ]);\n $this->assertEquals(0, $this->tester->getStatusCode());\n\n $records = $this->entityManager->getContent('pages');\n $this->assertCount(1, $records);\n $record = reset($records);\n\n $relations = $record->relation;\n $this->assertArrayHasKey('people', $relations);\n $this->assertArrayHasKey('locations', $relations);\n\n $this->assertCount(1, $relations['locations']);\n $this->assertCount(2, $relations['people']);\n\n $location = $this->entityManager->find('locations', $relations['locations'][0]);\n $this->assertNotNull($location);\n $this->assertEquals('Location One', $location->getTitle());\n\n $person = $this->entityManager->find('people', $relations['people'][0]);\n $this->assertNotNull($person);\n $this->assertEquals('Daniel', $person->getName());\n }", "title": "" }, { "docid": "37f43a8b8f33024bca1a57cd72e4e8ac", "score": "0.5173952", "text": "public function setUp(): void\n {\n parent::setUp();\n\n $faker = app('Faker\\Generator');\n $faker->seed(1234);\n\n // Make a few things\n $this->things = factory(Thing::class, 5)->create();\n\n // And a few items\n $this->items = $this->things->flatMap(\n function (Thing $thing) {\n $items = factory(Item::class, 3)->make();\n $thing->items()->saveMany($items);\n return $items;\n }\n );\n\n // And a few patrons\n $this->users = factory(User::class, 10)->create()->each(function (User $user) {\n $user->identifiers()->save(factory(UserIdentifier::class)->make());\n });\n }", "title": "" }, { "docid": "64dd82ee014ed949d4667b6a5a5d9b0b", "score": "0.5172972", "text": "public function content(): HasOne\n {\n return $this->hasOne(Content::class);\n }", "title": "" }, { "docid": "443cf8802744e86770df1f3ce43f6fcb", "score": "0.5172538", "text": "public function add_content($content) {\n\t\t$this->load_content();\n\t\t\n\t\tforeach($this->content_list as $cont) {\n\t\t\tif ($content->id == $cont->id) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$assoc = new Model_Submission_Content();\n\t\t$assoc->content_id = $content->id;\n\t\t$assoc->submission_id = $this->id;\n\t\t$assoc->save();\n\t}", "title": "" }, { "docid": "af7813a72aef9a9663f3821e8102f2f0", "score": "0.51658136", "text": "public function run()\n {\n \\DB::table('article_images')->delete();\n \\DB::table('articles')->delete();\n \\DB::table('users')->delete();\n\n User::factory(30)->create()->each(function($u) {\n $u->articles()\n ->saveMany(\n Article::factory(rand(1, 3))->make()\n )\n ->each(function ($a) {\n $a->articleImages()->saveMany(ArticleImage::factory(rand(1, 3))->make());\n });\n }); \n }", "title": "" }, { "docid": "5b8f308d9b742eac69f01f5b62dba237", "score": "0.51605797", "text": "public function run(Faker $faker)\n {\n //Autori\n $authorListId = [];\n\n for($i = 0; $i < 20; $i++){\n $author = new Author();\n $author->name = $faker->word();\n $author->surname = $faker->word();\n $author->picture = $faker->imageUrl(640, 480, 'post', true);\n $author->save();\n $authorListId[]=$author->id;\n }\n //Tags\n $listOfTags = [\n 'sport',\n 'world',\n 'cronaca',\n 'attualità',\n 'calcio',\n 'italia',\n 'europa'\n ];\n\n $listOfTagID = [];\n\n foreach($listOfTags as $tagName) {\n\n $tagObject = new Tag (); \n $tagObject->name = $tagName; \n $tagObject->save(); \n $listOfTagID[] = $tagObject->id; \n } \n\n for($x = 0; $x < 50; $x++){\n\n //creo Article:\n\n $articleObject = new Article();\n $articleObject->title = $faker->words(5, true);\n $articleObject->body = $faker->paragraph();\n $articleObject->picture = $faker->imageUrl(640, 480, 'post', true);\n\n //Prendo id degli autori\n $randAuthorKey = array_rand($authorListId, 1);\n $authorID = $authorListId[$randAuthorKey];\n $articleObject->author_id = $authorID;\n\n //Prendo id dei tags\n $randTagKey = array_rand($listOfTagID, 4);\n $tag1 = $listOfTagID[$randTagKey[0]];\n $tag2 = $listOfTagID[$randTagKey[1]];\n $tag3 = $listOfTagID[$randTagKey[2]];\n $tag4 = $listOfTagID[$randTagKey[3]];\n\n\n $articleObject->save();\n\n $articleObject->tags()->attach($tag1);\n $articleObject->tags()->attach($tag2);\n $articleObject->tags()->attach($tag3);\n $articleObject->tags()->attach($tag4);\n\n }\n }", "title": "" }, { "docid": "ea151e0e8a7755abcb65090ce77683f3", "score": "0.5155797", "text": "public function contents()\n {\n return $this->hasMany('App\\Model\\Contents');\n }", "title": "" }, { "docid": "99b57e3321ec5337c8b35ca1dfbebf96", "score": "0.51557153", "text": "public function run()\n {\n $categories = \\App\\Models\\Category::factory(10)\n ->create();\n\n \\App\\Models\\User::factory(10)\n ->create()\n ->each(function($user) use($categories) {\n $posts = $user->posts()->saveMany(\n \\App\\Models\\Post::factory(10)\n ->make()\n );\n\n $posts->each(function($post) use($categories) {\n $post->categories()->attach($categories->random(2)->pluck('id')->toArray());\n });\n });\n\n \\App\\Models\\Comment::factory(500)\n ->state(new Sequence(\n function() {\n return [\n 'post_id' => rand(1, 100),\n 'user_id' => rand(1, 10),\n ];\n }\n ))\n ->create();\n }", "title": "" }, { "docid": "e523def1077abd3038ed6fdab6a7061b", "score": "0.5152376", "text": "public function run()\n\t{\n\t\tfactory(App\\Author::class, 3)->create()->each(function($a) {\n\t\t\t$a->projects()->saveMany(\n\t\t\t\tfactory(App\\Project::class, 4)->make());\n\t\t});\n\t}", "title": "" }, { "docid": "9ebb93633a6e9abb50ab11982a673d66", "score": "0.51500547", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,50) as $index) {\n DB::table('movies')->insert([\n 'title' => $faker->name,\n 'image_url' => $faker->name,\n 'rating' => rand(0, 10),\n 'release_year' => 2018,\n 'gross_profit' => '50M',\n 'director' => $faker->name,\n ]);\n }\n\n $genres = Genre::all();\n Movie::all()->each(function ($movies) use ($genres) {\n $movies->genres()->attach(\n $genres->random(rand(1, 3))->pluck('id')->toArray()\n );\n });\n\n $actors = Actor::all();\n Movie::all()->each(function ($movies) use ($actors) {\n $movies->actors()->attach(\n $actors->random(rand(1, 3))->pluck('id')->toArray()\n );\n });\n\n Movie::all()->each(function ($movies) use ($actors) {\n $movie_description_en = new MovieDescription;\n $movie_description_en->locale = 'en';\n $movie_description_en->description = 'english description';\n\n $movie_description_de = new MovieDescription;\n $movie_description_de->locale = 'de';\n $movie_description_de->description = 'german description';\n\n $movies->description()->saveMany([$movie_description_en,$movie_description_de]);\n });\n }", "title": "" }, { "docid": "89c59095a0251e71df5d18e60657b458", "score": "0.5148855", "text": "public function addContentElements() {\n $this->addTypoScripts('PageTS');\n $this->addTypoScripts('TypoScript');\n $this->addOverrides();\n # $this->addTca();\n $this->addSql();\n $this->addAssets();\n }", "title": "" }, { "docid": "67b7587be3767208e5f9551b5eaa74cb", "score": "0.5143789", "text": "public function run()\n {\n factory(Faq::class, 20)->create();\n\n factory(HelpCategory::class, 10)\n ->create()\n ->each(function (HelpCategory $category) {\n $category->items()\n ->createMany(\n factory(HelpItem::class, rand(10, 30))\n ->make()\n ->toArray()\n );\n });\n }", "title": "" }, { "docid": "7132dde678ebe368ee12a42ce60f7359", "score": "0.514347", "text": "public function run()\n {\n factory(App\\Dictionary::class, 3)->create()->each(function($dictionary) {\n $dictionary->terms()->saveMany(\n factory(App\\Term::class, 50)->create(['dictionary_id' => $dictionary->id])->each(function($term) {\n $term->translations()->saveMany(\n factory(App\\Translation::class, rand(0,10))->create(['term_id' => $term->id])\n );\n })\n );\n });\n }", "title": "" }, { "docid": "bbea5f385018f0ef56b0eadcd6dbf75c", "score": "0.51299167", "text": "protected function seed()\n {\n DB::table('news_feeds')->truncate();\n\n foreach ($this->feeds() as $feed) {\n \\App\\NewsFeed::create($feed);\n }\n }", "title": "" }, { "docid": "ae5afbc1e79e26ad2f13060ee980b52f", "score": "0.51236516", "text": "public function run()\n {\n $contributeArticles = factory(ContributeArticle::class)->times(50)->make();\n ContributeArticle::insert($contributeArticles->toArray());\n }", "title": "" }, { "docid": "4c19ba61f95e635f3669abddbfb14304", "score": "0.51229584", "text": "protected function setUp(): void\n {\n parent::setUp();\n $this->con = Propel::getConnection(PagePeer::DATABASE_NAME);\n $this->con->beginTransaction();\n CmsDataPopulator::depopulate($this->con);\n CmsDataPopulator::populate($this->con);\n }", "title": "" }, { "docid": "d25c3c858b8500b821e18089af1f1918", "score": "0.5113965", "text": "public function run()\n {\n $fakerFr = Factory::create('fr_EN');\n $fakerEn = Factory::create('en_GB');\n /** @var \\App\\Models\\Pages\\TitleDescriptionPageContent $pageContent */\n $pageContent = (new TitleDescriptionPageContent)->create(['slug' => 'news-page-content']);\n $pageContent->saveSeoMeta([\n 'meta_title' => ['fr' => 'Actualités', 'en' => 'News'],\n 'meta_description' => ['fr' => $fakerFr->text(150), 'en' => $fakerEn->text(150)],\n ]);\n $pageContent->addBrick(TitleH1::class, ['title' => ['fr' => 'Actualités', 'en' => 'News']]);\n $pageContent->addBrick(OneTextColumn::class, [\n 'text' => [\n 'fr' => 'Découvrez ici toutes nos actualités catégorisées. Cliquez sur l\\'une des catégories pour '\n . 'filter les actualités.',\n 'en' => 'Discover here all our categorized news. Click on one of the categories to filter the news.',\n ],\n ]);\n }", "title": "" }, { "docid": "c133bc3ed00a830f0fcde6ef2ec60c02", "score": "0.51091325", "text": "protected function _internalPrepareCreate(&$content)\r\n\t{\r\n\t\t$content = $this->asXML();\r\n\t}", "title": "" }, { "docid": "c133bc3ed00a830f0fcde6ef2ec60c02", "score": "0.51091325", "text": "protected function _internalPrepareCreate(&$content)\r\n\t{\r\n\t\t$content = $this->asXML();\r\n\t}", "title": "" }, { "docid": "8f6702fff511c556c39edbb314dceec1", "score": "0.51087666", "text": "private function insertContentRecord() {\n $objectTypeName = $this->objecttype->objecttypename;\n if (Kohana::find_file('classes','model/lattice/'.strtolower($objectTypeName))) {\n $modelName = 'Model_Lattice_' . $objectTypeName;\n $model = new $modelName($objectId);\n $this->contentDriver = $model;\n } else {\n $this->contentDriver = new Model_Lattice_Object();\n }\n //$this->contentDriver->loadContentTable($this);\n //$this->contentDriver->setContentColumn($this, 'object_id', $this->id);\n $this->contentDriver->saveContentTable($this, true);\n }", "title": "" }, { "docid": "f29f89460d10fb0e7bb0f681a060a529", "score": "0.51064545", "text": "abstract public function add_relationships();", "title": "" }, { "docid": "efeab837f3887641ecd1f59544529d70", "score": "0.5100294", "text": "public function run()\n {\n DB::table('contentareas')->insert([\n 'name' => 'Header',\n 'alias' => 'header',\n 'description' => str_random(20),\n 'order' => 1,\n 'created_by_id' => '1',\n 'modified_by_id' => '2',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n DB::table('contentareas')->insert([\n 'name' => 'Footer',\n 'alias' => 'footer',\n 'description' => str_random(20),\n 'order' => 3,\n 'created_by_id' => '2',\n 'modified_by_id' => '1',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n DB::table('contentareas')->insert([\n 'name' => 'Main',\n 'alias' => 'main',\n 'description' => str_random(20),\n 'order' => 2,\n 'created_by_id' => '1',\n 'modified_by_id' => '3',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n DB::table('contentareas')->insert([\n 'name' => 'SubFooter',\n 'alias' => 'subfooter',\n 'description' => str_random(20),\n 'order' => 4,\n 'created_by_id' => '3',\n 'modified_by_id' => '2',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s'),\n ]);\n\n }", "title": "" }, { "docid": "71b6dfbcb1737a0d7b38e093271d740d", "score": "0.5097943", "text": "private function import_site_relations() {\n\n\t\t/** @var Mlp_Site_Relations_Interface $db */\n\t\t$relations = $this->plugin_data->get( 'site_relations' );\n\t\t$option_name = 'inpsyde_multilingual_blog_relationship';\n\t\t$inserted = 0;\n\n\t\tforeach ( $this->all_sites as $site ) {\n\t\t\t// TODO: With WordPress 4.6 + 2, just use `$site->id`.\n\t\t\t$site_id = $this->is_pre_4_6 ? $site['blog_id'] : $site->id;\n\n\t\t\t$linked = get_blog_option( $site_id, $option_name, array() );\n\t\t\tif ( ! empty( $linked ) ) {\n\t\t\t\t$inserted += $relations->set_relation( $site_id, $linked );\n\t\t\t}\n\n\t\t\tdelete_blog_option( $site_id, $option_name );\n\t\t}\n\t}", "title": "" }, { "docid": "3257221a2786a7bae1148886cbe4d54c", "score": "0.50896716", "text": "public function run()\n {\n DB::table('pages')->insert([\n [\n 'parent_id' => null,\n 'heading' => 'Home',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'home',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => '',\n 'active' => 1,\n ],\n [\n 'parent_id' => 1,\n 'heading' => 'About',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'defaultLayout',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'about',\n 'active' => 1,\n ],\n [\n 'parent_id' => 1,\n 'heading' => 'Contact',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'defaultLayout',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'contact',\n 'active' => 1,\n ],\n [\n 'parent_id' => 1,\n 'heading' => 'Team',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'team',\n 'child_template' => 'teamMember',\n 'on_main_nav' => 1,\n 'slug' => 'team',\n 'active' => 1,\n ],\n [\n 'parent_id' => 4,\n 'heading' => 'Team Member 1',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'team',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'team-member-1',\n 'active' => 1,\n ],\n [\n 'parent_id' => 4,\n 'heading' => 'Team Member 2',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'team',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'team-member-2',\n 'active' => 1,\n ],\n [\n 'parent_id' => 1,\n 'heading' => 'News',\n 'content' => 'this is also content about content',\n 'template' => 'news',\n 'child_template' => 'newsArticle',\n 'on_main_nav' => 1,\n 'slug' => 'news',\n 'active' => 1,\n ],\n [\n 'parent_id' => 7,\n 'heading' => 'News Article 1',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'news-article-1',\n 'active' => 1,\n ],\n [\n 'parent_id' => 7,\n 'heading' => 'News Article 2',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'news-article-2',\n 'active' => 1,\n ],\n [\n 'parent_id' => 7,\n 'heading' => 'News Article 3',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'news-article-3',\n 'active' => 1,\n ],\n [\n 'parent_id' => 7,\n 'heading' => 'News Article 4',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'news-article-4',\n 'active' => 1,\n ],\n [\n 'parent_id' => 7,\n 'heading' => 'News Article 5',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'news-article-5',\n 'active' => 1,\n ],\n [\n 'parent_id' => 1,\n 'heading' => 'Products',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'product',\n 'child_template' => 'productCategories',\n 'on_main_nav' => 1,\n 'slug' => 'product',\n 'active' => 1,\n ],\n [\n 'parent_id' => 13,\n 'heading' => 'Men',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => 'productItems',\n 'on_main_nav' => 1,\n 'slug' => 'men',\n 'active' => 1,\n ],\n [\n 'parent_id' => 14,\n 'heading' => 'Trousers',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'trousers',\n 'active' => 1,\n ],\n [\n 'parent_id' => 14,\n 'heading' => 'Jumpers',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'jumpers',\n 'active' => 1,\n ],\n [\n 'parent_id' => 13,\n 'heading' => 'Women',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'women',\n 'active' => 1,\n ],\n [\n 'parent_id' => 17,\n 'heading' => 'Trousers',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'trousers',\n 'active' => 1,\n ],\n [\n 'parent_id' => 17,\n 'heading' => 'Jumpers',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => '',\n 'child_template' => '',\n 'on_main_nav' => 1,\n 'slug' => 'jumpers',\n 'active' => 1,\n ],\n [\n 'parent_id' => 1,\n 'heading' => 'Legal',\n 'content' => 'Ex quas intellegam signiferumque mel, eam ea debet minimum appellantur. Id sed nisl fabulas detracto, noluisse deseruisse consetetur vix ad, pri adhuc blandit et. Vis bonorum laboramus ad. No eum saepe causae scribentur, cu aliquip habemus vel. Minim utinam iracundia usu te, ad hinc aliquip eam, ea libris erroribus eloquentiam eum.',\n 'template' => 'defaultLayout',\n 'child_template' => '',\n 'on_main_nav' => 0,\n 'slug' => 'legal',\n 'active' => 1,\n ],\n [\n 'parent_id' => 20,\n 'heading' => 'Terms And Conditions',\n 'content' => '<p>These terms and conditions apply to the use of this website (the &quot;Website&quot;).\n Please read these terms and conditions carefully. Your use of the Website is confirmation that you have understood and agreed to be bound by all of these terms and conditions.\n ##COMPANYNAME## may suspend your use of this site immediately if you do not comply with these terms and conditions.</p>\n <p>The Website is communicated by and is the property of ##COMPANYNAME##, and all the material on this Website is subject to copyright with all rights reserved.</p>\n <h2>Use of the Website</h2>\n <p>Users may not link any other website to the Website without obtaining the prior written consent of ##COMPANYNAME##.\n Users must also not use the Website in a way which causes or may cause:</p>\n <ul><li> the Website or the service offered to be interrupted, damaged or impaired;</li>\n <li>offence or detriment to any other person who uses the Website or any services offered;</li>\n <li> ##COMPANYNAME##, you or any other user of the Website to be in breach of applicable law or regulatio; or</li>\n <li>detriment to any person who supplies services to ##COMPANYNAME## in connection with the Website.</li></ul>\n <p> Access to the Website is not open to persons resident in, or citizens of, any territory outside of the United Kingdom\n where to allow such access would require any registration, filing, application for any license or approval or other steps to be taken by\n ##COMPANYNAME## in order to comply with local laws or other regulatory requirements in such overseas territory. We make no representation that any material contained on this Website\n is appropriate for any jurisdiction other than the United Kingdom. The server on which this Website is maintained is located in England and the information delivered via the site is\n deemed to have been delivered in England.</p>\n <h2>No Offer</h2>\n <p>The Website is for informational purposes only. Nothing in the Website should be construed as an offer, invitation or general solicitation to buy or sell any investments or securities,\n provide investment advisory services or to engage in any other transaction, and must not be relied upon in connection with any investment decision.</p>\n <h2>No Advice</h2>\n <p>The information on the Website, including all opinions or other content, is not intended to and does not constitute financial,\n accounting, tax, legal, investment, consulting or other professional advice or services, but is for information purposes only.</p>\n <h2>Disclaimer</h2>\n <p>No warranty, condition or undertaking or term, either express or implied, is given that the information or opinions contained in this website are accurate,\n reliable or complete or as to the freedom of this site from defects, viruses, malicious programs or macro or as to the appropriateness of the content of the Website for any use which the recipient may choose to make of it.\n The information published on the Website is provided as a convenience to visitors and should be used for informational purposes only and is subject to change without notice. If you require additional information,\n you should contact appropriate ##COMPANYNAME## personnel.</p>\n <p>YOU ACKNOWLEDGE THAT YOU ARE SOLELY RESPONSIBLE FOR THE USE TO WHICH YOU PUT THE WEBSITE AND ALL THE INFORMATION YOU OBTAIN FROM IT AND THAT ALL WARRANTIES, CONDITIONS, UNDERTAKINGS, REPRESENTATIONS AND TERMS,\n WHETHER EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, ARE HEREBY EXCLUDED TO THE FULLEST EXTENT PERMITTED BY LAW.</p>\n <p>Save in respect of liability for death or personal injury arising out of negligence or for fraudulent misrepresentation, we and all contributors to the Website hereby disclaim to the fullest extent permitted\n by law all liability for any loss or damage including any direct, special, consequential or indirect or punitive damages, losses, costs or expenses and any loss of profit incurred by you, whether arising in tort,\n contract or otherwise, and arising out of or in connection with your access to or use of, or inability to use, the Website or use of any material on the Website even if we have been advised of the possibility of such damage.\n In addition, no liability can be accepted by us in respect of any changes made to the content of this Website by unauthorised third parties.</p>\n <p>In addition, any software which may be offered by the site from time to time is downloaded at your own risk. If you are in any doubt as to the suitability of this software for your computer,\n it is recommended that you obtain specialist advice before downloading it.</p>\n <p>We provide no warranty that the Website will be available at any time. We will attempt to correct all faults as soon as we reasonably can. ##COMPANYNAME## makes no representations or warranties in particular as to the accuracy,\n currency or completeness of any information contained on the Website and may change the information at any time without notice.</p>\n <h2>Copyright</h2>\n <p>The content of the Website is subject to copyright with all rights reserved. The copyright and all other rights in all of the material on the Website (including without limitation the screen displays, the content, the text,\n graphics and look and feel of the site) are owned by ##COMPANYNAME## and its licensors. You may download or print out a hard copy of such individual pages and/or sections of the Website as you may reasonably require provided that this is for private,\n non-commercial or domestic use only and that you do not remove any copyright or other proprietary notices. Any downloading or other copying from the Website will not transfer title to any software or material to you. You may not reproduce (in whole or in part),\n transmit (by electronic means or otherwise), modify, link into or use for any public or commercial purpose the Website without our prior written permission. Any unauthorised reproduction or use of the Website or the information\n presented therein may be the subject of prosecution, particularly for infringement of copyright. Any rights not expressly granted in these terms are reserved.</p>\n <h2>Links to External Sites</h2>\n <p>The Website may contain links to or from other websites over which ##COMPANYNAME## has no control. These linked sites are for your convenience only and you access them at your own risk. We are not responsible for the content of any linked sites.\n We do not in any way endorse the linked sites. Links to the Website may not be included in any other website without the prior written consent of ##COMPANYNAME##. We will not be responsible for the content of any advertising that may appear on our site\n nor for its compliance with any applicable laws or regulations.</p>\n <h2>Security</h2>\n <p>You should be aware that the internet, being an open network, is not secure. If you choose to send any electronic communications to us by means of this Website, you do so at your own risk. We cannot guarantee that such communications will not be\n intercepted or changed or that they will reach the intended recipient safely.</p>\n <h2>No Representation or Warranty</h2>\n <p>No representation, warranty or guarantee or any kind, express or implied, is given by ##COMPANYNAME##.</p>\n <h2>Content</h2>\n <p>While we use reasonable endeavours to obtain information from sources which we believe to be reliable and to ensure that the information on the Website is up to date and accurate, ##COMPANYNAME## makes no representation or warranty that the\n information or opinions contained on the Website are accurate, reliable or complete. The information and opinions contained on the Website are provided by ##COMPANYNAME## for personal use and for informational purposes only. You are solely liable for\n any use you may make of this information. ##COMPANYNAME## makes no representation, warranty, condition, undertaking or term, whether express or implied, as to the condition, quality, performance, accuracy, suitability, fitness for purpose, completeness\n or freedom from viruses of the content contained on the Website or that such content will be accurate, up to date, uninterrupted or error fee. Whilst we take every care to ensure that the standard of the Website remains high and to maintain the continuity of it,\n the internet is not always a stable medium and errors, omissions, interruptions of service and delays may occur at any time, for which ##COMPANYNAME## accepts no responsibility.</p>\n <h2>Changes to the Terms</h2>\n <p>Changes are periodically made to the information on the Website and to these terms and conditions and these changes will be incorporated in new editions of this site. ##COMPANYNAME## reserves the right to alter or amend any information set out in the Website\n and these terms and conditions without notice. If you use the Website after ##COMPANYNAME## has posted the changes, you will be bound by the new terms. You should therefore ensure that you read the terms and conditions each time you use the Website.</p>\n <h2>Trademarks</h2>\n <p> ##COMPANYNAME## does not give persons accessing the Website permission to use any trade mark contained in the Website. Unauthorised use may constitute an infringement of the relevant owner\\'s rights.</p>\n <h2>Severability</h2>\n <p>If any part of these terms and conditions is, at any time, found to be invalid by a court, tribunal or other forum of competent jurisdiction, or otherwise rendered unenforceable, that decision shall not invalidate or void the remainder of these terms and conditions.\n These terms and conditions shall be deemed amended by modifying or severing such part as necessary to render them valid, legal and enforceable whilst preserving their intent or, if that is not possible, by substituting another provision that is valid,\n legal and enforceable that gives equivalent effect to the parties intent. Any such invalid or unenforceable part or parts shall be severable from these terms and conditions in any other jurisdiction and the validity of the part(s) in question shall not be affected thereby.</p>\n <h2>Assignment</h2>\n <p>You may not assign, sub-licence or otherwise transfer any of your rights under these terms and conditions.</p>\n <h2>Government Law and Jurisdiction</h2>\n <p>These terms and conditions, your use of the Website, and all matters connected with them (whether contractual or non-contractual) are governed by and shall be construed in accordance with the law of England and Wales and shall be subject to the exclusive jurisdiction of the English courts.\n If you access the Website from outside the UK you are responsible for ensuring compliance with any local laws relating to access.',\n 'template' => 'defaultLayout',\n 'child_template' => '',\n 'on_main_nav' => 0,\n 'slug' => 'terms-conditions',\n 'active' => 1,\n ],\n [\n 'parent_id' => 20,\n 'heading' => 'Privacy',\n 'content' => '<p>This privacy policy sets out how ##COMPANYNAME## uses and protects any information that you give ##COMPANYNAME## when you use this website.</p>\n <p>##COMPANYNAME## is committed to ensuring that your privacy is protected. Should we ask you to provide certain information by which you can be identified when using this website, then you can be assured that it will only be used in accordance with this privacy statement.</p>\n <p>##COMPANYNAME## may change this policy from time to time by updating this page. You should check this page from time to time to ensure that you are happy with any changes.</p>\n <h2>What we collect</h2>\n <p>We may collect the following information:</p><ul><li>name and job title</li><li>contact information including email address</li>\n <li>demographic information such as postcode, preferences and interests</li><li>other information relevant to customer surveys and/or offers</li></ul>\n <h2>What we do with the information we gather</h2>\n <p>We require this information to understand your needs and provide you with a better service, and in particular for the following reasons:</p><ul><li>Internal record keeping. </li>\n <li>We may use the information to improve our products and services.</li>\n <li>We may periodically send promotional emails about new products, special offers or other information which we think you may find interesting using the email address which you have provided.</li>\n <li>From time to time, we may also use your information to contact you for market research purposes. We may contact you by email, phone, fax or mail. We may use the information to customise the website according to your interests.</li></ul>\n <h2>Security</h2>\n <p>We are committed to ensuring that your information is secure. In order to prevent unauthorised access or disclosure, we have put in place suitable physical, electronic and managerial procedures to safeguard and secure the information we collect online.</p>\n <h2>How we use cookies</h2>\n <p>A cookie is a small file which asks permission to be placed on your computer&#39;s hard drive. Once you agree, the file is added and the cookie helps analyse web traffic or lets you know when you visit a particular site.\n Cookies allow web applications to respond to you as an individual. The web application can tailor its operations to your needs, likes and dislikes by gathering and remembering information about your preferences.</p>\n <p>We use traffic log cookies to identify which pages are being used. This helps us analyse data about webpage traffic and improve our website in order to tailor it to customer needs.\n We only use this information for statistical analysis purposes and then the data is removed from the system.</p>\n <p>Overall, cookies help us provide you with a better website by enabling us to monitor which pages you find useful and which you do not. A cookie in no way gives us access to your computer or any information about you, other than the data you choose to share with us.</p>\n <p>You can choose to accept or decline cookies. Most web browsers automatically accept cookies, but you can usually modify your browser setting to decline cookies if you prefer.\n This may prevent you from taking full advantage of the website.</p>\n <h2>Links to other websites</h2>\n <p>Our website may contain links to other websites of interest. However, once you have used these links to leave our site, you should note that we do not have any control over that other website.\n Therefore, we cannot be responsible for the protection and privacy of any information which you provide whilst visiting such sites and such sites are not governed by this privacy statement.\n You should exercise caution and look at the privacy statement applicable to the website in question.</p>\n <h2>Controlling your personal information</h2>\n <p>You may choose to restrict the collection or use of your personal information in the following ways:</p>\n <ul><li>whenever you are asked to fill in a form on the website, look for the box that you can click to indicate that you do not want the information to be used by anybody for direct marketing purposes</li>\n <li>if you have previously agreed to us using your personal information for direct marketing purposes, you may change your mind at any time by writing to or emailing us</li></ul>\n <p>We will not sell, distribute or lease your personal information to third parties unless we have your permission or are required by law to do so.\n We may use your personal information to send you promotional information about third parties which we think you may find interesting if you tell us that you wish this to happen.</p>\n <p>You may request details of personal information which we hold about you under the Data Protection Act 1998. A small fee will be payable. If you would like a copy of the information held on you please contact us.</p>\n <p>If you believe that any information we are holding on you is incorrect or incomplete, please write to or email us as soon as possible at the above address. We will promptly correct any information found to be incorrect.</p>',\n 'template' => 'defaultLayout',\n 'child_template' => '',\n 'on_main_nav' => 0,\n 'slug' => 'privacy',\n 'active' => 1,\n ],\n ]);\n }", "title": "" }, { "docid": "3118f7a42c11670e3932d3940c98ea1c", "score": "0.50840896", "text": "public function run(Faker $faker)\n {\n $data = [];\n $now = now();\n for ($i = 1; $i <= 300; $i ++) { \n $data[] = [\n 'article_id' => $i,\n 'content' => $faker->text(),\n 'created_at' => $now,\n 'updated_at' => $now,\n ];\n }\n ArticleContents::insert($data);\n }", "title": "" }, { "docid": "c641faf8edd0c3de29c4ce74a6cadaf9", "score": "0.5082731", "text": "abstract protected function initForeignKeys();", "title": "" }, { "docid": "820db4b2ffe50ed3ce8cb4fbe89e0e98", "score": "0.50791264", "text": "private function go_content(){\n $this->_content->_body = $this->_direct_load();\n // Do the section load for content. We will never get here if direct load 404s or 500s.\n // We should look for content sections in the domain as well as in the _k directory.\n $contentdirs = scandir('_k/_content');\n foreach($contentdirs as $contentdir){\n if (is_dir(\"_k/_content/$contentdir\") && $contentdir !== '.' && $contentdir !== '..' && $contentdir !== '_body'){\n $this->_content->$contentdir = $this->_recursive_load('_content', $contentdir);\n }\n }\n }", "title": "" }, { "docid": "e61414762b7a190be4f80272b7e33f68", "score": "0.5075104", "text": "public function run()\n {\n factory(App\\Category::class, mt_rand(3,6))\n ->create()\n ->each(function($category) {\n $category->items()->saveMany(factory(App\\Item::class, mt_rand(10,25))->make());\n });\n }", "title": "" }, { "docid": "24874787afd8cd725339cb1a670dfdff", "score": "0.506826", "text": "public function run()\n {\n $faker = app(Faker\\Generator::class);\n\n $user_id = User::all()->pluck('id')->toArray();\n\n $cover = [\n 'http://codemoney.tech/cover/cover1.jpg',\n 'http://codemoney.tech/cover/cover2.jpg',\n 'http://codemoney.tech/cover/cover3.jpg',\n 'http://codemoney.tech/cover/cover4.jpg',\n 'http://codemoney.tech/cover/cover5.jpg',\n 'http://codemoney.tech/cover/cover6.jpg',\n 'http://codemoney.tech/cover/cover7.jpg'\n ];\n\n\n $category_id = Category::all()->pluck('id')->toArray();\n\n $articles = factory(Article::class)\n ->times(100)\n ->make()\n ->each(function ($article, $index)\n use ($faker, $user_id, $category_id, $cover)\n {\n $article->user_id = $faker->randomElement($user_id);\n $article->cover = $faker->randomElement($cover);\n $user = User::find($article->user_id);\n $user->work_count++;\n $user->save();\n $article->category_id = $faker->randomElement($category_id);\n $article->excerpt = make_excerpt($article->title);\n\n });\n\n Article::insert($articles->toArray());\n\n }", "title": "" }, { "docid": "6522649e124415c5aa702b6fc6b98a5e", "score": "0.5065167", "text": "public function run()\n {\n $categoryCount = Category::count();\n\n $articles = Article::factory(10)->create();\n \n $articles->each(function (Article $article) use ($categoryCount) {\n for ($i=0; $i < rand(1, $categoryCount); $i++) {\n $article->categories()->syncWithoutDetaching(rand(1, $categoryCount));\n }\n });\n }", "title": "" }, { "docid": "e558a6830c4d6bf79614ce63b06d2df6", "score": "0.50640714", "text": "public function run()\n {\n \t$faker = Faker::create('id_ID');\n \tfor ($i=0; $i < 100 ; $i++) { \n DB::table('module_blog')->insert([\n 'title' => $faker->name,\n 'description' => $faker->text,\n ]);\n \t}\n }", "title": "" }, { "docid": "384c31062805c5480b320bae9c6c8c3b", "score": "0.5062276", "text": "public function run()\n {\n\n factory(\\App\\Tag::class, 20)->create();\n factory(\\App\\User::class, 100)->create();\n factory(\\App\\Category::class, 20)->create()\n ->each(function ($category){\n $category->posts()\n ->createMany(factory(\\App\\Post::class, 1000)->make()->map->getAttributes());\n });\n\n\n $posts = \\App\\Post::query()->get();\n $tag_ids = \\App\\Tag::query()->pluck('id')->toArray();\n\n foreach ($posts as $post)\n {\n $post->tags()->sync($tag_ids);\n }\n\n }", "title": "" }, { "docid": "f8a6e5eeea388c1d941567c62a7f3c28", "score": "0.5060858", "text": "public function run()\n {\n $faker = Faker::create();\n $contents = [\n 'top',\n 'bottom',\n 'outerwear',\n 'innerwear'\n ];\n $types_content = [\n [\n 'polos',\n 'dress shirts',\n 't-shirts',\n 'tank tops',\n 'casual button-down shirts'\n ],\n [\n 'jeans',\n 'dress pants',\n 'casual pants',\n 'shorts',\n 'jogger'\n ],\n [\n 'suits',\n 'coats',\n 'blazers',\n 'sweaters',\n 'jackets'\n ],\n [\n 'boxers',\n 'briefs',\n 'boxer-briefs',\n 'undershirts',\n 'thermal underwears'\n ],\n ];\n foreach(range(0,3) as $index) {\n $id = $faker->uuid;\n DB::table('categories')->insert([\n 'id' => $id,\n 'name' => $contents[$index],\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n foreach(range(0,4) as $content){\n DB::table('types')->insert([\n 'id' => $faker->uuid,\n 'name' => $types_content[$index][$content],\n 'category_id' => $id,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n }\n \n };\n }", "title": "" }, { "docid": "40bdf8023bf641d9b8dccd470038a71d", "score": "0.5058394", "text": "public function run()\n {\n $users = factory(UserEloquent::class, 4)->create();\n $postTypes = factory(PostTypeEloquent::class, 10)->create();\n $posts = factory(PostEloquent::class, 50)->create()->each(function($post) use ($postTypes){\n $post->type = $postTypes[mt_rand(0, (count($postTypes)-1))]->id;\n $post->save();\n });\n }", "title": "" }, { "docid": "4d0b2a1320bcfa85db86149372039134", "score": "0.5055535", "text": "public function run()\n {\n DB::table('qualite_relations')->insert([\n 'libelle' => 'neutre', \n ]);\n DB::table('qualite_relations')->insert([\n 'libelle' => 'bonne', \n ]);\n DB::table('qualite_relations')->insert([\n 'libelle' => 'mauvaise', \n ]); \n }", "title": "" }, { "docid": "b6a61ae31fbe6876655d452b661c586e", "score": "0.50548106", "text": "public function run()\n {\n DB::table('pages')->truncate();\n\n DB::table('pages')->insert([\n \t[\n \t\t'title' => 'About',\n \t\t'uri' => 'about',\n \t\t'content' => 'This is the about page',\n 'parent_id' => null,\n 'lft' => 3,\n 'rgt' => 8,\n 'depth' => 0\n \t],\n \t[\n \t\t'title' => 'Contact',\n \t\t'uri' => 'contact',\n \t\t'content' => 'This is the contact page',\n 'parent_id' => 1,\n 'lft' => 4,\n 'rgt' => 5,\n 'depth' => 1\n \t],\n \t[\n \t\t'title' => 'FAQ',\n \t\t'uri' => 'faq',\n \t\t'content' => 'This is the faq page',\n 'parent_id' => 1,\n 'lft' => 6,\n 'rgt' => 7,\n 'depth' => 1\n \t],\n \t[\n \t\t'title' => 'Media',\n \t\t'uri' => 'media',\n \t\t'content' => 'This is the media page',\n 'parent_id' => null,\n 'lft' => 1,\n 'rgt' => 2,\n 'depth' => 0\n \t],\n [\n 'title' => 'Charaters',\n 'uri' => 'characters',\n 'content' => 'This is the characters page',\n 'parent_id' => null,\n 'lft' => 9,\n 'rgt' => 10,\n 'depth' => 0\n ]\n ]);\n }", "title": "" }, { "docid": "5fb66cf7b108fc45c3b588947da616a5", "score": "0.50513995", "text": "public function run()\n {\n $this->createMap();\n $this->createImages();\n $this->createWithoutEntity();\n\n $contacts = factory(AdditionalField::class)->create([\n 'code_name' => 'contacts',\n 'title' => 'Contacts',\n ]);\n\n $sources = factory(AdditionalField::class)->create([\n 'code_name' => 'sources',\n 'title' => 'Sources of a content',\n ]);\n\n $recommendations = factory(AdditionalField::class)->create([\n 'code_name' => 'recommendations',\n 'title' => 'Page with services',\n 'type' => 'local_pages',\n ]);\n\n factory(AdditionalField::class, 5)\n ->create([\n 'active' => false,\n 'description' => 'inactive',\n ])\n ->each(function ($af) {\n $af->pages()->save(factory(Page::class)->make());\n })\n ;\n }", "title": "" }, { "docid": "8525d7d9a81794910dfc46589cc913d8", "score": "0.5040245", "text": "public function run()\n {\n factory(App\\Authors::class, 10)->create()->each(function ($authors) {\n \n $books = factory(App\\Books::class, 3)->make();\n $authors->books()->saveMany($books);\n });\n }", "title": "" }, { "docid": "66a0dd9f347ae61d099c1c243078b4ab", "score": "0.5035198", "text": "public function run()\n {\n //Will create dummy data\n Schema::disableForeignKeyConstraints();\n DB::table('posts')->truncate();\n Factory('App\\Post')->times(100)->create()->each(function($post){\n $category = App\\Category::all()->random();\n $post->categories()->save($category);\n });\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "4d6fd9499ae482299d8a0eaa70280d72", "score": "0.50335634", "text": "public function run()\n {\n DB::table('navbar_links')->insert([\n 'content' => 'home',\n ]);\n DB::table('navbar_links')->insert([\n 'content' => 'about',\n ]);\n DB::table('navbar_links')->insert([\n 'content' => 'service',\n ]);\n DB::table('navbar_links')->insert([\n 'content' => 'work',\n ]);\n DB::table('navbar_links')->insert([\n 'content' => 'contact',\n ]);\n }", "title": "" }, { "docid": "1fe050de1e35ce984ea4409feb5ce88d", "score": "0.50259566", "text": "protected function createArticleContent() {\n $vocabulary = Vocabulary::load(self::$vocab_name);\n $this->cat1 = $this->createTerm($vocabulary, ['name' => $this->createTestCSVData()[0]['value']]);\n $this->cat2 = $this->createTerm($vocabulary, ['name' => $this->createTestCSVData()[1]['value']]);\n // Create the article.\n $this->node = $this->createNode(\n [\n 'type' => 'article',\n 'title' => 'Test Article',\n 'field_primary_category' => $this->cat1,\n ]\n );\n }", "title": "" }, { "docid": "43864e2328d7efee9f2b00dbcc081954", "score": "0.502532", "text": "protected function initChildren() {\n foreach ($this->datas as $name => $data) {\n $fields = $data->getDefinition()->getFieldNames();\n foreach ($fields as $field) {\n if ($data->getDefinition()->getType($field) == 'reference') {\n $this->datas[$data->getDefinition()->getReferenceEntity($field)]->getDefinition()->addChild($data->getDefinition()->getTable(), $field, $name);\n }\n }\n }\n }", "title": "" }, { "docid": "c5de512b2cdb275fd610dade3d85695d", "score": "0.50234073", "text": "public function run()\n {\n \n\n \\DB::table('intro_content')->delete();\n \n \\DB::table('intro_content')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'content' => 'Good page layout and design skills, multitasking and handling projects from concept to final deliverable.',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'content' => 'Proficient in all aspects of Front-End and Back-End development.',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 3,\n 'content' => 'Graduated Master of Science in Software Engineering from Vellore Institute of Technology, Tamil Nadu.',\n 'created_at' => NULL,\n 'updated_at' => NULL,\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }", "title": "" }, { "docid": "9372d3ed6b6ae798bcf3a03b351eee6e", "score": "0.5013386", "text": "protected function populateDatabase()\n {\n $orm = $this->db->getOrm();\n\n // first clean the database to make shure to have no interferences\n // from existing data\n $orm->cleanResource('WbfsysText');\n $orm->cleanResource('WbfsysRoleGroup');\n $orm->cleanResource('WbfsysRoleUser');\n $orm->cleanResource('WbfsysSecurityArea');\n $orm->cleanResource('WbfsysSecurityAccess');\n $orm->cleanResource('WbfsysGroupUsers');\n\n // clear the cache\n $orm->clearCache();\n\n // some data\n $text1 = new WbfsysText_Entity;\n $text1->access_key = 'text_1';\n $orm->insert($text1);\n\n $text2 = new WbfsysText_Entity;\n $text2->access_key = 'text_2';\n $orm->insert($text2);\n\n $text3 = new WbfsysText_Entity;\n $text3->access_key = 'text_3';\n $orm->insert($text3);\n\n $text4 = new WbfsysText_Entity;\n $text4->access_key = 'text_4';\n $orm->insert($text4);\n\n $text5 = new WbfsysText_Entity;\n $text5->access_key = 'text_5';\n $orm->insert($text5);\n\n // group roles\n $group1 = new WbfsysRoleGroup_Entity;\n $group1->name = 'Group 1';\n $group1->access_key = 'group_1';\n $group1->level = 0;\n $orm->insert($group1);\n\n $group2 = new WbfsysRoleGroup_Entity;\n $group2->name = 'Group 2';\n $group2->access_key = 'group_2';\n $group2->level = 0;\n $orm->insert($group2);\n\n $group3 = new WbfsysRoleGroup_Entity;\n $group3->name = 'Group 3';\n $group3->access_key = 'group_3';\n $group3->level = 0;\n $orm->insert($group3);\n\n $group4 = new WbfsysRoleGroup_Entity;\n $group4->name = 'Group 4';\n $group4->access_key = 'group_4';\n $group4->level = 0;\n $orm->insert($group4);\n\n $group5 = new WbfsysRoleGroup_Entity;\n $group5->name = 'Group 5';\n $group5->access_key = 'group_5';\n $group5->level = 0;\n $orm->insert($group5);\n\n // user roles\n $user1 = new WbfsysRoleUser_Entity;\n $user1->name = 'user_1';\n $user1->level = 0;\n $orm->insert($user1);\n\n $user2 = new WbfsysRoleUser_Entity;\n $user2->name = 'user_2';\n $user2->level = 0;\n $orm->insert($user2);\n\n $user3 = new WbfsysRoleUser_Entity;\n $user3->name = 'user_3';\n $user3->level = 0;\n $orm->insert($user3);\n\n // area\n $areaMod1 = new WbfsysSecurityArea_Entity;\n $areaMod1->access_key = 'mod-1';\n $areaMod1->id_level_access = 100;\n $areaMod1->id_level_insert = 100;\n $areaMod1->id_level_update = 100;\n $areaMod1->id_level_delete = 100;\n $areaMod1->id_level_admin = 100;\n $orm->insert($areaMod1);\n\n $areaMod2 = new WbfsysSecurityArea_Entity;\n $areaMod2->access_key = 'mod-2';\n $areaMod2->id_level_access = 100;\n $areaMod2->id_level_insert = 100;\n $areaMod2->id_level_update = 100;\n $areaMod2->id_level_delete = 100;\n $areaMod2->id_level_admin = 100;\n $orm->insert($areaMod2);\n\n // access\n $access1 = new WbfsysSecurityAccess_Entity;\n $access1->id_group = $group1;\n $access1->id_area = $areaMod1;\n $access1->access_level = 2;\n $orm->insert($access1);\n\n $access2 = new WbfsysSecurityAccess_Entity;\n $access2->id_group = $group2;\n $access2->id_area = $areaMod2;\n $access2->access_level = 1;\n $orm->insert($access2);\n\n $access3 = new WbfsysSecurityAccess_Entity;\n $access3->id_group = $group3;\n $access3->id_area = $areaMod2;\n $access3->access_level = 4;\n $orm->insert($access3);\n\n $access4 = new WbfsysSecurityAccess_Entity;\n $access4->id_group = $group4;\n $access4->id_area = $areaMod2;\n $access4->access_level = 1;\n $orm->insert($access4);\n\n $access5 = new WbfsysSecurityAccess_Entity;\n $access5->id_group = $group5;\n $access5->id_area = $areaMod2;\n $access5->access_level = 4;\n $orm->insert($access5);\n\n // groupusers\n // user only has access to text1, text2 and text5\n $orm->import\n (\n 'WbfsysGroupUsers',\n array(\n array\n (\n 'id_user' => $user1,\n 'id_group' => $group1,\n 'id_area' => $areaMod1,\n 'vid' => $text1\n ),\n array\n (\n 'id_user' => $user1,\n 'id_group' => $group1,\n 'id_area' => $areaMod1,\n 'vid' => $text2\n ),\n array\n (\n 'id_user' => $user1,\n 'id_group' => $group1,\n 'id_area' => $areaMod1,\n 'vid' => $text5\n ),\n\n array\n (\n 'id_user' => $user2,\n 'id_group' => $group3,\n 'id_area' => $areaMod2\n ),\n array\n (\n 'id_user' => $user2,\n 'id_group' => $group2,\n 'id_area' => $areaMod2,\n 'vid' => $text1\n ),\n array\n (\n 'id_user' => $user2,\n 'id_group' => $group2,\n 'id_area' => $areaMod2,\n 'vid' => $text5\n ),\n\n array\n (\n 'id_user' => $user3,\n 'id_group' => $group4,\n 'id_area' => $areaMod2,\n 'vid' => $text1\n ),\n array\n (\n 'id_user' => $user3,\n 'id_group' => $group5,\n 'id_area' => $areaMod2,\n 'vid' => $text2\n ),\n array\n (\n 'id_user' => $user3,\n 'id_group' => $group5,\n 'id_area' => $areaMod2,\n 'vid' => $text5\n ),\n )\n );\n\n }", "title": "" }, { "docid": "cf3f26b3fbdbbe4a9c78a22a15ed87db", "score": "0.5011024", "text": "protected function contentData()\n {\n if ($this->content_fetched === false) {\n $this->content_data = array(\n 'name' => false,\n 'content' => false,\n 'heading' => false,\n 'type' => false,\n 'date' => false,\n 'format' => false\n );\n\n if ($this->tool['content_id'] !== null) {\n $model = new Dlayer_DesignerTool_ContentManager_BlogPost_Model();\n $existing_data = $model->existingData($this->tool['site_id'], $this->tool['content_id']);\n if ($existing_data !== false) {\n\n $bits = explode(Dlayer_Config::CONTENT_DELIMITER, $existing_data['content']);\n if (count($bits) === 3) {\n $this->content_data['name'] = $existing_data['name'];\n $this->content_data['content'] = $bits[2];\n $this->content_data['format'] = $existing_data['format'];\n $this->content_data['type'] = $existing_data['heading_id'];\n $this->content_data['date'] = $bits[1];\n $this->content_data['heading'] = $bits[0];\n }\n }\n }\n\n $this->content_fetched = true;\n }\n }", "title": "" }, { "docid": "db83c9bc9c4b619448adced56b226f87", "score": "0.50103116", "text": "public static function seed( mixed $posts){\n foreach($posts as $post) {\n $post->addComments(\"Bob\", \"Great!\");\n $post->addComments(\"Jhon\", \"It's a good vibe\");\n $post->addComments(\"Fred\", \"Beautiful\");\n } \n }", "title": "" }, { "docid": "5b35aa19ede43d38e3d1dc03e5220972", "score": "0.500515", "text": "public function run()\n {\n $this->disableForeignKeys();\n $this->truncate('pages');\n\n\n $faker = Faker::create();\n\n Page::create([\n 'name' => 'Home',\n 'description' => null,\n 'content' => '\n Content\n ',\n 'image' => 'img/default/page/home/image.jpg',\n 'priority' => 1,\n ]);\n\n Page::create([\n 'name' => 'Contact Us',\n 'description' => 'Please feel free to contact us on any of the following methods or fill in the online enquiry:',\n 'content' => '<table>\n <tbody>\n <tr>\n <td width=\"80px\"><span style=\"font-size: large;\">Freecall</span></td>\n <td><span style=\"font-size: large;\">1800 352 366</span></td>\n </tr>\n <tr>\n <td><span style=\"font-size: large;\">Phone</span></td>\n <td><span style=\"font-size: large;\">08 8726 2000</span></td>\n </tr>\n <tr>\n <td><span style=\"font-size: large;\">International</span></td>\n <td><span style=\"font-size: large;\">+61 8 8726 2000</span></td>\n </tr>\n <tr>\n <td><span style=\"font-size: large;\">Fax</span></td>\n <td><span style=\"font-size: large;\">08 8725 6800</span></td>\n </tr>\n <tr>\n <td><span style=\"font-size: large;\">Email</span></td>\n <td><span style=\"font-size: large;\"><a href=\"mailto:[email protected]\">[email protected]</a></span></td>\n </tr>\n </tbody>\n </table>',\n 'image' => 'img/default/page/contact/image.jpg',\n 'priority' => 2,\n ]);\n\n Page::create([\n 'name' => 'About',\n 'description' => '\n InspirationIt strikes and leaves a mark on your project\n – distinct, and designed to be suchSolutionsNot merely answers\n – but the ability to achieve unique outcomes.\n ',\n 'content' => '\n <h3>Studform Pty Ltd manufactures and distributes doors, access panels, aluminium ceiling systems, &amp; aluminium partitioning systems to the Australian and New Zealand construction markets - with export markets in Dubai and the United Kingdom being developed.</h3>\n <p>The Studform headquarters and manufacturing division is based in regional SA with sales offices in Adelaide and Brisbane.</p>\n <p>The Studform plant is committed to manufacturing products to stringent quality standards while conforming to the requirements of the GECA (Green Environmental Council of Australia) license conditions using controlled systems built upon principles of prevention, in-process control and continuous improvement.</p>\n <p>Contact Studform today on 1800 352 366 or complete our <a href=\"http://www.studform.com.au/contacts/\" target=\"_self\">enquiry form</a>.</p>&nbsp;<p></p></div>\n\n ',\n 'image' => 'img/default/page/about/image.jpg',\n 'thumbnail' => 'img/default/page/about/thumbnail.jpg',\n ]);\n\n Page::create([\n 'name' => 'Building Green',\n 'description' => '\n A core value at Studform is care for the environment. We believe there is a way of harvesting the rich natural resources our globe has to offer, while doing so in a sustainable manner.\n ',\n 'content' => '\n <p><strong><img style=\"margin-top: 5px; margin-right: 800px; float: left;\" title=\"FSC Certification\" src=\"http://i138.photobucket.com/albums/q276/shazzjr/FSCLogo.jpg\" alt=\"FSC Logo\" width=\"118\" height=\"57\"><br></strong></p>\n <p>Most Studform products are inherently eco friendly by nature of the raw materials used –&nbsp;typically plantation timber, recycled aluminium and recycled steel.</p>\n <p>Wherever possible such materials are sourced from companies with recognised sustainability credentials, and who are members of Chain of custody (CoC) certification programs such as FSC (Forest Stewardship Council)</p>\n <p>Ask us about FSC availability.</p>\n </div>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p>&nbsp;</p>\n <p><strong>Operations.</strong></p>\n <p>Careful attention is paid to our daily manufacturing and distribution operations to avoid unnecessary impact on our environment</p>\n <p>&nbsp;</p>\n\n ',\n 'image' => 'img/default/page/building-green/image.jpg',\n 'thumbnail' => 'img/default/page/building-green/thumbnail.jpg',\n ]);\n\n Page::create([\n 'name' => 'Specifications',\n 'content' => '\n <p style=\"font-size: 20px;\">Branded worksections are technical worksections developed by NATSPEC in conjunction with a manufacture-known as a NATSPEC Product Partner. Each branded worksection is based on the associated NATSPEC generic worksection and shares the same classification number. It is a MS Word document Template which follows the NATSPEC style and can be customised.</p>\n <p><a href=\"http://www.natspec.com.au/images/PDF/NTN_GEN_008_Branded_vs_generic_worksections.pdf\" target=\"_blank\"><strong>NATSPEC TECHnote GEN 008</strong></a> defines both generic and branded worksections and outlines their advantages.</p>\n <h3>Advantages of NATSPEC branded worksections</h3>\n <ul>\n <li>An alternative to a generic worksection where a particular product has been selected at the design stage. Associated generic material not manufactured by the Product Partner is still provided.</li>\n </ul>\n <ul>\n <li>Minimal customising required as the <em>Template</em> has been approximately 90% pre-edited in conjunction with the Product Partner.</li>\n </ul>\n <ul>\n <li>Current product information is readily available and accessible via hyperlinks between the <em>Template</em> and the Product Partner&rsquo;s website reducing research time and facilitating early decision making.</li>\n </ul>\n <ul>\n <li>The possibility of product substitution by the contractor may be reduced as the unique performance characteristics of the product are clearly specified.</li>\n </ul>\n <ul>\n <li>Specifiers can rely on NATSPEC industry knowledge and regular updates of the relevant standards and building codes.</li>\n </ul>\n <h3 style=\"text-align: center;\">Download below, or NATSPEC and AUS-SPEC subscribers through SPECbuilder Live.&nbsp;</h3>\n <div class=\"technical-documents\">\n <table>\n <tbody>\n <tr>\n <td><img class=\"product-image\" style=\"margin-top: 35px;\" src=\"/media/wysiwyg/Documents/seismic.jpg\" alt=\"\" width=\"100\"></td>\n <td class=\"middle\">\n <h4>0531p STUDFORM IN SUSPENDED CEILINGS – COMBINED</h4>\n </td>\n <td class=\"right\"><a class=\"download pdf\" href=\"http://www.natspec.com.au/images/branded_worksections/0531p_STUDFORM_in_suspended_ceilings__combined.pdf\" target=\"_blank\">Download PDF</a> <a class=\"download dwg\" href=\"/media/wysiwyg/Documents/0531p_STUDFORM_in_suspended_ceilings__combined.docx\" target=\"_blank\">Download DOCX</a></td>\n </tr>\n </tbody>\n </table>\n </div>\n\n ',\n 'image' => 'img/default/page/specified/image.jpg',\n ]);\n \n Page::create([\n 'name' => 'Projects',\n 'content' => '\n We are proud to have been involved in many exciting and successful projects and developments.\n ',\n 'image' => 'img/default/page/specified/image.jpg',\n 'priority' => 3\n ]);\n\n Page::create([\n 'name' => 'Products',\n 'content' => '\n Content\n ',\n 'image' => 'img/default/page/specified/image.jpg',\n 'priority' => 4\n ]);\n Page::create([\n 'name' => 'Brochures',\n 'content' => '\n Downloads from Studform\n Studform has a large number of brochures for our customer to download and view. Please click the below images to download a corresponding PDF brochure. \n ',\n 'image' => 'img/default/page/specified/image.jpg',\n 'priority' => 5\n ]);\n $this->enableForeignKeys();\n }", "title": "" }, { "docid": "87c3685f965e2214e7b59fa6ddca13cc", "score": "0.50042784", "text": "protected function setUp(): void\n {\n parent::setUp();\n\n $this->series = Series::factory()->count(20)->create();\n $this->series->first(\n function (Series $series) {\n $this->commLinks = CommLink::factory()->count(5)->create()->each(\n function (CommLink $commLink) use ($series) {\n $commLink->series_id = $series->id;\n $commLink->save();\n }\n );\n }\n );\n }", "title": "" }, { "docid": "24a76ada6352cd84242ba73f036d4b52", "score": "0.5003495", "text": "public function run()\n {\n factory(App\\Models\\Child::class, 40)->create();\n\n $children = App\\Models\\Child::all();\n foreach ($children as $child) {\n $child->parents()->sync(App\\Models\\ChildParent::all()->random()->id);\n }\n }", "title": "" }, { "docid": "e572453cb4c972b4435b3b1ad1c98829", "score": "0.50017047", "text": "public function run()\n {\n $faker = Faker\\Factory::create(); \n $posts = App\\Post::all();\n foreach($posts as $post){\n for ($i = 1 ; $i <= 5 ; $i++) {\n $post->user()->attach(rand(1,10),['comment' => $faker->realText($maxNbChars = 150, $indexSize = 2)]);\n }\n }\n }", "title": "" }, { "docid": "0f6f0cef67349be9f12aef1cd8e598bf", "score": "0.49979842", "text": "public function setUp()\n {\n parent::setUp(); \n factory(Category::class)->create();\n factory(Book::class)->create([\n 'category_id' => 1,\n 'language' => 'Vietnamese',\n 'number_of_page' =>'20000',\n ]);\n factory(ImageBook::class)->create();\n }", "title": "" }, { "docid": "c4e1fc516691a577ebfb745132a4f619", "score": "0.49953097", "text": "private function installFixtures()\n {\n $conn = Db::getInstance();\n $conn->insert(static::TABLE_NAME, ['name' => 'Store Information', 'active' => 1]);\n $blockId = (int)$conn->Insert_ID();\n $conn->insert(static::TABLE_NAME_HOOK, ['id_block' => $blockId, 'hook_name' => 'displayFooter', 'position' => 0]);\n $content = (\n '<section id=\"blockcontactinfos\" class=\"col-xs-12 col-sm-3\">'.\n ' <h2 class=\"footer-title section-title-footer\">Store Information</h2>'.\n ' <address>'.\n ' <ul class=\"list-unstyled\">'.\n ' <li><b>Your Company</b></li>'.\n ' <li>42 Bee Lane<br /> 12345 The Hive<br /> the Netherlands</li>'.\n ' <li><i class=\"icon icon-phone\"></i> <a href=\"tel:0123-456-789\">0123-456-789</a></li>'.\n ' <li><i class=\"icon icon-envelope-alt\"></i> <a href=\"mailto:%73%61%6c%65%73@%79%6f%75%72%63%6f%6d%70%61%6e%79.%63%6f%6d\">[email protected]</a></li>'.\n ' </ul>'.\n ' </address>'.\n '</section>'\n );\n foreach (Language::getIDs(false) as $langId) {\n $conn->insert(static::TABLE_NAME_LANG, [\n 'id_block' => $blockId,\n 'id_lang' => (int)$langId,\n 'content' => $content\n ]);\n }\n }", "title": "" }, { "docid": "b6026db6fe644935b159bf187cef7ac4", "score": "0.4992871", "text": "public function run()\n {\n\n $news1 = News::find(1)->first();\n $news2 = News::find(2)->first();\n $news3 = News::find(3)->first();\n $news4 = News::find(4)->first();\n\n $news1->photo_galleries()->attach(1);\n $news2->photo_galleries()->attach(2);\n $news3->photo_galleries()->attach(3);\n $news3->photo_galleries()->attach(4);\n\n\n $news1->photos()->attach(1);\n $news2->photos()->attach(2);\n $news2->photos()->attach(3);\n $news2->photos()->attach(4);\n $news3->photos()->attach(1);\n $news3->photos()->attach(2);\n $news3->photos()->attach(3);\n $news4->photos()->attach(4);\n\n $news1->video_galleries()->attach(1);\n $news2->video_galleries()->attach(2);\n $news3->video_galleries()->attach(3);\n// $news3->video_galleries()->attach($videoGallery4);\n $news4->video_galleries()->attach(5);\n\n\n $news1->videos()->attach(1);\n $news2->videos()->attach(2);\n $news3->videos()->attach(1);\n $news4->videos()->attach(4);\n\n $news1->tags()->attach(1);\n $news2->tags()->attach(2);\n $news3->tags()->attach(3);\n $news4->tags()->attach(4);\n }", "title": "" } ]
3a3c233cf6bef8122ce904cfda11bb62
Insert Tasks in DataBase
[ { "docid": "7d793da1d35bea35dfeb710a7b0b7b2e", "score": "0.0", "text": "public static function addNoCheck(AbstractJob $job): ?InsertEvent\n {\n //====================================================================//\n // Dispatch Task Added Event\n $event = self::dispatch(new InsertEvent($job));\n\n return ($event instanceof InsertEvent) ? $event : null;\n }", "title": "" } ]
[ { "docid": "9dff86e2740d8d1836433108674d4c3f", "score": "0.7033027", "text": "public function run()\n {\n DB::table('tasks')->insert(['tasks' => 'Get Up early']);\n DB::table('tasks')->insert(['tasks' => 'Sleep early']);\n }", "title": "" }, { "docid": "32e4a0a7cc3acf4dd3b11b8fcc2caac8", "score": "0.69531614", "text": "function insertTask()\n {\n $this->task = !empty($this->task) ? htmlspecialchars(strip_tags($this->task)) : NULL;\n $this->due_date = !empty($this->due_date) ? htmlspecialchars(strip_tags($this->due_date)) : NULL;\n $this->due_date = !empty($this->due_date) ? date('Y-m-d H:i:s', strtotime($this->due_date)) : NULL;\n $this->created_date = date('Y-m-d H:i:s');\n\n $query = \"INSERT INTO \" . $this->table_tasks . \" SET task=:task, due_date=:due_date, created_date=:created_date\";\n $stmt = $this->conn->prepare($query);\n \n $stmt->bindParam(\":task\", $this->task);\n $stmt->bindParam(\":due_date\", $this->due_date);\n $stmt->bindParam(\":created_date\", $this->created_date);\n \n if ($stmt->execute()) {\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "b721b5ff74c64b37f39d53f34cf897e7", "score": "0.69346434", "text": "public function run()\n {\n\t DB::table('tasks')->insert([\n\t\t 0 =>\n\t\t\t array (\n\t\t 'user_id' => 2,\n\t\t 'title' => 'Finish Laracasts',\n\t\t 'body' => 'Finish watching Laravel 5.4 from scratch',\n\t\t 'created_at' => Carbon::now(),\n\t\t 'deleted_at' => NULL\n\t\t\t ),\n\t\t 1 =>\n\t\t\t array (\n\t\t\t\t 'user_id' => 2,\n\t\t\t\t 'title' => 'Leave bubble gum at home',\n\t\t\t\t 'body' => 'Leave bubble gum at home so no chewing, just ass kicking',\n\t\t\t\t 'created_at' => Carbon::now(),\n\t\t\t\t 'deleted_at' => NULL\n\t\t\t ),\n\t\t 2 =>\n\t\t\t array (\n\t\t\t\t 'user_id' => 2,\n\t\t\t\t 'title' => 'Kick ass',\n\t\t\t\t 'body' => 'Nothing to chew so just some ass kicking left',\n\t\t\t\t 'created_at' => Carbon::now(),\n\t\t\t\t 'deleted_at' => NULL\n\t\t\t )\n\t ]);\n\n }", "title": "" }, { "docid": "f5c145bd9659c1ca5e32bac712ce2861", "score": "0.6915519", "text": "function addTask($conn, $args){\n\t\t$sql = \"INSERT INTO Tasks ( groupId, name, userId, description, completed) VALUES ('\" . $args[0] . \"', '\" . $args[1] . \"', '\" . $args[2] . \"', '\" . $args[3] . \"', FALSE);\";\t\n\t\t$retVal = mysql_query($sql, $conn);\n\t\tif (! $retVal){\n\t\t\tdie('Adding Task Issue: ' . mysql_error());\n\t\t}\n\t}", "title": "" }, { "docid": "2e23eddcb3bf0e5a3f84e4854382eada", "score": "0.68822706", "text": "public function run()\n {\n DB::table('tasks')->insert([\n [ 'id' => 1, 'name' => 'An Old Task', 'created_at' => '2019-12-02 15:00:00', 'updated_at' => '2019-12-02 15:00:00' ],\n ]);\n }", "title": "" }, { "docid": "36ab5d211649c1d9a47f061a378a567d", "score": "0.67646354", "text": "public function run()\n {\n DB::table('tasks')->insert([\n 'user_id' => '1',\n 'category' => 'test',\n 'title' => 'Titlu de test User ID 1',\n 'description' => 'Aceasta este o sarcina adaugata pentru teste la user cu ID 1',\n 'status' => '0',\n 'created_at' => Carbon::now()\n ]);\n\n DB::table('tasks')->insert([\n 'user_id' => '2',\n 'category' => 'test',\n 'title' => 'Titlu de test User ID 2',\n 'description' => 'Aceasta este o sarcina adaugata pentru teste',\n 'status' => '0',\n 'created_at' => Carbon::now()\n ]);\n\n DB::table('tasks')->insert([\n 'user_id' => '2',\n 'category' => 'test',\n 'title' => 'Titlu de test User ID 2',\n 'description' => 'Aceasta este o sarcina adaugata pentru teste',\n 'status' => '0',\n 'created_at' => Carbon::now()\n ]);\n }", "title": "" }, { "docid": "2a2242eff94aefd156445a60d3201662", "score": "0.6708987", "text": "public function run()\n {\n $array = [\n [\n \"id\" => 1,\n \"task\" => \"Faire ceci\",\n \"completed\" => false,\n \"description\" => \"description\",\n \"user_id\" => 1,\n \"priorite\" => 'faible',\n \"deadline\"=>\"2021-11-14\"\n ],\n [\n \"id\" => 2,\n \"task\" => \"Faire ça\",\n \"completed\" => false,\n \"description\" => \"description\",\n \"user_id\" => 1,\n \"priorite\" => 'haute',\n \"deadline\"=>\"2021-12-14\"\n ],\n ];\n\n DB::table('list')->insert(\n $array\n );\n }", "title": "" }, { "docid": "83d59ee36a1acb7b45c9e3945ed44abc", "score": "0.6698185", "text": "function addTask() {\r\n\t\tforeach ($_POST as $key => $value ) {\r\n\t\t\t$_POST[$key] = htmlspecialchars($value);\r\n\t\t}\r\n\t\t$id = $_POST[\"listid\"];\r\n\t\t$conn = databaseConnection();\r\n\t\t$stmt = $conn->prepare(\"INSERT INTO tasks (todolistid, title, description, duration)\r\n\t\tVALUES (:id, :title, :description, :duration);\");\r\n\t\t$stmt->bindParam(':id', $id);\r\n\t\t$stmt->bindParam(':description', $_POST[\"description\"]);\r\n\t\t$stmt->bindParam(':title', $_POST[\"title\"]);\r\n\t\t$stmt->bindParam(':duration', $_POST[\"duration\"]);\r\n\t\t$stmt->execute();\r\n\t\t$conn = null;\r\n\t \t\r\n\t}", "title": "" }, { "docid": "110a971157d57ac17b9579f2c478b568", "score": "0.6696166", "text": "private function insert(Task $task): void\n {\n //====================================================================//\n // Ensure no Similar Task Already Waiting\n $count = Configuration::getTasksRepository()->getWaitingTasksCount(\n $task->getJobToken(),\n $task->getDiscriminator(),\n $task->getJobIndexKey1(),\n $task->getJobIndexKey2()\n );\n if ($count > 0) {\n return;\n }\n //====================================================================//\n // Persist New Task to Db\n Configuration::getEntityManager()->persist($task);\n Configuration::getEntityManager()->flush();\n }", "title": "" }, { "docid": "6f07765eade6ea76110d512e5ec715ac", "score": "0.66742945", "text": "public function insertTask()\n {\n $task = !empty($_POST['inputTask']) ? $this->validate_data($_POST['inputTask']) : NULL;\n $due_date = !empty($_POST['inputDuedate']) ? $this->validate_data($_POST['inputDuedate']) : NULL;\n $due_date = !empty($due_date) ? date('Y-m-d H:i:s', strtotime($due_date)) : NULL;\n $created_date = date('Y-m-d H:i:s');\n \n if (!empty($task)) {\n \n $sql = \"INSERT INTO todolist (task, due_date, created_date) VALUES ('$task', '$due_date', '$created_date')\";\n if(mysqli_query($this->db, $sql)) {\n \n return 1;\n }\n }\n else {\n \n return 2;\n }\n \n }", "title": "" }, { "docid": "a88e94679e3c84db77259bccab691ad7", "score": "0.66417956", "text": "public function run()\n {\n// $task = new Tasks();\n// $task->id = 1;\n// $task->name = \"huy\";\n// $task->email = \"[email protected]\";\n// $task->address = \"lang son\";\n// $task->save();\n\n $task = new Tasks();\n $task->id = 2;\n $task->name = \"hieu\";\n $task->email = \"[email protected]\";\n $task->address = \"ha nam\";\n $task->save();\n }", "title": "" }, { "docid": "fea0c3ff6cd8392828706c8cfb01ed3b", "score": "0.66238153", "text": "public function run()\n {\n DB::table('tasks')->insert([\n \t[\t'task' => 'Anar a comprar',\n \t\t'description' => 'Al Mercadona',\n \t\t'status' => 1\n \t],\n \t[\t'task' => 'Anar al gimnàs',\n \t\t'description' => 'McFit',\n \t\t'status' => 0\n \t],\n \t[\t'task' => 'Anar a estudiar',\n \t\t'description' => 'Esteve Terradas',\n \t\t'status' => 0\n \t],\n \t[\t'task' => 'Tornar a casa',\n \t\t'description' => 'Esplugues',\n \t\t'status' => 0\n \t]\n ]);\n }", "title": "" }, { "docid": "2d43c43159f44c730d39d09b6bcee51b", "score": "0.65976894", "text": "public function run()\n {\n DB::table('tasks')->insert([\n 'title' => str_random(10),\n 'added_to' => date('Y-m-d'),\n 'completed' => (bool)random_int(0, 1),\n 'user_id' => 1,\n ]);\n }", "title": "" }, { "docid": "4202ee43d930d22cd57a37dea8b6b00d", "score": "0.6593156", "text": "public function run()\n {\n DB::table('tasks')->insert([\n ['id'=>Str::uuid(),'description'=>'Wash the car at the saturday','completed'=>false],\n ['id'=>Str::uuid(),'description'=>'Make a best code for application','completed'=>true],\n ['id'=>Str::uuid(),'description'=>'Test a new application','completed'=>false],\n ['id'=>Str::uuid(),'description'=>'Give a cat food','completed'=>false],\n ['id'=>Str::uuid(),'description'=>'Stay calm and solve the all problems', 'completed'=>false],\n ['id'=>Str::uuid(),'description'=>'Stay home every day cause the pandemics', 'completed'=>false],\n ['id'=>Str::uuid(),'description'=>'Do something well', 'completed'=>true]\n ]);\n }", "title": "" }, { "docid": "3739f83fed4df880332495c153bb0b50", "score": "0.6591537", "text": "public function addTask($task)\n {\n $query = $this->db->prepare('INSERT INTO `tasks` (`task`) VALUES (:task);');\n $query->bindParam('task', $task);\n $query->execute();\n }", "title": "" }, { "docid": "d04c4b79ca44eceb5ddf0c4b0a108a20", "score": "0.65902257", "text": "public function run()\n {\n \tTask::truncate();\n Task::insert([\n \t\t[\n \t\t\t'name' => 'Packet Tracert',\n 'course_id' => 2,\n 'type' => 'quiz',\n \t\t\t'created_at' => Carbon::now(),\n \t\t],\n [\n 'name' => 'VLAN',\n 'course_id' => 2,\n 'type' => 'task',\n 'created_at' => Carbon::now(),\n ],\n \t\t[\n \t\t\t'name' => 'PHP Framework',\n 'course_id' => 5,\n 'type' => 'task',\n \t\t\t'created_at' => Carbon::now(),\n \t\t],\n ]);\n }", "title": "" }, { "docid": "7ba4281cd0df233eb29b4c4426814a97", "score": "0.65859383", "text": "public function run()\n {\n //\n $names = ['筋トレ','プロテイン','プログラミング'];\n foreach ($names as $name) {\n DB::table('tasks')->insert([\n 'name' => $name,\n 'created_at' => new Datetime(),\n 'updated_at' => new Datetime()\n ]);\n }\n }", "title": "" }, { "docid": "e4b2c2b18d2119e76f1ddc1736b57ee6", "score": "0.65565264", "text": "public function run()\n {\n DB::table('tasks')->insert([\n 'title' => 'Реализовать алгоритм автоматического воспитания джуна',\n 'employee_id' => 4,\n 'description' => '\nТимлид Т-70 может находится в одном из 4х состояний, начальное состояние может быть любым:\n● Хорошем настроении\n● Нормальном Настроении\n● Плохом\n● Состояние «не попадись на глаза»\nВ зависимости от работы юного программиста(сигналы 1 || 0), Т-70 переходит в другое\nсостояние.\nПри переходе между состояниями Т-70 генерирует соответствующую фразу(придумать\nсамостоятельно)\nЕсть у нас HR T-1000 она хочет знать сколько раз Т-70 был вынесен выговор\nпрограммисту(возникает когда Т70 в состоянии «не попадись на глаза» получает\nсигнал 0).\nЕсть еще Менеджер T-1001 она хочет знать сколько раз программиста хвалил Т-70\n(Т-70 в состоянии «Хорошего настроения» получает сигнал 1).\nТребования:\n1. система должна быть масштабируема, т.е при добавлении нового состояния\nТ-70 нам не нужно производить рефакторинг всей системы,\n2. Мы должны иметь возможность легко менять поведение системы. Например:\nпопадать из состояния «Хорошем настроении» в «Плохое», при плохой работе\nпрограммиста (сигнал 0) .\n3. Мы легко можем добавить любое количество дополнительных сущностей,\nкоторые будут следить за изменениями состояния Т-70.',\n ]);\n }", "title": "" }, { "docid": "58f02df5da12fe6e2ae45e28293dd6be", "score": "0.6551561", "text": "function insertData($task_description)\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$query = \"INSERT INTO tasks(description,done) VALUES('\".$task_description.\"','0')\";\n\t\tmysqli_query($this->db_connection,$query);\n\t}", "title": "" }, { "docid": "40df31e274a9260c3f228c7e2c763bcc", "score": "0.6525351", "text": "function insert_task($task)\n{\n $new_task = validate_input($_POST[\"new_task\"]);\n if(empty($new_task)){\n return;\n }\n // create a prepared statement to protect against SQL injections\n $insert_statement = $GLOBALS['conn']->prepare(\"INSERT INTO tasks (task, date_added, done) VALUES(?, now(),0);\");\n if ($insert_statement) {\n // Bind our variable to the prepared statement as a parameter\n $insert_statement->bind_param(\"s\", $new_task); // s indicates the data type is string.\n /* execute the prepared statement, and check if it was successful\n * If it was inserted successfully, then the affected rows should be 1\n */\n if (!$insert_statement->execute() || $insert_statement->affected_rows !=1) {\n print_r('Error executing MySQL insert statement: ' . $insert_statement->err);\n return;\n }\n // close the prepared statement\n $insert_statement->close();\n } else {\n printf(\"Failed to insert into the database:Erro number: %d, %s\\n\",\n $insert_statement->errorno, $insert_statement->error);\n }\n}", "title": "" }, { "docid": "f24c1564910d2c74889b0c4d8865aec7", "score": "0.6518591", "text": "public function run()\n\t{\n\t\t\\DB::table('perk_tasks')->delete();\n\n\t\t\\DB::table('perk_tasks')->insert(array (\n\t\t\t0 =>\n\t\t\tarray (\n\t\t\t\t'title' => \"Give thanks in social networks\",\n\t\t\t\t'description' => \"Facebook, twitter, instagram!!,\",\n\t\t\t\t'type' => '0',\n\t\t\t\t'status' => '0',\n\t\t\t\t'event_id' => '1003',\n\t\t\t\t'user_id' => '1003',\n\t\t\t\t'perk_id' => '1',\n\t\t\t),\n\t\t\t1 =>\n\t\t\tarray (\n\t\t\t\t'title' => \"Give you $300 usd more\",\n\t\t\t\t'description' => \"Via paypal\",\n\t\t\t\t'type' => '0',\n\t\t\t\t'status' => '0',\n\t\t\t\t'event_id' => '1003',\n\t\t\t\t'user_id' => '1003',\n\t\t\t\t'perk_id' => '1',\n\t\t\t),\n\t\t));\n\t}", "title": "" }, { "docid": "c2822592d7dcd269cd53e37ee14f87fb", "score": "0.650461", "text": "public function run()\n {\n $data = [\n [\n 'status' => 'New',\n ],\n [\n 'status' => 'In progress',\n ],\n [\n 'status' => 'Done',\n ]\n ];\n\n TaskStatus::insert($data);\n }", "title": "" }, { "docid": "063b5c0c27ca5fcbc2dca764fa1d18db", "score": "0.64861166", "text": "public function run()\n {\n DB::table('tasks')->insert([\n\t\t\t\t\t[\n\t\t\t\t\t\t'card_id' => 1,\n\t\t\t\t\t\t'name' => 'задача номер 1'\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'card_id' => 2,\n\t\t\t\t\t\t'name' => 'задача номер 2'\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'card_id' => 3,\n\t\t\t\t\t\t'name' => 'задача номер 3'\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'card_id' => 4,\n\t\t\t\t\t\t'name' => 'задача номер 4'\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'card_id' => 5,\n\t\t\t\t\t\t'name' => 'задача номер 5'\n\t\t\t\t\t],\n\t\t\t\t\t[\n\t\t\t\t\t\t'card_id' => 6,\n\t\t\t\t\t\t'name' => 'задача номер 6'\n\t\t\t\t\t],\n\t\t\t\t]);\n }", "title": "" }, { "docid": "388280dcdaa95710b9cc93aa74750d85", "score": "0.6480513", "text": "public function AddTask(){\n \t$result = array(\n \t\t'isSuccess' => false\n \t);\n \n $UID = I('UID');\n if($this->isValidUID($UID)){\n $taskInfoTable = M('taskinfo'.$UID);\n\n $taskModel = I('TaskModel');\n $taskCreateTime = $taskModel['createtime'];\n $condition['createtime'] = $taskCreateTime;\n $ans = $taskInfoTable -> where($condition) -> find();\n if($ans !== false && $ans == 0){\n $data['title'] = $taskModel['title'];\n $data['content'] = $taskModel['content'];\n $data['createtime'] = $taskModel['createtime'];\n $data['lastedittime'] = $taskModel['lastedittime'];\n $data['alerttime'] = $taskModel['alerttime'];\n $data['timestamp'] = $taskModel['timestamp'];\n $data['level'] = $taskModel['level'];\n $data['state'] = $taskModel['state'];\n \n $insert = $taskInfoTable -> data($data) -> add();\n if($insert !== false && $insert == 1){\n $result['isSuccess'] = true;\n }\n }\n }\n echo json_encode($result);\n }", "title": "" }, { "docid": "bd48e913b579d2329e15aed1bdf77e42", "score": "0.6457096", "text": "public function run()\n {\n $groups = Group::all();\n $faker = Faker::create();\n foreach($groups as $group){\n \t$user = $group->users()->take(1)->get();\n \tDB::table('tasks')->insert([\n \t\t'name'=>$faker->word,\n \t\t'description'=>$faker->sentence(10),\n \t\t'starting_time'=>$faker->dateTimeBetween('- 10 days','+ 10 days'),\n \t\t'finising_time'=>$faker->dateTimeBetween('+ 11 days','+ 20 days'),\n \t\t'user_id'=>$user[0]->id,\n \t\t'group_id'=>$group->id,\n \t]);\n }\n }", "title": "" }, { "docid": "2490c5440addd361e4d2c57bcf721b92", "score": "0.6453741", "text": "public function newTask()\n {\n if (isset($_POST['task']) && $_POST['task'] === '')\n {\n Controller::setError(\"Digite alguma coisa\");\n }\n else\n {\n // inserir\n $task = new Task();\n $task->__set('iduser', $_SESSION[User::SESSION][\"iduser\"]); \n $task->__set('destask', $_POST['task']);\n\n if (isset($_POST['task-done']) && $_POST['task-done'] === 'on')\n {\n $task->__set('idstatus', 2);\n }\n else \n {\n $task->__set('idstatus', 1);\n }\n\n if (!$task->insert())\n {\n Controller::setSuccess(\"Tarefa inserida com sucesso\");\n }\n else\n {\n Controller::setError(\"Erro ao inserir tarefa\");\n }\n }\n }", "title": "" }, { "docid": "b777d9f8207d94ed9b814f707bdae337", "score": "0.64433163", "text": "public function run()\n {\n $items = [\n \n ];\n\n DB::table('seg_acao')->insert($items);\n\n DB::statement(\"select setval('seg_acao_id_seq', \" . (count($items) + 1000) . \", true);\");\n }", "title": "" }, { "docid": "37a1e934f1d0ef5dbfdc7a9177b6a764", "score": "0.6442648", "text": "public function run()\n {\n Subtask::create([\n \"task_id\" => 1,\n \"name\" => \"Migrasi database\"\n ]);\n\n Subtask::create([\n \"task_id\" => 1,\n \"name\" => \"Coding fitur\"\n ]);\n\n Subtask::create([\n \"task_id\" => 4,\n \"name\" => \"Belajar h-3 ujian\"\n ]);\n\n Subtask::create([\n \"task_id\" => 4,\n \"name\" => \"Belajar malamnya\"\n ]);\n }", "title": "" }, { "docid": "5674b3e39adfd512b948dd14750b90e7", "score": "0.6439793", "text": "public function run()\n {\n DB::table('tasks')->insert([\n 'group_id' => 1,\n 'name' => 'タスク1',\n 'detail' => 'タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細',\n 'due_date' => '2021-12-03',\n 'is_important' => 1,\n 'is_completed' => 0,\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n DB::table('tasks')->insert([\n 'group_id' => 1,\n 'name' => 'タスク2',\n 'detail' => 'タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細',\n 'due_date' => '2021-07-03',\n 'is_important' => 0,\n 'is_completed' => 1,\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n DB::table('tasks')->insert([\n 'group_id' => 2,\n 'name' => 'タスク3',\n 'detail' => 'タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細',\n 'due_date' => '2021-12-03',\n 'is_important' => 1,\n 'is_completed' => 0,\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n DB::table('tasks')->insert([\n 'group_id' => 2,\n 'name' => 'タスク4',\n 'detail' => 'タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細タスク詳細',\n 'is_important' => 1,\n 'is_completed' => 0,\n 'created_at' => now(),\n 'updated_at' => now(),\n ]);\n }", "title": "" }, { "docid": "66a9d61057b2e74b86e8b5ec0535bc7f", "score": "0.6431937", "text": "function user_add_new_task ( $task_title, $task_description, $user_id, $task_collaborator,\n $task_start_date, $task_end_date )\n {\n $add_query = \"insert into `system_tasks` ( `task_title`, `task_description`, `user_id`,\"\n . \" `task_collaborator`, `task_start_date`, `task_end_date` )\"\n . \"values ( '$task_title', '$task_description', '$user_id', '$task_collaborator', \"\n . \"'$task_start_date', '$task_end_date' )\";\n return $this->query ( $add_query ); \n }", "title": "" }, { "docid": "66db221291bfe413436659d6f2b7fcd5", "score": "0.6397585", "text": "public function prePersistTasks()\n {\n $this->setCreated(new \\DateTime());\n $this->setUpdated(new \\DateTime('0000-00-00 00:00:00'));\n $this->setStatus(1);\n }", "title": "" }, { "docid": "9465744dda6f6ea4389d80f455f8fcec", "score": "0.6378576", "text": "public function run()\n {\n $now = date('Y-m-d H:i:s');\n\n DB::table('tasks')->insert(\n [\n 'name' => 'Task 1',\n 'description' => 'newest one',\n 'user_id' => '1',\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n DB::table('tasks')->insert(\n [\n 'name' => 'Task 2',\n 'description' => 'newer one',\n 'user_id' => '1',\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n DB::table('name')->insert(\n [\n 'title' => 'Task 3',\n 'description' => 'Aenean varius magna sed mattis posuere.',\n 'user_id' => '1',\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n }", "title": "" }, { "docid": "80a7fc40f93d59d51daeaa22aa6db4db", "score": "0.63715744", "text": "public function run()\n {\n\n for ($i=0; $i<100; $i++) {\n $darbas = \"darbas\".($i+1);\n $aprasymas = \"aprasymas\".($i+1);\n $logo = \"logo\".($i+1);\n\n\n DB::table('tasks')->insert([\n 'title' => $darbas,\n 'owner_id' => rand(1,15),\n 'description' => $aprasymas,\n 'type_id' => rand(1, 4),\n 'start_date' => date('y-m-d'),\n 'end_date' => date('y-m-d'),\n 'logo' => $logo,\n\n ]);\n }\n // Type::factory()->count(100)->create();\n\n }", "title": "" }, { "docid": "bae014450ac3722be2acf12ed9403987", "score": "0.6364341", "text": "abstract public function insert(string $taskName, string $taskDate): bool;", "title": "" }, { "docid": "98c44467698b2098b9ca660dd759042f", "score": "0.6354905", "text": "function storeTask(){\n \n if($conn = connect()){\n try{\n $sql = \"INSERT INTO dicoding_azure_submission1.tasks (task, done) VALUES(?, ?)\";\n $stmt = $conn->prepare($sql);\n $stmt->bindValue(1, $_POST['task']);\n $stmt->bindValue(2, 0);\n $stmt->execute();\n return true;\n } catch(Exception $e) {\n echo \"Failed: \" . $e;\n }\n\n return false;\n }\n \n}", "title": "" }, { "docid": "888c1ebe444127fd5fbba3e6682e63c4", "score": "0.6341233", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach (range(1,10) as $index) {\n DB::table('tasks')->insert([\n 'title' => $faker->word,\n 'comment' => $faker->text,\n 'start_time' => $faker->date,\n 'finish_time' => $faker->date,\n 'created_at' => $faker->date,\n 'updated_at' => $faker->date,\n 'user_id' => $faker->numerify(1),\n ]);\n }\n }", "title": "" }, { "docid": "87692972a3a1c78d40446858dd8a7e94", "score": "0.63287103", "text": "public function run()\n {\n //\n Task::create(['name' => 'new']);\n }", "title": "" }, { "docid": "ea9368315e1001b6325184ec028862fa", "score": "0.6319227", "text": "public function run()\n {\n \t$task = new Task;\n $task->description = 'Revisar prueba técnica';\n $task->save();\n\n $user = User::find([1, 2]);\n $task->users()->attach($user);\n }", "title": "" }, { "docid": "9abbf44fe0a8e20304efc5ccf3eedad7", "score": "0.6315277", "text": "public function run()\n {\n DB::table('task_third')->insert([\n 'user_id' => 3,\n 'weight'=>0,\n 'length'=> '1',\n \n ]);\n\n\n\n }", "title": "" }, { "docid": "c471abfc0cf487d19e22d81e9200ef8b", "score": "0.63067424", "text": "public function run()\n {\n DB::table('tasks')->insert([\n\n [\n 'id' => 1,\n 'name' => 'Creating footer',\n 'description' => 'The footer should be green and beautiful',\n 'deadline' => '2020-08-02',\n 'closed_at' => '2020-08-02',\n 'status_id' => 3,\n 'project_id' => 1,\n 'created_at' => '2020-05-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 2,\n 'name' => 'Dropping the database',\n 'description' => 'The database was too ugly',\n 'deadline' => '2019-08-05',\n 'closed_at' => '2020-08-12',\n 'status_id' => 3,\n 'project_id' => 2,\n 'created_at' => '2019-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 3,\n 'name' => 'Creating the database',\n 'description' => 'The db was ugly but it can be better',\n 'deadline' => '2020-08-12',\n 'closed_at' => '2019-08-12',\n 'status_id' => 3,\n 'project_id' => 2,\n 'created_at' => '2019-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 4,\n 'name' => 'Creating a select',\n 'description' => 'It should have many options',\n 'deadline' => '2021-08-22',\n 'closed_at' => null,\n 'status_id' => 2,\n 'project_id' => 2,\n 'created_at' => '2020-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 5,\n 'name' => 'Creating the script',\n 'description' => 'Maximum thirty rows',\n 'deadline' => '2021-09-02',\n 'closed_at' => null,\n 'status_id' => 2,\n 'project_id' => 3,\n 'created_at' => '2021-01-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 6,\n 'name' => 'Creating a boxplot',\n 'description' => 'Study statistics before do that',\n 'deadline' => '2021-09-02',\n 'closed_at' => null,\n 'status_id' => 1,\n 'project_id' => 3,\n 'created_at' => '2019-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 7,\n 'name' => 'Creating user interface',\n 'description' => 'I want to see many red elements',\n 'deadline' => '2021-08-02',\n 'closed_at' => null,\n 'status_id' => 1,\n 'project_id' => 5,\n 'created_at' => '2021-02-10 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 8,\n 'name' => 'Creating header',\n 'description' => 'It must be responsive',\n 'deadline' => '2022-08-02',\n 'closed_at' => null,\n 'status_id' => 2,\n 'project_id' => 6,\n 'created_at' => '2021-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 9,\n 'name' => 'Creating footer',\n 'description' => 'The footer should be yellow',\n 'deadline' => '2020-05-02',\n 'closed_at' => '2020-08-12',\n 'status_id' => 3,\n 'project_id' => 5,\n 'created_at' => '2020-02-12 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 10,\n 'name' => 'Looking at the tutorial',\n 'description' => 'You must learn everything about Oracle',\n 'deadline' => '2021-01-02',\n 'closed_at' => null,\n 'status_id' => 2,\n 'project_id' => 5,\n 'created_at' => '2021-01-01 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 11,\n 'name' => 'Installing Symfony',\n 'description' => 'This is the web framework of the future',\n 'deadline' => '2020-08-02',\n 'closed_at' => '2020-08-01',\n 'status_id' => 3,\n 'project_id' => 8,\n 'created_at' => '2020-06-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 12,\n 'name' => 'Installing Laravel',\n 'description' => 'The version is 8',\n 'deadline' => '2021-12-02',\n 'closed_at' => null,\n 'status_id' => 1,\n 'project_id' => 8,\n 'created_at' => '2021-01-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 13,\n 'name' => 'Creating row',\n 'description' => 'At least three rows',\n 'deadline' => '2020-10-22',\n 'closed_at' => null,\n 'status_id' => 1,\n 'project_id' => 10,\n 'created_at' => '2020-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 14,\n 'name' => 'Creating column',\n 'description' => 'At list four columns',\n 'deadline' => '2021-05-02',\n 'closed_at' => null,\n 'status_id' => 2,\n 'project_id' => 11,\n 'created_at' => '2021-02-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ],\n [\n 'id' => 15,\n 'name' => 'Creating header',\n 'description' => 'The header must be black',\n 'deadline' => '2020-09-12',\n 'closed_at' => null,\n 'status_id' => 2,\n 'project_id' => 11,\n 'created_at' => '2020-07-14 19:51:06',\n 'updated_at' => date('Y-m-d H:i:s'),\n ]\n\n ]);\n }", "title": "" }, { "docid": "e2486a5ba21b7dcbcad8d0d5a9cdc44d", "score": "0.6289127", "text": "public function run()\n {\n $task = new Task();\n \n $task->id = 1;\n $task->flg = 0;\n \n $task->save();\n }", "title": "" }, { "docid": "b2b1f9ccc399e5afaf21b1ec595fac3f", "score": "0.62792677", "text": "public function run()\n {\n DB::table('todos')->insert([\n 'userId'=> 1,\n 'title'=> 'tidur',\n 'completed'=> false\n ]);\n }", "title": "" }, { "docid": "b8bd74b80263ba74dab243682a410f7a", "score": "0.6268479", "text": "public function insert(TaskInterface $task): PromiseInterface;", "title": "" }, { "docid": "b42ef1583136b67f51b9ad6124b7c644", "score": "0.6253761", "text": "function addTask($doerName, $taskName, $taskDescription, $taskStartDate, $taskFinishDate, $eMail) {\n $db = tasks_registrationConnect();\n // The SQL statement\n $sql = 'INSERT INTO tasks (doerName, taskName, taskDescription, taskStartDate, taskFinishDate, eMail) VALUES (:doerName, :taskName, :taskDescription, :taskStartDate, :taskFinishDate, :eMail)';\n // The next line creates the prepared statement using the acme connection\n $stmt = $db->prepare($sql);\n // The next four lines replace the placeholders in the SQL\n // statement with the actual values in the variables\n // and tell the database the type of data it is\n $stmt->bindValue(':doerName', $doerName, PDO::PARAM_STR);\n $stmt->bindValue(':taskName', $taskName, PDO::PARAM_STR);\n $stmt->bindValue(':taskDescription', $taskDescription, PDO::PARAM_STR);\n $stmt->bindValue(':taskStartDate', $taskStartDate, PDO::PARAM_STR);\n $stmt->bindValue(':taskFinishDate', $taskFinishDate, PDO::PARAM_STR);\n $stmt->bindValue(':eMail', $eMail, PDO::PARAM_STR);\n // Insert the data\n $stmt->execute();\n // Ask how many rows changed as a result of our insert\n $rowsChanged = $stmt->rowCount();\n // Ask how many rows changed as a result of our insert\n $stmt->closeCursor();\n // Return the indication of success (rows changed)\n return $rowsChanged;\n}", "title": "" }, { "docid": "ff30ef9f1dd43d5c31096cfb296d464f", "score": "0.62526613", "text": "public function run()\n {\n $task = new Task();\n $task->id = 1;\n $task->title = \"Công việc 1\";\n $task->content = \"Nội dung công việc 1\";\n $task->image = \"\";\n $task->due_date = \"2018-09-15\";\n $task->save();\n $task = new Task();\n $task->id = 2;\n $task->title = \"Công việc 2\";\n $task->content = \"Nội dung công việc 2\";\n $task->image = \"\";\n $task->due_date = \"2018-09-16\";\n $task->save();\n $task = new Task();\n $task->id = 3;\n $task->title = \"Công việc 3\";\n $task->content = \"Nội dung công việc 3\";\n $task->image = \"\";\n $task->due_date = \"2018-09-17\";\n $task->save();\n }", "title": "" }, { "docid": "4253300102e5ce9af198c6b61136f70b", "score": "0.6245873", "text": "public function run()\n {\n\n \t$zaposlenici = DB::table('users')->where('role', 'zaposlenici')->first();\n \t$zaposlenici_id = $zaposlenici->id;\n\n \tfor ($i = 1; $i <= 10; $i++) {\n \t\tDB::table('tasks')->insert([\n \t\t 'zaposlenici_id' => $zaposlenici_id,\n \t\t 'naziv_jela' => \"Jelo $i\",\n \t\t 'naziv_jela_na_engleskom' => \"English title $i\",\n \t\t 'opis_jela' => str_random($length = 16)\n \t\t]);\n \t}\n \n }", "title": "" }, { "docid": "08d5e68e345a0dabbd2a52b678da414a", "score": "0.62271476", "text": "public function add(Request $req)\n {\n foreach ($req->task as $key => $insert) {\n $addData=[\n 'task' => $req->task[$key],\n 'hrs_time' => $req->hrs_time[$key],\n 'time' => $req->time[$key],\n 'date' => $req->date[$key],\n 'email' => Auth::guard('web')->user()->email,\n ];\n DB:: table('tasks')->insert($addData);\n }\n\n return redirect()->route('user.home');\n\n }", "title": "" }, { "docid": "da6345ad8941879f6f8b508ebde852ca", "score": "0.6219471", "text": "public function addToDB($name)\n {\n $query = $this->db->query(\"INSERT INTO `tasks`(`name`,done) VALUES ('$name',0)\");\n $tasks = $query->fetchAll();\n return $tasks;\n }", "title": "" }, { "docid": "a8a6448c22de9430eb6990a67c479f1f", "score": "0.62083274", "text": "public function run()\n {\n DB::table('todo')->insert([\n 'todo' => 'Task Pertama',\n 'category' => 'work',\n 'user_id' => '1',\n 'description' => 'penjelasan task pertama adalah sebagai berikut',\n ]);\n }", "title": "" }, { "docid": "aabb9237788eae8abbd355dd9746d65e", "score": "0.6180792", "text": "private function saveTransactions()\n {\n $this->database->insertMultiple('transactions', $this->transactionsToSave);\n }", "title": "" }, { "docid": "3b37bebb0ccbf0f5e718ffbf0e3a678e", "score": "0.6162682", "text": "public function run()\n {\n DB::table('task_statuses')->insert(\n [\n [\n 'name' => 'Waiting',\n ],\n [\n 'name' => 'In progress',\n ],\n [\n 'name' => 'QA',\n ],\n [\n 'name' => 'Ready from Production',\n ],\n [\n 'name' => 'Done',\n ],\n ]\n );\n }", "title": "" }, { "docid": "2b170a945f085deecfdf758188963e6c", "score": "0.6158201", "text": "function newTask(){\r\n $conn = db();\r\n\r\n if(empty($_POST['task'])){\r\n return;\r\n }\r\n $user_id = $_SESSION['id'];\r\n $user_task = $_POST['task'];\r\n $sql = \"INSERT INTO todos (user_id,task,isdone) VALUES ('$user_id','$user_task',0)\";\r\n if($conn->query($sql) == TRUE)\r\n {\r\n echo \"<div class='alert alert-success'> New Task Added! </div>\"; \r\n header(\"location:indexPage.php\");\r\n }\r\n else\r\n echo $conn->error;\r\n \r\n $conn->close();\r\n\r\n }", "title": "" }, { "docid": "a42662d3dc29bb8cc05c761c7485aeac", "score": "0.615176", "text": "public function run()\n {\n $data = [\n [\n 'name' => 'file'.rand(1111,9999),\n 'resource' => 'task',\n 'resource_id' => 1,\n 'router_id'=>1,\n ],\n [\n 'name' => 'file'.rand(1111,9999),\n 'resource' => 'task',\n 'resource_id' => 2,\n 'router_id'=>1,\n ],\n ];\n $this->table('file')->insert($data)->save();\n }", "title": "" }, { "docid": "e381112168cfb7f7c45d06bbb29bcca0", "score": "0.6149897", "text": "public function run()\n {\n \\DB::statement(\" update persons set activity_id=1 where activity_id is null \");\n\n \\DB::statement(\" Insert into person_activities (person_id,activity_id,\n created_at, updated_at) select p.id, a.id, now(), now() \n from persons p join activities a on a.id=p.activity_id;\");\n }", "title": "" }, { "docid": "2c707a37beb1e48d2d5a3b68177f7ad4", "score": "0.61394274", "text": "public function run()\n {\n $now = Carbon::now()->toDateTimeString();\n $tasks = ['Working', 'Completed', 'Lazy', 'To hard', 'In progress', 'done', 'want to do', 'wanna be'];\n foreach ($tasks as $task) {\n Task::create([\n 'task_name' => $task,\n 'task_description' => $task,\n 'status_id' => rand(1,4),\n 'add_date' => $now,\n 'completed_date' => $now,\n 'created_at' => $now,\n ]);\n }\n }", "title": "" }, { "docid": "5fe383ba52389675b74851303766e96c", "score": "0.6139095", "text": "public function run()\n\t{\n\t\t$collection = [];\n\n\t\tforeach (self::ITEMS as $item) {\n\t\t\t$collection[] = $item;\n\t\t}\n\n\t\tDB::table($this->table)->insert($collection);\n\t}", "title": "" }, { "docid": "db5ec5fe3bd6b385446dc997020c5b61", "score": "0.61341673", "text": "public function run() {\n\n DB::table('tasks')->delete();\n\n $now = new DateTime();\n\n Tasks::create([ \n 'task_list_id' => 1,\n 'status_id' => 1,\n 'description' => 'finish these seeders',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n\n Tasks::create([ \n 'task_list_id' => 1,\n 'status_id' => 2,\n 'description' => 'figure out middle layer (getting data from database to frontend)',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n\n Tasks::create([ \n 'task_list_id' => 1,\n 'status_id' => 3,\n 'description' => 'blast out the front-end rq',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n \n Tasks::create([ \n 'task_list_id' => 1,\n 'status_id' => 4,\n 'description' => 'learn authorization',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n\n Tasks::create([ \n 'task_list_id' => 2,\n 'status_id' => 5,\n 'description' => 'john should do this first',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n \n Tasks::create([ \n 'task_list_id' => 2,\n 'status_id' => 6,\n 'description' => 'john should do this second',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n \n Tasks::create([ \n 'task_list_id' => 2,\n 'status_id' => 7,\n 'description' => 'john should do this third',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n \n Tasks::create([ \n 'task_list_id' => 3,\n 'status_id' => 8,\n 'description' => 'sam should do this first',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n \n Tasks::create([ \n 'task_list_id' => 3,\n 'status_id' => 9,\n 'description' => 'sam should do this second',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n \n Tasks::create([ \n 'task_list_id' => 3,\n 'status_id' => 10,\n 'description' => 'sam should do this third',\n 'created_at' => $now,\n 'updated_at' => NULL,\n 'deleted' => False,\n 'deleted_date' => NULL,\n ]);\n }", "title": "" }, { "docid": "785f78123b87060142ff85196d98c441", "score": "0.6116291", "text": "public function run()\n {\n DB::beginTransaction();\n try {\n TipoTelefono::create([\n 'nombre' => 'Movil'\n ]);\n TipoTelefono::create([\n 'nombre' => 'Casa'\n ]);\n } catch (Exception $e) {\n DB::rollback();\n echo \"Error \";\n }\n DB::commit();\n }", "title": "" }, { "docid": "e78318711fa8ae400dd8381031876848", "score": "0.61114043", "text": "function f_addTask($task,$group)\n\t{\n\t\tglobal $db;\n\t\tif(!get_magic_quotes_gpc()) //if special characters are not automatically escaped with a backslash, then manually do it.\n\t\t{\n\t\t\t$task = addslashes($task);\n\t\t\t$group = addslashes($group);\n\t\t}\n\t\t$db->query(\"insert into tasks (task,task_group) values('$task','$group')\") or die($db->error);\n\t\treturn $db->insert_id;\n\t\t\n\t}", "title": "" }, { "docid": "9123f521f245913e3f682606961a62a9", "score": "0.61100024", "text": "public function run()\n {\n DB::table('users')->insert([\n\n \t['id' => 1,\n \t'name' => 'andre',\n \t'email' => '[email protected]',\n \t'password' => bcrypt('andre')],\n\n \t['id' => 2,\n \t'name' => 'denize',\n \t'email' => '[email protected]',\n \t'password' => bcrypt('denize')],\n\n \t['id' => 3,\n \t'name' => 'rose',\n \t'email' => '[email protected]',\n \t'password' => bcrypt('rose')]\n\n ]);\n\n DB::table('projects')->insert([\n\n \t['id' => 1,\n \t'title' => 'All Projects',\n \t'slug' => 'all'],\n\n \t['id' => 2,\n \t'title' => 'SPED',\n \t'slug' => 'sped'],\n\n \t['id' => 3,\n \t'title' => 'SuperSoft',\n \t'slug' => 'ssoft']\n\n ]);\n\n DB::table('tasks')->insert([\n\n \t['title' => 'Task 1',\n \t'text' => 'This is the first task of Project 1',\n \t'description' => '<p>This is the very first task of the system.</p><p>We should keep it the way it is.</p><p><strong>This</strong> is the very first task!</p>',\n \t'creator_id' => 1, // This task was created by user Andre\n \t'project_id' => 1, // This task is part of Project All.\n \t'completed' => false, \n \t'needs_file' => false,\n \t'completed_at' => null,\n \t'deadline_at' => Carbon::now()\n \t],\n\n \t['title' => 'Task 2',\n \t'text' => 'This is the second task of Project 1',\n \t'description' => null,\n \t'creator_id' => 2, // This task was created by user Denize\n \t'project_id' => 1, // This task is part of Project All.\n \t'completed' => false, \n \t'needs_file' => true,\n \t'completed_at' => null,\n \t'deadline_at' => Carbon::now()\n \t],\n\n \t['title' => 'Task 3',\n \t'text' => 'Hope to see you soon!',\n \t'description' => '<p>A very cute task!</p>',\n \t'creator_id' => 3, // This task was created by user Rose\n \t'project_id' => 2, // This task is part of Project SPED.\n \t'completed' => true, \n \t'needs_file' => false,\n \t'completed_at' => Carbon::now(),\n \t'deadline_at' => Carbon::now()\n \t],\n\n ]);\n\n }", "title": "" }, { "docid": "bd73604b4c1a40170f0db3b15f47330a", "score": "0.6100363", "text": "public function run()\t{\n \t$fdc = date('Y-m-d H:i:s',\tstrtotime('now'));\n \t\t$it = 'tipo';\n \t\t$iFc = 'fecha_de_creacion';\n\n \t\t$tipos_de_actividad\t=\t[\n\t\t\t\t[\t$it\t=>\t'Deportiva', $iFc => $fdc],\n\t\t\t\t[\t$it\t=>\t'Cultural', $iFc => $fdc],\n\t\t\t\t[\t$it\t=>\t'Recreativa o de integración', $iFc => $fdc]\n\t\t\t];\n\n\t\t\tDB::table('tipos_de_actividad')->insert(\t$tipos_de_actividad);\n }", "title": "" }, { "docid": "e3b063a5ef9bd4bf6c6eafc492756d27", "score": "0.6100137", "text": "public function run()\n { \n DB::table('estatuses')->insert(array(\n array(\n 'Estatus' => 'En Proceso'\n ),\n array(\n 'Estatus' => 'Aceptado'\n ),\n array(\n 'Estatus' => 'Cancelado'\n ),\n\n ));\n }", "title": "" }, { "docid": "4b5c318c6b14df7606dc71cd57aa8ec8", "score": "0.60882324", "text": "public function run()\n {\n DB::table('localidades')->insert($this->localidades);\n }", "title": "" }, { "docid": "5e877622a1a22b60bad6388515e45357", "score": "0.6078961", "text": "public function run()\n {\n //\n DB::table('tasks')->insert([\n [\n 'title' => '关于做好2017—2018学年第一学期泉山校区值班工作的通知',\n 'detail' => '各单位、各部门:\n 为进一步加强学校安全稳定工作,发挥值班工作在全面建设和谐平安校园中的作用,经研究决定,学校在泉山校区继续安排夜间值班,现将有关事宜通知如下,请遵照执行。\n一、值班安排:\n(一)实行领导带班,科级以上干部值班制度。值班人员由1名处级管理干部和1名科级管理干部组成,处级干部为值班负责人。值班人员不能正常值班应向带班领导汇报请假,经带班领导批准后可请人代班。带班人员必须是同级干部,且须承担同样的值班责任。\n(二)保卫部门和后勤部门根据工作职责及任务,安排好相应的值班工作。各二级学院要安排专人值班,负责每天学风检查、学生安全管理等相关事宜。遇有紧急情况和突发事件,立即向总值班室报告。\n(三)总值班室设在泉山校区图书馆一楼校园110应急管理中心,值班电话:0554-6862110,值班时间:晚上7:00至次日早晨7:00。\n二、值班要求:\n(一)带班领导要及时对夜间值班干部进行监督、检查。遇有重大突发事件应到现场进行指挥处理。\n(二)各级各类值班人员应增强责任感,遵守值班纪律,按时到岗,坚守岗位,认真做好值班记录。遇有突发事件,应妥善处理,并及时向带班领导汇报。\n(三)值班人员值班期间,负有对保卫值班、后勤值班、院系值班检查、监管的职责;应对学校重要部位进行巡视,以便及时排除安全隐患。\n(四)实行指纹考勤制度。为确保值班人员到岗、负责,对值班人员实行指纹考勤,考勤时间分别在晚上10:00-11:00,早上6:30-7:30两个时间段。\n三、值班管理\n(一)加强值班巡查工作。带班领导和办公室、监察处、人事处等有关部门负责人将不定期抽查值班工作,对于不认真履行职责的值班人员进行通报批评,情节严重造成不良后果者,将追究其责任。\n(二)加强值班人员考核。办公室将根据指纹考勤结果,每月对值班考勤情况进行汇总,报带班领导及相关部门,作为值班补助发放依据。\n(三)加强应急后勤保障工作。相关部门应加强应急值守的后勤保障工作,保证突发事件发生时,公务用车及各种应急物品能及时到位,便于应急处置。\n请各部门、各二级学院将全校值班安排情况通知到相关人员,请保卫处、后勤部门及各二级学院将本学期晚间值班安排表于9月2日前通过电子政务平台报校办应急管理中心王康阔收。\n 特此通知',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于召开淮南师范学院2017秋季扶贫顶岗支教工作动员大会的通知',\n 'detail' => '各有关单位:\n 经研究决定召开淮南师范学院2017秋期扶贫顶岗支教工作动员大会,现将有关事项通知如下:\n 时 间:2017年8月28日 16:00\n 地 点:舜耕青年讲堂\n 主持人:曹灯明\n 参加人员:\n 1、校领导;\n 2、办公室、宣传部、教务处、学生处、团委、教育学院、外国语学院、音乐与舞蹈学院、体育学院、美术与设计学院、金融学院、生物工程学院、法学院负责人;\n 3、本期支教学生及上期支教学生代表。\n 具体议程:\n 1、教务处朱其永处长宣布2017秋期扶贫顶岗支教工作方案;\n 2、本届支教学生代表发言;\n 3、上届支教学生代表魏飞同学发言;\n 4、支教学院领导代表应力同志发言;\n 5、支教队宣誓誓词;\n 6、曹杰旺院长讲话。\n \n 2017年8月29上午8点启程安排(炎刘40人,带队:应力)(宁老庄61人,带队:曹灯明)(凤台62人,带队:朱其永)',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于班车恢复运行的通知',\n 'detail' => ' \n广大教职工:\n根据学校工作安排,8月28日班车恢复运行。具体发车时间为7:15、13:45;返回时间为11:50、18:10,请广大教职工相互转告。\n特此通知\n \n \n \n 办公室\n 2017年8月27日',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '淮南师范学院关于申请新增硕士单位及硕士学位授权点的公示',\n 'detail' => '根据《安徽省人民政府学位委员会关于开展2017年博士硕士学位授予权审核工作的通知》(皖学位秘[2017]1号),淮南师范学院开展了新增硕士学位授予单位及硕士学位授权点申报和审核工作。经相关单位组织申报、审核推荐,校学位评定委员会评议通过,决定淮南师范学院申请新增硕士学位授予单位,“化学”、“工商管理”2个一级学科申报硕士学位授权点。\n现将评议结果及相关申请材料向社会公示,公示期为2017年7月25日至7月31日。公示期内,任何单位或个人,如对公示内容有异议,请以电话或邮件方式,实名向学校纪委办公室(监察处)或科技处(学科建设办公室)反映。\n纪委办公室(监察处):电话0554-6863597,邮箱[email protected];科技处(学科建设办公室):电话0554-6863587,邮箱[email protected]。',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于做好2017—2018学年第一学期泉山校区值班工作的通知',\n 'detail' => '各单位、各部门:\n 为进一步加强学校安全稳定工作,发挥值班工作在全面建设和谐平安校园中的作用,经研究决定,学校在泉山校区继续安排夜间值班,现将有关事宜通知如下,请遵照执行。\n一、值班安排:\n(一)实行领导带班,科级以上干部值班制度。值班人员由1名处级管理干部和1名科级管理干部组成,处级干部为值班负责人。值班人员不能正常值班应向带班领导汇报请假,经带班领导批准后可请人代班。带班人员必须是同级干部,且须承担同样的值班责任。\n(二)保卫部门和后勤部门根据工作职责及任务,安排好相应的值班工作。各二级学院要安排专人值班,负责每天学风检查、学生安全管理等相关事宜。遇有紧急情况和突发事件,立即向总值班室报告。\n(三)总值班室设在泉山校区图书馆一楼校园110应急管理中心,值班电话:0554-6862110,值班时间:晚上7:00至次日早晨7:00。\n二、值班要求:\n(一)带班领导要及时对夜间值班干部进行监督、检查。遇有重大突发事件应到现场进行指挥处理。\n(二)各级各类值班人员应增强责任感,遵守值班纪律,按时到岗,坚守岗位,认真做好值班记录。遇有突发事件,应妥善处理,并及时向带班领导汇报。\n(三)值班人员值班期间,负有对保卫值班、后勤值班、院系值班检查、监管的职责;应对学校重要部位进行巡视,以便及时排除安全隐患。\n(四)实行指纹考勤制度。为确保值班人员到岗、负责,对值班人员实行指纹考勤,考勤时间分别在晚上10:00-11:00,早上6:30-7:30两个时间段。\n三、值班管理\n(一)加强值班巡查工作。带班领导和办公室、监察处、人事处等有关部门负责人将不定期抽查值班工作,对于不认真履行职责的值班人员进行通报批评,情节严重造成不良后果者,将追究其责任。\n(二)加强值班人员考核。办公室将根据指纹考勤结果,每月对值班考勤情况进行汇总,报带班领导及相关部门,作为值班补助发放依据。\n(三)加强应急后勤保障工作。相关部门应加强应急值守的后勤保障工作,保证突发事件发生时,公务用车及各种应急物品能及时到位,便于应急处置。\n请各部门、各二级学院将全校值班安排情况通知到相关人员,请保卫处、后勤部门及各二级学院将本学期晚间值班安排表于9月2日前通过电子政务平台报校办应急管理中心王康阔收。\n 特此通知',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于暑期班车运行时间安排的通知',\n 'detail' => '广大教职工:\n根据学校工作安排,班车本周继续运行,7月19日(周三)至21日(周五),班车运行时间调整为:发车时间8:30、14:40;返回时间:11:40、17:50;7月22日停止运行,8月28日恢复运行。\n特此通知\n \n \n \n办公室\n 2017年7月17日',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于召开审核评估工作专题培训会的通知',\n 'detail' => '各二级学院、各相关部门:\n为切实推进学校本科教学审核评估各项建设工作,确保教学文件及档案材料的整理归档务实、有效,经学校研究,决定召开淮南师范学院审核评估工作专题培训会议,现将有关事项通知如下:\n会议时间:2017年7月17日(下周一)下午15∶00。\n会议地点:舜耕青年讲堂\n会议主题:审核评估建设与教学档案整理。\n参会人员:\n1、校审核评估工作领导小组成员;\n2、各二级学院院长、教学副院长、教科研秘书、系主任、实验室主任、专业负责人,评估工作组成员;\n3、教务处、实验与设备管理处科级以上干部;\n4、校评估办公室秘书。\n请各单位通知本部门成员准时参会。\n特此通知',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '2017年淮南师范学院第三批人才引进及教师招聘人员基本情况公示',\n 'detail' => '根据2017年7月12日院长办公会议研究审定,我校拟录、聘用姜成等5位同志来校从事教学科研工作。现将拟聘人员基本情况予以公示(2017年人员招聘第三批)。\n公示期自7月13日至7月18日。如有异议,请来函来电。\n联系部门:淮南师范学院人事处 淮南师范学院纪委办公室;\n联系电话:(0554)6863593,(0554)6863597。\n邮箱:[email protected][email protected]\n邮编:232038。',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于召开全校党员干部“讲政治、重规矩、作表率”专题警示教育动员大会的通知',\n 'detail' => '各二级学院党委(党总支、直属党支部)、机关各党支部:\n经学校党委研究,决定召开全校党员干部“讲政治、重规矩、作表率”专题警示教育动员大会,有关事宜通知如下:\n时 间:2017年7月10日(周一)上午9:00\n地 点:知明湖舜耕青年讲堂\n参会人员:校党委委员、处级党员干部、各分党委(党总支、直属党支部)委员、党支部书记\n会议要求:\n1.请各分党委(党总支、直属党支部)、机关各党支部负责通知本单位相关人员参会;\n2.请参会人员于8:50到达会场;\n3.参会人员无故不得缺席,因故不能参会,请于7月10日上午8:30前统一履行书面请假手续,交组织部。\n特此通知\n \n \n \n 党委组织部\n 2017年7月6日',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ], [\n 'title' => '关于报送暑期重点工作安排的通知',\n 'detail' => '各部门、各二级学院:\n根据学校领导要求,请各部门、各二级学院结合学校2017年度党政工作要点及工作实际,于本周五(7月7日)上午下班前将本单位暑期重点工作安排电子版通过电子政务报送至办公室缪保爱。\n特此通知\n \n \n 校办公室\n 2017年7月6日',\n 'work_type_id' => 1,\n 'department_id' => 1,\n 'created_at' => Carbon::now(),\n 'end_time' => Carbon::tomorrow()->addDays(10),\n 'updated_at' => Carbon::now(),\n 'status' => 'draft'\n ],\n ]);\n }", "title": "" }, { "docid": "206e00fb789025320a4b38826de64b59", "score": "0.60775965", "text": "public function create($title, $description)\n {\n $conn = $this->connect();\n $result = $conn->insert(array(\n 'title' => $title,\n 'description' => $description,\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ))\n ->into('tasks');\n }", "title": "" }, { "docid": "3ea20a688d02b158e0d6bc0405ebdd61", "score": "0.60629237", "text": "public function run()\n {\n \\DB::table('user')->insert([\n \t'user_id' => 2,\n \t'token' => 'd947e8d2d34b1df805ec72916ab6cf90',\n \t'uname' => 'Luthfi',\n \t'password' => 'password2',\n 'email' => '[email protected]'\n ]);\n\n \\DB::table('donelist')->insert([\n \t'list_id' => 1,\n \t'user_id' => 1,\n \t'task_data' => 'creating project',\n \t'date' => '2021-05-28 14:52:46'\n ]);\n }", "title": "" }, { "docid": "ca6af3b6a4848f2014feeb0a89621821", "score": "0.6053549", "text": "public function insertBatch();", "title": "" }, { "docid": "bd4fb8a7e13b8a2b3a34642a55983900", "score": "0.6052488", "text": "public function createTask()\n {\n $assistants = $this->FtActaService->getAssistants(0);\n $users = [];\n\n foreach ($assistants as $ActDocumentUser) {\n array_push($users, $ActDocumentUser->getUser()->getPK());\n }\n\n $TareaService = new TareaService(new Tarea());\n $TareaService->update([\n 'tipo' => Tarea::TIPO_SIMPLE,\n 'nombre' => $this->getTaskName(),\n 'fecha_inicial' => $this->getInitialDate(),\n 'fecha_final' => $this->getFinalDate(),\n ]);\n\n $ActDocumentUser = $this->FtActaService->getRole(ActDocumentUser::RELATION_ORGANIZER);\n $maker = $ActDocumentUser->getUser()->getPK();\n\n $TareaService->setMaker($maker);\n $TareaService->setManagers($users);\n /*$TareaService->setDocument(\n $this->FtActaService->getFtActa()->documento_iddocumento,\n Tarea::TIPO_RECORDATORIO,\n $maker\n );*/\n }", "title": "" }, { "docid": "be0b1c875f4f06269cc07b5b9b6211ce", "score": "0.6051729", "text": "public function insert($djceleryWorkerstate);", "title": "" }, { "docid": "75bfc1b64a5508bbad136519520a8446", "score": "0.60455126", "text": "public function run()\n {\n DB::table('parqueadero')->insert([\n 'puestos' => 12,\n 'nombre' => 'Uno',\n 'pisos' => 1,\n 'state' => 1,\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n }", "title": "" }, { "docid": "bb48a3f320927deff464203bf74f408d", "score": "0.6044182", "text": "public function run()\n {\n DB::table('projetos')->insert([\n 'nome_projeto' => 'Trabalho',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n DB::table('projetos')->insert([\n 'nome_projeto' => 'Casa',\n 'created_at' => now(),\n 'updated_at' => now()\n ]);\n }", "title": "" }, { "docid": "69ffc4f6d3da8e86614b94c5ef696d96", "score": "0.60348535", "text": "public function run()\n {\n \n DB::table('tipocontacto')->insert([ \n \t\t'tipo'=>'Personal', \t\n \t]);\n\n DB::table('tipocontacto')->insert([ \n \t\t'tipo'=>'Empresa', \t\n \t]);\n\n }", "title": "" }, { "docid": "da5dcec7ea84d50be91cd184a996f2f2", "score": "0.60333186", "text": "public function run()\n {\n // Vytvoření seedu pro STATUS tasku\n Status::create(['name'=>'success']);\n Status::create(['name'=>'created']);\n\n /**\n * vytvoreni zaznamu deseti tasku s nahodnym poctem komentaru\n * celkovy pocet komentaru je roven 30\n * Vysledek je - task ma 0 - 30 commentaru\n */\n factory(Task::class, 10)->create();\n factory(Comment::class, 30)->create();\n\n }", "title": "" }, { "docid": "df124ce765bac7ec71dbf3ba2ee9c700", "score": "0.6032214", "text": "function addNewTask($taskId, $agentId, $dependsOn, $kind, $implementorId,$alg)\n{\n\t$con=db_Open_conn();\n\tmysql_select_db(\"server\",$con);\n\t//sanitizing the parameters we got\n\t$name = mysql_real_escape_string($agentId);\n\t$depends = mysql_real_escape_string($dependsOn);\n\t$kind = mysql_real_escape_string($kind);\n\t$password = mysql_real_escape_string($implementorId);\n\t$date = date(\"Y-m-d H:i:s\");\n\t$str=\"INSERT INTO tasks VALUES (\".$taskId.\",\".$dependsOn.\", '$alg','\".$kind.\"', '\".$agentId.\"', '\".$implementorId.\"',NOW(),0)\";\n\t$ans=mysql_query($str);\n\techo $ans; \n\t\n\t//now get the id we got as auto incremented value\n\t//$idReq = \"SELECT * FROM tasks WHERE AgentId = '$agentId' AND dependOn = '$dependsOn' AND kind = '$kind' \n\t\t\t\t//AND ImplementorId = '$implementorId' AND commandDate = '$date'\";\n\t//$result = mysql_query($idReq);\n\t\n\tmysql_close($con);\n\t//echo($result);\n\treturn $taskId;\n}", "title": "" }, { "docid": "145ae5a1c9d21186fe488d5a8ee2de7f", "score": "0.6032114", "text": "private function insertBatchesToDatabase()\n {\n $this->database->insertMultiple('batches', $this->batchesToSave);\n $ids = $this->database->getLastInsertIds();\n\n $index = 0;\n foreach ($this->batchesToSave as $key => $batch) {\n $this->lastBatches[$key] = [\n 'id' => $ids[$index],\n 'date' => $batch['date'],\n 'ref_num' => $batch['ref_num']\n ];\n\n $index++;\n }\n }", "title": "" }, { "docid": "f9698c7adc1e32102183ddeedffb4516", "score": "0.6024241", "text": "public function run()\n {\n Task::create([\n 'name' => 'Wymiana żarówki',\n 'description' => 'Wymiana żarówki w garderobie',\n 'location' => 'c115',\n 'section_id' => '3'\n ]);\n\t\tTask::create([\n 'name' => 'Sprzątanie pokoju',\n 'description' => 'Całościowe sprzątanie pokoju przed wizytą gości',\n 'location' => 'pokój 27',\n 'section_id' => '4'\n ]);\n\t\tTask::create([\n 'name' => 'Uzupełnienie zapasów w magazynie',\n 'description' => 'Należy uzupełnić zapasy żywności w magazynie',\n 'location' => 'magazyn',\n 'section_id' => '2'\n ]);\n }", "title": "" }, { "docid": "ee22308273b314fe4275c117fedd7558", "score": "0.6015205", "text": "public function run()\n {\n $faker = Faker::create();\n for ($i = 0 ; $i<20 ; $i ++ ) {\n $task = new \\App\\Task();\n $task->user_id = 7;\n $task->task = $faker->title;\n $task->description = $faker->randomLetter;\n $task->save();\n }\n }", "title": "" }, { "docid": "ac813408f8e73a4a8ce384e43aa018be", "score": "0.60130453", "text": "function addTask($task, $data){\n\t\t$ins = array();\n\t\t$ins['task'] \t= $task;\n\t\t$ins['data'] \t= json_encode($data);\n\t\t$ins['created'] = time();\n\t\treturn $this->save($ins);\n\t}", "title": "" }, { "docid": "e25678af9dc011926f0e763fc1e89ae6", "score": "0.60107964", "text": "public function addTask(array $info): int\n {\n $this->db->insert('tasks', $info);\n return intval($this->db->lastInsertId());\n }", "title": "" }, { "docid": "dfeb22c0810f9f213e5b09c459c94f08", "score": "0.60031176", "text": "public function run()\n {\n foreach ($this->resources as $resource) {\n \tDB::table('resources')->insert($resource);\n }\n }", "title": "" }, { "docid": "d50b84f2b9c8b2b1e3d3b60cc9bb00fe", "score": "0.59947366", "text": "public function run()\n {\n //\n $key_company_id = DB::table('users')->pluck('id')->all();\n $product_id = DB::table('tasks')->pluck('id')->all();\n \n //Seed product_key_companies table with 20 entries\n foreach ((range(1, 20)) as $index) \n {\n DB::table('usertasks')->insert(\n [\n 'task_id' => $product_id[array_rand($product_id)],\n 'user_id' => $key_company_id[array_rand($key_company_id)]\n ]\n );\n }\n }", "title": "" }, { "docid": "aeda21ca882d39e9603da89c86e5cd63", "score": "0.59906584", "text": "public function run()\n {\n $tipos = [\n [1, 'texto'],\n [2, 'alternativas']\n ];\n \n $tipos = array_map(function($tipo) {\n return [\n 'id' => $tipo[0],\n 'descripcion' => $tipo[1],\n 'created_at' => Carbon::now()->format('d-m-y h:i:s'),\n 'updated_at' => Carbon::now()->format('d-m-y h:i:s')\n ];\n }, $tipos);\n \n DB::table('tipo_pregunta')->insert($tipos);\n }", "title": "" }, { "docid": "3b446d38d7f621e3eafd750189b5a13c", "score": "0.5984527", "text": "public function run()\n {\n $status = ['View', 'In Progress', 'Done'];\n $users_ids = User::all()->modelKeys();\n for($i = 0; $i < 20; $i++) {\n $statusKey = array_rand($status);\n $users_idsKey = array_rand($users_ids);\n DB::table('tasks')->insert([\n 'title' => 'Title '.Str::random(15),\n 'description' => 'Decription '.Str::random(15),\n 'status' => $status[$statusKey],\n 'user_id' => $users_ids[$users_idsKey],\n ]);\n }\n }", "title": "" }, { "docid": "8def3dbf801c63f0ecfc1ed79534c92e", "score": "0.5982525", "text": "public function run()\r\r\n {\r\r\n DB::table('perfiles')->insert(array(\r\r\n array(\r\r\n 'nombre' => 'Administrador',\r\r\n 'estado' => 1 \r\r\n ),\r\r\n array(\r\r\n 'nombre' => 'Administrador empresa',\r\r\n 'estado' => 2 \r\r\n )\r\r\n ));\r\r\n }", "title": "" }, { "docid": "534848b028007ef210bc9cf6471fe105", "score": "0.597495", "text": "public function run()\n {\n $params = [\n 'name' => 'taro1',\n 'mail' => '[email protected]',\n 'age' => 12,\n ];\n DB::table('people')->insert($params);\n\n $params = [\n 'name' => 'taro2',\n 'mail' => '[email protected]',\n 'age' => 13,\n ];\n DB::table('people')->insert($params);\n\n $params = [\n 'name' => 'taro3',\n 'mail' => '[email protected]',\n 'age' => 14,\n ];\n DB::table('people')->insert($params);\n }", "title": "" }, { "docid": "064a5166735b93130f136d81c1c51494", "score": "0.59598625", "text": "public function run()\n {\n DB::table('todo')->insert([\n ['taskName' => '全体共通',\n 'taskDes' => 'ベランダ',\n 'startDate' => '2020-08-09',\n 'startTime' => '12:21:00',\n 'endDate' => '2020-08-09',\n 'endTime' => '13:31:00',\n 'priorityType' => 1,\n 'notifyFlag' => 0,\n 'compFlag' => 0,\n 'deleteFlag' => 0],\n ]);\n }", "title": "" }, { "docid": "9a5a30dbe644dadd7260febe8988382a", "score": "0.5953259", "text": "public function run()\n {\n DB::table('projects')->insert([\n 'name' => 'Sportlights',\n 'icon' => '',\n 'parent' => NULL\n ]);\n\n DB::table('project_user')->insert([\n 'userId' => 1,\n 'projectId' => 1\n ]);\n }", "title": "" }, { "docid": "111955605ff5c1bb4b258c084958997c", "score": "0.5953258", "text": "public function insert($task_details) {\n\n\t\t$task_details['status'] = 1;\n\t\t$task_details['created_at'] = date('Y-m-d');\n\t\t$task_details['updated_at'] = date('Y-m-d');\n\n\t\t$this->db->insert('tasks', $task_details);\n\n\t\treturn $this->db->insert_id();\n\t}", "title": "" }, { "docid": "8b274aace13c200b2cc551967926e7c7", "score": "0.59454304", "text": "public function run()\n {\n //\n $groups = ['Organisation', 'Training & Learning', 'Projects', 'Clients'];\n foreach($groups as $group) {\n DB::table('task_groups')->insert([\n 'name' => $group\n ]);\n }\n }", "title": "" }, { "docid": "7d1f702ea598d3791c93396979664006", "score": "0.59448427", "text": "public function create_task()\n\t{\n\t\t$query = $this->db->query(\"INSERT INTO task_details (project_name, task_name, assigned_by, assigned_to, deadline)\n\t\t VALUES (\".$this->input->post('project_id').\", '\".$this->input->post('task_title').\"',\n\t\t '\".$this->session->email.\"', '\".$this->input->post('assigned_to').\"',\n\t\t STR_TO_DATE('\".$this->input->post('deadline').\"', '%m/%d/%Y %h:%i %p'));\");\n\t\n\t\tif($query)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "b0bc9fbd71190e3019a262abd1a2ceb3", "score": "0.594267", "text": "public function run()\n {\n $data = [[\n 'name' => 'Team 1'\n ], [\n 'name' => 'Team 2'\n ], [\n 'name' => 'Team 3'\n ]];\n try {\n \\App\\Models\\Team::insert($data);\n } catch (\\Illuminate\\Database\\QueryException $exception) {\n //\n }\n }", "title": "" }, { "docid": "681a70f23443ca6fc5414db15e103bbc", "score": "0.59412664", "text": "public function run()\n {\n DB::table('tasks')->insert([\n \t\t 'description' => 'set up working devoplment enviroment',\n 'task_name' => 'Devoplment enviroment',\n 'student_id' => 30001,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'set up working test enviroment',\n 'task_name' => 'Testing enviroment',\n 'student_id' => 30002,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Begin basic SRS',\n 'task_name' => 'SRS',\n 'student_id' => 30003,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Design database schema',\n 'task_name' => 'Database',\n 'student_id' => 30004,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'set up working devoplment enviroment',\n 'task_name' => 'Devoplment enviroment',\n 'student_id' => 30005,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 2\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'set up working test enviroment',\n 'task_name' => 'Testing enviroment',\n 'student_id' => 30006,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 2\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Begin basic SRS',\n 'task_name' => 'SRS',\n 'student_id' => 30007,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 2\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Work on SRS',\n 'task_name' => 'SRS',\n 'student_id' => 30001,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Get database online',\n 'task_name' => 'Database',\n 'student_id' => 30002,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'help get database online and working',\n 'task_name' => 'Database',\n 'student_id' => 30003,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Work on getting SRS done',\n 'task_name' => 'SRS',\n 'student_id' => 30004,\n 'sprint_started' => 1,\n 'status' => 'Continuing',\n 'group_id' => 1\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Implement working database schema',\n 'task_name' => 'Database',\n 'student_id' => 4,\n 'sprint_started' => 1,\n 'status' => 'new',\n 'group_id' => 4\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Software requirements and specifications',\n 'task_name' => 'SRS',\n 'student_id' => 4,\n 'sprint_started' => 1,\n 'status' => 'continuing',\n 'group_id' => 4\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Find a good web hosting service',\n 'task_name' => 'Web Host',\n 'student_id' => 4,\n 'sprint_started' => 2,\n 'status' => 'abandoned',\n 'group_id' => 4\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Create Web API For database interactions',\n 'task_name' => 'Web API',\n 'student_id' => 9,\n 'sprint_started' => 1,\n 'status' => 'continuing',\n 'group_id' => 4\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'create basic homepage for project',\n 'task_name' => 'Web homepage',\n 'student_id' => 9,\n 'sprint_started' => 2,\n 'status' => 'continuing',\n 'group_id' => 4\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Write Web API for database',\n 'task_name' => 'Web API',\n 'student_id' => 11,\n 'sprint_started' => 1,\n 'status' => 'continuing',\n 'group_id' => 4\n ]);\n \t\tDB::table('tasks')->insert([\n \t\t 'description' => 'Create the Web',\n 'task_name' => 'Web',\n 'student_id' => 11,\n 'sprint_started' => 2,\n 'status' => 'continuing',\n 'group_id' => 4\n ]);\n factory(App\\Task::class, 5)->create();\n\n }", "title": "" }, { "docid": "18b80f7d05c45d327839780d0fec1127", "score": "0.5932618", "text": "public function createTask (Task $task): bool {\n $statement = $this->pdo->prepare('INSERT INTO taches (nom, description, date_de_debut, date_de_fin, id_projets, id_comptes, id_avancements) VALUES (?, ?, ?, ?, ?, ?, ?)');\n return $statement->execute([\n $task->getNameTask(),\n $task->getDescriptionTask(),\n $task->getStartTask()->format('Y-m-d'),\n $task->getEndTask()->format('Y-m-d'),\n $task->getProjectTask(),\n $task->getAccountTask(),\n $task->getStatusTask()\n ]);\n }", "title": "" }, { "docid": "9ad4278b2f66dc53663aebc0cfeeb788", "score": "0.5931364", "text": "public function testCreateNewTask()\n {\n $user = $this->createAndPersistUser();\n $task = $this->createTask($user->id);\n\n// dd($this->convertTaskToArray($task));\n $this->login();\n $this->json('POST', $this->uri.'/'.$user->id.$this->uri2, $atask = $this->convertTaskToArray($task))\n ->seeJson([\n 'created' => true,\n ])\n ->seeInDatabase('tasks', $atask);\n// ->dump();\n }", "title": "" }, { "docid": "e048d560f14075c9e37dadd435b3c71d", "score": "0.59272456", "text": "function addTask($sqldata = array())\n {\n\n //validate id\n if (empty($sqldata)) {\n $this->__debugging(__line__, __function__, 0, \"Invalid SQL Data\", '');\n return false;\n }\n\n\n //______ESCAPE ALL AVAILABLE DATA____________________________________________\n foreach ($sqldata as $key => $value) {\n $$key = $this->db->escape($value);\n }\n\n\n //_____SQL QUERY_______\n $query = $this->db->query(\"INSERT INTO tasks (\n tasks_milestones_id,\n tasks_project_id,\n tasks_client_id,\n tasks_assigned_to_id,\n tasks_text,\n tasks_start_date,\n tasks_end_date,\n tasks_created_by_id,\n tasks_status,\n tasks_description,\n tasks_created_by,\n tasks_client_access\n )VALUES(\n $tasks_milestones_id,\n $tasks_project_id,\n $tasks_client_id,\n $tasks_assigned_to_id,\n $tasks_text,\n $tasks_start_date,\n $tasks_end_date,\n $tasks_created_by_id,\n $tasks_status,\n $tasks_description,\n $tasks_created_by,\n $tasks_client_access)\");\n\n $results = $this->db->insert_id(); //last item insert id\n\n //debugging data\n $this->__debugging(__line__, __function__, $execution_time, __class__, $results);\n //----------sql & benchmarking end----------\n\n //---return\n if ($results > 0) {\n return $results;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f9abf5b481fc1f0f45cb9dd72ca6ad18", "score": "0.59262216", "text": "public function run()\n {\n User::factory()\n ->has(Task::factory()->count(10))\n ->create([\n 'name' => 'Zuck Levente',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n ]);\n\n User::factory()\n ->has(Task::factory()->count(10))\n ->count(30)\n ->create();\n }", "title": "" }, { "docid": "afe0119b59c299968a44fbbf4a1bd1f2", "score": "0.5924691", "text": "public function run()\n {\n DB::table('merge_test_question')->insert(\n [\n 'test_id' => 1,\n 'question_id' => 1,\n 'display_order' => 1,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]\n );\n }", "title": "" }, { "docid": "0887d043e2080039867f4f8804c87367", "score": "0.5923692", "text": "public function run()\n {\n foreach (static::getRecords() as $record) {\n DB::table($this->table)->insert($record);\n }\n }", "title": "" }, { "docid": "95eb44a291c8548df13f75e5fcf20067", "score": "0.59212583", "text": "public function run()\n {\n {\n $now = \\Carbon\\Carbon::now();\n $estados = [\n [1,'En Proceso'],\n [2,'Por Recibir'],\n [3,'Archivado'],\n \n ];\n $estados = array_map(function($estado) use ($now){\n return [\n 'id' => $estado[0],\n 'estado' => $estado[1],\n 'updated_at' => $now,\n 'created_at' => $now,\n ];\n }, $estados);\n \\DB::table('estados')->insert($estados);\n }\n }", "title": "" }, { "docid": "17907008e0e4b64d7a422ba01dcc6609", "score": "0.5920956", "text": "public function run()\n {\n DB::table('quotations')->insert($this->dataSet);\n }", "title": "" }, { "docid": "b969285bfdce9fb7562d9481fdc71372", "score": "0.5918512", "text": "public function run()\n {\n DB::table('transactions')->insert([\n 'id' => 100,\n 'value' => 100.00,\n 'status' => 'PAGO',\n 'payment_voucher' => 'www.comprovante.com',\n 'donations_id' => 200\n ]);\n\n DB::table('transactions')->insert([\n 'id' => 101,\n 'value' => 200.00,\n 'status' => 'ABERTO',\n 'payment_voucher' => 'www.comprovante2.com',\n 'donations_id' => 201\n ]);\n }", "title": "" } ]
da8458d77e4fa1d967fa46cd26c38b24
string statement = 5;
[ { "docid": "1f3e89429b05b62f9addbd374e3e2452", "score": "0.4923497", "text": "public function setStatement($var)\n {\n GPBUtil::checkString($var, True);\n $this->statement = $var;\n }", "title": "" } ]
[ { "docid": "4871f8ea7f4a0662387da57bf31dcc1b", "score": "0.5211243", "text": "public function getStatement(): string\n {\n return $this->view->getStatement();\n }", "title": "" }, { "docid": "0b8d9da20c4dffb253cd60bfce3098d2", "score": "0.51108795", "text": "function get_statement($statement, $arg = \"null\"){\n\t\t$arg = htmlspecialchars($arg);\n\t\t$output = \"\";\n\t\t//$output .= \"<span style=\\\"color:red; font-weight:bolder;\\\">\";\n\t\t$userx = $_SESSION['username'];\n\t\tswitch ($statement) {\n\t\t case \"not_logged_in\":\n\t\t $output .= \"You are not logged in. Why dont you <a href=\\\"index.php?path=login\\\">login</a>?\";\n\t\t \t\tbreak;\n\t\t\tcase \"user_welcome\":\n\t\t $output .= \"Welcome {$userx}\";\n\t \tbreak;\n\t\t case \"logout\":\n\t\t $output .= \"<a href=\\\"index.php?path=logout\\\">Logout</a>\";\n\t \tbreak;\n\t\t default:\n\t\t $output .= \"Undefined statement.\";\n\t\t}\n\t\t\t\t//$output .= \"</span>\";\n\t\t\t\treturn $output;\t\t\t\t\n\t}", "title": "" }, { "docid": "b55012bcd0ce788659f0b29ee62042c8", "score": "0.51071495", "text": "function mT__15(){\r\n try {\r\n $_type = SimpleLexer::$T__15;\r\n $_channel = SimpleLexer::$DEFAULT_TOKEN_CHANNEL;\r\n // Simple__.g:9:7: ( 'var' ) \r\n // Simple__.g:9:9: 'var' \r\n {\r\n $this->matchString(\"var\"); \r\n\r\n\r\n }\r\n\r\n $this->state->type = $_type;\r\n $this->state->channel = $_channel;\r\n }\r\n catch(Exception $e){\r\n throw $e;\r\n }\r\n }", "title": "" }, { "docid": "a1e99c171dcb60e36bc801c36d1d606f", "score": "0.5087045", "text": "function p1_ex3() {\n\n $p1_ex3_string = 'Super'; // = (string) 'Super';\n $p1_ex3_int = 42; // = (integer) 42;\n $p1_ex3_float = 42.42; // = (float) 42.42;\n $p1_ex3_bool = true; // = (boolean) true; /false ou 0/1\n\n return \"String : $p1_ex3_string<br />Integer1 : $p1_ex3_int<br />Float : $p1_ex3_float<br />Boolean : $p1_ex3_bool\";\n}", "title": "" }, { "docid": "6072dd6c61bea4ecf2d7f07d67ab7b3d", "score": "0.50675756", "text": "private function detectUnescapedString($statement)\n {\n $posOfFirstElement = $this->file->findNext(T_WHITESPACE, $statement['start'], $statement['end'], true);\n $posOfArithmeticOperator = $this->file->findNext(\n [T_PLUS, T_MINUS, T_DIVIDE, T_MULTIPLY, T_MODULUS, T_POW],\n $statement['start'],\n $statement['end']\n );\n if ($posOfArithmeticOperator !== false) {\n return;\n }\n switch ($this->tokens[$posOfFirstElement]['code']) {\n case T_OPEN_PARENTHESIS:\n $this->addStatement($posOfFirstElement + 1, $this->tokens[$posOfFirstElement]['parenthesis_closer']);\n break;\n case T_STRING:\n if (!in_array($this->tokens[$posOfFirstElement]['content'], $this->allowedFunctions)) {\n $this->file->addWarning($this->warningMessage, $posOfFirstElement, $this->warningCode);\n }\n break;\n case T_START_HEREDOC:\n case T_DOUBLE_QUOTED_STRING:\n $this->file->addWarning($this->warningMessage, $posOfFirstElement, $this->warningCode);\n break;\n case T_VARIABLE:\n $posOfObjOperator = $this->findLastInScope(T_OBJECT_OPERATOR, $posOfFirstElement, $statement['end']);\n if ($posOfObjOperator === false) {\n $this->file->addWarning($this->warningMessage, $posOfFirstElement, $this->warningCode);\n break;\n }\n $posOfMethod = $this->file->findNext([T_STRING, T_VARIABLE], $posOfObjOperator + 1, $statement['end']);\n if ($this->tokens[$posOfMethod]['code'] === T_STRING &&\n (in_array($this->tokens[$posOfMethod]['content'], $this->allowedMethods) ||\n stripos($this->tokens[$posOfMethod]['content'], $this->containMethodName) !== false)\n ) {\n break;\n } else {\n $this->file->addWarning($this->warningMessage, $posOfMethod, $this->warningCode);\n }\n break;\n case T_CONSTANT_ENCAPSED_STRING:\n case T_DOUBLE_CAST:\n case T_INT_CAST:\n case T_BOOL_CAST:\n default:\n return;\n }\n }", "title": "" }, { "docid": "2b368cf4d5ccbd2ecca35db74fffb2ff", "score": "0.5054617", "text": "public function code($string) {\n\t\treturn \"`$string`\";\n\t}", "title": "" }, { "docid": "69a6fad3380dc27c4746991f390f4fce", "score": "0.50152504", "text": "function getInteger5(){\r\n\r\n\t\treturn 5;\r\n\t}", "title": "" }, { "docid": "556043ff78883eede549a70023f9765c", "score": "0.49844545", "text": "function p1_ex5() {\n $p1_ex5_add = 3 + 4;\n $p1_ex5_mult = 5 * 20;\n $p1_ex5_div = 45 / 5;\n \n return \"3 + 4 = $p1_ex5_add<br />5 * 20 = $p1_ex5_mult<br />45 / 5 = $p1_ex5_div\"; \n}", "title": "" }, { "docid": "1205d5d123cccc5c3f188754022cd2bf", "score": "0.4939609", "text": "public function statement()\n {\n return $this->stm;\n }", "title": "" }, { "docid": "c528ec53b0f8d33c39bac2c6adde58ba", "score": "0.49091467", "text": "function new_exercise($x) {\n\n $block = \"<br/><hr/><br/><br/>Exercise $x starts here:<br/>\"; //Exception has occured. Warning: Undefined variable $x;\n echo $block;\n\n}", "title": "" }, { "docid": "ad9744cdf64c1a48f200f198544e2023", "score": "0.48846254", "text": "public function code(): int;", "title": "" }, { "docid": "6407ab4656621c3b6423f3cf8e260872", "score": "0.4882016", "text": "function p1_ex4() {\n settype($p1_ex4_int, \"integer\");\n return 'Vide : '.$p1_ex4_int.'<br />Valeur : '.$p1_ex4_int += 42;\n}", "title": "" }, { "docid": "f94b8dea7232b4c7568e62226ab4ca22", "score": "0.48798844", "text": "public static function getStatementType(String $query) : Int\n\t{\n\t\t$type = 0;\n\t\tif (preg_match(\"/^SELECT|select|Select([^ ]+)/\", $query)) {\n\t\t\t$type = 1;\n\t\t}\n\n\t\tif (preg_match(\"/^INSERT([^ ]+)/\", $query)) {\n\t\t\t$type = 2;\n\t\t}\n\n\t\tif (preg_match(\"/^UPDATE([^ ]+)/\", $query)) {\n\t\t\t$type = 3;\n\t\t}\n\n\t\tif (preg_match(\"/^DELETE([^ ]+)/\", $query)) {\n\t\t\t$type = 4;\n\t\t}\n\n\t\treturn $type;\n\t}", "title": "" }, { "docid": "3c4c6648556cb0b1547e0eb888fe2183", "score": "0.4867193", "text": "function yy_r33(){\n $val = yy('Literal', $this->yystack[$this->yyidx + 0]->minor);\n $this->_retvalue = $val;\n }", "title": "" }, { "docid": "9eb4bc90aaf936dd4d12966f9bf45718", "score": "0.48662814", "text": "public function getStatement(array $settings = [])/*# : string */;", "title": "" }, { "docid": "34d1f0d99ccceb740546519148f287ad", "score": "0.48648268", "text": "public function getFirstStatement(): string\n {\n return $this->firstStatement;\n }", "title": "" }, { "docid": "8e1870cf5977e3c702207c50ee5e37d5", "score": "0.4854948", "text": "function _parseStatementBank() {\n\t\treturn 'ING';\n\t}", "title": "" }, { "docid": "6726cc430efcbcd351c819f09f8dc689", "score": "0.48533276", "text": "public static function variable(string $message): string\r\n {\r\n $code = '<span class=\"testbed-variable\">%s</span>';\r\n $var = strpos($message, '$') === 0 ? $message : \"$$message\";\r\n return sprintf($code, $var);\r\n }", "title": "" }, { "docid": "a85a670b96ca2d1981ac6ec7ad4f561b", "score": "0.48392767", "text": "function t( $str )\n{\n return $str;\n}", "title": "" }, { "docid": "a9014c60dc78d4f3466a7757acbca0f7", "score": "0.4831453", "text": "public function identifier($string)\n\t{\n\t\treturn '\"'.$string.'\"';\n\t}", "title": "" }, { "docid": "05644d9ac83930b82b6e44578711b084", "score": "0.48251006", "text": "public function getVarCode()\n {\n return str_replace('is_', '', $this->getVariable());// tt::display_to_code($this->getSection() . $this->getParagraph()));\n }", "title": "" }, { "docid": "7a711cdd027ddc90d93ec99d0a28bc19", "score": "0.48033407", "text": "public function getIdentifier(): string|int;", "title": "" }, { "docid": "34c7d46b1977d19f46163806e23a46ee", "score": "0.47973526", "text": "public function getStatement () {\n \n //Otros métodos\n return $this->_statement;\n }", "title": "" }, { "docid": "9c6eca5874d1a1750cfecd17cd5f6b7d", "score": "0.47777787", "text": "function yy_r10(){ $this->_retvalue = yy('Literal', $this->yystack[$this->yyidx + 0]->minor); }", "title": "" }, { "docid": "50405b3799b1547a970efff31c8b5e9e", "score": "0.47692135", "text": "function t ($str) {\n return $str;\n}", "title": "" }, { "docid": "405e31eedc7f52fa43e4315f2968db18", "score": "0.47363123", "text": "public function getVariable(string $name): string;", "title": "" }, { "docid": "a2c031120e3c656c4ef0ca2a11bfd645", "score": "0.47323054", "text": "function getSqlStr($string){\n return \"'\".$string.\"'\";\n}", "title": "" }, { "docid": "cbe85e47fbbce15c2210f485486fc411", "score": "0.47279716", "text": "function CompileStatement() {\n global $Line, $LineLen, $C, $P, $NoErrorB;\n $cs = ''; # compiled statement\n if (Step() !== false) { # step over the [ and check for an expression in case this is [expr]\n $p = $P;\n #$NoErrorB = true; # to return false on error but no output or incr of $Errors\n #$expr = Expr();\n #$NoErrorB = false;\n #if ($expr !== false)\n # $cs = \"Expr($expr)\";\n #else{\n # not an expr\n PBack($p);\n switch ($Line[$P]) {\n case 'b': $cs = Bstatements(); break; # [block]\n case 'c': $cs = Cstatements(); break; # [col\n case 'd': $cs = Dstatements(); break; # [date\n case 'e': $cs = Estatements(); break; # [else] [else if [end]\n case 'f': $cs = Fstatements(); break; # [footer] [function\n case 'h': $cs = Hstatements(); break; # [header] [h#\n case 'i': $cs = Istatements(); break; # [if\n case 'l': $cs = Lstatements(); break; # [line] [lines\n case 'n': $cs = Nstatements(); break; # [nl] [np]\n case 'p': $cs = Pstatements(); break; # [p [page# [para nameP]\n case 'r': $cs = Rstatements(); break; # [row\n case 's': $cs = Sstatements(); break; # [span\n case 't': $cs = Tstatements(); break; # [table] [toc\n case 'x': $cs = Xstatements(); break; # [xref\n case 'z': $cs = Zstatements(); break; # [zone\n case false: break; # EOL\n # default: break;\n }\n #}\n #echo \"cs=$cs, C=$C<br>\";\n #Dump('cs',$cs);\n #Dump('C',$C);\n if ($cs === false) { # error has been logged already\n MoveToStatementEnd();\n $cs = '';\n }else if ($C != ']') { # Expect to be at the closing ]\n $p = $P;\n MoveToStatementEnd();\n RGError($C == ']' ? 'Unexpected stuff before the ]' : 'A closing ] is missing', $p);\n $cs = '';\n }\n }\n return $cs;\n}", "title": "" }, { "docid": "ed5ace360fd38770b07909dcd952a7f6", "score": "0.46743068", "text": "function yy_r196(){\r\n $this->_retvalue = new _smarty_code($this, '(string)'.$this->yystack[$this->yyidx + -1]->minor);\r\n }", "title": "" }, { "docid": "56b3a8f322898146c991d5ff0fad0361", "score": "0.46724725", "text": "function codeAdd(string $str): string {\n return $str . \" \" . \"codelex\";\n}", "title": "" }, { "docid": "03b1eca203fe0ff54366017a5fd14eeb", "score": "0.46695614", "text": "public static function string ($s) {\n\t\t#/opt/haxe/std/php/_std/Std.hx:46: characters 3-27\n\t\treturn Boot::stringify($s);\n\t}", "title": "" }, { "docid": "0a73021b4b2cdf3fe731191b4c341009", "score": "0.4662663", "text": "public function identifier(): int;", "title": "" }, { "docid": "ec8f3f2f52f457437401a60247e228c8", "score": "0.46620712", "text": "public function getLiteralPhase()\n {\n return $this->literal_phase;\n }", "title": "" }, { "docid": "cb3d6fea4154ee76f1c02c871b8d97db", "score": "0.46561894", "text": "function AlexAge($bigwolf){\n echo \"Alex is $bigwolf.<br />\";\n}", "title": "" }, { "docid": "7621dfd2153164f1d0582b54c8a4a64b", "score": "0.4650614", "text": "function testVariable($dede)\n{\n echo $dede;\n}", "title": "" }, { "docid": "7f3e9837b6e4c4b151cf98602457253b", "score": "0.46415418", "text": "function createCase(){\n\tfor($i=0; $i<13; $i++){\n\t\t//\t\techo \"\\$state$i = $i,<br>\";\n\t}\n\tfor($i=0; $i<13; $i++){\n\t\techo \"\n\t\tcase \\$state$i:{\n\t\tif(\\$queryWord==''){\n\t\t\t\\$state = \\$state;\n\t\t\t}\n\t\t\telse{\n\t\t\t\\$state = \\$state;\n\t\t\t}\n\t\t}break;<br>\";\n\t}\n}", "title": "" }, { "docid": "8a740dd23eb0bb8050d6f59eb80a92b8", "score": "0.46405804", "text": "public function test($string)\r\n\t{\r\n\t\treturn \"Hello \" . $string . \" !\";\r\n\t}", "title": "" }, { "docid": "a235dd043099cf8c0bca59de5c2a0316", "score": "0.46192455", "text": "public function getSecondStatement(): string\n {\n return $this->secondStatement;\n }", "title": "" }, { "docid": "e2bba3eaca18b74deb8348f451c155f1", "score": "0.46190268", "text": "public function getVariableName(): ?string;", "title": "" }, { "docid": "0394892635260771abf2442b25211711", "score": "0.46143523", "text": "public function test()\n\t{\n\t\t$t = \"\";\n\t\treturn $t;\n\t}", "title": "" }, { "docid": "de248bd0f883517cfd9b6b97364e86a2", "score": "0.4610876", "text": "public function testSyntaxReturnsValue()\n\t{\n\t\tFactory::$SYNTAX['symbols'] = ['equals' => '='];\n\n\t\t$this->assertInternalType('string', Factory::syntax('symbols', 'equals'));\n\t}", "title": "" }, { "docid": "27990412ce74ba83061cd7de900ef0a5", "score": "0.46098962", "text": "function test(){\n return \"x\";\n}", "title": "" }, { "docid": "355521fdebd80c984cc4506f7f0866ff", "score": "0.4608688", "text": "protected function statementNumber($text)\n {\n if ($number = $this->getLine('28|28C', $text)) {\n return $number;\n }\n\n return null;\n }", "title": "" }, { "docid": "8fe1a061cbfa653679fcbfb35f588ab4", "score": "0.46028018", "text": "function fn5($name = \"Person\")\n {echo \"Hello $name<br>\";}", "title": "" }, { "docid": "e9b23c43487e372c2b1e9888327d2aa2", "score": "0.46013224", "text": "function say() {\n return \"Red dog say gau!\";\n }", "title": "" }, { "docid": "7228248896b2eb9e13b0a43781b72099", "score": "0.45990962", "text": "private function executeStatement()\n {\n }", "title": "" }, { "docid": "8c07263b181205e0aeedd948504483e9", "score": "0.4589281", "text": "function Sum()\n{\n$a = 1; // Define variable with same name,\n // but with local function scope.\necho \"a inside function =\";\necho \"$a \\n\"; // $a will be interpreted and\n // rendered as \"1\",\n // when you use double quotes in string.\n}", "title": "" }, { "docid": "305efcc679949bcdac78fbb089886dc3", "score": "0.45657492", "text": "function say($i) {\n echo($i . \"\\n\\n\");\n }", "title": "" }, { "docid": "dea031873eb769fcfe629c51391a5691", "score": "0.45621815", "text": "public function buildMd5Statement( $statement )\n {\n return \"MD5(\" . $statement . \")\";\n }", "title": "" }, { "docid": "985aee9e67b2c7169482a7ee9b181b5e", "score": "0.4561641", "text": "function foo() {\n\treturn 'bla' . strlen( 'herp' ) . 'derp' . 's';\n}", "title": "" }, { "docid": "0f9d1a4d55f22172e0613851dd2b2886", "score": "0.4543004", "text": "function f($string) {\n\tstatic $i=0;\n\t$i++;\n\t$len = strlen($string);\n\treturn \"f[call:$i; len:$len] - $string\\n\";\n}", "title": "" }, { "docid": "019dffca25f1938997984a3a35b5dc25", "score": "0.4539361", "text": "function t($s) { return $s; }", "title": "" }, { "docid": "6081d6b751decb71d616b4766eec3e5e", "score": "0.45332384", "text": "function t($string) {\n return $string;\n }", "title": "" }, { "docid": "9f5ab57dd035a63534df469b44eb023a", "score": "0.45279884", "text": "function showString(){\n echo 'hellow world';\n}", "title": "" }, { "docid": "18e08a8c3c768c8f36d05769a5aa4199", "score": "0.4524183", "text": "function dp($str , $var_name = \"\"){\n if ($var_name) {\n echo $var_name.\":\";\n }\n var_dump($str);\n }", "title": "" }, { "docid": "89adab13820b49e5e1735c6c43d8b331", "score": "0.4523743", "text": "function test(string $a)\r\n{\r\n var_dump($a);\r\n}", "title": "" }, { "docid": "d02181cc61837c8e8cdc2a37ec6ca723", "score": "0.4508638", "text": "public function getStatement()\n {\n return $this->statement;\n }", "title": "" }, { "docid": "d02181cc61837c8e8cdc2a37ec6ca723", "score": "0.4508638", "text": "public function getStatement()\n {\n return $this->statement;\n }", "title": "" }, { "docid": "5caf1647c1b52fd85561ec5b3115dfae", "score": "0.4508462", "text": "abstract public function exec($statement = '');", "title": "" }, { "docid": "1ed4fa0a4745c1a45113c93dda97de58", "score": "0.45032662", "text": "function adding(){\n echo 10+45;\n}", "title": "" }, { "docid": "65f895e4a5ab19f54c3ee0b9c8226674", "score": "0.44942844", "text": "function getNext($evalString) {\r\n\t $pos = strpos($evalString, \"\\t\");\r\n\t if(is_integer($pos)) {\r\n\t return substr($evalString, 0, $pos);\r\n\t } else {\r\n\t return $evalString;\r\n\t }\r\n\t}", "title": "" }, { "docid": "a404ca707381ce166d8ac6cd2ef8cf0b", "score": "0.448129", "text": "function mASSIGN(){\n try {\n $_type = GroupLexer::T_ASSIGN;\n $_channel = GroupLexer::DEFAULT_TOKEN_CHANNEL;\n // ./src/php/Antlr/StringTemplate/Language/Group.g\n // ./src/php/Antlr/StringTemplate/Language/Group.g\n {\n $this->matchChar(61); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "391015344554b97203a0ffa38d5e1dce", "score": "0.4474973", "text": "protected function statement($text)\n {\n $text = trim($text);\n if (($pos = strpos($text, ':20:')) === false) {\n throw new \\RuntimeException('Not an MT940 statement');\n }\n\n $this->statementHeader(substr($text, 0, $pos));\n return $this->statementBody(substr($text, $pos));\n }", "title": "" }, { "docid": "51eecfde73c2639230df72d353ba0fc4", "score": "0.44651484", "text": "function testSQL($sql){\n echo \"SQL: \" . $sql;\n}", "title": "" }, { "docid": "51eecfde73c2639230df72d353ba0fc4", "score": "0.44651484", "text": "function testSQL($sql){\n echo \"SQL: \" . $sql;\n}", "title": "" }, { "docid": "92dbf6d283d2cf5b9e2fcc8340cd451c", "score": "0.44563445", "text": "function getLastStatement();", "title": "" }, { "docid": "28865b1c1f6985175a647665db26d459", "score": "0.44456747", "text": "function buyPat() {\n return \"Red man bought a dog\";\n }", "title": "" }, { "docid": "9dd118d9dd475ce37db232548192f2f4", "score": "0.4441023", "text": "function komma($no)\n{\n return \"'$no'\";\n}", "title": "" }, { "docid": "139131a3f0fe04ddcb5e83543b4d9349", "score": "0.4435954", "text": "public function test()\n {\n echo '11';\n }", "title": "" }, { "docid": "ba3984160ad9b4f0a04b6ccef194b9f2", "score": "0.44345587", "text": "function my_function () {\n return 'Hello';\n}", "title": "" }, { "docid": "caa9102b5e2d4b0e5caaad86a59de2ad", "score": "0.44340822", "text": "function m1($Ab)\n {\n echo \"A's \".$Ab.\"\\n\";\n }", "title": "" }, { "docid": "56e780633b8e378ecfb53df50d6935e0", "score": "0.44183037", "text": "public function quoteValue(string $string): string;", "title": "" }, { "docid": "e9bcf2e55a9bd69ac4de188a6b0fcf2d", "score": "0.44085613", "text": "public function exec(string $statement): int|false;", "title": "" }, { "docid": "e9bcf2e55a9bd69ac4de188a6b0fcf2d", "score": "0.44085613", "text": "public function exec(string $statement): int|false;", "title": "" }, { "docid": "4fe2e44b2179a6b79cdcd5e1ad271233", "score": "0.44081482", "text": "function tester(){\n static $var = 1;\n $var++;\n return $var.'<br>'; \n}", "title": "" }, { "docid": "9a1feeb65f017428c9081cc7f04baec3", "score": "0.44080707", "text": "function testSQL($sql){\n echo \"SQL: \" . $sql;\n}", "title": "" }, { "docid": "47c7cfddbe596565f4c0ae53efe54d3c", "score": "0.44079888", "text": "protected function compileSlot(string $expression) : string\n {\n return '<?php $__env->startSlot' . $expression. '; ?>';\n }", "title": "" }, { "docid": "137d34f4c760193fec0d54022e141612", "score": "0.44072887", "text": "function quoteIdentifier($str)\n {\n return $this->quote_identifier($str);\n }", "title": "" }, { "docid": "958d8abc8deb942b486cf214af25f7cd", "score": "0.44068345", "text": "public function getLine(): int;", "title": "" }, { "docid": "444ce23327470327e11b19cddb0b7ec2", "score": "0.44061604", "text": "function mT__11(){\n try {\n $_type = t018llstarLexer::T_T__11;\n $_channel = t018llstarLexer::DEFAULT_TOKEN_CHANNEL;\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n // runtime/Php/test/Antlr/Tests/grammers/t018llstar.g\n {\n $this->matchString(\"int\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "51bf3bacca4d5dbbb3ed2a4f14ae5b5a", "score": "0.44056535", "text": "public function executeString($script, $identifier = '', $flags = self::FLAG_NONE, $time_limit = 0, $memory_limit = 0)\n {\n return new class {\n public $markup = '';\n };\n }", "title": "" }, { "docid": "f20c78a15ca1eabc9a5240fd292cc8b7", "score": "0.44045722", "text": "function ju_result_s($v, int $sl = 0):string {return ju_check_s($v) ? $v : Q::raiseErrorResult(\n\t__FUNCTION__, [sprintf('A string is required, but got %s.', ju_type($v))], ++$sl\n);}", "title": "" }, { "docid": "430c93d5801adf31541f0f0d634d0f58", "score": "0.43947804", "text": "public function getStatement() {\n return $this->statement;\n }", "title": "" }, { "docid": "430c93d5801adf31541f0f0d634d0f58", "score": "0.43947804", "text": "public function getStatement() {\n return $this->statement;\n }", "title": "" }, { "docid": "757ebac8c57b5031d7a040722813cae9", "score": "0.43812236", "text": "public function getScheme(string $statement): string\n {\n return match ($statement) {\n 'insert' => \"insert into {table} {insertColumns} {values}\",\n 'ignore' => \"insert ignore into {table} {insertColumns} {values}\",\n 'upsert' => \"insert into {table} {insertColumns} {values} on duplicate key update {updateColumns}\",\n 'select' => \"select {aggregate} {columns} from {table} {joins} {where} {groups} {havings} {orders} {limit} {offset}\",\n 'update' => \"update {table} {join} set {updateColumns} {where} {orders} {limit}\",\n 'delete' => \"delete {alias} from {table} {join} {where} {orders} {limit}\",\n default => throw new NotSupportedException(sprintf(\"Statement '%s' not supported\", $statement)),\n };\n }", "title": "" }, { "docid": "5faef062ada748ded4495a6bc5b50f61", "score": "0.43779352", "text": "function mSTRING(){\n try {\n $_type = GroupLexer::T_STRING;\n $_channel = GroupLexer::DEFAULT_TOKEN_CHANNEL;\n // ./src/php/Antlr/StringTemplate/Language/Group.g\n // ./src/php/Antlr/StringTemplate/Language/Group.g\n {\n $this->matchChar(34); \n // ./src/php/Antlr/StringTemplate/Language/Group.g\n //loop2:\n do {\n $alt2=5;\n $LA2_0 = $this->input->LA(1);\n\n if ( ($LA2_0==$this->getToken('92')) ) {\n $LA2_2 = $this->input->LA(2);\n\n if ( ($LA2_2==$this->getToken('34')) ) {\n $alt2=1;\n }\n else if ( (($LA2_2>=$this->getToken('0') && $LA2_2<=$this->getToken('33'))||($LA2_2>=$this->getToken('35') && $LA2_2<=$this->getToken('65535'))) ) {\n $alt2=2;\n }\n\n\n }\n else if ( ($LA2_0==$this->getToken('10')) ) {\n $alt2=3;\n }\n else if ( (($LA2_0>=$this->getToken('0') && $LA2_0<=$this->getToken('9'))||($LA2_0>=$this->getToken('11') && $LA2_0<=$this->getToken('33'))||($LA2_0>=$this->getToken('35') && $LA2_0<=$this->getToken('91'))||($LA2_0>=$this->getToken('93') && $LA2_0<=$this->getToken('65535'))) ) {\n $alt2=4;\n }\n\n\n switch ($alt2) {\n \tcase 1 :\n \t // ./src/php/Antlr/StringTemplate/Language/Group.g\n \t {\n \t $this->matchChar(92); \n \t $this->matchChar(34); \n\n \t }\n \t break;\n \tcase 2 :\n \t // ./src/php/Antlr/StringTemplate/Language/Group.g\n \t {\n \t $this->matchChar(92); \n \t if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('33'))||($this->input->LA(1)>=$this->getToken('35') && $this->input->LA(1)<=$this->getToken('65535')) ) {\n \t $this->input->consume();\n\n \t } else {\n \t $mse = new MismatchedSetException(null,$this->input);\n \t $this->recover($mse);\n \t throw $mse;}\n\n\n \t }\n \t break;\n \tcase 3 :\n \t // ./src/php/Antlr/StringTemplate/Language/Group.g\n \t {\n\n \t \t\t\t$msg = \"\\\\n in string\";\n \t \t\t$exception = new NoViableAltException(\"\", 0, 0, input);\n \t \t\t\tErrorManager::syntaxError(ErrorType::SYNTAX_ERROR, $this->getSourceName(), $exception, $msg);\n \t \t\t\t\n \t $this->matchChar(10); \n\n \t }\n \t break;\n \tcase 4 :\n \t // ./src/php/Antlr/StringTemplate/Language/Group.g\n \t {\n \t if ( ($this->input->LA(1)>=$this->getToken('0') && $this->input->LA(1)<=$this->getToken('9'))||($this->input->LA(1)>=$this->getToken('11') && $this->input->LA(1)<=$this->getToken('33'))||($this->input->LA(1)>=$this->getToken('35') && $this->input->LA(1)<=$this->getToken('91'))||($this->input->LA(1)>=$this->getToken('93') && $this->input->LA(1)<=$this->getToken('65535')) ) {\n \t $this->input->consume();\n\n \t } else {\n \t $mse = new MismatchedSetException(null,$this->input);\n \t $this->recover($mse);\n \t throw $mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break 2;//loop2;\n }\n } while (true);\n\n $this->matchChar(34); \n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "4370027c8002eb5c7679445627567569", "score": "0.4376867", "text": "public function test3()\n {\n echo '2233';\n }", "title": "" }, { "docid": "9d9745df2a23b6d609afc87e8604fb3b", "score": "0.43654954", "text": "private function parseStatement()\n {\n $token = $this->tokenStream->currentToken();\n\n switch ($token->getValue()) {\n case 'if':\n return $this->parseIfStatement();\n\n case 'while':\n return $this->parseWhileStatement();\n\n default:\n throw new Exception('Expected if or while');\n }\n }", "title": "" }, { "docid": "232f521a06e6dff9b71702b34fb4c27c", "score": "0.43620762", "text": "function _string($var)\n{\n return NString::get($var);\n}", "title": "" }, { "docid": "0269c17f2fc2660ea6350c5c56308f08", "score": "0.4356972", "text": "function eval_expression($expression){\n\t$code = \"\\$number = (\" . $expression . \") * 1;\";\n\teval($code);\n\treturn floor($number);\n}", "title": "" }, { "docid": "63bf354d3bd831d18a1b2b4230013431", "score": "0.43542656", "text": "function Sum()\n\n{\n\n $a = 1; // Define variable with same name,\n\n // but with local function scope.\n\n echo \"a inside function =\";\n\n echo \"$a \\n\"; // $a will be interpreted and\n\n // rendered as \"1\",\n\n // when you use double quotes in string.\n\n}", "title": "" }, { "docid": "a46e2fabc619a053fe46e0f6a89eb7e4", "score": "0.43466687", "text": "public function buildMd5Statement( $statement );", "title": "" }, { "docid": "128ac8cce4b18c72cba1bd78e86b289f", "score": "0.43443736", "text": "function ltest1() {\n\t\t\t\t\t$a = 10;\n\t\t\t\t\techo $a.\"<br>\";\n\t\t\t\t}", "title": "" }, { "docid": "486db7a31c328dce10492ad6db84b51d", "score": "0.4343694", "text": "public static function GetS($count) {\n return ($count == 1 ? '' : 's');\n }", "title": "" }, { "docid": "244e46001c6d36e6766da2bfe8f413ae", "score": "0.431983", "text": "function yy_r200(){\r\n $this->_retvalue = new _smarty_code($this, '(string)('.$this->yystack[$this->yyidx + -1]->minor.')');\r\n }", "title": "" }, { "docid": "627d809041d59fc034f5e81bfa2641b4", "score": "0.43162063", "text": "public function getSQL($statement) {\n $driver = $this->getDriver();\n switch($driver) {\n case 'sqlite':\n var_dump($statement);\n return call_user_func( [$statement, $this->getSqlFn], true );\n break;\n }\n return call_user_func( [$statement, $this->getSqlFn] );\n }", "title": "" }, { "docid": "6fb46f06068b08ea140bb8b3da32c21c", "score": "0.43137935", "text": "public function testStringPassesMinimum()\n {\n $string = 'this is longer than 5 characters';\n\n $this->length->setAdditional(['min' => 5]);\n $this->assertTrue($this->length->execute($string));\n }", "title": "" }, { "docid": "df2263854c2b69ed2c02df925048ec02", "score": "0.4311695", "text": "public static function statementFromExpression($expression) {\n if (!$expression instanceof stdClass) {\n return $expression;\n }\n\n $arguments = [];\n foreach ($expression->attributes as $attribute) {\n if ($attribute === '...') {\n continue;\n }\n $arguments[] = self::statementFromExpression($attribute);\n }\n\n $class = Arrays::get(self::$semanticMap, $expression->value, $expression->value);\n if (function_exists($class)) { // workaround for Nette interpretation of entities\n $class = ['', $class];\n }\n return new Statement($class, $arguments);\n }", "title": "" }, { "docid": "d03c453976c4cb9f8d74c41365a57683", "score": "0.43111596", "text": "public function get__(){\n\t\t\t\n\t\t\t\n\t\t\treturn 5;\n\t\t}", "title": "" }, { "docid": "d9399b0ed4a99630d22a4be10b87d9a4", "score": "0.43089056", "text": "public function question($string)\n {\n $this->output->writeln(\"<question>$string</question>\");\n }", "title": "" } ]
beee6bdfc1cc6b7b0bc54dacc3ae98b0
Sets a meta option that enables Muut commenting for new posts, if "Use Muut for Commenting" is enabled.
[ { "docid": "2b9c1dc6db2c9e7ce027cc16f1a94914", "score": "0.0", "text": "public function maybeEnableSpecificComments( $new_status, $old_status, $post ) {\n\t\t\tif ( $new_status == 'publish' ) {\n\t\t\t\tif ( muut()->getOption( 'replace_comments' ) ) {\n\t\t\t\t\tupdate_post_meta( $post->ID, 'muut_use_muut_commenting', true );\n\t\t\t\t} else {\n\t\t\t\t\tupdate_post_meta( $post->ID, 'muut_use_muut_commenting', false );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "dd82829bc0c19b902b9cea620915b54e", "score": "0.5802906", "text": "private function setCommentsOnMedia(){\n Image::setDefaultCommentEnabled( $this->configuration->showComments );\n Video::setDefaultCommentEnabled( $this->configuration->showComments );\n return $this;\n }", "title": "" }, { "docid": "812cce849783698b77395a86baa2570d", "score": "0.5767057", "text": "function add_post_meta_box( ) {\n\t\t\tadd_meta_box('Hold Your Horses Comments', __( 'Hold Your Horses', $this->plugin_domain), array($this, 'rein_in_comments'), 'post', 'normal', 'high');\n\t\t}", "title": "" }, { "docid": "c9a1f15359840cdd47f9b1b7152a64f1", "score": "0.56855524", "text": "function extend_comment_add_meta_box() {\n add_meta_box( 'title', __( 'Review Details','vibe' ), array($this,'extend_comment_meta_box'), 'comment', 'normal', 'high' );\n }", "title": "" }, { "docid": "d28021d3eee9ad19b50c3b41f0715741", "score": "0.55587846", "text": "function cren_persist_subscription_opt_in($commentId) {\r\n $value = (isset($_POST['cren_subscribe_to_comment']) && $_POST['cren_subscribe_to_comment'] == 'on') ? 'on' : 'off';\r\n return add_comment_meta($commentId, 'cren_subscribe_to_comment', $value, true);\r\n}", "title": "" }, { "docid": "3b535504653cd52bc7d17d0954f8df70", "score": "0.55392534", "text": "public function onMetaParsed(array &$meta)\n\t{\n\t\t$this->isFBCommentsOn = !empty($meta['fbcomments']);\n\t}", "title": "" }, { "docid": "4ccbc9e280b0d2e1ba8e543e12974ac7", "score": "0.55015993", "text": "function dynamicnews_display_postmeta() {\n\t\t$theme_options = dynamicnews_theme_options();\n\n\t\t// Display Date unless user has deactivated it via settings\n\t\tif ( true == $theme_options['meta_date'] ) :\n\n\t\t\tdynamicnews_meta_date();\n\n\t\tendif;\n\n\t\t// Display Author unless user has deactivated it via settings\n\t\tif ( true == $theme_options['meta_author'] ) :\n\n\t\t\tdynamicnews_meta_author();\n\n\t\tendif;\n\n\t\t// Display Comments\n\t\tif ( comments_open() ) :\n\n\t\t\tdynamicnews_meta_comments();\n\n\t\tendif;\n\n\t\tedit_post_link( esc_html__( 'Edit Post', 'dynamic-news-lite' ) );\n\t}", "title": "" }, { "docid": "6ce2f98c9eba5c17d5c0a4d05fc8f510", "score": "0.54977626", "text": "function rein_in_comments() {\n\t\t\tglobal $post, $wpdb;\n\t\t\t$post_id = $post->ID;\n\t\t\t\n\t\t\tforeach($this->meta_keys as $key ) {\n\t\t\t\tif ($post_id){\n\t\t\t\t\t$$key = get_post_meta($post_id, $key, true);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$$key = '';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sel_bar_yes = ($_HYHDisplayProgrssBar=='yes') ? 'selected=\"selected\"' : '';\n\t\t\t$sel_bar_no = ($_HYHDisplayProgrssBar=='no') ? 'selected=\"selected\"' : '';\n\t\t\t\n\t\t\t$enabled = ($_HYHLimit=='') ? '' : ' checked';\n\t\t\t$question_enabled = ($_HYHEnableQuestion=='') ? '' : ' checked';\n\t\t\t\n\t\t\t$the_post = get_post($post_id);\n\t\t\t$post_content = $the_post->post_content;\n\t\t\t$avg_time = $this->format_time(round(str_word_count(strip_tags($post_content))*60/$this->tempo));\n\t\t\t\n\t\t\tinclude(dirname(__FILE__).'/views/hyh-meta-box.php');\n\t\t}", "title": "" }, { "docid": "c2b6cecaec6c7cb7141b2cda169d0b54", "score": "0.5476792", "text": "public function setMeta(Meta $meta);", "title": "" }, { "docid": "d1333642e61bca58f8d1446ae53644ac", "score": "0.54698354", "text": "function discussion_post_info_comments($config){\n\t\t$default_config = array(\n\t\t\t'comments' => ''\n\t\t);\n\n $params = (shortcode_atts($default_config, $config));\n\n if($params['comments'] == 'yes'){\n discussion_get_module_template_part('templates/parts/post-info/post-info-comments', 'blog', '', $params);\n\t\t}\n\t}", "title": "" }, { "docid": "692d14c391111955cb04625031e76832", "score": "0.54609764", "text": "function update_meta() {\n update_post_meta( $this->post_id, 'with_song', $this->song_title );\n }", "title": "" }, { "docid": "c824c041defd0916179bc42bcc72037e", "score": "0.5415003", "text": "function setComment($val) {\n\t\t$this->comment = (bool) $val;\n\t}", "title": "" }, { "docid": "f140691ba590bfea393e242659c32558", "score": "0.54106176", "text": "public function define_process_meta( self $track, $post_id = NULL, $new_data = '' );", "title": "" }, { "docid": "875dd8a21995787e3392b32fc64cad6e", "score": "0.53931415", "text": "public function renderMuutPostMetaBox() {\n\t\t\tinclude( muut()->getPluginPath() . 'views/admin-post-metabox.php' );\n\t\t}", "title": "" }, { "docid": "88e02f40278657831bbbb0156d83c933", "score": "0.5357231", "text": "function addCommentFormFields($post, $user_id = false) {\n\t\tif (!$post->allow_video_comments) return;\n\t\t// if (!$user_id && get_option($this->pluginName . \"_anon_video_response\") == \"no\") return;\n\t\t$allow_manual_video_id = false;\n\t\tif (get_option($this->pluginName . \"_anon_video_response\") == \"yes\") $allow_manual_video_id = true;\n\t\tinclude(REVVER_ABSPATH . \"includes/comment-form-fields.php\");\n\t\treturn;\n\t}", "title": "" }, { "docid": "88e15c31537d65cbad23a77ee1885d8a", "score": "0.53468347", "text": "function egw_fb_comments()\n{\n add_options_page( 'Facebook Comments', 'Facebook Comments', 'manage_options', 'egw-fb-comments', \"egw_fb_comments_load\");\n}", "title": "" }, { "docid": "78e7f09b1a2646e0f0973492511045ea", "score": "0.5326888", "text": "public function getCommentMeta($commentObjectOrID, $key, $single = \\false, $options = []);", "title": "" }, { "docid": "ddab2e09559ddd71c06529de5658c85e", "score": "0.53115064", "text": "function setComment($comment = \"\")\n\t{\n\t\t$this->comment = $comment;\n\t}", "title": "" }, { "docid": "483ab1eecfdb8483cda96885b2e7e973", "score": "0.5296894", "text": "public function muteComments()\n {\n $postTypes = get_post_types();\n\n foreach ($postTypes as $postType) {\n remove_post_type_support($postType, 'comments');\n }\n }", "title": "" }, { "docid": "dd1b9a0cb3992ee7cb550ff186acf5d3", "score": "0.52707666", "text": "function bml_remove_comment_meta_boxes() {\n remove_meta_box( 'commentsdiv', 'page', 'normal' );\n remove_meta_box( 'commentsdiv', 'post', 'normal' );\n remove_meta_box( 'commentstatusdiv', 'post', 'normal' );\n }", "title": "" }, { "docid": "78e78204ab5517977816f7cbc0270d23", "score": "0.5249723", "text": "function defensio_send_to_moderation(){\n\tadd_filter('pre_comment_approved', create_function('$a', 'return 0;'), 99);\n\tadd_action('comment_post', 'defensio_save_meta_data');\n}", "title": "" }, { "docid": "333ff19ad7b851198c6035a4251113e1", "score": "0.5239812", "text": "public function setPost($bool) {\n $this->post = $bool;\n }", "title": "" }, { "docid": "6ae9a95db615a93177070105e4cf02f0", "score": "0.5233342", "text": "function cf_meta_edit_post() {\n\t\tglobal $cfmeta, $post;\n\t\tif ( ! is_null( $post ) ) {\n\t\t\t$cfmeta = cf_meta_gimme( 'post', $post->ID );\n\t\t\t$cfmeta->display();\n\t\t}\n\t}", "title": "" }, { "docid": "b694dcd57cb2fbf1817b40ec2ae73aee", "score": "0.5227835", "text": "function saving_meta_actionWFC($post_id){\r\n if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) return; \r\n \r\n // can you do this?\r\n //if( !current_user_can( 'edit_post' ) ) return;\r\n \r\n //$value_to_save = isset($_POST['comment_disabled'])? 'yes' : 'no';\r\n $val_save = array( 'enable_fb_coms'=>isset($_POST['enable_fb_coms'])? 'yes' : 'no',\r\n 'add_like_btn'=>isset($_POST['add_like_btn'])? 'yes' : 'no', \r\n );\r\n \r\n update_post_meta($post_id, 'wfbcomments_WFC', $val_save);\r\n\r\n}", "title": "" }, { "docid": "ce6bd87ac515f0a658a2b36cbdfaf474", "score": "0.5213355", "text": "function bodyloop_meta_options() {\n global $post;\n global $wpdb;\n\n if (defined('AI1EC_POST_TYPE'))\n wp_nonce_field('ai1ec', AI1EC_POST_TYPE);\n\n $custom = get_post_custom($post -> ID);\n $post_views_count = isset($custom[\"post_views_count\"][0]) ? $custom[\"post_views_count\"][0] : false;\n\n echo 'Vous êtes sur un article \"' . get_post_format() . '\".';\n echo '<h4>Nombre de vues</h4>';\n echo '<input name=\"post_views_count\" class=\"form-input\" value=\"' . $post_views_count . '\" size=\"16\" type=\"text\" />';\n\n $videoType = 'you';\n\n $custom = get_post_custom($post -> ID);\n\n include 'bodyloop_form_page.php';\n}", "title": "" }, { "docid": "9b19f2b915bd8e5169f42f878cf13ff7", "score": "0.520922", "text": "public function setPostMeta($id, $key, $value);", "title": "" }, { "docid": "c5151d87333ec2f5478a007b457f83e6", "score": "0.5205986", "text": "protected function set_meta_desc()\r\r\n {\r\r\n define('_KEYWORDS',_ADD_CV);\r\r\n define('_DESCRIPTION',_ADD_CV);\r\r\n define('_TITLE_PAGE',_ADD_CV);\r\r\n }", "title": "" }, { "docid": "f1b227cbca3caa9e939337ad0fb4e630", "score": "0.51858", "text": "function add_meta_settings() { \n #POST TYPE\n\t// add_meta_box( \n // 'meta_settings', // $id \n // 'Intro & Sidebar', // $title \n // 'show_meta_settings', // $callback \n // 'post', // $page \n // 'normal', // $context \n // 'high'); // $priority\n\t# PORTFOLIO TYPE\n\tadd_meta_box( \n 'meta_settings', // $id \n 'Intro & Sidebar', // $title \n 'show_meta_settings', // $callback \n 'portfolio', // $page \n 'normal', // $context \n 'high'); // $priority\n}", "title": "" }, { "docid": "c98cdbf5bb2c5237d6a0b831269fb2af", "score": "0.5179236", "text": "public function open_graph_post_metas_form($post=null,$metabox=array())\n\t{\n\t\tinclude(dirname(__FILE__).'/inc/admin/admin_open_graph_form.php');\n\t}", "title": "" }, { "docid": "07de4d3db1566f6d48a632232a236cc2", "score": "0.5172316", "text": "public function rafco_metabox() {\n\n\t\t// fetch the global post object\n\t\tglobal $post;\n\n\t\t// make sure we're working with an approved post type\n\t\tif ( ! in_array( $post->post_type, RAFCOCreator_Helper::get_rafco_types() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// bail if the API key or URL have not been entered\n\t\tif(\tfalse === $api = RAFCOCreator_Helper::get_rafco_api_data() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// only fire if user has the option\n\t\tif(\tfalse === $check = RAFCOCreator_Helper::check_rafco_cap() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// now add the meta box\n\t\tadd_meta_box( 'rafco-post-display', __( 'RAFCO Shortlink', 'rafcolinks' ), array( __class__, 'rafco_post_display' ), $post->post_type, 'side', 'high' );\n\t}", "title": "" }, { "docid": "885d66846e928e2a59f2f38c6de0b8fb", "score": "0.516511", "text": "protected function setMetaOverrides()\n {\n $this->metas = array_merge($this->metas, isset($this->options['metas']) ? $this->options['metas'] : []);\n }", "title": "" }, { "docid": "90d8da5d969982f54dcf0f6134bc5b6e", "score": "0.5164686", "text": "function setCommentsAllowed($commentson) {\n\t\t$this->set('commentson', (int) ($commentson && true));\n\t}", "title": "" }, { "docid": "5ffafe468b7d9792670ac666ab6dac2b", "score": "0.5149869", "text": "public function set_meta()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception $err_obj)\r\n\t\t{\r\n\t\t\tshow_error($err_obj->getMessage());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5ffafe468b7d9792670ac666ab6dac2b", "score": "0.5149869", "text": "public function set_meta()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception $err_obj)\r\n\t\t{\r\n\t\t\tshow_error($err_obj->getMessage());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "df88488f2da2c7c9b9908cbd230ad401", "score": "0.51483524", "text": "function setup_comments() {\n // http://perishablepress.com/wordpress-blacklist-characters/\n if ( file_exists( WP_CONTENT_DIR . '/comment-moderation-list.txt' ) ) {\n $modlist = file_get_contents( 'comment-moderation-list.txt', true );\n update_option( 'moderation_keys', $modlist );\n }\n \n // Update Comment Blacklist\n // http://www.pureblogging.com/2008/04/29/create-a-comment-blacklist-in-wordpress-download-my-list-of-spam-words/\n if ( file_exists( WP_CONTENT_DIR . '/comment-blacklist.txt' ) ) {\n $blacklist = file_get_contents( 'comment-blacklist.txt', true );\n update_option( 'blacklist_keys', $blacklist );\n }\n}", "title": "" }, { "docid": "1e4ac5928f4ed71bab1a17310de10db3", "score": "0.51376903", "text": "private function set_custom_post () {\n\t\t$args = array(\n\t\t\t'public' => true,\n\t\t\t'_builtin' => false\n\t\t);\n\t\t$post_types = get_post_types( $args, 'objects' );\n\n\t\tforeach ( $post_types as $post_type ) {\n\t\t\t$this->type_args[] = $post_type->name;\n\t\t}\n\t}", "title": "" }, { "docid": "7940c546a70b8145d147ae0d60afbe6b", "score": "0.51285475", "text": "function WumiiRelatedPosts() {\r\n $this->resetAdminOptions();\r\n \r\n $persistentOptions = get_option(self::ADMIN_OPTION_NAME);\r\n if (is_array($persistentOptions)) {\r\n foreach ($this->adminOptions as $key => $value) {\r\n if (array_key_exists($key, $persistentOptions)) {\r\n $this->adminOptions[$key] = $persistentOptions[$key];\r\n }\r\n }\r\n }\r\n \r\n // get_bloginfo('url') deprecated since WordPress 3.0.0.\r\n $this->sitePrefix = function_exists('home_url') ? home_url() : get_bloginfo('url');\r\n }", "title": "" }, { "docid": "f64fbc1080d96aea8e4b4ea46641c8f0", "score": "0.51116383", "text": "function register_post_meta() {\n\t\t$args = array(\n\t\t\t'show_in_rest' => true,\n\t\t\t'single' => true\n\t\t);\n\n\t\tregister_meta( 'post', $this->meta_key, $args );\n\t}", "title": "" }, { "docid": "72308a0fe557051e51545c986ce206a9", "score": "0.51026684", "text": "function magazine_issue_install() {\n\tadd_option(\"mic_current_issue\", '1', '', 'yes');\n}", "title": "" }, { "docid": "ad6751e5c8cc1579d0980d7f8d9c3922", "score": "0.5098775", "text": "function onParseMeta($page)\n\t{\n\t\tif(substru($page->get(\"template\"), 0, 4)==\"blog\" && $this->yellow->config->get(\"blogWithSidebar\"))\n\t\t{\n\t\t\tif(!$page->isExisting(\"sidebar\")) $page->set(\"sidebar\", \"sidebar\");\n\t\t}\n\t}", "title": "" }, { "docid": "150743ad8d527d868de94405fe3950a9", "score": "0.50953305", "text": "public function testWhenNotUsingAUsingTheDisplayAsAPageCustomFieldThatTheCommentsWillDisplayIfCommentsAreTurnedOn(\\AcceptanceTester $I)\n {\n $slugify = new Slugify();\n $postProperties = [\n 'title' => $this->faker->sentence(),\n 'content' => $this->faker->paragraph(),\n 'meta' => [\n ['checkOption','#postcustom-hide',''],\n ['checkOption','#commentstatusdiv-hide',''],\n ['checkOption','#comment_status',''],\n ],\n 'customFields' => [\n ['display_as_a_page', \"no\"]\n ]\n ];\n $I->createAPost($I, $postProperties);\n\n $I->seeElement('#comments-for-'.$slugify->slugify($postProperties['title']));\n }", "title": "" }, { "docid": "d113eaed7c98b59a90c714c156f1c3d5", "score": "0.5090742", "text": "private function setMetaCode(){\n if ($this->configuration->metaCode) {\n $document = new \\DOMDocument();\n $fragment = $document->createDocumentFragment();\n $isValidHTML = @$fragment->appendXML($this->configuration->metaCode);\n\n if ($isValidHTML) {\n $this->instantArticle\n ->addChild(\n Analytics::create()\n ->withHTML($fragment)\n );\n }\n }\n return $this;\n }", "title": "" }, { "docid": "16c849f55b19b7af4e8267a176aa326a", "score": "0.50825965", "text": "function dynamicnews_meta_comments() {\n\t?>\n\n\t<span class=\"meta-comments\">\n\t\t<?php comments_popup_link( esc_html__( 'Leave a comment', 'dynamic-news-lite' ), esc_html__( 'One comment', 'dynamic-news-lite' ), esc_html__( '% comments', 'dynamic-news-lite' ) ); ?>\n\t</span>\n\n\t<?php\n}", "title": "" }, { "docid": "8236659f7cd2e3a6fb1e38a03ebcc98c", "score": "0.5078514", "text": "function kkd_pff_rave_editor_help_metabox( $post ) {\n\n\t\t do_meta_boxes( null, 'custom-metabox-holder', $post );\n\t\t}", "title": "" }, { "docid": "d00655e06fd0a1de00f288291ef62b9c", "score": "0.50715417", "text": "function dpc_set_postmeta_flag($new_status, $old_status, $post){\n //If the post is not a revision, and it's old status is \"new\", \n //we know it is a newly created post, so we set the default flag\n if(!wp_is_post_revision($post->ID) && $old_status == 'new'){\n update_post_meta($post->ID, '_set_default_values', 'true');\n //Now send a backup of the default post meta to an option\n //We allow the user to change it here, so when that is done, we want\n //to be able to revert back to the original\n }\n}", "title": "" }, { "docid": "0d0d79c90e17f40bd25d80a0f32a0faf", "score": "0.50600034", "text": "function add_publish_options_meta_box( $post ) {\n\t\tadd_meta_box(\n\t\t\t'publish_option',\n\t\t\t__( 'Apple News', 'apple-news' ),\n\t\t\t'publish_options_meta_box',\n\t\t\t$post->post_type,\n\t\t\tapply_filters( 'apple_news_publish_meta_box_context', 'side' ),\n\t\t\tapply_filters( 'apple_news_publish_meta_box_priority', 'high' )\n\t\t);\n\t}", "title": "" }, { "docid": "c2a3e4c914c7748905357cb585b33f29", "score": "0.50590026", "text": "function wct_allow_comments_setting_callback() {\n\t?>\n\n\t<input name=\"_wc_talks_allow_comments\" id=\"_wc_talks_allow_comments\" type=\"checkbox\" value=\"1\" <?php checked( wct_is_comments_allowed() ); ?> />\n\t<label for=\"_wc_talks_allow_comments\"><?php esc_html_e( 'Allow users to add comments on talks', 'wordcamp-talks' ); ?></label>\n\n\t<?php\n}", "title": "" }, { "docid": "de522e1ae7a64ffc92f32a0097722e6d", "score": "0.50521445", "text": "Public Function setComment($comment) { $this->comment = $comment; }", "title": "" }, { "docid": "9ee2ef55a6c1fb89680d00c8dfb892d8", "score": "0.50404686", "text": "public function admin_ui_edit_meta(){\n add_meta_box(\n 'groups_metadata_mb',\n __( 'Metadata' ),\n array( &$this, 'admin_ui_metabox'),\n get_current_screen()->id,\n 'side',\n 'core'\n );\n }", "title": "" }, { "docid": "f01a1e3f4a614612427fafae87e79df5", "score": "0.5034027", "text": "public function setMeta()\n {\n // Carga los datos del meta\n $send_meta_data = WebSite::where('id', $this->web_sis)->first();\n $send_meta_title = $this->seo_title;\n $send_meta_description = $this->seo_description;\n $send_meta_keywords = $this->seo_keywords;\n $send_lang = $this->lang;\n // Indicar si queremos que se indexe o no a los robots\n $send_meta_robot = 'noindex,nofollow';\n // Carga de los metadatos en esta variable para ser pasados al view\n $this->meta_sis = CoreMeta::MetaTags($send_meta_data, $send_lang, $send_meta_title, $send_meta_description, $send_meta_keywords, $send_meta_robot);\n }", "title": "" }, { "docid": "49a03994719626b0011fef4e88c53db1", "score": "0.5019444", "text": "function klippe_mikado_set_blog_masonry_type_global_option( $options ) {\n\t\t$options['masonry'] = esc_html__( 'Blog: Masonry', 'klippe' );\n\t\t\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "f6efe1585e08cd1225096641b95bd863", "score": "0.5013947", "text": "public function enableMetaProperties()\n {\n $this->items[EntityDefinitionConfig::DISABLE_META_PROPERTIES] = false;\n }", "title": "" }, { "docid": "196bf1d1a95740bf680ff82284d14ec7", "score": "0.50068593", "text": "public function setComments($value)\n {\n $this->setProperty(\"Comments\", $value, true);\n }", "title": "" }, { "docid": "4068ff531708f5831761b951a117baea", "score": "0.49935037", "text": "protected function set_meta_data() {\r\n\t\tglobal $current_screen, $post;\r\n\r\n\t\t//set the meta boxes for the current page\r\n\t\tif ( empty( $this->meta_boxes ) ) {\r\n\t\t\t$post_type = $current_screen->post_type;\r\n\t\t\tif ( isset( $this->meta[$post_type] ) ) {\r\n\t\t\t\t$this->meta_boxes = $this->meta[$post_type];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//set the post ID\r\n\t\tif ( empty( $this->post_id ) ) {\r\n\t\t\t$this->post_id = $post->ID;\r\n\t\t\t$this->meta_obj->post_id = $post->ID;\r\n\t\t}\r\n\r\n\t\t//set the post type\r\n\t\tif ( empty( $this->post_type ) ) {\r\n\t\t\t$this->post_type = $current_screen->post_type;\r\n\t\t\t$this->meta_obj->post_type = $current_screen->post_type;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "f83d09f6ad8899532623797b24d12700", "score": "0.49930736", "text": "public function meta_textarea( )\n\t{\n\t\t$comments = get_meta_value('comments');\n\n\t\t?>\n\n\t\t<label for=\"comments\">Comments</label><!-- the label is optional -->\n\t\t<textarea name=\"comments\" id=\"cpt_comments\" cols=\"50\" rows=\"5\"><?php echo $comments; ?></textarea>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "e588bbd5d7a9aa0d0c51f2629a5e125c", "score": "0.49883577", "text": "function add_meta_if_title( $post_id ) {\n\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n return;\n }\n\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n \n $this->get_song_title();\n \n if( $this->song_title ) {\n $this->update_meta();\n }\n }", "title": "" }, { "docid": "31f5d784c792d48c7c9dfbd23e8ac88b", "score": "0.49617288", "text": "public static function add_meta_box() {\n add_meta_box(\n 'client_story_meta', // Unique ID\n 'Properties', // Box title\n [self::class, 'meta_html'], // Content callback, must be of type callable\n \"clientstory\" // Post type\n );\n }", "title": "" }, { "docid": "8afd0ec80a703cd38dd09cd376f2b713", "score": "0.49510032", "text": "public function add_protected_meta( $post, $data, $update ) {\n\n\t\tif ( ! $update && $this->type == $post['post_type'] ) {\n\n\t\t\t// Forum meta\n\t\t\t$reply_meta = array(\n\t\t\t\t'author_ip' => bbp_current_author_ip(),\n\t\t\t\t'forum_id' => bbp_get_topic_forum_id( $post['post_parent'] ),\n\t\t\t\t'topic_id' => $post['post_parent'],\n\t\t\t);\n\n\t\t\t// Insert reply meta\n\t\t\tforeach ( $reply_meta as $meta_key => $meta_value ) {\n\t\t\t\tupdate_post_meta( $post['ID'], '_bbp_' . $meta_key, $meta_value );\n\t\t\t}\n\n\t\t\t// Update the topic\n\t\t\t$topic_id = bbp_get_reply_topic_id( $post['ID'] );\n\t\t\tif ( !empty( $topic_id ) ) {\n\t\t\t\tbbp_update_topic( $topic_id );\n\t\t\t}\n\t\t\t\n\t\t\t// Update last status meta info\n bbp_update_reply_walker( $post['ID'] );\n\t\t}\n\t}", "title": "" }, { "docid": "53bbc3c092ebcf7254feda85e8c5cfe8", "score": "0.49495655", "text": "public function setMetabox()\n {\n $this->metaboxes = [\n [\n 'id' => 'project',\n 'title' => __('Project', 'vrcoder'),\n 'callback' => [$this, 'projectUi'],\n 'screen' => ['portfolio'],\n 'context' => 'normal',\n 'priority' => 'default',\n 'args' => []\n ],\n [\n 'id' => 'internship',\n 'title' => __('Internship', 'vrcoder'),\n 'callback' => [$this, 'internshipUi'],\n 'screen' => ['portfolio'],\n 'context' => 'normal',\n 'priority' => 'default',\n 'args' => []\n ],\n [\n 'id' => 'job',\n 'title' => __('Job', 'vrcoder'),\n 'callback' => [$this, 'jobUi'],\n 'screen' => ['portfolio'],\n 'context' => 'normal',\n 'priority' => 'default',\n 'args' => []\n ],\n ];\n\n if ($this->isContactFormActivated()) {\n $email = [\n 'id' => 'email',\n 'title' => __('Email', 'vrcoder'),\n 'callback' => [$this, 'emailUi'],\n 'screen' => ['sunset-contact'],\n 'context' => 'side',\n 'priority' => 'default',\n 'args' => []\n ];\n $this->metaboxes[] = $email;\n }\n \n }", "title": "" }, { "docid": "ee8827f270792c2be490027f442ceea1", "score": "0.49445367", "text": "function create_socialmedia_meta_box() {\n\tadd_meta_box(\n\t\t'socialmedia_metabox',\n\t\t'Sociala medier:',\n\t\t'create_socialmedia_metabox',\n\t\t'Moderator',\n\t\t'side',\n\t\t'default'\n\t);\n}", "title": "" }, { "docid": "940aac2938a5a64fa3ce8d1f0d4712c4", "score": "0.49354684", "text": "function Comment_moderation_nag($settings='')\n\t{\n\t $this->settings = $settings;\n\t}", "title": "" }, { "docid": "de1ea0f474d31e14d11b0454717bb0df", "score": "0.49354023", "text": "function weepeeswiss_metabox_post() {\n\t\t$post_type = 'post';\n\t\tadd_meta_box( \n\t\t\t'weepeeswiss_normal_high', __( 'Add Meta Contents', 'weepeeswiss' ), \n\t\t\t'weepeeswiss_display_normal_high_metabox', // Callback function\n\t\t\t$post_type, \n\t\t\t'normal', \n\t\t\t'high' \n\t\t);\n}", "title": "" }, { "docid": "20c8103dc39488e8d1f0f2de9f9aab68", "score": "0.49318874", "text": "function setComment($comment)\n {\n $this->_comment = $comment;\n }", "title": "" }, { "docid": "d2bf2d2c097cedb51000e55d07395481", "score": "0.49306476", "text": "function vw_automobile_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-automobile-posttype' ), 'vw_automobile_posttype_cs_meta_callback' , 'cars');\n}", "title": "" }, { "docid": "a124aa1f46276b774990c17c8fe5f126", "score": "0.49212843", "text": "function setPublicComments($a_value)\r\n\t{\r\n\t\t$this->comments = (bool)$a_value;\r\n\t}", "title": "" }, { "docid": "57ec48e1ec6a3717fe95232e800ee6ff", "score": "0.49174362", "text": "public function setMetaTag($sTagMeta);", "title": "" }, { "docid": "c741afea6844364407a12928b2549ca0", "score": "0.4917002", "text": "function gutenberg_register_block_core_post_comment() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/post-comment'\n\t);\n}", "title": "" }, { "docid": "f9f0f0f41f09331a2caf872a565b2922", "score": "0.49103495", "text": "function setComment($value) {\n return $this->setFieldValue('comment', $value);\n }", "title": "" }, { "docid": "d9c4d9a889e87a35bf73769a81f05f1e", "score": "0.49078277", "text": "function setup_bf_metabox( $options ){\r\n\r\n /**\r\n * 3. => Meta Box Options\r\n */\r\n\r\n\r\n $fields = array();\r\n\r\n /**\r\n * => Post Options\r\n */\r\n $fields['_post_options'] = array(\r\n 'name' => __( 'Post', 'better-studio' ),\r\n 'id' => '_post_options',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-page-text',\r\n );\r\n if( ! is_admin() || bf_get_admin_current_post_type() == 'post' ) {\r\n\r\n $fields['_bm_featured_post'] = array(\r\n 'name' => __('Featured Slider Post?', 'better-studio'),\r\n 'id' => '_bm_featured_post',\r\n 'std' => '0',\r\n 'type' => 'switch',\r\n 'on-label' => __( 'Yes', 'better-studio' ),\r\n 'off-label' => __( 'No', 'better-studio' ),\r\n );\r\n\r\n }\r\n $fields['_bm_disable_post_featured'] = array(\r\n 'name' => __( 'Show Featured Image/Video', 'better-studio' ),\r\n 'id' => '_bm_disable_post_featured',\r\n 'std' => 'default',\r\n 'type' => 'select',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n $fields['_featured_video_code'] = array(\r\n 'name' => __( 'Featured Video Code', 'better-studio' ),\r\n 'id' => '_featured_video_code',\r\n 'desc' => __( 'Paste YouTube, Vimeo or self hosted video URL then player automatically will be generated.', 'better-studio' ),\r\n 'type' => 'textarea',\r\n 'std' => '',\r\n );\r\n\r\n if( ! is_admin() || bf_get_admin_current_post_type() == 'post' ) {\r\n\r\n $fields['_bs_primary_category'] = array(\r\n 'name' => __( 'Primary Category', 'better-studio' ),\r\n 'desc' => __( 'When you have multiple categories for a post, auto detection chooses one in alphabetical order. These used for show an label above image in listings and breadcrumb.', 'better-studio' ),\r\n 'id' => '_bs_primary_category',\r\n 'std' => 'auto-detect',\r\n 'type' => 'select',\r\n 'options' => array(\r\n 'auto-detect' => __( 'Auto Detect', 'better-studio' ),\r\n array(\r\n 'label' => __( 'Categories', 'better-studio' ),\r\n 'options' => array( 'category_walker' => 'category_walker' ),\r\n )\r\n )\r\n );\r\n }\r\n\r\n $fields['_hide_page_title'] = array(\r\n 'name' => bf_get_admin_current_post_type() == 'post' ? __( 'Hide Post Title?', 'better-studio' ) : __( 'Hide Page Title?', 'better-studio' ),\r\n 'id' => '_hide_page_title',\r\n 'type' => 'switch',\r\n 'std' => '0',\r\n 'on-label' => __( 'Yes', 'better-studio' ),\r\n 'off-label' => __( 'No', 'better-studio' ),\r\n 'desc' => __( 'Enable this for hiding page title', 'better-studio' ),\r\n );\r\n\r\n $fields['_show_comments'] = array(\r\n 'name' => __( 'Show Comments', 'better-studio' ),\r\n 'id' => '_show_comments',\r\n 'desc' => __( 'Choose to show or hide comments area.', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n if( ! is_admin() || bf_get_admin_current_post_type() == 'post' ){\r\n\r\n $fields['_hide_post_meta'] = array(\r\n 'name' => __( 'Show Post Meta', 'better-studio' ),\r\n 'id' => '_hide_post_meta',\r\n 'desc' => __( 'Choose to show or hide post meta', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n }\r\n\r\n if( ! is_admin() || bf_get_admin_current_post_type() == 'page' ) {\r\n\r\n $fields['_social_share'] = array(\r\n 'name' => __( 'Share Box', 'better-studio' ),\r\n 'id' => '_social_share',\r\n 'desc' => __( 'Choose to show or hide share box', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'hide',\r\n 'options' => array(\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n 'top' => __( 'Top', 'better-studio' ),\r\n 'bottom' => __( 'Bottom', 'better-studio' ),\r\n 'bottom-top'=> __( 'Top & Bottom', 'better-studio' ),\r\n )\r\n );\r\n\r\n }\r\n\r\n if( ! is_admin() || bf_get_admin_current_post_type() == 'post' ){\r\n\r\n $fields['_show_social_share'] = array(\r\n 'name' => __( 'Show Share Box', 'better-studio' ),\r\n 'id' => '_show_social_share',\r\n 'desc' => __( 'Choose to show or hide share box', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n $fields['_show_related_posts'] = array(\r\n 'name' => __( 'Show Related Posts', 'better-studio' ),\r\n 'id' => '_show_related_posts',\r\n 'desc' => __( 'Choose to show or hide related posts on this post', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields['_show_post_navigation'] = array(\r\n 'name' => __( 'Show Previous/Next Pagination', 'better-studio' ),\r\n 'id' => '_show_post_navigation',\r\n 'desc' => __( 'Choose to show or hide the post navigation', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields['_show_author_box'] = array(\r\n 'name' => __( 'Show Author Info Box', 'better-studio' ),\r\n 'id' => '_show_author_box',\r\n 'desc' => __( 'Choose to show or hide the author info box', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields['_show_post_categories'] = array(\r\n 'name' => __( 'Show Post Categories', 'better-studio' ),\r\n 'id' => '_show_post_categories',\r\n 'desc' => __( 'Choose to show or hide the categories', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields['_show_post_tags'] = array(\r\n 'name' => __( 'Show Post Tags', 'better-studio' ),\r\n 'id' => '_show_post_tags',\r\n 'desc' => __( 'Choose to show or hide the tags', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n }\r\n\r\n\r\n /**\r\n * => Page Options\r\n */\r\n $fields['_page_options'] = array(\r\n 'name' => __( 'Page Style', 'better-studio' ),\r\n 'id' => '_page_options',\r\n 'std' => '0' ,\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-paint',\r\n );\r\n\r\n $fields['_layout_style'] = array(\r\n 'name' => __( 'Page Layout Style', 'better-studio' ),\r\n 'id' => '_layout_style',\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'desc' => __( 'Select page layout style.', 'better-studio' ),\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-' . Better_Mag::get_option( 'layout_style' ) .'.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'full-width'=> array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-full-width.png',\r\n 'label' => __( 'Full Width', 'better-studio' ),\r\n ),\r\n 'boxed' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-boxed.png',\r\n 'label' => __( 'Boxed', 'better-studio' ),\r\n ),\r\n 'boxed-padded'=> array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-boxed-padded.png',\r\n 'label' => __( 'Boxed (Padded)', 'better-studio' ),\r\n ),\r\n )\r\n );\r\n\r\n $fields['_bg_color'] = array(\r\n 'name' => __( 'Page Background Color', 'better-studio' ),\r\n 'id' => '_bg_color',\r\n 'type' => 'color',\r\n 'std' => Better_Mag::get_option( 'bg_color' ),\r\n 'save-std' => false,\r\n 'desc' => __( 'Setting a body background image below will override it.', 'better-studio' ),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body',\r\n 'body.boxed',\r\n ),\r\n 'prop' => array(\r\n 'background-color' => '%%value%%'\r\n )\r\n )\r\n ),\r\n );\r\n $fields['_bg_image'] = array(\r\n 'name' => __( 'Page Background Image', 'better-studio' ),\r\n 'id' => '_bg_image',\r\n 'type' => 'background_image',\r\n 'std' => '',\r\n 'save-std' => false,\r\n 'upload_label' => __( 'Upload Image', 'better-studio' ),\r\n 'desc' => __( 'Use light patterns in non-boxed layout. For patterns, use a repeating background. Use photo to fully cover the background with an image. Note that it will override the background color option.', 'better-studio' ),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body'\r\n ),\r\n 'prop' => array( 'background-image' ),\r\n 'type' => 'background-image'\r\n )\r\n ),\r\n );\r\n\r\n $fields['_gallery_images_bg_slides'] = array(\r\n 'name' => __( 'Show Gallery Images as Background Slide Show!?', 'better-studio' ),\r\n 'id' => '_gallery_images_bg_slides',\r\n 'desc' => __( 'Enabling this will be shows images of first gallery in post as background slide show in page', 'better-studio' ),\r\n 'type' => 'switch',\r\n 'std' => '0',\r\n 'on-label' => __( 'Yes', 'better-studio' ),\r\n 'off-label' => __( 'No', 'better-studio' ),\r\n );\r\n\r\n\r\n $fields[] = array(\r\n 'name' => __( 'Content Padding', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n );\r\n $fields['_content_top_padding'] = array(\r\n 'name' => __( 'Page Content Top Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_content_top_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default value.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .post-content',\r\n 'body .page-content',\r\n ),\r\n 'prop' => array( 'padding-top' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n $fields['_content_bottom_padding'] = array(\r\n 'name' => __( 'Page Content Bottom Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_content_bottom_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default value.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .post-content',\r\n 'body .page-content',\r\n ),\r\n 'prop' => array( 'padding-bottom' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n $fields['_content_left_padding'] = array(\r\n 'name' => __( 'Page Content Left Padding', 'better-studio' ),\r\n 'id' => '_content_left_padding',\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default value.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .post-content',\r\n 'body .page-content'\r\n ),\r\n 'prop' => array( 'padding-left' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n $fields['_content_right_padding'] = array(\r\n 'name' => __( 'Page Content Right Padding', 'better-studio' ),\r\n 'id' => '_content_right_padding',\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default value.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .post-content',\r\n 'body .page-content'\r\n ),\r\n 'prop' => array( 'padding-right' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n\r\n\r\n\r\n /**\r\n * => Header Options\r\n */\r\n $fields['_header_options'] = array(\r\n 'name' => __( 'Header', 'better-studio' ),\r\n 'id' => '_header_options',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-header',\r\n );\r\n $fields['_header_show_topbar'] = array(\r\n 'name' => __( 'Display Top Bar', 'better-studio' ),\r\n 'id' => '_header_show_topbar',\r\n 'desc' => __( 'Choose to show or top bar', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields['_header_show_header'] = array(\r\n 'name' => __( 'Display Header', 'better-studio' ),\r\n 'id' => '_header_show_header',\r\n 'desc' => __( 'Choose to show or header', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'show',\r\n 'options' => array(\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n $fields[] = array(\r\n 'name' => __( 'Main Navigation', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'open',\r\n );\r\n $menus['default'] = __( 'Default Main Navigation', 'better-studio' );\r\n $menus[] = array(\r\n 'label' => __( 'Menus', 'better-studio' ),\r\n 'options' => BF_Query::get_menus(),\r\n );\r\n $fields['_main_nav_menu'] = array(\r\n 'name' => __( 'Main Navigation Menu', 'better-studio' ),\r\n 'id' => '_main_nav_menu',\r\n 'desc' => __( 'Select which menu displays on this page.', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => $menus\r\n );\r\n $fields['_main_menu_style'] = array(\r\n 'name' => __( 'Main Navigation Style', 'better-studio' ),\r\n 'id' => '_main_menu_style',\r\n 'desc' => __( 'Select header menu style. ', 'better-studio' ),\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/menu-style-' . Better_Mag::get_option( 'main_menu_style' ) .'.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'normal' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/menu-style-normal.png',\r\n 'label' => __( 'Normal', 'better-studio' ),\r\n ),\r\n 'normal-center' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/menu-style-normal-center.png',\r\n 'label' => __( 'Normal - Center Align', 'better-studio' ),\r\n ),\r\n 'large' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/menu-style-large.png',\r\n 'label' => __( 'Large', 'better-studio' ),\r\n ),\r\n 'large-center' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/menu-style-large-center.png',\r\n 'label' => __( 'Large - Center Align', 'better-studio' ),\r\n ),\r\n ),\r\n );\r\n $fields['_main_menu_layout'] = array(\r\n 'name' => __( 'Main Navigation Layout', 'better-studio' ),\r\n 'id' => '_main_menu_layout',\r\n 'desc' => __( 'Select whether you want a boxed or a full width menu. ', 'better-studio' ),\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/header-menu-boxed.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'boxed' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/header-menu-boxed.png',\r\n 'label' => __( 'Boxed', 'better-studio' ),\r\n ),\r\n 'full-width' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/header-menu-full-width.png',\r\n 'label' => __( 'Full Width', 'better-studio' ),\r\n ),\r\n ),\r\n );\r\n $fields[] = array(\r\n 'name' => __( 'Header Background', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n );\r\n $fields['_header_bg_color'] = array(\r\n 'name' => __( 'Header Background Color', 'better-studio' ),\r\n 'id' => '_header_bg_color',\r\n 'type' => 'color',\r\n 'std' => Better_Mag::get_option( 'header_bg_color' ),\r\n 'save-std' => false,\r\n 'desc' => __( 'Setting a header background pattern below will override it.','better-studio'),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .header'\r\n ),\r\n 'prop' => array(\r\n 'background-color' => '%%value%%'\r\n )\r\n )\r\n )\r\n );\r\n\r\n $fields['_header_bg_image'] = array(\r\n 'name' => __( 'Header Background Image', 'better-studio' ),\r\n 'id' => '_header_bg_image',\r\n 'type' => 'background_image',\r\n 'std' => array( 'img' => '', 'type' => 'cover' ),\r\n 'save-std' => false,\r\n 'upload_label' => __( 'Upload Image', 'better-studio' ),\r\n 'desc' => __( 'Please use a background pattern that can be repeated. Note that it will override the header background color option.','better-studio'),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .header'\r\n ),\r\n 'prop' => array( 'background-image' ),\r\n 'type' => 'background-image'\r\n )\r\n ),\r\n\r\n );\r\n\r\n $fields[] = array(\r\n 'name' => __( 'Header Padding', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n );\r\n $fields['_header_top_padding'] = array(\r\n 'name' => __( 'Header Top Padding', 'better-studio' ),\r\n 'id' => '_header_top_padding',\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default value.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body.single .header'\r\n ),\r\n 'prop' => array( 'padding-top' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n $fields['_header_bottom_padding'] = array(\r\n 'name' => __( 'Header Bottom Padding', 'better-studio' ),\r\n 'id' => '_header_bottom_padding',\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default value. Values lower than 60px will break the style.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body.single .header'\r\n ),\r\n 'prop' => array( 'padding-bottom' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n\r\n\r\n\r\n /**\r\n * => Sidebar Options\r\n */\r\n $fields['_sidebar_options'] = array(\r\n 'name' => __( 'Sidebar', 'better-studio' ),\r\n 'id' => '_sidebar_options',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-sidebar',\r\n );\r\n\r\n $fields['_default_sidebar_layout'] = array(\r\n 'name' => bf_get_admin_current_post_type() == 'post' ? __( 'Post Sidebar Layout', 'better-studio' ) : __( 'Page Sidebar Layout', 'better-studio' ),\r\n 'id' => '_default_sidebar_layout',\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'desc' => __( 'Select the sidebar layout for page.', 'better-studio' ),\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-' . Better_Mag::get_option( 'default_sidebar_layout' ) . '.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'left' => array(\r\n 'img' => is_rtl() ? BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-right.png' : BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-left.png',\r\n 'label' => is_rtl() ? __( 'Right Sidebar', 'better-studio' ) : __( 'Left Sidebar', 'better-studio' ),\r\n ),\r\n 'right' => array(\r\n 'img' => is_rtl() ? BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-left.png' : BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-right.png',\r\n 'label' => is_rtl() ? __( 'Left Sidebar', 'better-studio' ) : __( 'Right Sidebar', 'better-studio' ),\r\n ),\r\n 'no-sidebar'=> array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-no-sidebar.png',\r\n 'label' => __( 'No Sidebar', 'better-studio' ),\r\n ),\r\n )\r\n );\r\n\r\n\r\n /**\r\n * => Footer Options\r\n */\r\n $fields['_footer_options'] = array(\r\n 'name' => __( 'Footer', 'better-studio' ),\r\n 'id' => '_footer_options',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-footer',\r\n );\r\n\r\n $fields['_footer_show_large'] = array(\r\n 'name' => __( 'Display Large Footer', 'better-studio' ),\r\n 'id' => '_footer_show_large',\r\n 'desc' => __( 'Choose to show or hide large footer', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields['_footer_show_lower'] = array(\r\n 'name' => __( 'Display Lower Footer', 'better-studio' ),\r\n 'id' => '_footer_show_lower',\r\n 'desc' => __( 'Choose to show or hide lower footer', 'better-studio' ),\r\n 'type' => 'select',\r\n 'std' => 'default',\r\n 'options' => array(\r\n 'default' => __( 'Default', 'better-studio' ),\r\n 'show' => __( 'Show', 'better-studio' ),\r\n 'hide' => __( 'Hide', 'better-studio' ),\r\n )\r\n );\r\n\r\n $fields[] = array(\r\n 'name' => __( 'Large Footer Padding', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n );\r\n $fields['_footer_large_top_padding'] = array(\r\n 'name' => __( 'Large Footer Top Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_footer_large_top_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .footer-larger-wrapper'\r\n ),\r\n 'prop' => array(\r\n 'padding-top' => '%%value%%px'\r\n ),\r\n )\r\n ),\r\n );\r\n $fields['_footer_large_bottom_padding'] = array(\r\n 'name' => __( 'Large Footer Top Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_footer_large_bottom_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .footer-larger-wrapper'\r\n ),\r\n 'prop' => array( 'padding-bottom' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n\r\n $fields[] = array(\r\n 'name' => __( 'Lower Footer Padding', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n );\r\n $fields['_footer_lower_top_padding'] = array(\r\n 'name' => __( 'Lower Footer Top Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_footer_lower_top_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .footer-lower-wrapper'\r\n ),\r\n 'prop' => array(\r\n 'padding-top' => '%%value%%px'\r\n ),\r\n )\r\n ),\r\n );\r\n $fields['_footer_lower_bottom_padding'] = array(\r\n 'name' => __( 'Lower Footer Top Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_footer_lower_bottom_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Leave empty for default.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .footer-lower-wrapper'\r\n ),\r\n 'prop' => array( 'padding-bottom' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n\r\n\r\n\r\n /**\r\n * => Slider Options\r\n */\r\n $fields['_slider_options'] = array(\r\n 'name' => __( 'Slider', 'better-studio' ),\r\n 'id' => '_slider_options',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-slider',\r\n );\r\n $fields['_show_slider'] = array(\r\n 'name' => __( 'Slider Type', 'better-studio' ),\r\n 'desc' => __( 'Select the type of slider that displays.', 'better-studio' ),\r\n 'id' => '_show_slider',\r\n 'std' => 'no' ,\r\n 'type' => 'select',\r\n 'options' => array(\r\n 'no' => __( 'No Slider', 'better-studio' ),\r\n 'better'=> __( 'BetterSlider', 'better-studio' ),\r\n 'rev' => __( 'Revolution Slider', 'better-studio' ),\r\n )\r\n );\r\n $fields['show_slider'] = array(\r\n 'name' => __( 'BetterSlider Settings', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'open',\r\n );\r\n $fields['_slider_just_featured'] = array(\r\n 'name' => __( 'Show Only Featured Posts in Slider', 'better-studio' ),\r\n 'id' => '_slider_just_featured',\r\n 'std' => '0' ,\r\n 'type' => 'switch',\r\n 'on-label' => __( 'Only Featured', 'better-studio' ),\r\n 'off-label' => __( 'All Posts', 'better-studio' ),\r\n 'desc' => __( 'Turn Off for showing latest posts in slider or On for showing posts that specified as featured posts in slider.', 'better-studio' )\r\n );\r\n\r\n $fields['_slider_style'] = array(\r\n 'name' => __( 'Slider Style', 'better-studio' ),\r\n 'id' => '_slider_style',\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-' . Better_Mag::get_option( 'slider_style' ) . '.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'style-1' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-1.png',\r\n 'label' => __( 'Style 1', 'better-studio' ),\r\n ),\r\n 'style-2' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-2.png',\r\n 'label' => __( 'Style 2', 'better-studio' ),\r\n ),\r\n 'style-3' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-3.png',\r\n 'label' => __( 'Style 3', 'better-studio' ),\r\n ),\r\n 'style-4' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-4.png',\r\n 'label' => __( 'Style 4', 'better-studio' ),\r\n ),\r\n 'style-5' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-5.png',\r\n 'label' => __( 'Style 5', 'better-studio' ),\r\n ),\r\n 'style-6' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-6.png',\r\n 'label' => __( 'Style 6', 'better-studio' ),\r\n ),\r\n 'style-7' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-7.png',\r\n 'label' => __( 'Style 7', 'better-studio' ),\r\n ),\r\n 'style-8' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-8.png',\r\n 'label' => __( 'Style 8', 'better-studio' ),\r\n ),\r\n 'style-9' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-9.png',\r\n 'label' => __( 'Style 9', 'better-studio' ),\r\n ),\r\n 'style-10' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/slider-style-10.png',\r\n 'label' => __( 'Style 10', 'better-studio' ),\r\n ),\r\n )\r\n );\r\n $fields['_slider_bg_color'] = array(\r\n 'name' => __( 'Slider Background Color', 'better-studio' ),\r\n 'id' => '_slider_bg_color',\r\n 'desc' => __( 'Customize slider background color.', 'better-studio' ),\r\n 'type' => 'color',\r\n 'std' => Better_Mag::get_option( 'slider_bg_color' ),\r\n 'save-std' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => 'body .main-slider-wrapper' ,\r\n 'prop' => array('background-color')\r\n )\r\n ),\r\n );\r\n $fields['_slider_cats'] = array(\r\n 'name' => __( 'Filter Slider by Categories', 'better-studio' ),\r\n 'id' => '_slider_cats',\r\n 'type' => 'ajax_select',\r\n 'std' => Better_Mag::get_option( 'slider_cats' ),\r\n 'desc' => __( 'Select categories for showing post of them in slider. you can use combination of multiple category and tag.', 'better-studio' ),\r\n 'placeholder' => __(\"Search and find category...\", 'better-studio'),\r\n \"callback\" => 'BF_Ajax_Select_Callbacks::cats_callback',\r\n \"get_name\" => 'BF_Ajax_Select_Callbacks::cat_name',\r\n );\r\n $fields['_slider_tags'] = array(\r\n 'name' => __( 'Filter Slider by Tags', 'better-studio' ),\r\n 'id' => '_slider_tags',\r\n 'type' => 'ajax_select',\r\n 'std' => Better_Mag::get_option( 'slider_tags' ),\r\n 'desc' => __( 'Select tags for showing post of them in slider. you can use combination of multiple category and tag.', 'better-studio' ),\r\n 'placeholder' => __(\"Search and find tag...\", 'better-studio'),\r\n \"callback\" => 'BF_Ajax_Select_Callbacks::tags_callback',\r\n \"get_name\" => 'BF_Ajax_Select_Callbacks::tag_name',\r\n );\r\n $fields[] = array(\r\n 'name' => __( 'Slider Custom Post Type', 'better-studio' ),\r\n 'desc' => __( 'Enter your custom post types here. Separate with ,', 'better-studio' ),\r\n 'id' => 'slider_post_type',\r\n 'type' => 'text',\r\n 'std' => '',\r\n );\r\n $fields[] = array(\r\n 'name' => __( 'Revolution Slider Settings', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'open',\r\n );\r\n $fields['_slider_rev_id'] = array(\r\n 'name' => __( 'Select Default Revolution Slider', 'better-studio' ),\r\n 'desc' => __( 'Select the unique name of the slider.', 'better-studio' ),\r\n 'id' => '_slider_rev_id',\r\n 'std' => '0' ,\r\n 'type' => 'select',\r\n 'options' => array(\r\n '0' => __( 'Select A Slider', 'better-studio' ),\r\n ) + BF_Query::get_rev_sliders()\r\n );\r\n $fields[] = array(\r\n 'name' => __( 'Slider Padding', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n );\r\n $fields['_slider_top_padding'] = array(\r\n 'name' => __( 'Slider Top Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_slider_top_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Default padding is 20px.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .main-slider-wrapper'\r\n ),\r\n 'prop' => array(\r\n 'padding-top' => '%%value%%px'\r\n ),\r\n )\r\n ),\r\n );\r\n $fields['_slider_bottom_padding'] = array(\r\n 'name' => __( 'Slider Bottom Padding', 'better-studio' ),\r\n 'suffix' => __( 'Pixel', 'better-studio' ),\r\n 'id' => '_slider_bottom_padding',\r\n 'desc' => __( 'In pixels without px, ex: 20. <br>Default padding is 20px.', 'better-studio' ),\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'css-echo-default' => false,\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .main-slider-wrapper'\r\n ),\r\n 'prop' => array( 'padding-bottom' => '%%value%%px' ),\r\n )\r\n ),\r\n );\r\n\r\n /**\r\n * Breadcrumb\r\n */\r\n $fields[] = array(\r\n 'name' => __( 'Breadcrumb' , 'better-studio' ),\r\n 'id' => 'breadcrumb_settings',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-link'\r\n );\r\n $fields['_breadcrumb_style'] = array(\r\n 'name' => __( 'Breadcrumb Style', 'better-studio' ),\r\n 'id' => '_breadcrumb_style',\r\n 'desc' => __( 'Select breadcrumb style. ', 'better-studio' ),\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/breadcrumb-style-' . Better_Mag::get_option( 'breadcrumb_style' ) . '.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'normal' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/breadcrumb-style-normal.png',\r\n 'label' => __( 'Normal', 'better-studio' ),\r\n ),\r\n 'normal-center' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/breadcrumb-style-normal-center.png',\r\n 'label' => __( 'Center Align', 'better-studio' ),\r\n ),\r\n ),\r\n );\r\n\r\n\r\n /**\r\n * => Custom Javascript / CSS\r\n */\r\n $fields['_custom_css_settings'] = array(\r\n 'name' => __( 'Custom CSS' , 'better-studio' ),\r\n 'id' => '_custom_css_settings',\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-css3',\r\n 'margin-top'=> '20',\r\n );\r\n $fields['_custom_css_code'] = array(\r\n 'name' => __( 'Custom CSS Code', 'better-studio' ),\r\n 'id' => '_custom_css_code',\r\n 'type' => 'textarea',\r\n 'std' => '',\r\n 'desc' => __( 'Paste your CSS code, do not include any tags or HTML in the field. Any custom CSS entered here will override the theme CSS. In some cases, the !important tag may be needed.', 'better-studio' )\r\n );\r\n $fields['_custom_css_class'] = array(\r\n 'name' => __( 'Custom Body Class', 'better-studio' ),\r\n 'id' => '_custom_css_class',\r\n 'type' => 'text',\r\n 'std' => '',\r\n 'desc' => __( 'This classes will be added to body.<br> Separate classes with space.', 'better-studio' )\r\n );\r\n $fields[] = array(\r\n 'name' => __( 'Responsive CSS', 'better-studio' ),\r\n 'type' => 'group',\r\n 'state' => 'close',\r\n 'desc' => 'Paste your custom css in the appropriate box, to run only on a specific device',\r\n );\r\n $fields['_custom_css_desktop_code'] = array(\r\n 'name' => __( 'Desktop', 'better-studio' ),\r\n 'id' => '_custom_css_desktop_code',\r\n 'type' => 'textarea',\r\n 'std' => '',\r\n 'desc' => __( '1200px +', 'better-studio' )\r\n );\r\n $fields['_custom_css_ipad_landscape_code'] = array(\r\n 'name' => __( 'iPad Landscape', 'better-studio' ),\r\n 'id' => '_custom_css_ipad_landscape_code',\r\n 'type' => 'textarea',\r\n 'std' => '',\r\n 'desc' => __( '1019px - 1199px', 'better-studio' )\r\n );\r\n $fields['_custom_css_ipad_portrait_code'] = array(\r\n 'name' => __( 'iPad Portrait', 'better-studio' ),\r\n 'id' => '_custom_css_ipad_portrait_code',\r\n 'type' => 'textarea',\r\n 'std' => '',\r\n 'desc' => __( '768px - 1018px', 'better-studio' )\r\n );\r\n $fields['_custom_css_phones_code'] = array(\r\n 'name' => __( 'Phones', 'better-studio' ),\r\n 'id' => '_custom_css_phones_code',\r\n 'type' => 'textarea',\r\n 'std' => '',\r\n 'desc' => __( '768px - 1018px', 'better-studio' )\r\n );\r\n\r\n\r\n //\r\n // Support custom post types\r\n //\r\n $pages = array( 'post', 'page' );\r\n if( Better_Mag::get_option( 'advanced_post_options_types' ) != '' )\r\n $pages = array_merge( explode( ',', Better_Mag::get_option( 'advanced_post_options_types' ) ), $pages );\r\n\r\n\r\n /**\r\n * 3.1. => General Post Options\r\n */\r\n $options['better_options'] = array(\r\n 'config' => array(\r\n 'title' => bf_get_admin_current_post_type() == 'page' ? __( 'Better Page Options', 'better-studio' ) : __( 'Better Post Options', 'better-studio' ),\r\n 'pages' => $pages,\r\n 'context' => 'normal',\r\n 'prefix' => false,\r\n 'priority' => 'high'\r\n ),\r\n 'panel-id' => '__better_mag__theme_options',\r\n 'fields' => $fields\r\n );\r\n\r\n\r\n /**\r\n * 3.3. => WooCommerce Product Page Options\r\n */\r\n if( function_exists( 'is_woocommerce' ) ){\r\n\r\n $fields = array();\r\n $fields['_layout'] = array(\r\n 'name' => __( 'Layout', 'better-studio' ),\r\n 'id' => '_layout',\r\n 'std' => '0' ,\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-paint',\r\n );\r\n $fields['_default_sidebar_layout'] = array(\r\n 'name' => __( 'Sidebar Position', 'better-studio' ),\r\n 'id' => '_default_sidebar_layout',\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'desc' => __( 'Select the sidebar layout for product. <br><br> <strong>Note:</strong> Default option image shows what style selected for default sidebar layout in theme options.', 'better-studio' ),\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-' . Better_Mag::get_option( 'shop_sidebar_layout' ) . '.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'left' => array(\r\n 'img' => is_rtl() ? BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-right.png' : BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-left.png',\r\n 'label' => is_rtl() ? __( 'Right Sidebar', 'better-studio' ) : __( 'Left Sidebar', 'better-studio' ),\r\n ),\r\n 'right' => array(\r\n 'img' => is_rtl() ? BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-left.png' : BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-right.png',\r\n 'label' => is_rtl() ? __( 'Left Sidebar', 'better-studio' ) : __( 'Right Sidebar', 'better-studio' ),\r\n ),\r\n 'no-sidebar'=> array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/sidebar-no-sidebar.png',\r\n 'label' => __( 'No Sidebar', 'better-studio' ),\r\n ),\r\n )\r\n );\r\n\r\n $fields['_style'] = array(\r\n 'name' => __( 'Page Layout', 'better-studio' ),\r\n 'id' => '_style',\r\n 'std' => 'default',\r\n 'type' => 'image_select',\r\n 'section_class' => 'style-floated-left bordered',\r\n 'desc' => __( 'Select page layout style. <br><br> <strong>Note:</strong> Default option image shows default style that selected for page in theme options.', 'better-studio' ),\r\n 'options' => array(\r\n 'default' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-' . Better_Mag::get_option( 'layout_style' ) .'.png',\r\n 'label' => __( 'Default', 'better-studio' ),\r\n ),\r\n 'full-width'=> array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-full-width.png',\r\n 'label' => __( 'Full Width', 'better-studio' ),\r\n ),\r\n 'boxed' => array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-boxed.png',\r\n 'label' => __( 'Boxed', 'better-studio' ),\r\n ),\r\n 'boxed-padded'=> array(\r\n 'img' => BETTER_MAG_ADMIN_ASSETS_URI . 'images/style-boxed-padded.png',\r\n 'label' => __( 'Boxed (Padded)', 'better-studio' ),\r\n ),\r\n )\r\n );\r\n $fields['_style_options'] = array(\r\n 'name' => __( 'Page Style', 'better-studio' ),\r\n 'id' => '_style_options',\r\n 'std' => '0' ,\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-paint',\r\n );\r\n $fields['_bg_color'] = array(\r\n 'name' => __( 'Page Background Color', 'better-studio' ),\r\n 'id' => '_bg_color',\r\n 'type' => 'color',\r\n 'std' => Better_Mag::get_option( 'bg_color' ),\r\n 'save-std' => false,\r\n 'desc' => __( 'Setting a body background image below will override it.', 'better-studio' ),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body',\r\n 'body.boxed',\r\n ),\r\n 'prop' => 'background-color'\r\n )\r\n ),\r\n );\r\n\r\n $fields['_bg_image'] = array(\r\n 'name' => __( 'Page Background Image', 'better-studio' ),\r\n 'id' => '_bg_image',\r\n 'type' => 'background_image',\r\n 'std' => '',\r\n 'save-std' => false,\r\n 'upload_label' => __( 'Upload Image', 'better-studio' ),\r\n 'desc' => __( 'Use light patterns in non-boxed layout. For patterns, use a repeating background. Use photo to fully cover the background with an image. Note that it will override the background color option.', 'better-studio' ),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body'\r\n ),\r\n 'prop' => 'background-image',\r\n 'type' => 'background-image'\r\n )\r\n ),\r\n );\r\n $fields['_header_options'] = array(\r\n 'name' => __( 'Header', 'better-studio' ),\r\n 'id' => '_header_options',\r\n 'std' => '0' ,\r\n 'type' => 'tab',\r\n 'icon' => 'bsai-header',\r\n );\r\n $fields['_header_bg_color'] = array(\r\n 'name' => __( 'Header Background Color', 'better-studio' ),\r\n 'id' => '_header_bg_color',\r\n 'type' => 'color',\r\n 'std' => Better_Mag::get_option( 'header_bg_color' ),\r\n 'save-std' => false,\r\n 'desc' => __( 'Setting a header background pattern below will override it.','better-studio'),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .header'\r\n ),\r\n 'prop' => array(\r\n 'background-color' => '%%value%%'\r\n )\r\n )\r\n )\r\n );\r\n $fields['_header_bg_image'] = array(\r\n 'name' => __( 'Header Background Image', 'better-studio' ),\r\n 'id' => '_header_bg_image',\r\n 'type' => 'background_image',\r\n 'std' => array( 'img' => '', 'type' => 'cover' ),\r\n 'save-std' => false,\r\n 'upload_label' => __( 'Upload Image', 'better-studio' ),\r\n 'desc' => __( 'Please use a background pattern that can be repeated. Note that it will override the header background color option.','better-studio'),\r\n 'css' => array(\r\n array(\r\n 'selector' => array(\r\n 'body .header'\r\n ),\r\n 'prop' => array( 'background-image' ),\r\n 'type' => 'background-image'\r\n )\r\n ),\r\n\r\n );\r\n $options['woocommerce_layout_metabox'] = array(\r\n 'config' => array(\r\n 'title' => __( 'Better Product Options', 'better-studio' ),\r\n 'pages' => array( 'product' ),\r\n 'context' => 'normal',\r\n 'prefix' => false,\r\n 'priority' => 'high'\r\n ),\r\n 'fields' => $fields,\r\n 'panel-id' => '__better_mag__theme_options',\r\n );\r\n }\r\n\r\n return $options;\r\n\r\n }", "title": "" }, { "docid": "10be9dbade277dae6afb71f86b2386ad", "score": "0.48997813", "text": "public function set_meta( $meta ) {\r\n\t\t$this->meta = $meta;\r\n\t\t$this->meta_obj->set_fields( $meta );\r\n\t}", "title": "" }, { "docid": "5664485938e83848d8278f88fa455b2a", "score": "0.48938045", "text": "function mki_metabox() {\n add_meta_box( 'mb-code', 'Shortcode', 'mki_mb_code', '', 'side', 'high' );\n add_meta_box( 'mb-syn', 'Syntax Highlighter', 'mki_mb_syn', '', 'side', 'high' );\n}", "title": "" }, { "docid": "d90abe2e2d3db406569b237bd403846f", "score": "0.48926896", "text": "function Set_Meta($meta_title = META_TITLE, $meta_content = META_CONTENT, $meta_charset = META_CHARSET, $meta_description = META_DESC, $meta_keywords = META_KEYWORD, $meta_author = META_AUTHOR, $meta_robots = META_ROBOTS){ \n $this->meta_array['m_lang'] = HTML_LANG;\n $this->meta_array['m_contnt'] = $meta_content;\n $this->meta_array['m_charst'] = $meta_charset;\n $this->meta_array['m_ptitle'] = $meta_title;\n $this->meta_array['m_descri'] = $meta_description;\n $this->meta_array['m_keywor'] = $meta_keywords;\n $this->meta_array['m_author'] = $meta_author;\n $this->meta_array['m_robots'] = $meta_robots; \n }", "title": "" }, { "docid": "11e8186323d174f5523bca7ddeb474c8", "score": "0.48879322", "text": "public function admin_metabox() {\n\t\tadd_meta_box('onesignal-push', __('Send webpush', 'onesignal-push'), [$this, 'display_metabox'], 'post', 'side', 'low');\n\t}", "title": "" }, { "docid": "2d1e98587fa2a8d36b8e4bc43fd704d7", "score": "0.48809454", "text": "function set_document_comment($text='') {\n\t\t$this->fields['hwc'] = $text;\n\t}", "title": "" }, { "docid": "0cae5636fa72496d33c299dcf2075f2a", "score": "0.48686492", "text": "function theme_options_metatag()\r\n\t{\r\n\r\n\t\tadd_menu_page( \"Meta Tags\", \"Meta Tags\", 'manage_options',\"options/meta.php\", \"theme_metatag_admin\");\r\n\t}", "title": "" }, { "docid": "8c06377edaa3e177133453b5e063c9a1", "score": "0.4865942", "text": "public function set_discussion(bool $discussion);", "title": "" }, { "docid": "f20f00103796a78989dc3b94476bfece", "score": "0.48582336", "text": "function sage_post_meta() {\n echo '<ul class=\"post-meta small\">';\n\n if ( get_post_type() === 'post' ) {\n // If the post is sticky, mark it.\n if ( is_sticky() ) {\n echo '<li class=\"meta-featured-post\"><i class=\"fa fa-thumb-tack\"></i> ' . __( 'Sticky', 'sage' ) . ' </li>';\n }\n\n // The categories. \n $category_list = get_the_category_list( ', ' );\n if ( $category_list ) {\n echo '<li><i class=\"fa fa-folder-open-o\"></i> ' . $category_list . ' </li>';\n }\n\n // Comments link.\n if ( comments_open() ) :\n echo '<li><i class=\"fa fa-comments-o\"></i>';\n comments_popup_link( __( 'Leave a comment', 'sage' ), __( 'One comment', 'sage' ), __( '% comments', 'sage' ) );\n echo '</li>';\n endif;\n\n //getPostLikeLink();\n echo '<li><i class=\"fa fa-heart-o\"></i><a href=\"#\">84 Likes</a></li>';\n\n // Edit link.\n if ( is_user_logged_in() ) {\n echo '<li class=\"\">';\n edit_post_link( __( 'Edit', 'sage' ), '<span class=\"meta-edit\">', '</span>' );\n echo '</li></ul>';\n }\n }\n}", "title": "" }, { "docid": "9311e9d5666bcbbae1345e66bef2b160", "score": "0.48524058", "text": "function crypton_blog_trx_addons_action_before_post_meta() {\n\t\tif (trx_addons_is_on(trx_addons_get_option('emotions_allowed')) && is_single() && !is_attachment())\n\t\t\ttrx_addons_get_post_reactions(true);\n\t}", "title": "" }, { "docid": "9737299dff067367e2b440d43cb76b4a", "score": "0.48510492", "text": "function meta_settings(){\n // Soliloquy Meta Editor\n // Use: wp.media.template( 'soliloquy-meta-editor-lightbox' )\n ?>\n <script type=\"text/html\" id=\"tmpl-soliloquy-meta-editor-lightbox\">\n\t\t\n\t\t\t<div class=\"soliloquy-meta\">\n\t\t\t\t\t \n\t\t\t <label class=\"setting\">\n\t\t\t <span class=\"name\"><?php esc_html_e( 'Load in Lightbox?', 'soliloquy-lightbox' ); ?></span>\n\t\t\t\t\t<input class=\"soliloquy-lightbox-enable\" type=\"checkbox\" name=\"lightbox_enable\" value=\"1\"<# if ( data.lightbox_enable == '1' ) { #> checked <# } #> />\n\t\t\t\t\t<span class=\"check-label\"><?php esc_html_e( 'Opens slide in lightbox, requires Lightbox to be enabled within the Lightbox tab.', 'soliloquy-lightbox' ) ?></span>\n\n\t\t\t\t</label>\n\t\t\t\t \n\t </div>\n \n </script>\n <?php\t\n\t}", "title": "" }, { "docid": "bda6381212a5b391001aca3c8bf92344", "score": "0.48461717", "text": "public function _construct()\r\n\t{\r\n\t\t$this\r\n\t\t\t->setArea('post')\t\t\t\t\t\t// Can also accept an array of multiple areas\r\n\t\t\t->setTitle($this->__('Post Notes'))\t\t// Appears at the top of the meta box\r\n\t\t\t->setPriority()\t\t\t\t\t\t\t// Can also accept a priority value, else the default is applied\r\n\t\t\t->setTemplate('Postnote/Meta.phtml')\t// Path to the template is relative to your module (eg: 'Rootd/Postnote/Meta.phtml')\r\n\t\t\t;\r\n\r\n\t\t// Special flag for core module and features, you do not need to add this\r\n\t\t$this->_renderArea = 'core';\r\n\t}", "title": "" }, { "docid": "ba564859c92e5f3281436eeac385878c", "score": "0.48370478", "text": "public function renderMeta(){\n global $post;\n $view = self::getView();\n\n $description = WP\\Helpers\\HtmlHelper::getMetaDescription();\n if(!$description){\n if(is_single() || is_page()){\n $description = get_post_meta($post->ID, 'description', true);\n if(!$description){\n $description = get_the_excerpt();\n }\n }\n if(is_tax()){\n $description = term_description();\n }\n }\n if(!$description){\n $description = OptionHelper::getOption('defaultDescription');\n }\n\n $view->assign('description', $description);\n\n $keywords = WP\\Helpers\\HtmlHelper::getMetaKeywords();\n if(!$keywords){\n if(is_single() || is_page()){\n $keywords = get_post_meta($post->ID, 'keywords', true);\n if(!$keywords){\n $richPost = WP\\Models\\PostModel::unpackDbRecord($post);\n $terms = $richPost->loadTerms();\n $keywords = [];\n if($terms){\n foreach($terms as $taxonomy=>$ts){\n $keywords = array_merge($keywords, $ts);\n }\n }\n $keywords = array_unique($keywords);\n $keywords = join(', ', $keywords);\n }\n }\n }\n if(!$keywords){\n $keywords = OptionHelper::getOption('defaultKeywords');\n }\n\n $view->assign('keywords', $keywords);\n\n echo $view->render('seo/meta.phtml');\n }", "title": "" }, { "docid": "31147213b5294cd97d96ee5c665f11a0", "score": "0.483671", "text": "function br_custom_meta() {\n\t\tadd_meta_box(\n\t\t\t'br_meta',\n\t\t\t'Link URL',\n\t\t\t'br_meta_callback',\n\t\t\t'blogroll', \n\t\t\t'normal',\n\t\t\t'high'\n\t\t);\n\t}", "title": "" }, { "docid": "3e74bc589c91e7af06848908696fbe23", "score": "0.48332682", "text": "function clpr_setup_meta_box() {\n\n\tadd_meta_box( 'coupon-meta-box', __( 'Coupon Meta Fields', APP_TD ), 'clpr_custom_fields_meta_box', APP_POST_TYPE, 'normal', 'high' );\n\n\tremove_meta_box( 'tagsdiv-stores', APP_POST_TYPE, 'core' );\n\tremove_meta_box( 'coupon_typediv', APP_POST_TYPE, 'core' );\n\n\tremove_meta_box( 'postexcerpt', APP_POST_TYPE, 'normal' );\n\tremove_meta_box( 'authordiv', APP_POST_TYPE, 'normal' );\n\n\t//custom post statuses\n\t//temporary hack until WP will fully support custom post statuses\n\tremove_meta_box( 'submitdiv', APP_POST_TYPE, 'core' );\n\tadd_meta_box( 'submitdiv', __( 'Publish', APP_TD ), 'clpr_post_submit_meta_box', APP_POST_TYPE, 'side', 'high' );\n\n}", "title": "" }, { "docid": "d81396e7b1e2420b2efd0bbcb65249bd", "score": "0.4831357", "text": "function sta_npc_plugin_admin() {\n\t\t\t\t\tif ( function_exists( 'add_options_page' ) ) {\n\t\t\t\t\t\tadd_options_page( __( 'No Page Comment Settings', $this->plugin_domain ), __( 'No Page Comment', $this->plugin_domain ), 'manage_options', $this->plugin_file, array( $this, 'sta_npc_print_admin_page' ) );\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "aec99a643191fc1ee9d7aecf4f6ad524", "score": "0.48309663", "text": "public function setTHAPSComment($comment);", "title": "" }, { "docid": "7b5dfa815c6002f9ce86f7312e9edf4a", "score": "0.48307034", "text": "public function setMeta($key, $value = null);", "title": "" }, { "docid": "ef65d55f6b4c2f7b8dd58897bdcda8fc", "score": "0.48238105", "text": "function save_meta_options( $postID ){\n\t\t$post = $_POST;\n\t\tif((isset($post['update']) || isset($post['save']) || isset($post['publish']))){\n\n\n\t\t\t$user_template = (isset($post['pagelines_template'])) ? $post['pagelines_template'] : '';\n\n\t\t\tif($user_template != ''){\n\t\t\t\t\n\t\t\t\tpl_set_page_template( $postID, $user_template, 'both' );\n\t\t\t\t\n\t\t\t}\n\n\n\t\t}\n\t}", "title": "" }, { "docid": "b9d8fd9d460746d9e9af4c00964b65b5", "score": "0.48195186", "text": "function wct_disjoin_comments_setting_callback() {\n\t?>\n\n\t<input name=\"_wc_talks_disjoin_comments\" id=\"_wc_talks_disjoin_comments\" type=\"checkbox\" value=\"1\" <?php checked( wct_is_comments_disjoined() ); ?> />\n\t<label for=\"_wc_talks_disjoin_comments\"><?php esc_html_e( 'Separate comments made on talks from the other post types.', 'wordcamp-talks' ); ?></label>\n\n\t<?php\n}", "title": "" }, { "docid": "7bd03779ae0d021997a906a1d8a9c3eb", "score": "0.4812275", "text": "function r_create_metaboxes(){\n add_meta_box(\n 'r_recipe_options_mb',\n __( 'Recipe Options', 'recipe' ),\n 'r_recipe_options_mb',\n 'recipe', //post tyoe in which this metabox will appear in\n 'normal', //this is where it will appear in the ui\n 'high'\n );\n}", "title": "" }, { "docid": "cbdf0873bf3c9c22c1400ba914668511", "score": "0.48104042", "text": "public function create_post_meta(){\n\t\t\tglobal $post;\n\n\t\t\tif($post && $this->check_itsfree_pkg($post->ID)){\n\t\t\t\tadd_meta_box('dev_post_expired', __('Mbaron Afati', $this->domain), array(&$this, 'post_meta_content'), $this->directory_slug, 'side', 'core');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "537d41f3fa9ca94c3f06758dad5d30b1", "score": "0.48061493", "text": "public function setMeta($name, $value)\n {\n $this->config['meta.'.$name] = $value;\n }", "title": "" }, { "docid": "9017365261f3914ea15653cdb85831a7", "score": "0.48029506", "text": "function myplugin_add_meta_box() {\n add_meta_box('customPostMeta'\n , __( 'Metadata', 'myplugin_textdomain' )\n , 'fwPluginMetaCallback'\n , 'post'\n );\n}", "title": "" }, { "docid": "9be0c89c1ccdbb1934863e17f0e1374b", "score": "0.47975165", "text": "public static function shortcode_metabox( $post ) {\n\n\t\tadd_meta_box(\n\t\t\t'library-shortcode-metabox',\n\t\t\tesc_html__( 'Shortcode', 'ocean-extra' ),\n\t\t\tarray( 'Ocean_Extra_My_Library', 'display_metabox' ),\n\t\t\t'oceanwp_library',\n\t\t\t'side',\n\t\t\t'low'\n\t\t);\n\n\t}", "title": "" }, { "docid": "e6fcda96810e69bea18363596f9ff1ae", "score": "0.47766122", "text": "function extend_comment_edit_metafields( $comment_id ) {\n\n if(get_post_type($_POST['comment_post_ID']) != 'course') \n return;\n\n if( ! isset( $_POST['extend_comment_update'] ) || ! wp_verify_nonce( $_POST['extend_comment_update'], 'extend_comment_update' ) ) return;\n \n if ( ( isset( $_POST['review_title'] ) ) && ( $_POST['review_title'] != '') ):\n $title = wp_filter_nohtml_kses($_POST['review_title']);\n update_comment_meta( $comment_id, 'review_title', $title );\n else :\n delete_comment_meta( $comment_id, 'review_title');\n endif;\n\n if ( ( isset( $_POST['review_rating'] ) ) && ( $_POST['review_rating'] != '') ):\n $rating = wp_filter_nohtml_kses($_POST['review_rating']);\n update_comment_meta( $comment_id, 'review_rating', $rating );\n else :\n delete_comment_meta( $comment_id, 'review_rating');\n endif;\n \n }", "title": "" }, { "docid": "1b6d1e7d7208e7b97740697a5b7e6f33", "score": "0.47757608", "text": "public function setDiscussion($bool = true)\n {\n $this->otherOptions['discussion'] = ($bool) ? 'true' : 'false';\n\n return $this;\n }", "title": "" }, { "docid": "943816d62e70ca977a4084b94004675a", "score": "0.47754586", "text": "public function comment() {\n\t\t\n\t\tAuth::bounce(!$this->user);\n\t\n\t\t$this->template->title = \"Create Post\";\n\n\t\t#load the content\n\t\t$this->template->content = View::instance(\"v_posts_create\");\n\n\t\t#This renders the view\n\t\techo $this->template;\n\n\n\t}", "title": "" }, { "docid": "4a5f420e06eb76de4533ec43803ec124", "score": "0.47742814", "text": "public function registerMetaboxes(){\n if(OptionHelper::getOption('renderMetaFields')){\n $this->addMetabox('seo', 'SEO', '/metabox/seo', 'normal', 'high', null);\n }\n\n /* chayka: registerMetaboxes */\n }", "title": "" }, { "docid": "688ff3899d560854b08933ab0ef1efe2", "score": "0.47720742", "text": "function add_options_page(){\n\t\t\tadd_options_page('Hold Your Horses Comments', 'Hold Your Horses', 'administrator', basename(__FILE__), array($this,'display_options_page'));\n\t\t}", "title": "" }, { "docid": "9d65a3d73cf112cc5f43e688c377c3e7", "score": "0.47715783", "text": "function cren_persist_subscription_opt_out($commentId) {\r\n return add_comment_meta($commentId, 'cren_subscribe_to_comment', 'off ', true);\r\n}", "title": "" }, { "docid": "3ea2b21a627b78312b4289e39b1f76ad", "score": "0.4769673", "text": "public function action_updated_post_meta( $meta_id, $object_id, $meta_key, $_meta_value ) {\n if ( $meta_key == 'embed_options' ) {\n $post = Post::get( $object_id );\n if ( ! Types::is_post( $post ) ) {\n return;\n }\n $force = true;\n $post->update_embed_data( $force );\n }\n }", "title": "" }, { "docid": "f2df0c322aafd7e12a4aef1658393263", "score": "0.47645456", "text": "public function testWhenNotUsingAUsingTheDisplayAsAPageCustomFieldThatTheCommentsWillNotDisplayIfCommentsAreTurnedOff(\\AcceptanceTester $I)\n {\n $slugify = new Slugify();\n $postProperties = [\n 'title' => $this->faker->sentence(),\n 'content' => $this->faker->paragraph(),\n 'meta' => [\n ['checkOption','#postcustom-hide',''],\n ['checkOption','#commentstatusdiv-hide',''],\n ['uncheckOption','#comment_status',''],\n ],\n 'customFields' => [\n ['display_as_a_page', \"no\"]\n ]\n ];\n $I->createAPost($I, $postProperties);\n\n $I->dontSeeElement('#comments-for-'.$slugify->slugify($postProperties['title']));\n }", "title": "" }, { "docid": "79b18eb2f083859edf6833aae88479f0", "score": "0.47609845", "text": "public function testSetMarkdown()\n {\n $this->todo('stub');\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "8006aab7d2d10a65789bbdec438b9193", "score": "0.0", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Librarian',\n 'email' => '[email protected]',\n 'password' => bcrypt('librarian'),\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n\n DB::table('role_user')->insert([\n [\n 'user_id' => 2,\n 'role_id' => 2\n ],\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Borrower',\n 'email' => '[email protected]',\n 'password' => bcrypt('borrower'),\n 'full_name' => 'Borrower',\n 'gender' => 'F',\n 'contact' => '0123456789',\n 'is_student' => false,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n\n DB::table('role_user')->insert([\n [\n 'user_id' => 3,\n 'role_id' => 3\n ],\n ]);\n\n DB::table('users')->insert([\n 'name' => 'notstudent',\n 'email' => '[email protected]',\n 'password' => bcrypt('notstudent'),\n 'full_name' => 'Not Student',\n 'gender' => 'F',\n 'contact' => '0123456789',\n 'is_student' => false,\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n\n DB::table('role_user')->insert([\n [\n 'user_id' => 4,\n 'role_id' => 3\n ],\n ]);\n\n DB::table('users')->insert([\n 'name' => 'student',\n 'email' => '[email protected]',\n 'password' => bcrypt('student'),\n 'full_name' => 'Student',\n 'gender' => 'M',\n 'contact' => '0123456789',\n 'is_student' => true,\n 'student_id' => '20143012',\n 'expired_at' => '30/05/2019',\n 'created_at' => new DateTime(),\n 'updated_at' => new DateTime()\n ]);\n\n DB::table('role_user')->insert([\n [\n 'user_id' => 5,\n 'role_id' => 3\n ],\n ]);\n }", "title": "" } ]
[ { "docid": "74adb703f4d2ee8eeea828c6234b41f3", "score": "0.81044954", "text": "public function run()\n {\n Eloquent::unguard();\n\n $this->seed('Categories');\n\n // Illustration\n $this->seed('Supports');\n $this->seed('Illustrations');\n\n // Photography\n $this->seed('Photosets');\n $this->seed('Collections');\n $this->seed('Photos');\n\n $this->seed('Articles');\n $this->seed('Repositories');\n $this->seed('Services');\n $this->seed('Stories');\n $this->seed('Tableaux');\n $this->seed('Tracks');\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "0874a499bef2a647494554309f6aa0cd", "score": "0.80049884", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('ouse')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('ouse')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'fonte' => $faker->sentence,\n 'layout' => 'content-'.$i,\n 'indicadores' => json_encode([$i]),\n 'regras' => json_encode([$faker->words(3)]),\n 'types' => json_encode([$faker->words(2)]),\n 'categorias' => json_encode([$faker->words(4)]),\n 'tags' => json_encode([$faker->words(5)]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "17a49f970cd10e5cfdebd0f59e100f60", "score": "0.79215413", "text": "public function run()\n {\n User::create([\n 'first_name' => 'Administrator',\n 'last_name' => 'One',\n 'email' => '[email protected]',\n 'role_id' => 81,\n 'password' => bcrypt('mmmm')\n ]);\n User::create([\n 'first_name' => 'User',\n 'last_name' => 'One',\n 'email' => '[email protected]',\n 'role_id' => 3,\n 'password' => bcrypt('mmmm')\n ]);\n\n Role::create(\n ['name' => 'Contributor', 'id' => 3]\n );\n Role::create(\n ['name' => 'Administrator', 'id' => 81]\n );\n\n factory(User::class, 5)->create()->each(function ($user) {\n $user->posts()->saveMany(factory(Post::class, rand(2, 3))->make());\n });\n }", "title": "" }, { "docid": "6fd37af4061bceb7c3ed860b1db5b07b", "score": "0.7916311", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 1)->create([\n 'role' => 'admin'\n ]);\n factory(App\\Question::class, 1)->create(['user_id' => 1])->each(function ($question) {\n $question->hashtags()->save(factory(App\\Hashtag::class)->make());\n });\n factory(App\\Comment::class, 1)->create([\n 'question_id' => 1\n ]);\n }", "title": "" }, { "docid": "2806867c15ca7bd71920629767c01dd4", "score": "0.7899936", "text": "public function run()\n {\n Model::unguard();\n\n $faker=Faker\\Factory::create();\n App\\category::create(['title'=>'Public']);\n App\\category::create(['title'=>'Private']);\n App\\category::create(['title'=>'Family']);\n\n\n\n // $this->call(UserTableSeeder::class);\n foreach(range(1,100) as $index) {\n App\\Post::create([\n 'title'=>$faker->realText(30,2),\n 'content'=>$faker->realText(200,2),\n 'category_id'=>App\\category::all()->random()->id\n\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "96081f5559e3c4bb80f4e56c33d545f5", "score": "0.7897222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Type::insert(array(\n ['type' => 'Checkbox'], \n ['type' => 'Rango'], \n ['type' => 'Radio'], \n ['type' => 'Select']\n ));\n factory(App\\Survey::class, 5)->create()->each(function ($u){\n for ($i=0; $i <rand(1,10) ; $i++) { \n $u->questions()->save(factory(App\\Question::class)->make());\n }\n });\n }", "title": "" }, { "docid": "71daf483f301960f0f88e0c893f58c36", "score": "0.7881348", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n \n\n factory(App\\Article::class,50)\n ->create();\n \n factory(App\\Comment::class,50)\n ->create();\n\n factory(App\\Reply::class,50)\n ->create();\n\n factory(App\\Like::class,50)\n ->create();\n \n $articles = App\\Article::all();\n\n factory(App\\Tag::class,5)->create()\n ->each(function($tag) use ($articles){\n $tag->articles()->attach(\n $articles->random(6,1)->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "0b109c2cad785f4ff36ecf7d46b132de", "score": "0.78785", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\n Ruta::create([\n 'descripcion'=>'Cochan',\n 'observacion'=>'-'\n ]);\n Anexo::create([\n 'descripcion'=>'Santa Aurelia',\n 'observacion'=>'-',\n 'ruta_id'=>1\n ]);\n\n Proveedor::create([\n 'name'=>'Evhanz',\n 'apellidoP'=>'Hernandez',\n 'apellidoM'=>'Salazar',\n 'dni'=>'47085011',\n 'celular'=>'990212662',\n 'estado'=>true,\n 'anexo_id'=>1\n ]);\n\n Recurso::create([\n 'descripcion'=>'casa toro',\n 'tipo'=>'interno'\n ]);\n\n\n\n\n\n\n\n\t}", "title": "" }, { "docid": "0c456002637a63e2342e712744fc57f7", "score": "0.78721434", "text": "public function run()\n {\n \n // $categories = factory(Category::class, 10)->create();\n // $categories->each( function($category) {\n // $category->categories()->saveMany( \n // factory(Category::class, rand(0,5))->make()\n // );\n // });\n\n // $categories->each( function($category) {\n // $category->posts()->saveMany(\n // factory(Post::class, rand(0, 4) )->make()\n // );\n // });\n $this->call(LaratrustSeeder::class);\n }", "title": "" }, { "docid": "ace435808d0bbff7fbf10bb7260d46e1", "score": "0.78685874", "text": "public function run()\n {\n // factory(Author::class, 50)->create();\n Author::factory()->count(50)->create();\n\n // for ($i=0; $i<50; $i++) {\n\n // $name = \"Vardenis\".($i+1);\n // $surname = \"Pavardenis\".($i+1);\n // $username = \"Slapyvardis\".($i+1);\n\n // DB::table(\"authors\")->insert([\n // 'name'=> $name ,\n // 'surname'=> $surname ,\n // 'username'=> $username ,\n // ]);\n // }\n\n // DB::table(\"authors\")->insert([\n\n // 'name'=> 'Vardenis' ,\n // 'surname'=> 'Pavardenis',\n // 'username'=> 'Slapyvardis',\n // ]);\n }", "title": "" }, { "docid": "62d26c53627928e22ea575cc46bf775a", "score": "0.7849954", "text": "public function run()\n {\n Category::create([\n 'name' => 'Belleza',\n 'status' => 'A'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Shampoo'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Acondicionador'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Maquillaje'\n ]);\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "a07071a752d8cf92db253078ae570196", "score": "0.7844956", "text": "public function run()\n {\n $this->call(SuperuserSeeder::class);\n //$this->call(UserSeeder::class);\n\n Article::truncate();\n Category::truncate();\n User::truncate(); \n\n $basica = Category::factory()->create([ \n 'name' => 'Matemática Básica',\n 'slug' => 'matematica_basica',\n ]);\n $equacoes = Category::factory()->create([ \n 'name' => 'Equações',\n 'slug' => 'equacoes',\n ]);\n $funcoes = Category::factory()->create([ \n 'name' => 'Funções',\n 'slug' => 'funcoes',\n ]);\n\n $user = User::factory()->create([\n 'name' => 'Thiago Ryo',\n ]);\n\n Article::factory(10)->for($basica)->create([\n 'user_id' => $user->id,\n ]);\n\n Article::factory(7)->for($equacoes)->create([\n 'user_id' => $user->id,\n ]);\n Article::factory(15)->for($funcoes)->create([\n 'user_id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "177d3ebe2b223afa4e9bd6a908d0f913", "score": "0.7839857", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Article::class,5)->create();\n //factory(App\\Topic::class,20)->create();\n //factory(App\\Test::class,50)->create();\n //factory(App\\Question::class,60)->create();\n factory(App\\ArticleTest::class,5)->create();\n factory(App\\SubjectTest::class,1)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "a2a4fa12a5d7340c77994a01f5fd0004", "score": "0.7832346", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('cursos')->insert([\n 'cod_curso' => '123456',\n 'nome_curso' => 'Curso de pedagogia',\n 'instituicao_ensino' => 'Faculdade alguma coisa'\n ]);\n DB::table('alunos')->insert([\n 'nome_aluno' => '123456',\n 'curso' => 1,\n 'numero_maricula' => 'Faculdade alguma coisa',\n 'semestre' => 'Faculdade alguma coisa',\n 'status' => 'matriculado'\n ]);\n }", "title": "" }, { "docid": "b250412ac4bb97281cc75b73e99d5169", "score": "0.7827436", "text": "public function run()\n {\n factory(App\\User::class, 10)->create();\n factory(App\\Category::class, 5)->create();\n factory(App\\Question::class, 20)->create();\n factory(App\\Reply::class, 50)->create()->each(function ($reply) {\n $reply->favorite()->save(factory(App\\Favorite::class)->make());\n });\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "2bfba5dc2d1c3f62eb529c4f407a8fcd", "score": "0.7818739", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n DB::table('articles')->insert([\n 'name' => $faker->title,\n 'description' => $faker->text,\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime(),\n ]);\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "41d5d9d0667abadecd972a5a32ed0a4b", "score": "0.7810804", "text": "public function run()\n {\n\n DB::table('authors')->delete();\n\n $gender = Array('Male', 'Female', 'Other');\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n $author = new Author();\n $author->name = $faker->name;\n $author->gender = $gender[rand(0,2)];\n $author->dateOfBirth = $faker->dateTimeBetween($startDate = '-90 years', $endDate = '-25 years', $timezone = date_default_timezone_get())->format('Y-m-d');\n $author->shortBio = $faker->sentence(6, true);\n $author->country = $faker->country;\n $author->email = $faker->safeEmail;\n $author->twitter = $faker->userName;\n $author->website = 'http://www.'.$faker->domainName;\n $author->save();\n }\n\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "aa0eccb2055398458b2a6272fcb8936f", "score": "0.78012705", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Order::truncate();\n\n $faker = \\Faker\\Factory::create();\n $customers = \\App\\Models\\Customer::all()->pluck('id')->toArray();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n $alphabet = 'abcdefghijklmnopqrstuvwxyz';\n $numbers = '0123456789';\n $value = '';\n for ($j = 0; $j < 3; $j++) {\n $value .= substr($alphabet, rand(0, strlen($alphabet) - 1), 1);\n }\n Order::create([\n 'customerId' => $faker->randomElement($customers),\n 'totalPrice' => $faker->randomFloat(2, 1, 5000),\n 'isPaid' => $faker->boolean($chanceOfGettingTrue = 50),\n 'extraInfo' => $faker->boolean($chanceOfGettingTrue = 50)\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "86dd297f311dc339eb33e3e6509e604e", "score": "0.77966315", "text": "public function run()\n {\n $this->seeds([\n Poliklinik::class => ['fasilitas/polikliniks.csv', 35],\n Ruangan::class => ['fasilitas/ruangans.csv', 15],\n Kamar::class => ['fasilitas/kamars.csv', 43],\n Ranjang::class => ['fasilitas/ranjang.csv', 187],\n ]);\n }", "title": "" }, { "docid": "368508f66336ac53d1be3d6743e70422", "score": "0.7792271", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Desactivamos la revision de las llaves foraneas.\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //trunco las tablas para poder meter datos nuevos\n articulos::truncate();\n clientes::truncate();\n impuestos::truncate();\n imp_art::truncate();\n empresa::truncate();\n\n $cantidadArticulos = 20;\n $cantidadClientes = 20;\n $cantidadImpuestos = 4;\n $cantidadImp_Arts = 10;\n $cantidadEmpresas = 10;\n\n factory(articulos::class, $cantidadArticulos)->create();\n factory(clientes::class, $cantidadClientes)->create();\n factory(impuestos::class, $cantidadImpuestos)->create();\n factory(imp_art::class, $cantidadImp_Arts)->create();\n factory(empresa::class, $cantidadEmpresas)->create();\n\n }", "title": "" }, { "docid": "0a5fb8cc194091e39e8322105883b61f", "score": "0.77910054", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('jobs')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $users = User::all();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Job::create([\n 'user_id' => $users[rand(0, $users->count() - 1)]->id,\n 'title' => $faker->sentence($nbWords = 2, $variableNbWords = true),\n 'description' => $faker->sentence($nbWords = 10, $variableNbWords = true),\n 'departure' => $faker->lexify('????'),\n 'arrival' => $faker->lexify('????'),\n 'category' => $faker->sentence,\n 'limitations' => $faker->sentence,\n 'required_rank_id' => $ranks[rand(0, $ranks->count() - 1)]->id\n ]);\n }\n }", "title": "" }, { "docid": "d82dd297f054671ec046bcf0b882a63f", "score": "0.7790729", "text": "public function run()\n {\n $this->call([\n AdminSeeder::class,\n // TrackSeeder::class,\n ]);\n\n \\App\\Models\\Track::factory(10)->create();\n \\App\\Models\\Location::factory(10)->create();\n \\App\\Models\\Event::factory(20)->create();\n }", "title": "" }, { "docid": "845dcb98a7e8e0d45a3cf018b23c6ecd", "score": "0.77882665", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Product::class, 100)->create()->each(function($products){\n $products->save();\n });\n \n factory(App\\Client::class, 100)->create()->each(function($clients){\n $clients->save();\n });\n \n factory(App\\Sale::class, 100)->create()->each(function($sales){\n $sales->save();\n });\n \n }", "title": "" }, { "docid": "de60f0a26beec0ef156f5bbeb41b9ee7", "score": "0.7785993", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('projects')->truncate();\n DB::table('payments')->truncate();\n DB::table('tags')->truncate();\n DB::table('taggables')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n \n $this->call(UsersTableSeeder::class);\n \n $tags = factory(\\App\\Models\\Tag::class, 10)->create();\n factory(App\\Models\\User::class, 10)->create()->each(function ($user) use ($tags) {\n $projects = factory(\\App\\Models\\Project::class, 5)->create(['user_id' => $user->id]);\n foreach ($projects as $project) {\n $project->tags()->attach($tags->random(1));\n factory(\\App\\Models\\Payment::class, random_int(10, 30))\n ->create(['project_id' => $project->id])->each(function (\\App\\Models\\Payment $payment) use ($tags) {\n $payment->tags()->attach($tags->random(1)); \n });\n }\n });\n }", "title": "" }, { "docid": "ee06eccc68d87dcb640a4d5639c88ab8", "score": "0.77800995", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\t\t$tags = factory( \\App\\Tag :: class, 10 ) -> create();\n\t\t\n\t\t$articles = factory( \\App\\Article :: class, 20 ) -> create();\n\t\t\n\t\t$tags_id = $tags -> pluck( 'id' );\n\t\t\n\t\t$articles ->each( function( $article ) use( $tags_id ){\n\t\t\t$article -> tags() -> attach( $tags_id -> random( 3 ) );\n\t\t\tfactory( \\App\\Comment :: class, 3 ) -> create( [\n\t\t\t\t'article_id' => $article -> id\n\t\t\t] );\n\t\t\t\n\t\t\tfactory( \\App\\State :: class, 1 ) -> create( [\n\t\t\t\t'article_id' => $article -> id\n\t\t\t] );\n\t\t} );\n\t\t\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "4a49e16a546df16655fd9740de7ae5c5", "score": "0.77780515", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::table('users')->insert([\n \t[\n \t\t'username' => 'johan',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt('wachtwoord1'),\n \t],\n \t[\n \t\t'username' => 'vamidi',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt('wachtwoord1'),\n \t]\n ]);\n\n DB::table('profiles')->insert([\n \t[\n \t\t'user_id' => 1,\n \t],\n \t[\n \t\t'user_id' => 2,\n \t]\n ]);\n\n DB::table('teams')->insert(\n \t[\n \t\t'name' => 'VaMiDi Games',\n \t\t'url_name' => 'vamidi-games',\n \t]\n );\n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "8cce7ad451e41e0616427ac1279b46cd", "score": "0.77644897", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 50)->create();\n //students seeding\n $schoolsClasses = \\App\\SchoolClass::all();\n foreach ($schoolsClasses as $schoolsClass){\n $schoolsClass->student()->createMany(\n factory(\\App\\Student::class, 20)->make()->toArray()\n );\n }\n }", "title": "" }, { "docid": "120274b83b13efad13e4d0a22631a7e2", "score": "0.7763531", "text": "public function run()\n {\n\n $this->seedersPath = database_path('seeds').'/';\n $this->seed('MessagesTableSeeder');\n\n $this->seed('WishesTableSeeder');\n $this->seed('PresentsTableSeeder');\n\n $this->seed('InstitutionsTableSeeder');\n $this->seed('LocationsTableSeeder');\n $this->seed('OpeningHoursTableSeeder');\n\n $this->seed('FaqsTableSeeder');\n\n //$this->seed('PermissionRoleTableSeeder');\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "edb6c4e5c696e79c6cb87775bdf73c85", "score": "0.77605385", "text": "public function run()\n {\n factory(App\\Models\\User::class, 200)->create();\n $this->call(GenresTableSeeder::class);\n $this->call(BandsTableSeeder::class);\n factory(App\\Models\\Post::class, 1000)->create();\n $this->call(TagsTableSeeder::class);\n $this->call(PostTagTableSeeder::class);\n factory(App\\Models\\Comment::class, 5000)->create();\n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "a5eec395c42a1c641cc29056de013a2a", "score": "0.7760248", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n UserRole::truncate();\n BookList::truncate();\n BookEntry::truncate();\n\n $this->call([\n UserRoleSeeder::class,\n BookListSeeder::class,\n BookEntrySeeder::class,\n ]);\n\n User::insert([\n 'name' => 'super_admin',\n 'email' => '[email protected]',\n 'role_serial' => 1,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'role_serial' => 2,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'management',\n 'email' => '[email protected]',\n 'role_serial' => 3,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'student',\n 'email' => '[email protected]',\n 'role_serial' => 4,\n 'password' => Hash::make('12345678'),\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "fa279d8f7a87d9a40806207839ca7e30", "score": "0.7750227", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $faker = Faker::create();\n foreach ( range(1,10) as $item) {\n DB::table('fire_incidents')->insert([\n 'created_at' => $faker->dateTime,\n 'title'=> $faker->title(),\n 'first_name' => $faker->firstName,\n 'last_name'=> $faker->lastName,\n 'email'=>$faker->email,\n 'phone_number'=>$faker->phoneNumber,\n 'ip_address'=>$faker->ipv4,\n 'message'=>$faker->paragraph\n ]);\n }\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "dfa1829f132b8c48a9fa02a696b5951b", "score": "0.7737741", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(TokenPackageSeeder::class);\n\n factory(Video::class, 30)->create();\n $this->call(PurchaseSeeder::class);\n\n // factory(Comment::class, 50)->create();\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "dbb7060bbc311a18cd207473bbe8e7f1", "score": "0.7728515", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class,1)->create([\n 'name' => 'teste',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345')\n ]);\n factory(\\App\\Models\\SecaoTecnica::class,1)->create([\n 'sigla' => 'teste',\n 'descricao' => 'teste descrição'\n ]);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "0fdc3c6a7967d773048368acc1829445", "score": "0.7726644", "text": "public function run()\n {\n // TODO Seeder\n // TODO Run Seeder: php artisan migrate:fresh --seed\n // TODO Remove all tables and new create\n // TODO After run Seeder\n factory(User::class, 1)->create(['email' => '[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n factory(Category::class, 10)->create();\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "67bd68cad6c93282acfd6bf31f674b0f", "score": "0.7723515", "text": "public function run()\n {\n $db = DB::table('addresses');\n\n $faker = Faker\\Factory::create();\n $cities_id = City::all()->pluck('city_id')->toArray();\n\n foreach (Post::all()->pluck('id')->toArray() as $post_id){\n $values ['post_id'] = $post_id;\n $values ['street'] = $faker->streetAddress;\n $values ['house'] = $faker->numberBetween(1, 300);\n $values ['city_id'] = array_rand(array_flip($cities_id),1);\n\n $db->insert($values);\n }\n }", "title": "" }, { "docid": "8f23bfa6e5d2337ed218b6aa9e74c8f2", "score": "0.77190584", "text": "public function run()\n {\n $users = factory(App\\User::class,10)->create();\n\n $categories = factory(App\\Category::class,10)->create();\n\n $users->each(function(App\\User $user) use ($users){\n \tfactory(App\\Job::class, 5)->create([\n \t\t'user_id' => $user->id,\n 'category_id' => random_int(1, 10),\n \t]);\n });\n\n $reviews = factory(App\\Review::class,30)->create();\n\n Model::unguard();\n\n $this->call('PermissionsTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('ConnectRelationshipsSeeder');\n //$this->call('UsersTableSeeder');\n\n Model::reguard();\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "c8d45356aa6a26dbc0f8f55b3b96b143", "score": "0.7714273", "text": "public function run()\n {\n // prevent db error from key constraint when refresh seeder\n DB::statement('SET foreign_key_checks=0');\n DB::table('albums')->truncate();\n DB::statement('SET foreign_key_checks=1');\n\n $albums = [\n ['artist_id' => 1, 'name' => 'One Palitchoke', 'year_release' => 2005],\n ['artist_id' => 2, 'name' => 'Offering Love', 'year_release' => 2007],\n ['artist_id' => 3, 'name' => 'Ice Sarunyu', 'year_release' => 2006],\n ];\n\n foreach ( $albums as $album ) {\n DB::table('albums')->insert($album);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "102a7ac2c5bf3d7bd06597a234035ae0", "score": "0.77117646", "text": "public function run()\n {\n \\App\\User::create(['name'=>\"asd\", 'email'=>\"[email protected]\", 'password'=>Hash::make(\"123456\")]);\n \n $directorio = \"database/seeds/json_seeds/\";\n $archivos = scandir($directorio);\n \n for($i = 2; $i < sizeof($archivos); $i++)\n {\n $nombre = explode(\".\", $archivos[$i])[1];\n \n $fullPath = \"App\\Models\\\\\" . $nombre;\n echo \"Seeding \". $i.\") \".$fullPath .\"...\\n\";\n $instance = (new $fullPath());\n \n $table = $instance->table;\n \n $json = File::get(\"database/seeds/json_seeds/\" . $archivos[$i]);\n \n DB::table($table)->delete();\n \n $data = json_decode($json, true);\n \n foreach ($data as $obj)\n {\n $instance::create($obj);\n }\n \n }\n \n \n }", "title": "" }, { "docid": "51006cd093566713d168ba0692107f19", "score": "0.7708964", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'denis',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n ]);\n \n DB::table('users')->insert([\n \t'name'=> 'admin',\n \t'email' => '[email protected]',\n \t'password' => bcrypt('cccccccc'),\n \n ]);\n\n DB::table('posts')->insert([\n 'id'=> 1,\n 'title'=>'Генное редактирование изменит мир быстрее, чем мы думаем',\n 'content'=>'https://hightech.fm/wp-content/uploads/2018/11/45807.jpg',\n 'description' => NULL,\n 'slug'=>'gennoe-redaktirovanie-izmenit-mir-bistree-chem-mi-dumaem_1',\n 'author'=> 1,\n ]);\n\n DB::table('posts')->insert([\n 'id'=> 2,\n 'title'=>'billboard',\n 'content'=>'https://i.kinja-img.com/gawker-media/image/upload/lufkpltdkvtxt9kzwn9u.jpg',\n 'description' => NULL,\n 'slug'=>'billboard_2',\n 'author'=> 1,\n ]);\n }", "title": "" }, { "docid": "ec2a852d7d4c7c86fb7a9c04f4e0dd7e", "score": "0.77069575", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Role::class)->create([\n 'name' => 'admin',\n 'description' => 'usuario con todos los privilegios'\n ]);\n\n factory(App\\Role::class)->create([\n 'name' => 'teacher',\n 'description' => 'profesores'\n ]);\n\n factory(App\\Role::class)->create([\n 'name' => 'student',\n 'description' => 'estudiantes'\n ]);\n\n factory(App\\User::class)->create([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'role_id' => \\App\\Role::ADMIN\n ]);\n\n factory(App\\User::class, 4)->create([\n 'role_id' => \\App\\Role::TEACHER\n ])->each(function ($teacher) {\n $module = $teacher->teach()->save(factory(App\\Module::class)->make());\n $module->students()->saveMany(factory(App\\User::class, 10)->make([\n 'role_id' => \\App\\Role::STUDENT\n ]));\n $module->resources()->save(factory(App\\Resource::class)->make(), ['evaluation' => 1]);\n $module->tasks()->save(factory(App\\Task::class)->make(), ['evaluation' => 1]);\n });\n\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "51f53a0357babd8023bfb0bf05d79e4b", "score": "0.7705115", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $quests = factory(\\App\\Models\\Quest::class, 10)->create();\n\n $quests->each(function (\\App\\Models\\Quest $quest) {\n $count = random_int(100, 500);\n factory(\\App\\Models\\Booking::class, $count)->create([\n 'quest_id' => $quest->id,\n ]);\n });\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "84e706cea7bd7dc14995a5ca30acd23f", "score": "0.7698958", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // authorsテーブルにデータ登録を行う処理\n $this->call(AuthorsTableSeeder::class);\n\n // publishersテーブルに50件のレコードを作成する\n Publisher::factory(50)->create();\n\n // usersとuser_tokensのテーブルにレコードを追加\n $this->call(\n [\n UserSeeder::class\n ]\n );\n\n // ordersとorder_detailsのテーブルにレコードを追加\n $this->db->transaction(\n function () {\n $this->orders();\n $this->orderDetails();\n }\n );\n\n $now = CarbonImmutable::now();\n // customersテーブルにレコードを追加\n EloquentCustomer::create(\n [\n 'id' => 1,\n 'name' => 'name1',\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n // customer_pointsテーブルにレコードを追加\n EloquentCustomerPoint::create(\n [\n 'customer_id' => 1,\n 'point' => 100,\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "5c2d13aa24ff40662a0ce876f3c44809", "score": "0.7694809", "text": "public function run()\n {\n //\n $user_ids = ['1','2','3'];\n $faker = app(Faker\\Generator::class);\n\n $articles = factory(Article::class)->times(100)->make()->each(function ($articles) use ($faker, $user_ids) {\n $articles->user_id = $faker->randomElement($user_ids);\n });\n\n Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "6a416e8eba24d6a06a2c1821432bb069", "score": "0.76887816", "text": "public function run()\n {\n $faker=Faker::create();\n foreach(range(1,10) as $value)\n {\n DB::table('students')->insert([\n \"name\"=>$faker->name(),\n \"email\"=>$faker->unique->safeEmail(),\n \"password\"=>Hash::make($faker->password),\n \"mobile\"=>$faker->phoneNumber,\n \"gender\"=>$faker->randomElement(['Male','Female'])\n ]);\n }\n }", "title": "" }, { "docid": "d40aad4597dc498684ff1a2297b648e4", "score": "0.7687799", "text": "public function run()\n {\n //factory('App\\Store', 2)->create();\n // for individual use \"php artisan db:seed --class=StoreTableSeeder\"\n Schema::disableForeignKeyConstraints();\n \n DB::table('store')->truncate();\n\n App\\Store::create([\n 'manager_staff_id' => 1,\n 'address_id' => 1,\n ]);\n\n App\\Store::create([\n 'manager_staff_id' => 2,\n 'address_id' => 2,\n ]);\n\n Schema::enableForeignKeyConstraints();\n \n }", "title": "" }, { "docid": "d932a3a60db7e3e1b5c8ff7359b4a2ba", "score": "0.768728", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*$faker = Faker::create();\n \tfor($i = 0; $i < 10; $i++) {\n App\\Lists::create([\n 'item_name' => $faker->name,\n 'store_name' => $faker->name,\n 'total_item' => $faker->randomDigitNotNull,\n 'item_price' => $faker->numberBetween($min = 100, $max = 900),\n 'total_price' =>$faker->numberBetween($min = 1000, $max = 9000)\n ]);\n }*/\n }", "title": "" }, { "docid": "6b052b127c0955be874bff998cbf539d", "score": "0.76856595", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //$this->call(RequisitosSeeder::class);\n //factory('App\\User', 3)->create();\n //factory('App\\Situation', 3)->create();\n factory('App\\Sector', 3)->create();\n factory('App\\Role', 3)->create();\n factory('App\\Privilege', 3)->create();\n factory('App\\Evidence', 3)->create();\n factory('App\\Requirement', 3)->create();\n factory('App\\Company', 3)->create();\n }", "title": "" }, { "docid": "4b0c5746a1ac85fa81771a8a8a20868c", "score": "0.7678735", "text": "public function run()\n {\n //Tạo 1 dữ liệu trên data base\n // DB::table('todos')->insert([\n // 'name' => Str::random(10),\n // 'description' => Str::random(10),\n // 'completed' => true,\n // ]);\n\n //Tạo nhiều\n Todo::factory(5)\n // ->count(10)\n // ->hasPosts(1)\n ->create();\n //Sau khi tạo xong thì qua databaseSeeder.php để gọi\n }", "title": "" }, { "docid": "c6a289f8899b7ae9ecc9fac9bc29c5a6", "score": "0.7678028", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n factory(Welfare::class, 100)->create();\n factory(JobTag::class, 100)->create();\n factory(Welfare::class, 100)->create();\n\n factory(Company::class, 10)->create()->each(function (Company $company) {\n $company->images()->createMany(factory(CompanyImage::class, random_int(0, 3))->make()->toArray());\n $company->jobs()->createMany(factory(Job::class, random_int(0, 20))->make()->toArray());\n });\n }", "title": "" }, { "docid": "e4b68debc10ebf9c9ba7ccc13ad96554", "score": "0.7677989", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Student::truncate();\n Schema::enableForeignKeyConstraints();\n\n // $faker = Faker\\Factory::create();\n\n // for ($i=0; $i < 100; $i++) { \n // $st = new Student([\n // \"first_name\" => $faker->firstName(),\n // \"last_name\" => $faker->lastName(),\n // \"email\" => $faker->unique()->safeEmail()\n // ]);\n // $st->save();\n // }\n\n factory(Student::class, 25)->create();\n }", "title": "" }, { "docid": "232280f5b66a069fae8a2b568db508e7", "score": "0.7671213", "text": "public function run()\n {\n factory(App\\Models\\User::class, 15)->create();\n factory(App\\Models\\Movie::class, 30)->create();\n factory(App\\Models\\Address::class, 30)->create();\n factory(App\\Models\\Contact::class, 30)->create();\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "4bea3dcfb1c11c2f563ef5c570939031", "score": "0.76692706", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n $this->call(MeasuresSeeder::class);\n $this->call(ItemsSeeder::class);\n \\App\\Models\\Buyer::factory(200)->create();\n \\App\\Models\\Storage::factory(3000)->create();\n \\App\\Models\\Purchase::factory(2000)->create();\n\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "ff42adb6774e0bbeff44a5168ad219fd", "score": "0.7666566", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n ]);\n\n \\App\\Models\\User::factory(10)->create();\n\n \\App\\Models\\Blog::factory(100)->create();\n }", "title": "" }, { "docid": "720860b2dc67da65a78f539890510b34", "score": "0.76662236", "text": "public function run()\n {\n\n \t$faker = Faker::create('id_ID');\n foreach(range(0,5) as $i){\n \t\tDB::table('sarana')->insert([\n 'judul'=>$faker->bothify('Taman ###'),\n 'user_id'=>1,\n \t'body'=>$faker->realText($maxNbChars = 50, $indexSize = 2),\n \t'gambar'=>'gambar.jpg',\n \t\t]);}\n // factory(App\\Sarana::class,10)->create();\n }", "title": "" }, { "docid": "475d4973b6c6199504d485d769b2a6fc", "score": "0.7665698", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Admins::insert(['email'=>'[email protected]','password'=>Hash::make('Admin2019')]); //First Admin\n Uidata::insert(['data'=>'News tap']);\n Uidata::insert(['data'=>'']);\n Uidata::insert(['data'=>'']);\n Acyear::insert(['year'=>'2019/2020','semister'=>'1']);\n Syssta::insert(['state'=>0,'academic_year'=>1]);\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "3956831ae87733f8f0e38ec5700c0dbd", "score": "0.76615685", "text": "public function run()\n {\n // Initialize Faker\n $faker = Faker::create('id_ID');\n for ($i = 0; $i < 10; $i++) {\n DB::table('authors')->insert([\n 'first_name' => $faker->firstName,\n 'middle_name' => $faker->firstNameMale,\n 'last_name' => $faker->lastName,\n 'created_at' => $faker->date()\n ]);\n }\n }", "title": "" }, { "docid": "7b230b72d30c25948db35185929e3563", "score": "0.76597947", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class , 20)->create();\n factory(Rank::class,100)->create();\n factory(Answer::class,100)->create();\n\n }", "title": "" }, { "docid": "6d654d34dff257df1302ac38c4a46fab", "score": "0.76586807", "text": "public function run()\n {\n Model::unguard();\n\n $this->truncateMultiple([\n 'cache',\n 'failed_jobs',\n 'ledgers',\n 'jobs',\n 'sessions',\n // 'banner_per_pages',\n // 'news',\n // 'galeries',\n // 'careers',\n // 'faqs',\n // 'categories',\n // 'products',\n // 'about_contents',\n // 'company_contents',\n // 'web_settings'\n ]);\n\n // $news = factory(News::class, 5)->create();\n // $galeries= factory(Galery::class, 6)->create();\n\n // $faqs = factory(Faq::class, 8)->create();\n\n // $categoryIndustrial = factory(Category::class, 4)\n // ->create()\n // ->each(function ($category)\n // {\n // $category->products()->createMany(\n // factory(Product::class, 4)->make()->toArray()\n // );\n // });\n\n // $this->call(CareerTableSeeder::class);\n // $this->call(AboutContentSeeder::class);\n // $this->call(CompanyContentSeeder::class);\n // $this->call(WebSettingSeeder::class);\n\n // $this->call(AuthTableSeeder::class);\n\n // $this->call(MainCategorySeeder::class);\n\n $this->call(BannerPerPageSeeder::class);\n\n Model::reguard();\n }", "title": "" }, { "docid": "2b1ccfcd74ea29f817442dd58fc9459e", "score": "0.7657721", "text": "public function run()\n {\n //\n //DB::table('users')->truncate();\n $fakerBrazil = Faker::create('pt_BR');\n $faker = Faker::create();\n\n\n foreach (range(1, 10) as $index) {\n Notes::create(array(\n 'title' => $faker->randomElement($array = array('Atividade-1', 'Atividade-2', 'Atividade-3', 'Atividade-4')),\n 'user_name' => $faker->randomElement(User::lists('username')->toArray()),\n 'body' => $faker->sentence($nbWords = 15, $variableNbWords = true),\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\n ));\n }\n }", "title": "" }, { "docid": "ea44d8a6a359fde35d7e5c7e98a844c7", "score": "0.7656455", "text": "public function run()\n {\n $faker = Faker::create('es_ES');\n foreach(range(1,100) as $index){\n \tDB::table('personas')->insert([\n \t\t'nombre' => $faker->name,\n \t\t'apellido' => $faker->lastname,\n \t\t'edad' => $faker->numberBetween(1,100),\n \t\t'dni' => $faker->randomNumber(8),\n \t]);\n }\n }", "title": "" }, { "docid": "d8aa9d1a66e018ca7c4a33e3c222390c", "score": "0.76545465", "text": "public function run()\n {\n $this->labFacultiesSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labPositionsTableSeeder();\n $this->labSkillsTableSeeder();\n }", "title": "" }, { "docid": "ec089dc7e3ddac3340c642f68b2d8ac2", "score": "0.7654124", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\t\tDB::table('empresa')->insert([\n\t\t\t'empresarioId' => random_int(0,10),\n\t\t\t'alta' => true,\n 'nombre_de_empresa' => Str::random(10),\n\t\t\t'direccion' => Str::random(10),\n\t\t\t'lugar' => Str::random(10),\n\t\t\t'provincia' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n\t\t\t'numeroTelefono' => random_int(100000000,999999999),\n\t\t\t'segundoNTeléf' => random_int(100000000,999999999),\n ]);\t\t\n }", "title": "" }, { "docid": "38c1567f61695033bc9c5cd019c0e92f", "score": "0.7653314", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // factory(App\\Patient::class, 3)->create()->each(function ($patient){$patient->appointments()->createMany(factory(App\\Appointment::class, 3)->make()->toArray()); $patient->});\n // factory(App\\Appointment::class, 3)->create()->each(function ($appointment){$appointment->patient()->save(factory(App\\Patient::class)->make());$appointment->nurse()->save(factory(App\\Nurse::class)->make());$appointment->physician()->save(factory(App\\Physician::class)->make());});\n\n $this->call(RoomTableSeeder::class);\n $this->call(MedicationTableSeeder::class);\n $this->call(DepartmentTableSeeder::class);\n $this->call(ProcedureTableSeeder::class);\n $this->call(DiseaseSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(UserSeederTable::class);\n }", "title": "" }, { "docid": "ba6738f08662f7542dd055c6ac5dc33f", "score": "0.7648732", "text": "public function run() {\n \t// seed the models\n \t// order is important\n $this->call(UsersTableSeeder::class);\n \t$this->call(RolesTableSeeder::class);\n $this->call(DivisionsTableSeeder::class);\n $this->call(LocationsTableSeeder::class);\n $this->call(IncidentsTableSeeder::class);\n $this->call(PatronsTableSeeder::class);\n $this->call(PhotosTableSeeder::class);\n $this->call(CommentsTableSeeder::class);\n\n\n // seed the relationships\n $this->call(IncidentUserViewedRelationshipSeeder::class);\n $this->call(IncidentUserInvolvedRelationshipSeeder::class);\n $this->call(RoleUserRelationshipSeeder::class);\n $this->call(DivisionUserRelationshipSeeder::class);\n $this->call(UserSupervisorRelationshipSeeder::class);\n // $this->call(PatronPhotoRelationshipSeeder::class);\n // $this->call(IncidentPhotoRelationshipSeeder::class);\n $this->call(PhotoRelationshipSeeder::class);\n $this->call(IncidentPatronRelationshipSeeder::class);\n $this->call(IncidentLocationRelationshipSeeder::class);\n $this->call(UserPatronRelationshipSeeder::class);\n }", "title": "" }, { "docid": "53d34549583a1c519a3ec1def617a12a", "score": "0.764589", "text": "public function run()\n {\n factory(\\App\\User::class)->create(['role' => 'admin' , 'email' => '[email protected]']);\n factory(\\App\\User::class)->create(['role' => 'agent' , 'email' => '[email protected]']);\n\n factory(\\App\\Models\\TicketCategory::class)->create();\n factory(\\App\\Models\\TicketCategory::class)->create();\n\n factory(\\App\\Models\\Priority::class , 5)->create();\n factory(\\App\\Models\\Faq::class , 20)->create();\n\n $this->call([\n SettingSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "271eb5b13582683b989e89620a409611", "score": "0.76447785", "text": "public function run()\n {\n DB::table('shops')->delete();\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('shops')->insert([\n 'name' => $faker->firstName(),\n 'street' => $faker->streetName(),\n 'city' => $faker->city(),\n 'phoneNumber' => $faker->phoneNumber(),\n 'email' => $faker->email(),\n ]);\n }\n }", "title": "" } ]
7fff195a37eda56122db4c1a380ee488
Set function that adds a given class to the EEC Core. This must be used by plugins to register their class.
[ { "docid": "77f3afa335f2979af6250f89b9aff899", "score": "0.0", "text": "public function set($sCoreComponentName = null, $sCoreComponent = null, $aDetails = null)\n\t\t{\n\t\t\tif(is_array($aDetails))\n {\n if(isset($aDetails['requiredExtensions']) && is_array($aDetails['requiredExtensions']))\n {\n foreach($aDetails['requiredExtensions'] as $sReqExtension)\n {\n if($this->get($sReqExtension) === false)\n {\n die(\"ERROR : The extension: \" . $sCoreComponentName . \" requires the extension: \" . $sReqExtension . \", but that extension isn't loaded!\");\n }\n \n // The extension seems to be required thus run it's init function if available\n if(method_exists(array($this->get($sReqExtension), 'init')) === false)\n {\n call_user_func(array($this->get($sReqExtension), 'init'));\n }\n }\n }\n }\n\n if(!isset($this->_aDataContainer[$sCoreComponentName]))\n\t\t\t{\n\t\t\t\t$this->_aDataContainer[$sCoreComponentName] = $sCoreComponent;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" } ]
[ { "docid": "20560033a633f441117c7f0889ab22b5", "score": "0.6722535", "text": "function register_class(&$class)\r\n\t{\r\n\t\t$this->class = $class;\r\n\t}", "title": "" }, { "docid": "a58b1bb7adf2d15106a7e2a8b93d8ae3", "score": "0.6440204", "text": "public function addClass($class) {\n $this->addData('class', array($class));\n }", "title": "" }, { "docid": "b06b1a10ff81f25788c1f4b8e0ca4a8a", "score": "0.6327807", "text": "public function add_class($class) {\n $this->classes[] = $class;\n }", "title": "" }, { "docid": "ca2119eff4757eacd29b94526cc7af0f", "score": "0.6265096", "text": "static function register( $class ) {\r\n self::$vars['rules_handlers'][$class] = new $class;\r\n }", "title": "" }, { "docid": "16eeb6b01f170e2a0cfa01f190c1c7a8", "score": "0.6235247", "text": "public function addClass(Fqsen $class): void\n {\n $this->classes[(string) $class] = $class;\n }", "title": "" }, { "docid": "f116e4c685b4151b16e8a8da6fd58d64", "score": "0.6189736", "text": "function addClass(&$class) {\n \n $package = isset($class[\"package\"]) ? $class[\"package\"] : \"No Package specified\";\n $this->packages[$package][\"classes\"][] = $class[\"name\"];\n $this->classtree[$class[\"name\"]] = (isset($class[\"subclasses\"])) ? $class[\"subclasses\"] : array();\n $this->addElements($class, \"class\");\n \n }", "title": "" }, { "docid": "bccd3b9755d7cb3c83b46c384e6f8c91", "score": "0.6083877", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = $class;\n\t\t$this->ipsclass =& $class->ipsclass;\n\t\t$this->root_path = $this->class->root_path;\n\t}", "title": "" }, { "docid": "c30f57a0dbc00f02a834016b96a7c552", "score": "0.6081323", "text": "public function setClass($class)\n {\n $this->class = $class;\n }", "title": "" }, { "docid": "cf8076b22cf50c09ec2ad6aae2df82fa", "score": "0.6025993", "text": "public function setAddClass($addClass){\n\t\t\t$this->addClass = $addClass;\n\t\t}", "title": "" }, { "docid": "59c8d3d80a96782bcd8f30f7771c2f82", "score": "0.6024534", "text": "function acf_register_admin_tool($class)\n{\n}", "title": "" }, { "docid": "796ec175b202fb3f80ecdd411069da7e", "score": "0.6013241", "text": "public function setClass($class) {\n\t\t$this->class = $class;\n\t}", "title": "" }, { "docid": "dc518779de716e34f291afe36692a36f", "score": "0.59861565", "text": "function hoteller_set_screen_class($new_value = '') {\n\tglobal $hoteller_screen_class;\n\t$hoteller_screen_class = $new_value;\n}", "title": "" }, { "docid": "9686b46fd0cb3d78f63e0cbdef783ca2", "score": "0.5958387", "text": "public final function setClass($class){\n\t\tif(FW_Validate::isMixed($class)){\n\t\t\t$this->class = $class;\n\t\t}\n\t}", "title": "" }, { "docid": "cb156d760d94f4c601301cc5e4fc9695", "score": "0.5956709", "text": "function register_tool($class)\n {\n }", "title": "" }, { "docid": "35d1c743ce7013c5896c065b50aae8b5", "score": "0.59494865", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = &$class;\n\t\t$this->ipsclass =& $class->ipsclass;\n\t\t$this->root_path = $this->class->root_path;\n\t}", "title": "" }, { "docid": "35d1c743ce7013c5896c065b50aae8b5", "score": "0.59494865", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = &$class;\n\t\t$this->ipsclass =& $class->ipsclass;\n\t\t$this->root_path = $this->class->root_path;\n\t}", "title": "" }, { "docid": "6deac277ce53a4078860c823d876c9a7", "score": "0.5941538", "text": "public function registerNodeClass ($baseclass, $extendedclass) {}", "title": "" }, { "docid": "9055cdada46dc478f9540e5546c4958a", "score": "0.5929041", "text": "function dmili_registerFunction($class) {\n if ( 0 !== strpos( $class, 'dmili_' ) ) {\n return;\n }\n require_once(\"classes/class.$class.php\");\n}", "title": "" }, { "docid": "f870439365742b487ace916c70656523", "score": "0.5925844", "text": "public function extClass(string $str) : self\n {\n $this->extClass = $str;\n\n return $this;\n }", "title": "" }, { "docid": "4ddacaa30b9da699bbcb02e1b798293a", "score": "0.59025145", "text": "public function setClass($class)\n {\n $this->class = $class;\n }", "title": "" }, { "docid": "8771a3186af08174dac591ed39a2b037", "score": "0.5855356", "text": "public function addClass($class) {\n $classes = &$this->getClasses();\n $classes = array_unique(array_merge($classes, (array) $class));\n }", "title": "" }, { "docid": "eecadb605234eaac0f3a5c79bf89d3ab", "score": "0.5851595", "text": "public function addClass( $classnames );", "title": "" }, { "docid": "9916e534d39016997e45886c7cd93722", "score": "0.58368975", "text": "protected function _appendClass($class) {\n\t\t$this->_class .= $class;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "71664cba379c7f7fef13738644ae6472", "score": "0.5819454", "text": "abstract public function class();", "title": "" }, { "docid": "a3e5fd39920b02dfa2808fdf5c6bf7a3", "score": "0.57879627", "text": "public function setExtendedClass($class_name) {\n $this->_extendedClass = $class_name;\n }", "title": "" }, { "docid": "645a81894b43ece7d9145638642228f4", "score": "0.57797205", "text": "public function setExtension($name, $class): void\n {\n $this->extensions[$name] = $class;\n }", "title": "" }, { "docid": "7e881fad4f9f432f5032322897c78b75", "score": "0.57739073", "text": "public function addClass($class) {\n\t\treturn $this->setAttribute('class', $this->getClass() . \" \" . $class);\n\t}", "title": "" }, { "docid": "8e30f1c1adac7200e2b4ce01c2ac3a4f", "score": "0.576109", "text": "public function addClass( string $class ) {\n\t\tif ( !$this->hasClass( $class ) ) {\n\t\t\t$this->classes[] = $class;\n\t\t}\n\t}", "title": "" }, { "docid": "2605b26477eaea9f2a599af59b48972d", "score": "0.57442635", "text": "protected function setClass($newClass = NULL)\n\t{\n\t\tif($newClass instanceOf C_Class){\n\t\t\tparent::setGroup($newClass);\n\t\t}else if (is_int($newClass) || $newClass==NULL)\n\t\t\tparent::setGroup($newClass);\n\t}", "title": "" }, { "docid": "ac7aa156dea70a588963a5525ef6fcad", "score": "0.57325417", "text": "public function addClass($classes);", "title": "" }, { "docid": "c32709ac56f4f580289606aeb3b2fef9", "score": "0.5730181", "text": "function hoteller_set_page_content_class($new_value = '') {\n\tglobal $hoteller_page_content_class;\n\t$hoteller_page_content_class = $new_value;\n}", "title": "" }, { "docid": "f1f8c6fcf5eb4fbe09087583c958aecb", "score": "0.5712619", "text": "public function setClass($class)\n {\n return $this->setAttribute('class', $class);\n }", "title": "" }, { "docid": "c863ae8bb7ab1eb59fed639be2f87712", "score": "0.5698106", "text": "public function addElementClass($elementId, $class)\n {\n \n }", "title": "" }, { "docid": "d9b578871cd138519537d46b50972811", "score": "0.56642216", "text": "public function add_to_chain( string $class ): self {\n\t\t$this->chain[] = $class;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4b0be0b33467868238252c5760cd2710", "score": "0.5660187", "text": "function register_controller_function(&$class, $uri_array, $method)\n\t{\n\t\t$this->_controller_uris[] = array('uri_array' => $uri_array, 'plugin' => $class, 'method' => $method);\n\t}", "title": "" }, { "docid": "1ed69b9c77a306d68aad106926a69425", "score": "0.5653068", "text": "static function register($typechar, $class) {\n self::$registry[$typechar] = $class;\n }", "title": "" }, { "docid": "247e8cc0208aa35aed74905521fa5f8b", "score": "0.56441224", "text": "function changeClass($value=\"\") {\n $this->className = $value;\n }", "title": "" }, { "docid": "d323cf8d7739d8bebae65b9b9831c4de", "score": "0.5633008", "text": "public static function register_class( $class_name ) {\n\t\t/** @var $this $instance */\n\t\t$instance = self::get_instance();\n\t\t$instance->classes[] = $class_name;\n\t}", "title": "" }, { "docid": "e84c39b5856514d57b4278db7a1b8c25", "score": "0.5619805", "text": "public function addClass($class) {\n\t\tif (in_array($class, $this->className))\n\t\t\tthrow new Exception(\"Class \" . $class . \" already in list\");\n\t\tif ($class != \"\")\n\t\t\t$this->className[] = $class;\n\t}", "title": "" }, { "docid": "ce5cb7de4fb17823692ffbf643aaea28", "score": "0.56169814", "text": "public function addClass($name);", "title": "" }, { "docid": "95c77d75a701bac63e556db33dadc55b", "score": "0.56061816", "text": "public function addClass($class) {\n\t\t$this->attributes['class'][$class] = $class;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2557fb3fe3fb21cc94a231a1f15d8bb6", "score": "0.56056917", "text": "function setClass( $value, $xparams=FALSE ) {\n $this->class['value'] = $value;\n if( is_array( $xparams )) {\n foreach( $xparams as $xparamKey => $xparamValue )\n $this->class['xparams'][strtoupper( $xparamKey )] = $xparamValue;\n }\n }", "title": "" }, { "docid": "9710cb358fbf7dd65ade1c3a68e6fda1", "score": "0.55997163", "text": "abstract protected function define(ClassDefinition $class);", "title": "" }, { "docid": "e9a0e614414a7d93ad35220a48816591", "score": "0.5589471", "text": "public function addClass($node, $class) {\n\t\t$c = $node->getAttribute('class');\n\t\t$c .= \" $class\";\n\t\t$node->setAttribute('class', $c);\n\t}", "title": "" }, { "docid": "29a5c73bd2ca2169558fbb279b683ca5", "score": "0.55864453", "text": "public function addClass($class)\n {\n $this->class .= \" \" . $class;\n return $this;\n }", "title": "" }, { "docid": "1e316001217dc3f74abd6d3867f84ee4", "score": "0.55819327", "text": "protected function _setClass($class) {\n\t\t$this->_class = $class;\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "643dab576a2e241ed8eb698ba7f27124", "score": "0.5573895", "text": "public function registerClass(string $class, bool $allowOverride = false): void\n {\n $ref = new ReflectionClass($class);\n foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $method) {\n // Ignore inherited classes\n if ($method->getDeclaringClass()->getName() !== $class) {\n continue;\n }\n \n // Ignore all methods that don't start with \"apply\"\n $name = $method->getName();\n if (strpos($name, 'apply') !== 0) {\n continue;\n }\n $name = lcfirst(substr($name, 5));\n \n // Avoid overlap\n if (! $allowOverride && isset($this->presets[$name])) {\n $this->logger->error(\n 'Skipped a preset with name ' . $name . ', defined as: '\n . $ref->getName() . '::' . $method->getName()\n . ', because it was already defined as: '\n . $this->presets[$name][0] . '::' . $this->presets[$name][1]\n );\n continue;\n }\n \n $this->presets[$name] = [$ref->getName(), $method->getName()];\n }\n }", "title": "" }, { "docid": "e7419152e86954c325b19a45dc64b7d1", "score": "0.5571565", "text": "public function setClassName($sClass)\n {\n $this->sPrefix = $this->getOption('core.prefix.function');\n\n $sClass = trim($sClass, '.\\\\ ');\n if(!$sClass)\n {\n return $this;\n }\n\n if(!($xCallable = $this->xRepository->getCallableObject($sClass)))\n {\n // Todo: decide which of these values to return\n // return null;\n return $this;\n }\n\n $this->sPrefix = $this->getOption('core.prefix.class') . $xCallable->getJsName() . '.';\n return $this;\n }", "title": "" }, { "docid": "a143d63ea5f263b9bc33e3ee34088749", "score": "0.5553997", "text": "public function registerClass( $class = '' ) {\n\t\t$classname = is_object( $class ) ? get_class( $class ) : $class;\n\t\t/**\n\t\t * If we are passed an instance of a class\n\t\t */\n\t\tif( is_object( $class ) && !isset( $this->instances[$classname] ) ) {\n\t\t\t$this->instances[ $classname ] = $class;\n\t\t}\n\t\t/**\n\t\t * Else if we are passed a string/classname\n\t\t */\n\t\telseif( is_string( $class ) && !isset( $this->instances[$classname] ) && class_exists( $class ) ) {\n\t\t\t$this->instances[ $classname ] = new $class();\n\t\t}\n\n\t\treturn $this->instances[ $classname ];\n\n\t}", "title": "" }, { "docid": "39530ac0378210442cbd4184ce76be43", "score": "0.5551604", "text": "function add_image_class($class){\n\t$class .= ' nofotomoto';\n\treturn $class;\n}", "title": "" }, { "docid": "b83df116a09239879fcec5eba50862d0", "score": "0.5546295", "text": "function _wpu_add_class($el, $class) {\n\t$find = '>';\n\t$repl = ' class=\"%s\">';\n\tif(stristr($el, 'class=\"') > 0) {\n\t\t$find = 'class=\"';\n\t\t$repl = 'class=\"%s ';\n\t} else if(stristr($el, \"class='\") > 0) {\n\t\t$find = \"class='\";\n\t\t$repl = \"class='%s \";\n\t}\n\treturn str_replace($find, sprintf($repl, $class), $el);\n\t\n}", "title": "" }, { "docid": "9e2a12ab42b1f87333ca00c831ab7dc2", "score": "0.5543222", "text": "public function addClass($classToAdd)\n {\n //args is not used, is overwritred with func_get_args\n //$args = null;\n $class = $this->getClass();\n $classes = func_get_args();\n\n foreach ($classes as $var)\n {\n $class .= ' ' . $var;\n }\n\n if ($this->getOutputJs())\n {\n \\App::addJs($this->getSelector() . \".addClass('{$classToAdd}')\");\n }\n else\n {\n $this->setClass(trim($class));\n }\n\n return $this;\n }", "title": "" }, { "docid": "43fd7a753f8abf9aba5857629cff929c", "score": "0.5537447", "text": "public function setClass($class, array $parameters = null) {\n\n if (!empty($class)) {\n $this->instance->add($this->calendar->createProperty('CLASS', $class, $parameters));\n }\n }", "title": "" }, { "docid": "9df4784382b870ec68ce3135947a1918", "score": "0.5530849", "text": "function __construct($class) {\n $this->_class_to_create = $class;\n }", "title": "" }, { "docid": "6fae123a29f4c8f6e3d75e2e52290ec5", "score": "0.5504458", "text": "function register_hook(&$class, $target, $priority, $method)\n\t{\n\t\t$this->_hooks[$target][] = array('plugin' => $class, 'priority' => $priority, 'method' => $method);\n\t}", "title": "" }, { "docid": "a92349b7a78dfdea183a2fc373141438", "score": "0.55004245", "text": "public function setClass( $class ) {\n $this->class = $class;\n $this->select .= ' class=\"' . $class . '\"';\n }", "title": "" }, { "docid": "8a8aaa4eb2cb80ff4ec14d8df5fe4824", "score": "0.54939544", "text": "public static function addToExecute(string $class)\n {\n static::$executors[] = $class;\n }", "title": "" }, { "docid": "54bdbbc62fea166cc6ab2ff5a384f886", "score": "0.5482148", "text": "function addClass($class){\n\t\t\n\t\tif(empty($class)) return false;\n\n\t\t// convert $class to an array if it's not yet one\n\t\tif(!is_array($class))\n\t\t\t$class = preg_split('#\\s+#', $class);\n\n\t\t$class = array_map('esc_attr', $class);\n\n\t\t$this->classes = array_merge($this->classes, $class);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1f0f5fb6292c1a8bbb1c9839648e5fbc", "score": "0.5473974", "text": "static function Register($slug, $class) {\n\t\tPageAction::$registered[$slug] = $class;\n\t}", "title": "" }, { "docid": "3bb6d6204189496e122042f96d441f78", "score": "0.546794", "text": "public function addClass($className){\n\t\treturn new SoapWsdlAddClass($className,$this->types);\n\t}", "title": "" }, { "docid": "054cd53c63bf0a5afedab7f0da6c547c", "score": "0.54604805", "text": "public function extension($class, $model) {\n\t\treturn new $class($this->pixie, $model);\n\t}", "title": "" }, { "docid": "32f12c700a9953c03239520eff70292a", "score": "0.5459706", "text": "public function add($name, $cls);", "title": "" }, { "docid": "2271c937d1c444061783e4327ca4196f", "score": "0.54585373", "text": "public function class(string $class)\n {\n $this->class = $class;\n \n return $this;\n }", "title": "" }, { "docid": "674ae33524255217019533f09a157029", "score": "0.5453368", "text": "public function setClass($class)\r\n {\r\n $this->class = $class;\r\n return $this;\r\n }", "title": "" }, { "docid": "17b4aeea8f4a1e32bb103bc885588fb4", "score": "0.5452079", "text": "public function addClass($class)\n {\n if (is_array($class)) {\n $class = implode(' ', $class);\n }\n\n $this->class = array_merge($this->class, explode(' ', $class));\n\n\n return $this;\n }", "title": "" }, { "docid": "df1101199fb80b276ce171f83c934566", "score": "0.54440475", "text": "public function addElementClass($class)\n {\n if (is_array($class) || is_string($class)) {\n $this->elementClass = array_merge($this->elementClass, (array) $class);\n\n $this->elementClass = array_unique($this->elementClass);\n }\n\n return $this;\n }", "title": "" }, { "docid": "79a1d8dfdeb072635e011ef674b8f7c2", "score": "0.54430693", "text": "public function register_class( string $class, string $path ): void {\n\t\t$this->class_paths[ $class ] = $path;\n\t}", "title": "" }, { "docid": "186168aa12e7d9cf6396869a46016a02", "score": "0.54410386", "text": "function acf_new_instance($class = '')\n{\n}", "title": "" }, { "docid": "c025d053723774d3bbdf740513440025", "score": "0.54380506", "text": "public function addClass ($class)\n {\n $targetArray = &$this->customClasses;\n if (!is_array($class))\n $targetArray[] = $class;\n else\n $targetArray = array_merge($targetArray, $class);\n return $this;\n }", "title": "" }, { "docid": "45f5b0cddb2424afdf1396b3d2b75777", "score": "0.5429432", "text": "function addClass($class) {\n\t\t$this->bodyclasses[] = $class;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "795869ede3e57ec6779b09d4a0c057a1", "score": "0.54276747", "text": "public function addClass(string $class): HtmlElementInterface\n {\n $this->attributes['class'] = array_key_exists('class', $this->attributes)\n ? sprintf('%s %s', $this->attributes['class'], $class)\n : $class;\n return $this;\n }", "title": "" }, { "docid": "a346d0e294e4d0a6a38f9e0a09c585b5", "score": "0.5412716", "text": "function setClass($a_class)\r\n\t{\r\n\t\tif (is_object($this->mob_node))\r\n\t\t{\r\n\t\t\t$mal_node = $this->mob_node->first_child();\r\n\t\t\tif (is_object($mal_node))\r\n\t\t\t{\r\n\t\t\t\tif (!empty($a_class))\r\n\t\t\t\t{\r\n\t\t\t\t\t$mal_node->set_attribute(\"Class\", $a_class);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($mal_node->has_attribute(\"Class\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$mal_node->remove_attribute(\"Class\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6864fe67db7af5dbacbf41561aaca614", "score": "0.54115456", "text": "function bender_add_body_class($class){\n $benderBodyClass = benderBodyClass::newInstance();\n $benderBodyClass->add($class);\n }", "title": "" }, { "docid": "393a111cff09a9dee64d91c23fe202b6", "score": "0.53987414", "text": "function register_field_type($class)\n {\n }", "title": "" }, { "docid": "06c8468f5fb7f25aa7c9f21b99f81219", "score": "0.5382653", "text": "function _setClassLocation($class, $location) {\r\n\t\t\t\r\n\t\t$CONFIG=self::getConfig();\r\n\t\t\t\r\n\t\tif (!isset($CONFIG->classes)) {\r\n\t\t\t$CONFIG->classes = array();\r\n\t\t}\r\n\t\t$CONFIG->classes[$class] = $location;\r\n\t}", "title": "" }, { "docid": "94f44047da0a0c18b40dbdfe54b54e3c", "score": "0.5378268", "text": "private function registerClass()\n {\n $this->app->bind('imageHandler', function ($app) {\n return new \\Amostajo\\LaravelImageHandler\\Classes\\ImageHandler($app);\n });\n }", "title": "" }, { "docid": "1efefee49ef786784c499670d572a0c9", "score": "0.53759253", "text": "public function addCssClass($cssClasses);", "title": "" }, { "docid": "45af9ce26b31d530f4f94ab90e87f9c9", "score": "0.53714216", "text": "function __autoload($class){\n\t\tif ($class = \"mwpclass\"){\n\t\t\trequire \"mwp.class.php\";\n\t\t}\n\t}", "title": "" }, { "docid": "0617fa1f72214878567c5a10b1ef44ae", "score": "0.5367429", "text": "public function setClass(?string $class): static\n {\n $this->changes['class'] = true;\n\n $this->class = $class;\n\n return $this;\n }", "title": "" }, { "docid": "449132490ebd22598666ca9a1870cb0a", "score": "0.5366871", "text": "public function registerClass($class, $path) {\n\t\t$this->classPaths[$class] = $path;\n\t}", "title": "" }, { "docid": "2fec0515b229f2f076532fba6ba981ff", "score": "0.53547716", "text": "public function addClass($className)\n {\n if (is_string($className)) {\n $this->element->addClass($className);\n } else {\n $this->triggerError(__CLASS__, __METHOD__);\n }\n }", "title": "" }, { "docid": "4766135b78f0fc218251d6b0b30c71c8", "score": "0.53529376", "text": "public function setServerClass($class = NULL)\n {\n $class = $class ?: get_class($this);\n return $this->setData('server-class', $class);\n }", "title": "" }, { "docid": "d3cb638d3226a929e420ff974692b49a", "score": "0.53438455", "text": "function setBaseClass($baseClass);", "title": "" }, { "docid": "0c3e1856cb318c8e9a24827c82ca869a", "score": "0.5343099", "text": "public function __construct($class)\n {\n $this->class = $class;\n }", "title": "" }, { "docid": "d2a824118b25c87fce883d394dd271c3", "score": "0.5337728", "text": "public function addClass(PhpClass $class)\n {\n if ($this->classExists($class->getIdentifier())) {\n throw new Exception('A class of the name ('.$class->getIdentifier().') does already exist.');\n }\n\n $this->classes[$class->getIdentifier()] = $class;\n }", "title": "" }, { "docid": "dcfbc1767e7085dfe8af831d5ee9aeaf", "score": "0.5320802", "text": "public function setClass($class)\n {\n $this->class = $class;\n return $this;\n }", "title": "" }, { "docid": "dcfbc1767e7085dfe8af831d5ee9aeaf", "score": "0.5320802", "text": "public function setClass($class)\n {\n $this->class = $class;\n return $this;\n }", "title": "" }, { "docid": "88ced9f4e40f29b95127a8bbf4c5242e", "score": "0.5316151", "text": "function stylizeCSSClass($class) \n{\n\t$class .= ' form-efl';\n\treturn $class;\n}", "title": "" }, { "docid": "8af6df2e587a408be43318cdf76be01d", "score": "0.530732", "text": "function defca($name,$cls,$add=array()){\n $cname = is_object($cls)?get_class($cls):$cls;\n $chain = array(def($add,'postdef',array()));\n while($cname){\n array_unshift($chain,def(get_class_vars($cname),$name,array()));\n $cname = get_parent_class($cname);\n }\n array_unshift($chain,def($add,'predef',array()));\n return call_user_func_array(def($add,'fct','array_merge'),$chain);\n}", "title": "" }, { "docid": "6d45017325e8dbdee275be374689989e", "score": "0.5306698", "text": "public function register_discovery_method($class) {\n\t\t$this->discovery_methods[] = $class;\n\t}", "title": "" }, { "docid": "82e5f91ec7dc81967157236a07f596d3", "score": "0.53025365", "text": "function addFormatter($name, $class)\n{\n\t$this->modes = array($name => new $class($this)) + $this->modes;\n}", "title": "" }, { "docid": "11c849047a7bf403086892fdd16704ae", "score": "0.5301295", "text": "public function addAddons()\n {\n foreach ($this->getAddonClasses() as $name => $class)\n {\n $this->$name = $this->create($class);\n }\n }", "title": "" }, { "docid": "8a43b93c87de41e7052e632c4f019e28", "score": "0.53009593", "text": "public function testSetClass(): void\n {\n $set = $this->dispatch->setClass($this->value);\n\n self::assertTrue($set instanceof Dispatch);\n }", "title": "" }, { "docid": "3d7bfc381274c0cd8c008e7fc692af61", "score": "0.5300857", "text": "function register_plugin( $feature, $classname ) {\n\tglobal $fbk_registered_plugins;\n\n\t$classnames = (array) $classname;\n\n\tif ( ! array_key_exists( $feature, $fbk_registered_plugins ) ) {\n\t\t$fbk_registered_plugins[$feature] = $classnames;\n\t} else {\n\t\t$fbk_registered_plugins[$feature] = array_unique( array_merge( $fbk_registered_plugins[$feature], $classnames ) );\n\t}\n}", "title": "" }, { "docid": "cfe636175ae5f036065b3ac98cd01c22", "score": "0.53000414", "text": "public static function coreClassAlias()\n {\n if (! static::$coreIsAlias) {\n static::aliasRegister(static::$coreClasses);\n static::$coreIsAlias = true;\n }\n }", "title": "" }, { "docid": "b61a9797e8a86a3e0e8cb40f95630bb4", "score": "0.5295664", "text": "function core_register($realname, $new_object = NULL, $params_or_no_ins = '')\r\n{\r\n static $new_objects = array(); \r\n \r\n $Class = ucfirst($realname);\r\n $registry = OB_Registry::instance();\r\n \r\n // if we need to reset any registered object .. \r\n // --------------------------------------------------------------------\r\n if(is_object($new_object))\r\n {\r\n $registry->unset_object($Class);\r\n $registry->set_object($Class, $new_object);\r\n \r\n return $new_object;\r\n }\r\n \r\n $getObject = $registry->get_object($Class); \r\n \r\n if ($getObject !== NULL)\r\n return $getObject;\r\n \r\n if(file_exists(BASE .'libraries'. DS .'core'. DS .$Class. EXT))\r\n {\r\n if( ! isset($new_objects[$Class]) ) // check new object instance\r\n {\r\n require(BASE .'libraries'. DS .'core'. DS .$Class. EXT);\r\n }\r\n \r\n $classname = $Class; // prepare classname\r\n\r\n if($params_or_no_ins === FALSE)\r\n {\r\n profiler_set('libraries', 'php_'.$Class.'_no_instantiate', $Class);\r\n return TRUE;\r\n }\r\n\r\n $classname = 'OB_'.$Class;\r\n $prefix = config_item('subclass_prefix'); // MY_\r\n \r\n if(file_exists(APP .'libraries'. DS .$prefix. $Class. EXT)) // Application extend support\r\n {\r\n if( ! isset($new_objects[$Class]) ) // check new object instance\r\n {\r\n require(APP .'libraries'. DS .$prefix. $Class. EXT);\r\n }\r\n \r\n $classname = $prefix. $Class;\r\n\r\n profiler_set('libraries', 'php_'. $Class . '_overridden', $prefix . $Class);\r\n } \r\n \r\n // __construct params support.\r\n // --------------------------------------------------------------------\r\n if($new_object == TRUE)\r\n {\r\n if(is_array($params_or_no_ins)) // construct support.\r\n {\r\n $Object = new $classname($params_or_no_ins);\r\n\r\n } else\r\n {\r\n $Object = new $classname();\r\n }\r\n \r\n $new_objects[$Class] = $Class; // set new instance to static variable\r\n } \r\n else \r\n {\r\n if(is_array($params_or_no_ins)) // construct support.\r\n {\r\n $registry->set_object($Class, new $classname($params_or_no_ins));\r\n\r\n } else\r\n {\r\n $registry->set_object($Class, new $classname());\r\n }\r\n\r\n $Object = $registry->get_object($Class);\r\n }\r\n\r\n // return to singleton object.\r\n // --------------------------------------------------------------------\r\n \r\n if(is_object($Object))\r\n return $Object;\r\n\r\n }\r\n\r\n return NULL; // if register func return to null\r\n // we will show a loader exception\r\n}", "title": "" }, { "docid": "01e76e7c2aa46fca64db3f73f9dea9d3", "score": "0.5284417", "text": "public function make($class);", "title": "" }, { "docid": "fc37ace6c9fc23db03370b4b7c96e8d8", "score": "0.52816117", "text": "function __construct($value){\n $this->class_value = $value;\n }", "title": "" }, { "docid": "34c8af271ef172e15e39e162ffb35505", "score": "0.52771753", "text": "public function addClass($class)\n {\n if(is_array($class)) $class = implode(' ', $class);\n\n // Create class attribute if it isn't already\n if (!isset($this->attributes['class'])) {\n $this->attributes['class'] = null;\n }\n\n // Prevent adding a class twice\n $classes = explode(' ', $this->attributes['class']);\n if (!in_array($class, $classes)) {\n $this->attributes['class'] = trim($this->attributes['class']. ' ' .$class);\n }\n\n return $this;\n }", "title": "" }, { "docid": "c065373179e0a82f398726024290e235", "score": "0.52762437", "text": "public function addClass()\n {\n if (!isset($_POST['ClassName']) || !isset($_POST['ClassAbbrevation'])) {\n $res = array(\n 'success' => 'false',\n 'message' => 'Please make sure you are passing credentials in post format'\n );\n echo json_encode($res);\n } else {\n \n $this->load->model('AdminModel');\n $this->AdminModel->insertClassValues($_POST['ClassName'], $_POST['ClassAbbrevation']);\n \n }\n \n }", "title": "" }, { "docid": "70ed6fa44a3182c1657d825634f201c6", "score": "0.52749157", "text": "function wlfw_add_body_class($additionalClass) {\n\tglobal $customBodyClasses;\n\tif ($additionalClass != '') {\n\t\t$customBodyClasses[] = $additionalClass;\n\t}\n}", "title": "" } ]
9969aedde5db945b4e8edbf2d5eff9be
Array of property to format mappings. Used for (de)serialization.
[ { "docid": "96e4d9e7f6d72a90eb32656dfb81ba26", "score": "0.0", "text": "public static function openAPIFormats()\n {\n return self::$openAPIFormats;\n }", "title": "" } ]
[ { "docid": "68e800877adc1e3d5c2df851f42be6aa", "score": "0.6498941", "text": "public function getFormatMap()\n {\n return $this->formatMap;\n }", "title": "" }, { "docid": "4f4eab80a4a2cb1dc3c4e5261c94ec87", "score": "0.637007", "text": "public function getFormats()\n {\n\t $format_field = $this->getValue('format');\n\t return wed_decodeJSON($format_field,true);\n }", "title": "" }, { "docid": "8bab35d2e27bdf101cc672ef8eea26d6", "score": "0.63493574", "text": "protected function getFormats(): array\n {\n return [self::FORMAT_JSON, self::FORMAT_XML];\n }", "title": "" }, { "docid": "3928cd3bda29617e72799bcb21fc0aed", "score": "0.63034004", "text": "public function getFormats(): array\n {\n $temp = [];\n //Loop through the object's array and pushes only those set to true to our temp array and returns it\n foreach ($this->formats as $key => $value) {\n if ($value === true) {\n $temp[] = $key;\n }\n }\n return $temp;\n }", "title": "" }, { "docid": "c39a01e5d137e1a4e4e2e2006b032ca6", "score": "0.62665975", "text": "public function getFormats()\n {\n return $this->formats;\n }", "title": "" }, { "docid": "6eb8cad7c56c67427fd5491baf1d111a", "score": "0.6236434", "text": "public static function getFormats() {\n return array(\n 'none',\n 'pretty',\n 'php',\n 'php-data',\n 'json-pretty',\n 'json-strict',\n 'serialize',\n 'shell',\n );\n }", "title": "" }, { "docid": "9b607179fef3b4e2d345c55a14683e13", "score": "0.6191641", "text": "public function getFormats()\n {\n return $this->formats;\n }", "title": "" }, { "docid": "4c4c30bf792aeb1b11e7223ddec821f1", "score": "0.618476", "text": "public function getFormats(): array {\n $meta = $this->getMetadata();\n $formats = [];\n foreach ($meta->all($this->getRepo()->getSchema()->dissService->returnFormat) as $i) {\n $formats[] = new Format((string) $i);\n }\n return $formats;\n }", "title": "" }, { "docid": "d3f9da68c80a0b19df6f3e0308bbcb24", "score": "0.6136509", "text": "public function getAllFormats(): array\n {\n return $this->formats;\n }", "title": "" }, { "docid": "ecaaa3f301f2e6d9c7cd1a826d3eaf86", "score": "0.60864604", "text": "public function getFormatList()\n {\n return $this->formatList;\n }", "title": "" }, { "docid": "d1e8eec7fcb208d03c0645114f4de5fc", "score": "0.6077125", "text": "public function getFormats() {\n return $this->options['formats'];\n }", "title": "" }, { "docid": "6ab7151f148ec6443ff0b00a4bbdd0c6", "score": "0.60578376", "text": "protected function getFormatOptions() {\n $formats = array_keys($this->formatProviders);\n return array_combine($formats, $formats);\n }", "title": "" }, { "docid": "7660cceec65ac308f703337d1f1c3055", "score": "0.6045253", "text": "public function toArray() {\n $output = array();\n foreach($this->_magicProperties as $key => $value) {\n if (in_array($key,$this->translation)) {\n $output[array_search($key,$this->translation)] = $value;\n }else{\n $output[$key] = $value;\n }\n }\n return $this->_postarray($output);\n }", "title": "" }, { "docid": "1b5d37186f09079f8473e5e5acb8cccd", "score": "0.60315776", "text": "public static function getFormats()\n {\n return self::$formats;\n }", "title": "" }, { "docid": "21c0ae8a873b1e0575ed0c70b1ba3b71", "score": "0.6009597", "text": "public function getFormat(): array;", "title": "" }, { "docid": "533a5ef9230c2516bbf43355435a87ce", "score": "0.5967811", "text": "public static function formats()\n {\n return self::$formats;\n }", "title": "" }, { "docid": "0eb5e1efc48c3af82c82827bf869d453", "score": "0.59288764", "text": "public function toArray(): array\n {\n return $this->properties;\n }", "title": "" }, { "docid": "75167072d2f8231165125d92682a6ccc", "score": "0.5910167", "text": "public function format() {\n\n /* * Add the mandatary props* */\n if (!is_null($this->name)) {\n $result[self::NAME_KEY] = $this->name;\n }\n\n /* * Add the optional props if any* */\n if (!is_null($this->optionalProperties)) {\n $result = array_merge($result, $this->optionalProperties);\n }\n\n\n return $result;\n }", "title": "" }, { "docid": "76bd564f8bcbefdd84dcaba7e9787f14", "score": "0.58961433", "text": "public function toArray() {\n $result = array();\n foreach($this->getPublicProperties() as $property) {\n $result[$property] = $this->$property;\n }\n if($this->reference) {\n $result['reference'] = (string)$this->reference;\n }\n return $result;\n }", "title": "" }, { "docid": "2c29120e8e71726b84e12a302a8997b1", "score": "0.5871391", "text": "public function jsonSerialize()\n {\n return [\n 'start' => $this->start->format(),\n 'stop' => $this->stop->format(),\n 'toggles' => $this->toggles,\n ];\n }", "title": "" }, { "docid": "c2cad2564f61a7b782157cd700d75893", "score": "0.58274215", "text": "public static function _getPropertyNames(): array\n {\n return [\n 'file_id',\n 'file_unique_id',\n 'thumbnail',\n 'file_name',\n 'mime_type',\n 'file_size',\n ];\n }", "title": "" }, { "docid": "468259a39f98fad3094a66fe5e6a19b9", "score": "0.5815938", "text": "public static function FormatList () {\n if (empty(self::$formats)) {\n // This will fetch all defined thumbnailing formats defined in\n // various projects', plugins' and applications' thumbnailing.yml for\n // sfImageTransformExtraPlugin.\n self::$formats = sfConfig::get('thumbnailing_formats');\n }\n\n $list = array();\n\n foreach (self::$formats as $format => $data) {\n\n if (!isset($data['transformations'][0]['param'])) {\n continue;\n }\n\n $param = $data['transformations'][0]['param'];\n\n if (!isset($param['height']) || !isset($param['width'])) {\n continue;\n }\n\n $tmp = array(\n 'height' => $param['height'],\n 'width' => $param['width'],\n 'mime_type' => explode(', ', $data['mime_type']),\n );\n\n $list[$format] = $tmp;\n }\n\n return $list;\n }", "title": "" }, { "docid": "af987a6c2df373aad15f1a3901752cc9", "score": "0.58004266", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'format' => fn(ParseNode $n) => $o->setFormat($n->getObjectValue([WorkbookChartLegendFormat::class, 'createFromDiscriminatorValue'])),\n 'overlay' => fn(ParseNode $n) => $o->setOverlay($n->getBooleanValue()),\n 'position' => fn(ParseNode $n) => $o->setPosition($n->getStringValue()),\n 'visible' => fn(ParseNode $n) => $o->setVisible($n->getBooleanValue()),\n ]);\n }", "title": "" }, { "docid": "dcab9b0eb9b832e8c896ad3477429be9", "score": "0.579257", "text": "public function toArray(): array\n {\n return [\n 'value' => $this->value,\n 'format' => $this->format,\n 'prefix' => $this->prefix,\n 'suffix' => $this->suffix,\n ];\n }", "title": "" }, { "docid": "5a1fdb1fa870523fcb56f46c68320a3c", "score": "0.579251", "text": "public static function getFormats();", "title": "" }, { "docid": "002eddb7935d088a8da8aae12edaeb66", "score": "0.5787804", "text": "public function toArray()\n {\n return $this->aProperties;\n }", "title": "" }, { "docid": "524e2eaa241839b50963943a52be7f66", "score": "0.576698", "text": "public function getExportFormats(): array;", "title": "" }, { "docid": "257efb8c8ba3d5378ddbe2c0da2d2bb9", "score": "0.5758493", "text": "public function toArray(): array\n {\n return [\n 'background' => __('Background'),\n 'center' => __('Center'),\n ];\n }", "title": "" }, { "docid": "fe8352a9c966d97e58a1aeb90091178d", "score": "0.57187873", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'format' => fn(ParseNode $n) => $o->setFormat($n->getObjectValue([WorkbookChartAxisFormat::class, 'createFromDiscriminatorValue'])),\n 'majorGridlines' => fn(ParseNode $n) => $o->setMajorGridlines($n->getObjectValue([WorkbookChartGridlines::class, 'createFromDiscriminatorValue'])),\n 'majorUnit' => fn(ParseNode $n) => $o->setMajorUnit($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'maximum' => fn(ParseNode $n) => $o->setMaximum($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'minimum' => fn(ParseNode $n) => $o->setMinimum($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'minorGridlines' => fn(ParseNode $n) => $o->setMinorGridlines($n->getObjectValue([WorkbookChartGridlines::class, 'createFromDiscriminatorValue'])),\n 'minorUnit' => fn(ParseNode $n) => $o->setMinorUnit($n->getObjectValue([Json::class, 'createFromDiscriminatorValue'])),\n 'title' => fn(ParseNode $n) => $o->setTitle($n->getObjectValue([WorkbookChartAxisTitle::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "a648d971d312f047dc3d057f377ecf4b", "score": "0.57140106", "text": "abstract protected function getFormatters();", "title": "" }, { "docid": "9476d0aeaff1172b8dbd6b8df4d4b606", "score": "0.56730926", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'settingName' => fn(ParseNode $n) => $o->setSettingName($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "fe4ad67c6a4ae7ee72922561085bfcf8", "score": "0.56524295", "text": "public static function swaggerFormats(): array\n {\n return self::$swaggerFormats;\n }", "title": "" }, { "docid": "22e428683a7c35179f51bc2c75c1186e", "score": "0.5651672", "text": "public static function axerveFormats()\n {\n return self::$axerveFormats;\n }", "title": "" }, { "docid": "067bcbdb30fb4744e6b06899f7d04548", "score": "0.5646754", "text": "public function mapping(): array\n {\n return [\n $this->getType() => [\n '_source' => [\n 'enabled' => true,\n ],\n 'properties' => $this->properties(),\n ],\n ];\n }", "title": "" }, { "docid": "78cf4db9efef90928ec29b3f9d8eed9f", "score": "0.56450075", "text": "public static function getDateFormats() {\n $settings = self::getSettings();\n \n $dateformats = array();\n $dateformats[$settings->language] = json_decode($settings->dateformat, true);\n \n $translations = self::getTranslations();\n foreach($translations as $language => $df) {\n $dateformats[$language] = $df;\n }\n return $dateformats;\n }", "title": "" }, { "docid": "548c680e7c2eade967766cf8441681a3", "score": "0.5641613", "text": "public function toArray()\n {\n return [\n LSR::STORE_HOURS_TIME_FORMAT_24HRS => __('24 Hours'),\n LSR::STORE_HOURS_TIME_FORMAT_12HRS => __('12 Hours')\n ];\n }", "title": "" }, { "docid": "29bc65bd6e318de83f5b37bd49e88c2c", "score": "0.5640898", "text": "public function toArray()\n {\n $id = (int)$this->id;\n\n $values = [\n $this->def['primary'] => $id > 0 ? $id : null,\n ];\n\n foreach (static::$definition['fields'] as $property => $def) {\n $values[$property] = static::formatFieldValue($property, $this->{$property});\n }\n\n return $values;\n }", "title": "" }, { "docid": "f670b9f78e9df13ea209a468aa378786", "score": "0.56114256", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'platformType' => fn(ParseNode $n) => $o->setPlatformType($n->getEnumValue(PolicyPlatformType::class)),\n 'settingCount' => fn(ParseNode $n) => $o->setSettingCount($n->getIntegerValue()),\n 'settingStates' => fn(ParseNode $n) => $o->setSettingStates($n->getCollectionOfObjectValues([ManagedDeviceMobileAppConfigurationSettingState::class, 'createFromDiscriminatorValue'])),\n 'state' => fn(ParseNode $n) => $o->setState($n->getEnumValue(ComplianceStatus::class)),\n 'userId' => fn(ParseNode $n) => $o->setUserId($n->getStringValue()),\n 'userPrincipalName' => fn(ParseNode $n) => $o->setUserPrincipalName($n->getStringValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getIntegerValue()),\n ]);\n }", "title": "" }, { "docid": "5150991458dab55986e98db56cecd76e", "score": "0.56087124", "text": "public function toArray()\n {\n return (array)$this->properties;\n }", "title": "" }, { "docid": "60f6321d307d4e8140d570d1171d046b", "score": "0.56063056", "text": "public function jsonSerialize(): array\n {\n return array_merge([\n 'value' => $this->resolveTransformedValue($this->value),\n 'previous' => $this->resolveTransformedValue($this->previous),\n 'percent_changed' => $percentChanged = $this->percentChanged(),\n 'positive_change' => $percentChanged >= 0,\n // 'previousLabel' => $this->previousLabel,\n 'prefix' => $this->prefix,\n 'suffix' => $this->suffix,\n // 'suffixInflection' => $this->suffixInflection,\n // 'format' => $this->format,\n 'zero_result' => $this->zeroResult,\n ], parent::jsonSerialize());\n }", "title": "" }, { "docid": "3070a17e82dc823b4e986bdfcf7b24da", "score": "0.5604605", "text": "public function getDateFormats()\n {\n return array(\n t('m/d/Y'),\n 'Y-m-d',\n 'Y_m_d',\n );\n }", "title": "" }, { "docid": "24a744475d7a6deab380c132332ec2b3", "score": "0.55800253", "text": "public function toArray() {\n\t\t$array = [];\n\t\tforeach($this->properties as $name => $value) {\n\t\t\t$array[$name] = $value;\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "009167357529555107572a81f4efde49", "score": "0.5553835", "text": "public function toArray(){\n\t\t$data = [];\n\t\tforeach ($this->properties as $key => $value) {\n\t\t\t$name = is_array($value)?'key':'value';\n\t\t\tif(isset($this->{$$name})){\n\t\t\t\t$data[$$name] = $this->{$$name};\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a86dad3ece32a52b1dfc07ffc629f7f3", "score": "0.5538972", "text": "public function toArray(): array\n {\n $serialized = collect($this->properties);\n\n //partial serialization only for initialized properties\n if ($this->isPartial) {\n $serialized = $serialized->intersectByKeys(array_flip($this->initializedProperties));\n }\n\n $serialized = $serialized->mapWithKeys(function ($value, $property) {\n if ($value instanceof Arrayable) {\n $value = $value->toArray();\n }\n\n if ($this->snakeOnSerialize) {\n $property = Str::snake($property);\n }\n\n return [$property => $value];\n });\n\n $this->resetSerializationConditions();\n\n return $serialized->toArray();\n }", "title": "" }, { "docid": "1023c1095913655c86876cc1b4612bd6", "score": "0.5528938", "text": "public function getExportFormats();", "title": "" }, { "docid": "5c4515b1a898b1e51721cef4c38c85ab", "score": "0.5518318", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'action' => fn(ParseNode $n) => $o->setAction($n->getEnumValue(OnenotePatchActionType::class)),\n 'content' => fn(ParseNode $n) => $o->setContent($n->getStringValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n 'position' => fn(ParseNode $n) => $o->setPosition($n->getEnumValue(OnenotePatchInsertPosition::class)),\n 'target' => fn(ParseNode $n) => $o->setTarget($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "5653620dbceb5b4919845ed28195e4cc", "score": "0.55145174", "text": "public static function serialFormats()\n {\n return self::$serialFormats;\n }", "title": "" }, { "docid": "5653620dbceb5b4919845ed28195e4cc", "score": "0.55145174", "text": "public static function serialFormats()\n {\n return self::$serialFormats;\n }", "title": "" }, { "docid": "cc923d0074e4676bdb4269fc65102104", "score": "0.5501074", "text": "public function toArray() \n\t{\n\t\t$properties = array_merge(parent::toArray(), $this->properties);\n\t\tforeach ($properties as $name => $rawValue) {\n\t\t\t$value = $this->get($name, $rawValue);\n\t\t\t\n\t\t\tif ($value instanceof \\Bliss\\Component || $value instanceof \\Bliss\\Collection) {\n\t\t\t\t$properties[$name] = $value->toArray();\n\t\t\t} else {\n\t\t\t\t$properties[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $properties;\n\t}", "title": "" }, { "docid": "0381cb5e258426d41545058d9df7371c", "score": "0.5491259", "text": "public static function swaggerFormats()\n {\n return [\n 'recipients' => null,\n 'result_action' => null,\n 'parameters' => null,\n 'schedule' => null,\n 'generation_date' => null\n ];\n }", "title": "" }, { "docid": "c79329e9570c0aebafc1c27d263cdff3", "score": "0.54893875", "text": "protected static function getCardFormats() : array\n {\n return Formats::getList();\n }", "title": "" }, { "docid": "df4b73a88df826c3f19f78a126bdcd90", "score": "0.5484447", "text": "public function toArray()\n {\n return ['Lax' => __('Lax'), 'Strict' => __('Strict'), 'None' => __('Strict')];\n }", "title": "" }, { "docid": "5bb0982d0e95461f1a2eebb8ecf093c8", "score": "0.5472134", "text": "public function applicable_formats() {\n return array('my' => true);\n }", "title": "" }, { "docid": "879d16ff16221f163fe76294d0df96ae", "score": "0.5468679", "text": "public function toArray()\n {\n $data = parent::toArray();\n return (Config::get('c4tech.jsonify_output', true)) ?\n $this->convertToCamelCase($data) :\n $data;\n }", "title": "" }, { "docid": "e47eda1f5b63afa29bcaf49e7dca459f", "score": "0.54656297", "text": "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getFormatAllowableValues();\n if (!is_null($this->container['format']) && !in_array($this->container['format'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'format', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "title": "" }, { "docid": "d4c0fef3a61025c591694df1dbccd4cb", "score": "0.54648894", "text": "public function getPropertiesAnnotations(): array\n {\n }", "title": "" }, { "docid": "4d30237413e5ee6684162107e3ddf675", "score": "0.5463832", "text": "public function toArray()\n {\n return [\n 'amount_off' => $this->amountOff,\n 'duration' => $this->duration,\n 'duration_in_months' => $this->durationInMonths,\n 'percent_off' => $this->percentOff,\n ];\n }", "title": "" }, { "docid": "167c82fa0c8dd8519c81e219bd9755f6", "score": "0.5452317", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'changeKey' => fn(ParseNode $n) => $o->setChangeKey($n->getStringValue()),\n 'groupKey' => fn(ParseNode $n) => $o->setGroupKey($n->getStringValue()),\n 'isDefaultGroup' => fn(ParseNode $n) => $o->setIsDefaultGroup($n->getBooleanValue()),\n 'name' => fn(ParseNode $n) => $o->setName($n->getStringValue()),\n 'taskFolders' => fn(ParseNode $n) => $o->setTaskFolders($n->getCollectionOfObjectValues([OutlookTaskFolder::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "e4239063e7e3e6f8028f114a44dc55cd", "score": "0.5440142", "text": "public function toArray()\n {\n return array(\n \"httpGet\" => $this->httpGet,\n \"httpPost\" => $this->httpPost,\n \"formats\" => $this->formats\n );\n }", "title": "" }, { "docid": "9ef57dad42aaf85d20bdfb83643425f9", "score": "0.54390585", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'labelPolicySettings' => fn(ParseNode $n) => $o->setLabelPolicySettings($n->getObjectValue([InformationProtectionPolicySetting::class, 'createFromDiscriminatorValue'])),\n 'sensitivityLabels' => fn(ParseNode $n) => $o->setSensitivityLabels($n->getCollectionOfObjectValues([SensitivityLabel::class, 'createFromDiscriminatorValue'])),\n ]);\n }", "title": "" }, { "docid": "5988cdb29e2d6dc944b4bc89a36fe8da", "score": "0.54241604", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'deliveryFrequency' => fn(ParseNode $n) => $o->setDeliveryFrequency($n->getEnumValue(NotificationDeliveryFrequency::class)),\n ]);\n }", "title": "" }, { "docid": "eeb9dbf056d35fbe23bb4d2b18f3b5fa", "score": "0.54140157", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'alternateNotificationEmails' => fn(ParseNode $n) => $o->setAlternateNotificationEmails($n->getStringValue()),\n 'groupLifetimeInDays' => fn(ParseNode $n) => $o->setGroupLifetimeInDays($n->getIntegerValue()),\n 'managedGroupTypes' => fn(ParseNode $n) => $o->setManagedGroupTypes($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "f549798571f4d19d964834826bc67827", "score": "0.54009247", "text": "public function toArray()\n {\n return [\n 'price' => __('Price'),\n 'weight' => __('Weight'),\n '0' => __('No')\n ];\n }", "title": "" }, { "docid": "22c0e3fdbfe0f402ff34e0fafd2ac9ae", "score": "0.54000187", "text": "public function sectionSerialize()\n {\n $templatePrefix = $this->getTranslationTemplate();\n\n $properties = array_combine(\n array_map(function ($k) use ($templatePrefix) {\n return $templatePrefix . $k;\n },\n array_keys(get_object_vars($this))),\n get_object_vars($this)\n );\n return $properties;\n }", "title": "" }, { "docid": "d0095cbdbbd16603b7140840df196ec4", "score": "0.5398595", "text": "public function toArray()\n {\n return array(\n \"field_name\" => $this->fieldName,\n \"direction\" => $this->direction,\n );\n }", "title": "" }, { "docid": "3ccde9e14721124a8c7eb9046197251d", "score": "0.53844786", "text": "public function toArray()\n {\n //dołącza do danych z rekordu dane spakowane w json\n return parent::toArray() + $this->getConfig()->toArray();\n }", "title": "" }, { "docid": "056d899f801f12d08631567a369f5b37", "score": "0.538131", "text": "public function toArray()\n {\n return [\n 'xsmall' => __('Extra small'),\n 'small' => __('Small'),\n 'medium' => __('Medium'),\n 'large' => __('Large'),\n 'xlarge' => __('Extra large'),\n ];\n }", "title": "" }, { "docid": "1c5086fab97505b2b3c1d6a7682d0351", "score": "0.5366237", "text": "public function toArray()\n {\n return [\n 'name' => $this->name(),\n 'label' => $this->label(),\n 'description' => $this->description(),\n 'possibleValues' => json_encode($this->possibleValues()),\n 'type' => $this->types[$this->type()]->name(),\n 'value' => $this->get(),\n 'default' => $this->default()\n ];\n }", "title": "" }, { "docid": "93c0ed60449336bac8ec33b13c203620", "score": "0.5358555", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'file' => fn(ParseNode $n) => $o->setFile($n->getBinaryContent()),\n 'fileHash' => fn(ParseNode $n) => $o->setFileHash($n->getStringValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "da2dc38ca9ddff4326940432c6735e6a", "score": "0.5357569", "text": "public function getProperties(): array\n {\n return $this->properties;\n }", "title": "" }, { "docid": "da2dc38ca9ddff4326940432c6735e6a", "score": "0.5357569", "text": "public function getProperties(): array\n {\n return $this->properties;\n }", "title": "" }, { "docid": "f35865da511e091f1e474dd9611b10a1", "score": "0.53507626", "text": "public static function getProperties()\n {\n return [\n 'PhoneType' => [false, self::PROPERTY_TYPE_ENUM, null, false, false],\n 'PhoneNumber' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PhoneAreaCode' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'PhoneCountryCode' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n ];\n }", "title": "" }, { "docid": "50d97c8d8dcf214eb35cbdaab4f0080e", "score": "0.53471977", "text": "public function toArray()\n {\n $result = array();\n $result['name'] = $this->getName();\n $result['color'] = $this->getColor();\n\n return $result;\n }", "title": "" }, { "docid": "f4417f2715cac64354ca1f781234cae6", "score": "0.534585", "text": "public function jsonProperties(): array\n {\n return [];\n }", "title": "" }, { "docid": "034ed11176e471ac0a1de092de1069bd", "score": "0.53375196", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return [\n 'attributeDestination' => fn(ParseNode $n) => $o->setAttributeDestination($n->getObjectValue([AccessPackageResourceAttributeDestination::class, 'createFromDiscriminatorValue'])),\n 'attributeName' => fn(ParseNode $n) => $o->setAttributeName($n->getStringValue()),\n 'attributeSource' => fn(ParseNode $n) => $o->setAttributeSource($n->getObjectValue([AccessPackageResourceAttributeSource::class, 'createFromDiscriminatorValue'])),\n 'id' => fn(ParseNode $n) => $o->setId($n->getStringValue()),\n 'isEditable' => fn(ParseNode $n) => $o->setIsEditable($n->getBooleanValue()),\n 'isPersistedOnAssignmentRemoval' => fn(ParseNode $n) => $o->setIsPersistedOnAssignmentRemoval($n->getBooleanValue()),\n '@odata.type' => fn(ParseNode $n) => $o->setOdataType($n->getStringValue()),\n ];\n }", "title": "" }, { "docid": "ba5ce1aad81075eeed761bd89f609af3", "score": "0.5335585", "text": "public function jsonSerialize()\n {\n return $this->properties;\n }", "title": "" }, { "docid": "d56e03c1403c87442f784d2c05774a3b", "score": "0.5332212", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'displayName' => fn(ParseNode $n) => $o->setDisplayName($n->getStringValue()),\n 'knowledgeBaseArticle' => fn(ParseNode $n) => $o->setKnowledgeBaseArticle($n->getObjectValue([KnowledgeBaseArticle::class, 'createFromDiscriminatorValue'])),\n 'osBuild' => fn(ParseNode $n) => $o->setOsBuild($n->getObjectValue([BuildVersionDetails::class, 'createFromDiscriminatorValue'])),\n 'product' => fn(ParseNode $n) => $o->setProduct($n->getStringValue()),\n 'releaseDateTime' => fn(ParseNode $n) => $o->setReleaseDateTime($n->getDateTimeValue()),\n 'version' => fn(ParseNode $n) => $o->setVersion($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "f57d94de483942cd9e851f69c68052c0", "score": "0.53276", "text": "public function toArray(): array\n {\n $array = [];\n $str = new Str();\n\n foreach (\\get_object_vars($this) as $property => $value) {\n $array[$str->snake($property)] = $value;\n }\n\n return $array;\n }", "title": "" }, { "docid": "98d246b28ba37ecb2a345935c766ec50", "score": "0.5324838", "text": "public function toArray()\n {\n return [\n 'location' => $this->location(),\n 'from' => $this->from(),\n 'to' => $this->to(),\n 'pencil' => $this->pencil\n ];\n }", "title": "" }, { "docid": "c3d6a250aa4c8bda69c393b4ab12cb4c", "score": "0.532287", "text": "public function toArray()\n\t{\n\t\t$data = array();\n\t\t$refClass = new \\ReflectionClass($this);\n\t\t$props = $refClass->getProperties(\\ReflectionProperty::IS_PROTECTED | \\ReflectionProperty::IS_PUBLIC);\n\n\t\tforeach ($props as $refProp) {\n\t\t\t$name = $refProp->getName();\n\t\t\t$property = $this->{$name};\n\t\t\t\n\t\t\tif ($this->_isBasic && ($property instanceof Component || $property instanceof Collection)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (is_object($property) && method_exists($property, \"toArray\") ) {\n\t\t\t\t$data[$name] = $property->toArray();\n\t\t\t} else if ($property instanceOf \\DateTime) {\n\t\t\t\t$data[$name] = $property->getTimestamp();\n\t\t\t} else if (method_exists($this, \"get{$name}\")) {\n\t\t\t\t$data[$name] = call_user_func(array($this, \"get{$name}\"));\n\t\t\t} else if (!is_object($property)) {\n\t\t\t\t$data[$name] = $property;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this instanceOf Resource\\ResourceInterface) {\n\t\t\t$data[\"resourceId\"] = $this->getResourceId();\n\t\t}\n\t\t\n\t\t# Add constants to the array\n\t\t$data = array_merge($data, $refClass->getConstants());\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "28b7ba85115fb094ff9e4cc161e8c66d", "score": "0.5317459", "text": "public function formatStringsAndParsedFormats(): array\n {\n return [\n ['de', ['dd', ['.'], 'MM', ['.'], 'y']],\n ['en', ['MMM', [' '], 'd', [','], [' '], 'y']],\n ];\n }", "title": "" }, { "docid": "10288ea4c03ef644f0475803343217ef", "score": "0.5314765", "text": "protected function getFieldsAsJson()\n {\n $fields = array_map(function ($field) {\n return $field->toArray();\n }, $this->getFields());\n\n return json_encode($fields, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);\n }", "title": "" }, { "docid": "4742234102d75a287e7c105f242b53db", "score": "0.53135186", "text": "public static function formats() {\n\t\treturn static::types();\n\t}", "title": "" }, { "docid": "c2a4a2c1c419af8dc8aed1afb5b6c8b8", "score": "0.531164", "text": "function custom_field_formats_for_select() {\n $model = ClassRegistry::init('CustomField');\n $formats = $model->FIELD_FORMATS;\n uasort($formats, array($this, '__sort_custom_field_formats_for_select'));\n $select = array();\n foreach ($formats as $k=>$format) {\n $select[$k] = __($format['name']);\n }\n return $select;\n }", "title": "" }, { "docid": "8581d495733ea48719992fc1d1126f11", "score": "0.5309038", "text": "public function toArray()\n {\n return ['stage' => __('Staging'), 'prod' => __('Production')];\n }", "title": "" }, { "docid": "836621da9bfd292a2ca11f3815dc9913", "score": "0.5308556", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'gradingCategories' => fn(ParseNode $n) => $o->setGradingCategories($n->getCollectionOfObjectValues([EducationGradingCategory::class, 'createFromDiscriminatorValue'])),\n 'submissionAnimationDisabled' => fn(ParseNode $n) => $o->setSubmissionAnimationDisabled($n->getBooleanValue()),\n ]);\n }", "title": "" }, { "docid": "3ad50a98c07b57456ef2d9c04fec97d4", "score": "0.53007346", "text": "public function toArray(): array\n {\n return $this->_mapping;\n }", "title": "" }, { "docid": "c5ec2e86675ef649d63f11ac20151be3", "score": "0.5299433", "text": "public function getFormatAllowableValues()\n {\n return [\n self::FORMAT_TEXT,\n self::FORMAT_DIV,\n self::FORMAT_TABLE,\n self::FORMAT_EMAIL,\n ];\n }", "title": "" }, { "docid": "4c4b676ad6f11990975c1598c5100dda", "score": "0.52902746", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'endDateTime' => fn(ParseNode $n) => $o->setEndDateTime($n->getDateTimeValue()),\n 'startDateTime' => fn(ParseNode $n) => $o->setStartDateTime($n->getDateTimeValue()),\n ]);\n }", "title": "" }, { "docid": "4b5adf8f631ef8d8cc42a7b95136d7ed", "score": "0.5289535", "text": "protected function dynamic_properties()\n {\n return [\n '_ip_address_link' => [\n C__PROPERTY__INFO => [\n C__PROPERTY__INFO__TITLE => 'LC__CMDB__IP__URL_TITLE',\n C__PROPERTY__INFO__DESCRIPTION => 'Open IP list'\n ],\n C__PROPERTY__DATA => [\n C__PROPERTY__DATA__FIELD => 'isys_obj__id'\n ],\n C__PROPERTY__FORMAT => [\n C__PROPERTY__FORMAT__CALLBACK => [\n $this,\n 'dynamic_property_callback_ip_address_link'\n ]\n ],\n C__PROPERTY__PROVIDES => [\n C__PROPERTY__PROVIDES__LIST => true\n ]\n ]\n ];\n }", "title": "" }, { "docid": "4ff56cf7294753a00af4d9c49898f158", "score": "0.5288608", "text": "private function define_data_formats()\n\t{\n\t\tif (!isset($this->data_section['format']) OR !is_array($this->data_section['format']))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$data_formats = [];\n\n\t\tforeach ($this->data_section['format'] as $key => $section)\n\t\t{\n\t\t\tif (!isset($section[2]) OR empty($section[2]))\n\t\t\t{\n\t\t\t\t$data_formats[$key] = $section;\n\t\t\t}\n\t\t\telse if ($this->find_flag($section[2]))\n\t\t\t{\n\t\t\t\t$data_formats[$key] = $section;\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($data_formats))\n\t\t{\n\t\t\t$this->data_formats = $data_formats;\n\t\t}\n\t}", "title": "" }, { "docid": "bc04b9f421e7079bc86070f474815a06", "score": "0.5287786", "text": "public function toArray()\n {\n return [\n 'uuid' => $this->uuid,\n 'batch_id' => $this->batchId,\n 'family_hash' => $this->familyHash,\n 'type' => $this->type,\n 'content' => $this->content,\n 'created_at' => $this->recordedAt->toDateTimeString(),\n ];\n }", "title": "" }, { "docid": "ae0a8a1b17f3f9d0655a49d12a0fa93e", "score": "0.5284557", "text": "public function toArray()\n {\n return [\n 'type' => $this->getType(),\n 'title' => $this->getTitle(),\n 'class' => $this->getClass(),\n 'icon' => $this->getIcon(),\n ];\n }", "title": "" }, { "docid": "1bc397b8e5e43b69a2ae9c6e5eed76f0", "score": "0.5284331", "text": "private static function getFormatList($class) {\r\n if (array_key_exists($class, self::$_tablesFormatList)) {\r\n return self::$_tablesFormatList[$class];\r\n }\r\n $obj=new $class();\r\n $formatList= array();\r\n $query=\"desc \" . $obj->getDatabaseTableName();\r\n if (Sql::isPgsql()) {\r\n\t $query=\"SELECT a.attname as field, pg_catalog.format_type(a.atttypid, a.atttypmod) as type\"\r\n\t . \" FROM pg_catalog.pg_attribute a \" \r\n\t . \" WHERE a.attrelid = (SELECT oid FROM pg_catalog.pg_class WHERE relname='\".$obj->getDatabaseTableName().\"')\"\r\n\t . \" AND a.attnum > 0 AND NOT a.attisdropped\"\r\n\t . \" ORDER BY a.attnum\";\r\n }\r\n $result=Sql::query($query);\r\n while ( $line = Sql::fetchLine($result) ) {\r\n $fieldName=(isset($line['Field']))?$line['Field']:$line['field'];\r\n $fieldName=$obj->getDatabaseColumnNameReversed($fieldName);\r\n $type=(isset($line['Type']))?$line['Type']:$line['type'];\r\n if (Sql::isPgsql()) {\r\n \t$from=array(); $to=array();\r\n \t$from[]='integer'; $to[]='int(12)';\r\n \t$from[]='numeric(12,0)'; $to[]='int(12)';\r\n \t$from[]='numeric(5,0)'; $to[]='int(5)';\r\n \t$from[]='numeric(3,0)'; $to[]='int(3)';\r\n \t$from[]='numeric(1,0)'; $to[]='int(1)';\r\n \t$from[]=' without time zone'; $to[]='';\r\n \t$from[]='character varying'; $to[]='varchar';\r\n \t$from[]='numeric'; $to[]='decimal';\r\n \t$from[]='timestamp'; $to[]='datetime';\r\n \t$type=str_ireplace($from, $to, $type);\r\n }\r\n $formatList[strtolower($fieldName)] = $type;\r\n }\r\n self::$_tablesFormatList[$class]=$formatList;\r\n return $formatList;\r\n }", "title": "" }, { "docid": "adfde7896b4c9264ae52a726d6b88ddc", "score": "0.52836806", "text": "public static function getLabelProperties()\n {\n return(array(\n Namespaces::$iron . \"prefLabel\",\n Namespaces::$iron . \"altLabel\",\n Namespaces::$dcterms . \"title\",\n Namespaces::$dc . \"title\",\n Namespaces::$doap . \"name\",\n Namespaces::$foaf . \"name\",\n Namespaces::$foaf . \"givenName\",\n Namespaces::$foaf . \"family_name\",\n Namespaces::$rdfs . \"label\",\n Namespaces::$skos_2004 . \"prefLabel\",\n Namespaces::$skos_2004 . \"altLabel\",\n Namespaces::$skos_2008 . \"prefLabel\",\n Namespaces::$skos_2008 . \"altLabel\",\n Namespaces::$geoname.\"name\"));\n }", "title": "" }, { "docid": "9282ef3b74d185e4a41aa8a0edf5c945", "score": "0.52831644", "text": "public function formatLabels()\n {\n return Collection::make($this->labels)\n ->map(function ($label) {\n return ['label' => $label];\n })\n ->toJson();\n }", "title": "" }, { "docid": "dffadc3d6d69c328f5ce67d1c34c75c3", "score": "0.52822906", "text": "public function getFieldDeserializers(): array {\n $o = $this;\n return array_merge(parent::getFieldDeserializers(), [\n 'recipientActionDateTime' => fn(ParseNode $n) => $o->setRecipientActionDateTime($n->getDateTimeValue()),\n 'recipientActionMessage' => fn(ParseNode $n) => $o->setRecipientActionMessage($n->getStringValue()),\n 'recipientUserId' => fn(ParseNode $n) => $o->setRecipientUserId($n->getStringValue()),\n 'senderShiftId' => fn(ParseNode $n) => $o->setSenderShiftId($n->getStringValue()),\n ]);\n }", "title": "" }, { "docid": "78dfbdb6a071249ecec1b363859d33de", "score": "0.5277543", "text": "public function toArray() {\n\t\treturn array(\n\t\t\tself::FIELD_ID=>$this->getId(),\n\t\t\tself::FIELD_GENRE=>$this->getGenre(),\n\t\t\tself::FIELD_JAAR=>$this->getJaar(),\n\t\t\tself::FIELD_MAAND=>$this->getMaand(),\n\t\t\tself::FIELD_NUMMER=>$this->getNummer(),\n\t\t\tself::FIELD_MUTUALITEIT=>$this->getMutualiteit(),\n\t\t\tself::FIELD_FACTUURDATUM=>$this->getFactuurdatum(),\n\t\t\tself::FIELD_FACTUURFILE=>$this->getFactuurFile(),\n\t\t\tself::FIELD_CREDITACTIEF=>$this->getCreditActief(),\n\t\t\tself::FIELD_VERVANGT=>$this->getVervangt());\n\t}", "title": "" }, { "docid": "270f24abe2533bfc227471f2b9c46b9e", "score": "0.52735746", "text": "public function toArray()\n {\n return [\n 'name' => $this->name,\n 'value' => $this->value,\n 'inline' => $this->inline,\n ];\n }", "title": "" }, { "docid": "2d765d25721f859b9593f124dd7af877", "score": "0.5272173", "text": "public static function getProperties() : array {\r\n return self::$properties;\r\n }", "title": "" }, { "docid": "d1e04efb46aa85ff36ef0dd24c251d2c", "score": "0.52661973", "text": "public static function getProperties()\n {\n return [\n 'AttachmentID' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'FileName' => [true, self::PROPERTY_TYPE_STRING, null, false, false],\n 'Url' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'MimeType' => [false, self::PROPERTY_TYPE_STRING, null, false, false],\n 'ContentLength' => [false, self::PROPERTY_TYPE_INT, null, false, false],\n ];\n }", "title": "" } ]
13ed2c91f4e766c1fb3f7ccbe1aa3e38
Return the temp directory where uploaded files are stored.
[ { "docid": "a645872e260fe14c7f9871d41538c24c", "score": "0.73841125", "text": "public function getTempDir()\n {\n if (!$this->tempDir) {\n $this->tempDir = sys_get_temp_dir();\n }\n return $this->tempDir;\n }", "title": "" } ]
[ { "docid": "178a3830dea0e007b820a9f788c51aa6", "score": "0.8722388", "text": "protected function getUploadDir() {\n return 'upload/temp';\n }", "title": "" }, { "docid": "e0ca10bba4598837324582971aba3bc3", "score": "0.8566085", "text": "function getUploadedFilesTemporaryPath() {\n\t\tif(!MFUQueuesSQLite::$uploadsTempDir) {\n\t\t\tMFUQueuesSQLite::$uploadsTempDir = \\Nette\\Environment::expand(\"%tempDir%\".DIRECTORY_SEPARATOR.\"uploads-MFU\");\n\t\t}\n\n\t\tif(!file_exists(MFUQueuesSQLite::$uploadsTempDir)) {\n\t\t\tmkdir(MFUQueuesSQLite::$uploadsTempDir,0777,true);\n\t\t}\n\n\t\tif(!is_writable(MFUQueuesSQLite::$uploadsTempDir)) {\n\t\t\tMFUQueuesSQLite::$uploadsTempDir = \\Nette\\Environment::expand(\"%tempDir%\");\n\t\t}\n\n\t\tif(!is_writable(MFUQueuesSQLite::$uploadsTempDir)) {\n\t\t\tthrow new InvalidStateException(\"Directory for temp files is not writable!\");\n\t\t}\n\n\t\treturn MFUQueuesSQLite::$uploadsTempDir;\n\t}", "title": "" }, { "docid": "4dc5de8dc08492181b24b73f41f15dcc", "score": "0.85266984", "text": "public function getUploadDir() {\n return 'uploads/temp';\n }", "title": "" }, { "docid": "b130a823dbeb2607aff089600768d95c", "score": "0.8427811", "text": "protected function getTmpUploadRootDir() {\n return __DIR__ . '/../../../../web/upload/';\n }", "title": "" }, { "docid": "f41ac38324261adbf21c4bcee94281c3", "score": "0.82937235", "text": "public function getUploadRootDir() {\n return __DIR__ . '/../../../../web/uploads/temp';\n }", "title": "" }, { "docid": "4fb7e64ef70368c54c34b717da87424b", "score": "0.82857835", "text": "public static function getTmpFileDir() {\n return Dir::asDir(self::$tmp_file_path);\n }", "title": "" }, { "docid": "b774a324f87356719371759435740c6c", "score": "0.8284602", "text": "protected function getTmpUploadRootDir() {\n return __DIR__ . '/../../../../../upload/avatar/';\n \n return __DIR__ . '/../../../../web/upload/';\n }", "title": "" }, { "docid": "fd0ac9fb0861351caafacb4a21dc9289", "score": "0.8264871", "text": "protected function getTmpUploadRootDir() {\n return __DIR__ . '/../../../../web/uploads/recipies/';\n }", "title": "" }, { "docid": "a045ef1116e112ea4dae0ac353865579", "score": "0.7981407", "text": "public static function getTemporaryDirectory()\n {\n return realpath(sys_get_temp_dir());\n }", "title": "" }, { "docid": "cec25fb9e5d0a922d6d2839754bd395b", "score": "0.795088", "text": "public function get_tmp_dir()\n {\n return $this->file ? $this->base_tmp_dir . '/' . basename( $this->file, '.xlsx' ) : '';\n }", "title": "" }, { "docid": "7bf58f69d02f2024be1fde059b4c5e9a", "score": "0.79385704", "text": "protected function getTempDirectory()\n {\n return UtilityComponent::getTempDirectory();\n }", "title": "" }, { "docid": "225379589e98892578f746d7e3892e1f", "score": "0.785387", "text": "public static function getTemporaryFilesPath ()\n {\n return self::$_temporaryFilesPath;\n }", "title": "" }, { "docid": "fb661f50d0bd1c19f709099f72add509", "score": "0.78463537", "text": "public function getTemporaryDirectory()\n {\n return $this->temporaryDirectory;\n }", "title": "" }, { "docid": "d05b88144487766659b2360489f1eb91", "score": "0.78150207", "text": "private function getTemporaryFolderPath()\n {\n return $this->getParameter('kernel.project_dir') . '/var/tmp/';\n }", "title": "" }, { "docid": "6865ae53d1b1f4059bffc4bfa1c202a8", "score": "0.7807114", "text": "function get_temp_dir() {}", "title": "" }, { "docid": "994caf26173422a2eb1a0dd00bd9169c", "score": "0.77935714", "text": "public function getTmpDir()\n {\n return Yii::getAlias('@design_packs_tmp' . DIRECTORY_SEPARATOR . $this->name);\n }", "title": "" }, { "docid": "2510828f1bc0b9361d9223d2ccdb5e5d", "score": "0.77787703", "text": "protected function getUploadRootDir() {\n return $this->getTmpUploadRootDir().$this->getId().\"/\";\n }", "title": "" }, { "docid": "416b6f7e1343ec016607ad4f965b812d", "score": "0.7777549", "text": "protected function getUploadRootDir() {\n return $this->getTmpUploadRootDir().$this->getId().\"/\";\n }", "title": "" }, { "docid": "b24d9874f8373b4a8a919e3e66df3432", "score": "0.7764016", "text": "public static function getTmpPath()\n\t{\n\t\tif (isset(self::$tmpPath)) {\n\t\t\treturn self::$tmpPath;\n\t\t}\n\t\t$hash = hash('crc32', ROOT_DIRECTORY);\n\t\tif (!empty(ini_get('upload_tmp_dir')) && is_writable(ini_get('upload_tmp_dir'))) {\n\t\t\tself::$tmpPath = ini_get('upload_tmp_dir') . \\DIRECTORY_SEPARATOR . 'YetiForceTemp' . $hash . \\DIRECTORY_SEPARATOR;\n\t\t\tif (!is_dir(self::$tmpPath)) {\n\t\t\t\tmkdir(self::$tmpPath, 0755);\n\t\t\t}\n\t\t} elseif (is_writable(sys_get_temp_dir())) {\n\t\t\tself::$tmpPath = sys_get_temp_dir() . \\DIRECTORY_SEPARATOR . 'YetiForceTemp' . $hash . \\DIRECTORY_SEPARATOR;\n\t\t\tif (!is_dir(self::$tmpPath)) {\n\t\t\t\tmkdir(self::$tmpPath, 0755);\n\t\t\t}\n\t\t} elseif (is_writable(ROOT_DIRECTORY . \\DIRECTORY_SEPARATOR . 'cache' . \\DIRECTORY_SEPARATOR . 'upload')) {\n\t\t\tself::$tmpPath = ROOT_DIRECTORY . \\DIRECTORY_SEPARATOR . 'cache' . \\DIRECTORY_SEPARATOR . 'upload' . \\DIRECTORY_SEPARATOR;\n\t\t}\n\t\treturn self::$tmpPath;\n\t}", "title": "" }, { "docid": "534435fa4bfeed5c9e3f80c1d2a051a5", "score": "0.7745433", "text": "public function getUploadRootDir() {\n return $this->getTmpUploadRootDir() . $this->getId() . \"/\";\n }", "title": "" }, { "docid": "3fe5697c4b2c9da8b9e8a80e3aca12c9", "score": "0.77375746", "text": "protected function getTmpUploadRootDir() {\n return __DIR__ . '/../../../../web/uploads/attrait_sous_categorie/';\n }", "title": "" }, { "docid": "3c9235e12d52e1f27df38b23aa52a1ff", "score": "0.77062166", "text": "function tempdir() {\n $tempfile = tempnam(sys_get_temp_dir(), '');\n if (file_exists($tempfile)) {\n unlink($tempfile);\n }\n mkdir($tempfile);\n if (is_dir($tempfile)) {\n return $tempfile;\n }\n }", "title": "" }, { "docid": "a333a401122710e2875542473013e418", "score": "0.7691603", "text": "protected function tmpdir()\n {\n\n if (! $this->tmpdir) {\n $tmpdir = tempnam(sys_get_temp_dir(), 'upload-');\n\n if (file_exists($tmpdir)) {\n unlink($tmpdir);\n }\n\n mkdir($tmpdir);\n $this->tmpdir = $tmpdir;\n }\n\n return $this->tmpdir;\n }", "title": "" }, { "docid": "a1a8248c4eafe0eca8610e2df07954af", "score": "0.76748574", "text": "protected function getTmpDir()\n {\n if (null === $this->tmpDir) {\n $this->tmpDir = sys_get_temp_dir();\n }\n return $this->tmpDir;\n }", "title": "" }, { "docid": "210f4814807e708d07ada53e97b4f84f", "score": "0.7527858", "text": "public function getTempFolderPath()\n {\n return $this->tempFolderPath;\n }", "title": "" }, { "docid": "210f4814807e708d07ada53e97b4f84f", "score": "0.7527858", "text": "public function getTempFolderPath()\n {\n return $this->tempFolderPath;\n }", "title": "" }, { "docid": "210f4814807e708d07ada53e97b4f84f", "score": "0.7527858", "text": "public function getTempFolderPath()\n {\n return $this->tempFolderPath;\n }", "title": "" }, { "docid": "210f4814807e708d07ada53e97b4f84f", "score": "0.7527858", "text": "public function getTempFolderPath()\n {\n return $this->tempFolderPath;\n }", "title": "" }, { "docid": "3d3d2256f244261fead8acb463afeeaa", "score": "0.7497875", "text": "protected function getTmpDir () {\n\t\tif (!static::$tmpDir) {\n\t\t\t$tmpDir = static::$globalOptions['tmpDir'];\n\t\t\t$dirMask = static::$globalOptions['dirMask'];\n\t\t\t$tmpDir = mb_strpos($tmpDir, '~/') === 0\n\t\t\t\t? static::$docRoot . mb_substr($tmpDir, 1)\n\t\t\t\t: $tmpDir;\n\t\t\tif (static::$fileChecking) {\n\t\t\t\tif (!is_dir($tmpDir)) \n\t\t\t\t\t@mkdir($tmpDir, $dirMask);\n\t\t\t\tif (is_dir($tmpDir) && !is_writable($tmpDir)) \n\t\t\t\t\t@chmod($tmpDir, $dirMask);\n\t\t\t}\n\t\t\tstatic::$tmpDir = $tmpDir;\n\t\t}\n\t\treturn static::$tmpDir;\n\t}", "title": "" }, { "docid": "a58c71a0d368c7c6d5242d22ef9d779d", "score": "0.74958205", "text": "public function getTmpDir()\n {\n return $this->tmpDir;\n }", "title": "" }, { "docid": "1028e15552c00b0d875973676c8f994e", "score": "0.747871", "text": "protected function getUploadRootDir()\r\n {\r\n // documents should be saved\r\n return __DIR__ . '/../../../web/uploads/';\r\n }", "title": "" }, { "docid": "11712f2cce3293bd40b0b7833be88695", "score": "0.7477977", "text": "private function getTempDir() {\n\t\tif ( !function_exists('sys_get_temp_dir')) {\n\t\t\tfunction sys_get_temp_dir() {\n\t\t\t\tif ($temp = getenv('TMP')) {\n\t\t\t\t\treturn $temp;\n\t\t\t\t}\n\t\t\t\tif ($temp = getenv('TEMP')) {\n\t\t\t\t\treturn $temp;\n\t\t\t\t}\n\t\t\t\tif ($temp = getenv('TMPDIR')) {\n\t\t\t\t\treturn $temp;\n\t\t\t\t}\n\t\t\t\t$temp = tempnam(__FILE__,'');\n\t\t\t\tif (file_exists($temp)) {\n\t\t\t\t\tunlink($temp);\n\t\t\t\t\treturn dirname($temp);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} else {\n\t\t\treturn sys_get_temp_dir();\n\t\t}\n\t}", "title": "" }, { "docid": "650ec7f2a11e8d5b39c27de8a5fc8a3a", "score": "0.74637234", "text": "public function getUploadRootDir()\n {\n return __DIR__ . '/../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "0bd13ffe1286f9d160d0b5aa9b359dcf", "score": "0.74623644", "text": "protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "4ee1c9206bb3663d3f91e6a951406989", "score": "0.745452", "text": "public function getTempPath()\n {\n if ($this->file_path === null) {\n $this->file_path = sys_get_temp_dir() . '/' . str_random(4) . '-' . $this->getFilename();\n }\n\n return $this->file_path;\n }", "title": "" }, { "docid": "3f3147bd242b6285b53aa631ec2b234c", "score": "0.7450993", "text": "protected function getUploadRootDir() {\n return $this->getTmpUploadRootDir().$this->getId().\"/picture/\";\n }", "title": "" }, { "docid": "5370d6d9e7c935a31ad321c154997a2b", "score": "0.74459106", "text": "public function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "5370d6d9e7c935a31ad321c154997a2b", "score": "0.74459106", "text": "public function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "42eb4dac6a33b01ccd006cea79377548", "score": "0.74435544", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "9c5bd7933c427440c0592fe0cd0e3652", "score": "0.74424976", "text": "protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "ee6b614c2fb04deaa37e3b3177f31112", "score": "0.7428251", "text": "public function getTempDir()\n {\n return $this->tempDir ?: sys_get_temp_dir();\n }", "title": "" }, { "docid": "89fc446a3d11eb9b46f3f8df3affab9a", "score": "0.7421688", "text": "protected function getUploadRootDir() {\n\t\t// documents should be saved\n\t\treturn __DIR__ . '/../../../../web/' . $this -> getUploadDir();\n\t}", "title": "" }, { "docid": "3b9e3f9320f6016a2d0b1a6f538935ad", "score": "0.74142444", "text": "public function getUploadRootDir() {\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "b96e812d792e954493dbd7bc98f8f432", "score": "0.7405355", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "b96e812d792e954493dbd7bc98f8f432", "score": "0.7405355", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "2ddad02e59b348251320ee08cbc1fe54", "score": "0.74019974", "text": "protected function getUploadRootDir()\n {\n return __DIR__ . '/../../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "0826c4d2b5aef46994d9752af532c966", "score": "0.73987526", "text": "public function getTmpPath()\n {\n return $this->getBasePath().$this->tmpPath;\n }", "title": "" }, { "docid": "14c0eb0b0e186dacd528d499415d63d0", "score": "0.7394318", "text": "public static function getTmpDir()\n\t{\n\n\t\tif (DIRECTORY_SEPARATOR == '\\\\')\n\t\t{\n\t\t\tif ($var = isset( $_ENV ['TEMP'] ) ? $_ENV ['TEMP'] : getenv( 'TEMP' ))\n\t\t\t{\n\t\t\t\treturn $var;\n\t\t\t}\n\t\t\tif ($var = isset( $_ENV ['TMP'] ) ? $_ENV ['TMP'] : getenv( 'TMP' ))\n\t\t\t{\n\t\t\t\treturn $var;\n\t\t\t}\n\t\t\tif ($var = isset( $_ENV ['windir'] ) ? $_ENV ['windir'] : getenv( 'windir' ))\n\t\t\t{\n\t\t\t\treturn $var;\n\t\t\t}\n\t\t\t\n\t\t\treturn getenv( 'SystemRoot' ) . '\\temp';\n\t\t}\n\t\t\n\t\tif ($var = isset( $_ENV ['TMPDIR'] ) ? $_ENV ['TMPDIR'] : getenv( 'TMPDIR' ))\n\t\t{\n\t\t\treturn $var;\n\t\t}\n\t\t\n\t\treturn '/tmp';\n\t}", "title": "" }, { "docid": "f7ee9a7c8ad8942b97d2bc2651c062d6", "score": "0.73929065", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web'.$this->getUploadDir();\n }", "title": "" }, { "docid": "ff7e85aa8afcedc48ca8e1130ad38847", "score": "0.73926896", "text": "protected function getUploadRootDir() {\r\n // documents should be saved\r\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\r\n }", "title": "" }, { "docid": "805b416a4f39d0679f9f14224b4dae13", "score": "0.7391891", "text": "protected function getUploadRootDir()\r\n {\r\n // documents should be saved\r\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\r\n }", "title": "" }, { "docid": "43b987d3deb562fbee715348b6de0f5c", "score": "0.73895186", "text": "public static function getTmpPath()\n {\n return self::$_tmpPath;\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9621e14fedea0a483a2b9718d52d97dc", "score": "0.73861486", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "9e2b59229a1c6b2a6e7c98e9916ab1c9", "score": "0.73840755", "text": "public function getUploadRootDir()\n {\n return __DIR__. '/../../../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "8b65dc2b1d112bd2c91fa0415537386e", "score": "0.7380716", "text": "protected function getUploadDir()\n {\n return 'uploads';\n }", "title": "" }, { "docid": "8b65dc2b1d112bd2c91fa0415537386e", "score": "0.7380716", "text": "protected function getUploadDir()\n {\n return 'uploads';\n }", "title": "" }, { "docid": "eea6f1ddd4eed5421caf83aa3cea82a0", "score": "0.7376571", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "eea6f1ddd4eed5421caf83aa3cea82a0", "score": "0.7376571", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "eea6f1ddd4eed5421caf83aa3cea82a0", "score": "0.7376571", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "eea6f1ddd4eed5421caf83aa3cea82a0", "score": "0.7376571", "text": "protected function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "3fb83b2ef8a12234865e011ba030bdd0", "score": "0.7370967", "text": "protected function getUploadRootDir()\n {\n \t// documents should be saved\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "3fb83b2ef8a12234865e011ba030bdd0", "score": "0.7370967", "text": "protected function getUploadRootDir()\n {\n \t// documents should be saved\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "3e4234888208060a2394495ba2f399dc", "score": "0.73703617", "text": "public function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "b5a2b404a75b53186e76b79c141bc113", "score": "0.7369114", "text": "protected function getUploadRootDir()\n {\n \t// documents should be saved\n \t\n\n \treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "2d793cc75ce985b2be2af4a0e9b832c8", "score": "0.73669577", "text": "protected function getUploadRootDir()\n\t{\n\t\t// documents should be saved\n\t\treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n\t}", "title": "" }, { "docid": "2d793cc75ce985b2be2af4a0e9b832c8", "score": "0.73669577", "text": "protected function getUploadRootDir()\n\t{\n\t\t// documents should be saved\n\t\treturn __DIR__.'/../../../../web/'.$this->getUploadDir();\n\t}", "title": "" }, { "docid": "58f5e2b495905ede80ad62391f6f014a", "score": "0.73641515", "text": "protected function getUploadRootDir() {\n // documents should be saved\n return __DIR__ . '/../../../../web/' . $this->getUploadDir();\n }", "title": "" }, { "docid": "754eb22e91a9366d8d7c3fefb5674d9c", "score": "0.73422796", "text": "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "1cc98955906c687464ede0329c84933a", "score": "0.7340808", "text": "public function getUploadRootDir()\n {\n return __DIR__.'/../../../web/'.$this->getUploadDir().'/'.$this->id;\n }", "title": "" }, { "docid": "12ab8a562b24ecc36a07b6a5c078f583", "score": "0.7339054", "text": "protected function getUploadRootDir()\n {\n return __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.$this->getUploadDir();\n }", "title": "" }, { "docid": "baf32d5be154a4d3512375831a0a8727", "score": "0.7337684", "text": "protected function getUploadRootDir()\n {\n // the absolute directory path where uploaded documents should be saved\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "a0f0121b0536da65f8f4b68ac5ec3bab", "score": "0.7336559", "text": "protected function getUploadRootDir() {\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "f5a3c0cddc183c96752e16b6ec42ff89", "score": "0.73345065", "text": "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "f5a3c0cddc183c96752e16b6ec42ff89", "score": "0.73345065", "text": "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "f5a3c0cddc183c96752e16b6ec42ff89", "score": "0.73345065", "text": "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "f5a3c0cddc183c96752e16b6ec42ff89", "score": "0.73345065", "text": "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "4b82e5d6e2dd686a32c751ca3e1b9df6", "score": "0.73160714", "text": "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "4b82e5d6e2dd686a32c751ca3e1b9df6", "score": "0.73160714", "text": "public function getUploadRootDir()\n {\n // documents should be saved\n return __DIR__.'/../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "3e31a643604d5382f028aa74848876ce", "score": "0.7308158", "text": "protected function getUploadRootDir()\n {\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" }, { "docid": "e2db5fe3f3ffdad3d55ae9d519f0939d", "score": "0.7307073", "text": "public static function getUploadDir()\n {\n return '/uploads';\n }", "title": "" }, { "docid": "58f3a943fbf148286072e4fd6d59d06c", "score": "0.7304683", "text": "public function getTmpDir()\n {\n // We use a Zend method here, for it already checks the OS.\n $temp = new Zend_Cache_Backend();\n return $temp->getTmpDir();\n }", "title": "" }, { "docid": "045248223e583447f436f15dcdae951e", "score": "0.7295844", "text": "function get_temp_dir(): string {\n global $CFG;\n return $CFG->tempdir ?? $CFG->dataroot . '/temp';\n}", "title": "" }, { "docid": "6fc7ae3b69e87fec2116fd193872cc4b", "score": "0.7293537", "text": "protected function getUploadDir()\n {\n // when displaying uploaded doc/image in the view.\n return 'uploads/tests';\n }", "title": "" }, { "docid": "bd1d13e690572f6909e680fcdee8b814", "score": "0.727341", "text": "public static function getUploadRootDir()\n {\n return __DIR__.'/../../../../../../../web'.self::getUploadDir();\n }", "title": "" }, { "docid": "1e0847030a38389cd06e03b2f9e2205c", "score": "0.72573555", "text": "protected function getUploadRootDir()\n {\n \t// guardar los archivos cargados\n \treturn 'uploads/reporting/';\n }", "title": "" }, { "docid": "f22abec8453304d921953298085d007c", "score": "0.7255309", "text": "protected function getUploadRootDir(){\n return __DIR__.'/../../../../web/'.$this->getUploadDir();\n }", "title": "" } ]
8ae9492ba737efd46dc87efa56da92a8
$fields is requested fields data which request from Form $requestType defined that what the type of the Request (POST or GET) $type is defined to convert that requested data into (integer, boolean, float, string(default))
[ { "docid": "d0a823ff9c4e2c95a4f901341bb07785", "score": "0.66892177", "text": "function getRequestData($Fields = array(), $requestType, $type = array())\n{\n try {\n $data = array();\n if ($requestType == \"post\") {\n $request = $_POST;\n } else if ($requestType == \"get\") {\n $request = $_GET;\n } else {\n throw new Exception(\"Request type Error\");\n }\n\n foreach ($Fields as $val) {\n if (substr($val, 0, 3) === \"chk\")\n if (isset($request[$val]))\n $requestValue = $request[$val] == \"on\" ? true : $request[$val];\n else \n $requestValue = false;\n else\n $requestValue = ifsetor($request[$val]);\n\n if (isset($type[$val]))\n if ($type[$val] === \"integer\")\n $requestValue = (integer) $requestValue;\n else if ($type[$val] === \"string\")\n $requestValue = (string) $requestValue;\n else if ($type[$val] === \"float\")\n $requestValue = (float) $requestValue;\n else if ($type[$val] === \"boolean\")\n $requestValue = (boolean) $requestValue;\n\n $data[$val] = $requestValue;\n }\n\n return $data;\n\n } catch (Exception $e) {\n throw $e->getMessage();\n }\n\n}", "title": "" } ]
[ { "docid": "a17cf53d2adaceef3118eeb6ac829e2f", "score": "0.64640945", "text": "abstract public function fields(Request $request);", "title": "" }, { "docid": "f4b2ada3d9870e179fc575aa198fcc62", "score": "0.6310108", "text": "function regenerate_fields( $type ){\n\n\t\t$this->remove_traces();\n\n\t\tif( $type == 'job' || $type == 'company'){\n\t\t\tself::init_fields();\n\t\t}\n\t}", "title": "" }, { "docid": "edbc32d82cc8c5ce815cb469057edc24", "score": "0.61737514", "text": "protected function _fields($type) {\n\t\treturn $this->_fields[$type];\n\t}", "title": "" }, { "docid": "78db72a4178f69fe51bdbc6490791942", "score": "0.6144136", "text": "private function _requestInputs($request, $type = 'email')\n {\n return [\n $type => $request->get('username'),\n 'password' => $request->get('password'),\n 'is_email_verified' => 1,\n 'is_account_enabled' => 1\n ];\n }", "title": "" }, { "docid": "50720cae52a6c085847c4e1ecc6de203", "score": "0.6115472", "text": "public function getFields($uid, $type, $fields = array(), $filter = true)\n {\n $result = array();\n $uids = (array) $uid;\n if (!$fields) {\n $fields = $this->getMeta($type);\n } else {\n $fields = array_unique($fields);\n }\n\n if ('account' == $type || 'profile' == $type) {\n $primaryKey = 'account' == $type ? 'id' : 'uid';\n $fields[] = $primaryKey;\n $model = Pi::model($type, 'user');\n $select = $model->select()->where(array($primaryKey => $uids))\n ->columns($fields);\n $rowset = $model->selectWith($select);\n foreach ($rowset as $row) {\n $id = (int) $row[$primaryKey];\n if ($filter) {\n $result[$id] = $row->filter($fields);\n } else {\n $result[$id] = $row->toArray();\n }\n }\n } elseif ('custom' == $type) {\n $model = Pi::model($type, 'user');\n $where = array(\n 'uid' => $uids,\n 'field' => $fields,\n );\n $columns = array('uid', 'field', 'value');\n $select = $model->select()->where($where)->columns($columns);\n $rowset = $model->selectWith($select);\n foreach ($rowset as $row) {\n if ($filter) {\n $value = $row->filter();\n } else {\n $value = $row['value'];\n }\n $result[(int) $row['uid']][$row['field']] = $value;\n }\n } elseif ('compound' == $type) {\n $model = Pi::model($type, 'user');\n $where = array(\n 'uid' => $uids,\n 'compound' => $fields,\n );\n $rowset = $model->select($where);\n foreach ($rowset as $row) {\n if ($filter) {\n $value = $row->filter();\n } else {\n $value = $row['value'];\n }\n $result[(int) $row['uid']][$row['compound']][$row['set']][$row['field']]\n = $value;\n }\n }\n if (is_scalar($uid)) {\n if (isset($result[$uid])) {\n $result = $result[$uid];\n } else {\n $result = array();\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "a855a1b1e9d075bce0840a80530911f3", "score": "0.6065512", "text": "public function process($type, $fields) {\n\n if (parent::notLoggedIn()) {\n return parent::notLoggedIn();\n }\n\n $usr = safeget::session(\"user\", null, null, false);\n $eml = $usr ? $usr->email : \"\";\n $dbc = Database::connect();\n \n switch ($type) {\n \n default:\n $td = new \\DateTime();\n $ast = $td->format(\"Y-m-d H:i\");\n $aen = null;\n $alv = 1;\n $awv = 1;\n \n if (isset($usr) && strlen($eml) > 0 ) {\n \n try {\n //new record \n $aid = self::addAttack($eml, $ast, $aen, $alv, $awv, $dbc);\n return new AttackNow_View($ast);\n \n } catch (\\Exception $e) {\n Logger::log(getNiceErrorMessage($e), $usr->email); \n return new Error_View($e->getCode(), getNiceErrorMessage($e)); \n }\n } else {\n //no user email\n $errmsg = \"Failed to add/amend attack - no email address\";\n Logger::log($errmsg, \"rowcount: \".$qry->rowCount()); \n return new Error_View(ChlogErr::EC_ATTACKADDNOUSER, ChlogErr::EM_ATTACKADDNOUSER);\n } \n\n //If we got here, it worked! so redirect to the home page.\n return new Redirect_View(\"/\");\n break;\n\n }\n }", "title": "" }, { "docid": "62cb37529c105d095ac5ae300210ce80", "score": "0.59612674", "text": "function GetFormData($field_name, $data_type)\n{\n\t#$field_name\t->\tname of the form field\t\n\t#$data_type\t\t->\t0 for POST, 1 for GET, 2 for REQUEST\n\t\n\t#returns the form data after filtering\n\t#move the filter function inside this function to save processing time\n\t\n\tif($data_type==0)\n\t\t$sFormData = filter(isset($_POST[$field_name])?$_POST[$field_name]:'');\n\telseif($data_type==1)\n\t\t$sFormData = filter(isset($_GET[$field_name])?$_GET[$field_name]:'');\n\telseif($data_type==2)\n\t\t$sFormData = filter(isset($_REQUEST[$field_name])?$_REQUEST[$field_name]:'');\n\t\t\n\treturn $sFormData;\n\t\n}", "title": "" }, { "docid": "e243969db9de69eb5748a151d4a29815", "score": "0.59095985", "text": "private function getFields(){\n\n\t\t$types = FieldFactory::getAvailableTypes();\n\t\t//$types = Sort::pluck( $types, 'name' );\n\n\n\n\t\t$in_standard = array( 'text', 'textarea', 'email', 'checkbox', 'number', 'checkboxes', 'radio', 'select' );\n\t\t$in_adv = array( 'file', 'wysiwyg', 'date', 'password', 'hidden', 'address' );\n\n\t\t$in_des = array( 'html', 'break' );\n\n\t\t$in_standard = apply_filters( 'chef_forms_standard_fields', $in_standard );\n\t\t$in_adv = apply_filters( 'chef_forms_advanced_fields', $in_adv );\n\t\t$in_des = apply_filters( 'chef_forms_design_fields', $in_des );\n\n\t\t$return = array( 'standard' => array(), 'advanced' => array(), 'design' => array() );\n\n\n\t\tforeach( $types as $key => $value ){\n\n\t\t\tif( in_array( $key, $in_standard ) )\n\t\t\t\t$return['standard'][ $key ] = $value;\n\n\t\t\tif( in_array( $key, $in_adv ) )\n\t\t\t\t$return['advanced'][ $key ] = $value; \n\n\t\t\tif( in_array( $key, $in_des ) )\n\t\t\t\t$return['design'][ $key ] = $value;\n \t\t}\n\n\n\t\treturn $return;\n\n\t}", "title": "" }, { "docid": "e66f189b24e37b8bc1c64dc62f6055e5", "score": "0.5860167", "text": "function wf_crm_required_contact_fields($contact_type) {\n if ($contact_type == 'individual') {\n return [\n ['table' => 'email', 'name' => 'email'],\n ['table' => 'contact', 'name' => 'first_name'],\n ['table' => 'contact', 'name' => 'last_name'],\n ];\n }\n return [['table' => 'contact', 'name' => $contact_type . '_name']];\n}", "title": "" }, { "docid": "c9b0f88accc273714dadb2852a736ef4", "score": "0.58597267", "text": "public function fields($entity_type, $bundle);", "title": "" }, { "docid": "13ec24321593683f71767f0b57050748", "score": "0.5837821", "text": "public function fieldTypes()\n {\n $fieldTypes = [\n 'email' => 'email',\n 'textbox' => 'input_text',\n 'address' => 'input_text',\n 'city' => 'input_text',\n 'zip' => 'input_text',\n 'liststate' => 'select',\n 'firstname' => 'input_text',\n 'lastname' => 'input_text',\n 'listcountry' => 'select_country',\n 'textarea' => 'input_textarea',\n 'phone' => 'phone',\n 'select' => 'select',\n 'listselect' => 'select',\n 'listmultiselect' => 'multi_select',\n 'radio' => 'input_radio',\n 'listcheckbox' => 'input_checkbox',\n 'listimage' => 'input_radio',\n 'listradio' => 'input_radio',\n 'checkbox' => 'input_checkbox',\n 'date' => 'input_date',\n 'html' => 'custom_html',\n 'hr' => 'section_break',\n 'repeater' => 'repeater_field',\n 'starrating' => 'ratings',\n 'recaptcha' => 'reCaptcha',\n 'number' => 'input_number',\n 'hidden' => 'input_hidden',\n 'submit' => 'submit',\n ];\n return $fieldTypes;\n }", "title": "" }, { "docid": "b1db33fb2d663925d6e1a90024393208", "score": "0.57489324", "text": "protected function setFieldsTypeByName()\n {\n foreach($this->getFields() as $fieldName => $fieldInfos){\n $v = $this->row->get($fieldName);\n \n switch($fieldInfos->Type){\n case 'bigint':\n case 'mediumint':\n case 'smallint':\n case 'tinyint':\n case 'int':\n $this->row->set($fieldName, (int)$v); \n break;\n \n case 'datetime':\n case 'timestamp':\n if ( $v === $this->db->getNullDate() ){\n $this->row->set($fieldName, ''); \n }\n break;\n \n case 'date':\n if ( $v === $this->db->getNullDate(false) ){\n $this->row->set($fieldName, ''); \n }\n break;\n \n case 'time':\n if ( $v === '00:00:00' ){\n $this->row->set($fieldName, ''); \n }\n break;\n }\n \n if ( $fieldName === 'published' ){\n $this->row->set($fieldName, (bool)$v); \n }\n }\n }", "title": "" }, { "docid": "cd30fc59a564245aa89c66cd96309cfc", "score": "0.5745331", "text": "public function prepareFieldItem($fields)\n {\n if (is_array($fields)) {\n foreach ($fields as &$field) {\n $this->prepareFieldItem($field);\n }\n } else {\n\n /*TODO\n if ($fields['needAccess'] && !Kryn::checkUrlAccess($fields['needAccess'])) {\n $fields = null;\n\n return;\n }*/\n\n if (substr($fields->getId(), 0, 2) != '__' && substr($fields->getId(), -2) != '__') {\n switch ($fields->getType()) {\n case 'predefined':\n\n if (!$fields->getObject()) {//&& !$this->getObject()) {\n throw new \\Exception(sprintf(\n 'Fields of type `predefined` need a `object` option. [%s]',\n json_encode($fields->toArray(), JSON_PRETTY_PRINT)\n ));\n// } else if (!$fields->getObject()) {\n// $fields->setObject($this->getObject());\n }\n\n if (!$fields->getField()) {//&& !$fields->getId()) {\n throw new \\Exception(sprintf(\n 'Fields of type `predefined` need a `field` option. [%s]',\n json_encode($fields->toArray(), JSON_PRETTY_PRINT)\n ));\n// } else if (!$fields->getField()) {\n// $fields->setField($fields->getId());\n }\n\n $object = $this->getKrynCore()->getObjects()->getDefinition($fields->getObject());\n if (!$object) {\n throw new \\Exception(sprintf(\n 'Object `%s` does not exist [%s]',\n $fields->getObject(),\n json_encode($fields->toArray(), JSON_PRETTY_PRINT)\n ));\n }\n $def = $object->getField($fields->getField());\n if (!$def) {\n $objectArray = $object->toArray();\n $fields2 = $objectArray['fields'];\n throw new \\Exception(sprintf(\n \"Object `%s` does not have field `%s`. \\n[%s]\\n[%s]\",\n $fields->getObject(),\n $fields->getField(),\n json_encode($fields->toArray(), JSON_PRETTY_PRINT),\n json_encode($fields2, JSON_PRETTY_PRINT)\n ));\n }\n if ($def) {\n $fields = $def;\n }\n\n break;\n case 'select':\n\n// if ($fields->getTable()) {\n// $fields['tableItems'] = dbTableFetchAll($fields['table']);\n// } else if ($fields['sql']) {\n// $fields['tableItems'] = dbExFetchAll(str_replace('%pfx%', pfx, $fields['sql']));\n// } else if ($fields['method']) {\n// $nam = $fields['method'];\n// if (method_exists($this, $nam)) {\n// $fields['tableItems'] = $this->$nam($fields);\n// }\n// }\n//\n// if ($fields['modifier'] && !empty($fields['modifier']) &&\n// method_exists($this, $fields['modifier'])\n// ) {\n// $fields['tableItems'] = $this->$fields['modifier']($fields['tableItems']);\n// }\n\n break;\n }\n $this->_fields[$fields->getId()] = $fields;\n }\n\n if (is_array($fields->getChildren())) {\n $this->prepareFieldItem($fields->getChildren());\n }\n\n }\n }", "title": "" }, { "docid": "919366c1b2d1e9669328b228099cb581", "score": "0.5745124", "text": "public static function formFieldValues($fields) {\n $values = [];\n \n foreach ($fields as $field) {\n $type = trim($field['type'] ?? null);\n $name = trim($field['name'] ?? null);\n if($name==''){\n continue;\n }\n $values[$name] = request($name);\n }\n\n return $values;\n }", "title": "" }, { "docid": "d82ed453f6560872fe2058591aeb9b46", "score": "0.57290787", "text": "protected function _setKeys($type, $fields)\n {\n switch ($type) {\n case 'campaign':\n if (empty($this->keysCampaign)) {\n $this->keysCampaign = array_flip($fields);\n }\n break;\n\n case 'ads':\n if (empty($this->keysAds)) {\n $this->keysAds = array_flip($fields);\n }\n break;\n\n case 'group-report':\n if (empty($this->keysGroup)) {\n $this->keysGroup = array_flip($fields);\n }\n break;\n }\n }", "title": "" }, { "docid": "197930c3e2c4f525b91c88865fa7c1a4", "score": "0.5718195", "text": "public function fields(Request $request)\n { \n return [ \n ]; \n }", "title": "" }, { "docid": "280fe860ad8049cfe3d1a54c3b0f0c71", "score": "0.57177764", "text": "public function getTransactionTypeFields()\n {\n return [\n 'form_fields' => [\n \"NR\" => [\n 'transaction_type' => ['title' => 'Transaction Type', 'required' => 'true'],\n 'new_or_used' => ['title' => 'Select Vehicle Status', 'required' => 'true'],\n 'vin' => ['title' => 'VIN', 'required' => 'true'],\n 'vehicle_type' => ['title' => 'Vehicle Type', 'required' => 'true'],\n 'model_year' => ['title' => 'Model Year', 'required' => 'true'],\n 'street_address' => ['title' => 'Dealer Address', 'required' => 'false'],\n 'zip' => ['title' => 'Zip', 'required' => 'false'],\n 'resident_county' => ['label' => 'Select Resident County', 'required' => 'false'],\n 'processing_county' => ['label' => 'Select Processing County', 'required' => 'true'],\n 'empty_weight' => ['title' => 'Empty Weight', 'required' => 'true'],\n 'trailer_weight' => ['title' => 'Trailer Weight', 'required' => 'false'],\n 'carrying_capacity' => ['title' => 'Carrying Capacity', 'required' => 'false'],\n 'gvw' => ['title' => 'GVW', 'required' => 'false'],\n 'gvwr' => ['title' => 'GVWR', 'required' => 'false'],\n 'inspection_type' => ['title' => 'Select Inspection Type', 'required' => 'false'],\n 'freight' => ['title' => 'Freight', 'required' => 'false'],\n 'sales_price' => ['title' => 'Sales Price', 'required' => 'false'],\n 'rebate_discount' => ['title' => 'Rebate / Discount', 'required' => 'false'],\n 'trade_in_value' => ['title' => 'Trade-in Value', 'required' => 'false'],\n 'taxable_value' => ['title' => 'Taxable Value ', 'required' => 'false'],\n 'fuel_type' => ['title' => 'Fuel Type', 'required' => 'false'],\n 'date_of_sale' => ['title' => 'Date of Sale', 'required' => 'false'],\n 'miscellaneous_fee' => ['title' => 'Miscellaneous Fees', 'required' => 'false']\n ],\n \"TP\" => [\n 'transaction_type' => ['title' => 'Transaction Type', 'required' => 'true'],\n 'new_or_used' => ['title' => 'Select Vehicle Status', 'required' => 'true'],\n 'vin' => ['title' => 'VIN', 'required' => 'true'],\n 'vehicle_type' => ['title' => 'Vehicle Type', 'required' => 'true'],\n 'model_year' => ['title' => 'Model Year', 'required' => 'true'],\n 'street_address' => ['title' => 'Dealer Address', 'required' => 'false'],\n 'zip' => ['title' => 'Zip', 'required' => 'false'],\n 'resident_county' => ['label' => 'Select Resident County', 'required' => 'false'],\n 'processing_county' => ['label' => 'Select Processing County', 'required' => 'true'],\n 'empty_weight' => ['title' => 'Empty Weight', 'required' => 'true'],\n 'trailer_weight' => ['title' => 'Trailer Weight', 'required' => 'false'],\n 'carrying_capacity' => ['title' => 'Carrying Capacity', 'required' => 'false'],\n 'gvw' => ['title' => 'GVW', 'required' => 'false'],\n 'gvwr' => ['title' => 'GVWR', 'required' => 'false'],\n 'inspection_type' => ['title' => 'Select Inspection Type', 'required' => 'true'],\n 'freight' => ['title' => 'Freight', 'required' => 'false'],\n 'sales_price' => ['title' => 'Sales Price', 'required' => 'true'],\n 'rebate_discount' => ['title' => 'Rebate / Discount', 'required' => 'true'],\n 'trade_in_value' => ['title' => 'Trade-in Value', 'required' => 'true'],\n 'taxable_value' => ['title' => 'Taxable Value ', 'required' => 'false'],\n 'fuel_type' => ['title' => 'Fuel Type', 'required' => 'true'],\n 'date_of_sale' => ['title' => 'Date of Sale', 'required' => 'false'],\n 'miscellaneous_fee' => ['title' => 'Miscellaneous Fees', 'required' => 'false']\n ],\n \"DT\" => [\n 'transaction_type' => ['title' => 'Transaction Type', 'required' => 'true'],\n 'new_or_used' => ['title' => 'Select Vehicle Status', 'required' => 'true'],\n 'vin' => ['title' => 'VIN', 'required' => 'true'],\n 'vehicle_type' => ['title' => 'Vehicle Type', 'required' => 'true'],\n 'model_year' => ['title' => 'Model Year', 'required' => 'true'],\n 'miscellaneous_fee' => ['title' => 'Miscellaneous Fees', 'required' => 'false']\n ],\n \"TO\" => [\n 'transaction_type' => ['title' => 'Transaction Type', 'required' => 'true'],\n 'new_or_used' => ['title' => 'Select Vehicle Status', 'required' => 'true'],\n 'vin' => ['title' => 'VIN', 'required' => 'true'],\n 'vehicle_type' => ['title' => 'Vehicle Type', 'required' => 'true'],\n 'model_year' => ['title' => 'Model Year', 'required' => 'true'],\n 'street_address' => ['title' => 'Dealer Address', 'required' => 'false'],\n 'zip' => ['title' => 'Zip', 'required' => 'false'],\n 'resident_county' => ['label' => 'Select Resident County', 'required' => 'false'],\n 'processing_county' => ['label' => 'Select Processing County', 'required' => 'true'],\n 'empty_weight' => ['title' => 'Empty Weight', 'required' => 'true'],\n 'trailer_weight' => ['title' => 'Trailer Weight', 'required' => 'false'],\n 'carrying_capacity' => ['title' => 'Carrying Capacity', 'required' => 'false'],\n 'gvw' => ['title' => 'GVW', 'required' => 'false'],\n 'gvwr' => ['title' => 'GVWR', 'required' => 'false'],\n 'inspection_type' => ['title' => 'Select Inspection Type', 'required' => 'true'],\n 'freight' => ['title' => 'Freight', 'required' => 'false'],\n 'sales_price' => ['title' => 'Sales Price', 'required' => 'true'],\n 'rebate_discount' => ['title' => 'Rebate / Discount', 'required' => 'true'],\n 'trade_in_value' => ['title' => 'Trade-in Value', 'required' => 'true'],\n 'taxable_value' => ['title' => 'Taxable Value ', 'required' => 'false'],\n 'fuel_type' => ['title' => 'Fuel Type', 'required' => 'true'],\n 'date_of_sale' => ['title' => 'Date of Sale', 'required' => 'false'],\n 'miscellaneous_fee' => ['title' => 'Miscellaneous Fees', 'required' => 'false']\n ],\n \"RO\" => [\n 'transaction_type' => ['title' => 'Transaction Type', 'required' => 'true'],\n 'new_or_used' => ['title' => 'Select Vehicle Status', 'required' => 'true'],\n 'vin' => ['title' => 'VIN', 'required' => 'true'],\n 'vehicle_type' => ['title' => 'Vehicle Type', 'required' => 'true'],\n 'model_year' => ['title' => 'Model Year', 'required' => 'true'],\n 'street_address' => ['title' => 'Dealer Address', 'required' => 'false'],\n 'zip' => ['title' => 'Zip', 'required' => 'false'],\n 'resident_county' => ['label' => 'Select Resident County', 'required' => 'false'],\n 'processing_county' => ['label' => 'Select Processing County', 'required' => 'true'],\n 'empty_weight' => ['title' => 'Empty Weight', 'required' => 'true'],\n 'trailer_weight' => ['title' => 'Trailer Weight', 'required' => 'false'],\n 'carrying_capacity' => ['title' => 'Carrying Capacity', 'required' => 'false'],\n 'gvw' => ['title' => 'GVW', 'required' => 'false'],\n 'gvwr' => ['title' => 'GVWR', 'required' => 'false'],\n 'inspection_type' => ['title' => 'Select Inspection Type', 'required' => 'true'],\n 'fuel_type' => ['title' => 'Fuel Type', 'required' => 'true'],\n 'date_of_sale' => ['title' => 'Date of Sale', 'required' => 'false'],\n 'miscellaneous_fee' => ['title' => 'Miscellaneous Fees', 'required' => 'false']\n ],\n \"TRC\" => [\n 'transaction_type' => ['title' => 'Transaction Type', 'required' => 'true'],\n 'new_or_used' => ['title' => 'Select Vehicle Status', 'required' => 'true'],\n 'vin' => ['title' => 'VIN', 'required' => 'true'],\n 'vehicle_type' => ['title' => 'Vehicle Type', 'required' => 'true'],\n 'model_year' => ['title' => 'Model Year', 'required' => 'true']\n ]\n ],\n 'calculator_options' => [\n // List generic fields.\n 'no_fees' => ['selected' => 'false'],\n 'temp_tag' => ['selected' => 'true'],\n 'is_trade_in_leased' => ['selected' => 'false'],\n 'member_of_military' => ['selected' => 'false'],\n 'off_highway_use' => ['selected' => 'false'],\n 'rebuilt_salvage' => ['selected' => 'false'],\n 'exempt_from_sales_tax' => ['selected' => 'false'],\n 'include_inspection_fee' => ['selected' => 'false'],\n 'include_vit_tax' => ['selected' => 'false'],\n 'include_late_fees' => ['selected' => 'true'],\n ]\n ];\n }", "title": "" }, { "docid": "ec0e4b657f4c722b129dd908e24e062f", "score": "0.5705947", "text": "private function __buildFields($dataBit, $columns, $type = 'select') {\n\t\tswitch ($type) {\n\t\t\tcase 'update':\n\t\t\t\tforeach ($columns as $column => $value) {\n\t\t\t\t\tif (is_numeric($column)) {\n\t\t\t\t\t\t$this->__data[$dataBit]['fields'][] = $value;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->__data[$dataBit]['fields'][] = $this->backtick($column) .\" = \". $this->__formatType($value, $column);\n\t\t\t\t\t\t$this->addBind($dataBit, $column, $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'insert':\n\t\t\t\tforeach ($columns as $column => $value) {\n\t\t\t\t\t$this->__data[$dataBit]['fields'][] = $this->backtick($column);\n\t\t\t\t\t$this->__data[$dataBit]['values'][] = $this->__formatType($value, $column);\n\t\t\t\t\t$this->addBind($dataBit, $column, $value);\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'select':\n\t\t\t\tforeach ($columns as $column) {\n\t\t\t\t\tif (strpos(strtoupper($column), ' AS ') !== false) {\n\t\t\t\t\t\t$column = str_replace(' as ', ' AS ', $column);\n\t\t\t\t\t\t$parts = explode('AS', $column);\n\t\t\t\t\t\t$this->__data[$dataBit]['fields'][] = $this->backtick(trim($parts[0])) .' AS '. $this->backtick(trim($parts[1]));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->__data[$dataBit]['fields'][] = $this->backtick($column);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "f884e7082b1ccccf6a23879cce98cac9", "score": "0.5699952", "text": "public function requestsField(string $type, string $name): bool;", "title": "" }, { "docid": "6a8d07685d4cff5bc97d2e33ef90a256", "score": "0.5697105", "text": "public function getInputsWithRequestVars($type = \"\"){\n $inputs = \"\";\n $data = $_REQUEST;\n if($type == \"post\") $data = $_POST; \n else if($type == \"get\") $data = $_GET;\n foreach ( $data as $key => $value ){\n $inputs .= '<input type=\"hidden\" name=\"'.$key.'\" id=\"'.$key.'\" value=\"'.$data[$key].'\" />';\n }\n return $inputs;\n \t\t}", "title": "" }, { "docid": "7da79e644fdcb0210aee05bcc204b2b2", "score": "0.5689876", "text": "function _npbs_api_fields_for($bundle, $entity_type){\n $fields = field_info_fields();\n $required_fields = array();\n foreach($fields as $field){\n if(isset($field['bundles'][$entity_type]) && in_array($bundle, $field['bundles'][$entity_type])){\n $required_fields[$field['field_name']] = $field['type'];\n }\n }\n return $required_fields;\n}", "title": "" }, { "docid": "db978cfa427c51c1c024fd09897e6c31", "score": "0.5648594", "text": "private function getFields($fields)\n\t{\n\t\t//CONVERTE OBJ/JSON EM ARRAY\n\t\tif( is_object($fields) ) \n\t\t\t$fields = get_object_vars($fields);\n\t\tif( is_object($this->fill) ) \n\t\t\t$this->fill = get_object_vars($this->fill);\n\t\tif( is_string($fields) || is_string($this->fill) )\n\t\t{\n\t\t\tif( is_array(json_decode($fields, TRUE)) ) \n\t\t\t\t$fields = json_decode($fields, TRUE);\n\t\t\tif( is_array(json_decode($this->fill, TRUE)) ) \n\t\t\t\t$this->fill = json_decode($this->fill, TRUE);\n\t\t}\n\t\t// INICIA CONVERSÃO\n\t\tif( count($fields) == 0 )\n\t\t{\n\t\t\tif( $this->fill !== false && count($this->fill)> 0 )\n\t\t\t{\n\t\t\t\t$this->fields = $this->elements(array_keys($this->fill), array() );\n\t\t\t\t\n\t\t\t\t$this->fill();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$i=0;\n\t\t\tforeach($fields as $fdk=>$fdv)\n\t\t\t{\n\t\t\t\tif( !is_numeric($fdk) )\n\t\t\t\t{\n\t\t\t\t\t$this->fields[$fdk] = array( 'label'=>$fdv, 'sort'=>$i);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->fields[$fdv] = array( 'sort'=>$i );\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tif( !empty($this->fill) && !isset($this->fill['query']) && is_array($this->fill) )\n\t\t\t{\n\t\t\t\t$this->qr = $this->fill;\n\t\t\t\t$this->fill();\n\t\t\t}\n\t\t\telse if( !empty($this->fill) && isset($this->fill['query']) && is_array($this->fill) )\n\t\t\t{\n\t\t\t\t$this->qr = $this->fill['query'];\n\t\t\t\t$this->fill();\n\t\t\t}\n\t\t}\n\t\t$this->fields['submit'] = array('type'=>'submit', 'config'=>$this->submit_config, 'label'=>'', 'sort'=>count($this->fields) );\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "5e85662f5a226f79d39f8a503185eac0", "score": "0.5613758", "text": "public function setType($type) {\n$this->fields[\"type\"] = $type;\n\nreturn $this;\n\n }", "title": "" }, { "docid": "f529fd519a6184ee4f3e90cd6e2e9468", "score": "0.5584018", "text": "public function retrieveFields($filter = '', ModuleApi $moduleApi = null, $type = '', $baseModule = '')\n {\n $newModuleFilter = $this->isBeanElement($filter) ?\n $filter :\n $this->pmseRelatedModule->getRelatedModuleName($baseModule, $filter);\n\n $res = array();\n new stdClass();\n\n $res['name'] = $newModuleFilter;\n\n //$module = explode('_', $filter);// pull the related module out.\n //$filter = ucfirst(isset($module[1])?$module[1]:$module[0]);\n //$primal_module = ucfirst(isset($module[0])?$module[0]:'');\n $res['search'] = $filter;\n $res['success'] = true;\n $module_strings = return_module_language('en_us', 'ModuleBuilder');\n\n $fieldTypes = $module_strings['fieldTypes'];\n //add datetimecombo type field from the vardef overrides to point to Datetime type\n $fieldTypes['datetime'] = $fieldTypes['datetimecombo'];\n $fieldTypes['name'] = \"Name\";\n\n global $app_list_strings;\n $output = array();\n $groupFields = array();\n $groupFieldsMap = array();\n\n $moduleBean = $this->getModuleFilter($newModuleFilter);\n $fieldsData = isset($moduleBean->field_defs) ? $moduleBean->field_defs : array();\n\n foreach ($fieldsData as $field) {\n $tmpField = array();\n if (isset($field['vname']) && (PMSEEngineUtils::isValidField($field, $type))) {\n // If this is a locked field list AND this field is part of a group\n if ($type === 'RR' && !empty($field['group'])) {\n // If the group field for this field exists in vardefs then we can skip this field\n // since it will be covered by the other field\n // example : phone_alternate has phone_office as its group field and phone_office is defined\n // in vardefs\n if (!empty($fieldsData[$field['group']])) {\n $groupFields[$field['group']] = true;\n }\n // If this group field has not been covered before then process it\n if (empty($groupFields[$field['group']])) {\n $tmpField['value'] = $field['group'];\n if (!empty($field['group_label'])) {\n // use group_label as the label if defined\n $tmpField['text'] = $this->getFormattedFieldLabel($field['group_label'], $newModuleFilter);\n } else {\n // If there is no label defined at all then default to group field as being the label\n $tmpField['text'] = $field['group'];\n }\n // mark the group as being covered so that if any other field has the same group then we\n // can skip it\n $groupFields[$field['group']] = true;\n }\n $groupFieldsMap[$field['name']] = $field['group'];\n } else {\n if (PMSEEngineUtils::specialFields($field, $type)) {\n $field = array_merge($field, $this->replaceItemsValues($field));\n }\n $tmpField['value'] = $field['name'];\n $tmpField['text'] = $this->getFormattedFieldLabel($field['vname'], $newModuleFilter);\n\n // Handle field typing, starting with the vardef type for this field\n $tmpField['type'] = $field['type'];\n\n // If there is a known type for this type, use THAT\n if (isset($fieldTypes[$field['type']])) {\n $tmpField['type'] = $fieldTypes[$field['type']];\n }\n\n $tmpField['optionItem'] = 'none';\n if (in_array($field['type'], array('enum', 'radioenum', 'multienum'))) {\n if (!isset($field['options']) || !isset($app_list_strings[$field['options']])) {\n if (PMSEEngineUtils::specialFields($field, $type)) {\n $tmpField['optionItem'] = $this->gatewayModulesMethod($field);\n } elseif ($moduleApi !== null) {\n $options = getOptionsFromVardef($field);\n if ($options === false) {\n throw ProcessManager\\Factory::getException('InvalidData', \"No list options found for {$field['name']} in module {$beanModule->getModuleName()}\", 1);\n }\n $tmpField['optionItem'] = $options;\n }\n } else {\n $tmpField['optionItem'] = $app_list_strings[$field['options']];\n };\n }\n\n if ($field['type'] == 'bool') {\n $tmpField['optionItem'] = array(\"TRUE\" => true, \"FALSE\" => false);\n }\n\n if (isset($field['required'])) {\n $tmpField['required'] = $field['required'];\n }\n if (isset($field['len'])) {\n $tmpField['len'] = $field['len'];\n }\n }\n\n // For dependent field relationships like a dependent parent child dropdown pass some additional\n // information along so that we are able to lock the parent field as well when the child is locked.\n if (isset($field['visibility_grid']) && (isset($field['visibility_grid']['trigger']))) {\n $tmpField['trigger'] = $field['visibility_grid']['trigger'];\n }\n\n if (!empty($tmpField)) {\n $output[] = $tmpField;\n }\n }\n }\n\n $text = array();\n foreach ($output as $key => $row) {\n $text[$key] = strtolower($row['text']);\n }\n array_multisort($text, SORT_ASC, $output);\n\n $res['result'] = $output;\n $res['groupFieldsMap'] = $groupFieldsMap;\n return $res;\n }", "title": "" }, { "docid": "4ea57fd7fb2e3f9bbf3f6ed3e3db523f", "score": "0.5579705", "text": "private function _request($type, $url, $fields){\n $ch = curl_init();\n $fields = $fields + $this->_authentication();\n\n $fields_string = \"\";\n foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }\n rtrim($fields_string, '&');\n\n if($type == 'post'){\n //url-ify the data for the POST\n curl_setopt($ch,CURLOPT_POST, count($fields));\n curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);\n } \n else if($type == 'get'){\n $url = $url . '&' . $fields_string;\n }\n\n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n\n curl_setopt($ch,CURLOPT_URL, $this->_api_url.$url);\n\n //execute post\n $result = curl_exec($ch);\n\n //close connection\n curl_close($ch);\n\n return $result;\n }", "title": "" }, { "docid": "00bcb9c97878a7a6c653b7bbcf48bacd", "score": "0.5554353", "text": "private function getFieldsByRequest($fields = null)\n {\n //fields may be changed.\n $modelFields = $this->model->getFields(null, true);\n\n //Rewrite original model properties,\n //with properties given by original and additional/rewrited request rules\n if ( is_array($this->rewritedRules) ) {\n foreach ($this->rewritedRules as $field => $rules) {\n $rules = (new FieldToArray)->update($rules);\n\n //Rewrite each rule key which is not missing in model\n foreach ($rules as $rKey => $value) {\n if ( array_key_exists($field, $modelFields) && array_key_exists($rKey, $modelFields[$field]) ) {\n $modelFields[$field][$rKey] = $value;\n }\n }\n }\n }\n\n //Get fields by request\n if ($fields) {\n return array_intersect_key($modelFields, array_flip($fields));\n } else {\n return $modelFields;\n }\n }", "title": "" }, { "docid": "ea5829717a8a791f64f4c3bc2b491f96", "score": "0.55538315", "text": "public function GetFieldsByType ($fieldType);", "title": "" }, { "docid": "c34f1297ae058906a02a3b0126c33ee8", "score": "0.5551611", "text": "public function get(string $type, string $fields)\n {\n $output = [];\n\n $fields = $this->extract($fields);\n\n foreach ($fields as $field) {\n $output[] = new Item($type, $field, $this->view($field, $type));\n }\n\n return $output;\n }", "title": "" }, { "docid": "9cd74820ae8425ebeef3b88504aa3f68", "score": "0.5549631", "text": "public function getTaskFormFields(string $formType);", "title": "" }, { "docid": "5ee5ffb509dfcac90c3da1d130de8f3a", "score": "0.55314213", "text": "public function fields(Request $request)\n {\n\n return [\n ID::make()->sortable(),\n\n Select::make('ประเภทงาน', 'trantype')->options([\n 'charter' => 'เหมาเที่ยว',\n 'piece' => 'รายชิ้น'\n ])->displayUsingLabels()\n ->size('w-1/2')\n ->exceptOnForms(),\n Text::make('เลขที่ใบรับงาน', 'tranjob_no')\n ->withMeta(['value' => Tranjob::nextTranjobNumber()])\n ->size('w-1/2'),\n Date::make('วันที่ใบรับงาน', 'tranjob_date')\n ->withMeta(['value' => Carbon::now()->toDateTimeString()])\n ->size('w-1/2'),\n Text::make('รหัสติดตามสินค้า', 'tracking_no')\n ->size('w-1/2'),\n\n BelongsTo::make('สาขาต้นทาง', 'branch_send', 'App\\Nova\\Branch')\n ->hideFromIndex()\n ->withMeta([\n 'value' => $this->user_id ?? auth()->user()->branch_id,\n 'belongsToId' => $this->user_id ?? auth()->user()->branch_id\n ])\n ->size('w-1/2'),\n BelongsTo::make('สาขาปลายทาง', 'branch_rec', 'App\\Nova\\Branch')\n ->hideFromIndex()\n ->size('w-1/2'),\n BelongsTo::make('ผู้ว่าจ้าง', 'customer_sender', 'App\\Nova\\Customer')\n ->searchable()\n ->size('w-1/2'),\n Select::make('เงื่อนไขการรับสินค้า', 'sendoptions')->options([\n 'ไปรับ' => 'ไปรับสินค้า',\n 'นำมาส่ง' => 'ผู้ส่งนำมาส่ง'\n ])->displayUsingLabels()\n ->hideFromIndex()\n ->withMeta(['value' => 'ไปรับ'])\n ->size('w-1/2'),\n\n\n BelongsTo::make('จุดรับสินค้า', 'loadaddress', 'App\\Nova\\Address')\n ->nullable()\n ->hideFromIndex()\n ->size('w-1/2'),\n BelongsTo::make('ผู้รับสินค้า', 'customer_reciever', 'App\\Nova\\Customer')\n ->size('w-1/2')\n ->searchable(),\n BelongsTo::make('จุดส่งสินค้า', 'deliveryaddress', 'App\\Nova\\Address')\n ->nullable()\n ->hideFromIndex()\n ->size('w-1/2'),\n Select::make('เงื่อนไขการส่งสินค้า', 'recieveoptions')->options([\n 'รับเอง' => 'รับเองที่สาขา',\n 'จัดส่ง' => 'จัดส่ง ณ จุดส่งสินค้า'\n ])->displayUsingLabels()\n ->hideFromIndex()\n ->withMeta(['value' => 'จัดส่ง'])\n ->size('w-1/2'),\n Select::make('เงื่อนไขการชำระเงิน', 'paymenttype')->options([\n 'cash-s' => 'เงินสดต้นทาง',\n 'cash-r' => 'เงินสดปลายทาง',\n 'cr-s' => 'เครดิตต้นทาง',\n 'cr-r' => 'เครดิตปลายทาง'\n ])->displayUsingLabels()\n ->hideFromIndex()\n ->withMeta(['value' => 'cash-s'])\n ->size('w-1/2'),\n BelongsTo::make('พนักงานตรวจรับสินค้า', 'employee', 'App\\Nova\\Employee')\n ->hideFromIndex()\n ->size('w-1/2'),\n BelongsTo::make('ผู้ทำรายการ', 'user', 'App\\Nova\\User')\n ->hideWhenCreating(),\n HasMany::make('รายการสินค้า', 'tranjob_details', 'App\\Nova\\Tranjob_detail'),\n\n ];\n }", "title": "" }, { "docid": "93048635b37584c627ebac6db53ee311", "score": "0.5527663", "text": "public function requestType();", "title": "" }, { "docid": "1ee0b5e2cb58ee37ae167fd09d411521", "score": "0.5525258", "text": "abstract protected function prepareFormFields();", "title": "" }, { "docid": "7c7085b3f9f72823a416f3318f72c725", "score": "0.55143297", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n BelongsTo::make('User','user',User::class)\n ->exceptOnForms(),\n Text::make('Paid')\n ->exceptOnForms(),\n Text::make('Debt')\n ->exceptOnForms(),\n RadioButton::make('Provider type', 'provider_category')\n ->options([\n 'food' => 'Food',\n 'service' => 'Service',\n ])\n ->hideFromDetail()\n ->hideFromIndex()\n ->exceptOnForms(),\n Text::make('Payment Type', 'payment_type')\n ->exceptOnForms(),\n Text::make('B2B1', 'b2b_1')\n ->exceptOnForms(),\n Text::make('B2B2', 'b2b_2')\n ->exceptOnForms(),\n Text::make('B2B3', 'b2b_3')\n ->exceptOnForms(),\n NovaDependencyContainer::make([\n Number::make('Quantity','quantity')\n ])->dependsOn('provider_category', 'food')->exceptOnForms(),\n NovaDependencyContainer::make([\n //Number::make('Count cleaning','count_clean'),\n Select::make('Type cleaning','type_cleaning')\n ->options([\n '1' => 'house',\n '2' => 'office',\n '3' => 'flat',\n ]),\n //Number::make('Quantity hours','quantity'),\n Select::make('Callback Time')\n ->options([\n '10' => '10 min',\n '15' => '15 min',\n '30' => '30 min',\n '60' => '60 min'\n ])\n ->hideFromIndex()\n ->hideFromDetail(),\n /*Number::make('Interval')\n ->withMeta([\n 'value' => 0\n ]),*/\n ])->dependsOn('provider_category', 'service'),\n BelongsTo::make('Place','place',\\App\\Nova\\Resources\\Place\\Place::class)\n ->exceptOnForms(),\n Select::make('Status')\n ->options([\n 'new' => 'new',\n 'confirm' => 'confirm',\n 'cancel' => 'cancel',\n 'done' => 'done'\n ])\n ->hideFromIndex()\n ->hideFromDetail()\n ->hideWhenCreating()\n ->canSee(function (){\n return !is_null($this->provider_id);\n }),\n Currency::make('debt')\n ->format('%.2n')\n ->min(1)\n ->hideFromIndex()\n ->hideFromDetail()\n ->hideWhenCreating(),\n Currency::make('cost')\n ->format('%.2n')\n ->min(1)\n ->hideFromIndex()\n ->hideFromDetail()\n ->hideWhenCreating(),\n Currency::make('initial_cost')\n ->format('%.2n')\n ->min(1)\n ->hideFromIndex()\n ->hideFromDetail()\n ->hideWhenCreating(),\n Currency::make('service_received')\n ->format('%.2n')\n ->min(1)\n ->hideFromIndex()\n ->hideFromDetail()\n ->hideWhenCreating(),\n Currency::make('company_received')\n ->format('%.2n')\n ->min(1)\n ->hideFromIndex()\n ->hideFromDetail()\n ->hideWhenCreating(),\n// Text::make('debt')\n// ->hideFromIndex()\n// ->hideFromDetail()\n// ->hideWhenCreating(),\n// Text::make('cost')\n// ->hideFromIndex()\n// ->hideFromDetail()\n// ->hideWhenCreating(),\n// Text::make('initial_cost')\n// ->hideFromIndex()\n// ->hideFromDetail()\n// ->hideWhenCreating(),\n// Text::make('service_received')\n// ->hideFromIndex()\n// ->hideFromDetail()\n// ->hideWhenCreating(),\n// Text::make('company_received')\n// ->hideFromIndex()\n// ->hideFromDetail()\n// ->hideWhenCreating(),\n BelongsTo::make('Accept company','provider', Provider::class)\n ->exceptOnForms(),\n Text::make('Provider category','provider_category')\n ->exceptOnForms(),\n Badge::make('Status')\n ->colors([\n 'wait' => 'brown',\n 'new' => 'red',\n 'confirm' => 'green',\n 'cancel' => 'peru',\n 'done' => 'aqua'\n ])\n ->exceptOnForms(),\n Text::make('Name')\n ->rules('required')\n ->exceptOnForms(),\n SearchableSelect::make('Product name','product_id')\n ->resource(Product::class)\n ->help(\"Need chose provider\")\n ->rules('required')\n ->hideFromIndex()\n ->hideWhenUpdating()\n ->hideFromDetail(),\n Date::make('Date','date_delivery')\n ->format('YYYY-MM-DD')\n ->rules('required')\n ->exceptOnForms(),\n Date::make('Date of Sale','created_at')\n ->format('YYYY-MM-DD')\n ->rules('required')\n ->exceptOnForms(),\n Time::make('Time From','date_delivery_from')\n ->format('HH:mm:ss')\n ->rules('required')\n ->exceptOnForms(),\n Time::make('Time To','date_delivery_to')\n ->format('HH:mm:ss')\n ->rules('required')\n ->exceptOnForms(),\n Textarea::make('Comment')\n ->exceptOnForms(),\n Number::make('Cost')\n ->exceptOnForms(),\n Number::make('Service received', 'service_received')\n ->exceptOnForms(),\n Number::make('Company received', 'company_received')\n ->exceptOnForms(),\n BelongsToMany::make('Product','products', Product::class)\n ->canSee(function (){\n return $this->provider_category === 'food';\n })\n ->fields(function () {\n return [\n Boolean::make('Canceled', 'canceled')\n ->displayUsing(function ($field, $resource) {\n return isset($this->pivot) ? $this->pivot->canceled : '-';\n }),\n ];\n })\n ->exceptOnForms(),\n HasOne::make('Canceled Description', 'canceledDescription', CancelOrderItems::class)\n ->exceptOnForms(),\n\n HasOne::make('Answers', 'answers', OrderDetail::class)\n ->exceptOnForms(),\n\n HasOne::make('Checkout', 'checkout', Checkouts::class)\n ->exceptOnForms(),\n HasMany::make('Checks', 'checks', OrderCheck::class)\n ->canSee(function (){\n return !is_null($this->provider) && $this->provider->categories->type == 'market';\n }),\n\n ];\n }", "title": "" }, { "docid": "c0c2453be5ad1d56854f1f1aad3df24b", "score": "0.5507113", "text": "function set_type_email($fields){\r\n\t\tif(func_num_args()){\r\n\t\t\tforeach(func_get_args() as $field){\r\n\t\t\t\t$this->form['components'][$field]['type'] = 'text';\r\n\t\t\t\t$this->form['components'][$field]['valueType'] = \"email\";\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5470728e738a7e8dbcec6709a9e13f3d", "score": "0.547844", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n\n BelongsTo::make('Creator', 'creator', User::class)\n ->nullable()\n ->sortable()\n ->searchable(),\n\n BelongsTo::make('Age Group', 'ageGroup', AgeGroup::class)\n ->sortable()\n ->searchable(),\n\n\n Enum::make('Title')\n ->rules('required')\n ->attachEnum(PassengerTitle::class)\n ->sortable()\n ->hideFromIndex(),\n\n Text::make(__('Name'), 'name')\n ->rules('required', 'string')\n ->sortable(),\n\n Enum::make('Gender')\n ->attachEnum(PassengerGender::class)\n ->rules('required', 'string')\n ->sortable(),\n\n PhoneNumber::make(__('Phone'), 'phone')\n// ->countries(['DK', 'SWE', 'NO', 'UK', 'IQ'])\n// ->country('AUTO')\n ->disableValidation()\n ->format('### ########')\n ->rules('string', 'required')\n ->sortable(),\n\n Enum::make(__('Nationality'), 'nationality')\n ->attachEnum(Nationality::class)\n ->rules('required', 'string')\n ->hideFromIndex(),\n\n Enum::make(__('Citizenship'), 'citizenship')\n ->attachEnum(Citizenship::class)\n ->rules('required', 'string')\n ->hideFromIndex(),\n\n Date::make(__('Birth date'), 'birthdate')\n ->rules('required', 'date')\n ->hideFromIndex(),\n\n Text::make(__('Passport'), 'passport')\n ->rules('nullable', 'string')\n ->hideFromIndex(),\n\n Text::make(__('VISA'), 'visa')\n ->rules('nullable', 'string')\n ->hideFromIndex(),\n\n Country::make(__('VISA Country'), 'visa_country')\n ->rules('required_with:visa', 'nullable', 'string')\n ->hideFromIndex(),\n\n Date::make(__('Passport expiration date'), 'passport_expires_at')\n ->rules('required_with:passport', 'nullable', 'date', 'after_or_equal:+6 months')\n ->hideFromIndex(),\n\n Date::make(__('VISA expiration date'), 'visa_expires_at')\n ->rules('required_with:visa', 'nullable', 'date', 'after_or_equal:+6 months')\n ->hideFromIndex(),\n\n HasMany::make('tickets')\n ->onlyOnDetail()\n ];\n }", "title": "" }, { "docid": "eed18eb951486c7d8553c4d9d3b21c5e", "score": "0.5472574", "text": "public static function fields($request)\n { \n return [ \n ];\n }", "title": "" }, { "docid": "30d33b58c3fae3874c9584bdbb5eeee1", "score": "0.5470521", "text": "public function prepareExtraFields($extra_fields, $entity_type, $bundle) {\n $entity_type_info = entity_get_info($entity_type);\n $bundle_settings = field_bundle_settings($entity_type, $bundle);\n $extra_fields += array('form' => array(), 'display' => array());\n\n $result = array();\n // Extra fields in forms.\n foreach ($extra_fields['form'] as $name => $field_data) {\n $settings = isset($bundle_settings['extra_fields']['form'][$name]) ? $bundle_settings['extra_fields']['form'][$name] : array();\n if (isset($settings['weight'])) {\n $field_data['weight'] = $settings['weight'];\n }\n $result['form'][$name] = $field_data;\n }\n\n // Extra fields in displayed entities.\n $data = $extra_fields['display'];\n foreach ($extra_fields['display'] as $name => $field_data) {\n $settings = isset($bundle_settings['extra_fields']['display'][$name]) ? $bundle_settings['extra_fields']['display'][$name] : array();\n $view_modes = array_merge(array('default'), array_keys($entity_type_info['view modes']));\n foreach ($view_modes as $view_mode) {\n if (isset($settings[$view_mode])) {\n $field_data['display'][$view_mode] = $settings[$view_mode];\n }\n else {\n $field_data['display'][$view_mode] = array(\n 'weight' => $field_data['weight'],\n 'visible' => TRUE,\n );\n }\n }\n unset($field_data['weight']);\n $result['display'][$name] = $field_data;\n }\n\n return $result;\n }", "title": "" }, { "docid": "8d05e3fffa531d63c5b4264b50ff4b45", "score": "0.5462169", "text": "public function fields(array $fields);", "title": "" }, { "docid": "ab83755976567e00009ba97c654cac25", "score": "0.5457567", "text": "function get_default_fields( $type ){\n\n\t\t$this->regenerate_fields( $type );\n\n\t\treturn self::get_fields( $type );\n\t}", "title": "" }, { "docid": "a9c0c90d1bebddf8490063a68b2c545c", "score": "0.5451742", "text": "function getFields($filter=''){\r\n\t\t$arrFilter = explode(\",\",$filter);\r\n\t\t$arrField = array();\r\n\t\tforeach($this->fieldsArray as $value) {\r\n\t\t\t$fldType = $value[\"inputtype\"]; \r\n\t\t\tif (empty($filter)){\r\n\t\t\t\t$arrField[] = $value[\"strfieldName\"]; \r\n\t\t\t}else{\r\n\t\t\t\tif(in_array($fldType, $arrFilter)){\r\n\t\t\t\t\t$arrField[] = $value[\"strfieldName\"]; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $arrField;\r\n\t}", "title": "" }, { "docid": "b021854153b313604aa31214c2022291", "score": "0.54401076", "text": "public function fields(Request $request)\n {\n return [\n ID::make(__('ID'), 'id')->sortable(),\n\n Text::make('Name','name')->rules('required'),\n BelongsTo::make('exporter name','exporter','App\\Nova\\Exporter')->showCreateRelationButton(),\n Text::make('Type','type'),\n Text::make('Code', 'code')->rules('required')\n ->creationRules('unique:raw_materials,code')\n ->updateRules('unique:raw_materials,code,{{resourceId}}'),\n\n Select::make('Measruing Unit')->options([\n 'METER' => 'Meter',\n 'KILOGRAM' => 'kilogram',\n 'GRAM' => 'gram',\n ])->rules('required'),\n\n Text::make('Grammage', 'grammage')->rules('required'),\n\n Number::make('Quantity', 'quantity')->rules('required'),\n\n Currency::make('Price','price'),\n BelongsTo::make('Warehous name', 'raw_matrial_warehouse','App\\Nova\\RawMaterialWarehouse')->showCreateRelationButton(),\n\n ];\n }", "title": "" }, { "docid": "ca2db371cc824e5b9c723dec7098a55a", "score": "0.54398793", "text": "public function getValuesForData($fields) {\n $params = array();\n $jsons = array();\n //----------------------------\n $_params = $this->_request->getParams();\n foreach ($fields as $field => $joinTable) {\n switch ($field) {\n // Тип пользователя (роль)\n case \"user_type\":\n $roles = Default_Plugin_AclManager::$roles;\n $jsons[$field][] = array('value' => $roles['admin'], 'text' => $roles['admin']);\n $jsons[$field][] = array('value' => $roles['editor'], 'text' => $roles['editor']);\n $jsons[$field][] = array('value' => $roles['member'], 'text' => $roles['member']);\n $jsons[$field][] = array('value' => $roles['commentator'], 'text' => $roles['commentator']);\n break;\n default :\n $params['field'] = $field;\n $params['type'] = $_params['type'];\n $params['joinTableForSort'] = $joinTable;\n $params['order'] = $field . ' ASC';\n if ($params['type'] == 'search') {\n $params['group'] = FALSE;\n if (isset($_params['filter'])) {\n $strFilter = stripslashes($_params['filter']);\n $arrFilter = Zend_Json::decode($strFilter);\n $params['filter'] = $arrFilter;\n }\n }\n $jsons = $this->getValueForData($params, $jsons);\n break;\n }\n }\n return $jsons;\n }", "title": "" }, { "docid": "9473855f3bcdec3c8ecd7008a2ab09e6", "score": "0.54329", "text": "public function fieldsByEntityType($entity_type);", "title": "" }, { "docid": "39a68a1132ae1164e84ef89d80381be4", "score": "0.5428133", "text": "public function setTypeRequirements() {\n\t\t\t$type = $this->get('type');\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'link':\n\t\t\t\t\t$this->makeRequired('url');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'wiki':\n\t\t\t\tcase 'blog':\n\t\t\t\t\t$this->makeRequired('content');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'video':\n\t\t\t\tdefault:\n\t\t\t\t\t$this->makeRequired('source');\n\t\t\t\t\t$this->makeRequired('identifier');\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "64389da59896d2bbdf019ae13d809ecb", "score": "0.54235125", "text": "public function parse_fields()\n {\n return request()->input('fields');\n }", "title": "" }, { "docid": "78b99926bbf20c1fea8a4e5c21100e33", "score": "0.54217374", "text": "private function buildFields($fields,&$obj){\n\t\tforeach($fields as $field => $props){\n\t \t$obj->_fields[] = $field;\n\t \tif($props[\"allow_null\"] == \"NO\"){\n\t \t\tif(is_array($obj->required) && !in_array($field, $obj->required)){\n\t \t\t\t$obj->required[] = $field;\n\t \t\t}else{\n\t \t\t\t$obj->required = array($field);\n\t \t\t}\t \t\t\n\t\t\t}\n\t }\n\t}", "title": "" }, { "docid": "16df94a49bc6b28f6796507a2dd5a13d", "score": "0.5414359", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n\n ErrorMessage::make('error'),\n\n Text::make('Name')\n ->creationRules('required', 'unique:label_creator_label_types,name')\n ->updateRules('required', 'unique:label_creator_label_types,name,{{resourceId}}'),\n\n BooleanGroup::make('Attributes')\n ->options([\n 'barcode' => 'Barcode',\n 'plant' => 'Plant',\n 'color' => 'Color',\n ])\n ->hideFromIndex(),\n\n Number::make('Number Digits')\n ->min(1)\n ->max(3)\n ->rules('required')\n ->hideFromIndex(),\n\n Select::make('Columns')\n ->options([\n 1 => 1,\n 2 => 2,\n 3 => 3\n ])\n ->rules('required')\n ->hideFromIndex(),\n\n Number::make('Break Count')\n ->min(1)\n ->rules('required')\n ->hideFromIndex(),\n\n Code::make('Design')\n ->language('php')\n ->rules('required'),\n ];\n }", "title": "" }, { "docid": "a5f2b985432dc2d04f00d46b3a46a88a", "score": "0.54021674", "text": "public function setFields($fields = []);", "title": "" }, { "docid": "abc9505175363565a889aa717a658509", "score": "0.53977084", "text": "protected function bindersGetBindersFieldsByTypeRequest($binder_type)\n {\n // verify the required parameter 'binder_type' is set\n if ($binder_type === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $binder_type when calling bindersGetBindersFieldsByType'\n );\n }\n\n $resourcePath = '/api/Binders/binderfields/{binderType}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($binder_type !== null) {\n $resourcePath = str_replace(\n '{' . 'binderType' . '}',\n ObjectSerializer::toPathValue($binder_type),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\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 }", "title": "" }, { "docid": "0bbdf896f93ba531b15c402fb6f47b57", "score": "0.5366012", "text": "function acf_get_field_types_info( $args = array() ) {\n}", "title": "" }, { "docid": "07f21b7e61de9667fd03371d47e65822", "score": "0.5363935", "text": "public static function ajaxSwitchFields() {\n\n $response = array( );\n $response['result'] = \"\";\n $type = $_REQUEST['chosen_type'];\n $post_id = $_REQUEST['post_id'];\n\n if ( !$type || !$post_id ) {\n $response['result'] .= !$type ? \"field type not specified \" : '';\n $response['result'] .= !$post_id ? \"post id not specified\" : '';\n } else {\n $response['markup'] = self::buildInputGroups( $type, $post_id );\n }\n\n echo json_encode( $response );\n die();\n\n }", "title": "" }, { "docid": "2768224d02df834402b12d95174d1535", "score": "0.5355204", "text": "function form_fields( $form_fields, $new, $id, $obj, $oID, $uID, $type, $gID ) {\n\n\t\tif ( $new !== 'modify' ) {\n\t\t\t$defaults = $this->default_values( $id, $obj, $oID, $uID );\n\t\t\t$group_members = $this->member_options( false, null, $gID );\n\t\t\t$form_fields = array (\n\t\t\t\t'post_title' => array (\n\t\t\t\t\t'label' => 'Decision Name',\n\t\t\t\t),\n\t\t\t\t'decision_description' => array(),\n\t\t\t\t'decision_type' => array (\n\t\t\t\t\t'default' => 'original',\n\t\t\t\t\t'type' \t\t=> 'hidden'\n\t\t\t\t),\n\t\t\t\t'decision_status' => array (\n\t\t\t\t\t'default' \t=> $defaults[ 'status' ],\n\t\t\t\t\t'type' \t\t=> 'hidden'\n\t\t\t\t),\n\t\t\t\t'manager' => array (\n\t\t\t\t\t'default' => $defaults[ 'user_id' ],\n\t\t\t\t\t'data' => $group_members,\n\t\t\t\t),\n\t\t\t\t'proposed_by' => array (\n\t\t\t\t\t'default' => $defaults[ 'user_id' ],\n\t\t\t\t\t'type'\t=> 'hidden',\n\t\t\t\t),\n\t\t\t\t'group' => array (\n\t\t\t\t\t'default' \t=> $defaults[ 'group_id' ],\n\t\t\t\t\t'type' \t\t=> 'hidden'\n\t\t\t\t),\n\t\t\t\t'organization' => array (\n\t\t\t\t\t'default' \t=> $defaults[ 'organization_id' ],\n\t\t\t\t\t'type' \t\t=> 'hidden'\n\t\t\t\t),\n\t\t\t\t'time_frame' => array(\n\t\t\t\t\t'default' => pods_v( 'timeframe', $defaults ),\n\t\t\t\t\t'description' => __( 'How long to allow for decision making.', 'holotree' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t}\n\n\t\treturn $form_fields;\n\n\t}", "title": "" }, { "docid": "71e077e9261d16aa432e6e2ff283d22e", "score": "0.5348464", "text": "public function fields(): array\n {\n return [\n 'success' => [\n 'type' => Type::nonNull(Type::boolean()),\n 'description' => 'Success'\n ],\n 'message' => [\n 'type' => Type::nonNull(Type::string()),\n 'description' => 'Message'\n ]\n ];\n }", "title": "" }, { "docid": "4f086c061675bc552633e960610d2d88", "score": "0.5341696", "text": "function correctFields() {\n\t\t$this->correctVariantFields();\n\t\t$types = we_webEditionDocument::getFieldTypes($this->getTemplateCode());\n\n\n\t\tforeach($this->elements as $k=>$v) {\n\t\t\tif(\n\t\t\t\t!isset($v[\"type\"]) ||\n\t\t\t\t($v[\"type\"] != \"txt\" &&\n\t\t\t\t$v[\"type\"] != \"attrib\" &&\n\t\t\t\t$v[\"type\"] != \"variant\" &&\n\t\t\t\t$v[\"type\"] != \"formfield\" &&\n\t\t\t\t$v[\"type\"] != \"date\" &&\n\t\t\t\t$v[\"type\"] != \"image\" &&\n\t\t\t\t$v[\"type\"] != \"linklist\" &&\n\t\t\t\t$v[\"type\"] != \"img\" &&\n\t\t\t\t$v[\"type\"] != \"list\") ) {\n\t\t\t\t$this->elements[$k][\"type\"] = \"txt\";\n\t\t\t} else {\n\t\t\t\tforeach($types as $name=>$val) {\n\t\t\t\t\tif(eregi('^'.$name.'$',$k)) {\n\t\t\t\t\t\t$this->elements[$k][\"type\"] = $val;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "e7e15306c689336e9be51a86f33aafaf", "score": "0.5328431", "text": "private function processUserTypeSettingsFields(array $fields, ?array $oldFields): array\n\t{\n\t\t$fields = $this->parseUserType($fields);\n\n\t\tif (!isset($fields['PROPERTY_TYPE']) && isset($oldFields))\n\t\t{\n\t\t\t$fields['USER_TYPE'] = $oldFields['USER_TYPE'];\n\t\t\t$fields['PROPERTY_TYPE'] = $oldFields['PROPERTY_TYPE'];\n\t\t}\n\n\t\tif (empty($fields['USER_TYPE']))\n\t\t{\n\t\t\t$fields['USER_TYPE_SETTINGS'] = false;\n\t\t}\n\t\t// append other settings\n\t\telseif (\n\t\t\tisset($fields['USER_TYPE_SETTINGS'], $oldFields['USER_TYPE_SETTINGS'])\n\t\t\t&& is_array($fields['USER_TYPE_SETTINGS'])\n\t\t)\n\t\t{\n\t\t\t$fields['USER_TYPE_SETTINGS'] += $oldFields['USER_TYPE_SETTINGS'];\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "b2e19d0866e567a46cff488742b6e996", "score": "0.5324005", "text": "public function fields(Request $request)\n {\n return [\n ID::make(__('ID'), 'id')->sortable(),\n Text::make('Nombre de la ropa','nombre')\n ->sortable()\n ->required(),\n Image::make('Imagen','foto')\n ->disk('public')\n ->required(),\n\n Select::make('Tipo de prenda','tipo_ropa')\n ->required()\n ->options([\n 'Blusa' => 'Blusa',\n 'Vestido' => 'Vestido',\n 'Falda' => 'Falda',\n 'Top' => 'Top',\n 'Sueter' => 'Sueter',\n ]),\n Currency::make('Precio')->currency('MXN'),\n //Number::make('Precio')->required(),\n BelongsTo::make('Talla')->required(),\n BelongsTo::make('Color')->required(),\n BelongsTo::make('Temporada')->required(),\n ];\n }", "title": "" }, { "docid": "5897754afbd784e6440acd07015b1bb6", "score": "0.53225744", "text": "function wf_crm_get_fields($var = 'fields') {\n static $fields = [];\n static $tokens;\n static $sets;\n\n if (!$fields) {\n $components = wf_crm_get_civi_setting('enable_components');\n\n $sets = [\n 'contact' => ['entity_type' => 'contact', 'label' => t('Contact Fields')],\n 'other' => ['entity_type' => 'contact', 'label' => t('Tags and Groups'), 'max_instances' => 1],\n 'address' => ['entity_type' => 'contact', 'label' => t('Address'), 'max_instances' => 9, 'custom_fields' => 'combined'],\n 'phone' => ['entity_type' => 'contact', 'label' => t('Phone'), 'max_instances' => 9, 'custom_fields' => 'combined'],\n 'email' => ['entity_type' => 'contact', 'label' => t('Email'), 'max_instances' => 9, 'custom_fields' => 'combined'],\n 'website' => ['entity_type' => 'contact', 'label' => t('Website'), 'max_instances' => 9, 'custom_fields' => 'combined'],\n 'im' => ['entity_type' => 'contact', 'label' => t('Instant Message'), 'max_instances' => 9, 'custom_fields' => 'combined'],\n 'activity' => ['entity_type' => 'activity', 'label' => t('Activity'), 'max_instances' => 60, 'attachments' => TRUE],\n 'relationship' => ['entity_type' => 'contact', 'label' => t('Relationship'), 'help_text' => TRUE, 'custom_fields' => 'combined'],\n ];\n $conditional_sets = [\n 'CiviCase' => ['entity_type' => 'case', 'label' => t('Case'), 'max_instances' => 30],\n 'CiviEvent' => ['entity_type' => 'participant', 'label' => t('Participant'), 'max_instances' => 9],\n 'CiviContribute' => ['entity_type' => 'contribution', 'label' => t('Contribution')],\n 'CiviMember' => ['entity_type' => 'membership', 'label' => t('Membership'), 'custom_fields' => 'combined'],\n 'CiviGrant' => ['entity_type' => 'grant', 'label' => t('Grant'), 'max_instances' => 30, 'attachments' => TRUE],\n ];\n foreach ($conditional_sets as $component => $set) {\n if (in_array($component, $components)) {\n $sets[$set['entity_type']] = $set;\n }\n }\n // Contribution line items\n if (in_array('CiviContribute', $components)) {\n $sets['line_items'] = ['entity_type' => 'line_item', 'label' => t('Line Items')];\n }\n\n $moneyDefaults = [\n 'type' => 'number',\n 'data_type' => 'Money',\n 'extra' => [\n 'field_prefix' => wf_crm_get_civi_setting('defaultCurrencySymbol', '$'),\n 'point' => wf_crm_get_civi_setting('monetaryDecimalPoint', '.'),\n 'separator' => wf_crm_get_civi_setting('monetaryThousandSeparator', ','),\n 'decimals' => 2,\n 'min' => 0,\n ],\n ];\n\n // Field keys are in the format table_column\n // Use a # sign as a placeholder for field number in the title (or by default it will be appended to the end)\n // Setting 'expose_list' allows the value to be set on the config form\n // Set label for 'empty_option' for exposed lists that do not require input\n $fields['contact_contact_sub_type'] = [\n 'name' => t('Type of @contact'),\n 'type' => 'select',\n 'extra' => ['multiple' => 1, 'civicrm_live_options' => 1],\n 'expose_list' => TRUE,\n ];\n $fields['contact_existing'] = [\n 'name' => t('Existing Contact'),\n 'type' => 'civicrm_contact',\n 'extra' => [\n 'search_prompt' => t('- Choose existing -'),\n ],\n ];\n // Organization / household names\n foreach (['organization' => t('Organization Name'), 'legal' => t('Legal Name'), 'household' => t('Household Name')] as $key => $label) {\n $fields['contact_' . $key . '_name'] = [\n 'name' => $label,\n 'type' => 'textfield',\n 'contact_type' => $key == 'household' ? 'household' : 'organization',\n ];\n }\n $fields['contact_sic_code'] = [\n 'name' => t('SIC Code'),\n 'type' => 'textfield',\n 'contact_type' => 'organization',\n ];\n // Individual names\n $enabled_names = wf_crm_get_civi_setting('contact_edit_options');\n $name_options = array_column(wf_crm_apivalues('OptionValue', 'get', ['option_group_id' => 'contact_edit_options', 'return' => ['name', 'value']]), 'name', 'value');\n $enabled_names = array_intersect_key($name_options, array_flip($enabled_names));\n foreach (['prefix_id' => t('Name Prefix'), 'formal_title' => t('Formal Title'), 'first_name' => t('First Name'), 'middle_name' => t('Middle Name'), 'last_name' => t('Last Name'), 'suffix_id' => t('Name Suffix')] as $key => $label) {\n if (in_array(ucwords(str_replace(['_id', '_'], ['', ' '], $key)), $enabled_names)) {\n $fields['contact_' . $key] = [\n 'name' => $label,\n 'type' => strpos($key, '_id') ? 'select' : 'textfield',\n 'contact_type' => 'individual',\n ];\n }\n }\n $fields['contact_nick_name'] = [\n 'name' => t('Nickname'),\n 'type' => 'textfield',\n ];\n $fields['contact_gender_id'] = [\n 'name' => t('Gender'),\n // Gender should be textfield if using https://civicrm.org/extensions/gender-self-identify\n 'type' => function_exists('genderselfidentify_civicrm_apiWrappers') ? 'textfield' : 'select',\n 'contact_type' => 'individual',\n ];\n $fields['contact_job_title'] = [\n 'name' => t('Job Title'),\n 'type' => 'textfield',\n 'contact_type' => 'individual',\n ];\n $fields['contact_birth_date'] = [\n 'name' => t('Birth Date'),\n 'type' => 'date',\n 'extra' => [\n 'start_date' => '-100 years',\n 'end_date' => 'now',\n ],\n 'contact_type' => 'individual',\n ];\n $fields['contact_preferred_communication_method'] = [\n 'name' => t('Preferred Communication Method(s)'),\n 'type' => 'select',\n 'extra' => ['multiple' => 1],\n ];\n $fields['contact_privacy'] = [\n 'name' => t('Privacy Preferences'),\n 'type' => 'select',\n 'extra' => ['multiple' => 1],\n ];\n $fields['contact_preferred_language'] = [\n 'name' => t('Preferred Language'),\n 'type' => 'select',\n 'value' => wf_crm_get_civi_setting('lcMessages', 'en_US'),\n ];\n if (array_key_exists('file', webform_components())) {\n $fields['contact_image_URL'] = [\n 'name' => t('Upload Image'),\n 'type' => 'file',\n 'extra' => ['width' => 40],\n 'data_type' => 'File',\n ];\n }\n $fields['contact_contact_id'] = [\n 'name' => t('Contact ID'),\n 'type' => 'hidden',\n ];\n $fields['contact_user_id'] = [\n 'name' => t('User ID'),\n 'type' => 'hidden',\n ];\n $fields['contact_external_identifier'] = [\n 'name' => t('External ID'),\n 'type' => 'hidden',\n ];\n $fields['contact_source'] = [\n 'name' => t('Source'),\n 'type' => 'textfield',\n ];\n $fields['contact_cs'] = [\n 'name' => t('Checksum'),\n 'type' => 'hidden',\n 'value_callback' => TRUE,\n ];\n $fields['contact_employer_id'] = [\n 'name' => t('Current Employer'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'empty_option' => t('None'),\n 'data_type' => 'ContactReference',\n 'contact_type' => 'individual',\n 'reference_contact_type' => 'organization'\n ];\n $fields['contact_is_deceased'] = [\n 'name' => t('Is Deceased'),\n 'type' => 'select',\n 'extra' => ['aslist' => 0],\n 'contact_type' => 'individual',\n ];\n $fields['contact_deceased_date'] = [\n 'name' => t('Deceased Date'),\n 'type' => 'date',\n 'extra' => [\n 'start_date' => '-100 years',\n 'end_date' => 'now',\n ],\n 'contact_type' => 'individual',\n ];\n $fields['email_email'] = [\n 'name' => t('Email'),\n 'type' => 'email',\n ];\n $addressOptions = [\n 'street_address' => t('Street Address'),\n 'street_name' => t('Street Name'),\n 'street_number' => t('Street Number'),\n 'street_unit' => t('Street Number Suffix'),\n 'name' => t('Address Name'),\n 'supplemental_address_1' => t('Street Address # Line 2'),\n 'supplemental_address_2' => t('Street Address # Line 3'),\n 'supplemental_address_3' => t('Street Address # Line 4'),\n 'city' => t('City'),\n ];\n foreach ($addressOptions as $key => $value) {\n $fields['address_' . $key] = [\n 'name' => $value,\n 'type' => 'textfield',\n 'extra' => ['width' => $key == 'city' ? 20 : 60],\n ];\n }\n $fields['address_postal_code'] = [\n 'name' => t('Postal Code'),\n 'type' => 'textfield',\n 'extra' => ['width' => 7],\n ];\n $fields['address_postal_code_suffix'] = [\n 'name' => t('Postal Code Suffix'),\n 'type' => 'textfield',\n 'extra' => [\n 'width' => 5,\n 'description' => t('+4 digits of Zip Code'),\n ],\n ];\n $fields['address_country_id'] = [\n 'name' => t('Country'),\n 'type' => 'select',\n 'extra' => ['civicrm_live_options' => 1],\n 'value' => wf_crm_get_civi_setting('defaultContactCountry', 1228),\n ];\n $fields['address_state_province_id'] = [\n 'name' => t('State/Province'),\n 'type' => 'textfield',\n 'extra' => [\n 'maxlength' => 5,\n 'width' => 4,\n ],\n 'data_type' => 'state_province_abbr',\n ];\n $fields['address_county_id'] = [\n 'name' => t('District/County'),\n 'type' => 'textfield',\n ];\n $fields['address_master_id'] = [\n 'name' => t('Share address of'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['aslist' => 0],\n 'empty_option' => t('Do Not Share'),\n ];\n $fields['phone_phone'] = [\n 'name' => t('Phone Number'),\n 'type' => 'textfield',\n ];\n $fields['phone_phone_ext'] = [\n 'name' => t('Phone Extension'),\n 'type' => 'textfield',\n 'extra' => [\n 'width' => 4,\n ],\n ];\n $fields['phone_phone_type_id'] = [\n 'name' => t('Phone # Type'),\n 'type' => 'select',\n 'table' => 'phone',\n 'expose_list' => TRUE,\n ];\n $fields['im_name'] = [\n 'name' => t('Screen Name'),\n 'type' => 'textfield',\n ];\n $fields['im_provider_id'] = [\n 'name' => t('IM Provider'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n ];\n $defaultLocType = wf_crm_aval(wf_civicrm_api('LocationType', 'get', [\n 'return' => [\"id\"],\n 'is_default' => 1,\n ]), 'id');\n foreach (['address' => t('Address # Location'), 'phone' => t('Phone # Location'), 'email' => t('Email # Location'), 'im' => t('IM # Location')] as $key => $label) {\n if (isset($sets[$key])) {\n $fields[$key . '_location_type_id'] = [\n 'name' => $label,\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => $defaultLocType,\n ];\n }\n }\n $fields['website_url'] = [\n 'name' => t('Website'),\n 'type' => 'textfield',\n 'data_type' => 'Link',\n ];\n $fields['website_website_type_id'] = [\n 'name' => t('Website # Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n ];\n $fields['other_group'] = [\n 'name' => t('Group(s)'),\n 'type' => 'select',\n 'extra' => ['multiple' => 1, 'civicrm_live_options' => 1],\n 'table' => 'group',\n 'expose_list' => TRUE,\n ];\n $fields['activity_activity_type_id'] = [\n 'name' => t('Activity # Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n ];\n $fields['activity_target_contact_id'] = [\n 'name' => t('Activity # Participant(s)'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['multiple' => 1],\n 'data_type' => 'ContactReference',\n ];\n $fields['activity_source_contact_id'] = [\n 'name' => t('Activity # Creator'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'data_type' => 'ContactReference',\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['activity_subject'] = [\n 'name' => t('Activity # Subject'),\n 'type' => 'textfield',\n ];\n $fields['activity_details'] = [\n 'name' => t('Activity # Details'),\n 'type' => module_exists('webform_html_textarea') ? 'html_textarea' : 'textarea',\n ];\n $fields['activity_status_id'] = [\n 'name' => t('Activity # Status'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['activity_priority_id'] = [\n 'name' => t('Activity # Priority'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['activity_assignee_contact_id'] = [\n 'name' => t('Assign Activity # to'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'empty_option' => t('No One'),\n 'extra' => ['multiple' => 1],\n 'data_type' => 'ContactReference',\n ];\n $fields['activity_location'] = [\n 'name' => t('Activity # Location'),\n 'type' => 'textfield',\n ];\n $fields['activity_activity_date_time'] = [\n 'name' => t('Activity # Date'),\n 'type' => 'date',\n 'value' => 'now',\n ];\n $fields['activity_activity_date_time_timepart'] = [\n 'name' => t('Activity # Time'),\n 'type' => 'time',\n 'value' => 'now',\n ];\n $fields['activity_duration'] = [\n 'name' => t('Activity # Duration'),\n 'type' => 'number',\n 'extra' => [\n 'field_suffix' => t('min.'),\n 'min' => 0,\n 'step' => 5,\n 'integer' => 1,\n ],\n ];\n $tag_entities = ['other', 'activity'];\n if (isset($sets['case'])) {\n $tag_entities[] = 'case';\n $fields['case_case_type_id'] = [\n 'name' => t('Case # Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n ];\n $fields['case_client_id'] = [\n 'name' => t('Case # Client'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['required' => 1, 'multiple' => wf_crm_get_civi_setting('civicaseAllowMultipleClients', 0)],\n 'data_type' => 'ContactReference',\n 'set' => 'caseRoles',\n 'value' => 1,\n ];\n $fields['case_status_id'] = [\n 'name' => t('Case # Status'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['case_medium_id'] = [\n 'name' => t('Medium'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n ];\n $fields['case_subject'] = [\n 'name' => t('Case # Subject'),\n 'type' => 'textfield',\n ];\n $fields['case_creator_id'] = [\n 'name' => t('Case # Creator'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'data_type' => 'ContactReference',\n 'set' => 'caseRoles',\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['case_start_date'] = [\n 'name' => t('Case # Start Date'),\n 'type' => 'date',\n 'value' => 'now',\n ];\n $fields['case_end_date'] = [\n 'name' => t('Case # End Date'),\n 'type' => 'date',\n 'value' => 'now',\n ];\n $fields['case_details'] = [\n 'name' => t('Case # Details'),\n 'type' => 'textarea',\n ];\n // Fetch case roles\n $sets['caseRoles'] = ['entity_type' => 'case', 'label' => t('Case Roles')];\n foreach (wf_crm_apivalues('case_type', 'get') as $case_type) {\n foreach ($case_type['definition']['caseRoles'] as $role) {\n foreach (wf_crm_get_relationship_types() as $rel_type) {\n if (in_array($role['name'], [$rel_type['name_b_a'], $rel_type['label_b_a']])) {\n if (!isset($fields['case_role_' . $rel_type['id']])) {\n $fields['case_role_' . $rel_type['id']] = [\n 'name' => $rel_type['label_b_a'],\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'data_type' => 'ContactReference',\n 'set' => 'caseRoles',\n 'empty_option' => t('None'),\n 'extra' => [\n 'multiple' => 1,\n ],\n ];\n }\n $fields['case_role_' . $rel_type['id']]['case_types'][] = $case_type['id'];\n break;\n }\n }\n }\n }\n }\n $all_tagsets = wf_crm_apivalues('tag', 'get', [\n 'return' => ['id', 'name', 'used_for'],\n 'is_tagset' => 1,\n 'parent_id' => ['IS NULL' => 1],\n ]);\n foreach ($tag_entities as $entity) {\n $table_name = $entity == 'other' ? 'civicrm_contact' : \"civicrm_$entity\";\n $tagsets = ['' => t('Tag(s)')];\n foreach ($all_tagsets as $set) {\n if (strpos($set['used_for'], $table_name) !== FALSE) {\n $tagsets[$set['id']] = $set['name'];\n }\n }\n foreach ($tagsets as $pid => $name) {\n $fields[$entity . '_tag' . ($pid ? \"_$pid\" : '')] = [\n 'name' => $name,\n 'type' => 'select',\n 'extra' => ['multiple' => 1, 'civicrm_live_options' => 1],\n 'table' => 'tag',\n 'expose_list' => TRUE,\n ];\n }\n }\n $fields['relationship_relationship_type_id'] = [\n 'name' => t('Relationship Type(s)'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => [\n 'civicrm_live_options' => 1,\n 'multiple' => 1,\n ],\n ];\n $fields['relationship_is_active'] = [\n 'name' => t('Is Active'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => '1',\n ];\n $fields['relationship_relationship_permission'] = [\n 'name' => t('Permissions'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'empty_option' => t('No Permissions'),\n ];\n $fields['relationship_start_date'] = [\n 'name' => t('Start Date'),\n 'type' => 'date',\n 'extra' => [\n 'start_date' => '-50 years',\n 'end_date' => '+10 years',\n ],\n ];\n $fields['relationship_end_date'] = [\n 'name' => t('End Date'),\n 'type' => 'date',\n 'extra' => [\n 'start_date' => '-50 years',\n 'end_date' => '+10 years',\n ],\n ];\n $fields['relationship_description'] = [\n 'name' => t('Description'),\n 'type' => 'textarea',\n ];\n if (isset($sets['contribution'])) {\n $fields['contribution_contribution_page_id'] = [\n 'name' => ts('Contribution Page'),\n 'type' => 'hidden',\n 'expose_list' => TRUE,\n 'empty_option' => t('None'),\n 'extra' => [\n 'hidden_type' => 'hidden',\n ],\n 'weight' => 9999,\n ];\n $fields['contribution_total_amount'] = [\n 'name' => t('Contribution Amount'),\n 'weight' => 9991,\n ] + $moneyDefaults;\n $fields['contribution_payment_processor_id'] = [\n 'name' => t('Payment Processor'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['aslist' => 0],\n 'exposed_empty_option' => t('Pay Later'),\n 'value_callback' => TRUE,\n 'weight' => 9995,\n ];\n $fields['contribution_note'] = [\n 'name' => t('Contribution Note'),\n 'type' => 'textarea',\n 'weight' => 9993,\n ];\n $fields['contribution_soft'] = [\n 'name' => t('Soft Credit To'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['multiple' => TRUE],\n 'data_type' => 'ContactReference',\n ];\n $fields['contribution_honor_contact_id'] = [\n 'name' => t('In Honor/Memory of'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'empty_option' => t('No One'),\n 'data_type' => 'ContactReference',\n ];\n $fields['contribution_honor_type_id'] = [\n 'name' => t('Honoree Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n ];\n $fields['contribution_is_test'] = [\n 'name' => t('Payment Processor Mode'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['civicrm_live_options' => 1],\n 'value' => 0,\n 'weight' => 9997,\n ];\n $fields['contribution_source'] = [\n 'name' => t('Contribution Source'),\n 'type' => 'textfield',\n ];\n // Line items\n $fields['contribution_line_total'] = [\n 'name' => t('Line Item Amount'),\n 'set' => 'line_items',\n ] + $moneyDefaults;\n $fields['contribution_financial_type_id'] = [\n 'name' => t('Financial Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['civicrm_live_options' => 1],\n 'value' => 1,\n 'default' => 1,\n 'set' => 'line_items',\n ];\n $sets['contributionRecur'] = ['entity_type' => 'contribution', 'label' => t('Recurring Contribution')];\n $fields['contribution_frequency_unit'] = [\n 'name' => t('Frequency of Installments'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => 0,\n 'exposed_empty_option' => '- ' . t('No Installments') . ' -',\n 'set' => 'contributionRecur',\n ];\n $fields['contribution_installments'] = [\n 'name' => t('Number of Installments'),\n 'type' => 'number',\n 'value' => '1',\n 'extra' => [\n 'integer' => 1,\n 'min' => 0,\n ],\n 'set' => 'contributionRecur',\n ];\n $fields['contribution_frequency_interval'] = [\n 'name' => t('Interval of Installments'),\n 'type' => 'number',\n 'value' => '1',\n 'extra' => [\n 'integer' => 1,\n 'min' => 1,\n ],\n 'set' => 'contributionRecur',\n ];\n }\n if (isset($sets['participant'])) {\n $fields['participant_event_id'] = [\n 'name' => t('Event(s)'),\n 'type' => 'select',\n 'extra' => ['multiple' => 1, 'civicrm_live_options' => 1],\n 'expose_list' => TRUE,\n ];\n $fields['participant_role_id'] = [\n 'name' => t('Participant Role'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => '1',\n 'extra' => ['multiple' => 1, 'required' => 1],\n ];\n $fields['participant_status_id'] = [\n 'name' => t('Registration Status'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => 0,\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['participant_note'] = [\n 'name' => t('Participant Notes'),\n 'type' => 'textarea',\n ];\n if (isset($sets['contribution'])) {\n $fields['participant_fee_amount'] = [\n 'name' => t('Participant Fee'),\n ] + $moneyDefaults;\n }\n }\n if (isset($sets['membership'])) {\n $fields['membership_membership_type_id'] = [\n 'name' => t('Membership Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['civicrm_live_options' => 1],\n ];\n $fields['membership_financial_type_id'] = [\n 'name' => t('Membership Financial Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => 0,\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['membership_status_id'] = [\n 'name' => t('Override Status'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => 0,\n 'exposed_empty_option' => '- ' . t('No') . ' -',\n ];\n $fields['membership_status_override_end_date'] = [\n 'name' => t('Status Override Until Date'),\n 'type' => 'date',\n 'civicrm_condition' => [\n 'andor' => 'or',\n 'action' => 'show',\n 'rules' => [\n 'membership_status_id' => [\n 'values' => '0',\n 'operator' => 'not_equal',\n ],\n ],\n ],\n ];\n $fields['membership_num_terms'] = [\n 'name' => t('Number of Terms'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => 1,\n 'empty_option' => t('Enter Dates Manually'),\n ];\n if (isset($sets['contribution'])) {\n $fields['membership_fee_amount'] = [\n 'name' => t('Membership Fee'),\n ] + $moneyDefaults;\n }\n $fields['membership_join_date'] = [\n 'name' => t('Member Since'),\n 'type' => 'date',\n ];\n $fields['membership_start_date'] = [\n 'name' => t('Start Date'),\n 'type' => 'date',\n ];\n $fields['membership_end_date'] = [\n 'name' => t('End Date'),\n 'type' => 'date',\n ];\n }\n // Add campaign fields\n if (in_array('CiviCampaign', $components)) {\n $fields['activity_engagement_level'] = [\n 'name' => t('Engagement Level'),\n 'type' => 'select',\n 'empty_option' => t('None'),\n 'expose_list' => TRUE,\n ];\n $fields['activity_survey_id'] = [\n 'name' => t('Survey/Petition'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'empty_option' => t('None'),\n 'extra' => ['civicrm_live_options' => 1],\n ];\n foreach (array_intersect(['activity', 'membership', 'participant', 'contribution'], array_keys($sets)) as $ent) {\n $fields[$ent . '_campaign_id'] = [\n 'name' => t('Campaign'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['civicrm_live_options' => 1],\n 'empty_option' => t('None'),\n ];\n }\n }\n // CiviGrant fields\n if (isset($sets['grant'])) {\n $fields['grant_contact_id'] = [\n 'name' => t('Grant Applicant'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'data_type' => 'ContactReference',\n ];\n $fields['grant_grant_type_id'] = [\n 'name' => t('Grant Type'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'extra' => ['civicrm_live_options' => 1],\n ];\n $fields['grant_status_id'] = [\n 'name' => t('Grant Status'),\n 'type' => 'select',\n 'expose_list' => TRUE,\n 'value' => 0,\n 'exposed_empty_option' => '- ' . t('Automatic') . ' -',\n ];\n $fields['grant_application_received_date'] = [\n 'name' => t('Application Received Date'),\n 'type' => 'date',\n ];\n $fields['grant_decision_date'] = [\n 'name' => t('Decision Date'),\n 'type' => 'date',\n ];\n $fields['grant_money_transfer_date'] = [\n 'name' => t('Money Transfer Date'),\n 'type' => 'date',\n ];\n $fields['grant_grant_due_date'] = [\n 'name' => t('Grant Report Due'),\n 'type' => 'date',\n ];\n $fields['grant_grant_report_received'] = [\n 'name' => t('Grant Report Received?'),\n 'type' => 'select',\n 'extra' => ['aslist' => 0],\n ];\n $fields['grant_rationale'] = [\n 'name' => t('Grant Rationale'),\n 'type' => 'textarea',\n ];\n $fields['grant_note'] = [\n 'name' => t('Grant Notes'),\n 'type' => 'textarea',\n ];\n $fields['grant_amount_total'] = [\n 'name' => t('Amount Requested'),\n ] + $moneyDefaults;\n $fields['grant_amount_granted'] = [\n 'name' => t('Amount Granted'),\n ] + $moneyDefaults;\n }\n\n // File attachment fields\n $numAttachments = wf_crm_get_civi_setting('max_attachments', 3);\n foreach ($sets as $ent => $set) {\n if (!empty($set['attachments']) && $numAttachments) {\n $sets[\"{$ent}upload\"] = [\n 'label' => t('File Attachments'),\n 'entity_type' => $ent,\n ];\n for ($i = 1; $i <= $numAttachments; $i++) {\n $fields[\"{$ent}upload_file_$i\"] = [\n 'name' => t('Attachment !num', ['!num' => $i]),\n 'type' => 'file',\n 'data_type' => 'File',\n ];\n }\n }\n }\n\n $tokens = [\n 'display_name' => t('display name'),\n 'first_name' => t('first name'),\n 'nick_name' => t('nickname'),\n 'middle_name' => t('middle name'),\n 'last_name' => t('last name'),\n 'individual_prefix' => t('name prefix'),\n 'individual_suffix' => t('name suffix'),\n 'gender' => t('gender'),\n 'birth_date' => t('birth date'),\n 'job_title' => t('job title'),\n 'current_employer' => t('current employer'),\n 'contact_id' => t('contact id'),\n 'street_address' => t('street address'),\n 'city' => t('city'),\n 'state_province' => t('state/province abbr'),\n 'state_province_name' => t('state/province full'),\n 'postal_code' => t('postal code'),\n 'country' => t('country'),\n 'world_region' => t('world region'),\n 'phone' => t('phone number'),\n 'email' => t('email'),\n ];\n\n // Fetch custom groups\n list($contact_types) = wf_crm_get_contact_types();\n $custom_sets = [];\n $custom_groups = wf_crm_apivalues('CustomGroup', 'get', [\n 'return' => ['title', 'extends', 'extends_entity_column_value', 'extends_entity_column_id', 'is_multiple', 'max_multiple', 'help_pre'],\n 'is_active' => 1,\n 'extends' => ['IN' => array_keys($contact_types + $sets)],\n 'options' => ['sort' => 'weight'],\n ]);\n foreach ($custom_groups as $custom_group) {\n $set = 'cg' . $custom_group['id'];\n $entity_type = strtolower($custom_group['extends']);\n // Place these custom fields directly into their entity\n if (wf_crm_aval($sets, \"$entity_type:custom_fields\") == 'combined') {\n $set = $entity_type;\n }\n else {\n $sets[$set] = [\n 'label' => $custom_group['title'],\n 'entity_type' => $entity_type,\n 'max_instances' => 1,\n ];\n if (isset($contact_types[$entity_type]) || $entity_type == 'contact') {\n $sets[$set]['entity_type'] = 'contact';\n if ($entity_type != 'contact') {\n $sets[$set]['contact_type'] = $entity_type;\n }\n if (!empty($custom_group['is_multiple'])) {\n $sets[$set]['max_instances'] = $custom_group['max_multiple'] ?? 9;\n }\n }\n if (!empty($custom_group['extends_entity_column_value'])) {\n $sets[$set]['sub_types'] = $custom_group['extends_entity_column_value'];\n }\n if (!empty($custom_group['extends_entity_column_id'])) {\n $sets[$set]['extension_of'] = $custom_group['extends_entity_column_id'];\n }\n $sets[$set]['help_text'] = $custom_group['help_pre'] ?? NULL;\n }\n $custom_sets[$custom_group['id']] = $set;\n }\n\n // Fetch custom fields\n $custom_types = wf_crm_custom_types_map_array();\n $custom_fields = wf_crm_apivalues('CustomField', 'get', [\n 'is_active' => 1,\n 'custom_group_id' => ['IN' => array_keys($custom_sets)],\n 'html_type' => ['IN' => array_keys($custom_types)],\n 'options' => ['sort' => 'weight'],\n ]);\n foreach ($custom_fields as $custom_field) {\n $set = $custom_sets[$custom_field['custom_group_id']];\n $custom_group = $custom_groups[$custom_field['custom_group_id']];\n $id = $set . '_custom_' . $custom_field['id'];\n $fields[$id] = $custom_types[$custom_field['html_type']];\n if ($custom_field['html_type'] == 'Text' && $custom_field['data_type'] == 'Money') {\n $fields[$id] = $moneyDefaults;\n }\n $fields[$id]['name'] = $custom_field['label'];\n $fields[$id]['required'] = (int) !empty($custom_field['is_required']);\n if (!empty($custom_field['default_value'])) {\n $fields[$id]['value'] = implode(',', wf_crm_explode_multivalue_str($custom_field['default_value']));\n }\n $fields[$id]['data_type'] = $custom_field['data_type'];\n if (!empty($custom_field['help_pre']) || !empty($custom_field['help_post'])) {\n $fields[$id]['extra']['description'] = !empty($custom_field['help_pre']) ? $custom_field['help_pre'] : $custom_field['help_post'];\n $fields[$id]['extra']['description_above'] = (int) empty($custom_field['help_pre']);\n $fields[$id]['has_help'] = TRUE;\n }\n // Conditional rule - todo: support additional entities\n if ($sets[$set]['entity_type'] == 'contact' && !empty($sets[$set]['sub_types'])) {\n $fields[$id]['civicrm_condition'] = [\n 'andor' => 'or',\n 'action' => 'show',\n 'rules' => [\n 'contact_contact_sub_type' => [\n 'values' => $sets[$set]['sub_types'],\n ],\n ],\n ];\n }\n\n if ($set == 'relationship' && !empty($custom_group['extends_entity_column_value'])) {\n $fields[$id]['attributes']['data-relationship-type'] = implode(',', $custom_group['extends_entity_column_value']);\n }\n\n if ($fields[$id]['type'] == 'date') {\n $fields[$id]['extra']['start_date'] = (!empty($custom_field['start_date_years']) ? '-' . $custom_field['start_date_years'] : '-50') . ' years';\n $fields[$id]['extra']['end_date'] = (!empty($custom_field['end_date_years']) ? '+' . $custom_field['end_date_years'] : '+50') . ' years';\n // Add \"time\" component for datetime fields\n if (!empty($custom_field['time_format'])) {\n $fields[$id]['name'] .= ' - ' . t('date');\n $fields[$id . '_timepart'] = [\n 'name' => $custom_field['label'] . ' - ' . t('time'),\n 'type' => 'time',\n 'extra' => ['hourformat' => $custom_field['time_format'] == 1 ? '12-hour' : '24-hour'],\n ];\n }\n }\n elseif ($fields[$id]['data_type'] == 'ContactReference') {\n $fields[$id]['expose_list'] = TRUE;\n $fields[$id]['empty_option'] = t('None');\n }\n elseif ($fields[$id]['data_type'] !== 'Boolean' && $fields[$id]['type'] == 'select') {\n $fields[$id]['extra']['civicrm_live_options'] = 1;\n }\n elseif ($fields[$id]['type'] == 'textarea') {\n $fields[$id]['extra']['cols'] = $custom_field['note_columns'] ?? 60;\n $fields[$id]['extra']['rows'] = $custom_field['note_rows'] ?? 4;\n }\n }\n }\n return $$var;\n}", "title": "" }, { "docid": "6d7d3020b2e25af285f48cec7d472103", "score": "0.5321261", "text": "#[ArrayShape(['tiktok' => \"string[]\", 'youtube' => \"string[]\", 'twitter' => \"string[]\", 'facebook' => \"string[]\", 'linkedin' => \"string[]\", 'blog' => \"string[]\", 'instagram' => \"string[]\"])]\n public static function getFields(): array\n {\n // field, type, required, placeholder, tip, model for select\n return [\n 'tiktok' => ['input', 'text', 'optional', 'Tiktok account', 'Just enter the \"name\" in \"https://www.tiktok.com/username\"'],\n 'youtube' => ['input', 'text', 'optional', 'Youtube account', 'Just enter the \"name\" in \"https://www.youtube.com/username\"'],\n 'twitter' => ['input', 'text', 'optional', 'Twitter account', 'Just enter the \"username\" in \"https://www.twitter.com/username\"'],\n 'facebook' => ['input', 'text', 'optional', 'Facebook account', 'Just enter the \"username\" in \"https://www.facebook.com/username\"'],\n 'linkedin' => ['input', 'text', 'optional', 'Linkedin account', 'Just enter the \"username\" in \"https://www.linkedin.com/username\"'],\n 'blog' => ['input', 'text', 'optional', 'Blog url', 'Enter the full url of your blog like in \"https://www.myblog.blog'],\n 'instagram' => ['input', 'text', 'optional', 'Instagram account', 'Just enter the \"username\" in \"https://www.instagram.com/username\"'],\n ];\n }", "title": "" }, { "docid": "f00363365f42c10652a32bb4dea1ec1b", "score": "0.53167903", "text": "public static function init_fieldtypes () {\r\n self::$field_types['APF_hw_condition_rules'] = HW_HOANGWEB_INCLUDES.'/library/field-type/apf-rules-field/apf-rules-field.php';\r\n self::$field_types['APF_hw_table_fields'] = array(\r\n 'release' =>HW_HOANGWEB_INCLUDES.'/library/field-type/apf-table-fields.php',\r\n 'class' => 'APF_hw_table_fields',\r\n 'deps' => 'HW_APF_FormField'\r\n );\r\n self::$field_types['APF_hw_admin_table'] = array(\r\n 'release' => HW_HOANGWEB_INCLUDES. '/library/field-type/apf-admin-table/apf-admin-table.php',\r\n 'class' => 'APF_hw_admin_table',\r\n 'deps' => 'HW_APF_FormField'\r\n );\r\n self::$field_types['APF_hw_ckeditor_field'] = array(\r\n 'release'=> HW_HOANGWEB_INCLUDES. '/library/field-type/apf-editor-field/apf-ckeditor-field.php',\r\n 'class' => 'APF_hw_ckeditor_field',\r\n 'deps' => 'HW_APF_FormField'\r\n );\r\n self::$field_types['APF_hw_help_fields'] = array(\r\n 'release'=> HW_HOANGWEB_INCLUDES. '/library/field-type/apf-help-field/apf-help-field.php',\r\n 'class' => 'APF_hw_help_fields',\r\n 'deps' => array('HW_APF_FormField')\r\n );\r\n self::$field_types['APF_hw_html_field'] = array(\r\n 'release' => HW_HOANGWEB_INCLUDES. '/library/field-type/apf-html-field.php',\r\n 'class' => 'APF_hw_html_field',\r\n 'deps' => 'HW_APF_FormField'\r\n );\r\n self::$field_types['APF_hw_upload_field'] = array(\r\n 'release'=> HW_HOANGWEB_INCLUDES. '/library/field-type/apf-upload-field/apf-upload-field.php',\r\n 'class' => 'APF_hw_upload_field',\r\n 'deps' => 'HW_APF_FormField'\r\n );\r\n }", "title": "" }, { "docid": "a32e0316d3ff228dff5ab925d48089aa", "score": "0.5316531", "text": "private static function fields() {\n\n\t\tif ( null === self::$fields ) {\n\n\t\t\tself::$fields = [\n\t\t\t\t'year' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( '4 digit year (e.g. 2017)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'month' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Month number (from 1 to 12)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'week' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Week of the year (from 0 to 53)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'day' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Day of the month (from 1 to 31)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'hour' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Hour (from 0 to 23)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'minute' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Minute (from 0 to 59)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'second' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Second (0 to 59)', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'after' => [\n\t\t\t\t\t'type' => self::date_after(),\n\t\t\t\t],\n\t\t\t\t'before' => [\n\t\t\t\t\t'type' => self::date_before(),\n\t\t\t\t],\n\t\t\t\t'inclusive' => [\n\t\t\t\t\t'type' => Types::boolean(),\n\t\t\t\t\t'description' => __( 'For after/before, whether exact value should be\n\t\t\t\t\t\t\t\t\t\t\t\tmatched or not', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'compare' => [\n\t\t\t\t\t'type' => Types::string(),\n\t\t\t\t\t'description' => __( 'For after/before, whether exact value should be\n\t\t\t\t\t\t\t\t\t\t\t\tmatched or not', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'column' => [\n\t\t\t\t\t'type' => self::column_enum(),\n\t\t\t\t\t'description' => __( 'Column to query against', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'relation' => [\n\t\t\t\t\t'type' => Types::relation_enum(),\n\t\t\t\t\t'description' => __( 'OR or AND, how the sub-arrays should be compared', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t];\n\n\t\t}\n\n\t\treturn self::$fields;\n\n\t}", "title": "" }, { "docid": "df2c26fd34eb4076276737e1185f0c93", "score": "0.5304496", "text": "public function field_type($result, $field)\n {\n }", "title": "" }, { "docid": "06a44ce44244f3cadd4ed52b63b91ce4", "score": "0.5298487", "text": "public static function apply_fieldtypes($fields, $apf_page) {\r\n $types = self::get_apf_field_types(); //get all apf types\r\n //$module_class = $this->get_module_name(); //module name\r\n\r\n foreach((array) $fields as $type) {\r\n if(isset($types[$type]) /*&& class_exists($types[$type])*/) {\r\n $field_class = $types[$type] ;\r\n if(!class_exists($field_class)) { //load new APF field type\r\n self::load_fieldtype($field_class);\r\n }\r\n if(class_exists($field_class) && class_exists($apf_page)) {\r\n new $field_class($apf_page);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "b4902ad6cc04d818fcecf811e20ec702", "score": "0.52967423", "text": "private function checkContentTypeConfig($type, array $expectedFields, array $expectedViews, array $expectedForms) {\n $this->drupalGet('admin/structure/types/manage/' . $type . '/fields');\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains('Manage fields');\n\n $actualFields = $this->getFieldsTableBodyAsArray('//table');\n $this->assertArraysAreEqual($expectedFields, $actualFields);\n\n foreach ($expectedViews as $viewMode => $expectedView) {\n $mode = ($viewMode === 'default') ? '' : ('/' . $viewMode);\n\n $this->drupalGet('admin/structure/types/manage/' . $type . '/display' . $mode);\n $this->assertSession()->statusCodeEquals(200);\n $this->assertSession()->pageTextContains('Manage display');\n\n $actualView = $this->getViewsTableAsArray('//table');\n $this->assertArraysAreEqual($expectedView, $actualView);\n }\n\n // @todo.\n // foreach ($expectedForms as $formMode => $expectedForm) {\n // }\n }", "title": "" }, { "docid": "d31c0e106d26131dc01e33c8eae30a6d", "score": "0.5287185", "text": "abstract protected function getFormFields();", "title": "" }, { "docid": "6ccfa0048ce74be3d2949a201341edfc", "score": "0.52857596", "text": "private function get_state_fields_by_type($type) {\n\t\t$state_fields = array(\n\t\t\t'post' => array(\n\t\t\t\t'validation_fields' => array('publish_posts', 'edit_posts', 'delete_posts'),\n\t\t\t\t'items_key' => 'posts',\n\t\t\t\t'count_key' => 'posts_count',\n\t\t\t\t'list_key' => 'posts',\n\t\t\t\t'result_key' => 'get',\n\t\t\t\t'error_key' => 'post_state_change_failed'\n\t\t\t),\n\t\t\t'page' => array(\n\t\t\t\t'validation_fields' => array('publish_pages', 'edit_pages', 'delete_pages'),\n\t\t\t\t'items_key' => 'pages',\n\t\t\t\t'count_key' => 'pages_count',\n\t\t\t\t'list_key' => 'pages',\n\t\t\t\t'result_key' => 'get',\n\t\t\t\t'error_key' => 'page_state_change_failed'\n\t\t\t)\n\t\t);\n\n\t\tif (!isset($state_fields[$type])) return array();\n\t\treturn $state_fields[$type];\n\t}", "title": "" }, { "docid": "44530a9f7ebfc8da53cc40c44324ea11", "score": "0.5280081", "text": "public function testTypeFieldIsRequiredWhileInsertion()\n {\n $payload = [\n 'name' => \"name XYZ\",\n 'type' => \"\",\n 'metadata' => json_encode(['key1' => 'value1', 'key2' => 'value2']),\n ];\n\n $response = $this->json('post', '/api/v1/stages', $payload);\n $response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);\n\n $payload['type'] = \"questioner\";\n $response = $this->json('post', '/api/v1/stages', $payload);\n\n $response->assertJsonFragment([\n 'message' => \"The given data was invalid.\",\n \"errors\" => [\n \"type\" => [\n 0 => \"The selected type is invalid.\",\n ],\n ],\n ]);\n\n $response->assertStatus(Response::HTTP_UNPROCESSABLE_ENTITY);\n }", "title": "" }, { "docid": "3faf6bc2e8e5136d32c92c51e60bf6a2", "score": "0.527731", "text": "public function fields()\n {\n return [\n 'id' => [\n 'type' => Type::nonNull(Type::int()),\n 'description' => 'The id of the user'\n ],\n 'desc_linea_credito' => [\n 'type' => Type::string(),\n 'description' => 'The desc_linea_credito of user'\n ],\n 'tipo_interes' => [\n 'type' => Type::string(),\n 'description' => 'The tipo_interes of the user'\n ],\n 'monto_minimo' => [\n 'type' => Type::float(),\n 'description' => 'The monto_minimo of the user'\n ],\n 'monto_maximo' => [\n 'type' => Type::float(),\n 'description' => 'The monto_maximo of the user'\n ],\n 'activo' => [\n 'type' => Type::int(),\n 'description' => 'activo'\n ],\n 'created_at' => [\n 'type' => Type::string(),\n 'description' => 'created_at'\n ],\n 'updated_at' => [\n 'type' => Type::string(),\n 'description' => 'updated_at'\n ],\n 'per_page' => [\n 'name' => 'per_page',\n 'type' => Type::int(),\n 'description' => 'Display a specific page',\n ],\n 'total' => [\n 'name' => 'total',\n 'type' => Type::int(),\n 'description' => 'Display a specific page',\n ],\n 'limit' => [\n 'name' => 'limit',\n 'type' => Type::int(),\n 'description' => 'Limit the items per page',\n ],\n 'perfil_cliente' => [\n 'type' => Type::listOf(GraphQL::type('perfil_clienteType')),\n 'description' => 'The profile of the user'\n ]\n // field relation to model user_profiles\n /* 'user_profiles' => [\n 'type' => GraphQL::type('user_profiles'),\n 'description' => 'The profile of the user'\n ]*/\n ];\n }", "title": "" }, { "docid": "d38fbf7bd1b929539aead79d9f64e1db", "score": "0.5274945", "text": "protected function _getFields()\n\t{\n\t\treturn array('xf_content_type_field' => array(\n\t\t\t'content_type'\t\t=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 25, 'requiredError' => 'content_type_please_enter_valid_name'),\n\t\t\t'field_name'\t\t=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 50, 'requiredError' => 'content_type_please_enter_valid_field_name'),\n\t\t\t'field_value'\t\t=> array('type' => self::TYPE_STRING, 'required' => true, 'maxLength' => 75, 'requiredError' => 'content_type_please_enter_valid_field_value')\n\t\t));\n\t}", "title": "" }, { "docid": "8ae4988ba0043fe57012d3d9d3c13fcc", "score": "0.52717716", "text": "function _buildFieldsArray()\n {\n $fields = array();\n\n foreach ($this->m_fields as $fieldname => $fieldconfig)\n {\n if ($fieldname!=\"\" && $fieldconfig[\"type\"]!=\"\" && $this->getType($fieldconfig[\"type\"])!=\"\")\n {\n $fields[] = $this->buildField($fieldname, $fieldconfig[\"type\"], $fieldconfig[\"size\"], $fieldconfig[\"flags\"], $fieldconfig[\"default\"]);\n }\n }\n\n return $fields;\n }", "title": "" }, { "docid": "297bf26b3b920371d5bab06afdc6ba39", "score": "0.527061", "text": "public function setFieldsToRetrieve( $fields ) {\n\t\n\t\t$this->fields = $fields;\n\t\n\t}", "title": "" }, { "docid": "460b74e42911285f052249ded1865adc", "score": "0.52688557", "text": "public function fields(Request $request)\n {\n return [ \n Country::make(__('Nationality'), 'profile->nationality')\n ->required()\n ->rules('required'),\n\n Number::make(__('Age'), 'profile->age'),\n\n Date::make(__('Date Of Birth'), 'profile->birthday')\n ->resolveUsing(function($date) {\n if(! is_null($date)) {\n return \\Carbon\\Carbon::make($date);\n }\n })\n ->displayUsing(function($date) {\n if(! is_null($date)) {\n return \\Carbon\\Carbon::make($date)->format('Y M d');\n }\n })->required()\n ->rules('required'),\n\n Number::make(__('Earning'), 'profile->earning')\n ->required()\n ->rules('required')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Current Address'), 'profile->current_address')\n ->required()\n ->rules('required')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Previous Address 1'), 'profile->previous_address->0')\n ->required()\n ->rules('required')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Previous Address 2'), 'profile->previous_address->1')\n ->nullable()\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Previous Address 2'), 'profile->previous_address->2')\n ->nullable()\n ->hideFromDetail(boolval($request->get('card') == 'profile')), \n\n Panel::make(__('Main Income'), [\n Select::make(__('Work Status'), 'profile->work_status')\n ->required()\n ->rules('required')\n ->displayUsingLabels()\n ->options([\n 'employed' => __('Employed'),\n 'self_employed' => __('Self Employed'),\n ])\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Select::make(__('Contract Type'), 'profile->contract')\n ->required()\n ->rules('required')\n ->displayUsingLabels()\n ->options([\n 'permanent' => __('Permanent'),\n 'part_time' => __('Part Time'),\n ]),\n\n Text::make(__('Job Title'), 'profile->job_title')\n ->required()\n ->rules('required')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Company'), 'profile->company')\n ->required()\n ->rules('required')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Boolean::make(__('In probationary period'), 'profile->probationary')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Date::make(__('In probationary adte'), 'profile->probationary_date')\n ->resolveUsing(function($date) {\n if(! is_null($date)) {\n return \\Carbon\\Carbon::make($date);\n }\n })\n ->displayUsing(function($date) {\n if(! is_null($date)) {\n return \\Carbon\\Carbon::make($date)->format('Y M d');\n }\n })\n ->nullable()\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Confirm annual income'), 'profile->annual_income')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Text::make(__('Employment period'), 'profile->employment')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Boolean::make(__('Employment may change in 12 months?'), 'profile->change_employment')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n\n Boolean::make(__('On long term leave'), 'profile->leave')\n ->hideFromDetail(boolval($request->get('card') == 'profile')),\n ]),\n\n Panel::make(__('Further Detail'), [ \n Select::make(__('Tenancy Type'), 'profile->tenancy_type')\n ->default('single')\n ->rules('required')\n ->required()\n ->displayUsingLabels()\n ->options([\n 'sahre' => __('Share'),\n 'single' => __('Single'),\n ])\n ->hideFromDetail(boolval($request->get('card') == 'profile')), \n\n Select::make(__('Perefer tenancy period'), 'profile->tenancy_period')\n ->default('single')\n ->rules('required')\n ->required()\n ->displayUsingLabels()\n ->options([\n 12 => 12,\n 24 => 24,\n 36 => 36,\n ])\n ->hideFromDetail(boolval($request->get('card') == 'profile')), \n\n Text::make(__('How children living with you?'), 'profile->children_living')\n ->nullable()\n ->hideFromDetail(boolval($request->get('card') == 'profile')), \n ]),\n ];\n }", "title": "" }, { "docid": "db9724019beebd0dcafad194060d41ad", "score": "0.5257276", "text": "protected function fields()\n\t{\n\t\t$fields = '';\n\n\t\tforeach($this->elements as $element) {\n\t\t\t$func = 'form_' . $element->type(); // variable function call\n\t\t\t$fields .= $this->$func($element) . \"\\n\";\n\t\t}\n\t\t$fields = rtrim($fields, \"\\n\");\n\n\t\t$this->body = $fields;\n\t}", "title": "" }, { "docid": "05834867b4b74242ae34a04028e2c787", "score": "0.52544683", "text": "public function fields(Request $request)\n { \n return [\n ID::make(__('ID'), 'id')->sortable(),\n\n Select::make(__('Attribute Type'), 'type')->options([\n 'dropdown' => __('Dropdown list'),\n 'radio' => __('Radio Buttons'),\n 'color' => __('Color or Texture'),\n ])\n ->displayUsingLabels()\n ->required()\n ->rules('required'),\n\n Targomaan::make([\n Text::make(__('Attribute name'), 'name')\n ->required()\n ->rules('required'),\n\n $this->slugField(),\n ]), \n\n HasMany::make(__('Attributes'), 'attributes', Attribute::class),\n ];\n }", "title": "" }, { "docid": "e91f6f8436dfda1e2c6c5fe6d65f4733", "score": "0.5248743", "text": "function acf_register_field_type_info( $info ) {\n}", "title": "" }, { "docid": "40b6f6351fc71938c3b8e026a49eee20", "score": "0.52472925", "text": "protected function bindersGetBinderCustomFieldsRequest($binder_type)\n {\n // verify the required parameter 'binder_type' is set\n if ($binder_type === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $binder_type when calling bindersGetBinderCustomFields'\n );\n }\n\n $resourcePath = '/api/Binders/customfieldsbytype/{binderType}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($binder_type !== null) {\n $resourcePath = str_replace(\n '{' . 'binderType' . '}',\n ObjectSerializer::toPathValue($binder_type),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\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 }", "title": "" }, { "docid": "cb035ee7ff788fdbf80136bba835af1b", "score": "0.5238399", "text": "abstract protected function get_form_fields();", "title": "" }, { "docid": "f1622f803568aeaac1ee32c22afe6d7d", "score": "0.5237109", "text": "public function getData($field, $type, $required=false){\n\n if(isset($this->data[$field])){\n\n switch($type){\n case 'array':\n if(is_array($this->data[$field])){\n return $this->data[$field];\n } else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n case 'bool':\n if(is_bool($this->data[$field])){\n return $this->data[$field];\n }else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n case 'int':\n if($this->data[$field] == 0) {\n return 0;\n }elseif(is_int($this->data[$field])){\n return $this->data[$field];\n }else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n case 'num':\n\n if($this->data[$field] == 0){\n return 0;\n }elseif(is_numeric($this->data[$field])){\n return $this->data[$field];\n }else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n case 'string':\n if(is_string($this->data[$field])){\n return $this->data[$field];\n }else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n case 'float':\n if($this->data[$field] == 0) {\n return 0;\n }elseif(is_float($this->data[$field])){\n return $this->data[$field];\n }else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n case 'object':\n if(is_object($this->data[$field])){\n return $this->data[$field];\n }else {\n $this->setError('Wrong datatype for GetData '.$field);\n }\n break;\n\n case 'mixed':\n return $this->data[$field];\n break;\n }\n }\n\n\n switch($type){\n case 'array':\n if($required){\n $this->setError('Empty data for '.$field);\n }\n return array();\n break;\n case 'bool':\n return false;\n break;\n case 'int':\n return 0;\n break;\n case 'string':\n if($required){\n $this->setError('Empty data for '.$field);\n }\n return '';\n break;\n case 'float':\n return 0;\n break;\n case 'object':\n if($required){\n $this->setError('Empty data for '.$field);\n }\n return new \\stdClass();\n break;\n case 'mixed':\n return '';\n break;\n }\n\n $this->setError('Unrecognised data type for '.$field);\n return false;\n\n\n }", "title": "" }, { "docid": "3e87e179f63de1ff64c1f79a2b224de9", "score": "0.5234293", "text": "private static function fields() {\n\n\t\tif ( null === self::$fields ) {\n\n\t\t\tself::$fields = [\n\t\t\t\t'taxonomy' => [\n\t\t\t\t\t'type' => Types::list_of( Types::string() ),\n\t\t\t\t\t'description' => __( 'Array of taxonomy names, to which results should be limited.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'objectIds' => [\n\t\t\t\t\t'type' => Types::list_of( Types::int() ),\n\t\t\t\t\t'description' => __( 'Array of object IDs. Results will be limited to terms associated with these objects.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'orderby' => [\n\t\t\t\t\t'type' => new EnumType( [\n\t\t\t\t\t\t'name' => 'termsOrderby',\n\t\t\t\t\t\t'values' => [\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'NAME',\n\t\t\t\t\t\t\t\t'value' => 'name',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'SLUG',\n\t\t\t\t\t\t\t\t'value' => 'slug',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'TERM_GROUP',\n\t\t\t\t\t\t\t\t'value' => 'term_group',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'TERM_ID',\n\t\t\t\t\t\t\t\t'value' => 'term_id',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'ID',\n\t\t\t\t\t\t\t\t'value' => 'id',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'DESCRIPTION',\n\t\t\t\t\t\t\t\t'value' => 'description',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t'name' => 'COUNT',\n\t\t\t\t\t\t\t\t'value' => 'count',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t] ),\n\t\t\t\t\t'description' => __( 'Field(s) to order terms by. Defaults to \\'name\\'.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'hideEmpty' => [\n\t\t\t\t\t'type' => Types::boolean(),\n\t\t\t\t\t'description' => __( 'Whether to hide terms not assigned to any posts. Accepts true or false. Default true', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'include' => [\n\t\t\t\t\t'type' => Types::list_of( Types::int() ),\n\t\t\t\t\t'description' => __( 'Array of term ids to include. Default empty array.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'exclude' => [\n\t\t\t\t\t'type' => Types::list_of( Types::int() ),\n\t\t\t\t\t'description' => __( 'Array of term ids to exclude. If $include is non-empty, $exclude is ignored. Default empty array.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'excludeTree' => [\n\t\t\t\t\t'type' => Types::list_of( Types::int() ),\n\t\t\t\t\t'description' => __( 'Array of term ids to exclude along with all of their descendant terms. If $include is non-empty, $exclude_tree is ignored. Default empty array.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'name' => [\n\t\t\t\t\t'type' => Types::list_of( Types::string() ),\n\t\t\t\t\t'description' => __( 'Array of names to return term(s) for. Default empty.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'slug' => [\n\t\t\t\t\t'type' => Types::list_of( Types::string() ),\n\t\t\t\t\t'description' => __( 'Array of slugs to return term(s) for. Default empty.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'termTaxonomId' => [\n\t\t\t\t\t'type' => Types::list_of( Types::int() ),\n\t\t\t\t\t'description' => __( 'Array of term taxonomy IDs, to match when querying terms.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'hierarchical' => [\n\t\t\t\t\t'type' => Types::boolean(),\n\t\t\t\t\t'description' => __( 'Whether to include terms that have non-empty descendants (even if $hide_empty is set to true). Default true.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'search' => [\n\t\t\t\t\t'type' => Types::string(),\n\t\t\t\t\t'description' => __( 'Search criteria to match terms. Will be SQL-formatted with wildcards before and after. Default empty.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'nameLike' => [\n\t\t\t\t\t'type' => Types::string(),\n\t\t\t\t\t'description' => __( 'Retrieve terms with criteria by which a term is LIKE `$name__like`. Default empty.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'descriptionLike' => [\n\t\t\t\t\t'type' => Types::string(),\n\t\t\t\t\t'description' => __( 'Retrieve terms where the description is LIKE `$description__like`. Default empty.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'padCounts' => [\n\t\t\t\t\t'type' => Types::boolean(),\n\t\t\t\t\t'description' => __( 'Whether to pad the quantity of a term\\'s children in the quantity of each term\\'s \"count\" object variable. Default false.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'childOf' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Term ID to retrieve child terms of. If multiple taxonomies are passed, $child_of is ignored. Default 0.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'parent' => [\n\t\t\t\t\t'type' => Types::int(),\n\t\t\t\t\t'description' => __( 'Parent term ID to retrieve direct-child terms of. Default empty.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'childless' => [\n\t\t\t\t\t'type' => Types::boolean(),\n\t\t\t\t\t'description' => __( 'True to limit results to terms that have no children. This parameter has no effect on non-hierarchical taxonomies. Default false.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'cacheDomain' => [\n\t\t\t\t\t'type' => Types::string(),\n\t\t\t\t\t'description' => __( 'Unique cache key to be produced when this query is stored in an object cache. Default is \\'core\\'.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t\t'updateTermMetaCache' => [\n\t\t\t\t\t'type' => Types::boolean(),\n\t\t\t\t\t'description' => __( 'Whether to prime meta caches for matched terms. Default true.', 'wp-graphql' ),\n\t\t\t\t],\n\t\t\t];\n\n\t\t}\n\n\t\treturn self::$fields;\n\n\t}", "title": "" }, { "docid": "8aec8dc5d46c9af0e56e547a9a742a90", "score": "0.5230986", "text": "public function getRequestData($field = null) {\n if (!$this->hasData('request_data')) {\n $requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('top_filter'));\n $requestData['type_id'] = $this->getTypeId();\n $this->setData('request_data', $requestData);\n }\n $data = $this->getData('request_data');\n return $field ? (isset($data[$field]) ? $data[$field] : null) : $data;\n }", "title": "" }, { "docid": "4156c0c9e1ea9e58a5ebf650dfe37246", "score": "0.52269834", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n\n Number::make('Brightness percentage')\n ->rules([\n 'required',\n 'integer',\n 'between:0,100'\n ]),\n Boolean::make('Reacts to movements')\n ->rules([\n 'required',\n 'boolean',\n ]),\n Number::make('Turn off timer')\n ->rules([\n 'required',\n 'integer',\n 'between:0,100000'\n ]),\n\n BelongsTo::make('User'),\n\n BelongsTo::make('Flat part', 'flatPart')\n ];\n }", "title": "" }, { "docid": "8886215d9c66dc83d9aacd22cfac225c", "score": "0.5222439", "text": "function makeField($nr, $type, $fields1, $choises, $isfield = true, $statistics = array(), $all = 0, $txt) {\n\n $additional_txt = false;\n $additional_ar = array();\n\n if ($choises != \"\") {\n $ar = split(\";;\", $choises);\n for ($t = 0; $t < sizeof($ar); $t++) {\n $this->fielddata[$type][\"list\"][($t+1)] = $ar[$t];\n }\n }\n\n if (is_array($this->fielddata[$type][\"list\"]) && $isfield == true) $fields1 = 1;\n else if ($isfield == true) { $fields1 = 1; }\n\n $result = \"\";\n\n // Parse the fields according to the needed number\n for ($c = 0; $c < $fields1; $c++) {\n if ($type == 5 && $c == 0) $value = 1;\n if ($type == 6 && $c == 0 && is_array($this->fielddata[$type][\"list\"])) $value = $this->fielddata[$type][\"list\"];\n\n if ($this->vars[\"field\".$nr.\"_\".($c+1)] != \"\") $value = $this->vars[\"field\".$nr.\"_\".($c+1)];\n\n // Should we display the form element\n if ($isfield == true) {\n $f = new AdminFields(\"field\".$nr.\"_\".($c+1), $this->fielddata[$type]);\n $disp_val = $f->display($value);\n if ($this->fielddata[$type][\"class\"]) {\n $disp_val = str_replace(\"class=\\\"\", \"class=\\\"\" . $this->fielddata[$type][\"class\"] . \" \", $disp_val);\n }\n if ($additional_txt == true) {\n $result .= $numbers . $disp_val . \"&nbsp;\" . $additional_ar[($c+1)] . \"<br />\";\n }\n else {\n $result .= $numbers . $disp_val . \"<br />\";\n }\n }\n }\n\n $this->fielddata[$type][\"list\"] = array();\n\n return $result;\n }", "title": "" }, { "docid": "8e140fd12c489a482b702d146617ff4c", "score": "0.5217257", "text": "abstract public function field_type($no);", "title": "" }, { "docid": "f20baa3409f8aeb2cabf04e3907b9e44", "score": "0.5212932", "text": "public function setDataFromRequest(\\App\\Request $request): void\n\t{\n\t\tforeach ($this->getModule()->getFormFields() as $fieldName => $fieldInfo) {\n\t\t\tif ($request->has($fieldName)) {\n\t\t\t\t$value = $request->getByType($fieldName, $fieldInfo['purifyType']);\n\t\t\t\t$fieldModel = $this->getFieldInstanceByName($fieldName)->getUITypeModel();\n\t\t\t\t$fieldModel->validate($value, true);\n\t\t\t\t$this->set($fieldName, $fieldModel->getDBValue($value));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "57a9b20684d3d0110f8af813bfb7fa6d", "score": "0.5209896", "text": "public function required_if_type($var, $type) {\n\n\t\t// get form post as it's array\n\t\t$var = $this->input->post('blocks');\n\n\t\tif (in_array($type, array('blocks', 'contract pricing', 'other', 'participants')) && empty($var)) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "f8b8ddae8369844c9d0f87c15374ff23", "score": "0.52059937", "text": "public function setValues() {\n\n // get form url (if field reload)\n if ($p = $_GET[$this->to_type_field->short_name]) {\n $to_type = $p;\n }\n // get from form (on form submit)\n else if ($p = $_POST[$this->to_type_field->name]) {\n $to_type = $p;\n }\n // get from model (on form generation)\n else {\n $to_type = $this->model['to_type']?:$this->config->getDefaultToMessateType();\n }\n\n if ($to_model = $this->config->getTypeModelClassName($to_type)) {\n $this->to_id_field->setModel($to_model);\n $this->to_id_field->set($this->model['to_id']);\n }\n\n $this->to_type_field->set($to_type);\n\n\n\n // get form url (if field reload)\n if ($p = $_GET[$this->from_type_field->short_name]) {\n $from_type = $p;\n }\n // get from form (on form submit)\n else if ($p = $_POST[$this->from_type_field->name]) {\n $from_type = $p;\n }\n // get from model (on form generation)\n else {\n $from_type = $this->model['from_type']?:$this->config->getDefaultFromMessateType();\n }\n\n if ($from_model = $this->config->getTypeModelClassName($from_type)) {\n $this->from_id_field->setModel($from_model);\n $this->from_id_field->set($this->model['from_id']);\n }\n\n $this->from_type_field->set($from_type);\n\n }", "title": "" }, { "docid": "d102e7083d2cf2e427c00fa513d7c8c3", "score": "0.52056694", "text": "function ajaxCheckTypeFields( $type_id = false )\n\t{\n\t\tglobal $_response, $lang;\n\n\t\tif ( !$type_id )\n\t\t{\n\t\t\treturn $_response;\n\t\t}\n\n\t\tif ( $this -> getFields($type_id) )\n\t\t{\n\t\t\t$_response -> script(\"$('#step_account').fadeIn();\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_response -> script(\"$('#step_account').fadeOut();\");\n\t\t}\n\n\t\treturn $_response;\n\t}", "title": "" }, { "docid": "542f7197ffd24f8858c995b7d475efb1", "score": "0.51977855", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n\n Text::make(__('工单标题'),'title')\n ->rules('required', 'max:255')\n ->help('工单标题要求简洁 扼要!工单标题是 工单解决进度 邮件通知 的标识!'),\n\n BelongsTo::make(__('提交人'), 'user', User::class)\n ->hideWhenCreating()\n ->hideWhenUpdating(),\n\n BelongsTo::make(__('工单类别'), 'type', Type::class)\n ->rules('required'),\n\n BelongsTo::make(__('工单系统'), 'system', System::class)\n ->rules('required'),\n\n BelongsTo::make(__('技术处理'), 'love', Love::class)\n ->hideWhenCreating(),\n\n Indicator::make(__('工单状态'), 'status')\n ->labels([\n 'unsolved' => '未解决',\n 'allot' => '已分配',\n 'confirm' => '待确认',\n 'complete' => '已完成',\n ])->colors([\n 'unsolved' => 'red',\n 'allot' => 'grey',\n 'confirm' => 'blue',\n 'complete' => 'green',\n ]),\n\n Select::make(__('工单状态'), 'status')->options([\n 'unsolved' => '未解决',\n 'allot' => '已分配',\n 'confirm' => '待确认',\n 'complete' => '已完成',\n ]) ->hideWhenCreating()\n ->hideFromIndex()\n ->hideFromDetail(),\n\n Select::make(__('工单程度'), 'level')->options([\n 'low' => '正常',\n 'middle' => '紧急',\n 'high' => '非常紧急',\n ]) ->rules('required')\n ->hideFromIndex()\n ->hideFromDetail(),\n\n Indicator::make(__('工单程度'), 'level')\n ->labels([\n 'low' => '正常',\n 'middle' => '紧急',\n 'high' => '非常紧急',\n ])->colors([\n 'low' => 'green',\n 'middle' => 'orange',\n 'high' => 'red',\n ]),\n\n DateTime::make(__('创建时间'),'created_at')->hideWhenCreating()->hideWhenUpdating()->sortable(),\n\n// NovaFieldQuill::make(__('工单内容'),'content')\n// ->rules('required')\n// ->hideFromIndex(),\n\n Trix::make(__('工单内容'),'content')->withFiles('qiniu')->alwaysShow()->help(\n '注意: 工单问题的描述!拖动问题截图到此窗口!为了更快的解决您的问题,问题截图要求完整!'\n )->rules('required')\n ->hideFromIndex(),\n\n WorkComment::make(),\n\n HasMany::make(__('对话'), 'comments', Comment::class)->hideFromDetail(),\n\n ];\n }", "title": "" }, { "docid": "7aabde473fd41070d7ab64e91ba9b35c", "score": "0.51971483", "text": "public function valid($data = 'data',$required = 'true or false' ,$type = 'str OR num OR email OR url OR ip'/**'str,num','email','url','ip'**/){ \n if(is_array($data)){\n if(!empty($data)){\n foreach($data as $key => $value){\n if($required == true){ /** check if the input var is required */\n if(empty($data)){\n throw new \\exception(\"fields with * are required fields\");\n }\n } \n }\n }\n }else{\n if($required == true){\n if(empty($data)){\n throw new \\exception(\"fields with * are required fields\");\n }\n }\n \n }\n $array_types = array('str','num','email','url','ip'); /** types list */\n \n if(!in_array($type,$array_types)){\n throw new \\exception(\"This type of is not supported , only (str,num,email,url,ip)\");\n }\n if($type == 'str'){\n $validated = self::filterString($data);\n }elseif($type == 'num'){\n $validated = self::filterInteger($data);\n }elseif($type == 'email'){\n $validated = self::filterEmail($data);\n }elseif($type == 'url'){\n $validated = self::filterUrl($data);\n }elseif($type == 'ip'){\n $validated = self::filterIP($data);\n }else{\n throw new \\exception(\"This type of is not supported , only (str,num,email,url,ip)\");\n }\n /** Data can be array or variable */ \n \n return $validated ;\n }", "title": "" }, { "docid": "ae99affb71b3662d78fc0de4b2a2fbb2", "score": "0.51871794", "text": "public function actionShowform() {\n $type = $_POST['type'];\n\n if ($type == '1') { /* add hospital */\n $form = $this->renderPartial('_hospital', ['type' => $type, 'field_id' => $_POST['field_id'], 'category' => $_POST['category']]);\n } else if ($type == 2) { /* add remarks category */\n $form = $this->renderPartial('_remark_category', ['type' => $type, 'field_id' => $_POST['field_id'], 'cat_type' => $_POST['cat_type']]);\n } else if ($type == 3) { /* add followups category */\n $form = $this->renderPartial('_followup_category', ['type' => $type, 'field_id' => $_POST['field_id'], 'cat_type' => $_POST['cat_type']]);\n } else if ($type == 4) { /* add staff skills */\n $form = $this->renderPartial('_skills', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 5) { /* add upload category */\n $form = $this->renderPartial('_upload_category', ['type' => $type, 'field_id' => $_POST['field_id'], 'cat_type' => $_POST['cat_type']]);\n } else if ($type == 6) { /* add contact directory category */\n $form = $this->renderPartial('_contact_category', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 7) { /* add contact directory sub category */\n $form = $this->renderPartial('_contact_sub_category', ['type' => $type, 'field_id' => $_POST['field_id'], 'category' => $_POST['category']]);\n } else if ($type == 8) { /* add contact directory designation */\n $form = $this->renderPartial('_contact_designations', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 9) { /* add contact directory */\n $form = $this->renderPartial('_contact_directory', ['type' => $type, 'field_id' => $_POST['field_id'], 'category' => $_POST['category']]);\n } else if ($type == 10) { /* add relationships */\n $form = $this->renderPartial('_relationships', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 11) { /* add referral source */\n $form = $this->renderPartial('_refferal_source', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 12) { /* add referral source */\n $form = $this->renderPartial('designation', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 13) { /* add referral source */\n $form = $this->renderPartial('designation', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } else if ($type == 14) { /* add referral source */\n $form = $this->renderPartial('timing', ['type' => $type, 'field_id' => $_POST['field_id']]);\n } \n\n echo $form;\n }", "title": "" }, { "docid": "28e7bf7032bbd07db13cb09a317879de", "score": "0.51869506", "text": "public function fields(Request $request)\n {\n return [\n BelongsTo::make('Supplier', 'suppliers')\n ->searchable(),\n Text::make('Email'),\n\n Select::make(\"Type of Email\", 'typeemail')\n ->options([\n \"shipping\" => 'shipping',\n 'tracking' => 'tracking'\n ]),\n ];\n }", "title": "" }, { "docid": "ad8b4841ee14036f0907651cd0e38770", "score": "0.5184484", "text": "public function fields(Request $request)\n {\n return [\n ID::make()\n ->hideFromIndex(),\n Text::make('Name', 'name')\n ->sortable(),\n Trix::make('Description', 'description'),\n BelongsToMany::make('Skills'),\n BelongsTo::make('Status'),\n Number::make('Bid Count', 'bid_count')\n ->sortable(),\n Boolean::make('Remote Job', 'is_remote_job')\n ->hideFromIndex(),\n Boolean::make('Premium', 'is_premium')\n ->hideFromIndex(),\n Boolean::make('Only for Plus', 'is_only_for_plus')\n ->hideFromIndex(),\n Select::make('Safe Type', 'safe_type')\n ->options([\n 'employer' => 'Employer',\n 'split' => 'Split',\n 'developer' => 'Developer',\n ])->displayUsingLabels()\n ->hideFromIndex(),\n Boolean::make('Personal', 'is_personal')\n ->hideFromIndex(),\n BelongsTo::make('Employer')\n ->sortable(),\n BelongsToMany::make('Tags'),\n DateTime::make('Published', 'published_at')->hideFromIndex(),\n DateTime::make('Expired', 'expired_at')->hideFromIndex(),\n\n Text::make('Location')\n ->withMeta([\n 'extraAttributes' => [\n 'style' => 'display: none',\n ],\n ]),\n\n Text::make('Country', 'location[country]')\n ->withMeta([\n 'asHtml' => true,\n 'value' => isset($this->location['country']) ? $this->location['country'] : ''\n ])\n ->onlyOnForms(),\n Text::make('City', 'location[city]')\n ->withMeta([\n 'value' => isset($this->location['city']) ? $this->location['city'] : ''\n ])\n ->onlyOnForms(),\n ];\n }", "title": "" }, { "docid": "1d7520631403f78ae422a59992c50ee3", "score": "0.51817477", "text": "public function fields(Request $request)\n {\n return [\n ID::make()->sortable(),\n Number::make('年龄', 'age'),\n Textarea::make('介绍', 'introduction'),\n Select::make('性别', 'gender')->default(\\App\\User::FEMALE_GENDER)->options(\\App\\User::getGenders())->displayUsingLabels(),\n DateTime::make('创建时间', 'created_at')\n ->hideWhenUpdating()->hideWhenCreating(),\n DateTime::make('登录时间', 'updated_at')\n ->hideWhenUpdating()->hideWhenCreating(),\n ];\n }", "title": "" }, { "docid": "f6b674068741a7b5ccc6071eaf05e132", "score": "0.5181698", "text": "public function make_field($field)\t\t//Calls the right function to create a field with the proper type, some own types are included\n {\n\n if(is_array($field))\n {\n\t\t\tif(isset( $field[\"type\"] ) )\n\t\t\t{\n\t\t\t\tif( is_array($field[\"name\"]) )\n\t\t\t\t{\n\t\t\t\t\t$name = $field[\"name\"];\n\n\t\t\t\t\tif( $name[\"no_prefix\"] )\n\t\t\t\t\t{\n\t\t\t\t\t\t$field[\"name\"] = $name[\"value\"];\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$field[\"name\"] = $this->form_prefix.$name[\"value\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$field[\"name\"] = $this->form_prefix.$field[\"name\"];\n\t\t\t\t}\n \n if(isset($field[\"label\"]) && $field[\"type\"] !== \"hidden\" /*&& $field[\"type\"]!=\"radio\"*/)\n\t\t\t\t{\n\t\t\t\t\t$label = $this->make_label($field); //\"<label for=\\\"{$field[\"id\"]}\\\">\".$field[\"label\"].\"%s\\n\";\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$label = \"%s\";\n\t\t\t\t}\n\t\t\t\t\n switch($field['type'])\n {\n\t\t\t\t\tcase 'textarea': $field = $this->make_textarea($field); break;\n case 'select': $field =$this->make_select($field); break;\n case 'checkbox': $field = $this->make_input_checkbox($field); break;\n case 'radio': $field =$this->make_input_radio($field); break;\n\t\t\t\t\tcase 'button': $field = $this->make_input_button($field); break;\n default: $field = $this->make_input($field);\n }\n \n\t\t\t\t$result = sprintf($label,$field);\n\t\t\t}\n\t\t\telseif( isset( $field[\"string\"] ) )\n\t\t\t{\n\t\t\t\t$result = $field[\"string\"];\n\t\t\t}\n \n return $result;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "897dc3936d643c5eaa0449756e8d770c", "score": "0.5171814", "text": "protected function prepareFormFields() {\n\n }", "title": "" }, { "docid": "3486a308d8d0b9682f718a7985378c07", "score": "0.51717967", "text": "public function filterFields($fields, $context = null)\n {\n $values = post('InvoiceFields');\n $tax_id = (int)$values['tax_id'];\n $price_ht = (float)$values['price_ht'];\n if($tax_id == 0)\n {\n $tax_id = (int)$this->getTaxIdAttribute();\n }\n\n if($context == 'update')\n {\n $field_id = (int)post('manage_id');\n $field = InvoiceFields::find($field_id);\n $tax_id = $field->tax->id;\n }\n $calculator = new Calculator((float)$price_ht, Tax::find($tax_id));\n if($values){\n $fields->price_ttc->value = $calculator->getPriceTTC();\n }\n \n\n }", "title": "" }, { "docid": "7ca56ed86d2d8aebacc3552a3fed8753", "score": "0.5168117", "text": "public function filterFields($fields)\n {\n $currencies = CurrencySettings::currencies();\n if (count($currencies) <= 1 && isset($fields->price)) {\n $fields->price->type = 'number';\n $fields->price->span = 'right';\n\n if (is_array($this->price)) {\n // Since we use a single number input we have to parse the price\n // out of the array value that is stored in the price field.\n $fields->price->value = array_values($this->price)[0]['price'];\n }\n }\n }", "title": "" }, { "docid": "b1d1b713e3b108133d6ffed366b6433c", "score": "0.516583", "text": "function admin_fields_types(array $args) {\n if (isset($args['nom'])):\n if (!isset($args['valor'])):\n $args['valor'] = '';\n endif;\n DeMomentsomtresTools::adminHelper_inputArray(self::OPTIONS, $args['nom'], $args['valor'], array('type' => 'checkbox'));\n endif;\n }", "title": "" }, { "docid": "84c2ecb0dad7b2627efeec517750415b", "score": "0.5163086", "text": "public static function validate_form($type) {\n switch (strtolower($type)) {\n case 'bio':\n $model = self::validate_bio();\n break;\n case 'image':\n $model = self::validate_image();\n break;\n case 'email':\n $model = self::validate_email();\n break;\n case 'password':\n $model = self::validate_password();\n break;\n default:\n $model = null;\n break;\n }\n\n return $model;\n }", "title": "" }, { "docid": "07aef00fc9e461e9aef3b796a59b60d6", "score": "0.5162693", "text": "public function getAuthFields()\n {\n $populate = function ($type, $config_fields) {\n $result = [];\n foreach ($config_fields as $fld_id => $fld_cfg) {\n if (empty($fld_cfg['used'])) {\n continue;\n }\n $field = waContactFields::get($fld_id, $type);\n if (!$field) {\n continue;\n }\n $field_data = $field->getInfo();\n $field_data['required'] = $fld_cfg['required'];\n $field_data['width'] = $fld_cfg['width'];\n $field_data['php_class'] = get_class($field);\n $result[$fld_id] = $field_data;\n }\n return $result;\n };\n\n $result = [];\n $type = $this['customer']['type'];\n if ($type == shopCheckoutConfig::CUSTOMER_TYPE_PERSON || $type == shopCheckoutConfig::CUSTOMER_TYPE_PERSON_AND_COMPANY) {\n $result[shopCheckoutConfig::CUSTOMER_TYPE_PERSON] = $populate(shopCheckoutConfig::CUSTOMER_TYPE_PERSON, $this['customer']['fields_person']);\n }\n if ($type == shopCheckoutConfig::CUSTOMER_TYPE_COMPANY || $type == shopCheckoutConfig::CUSTOMER_TYPE_PERSON_AND_COMPANY) {\n $result[shopCheckoutConfig::CUSTOMER_TYPE_COMPANY] = $populate(shopCheckoutConfig::CUSTOMER_TYPE_COMPANY, $this['customer']['fields_company']);\n }\n\n return $result;\n }", "title": "" }, { "docid": "fd5f8ff325c4760ac04d2df996de2037", "score": "0.51592743", "text": "public function render(string $type, string $fields)\n {\n $output = '';\n\n $items = $this->get($type, $fields);\n\n foreach ($items as $item) {\n $output .= view($item->view())->with($item->data())->render();\n }\n\n return $output;\n }", "title": "" } ]
5c67fe63a9a0972378666bc4f7dd1aba
Returns and execution backtrace as an array
[ { "docid": "b1ff715548b580b514e48292e9167162", "score": "0.62702155", "text": "final function getTrace();", "title": "" } ]
[ { "docid": "b942d755cf2c4bab7bd0c3162db0fb8d", "score": "0.7124179", "text": "function trace() {\n\t\t$trace = array();\n\t\tforeach (debug_backtrace() as $k => $v) {\n\t\t\tif (!$k) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$v['object'] = is_object($v['object']) ? get_class($v['object']) : null;\n\t\t\t$trace[$k - 1] = $v;\n\t\t}\n\t\treturn $trace;\n\t}", "title": "" }, { "docid": "7367ff3ca49e631bac9fee3f31b6a2f5", "score": "0.7091067", "text": "public function get_trace() : array\n {\n }", "title": "" }, { "docid": "4e7eefd3bd286ddbe07ed75237e63573", "score": "0.7079084", "text": "public static function backtrace() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::backtrace();\n\t}", "title": "" }, { "docid": "5f0060382247d636fbc583ac5d04a897", "score": "0.7022761", "text": "public function getDebugTrace()\n {\n $debug_backtrace = debug_backtrace();\n\n $trace = array();\n array_shift($debug_backtrace);\n foreach ($debug_backtrace as $entry) {\n $trace[] = (isset($entry['class']) ? $entry['class'] . '::' : '') . $entry['function'] . (isset($entry['line']) ? '; line: ' . $entry['line'] : '') . (isset($entry['file']) ? '; file: ' . str_replace('\\\\', '/', $entry['file']) : '');\n }\n\n return $trace;\n }", "title": "" }, { "docid": "a5e162ad73a24cab5520e5e14e8faaee", "score": "0.694793", "text": "public function get_backtrace() { return $this->getTraceAsString(); }", "title": "" }, { "docid": "59c9ba05f7a6478337beb37835195a74", "score": "0.6937308", "text": "public function get_debug_backtrace()\n {\n return debug_backtrace();\n }", "title": "" }, { "docid": "de786e76468ca0f8035c3382f165ec12", "score": "0.6816905", "text": "protected function getDebugBacktrace() {}", "title": "" }, { "docid": "43fef71c9e4b74946a574ccc6cec2b16", "score": "0.6812973", "text": "public function getBacktrace()\n {\n $backtrace = $this->get_debug_backtrace();\n\n $output = \"\";\n\n $count = 0;\n foreach ($backtrace as $line) {\n if ($count <= 1) {\n $count++;\n continue;\n }\n\n $output .= \"#{$count}: \";\n\n if (isset($line['type']) && $line['type'] != \"\") {\n $output .= $line['class'] . $line['type'];\n }\n\n $output .= $line['function'] . \"(...)\";\n $output .= \" [{$line['file']}#{$line['line']}\\r\\n\";\n\n $count++;\n }\n\n return $output;\n }", "title": "" }, { "docid": "0905b8360244af6c1c3624564e6e2a05", "score": "0.6789838", "text": "function getTrace(){\n\t$array = debug_backtrace();\n\tunset($array[0]);\n\t$html = '';\n\tforeach ($array as $row) {\n\t\tif (isset($row['file']) && isset($row['line']) && isset($row['function']))\n\t\t\t$html .= $row['file'] . ':' . $row['line'] . '行,调用方法:' . $row['function'] . \"\\n\";\n\t}\n\treturn $html;\n}", "title": "" }, { "docid": "a7d5d2bad5bf7299d0c6091b63bccaf3", "score": "0.67248034", "text": "public function getDebugTrace() {\n\t\t$trace = debug_backtrace();\n\t\t$i = 1;\n\t\twhile (isset($trace[$i]) and isset($trace[$i + 1]) and isset($trace[$i + 1]['class']) and ($trace[$i + 1]['class'] === 'Sy\\Db\\Gate')) ++$i;\n\t\t$res['class'] = isset($trace[$i + 1]['class']) ? $trace[$i + 1]['class'] : '';\n\t\t$res['function'] = isset($trace[$i + 1]['function']) ? $trace[$i + 1]['function'] : '';\n\t\t$res['file'] = $trace[$i]['file'];\n\t\t$res['line'] = $trace[$i]['line'];\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "73422ac682a68d4701cc635eefb2129b", "score": "0.6614133", "text": "public function getTrace()\n {\n $trace = debug_backtrace();\n foreach ($trace as $key => $item) {\n if (in_array($item[\"class\"], $this->excludeClasses)) {\n unset($trace[$key]);\n continue;\n }\n\n foreach ($this->excludedFiles as $className) {\n if (strpos($item[\"file\"], $className) !== false) {\n unset($trace[$key]);\n break;\n }\n }\n\n break;\n }\n\n return $trace;\n }", "title": "" }, { "docid": "8c3d56bb326b258aa3f0206738381541", "score": "0.6594652", "text": "public function getStackFrameList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "c88c162e6ae75fcc52bc75130aac3c92", "score": "0.65340406", "text": "private function lastReleventBacktrace(): array {\n $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n\n $current_file = $last_file = $backtrace[0]['file'];\n $i = 1;\n\n while (\n $current_file === $last_file\n || str_ends_with($backtrace[$i]['file'], 'DB.php')\n ) {\n $last_file = $backtrace[$i]['file'];\n $i++;\n }\n\n return $backtrace[$i];\n }", "title": "" }, { "docid": "e44e3f69af361cf1c9e5b53b90b35c81", "score": "0.6435989", "text": "public function getTrace();", "title": "" }, { "docid": "77dd38f648e535344a885f09b1b66853", "score": "0.64018303", "text": "public function get_transaction_backtrace() {\n\t\tif (!$this->debug_enabled) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn isset($this->debug_log['transactions']) ? $this->debug_log['transactions'] : [];\n\t}", "title": "" }, { "docid": "1b86485a3793a5abc4f0f93445e83d65", "score": "0.63849866", "text": "public function getStackTraces()\n {\n return $this->stack_traces;\n }", "title": "" }, { "docid": "99bc00c846b30ade6f6dd4ee38c1b2b1", "score": "0.6333069", "text": "public function getTraces(): array\n {\n return $this->traces;\n }", "title": "" }, { "docid": "1cf8634d2aa61d6d024695acc3752d43", "score": "0.6315768", "text": "function debug_print_backtrace2() {\n\t\t\techo \"<pre>\";\n\t\t\t$ar = debug_backtrace();\n\t\t\t//array_pop($ar);\n\t\t\tvar_dump($ar);\n\t\t\techo \"</pre>\";\n\t\t}", "title": "" }, { "docid": "1cf8634d2aa61d6d024695acc3752d43", "score": "0.6315768", "text": "function debug_print_backtrace2() {\n\t\t\techo \"<pre>\";\n\t\t\t$ar = debug_backtrace();\n\t\t\t//array_pop($ar);\n\t\t\tvar_dump($ar);\n\t\t\techo \"</pre>\";\n\t\t}", "title": "" }, { "docid": "f1edea687ccd8a4801b5569286853d16", "score": "0.62864053", "text": "function get_backtrace_list( $trace )\n\t{\n\t\tif ( !is_array( $trace ) && is_scalar( $trace ) )\n\t\t\treturn \"<div class='trace-error'>$trace</div>\";\n\n\t\t$ftrace = $this->prepare_backtrace( $trace );\n\n\t\t$d = array(\n\t\t\t'func' => '',\n\t\t\t'file' => '',\n\t\t\t'line' => '',\n\t\t\t'args' => array(),\n\t\t);\n\t\t$list = array();\n\n\t\tforeach ( $ftrace as $key => $t )\n\t\t{\n\t\t\t$t = array_merge( $d, $t );\n\n\t\t\t$lineclass = ( $key % 2 ) ? 'even' : 'odd';\n\t\t\t$args_html = !empty( $t['args'] )\n\t\t\t\t? sprintf(' <span class=\"args\">%s</span> ', implode(', ', $t['args']) )\n\t\t\t\t: '';\n\n\t\t\t$filemeta = $t['file'] ? \"<span class='file'>{$t['file']}</span> <span class='line'>{$t['line']}</span>\" : '';\n\n\t\t\t$line = <<<HTML\n\t\t\t<div class=\"trace $lineclass\">\n\t\t\t\t<div class=\"called\">{$t['func']}($args_html)</div>\n\t\t\t\t<div class='filemeta'>$filemeta</div>\n\t\t\t</div>\nHTML;\n\n\t\t\t$list[] = $line;\n\t\t}\n\n\t\treturn implode( $list );\n\t}", "title": "" }, { "docid": "29efd8559d6697efd5365a54c534e6b2", "score": "0.6284924", "text": "function getBacktrace($errline = 0)\n{\n $message = '';\n if (!function_exists('debug_backtrace')) {\n $message.= 'function debug_backtrace does not exists'.\"\\n\";\n }\n\n $debug_backtrace = debug_backtrace();\n array_shift($debug_backtrace);\n $message.= 'Debug backtrace:'.\"\\n\";\n\n foreach ($debug_backtrace as $trace_item) {\n $message.= \"\\t\" . ' @ ';\n if (!empty($trace_item['file'])) {\n $message.= basename($trace_item['file']) . ':' . $trace_item['line'];\n } else {\n $message.= '- PHP inner-code - ';\n }\n $message.= ' -- ';\n if (!empty($trace_item['class'])) {\n $message.= $trace_item['class'] . $trace_item['type'];\n }\n $message.= $trace_item['function'];\n\n if (!empty($trace_item['args']) && is_array($trace_item['args'])) {\n $args = array();\n foreach ($trace_item['args'] as $arg) {\n $args[] = is_scalar($arg) ? $arg : (is_object($arg) ? get_class($arg) : gettype($arg));\n }\n $message.= '('.implode(', ', $args).')';\n } else {\n $message.= '()';\n }\n $message.= \"\\n\";\n }\n\n return $message;\n}", "title": "" }, { "docid": "15ef24fe6cc8ead79ce373fd43fb6297", "score": "0.6262264", "text": "function get_html_trace()\n{\n $x = @ob_get_contents();\n cms_ob_end_clean();\n if (is_string($x)) {\n @print($x);\n }\n\n $bak = $GLOBALS['SUPPRESS_ERROR_DEATH'];\n $GLOBALS['SUPPRESS_ERROR_DEATH'] = true;\n\n $_trace = debug_backtrace();\n $trace = array();\n foreach ($_trace as $i => $stage) {\n $traces = array();\n //if (in_array($stage['function'], array('get_html_trace', 'composr_error_handler', 'fatal_exit'))) continue;\n $file = '';\n $line = '';\n $__value = mixed();\n foreach ($stage as $key => $__value) {\n if ($key == 'file') {\n $file = str_replace('\\'', '', $__value);\n } elseif ($key == 'line') {\n $line = strval($__value);\n }\n if ($key == 'args') {\n $_value = new Tempcode();\n foreach ($__value as $param) {\n if (!((is_array($param)) && (array_key_exists('GLOBALS', $param)))) { // Some versions of PHP give the full environment as parameters. This will cause a recursive issue when outputting due to GLOBALS->ENV chaining.\n if ((is_object($param) && (is_a($param, 'Tempcode'))) || (is_null($param))) {\n $__value = gettype($param);\n } else {\n @ob_start();\n var_export($param);\n $__value = ob_get_clean();\n }\n if (strlen($__value) < 3000) {\n $_value->attach(paragraph(escape_html($__value)));\n } else {\n $_value = make_string_tempcode(escape_html('...'));\n }\n }\n }\n } else {\n $value = mixed();\n if (is_float($__value)) {\n $value = float_format($__value);\n } elseif (is_integer($__value)) {\n $value = integer_format($__value);\n } else {\n $value = $__value;\n }\n\n if ((is_object($value) && (is_a($value, 'Tempcode'))) || (is_array($value) && (strlen(serialize($value)) > 100))) {\n $_value = make_string_tempcode(escape_html(gettype($value)));\n } else {\n @ob_start();\n var_export($value);\n $_value = make_string_tempcode(escape_html(ob_get_contents()));\n ob_end_clean();\n }\n }\n $traces[] = array('LINE' => $line, 'FILE' => $file, 'KEY' => ucfirst($key), 'VALUE' => $_value);\n }\n $trace[] = array('TRACES' => $traces);\n }\n\n $GLOBALS['SUPPRESS_ERROR_DEATH'] = $bak;\n\n return do_template('STACK_TRACE', array('_GUID' => 'da6c0ef0d8d793807d22e51555d73929', 'TRACE' => $trace, 'POST' => ''));\n}", "title": "" }, { "docid": "adaa4b1c901134fba27fd4f405d1afe7", "score": "0.62519705", "text": "function caller_stack($options=NULL) {\n $array = $options['array'];\n if($backtrace = debug_backtrace()) {\n array_shift($backtrace); // remove this function\n if($array) return array_find_key($backtrace, 'function');\n foreach($backtrace as $ar) {\n $files = explode('/', $ar['file']);\n $file = array_pop($files);\n $line = $ar['line'];\n $result[] = $ar['function'].\" ($file:$line) \";\n }\n }\n return implode(\" < \", $result);\n}", "title": "" }, { "docid": "cd50c7a47426ad7fefcb929d4d45b0e9", "score": "0.6245501", "text": "public function getException()\n {\n $backtrace = array();\n $trace = $this->exception->getTrace();\n foreach ($this->exception->getTrace() as $line) {\n if (!isset($line['file'])) {\n continue;\n }\n\n $backtrace[] = $line['file'].':'.$line['line'].' in `'.$line['function'].'`';\n }\n\n array_unshift($backtrace, $this->exception->getFile().':'.$this->exception->getLine());\n\n $exceptionClass = get_class($this->exception);\n\n return array(\n 'occurred_at' => date('c'),\n 'message' => $this->exception->getMessage(),\n 'backtrace' => $backtrace,\n 'exception_class' => $exceptionClass,\n );\n }", "title": "" }, { "docid": "844a968c59d3c52a712ea8103a72f9c8", "score": "0.62119406", "text": "public function getBacktrace($maxDepth = 10)\n {\n $result = [];\n\n foreach ($this->getRawBacktrace($maxDepth) as $trace) {\n $file = (isset($trace['file']) ? basename(substr($trace['file'], strlen(getcwd()) + 1)) : '');\n $function = (isset($trace['function']) ? $trace['function'] : '');\n if (isset($trace['class'])) {\n $class = explode(\"\\\\\", basename($trace['class']));\n $class = array_pop($class);\n $result[] = sprintf('%s:%d %s%s%s()', $file, isset($trace['line']) ? $trace['line'] : '', $class, $trace['type'], $function);\n } else {\n $result[] = $file . ':' . $trace['line'];\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "cb25e29d2cff3e192da48e0d5f34d6c1", "score": "0.6197743", "text": "public function getErrorStack() : array\n {\n return $this->errorStack;\n }", "title": "" }, { "docid": "77fa65da9a0f27992d181b33bd68bd7d", "score": "0.614399", "text": "public function getRawBacktrace($maxDepth = 10)\n {\n $backtrace = debug_backtrace(0);\n $result = [];\n foreach ($backtrace as $trace) {\n if (in_array($trace['function'], ['__call', '__callStatic', 'call_user_func', 'call_user_func_array']) or !isset($trace['line'])) {\n continue;\n }\n if (isset($trace['file'])) {\n if (!empty($this->excludeDirs)) {\n foreach ($this->excludeDirs as $dir) {\n if (strpos($trace['file'], $dir) === 0) {\n continue 2;\n }\n }\n }\n if (!empty($this->includeDirs)) {\n $match = false;\n foreach ($this->includeDirs as $dir) {\n if (strpos($trace['file'], $dir) === 0) {\n $match = true;\n }\n }\n\n if (!$match) {\n continue;\n }\n }\n }\n $result[] = $trace;\n if (--$maxDepth == 0) {\n break;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "fb3c45293772619f2146e8c2994ca081", "score": "0.6115468", "text": "public function getStackTrace()\n\t{\n\t\treturn (!empty($this->_trace)) ? $this->_trace : $this->getTrace();\n\t}", "title": "" }, { "docid": "c3d576d1587b3a0a8a67fba258bd96c2", "score": "0.608341", "text": "function getTrace()\n\t{\n\t\tif (isset( $this ) && isset( $this->backtrace )) {\n\t\t\t$trace = &$this->backtrace;\n\t\t} else {\n\t\t\t$trace = function_exists( 'debug_backtrace' ) ? debug_backtrace() : null;\n\t\t}\n\n\t\treturn $trace;\n\t}", "title": "" }, { "docid": "89e8a464e043fdf439f7f374a5a24cf4", "score": "0.6044308", "text": "private static function _getCalleeInfo($trace)\n {\n $previousCaller = array();\n $miniTrace = array();\n $prevStep = array();\n\n // go from back of trace to find first occurrence of call to Sage or its wrappers\n while ($step = array_pop($trace)) {\n if (SageHelper::stepIsInternal($step)) {\n $previousCaller = $prevStep;\n break;\n }\n\n if (isset($step['file'], $step['line'])) {\n unset($step['object'], $step['args']);\n array_unshift($miniTrace, $step);\n }\n\n $prevStep = $step;\n }\n $callee = $step;\n\n if (! isset($callee['file']) || ! is_readable($callee['file'])) {\n return array(null, null, $callee, $previousCaller, $miniTrace);\n }\n\n // open the file and read it up to the position where the function call expression ended\n $file = fopen($callee['file'], 'r');\n $line = 0;\n $source = '';\n while (($row = fgets($file)) !== false) {\n if (++$line > $callee['line']) {\n break;\n }\n $source .= $row;\n }\n fclose($file);\n $source = self::_removeAllButCode($source);\n\n if (empty($callee['class'])) {\n $codePattern = $callee['function'];\n } else {\n if ($callee['type'] === '::') {\n $codePattern = $callee['class'].\"\\x07*\".$callee['type'].\"\\x07*\".$callee['function'];;\n } else /*if ( $callee['type'] === '->' )*/ {\n $codePattern = \".*\\x07*\".$callee['type'].\"\\x07*\".$callee['function'];;\n }\n }\n\n // get the position of the last call to the function\n preg_match_all(\"\n [\n # beginning of statement\n [\\x07{(]\n\n # search for modifiers (group 1)\n ([-+!@~]*)?\n\n # spaces\n \\x07*\n\n # check if output is assigned to a variable (group 2) todo: does not detect concat\n (\n \\\\$[a-z0-9_]+ # variable\n \\x07*\\\\.?=\\x07* # assignment\n )?\n\n # possibly a namespace symbol\n \\\\\\\\?\n\n\t\t\t# spaces again\n \\x07*\n\n # main call to Sage\n ({$codePattern})\n\n\t\t\t# spaces everywhere\n \\x07*\n\n # find the character where Sage's opening bracket resides (group 3)\n (\\\\()\n\n ]ix\",\n $source,\n $matches,\n PREG_OFFSET_CAPTURE\n );\n\n $modifiers = end($matches[1]);\n $assignment = end($matches[2]);\n $callToSage = end($matches[3]);\n $bracket = end($matches[4]);\n\n if (empty($callToSage)) {\n // if a wrapper is misconfigured, don't display the whole file as variable name\n return array(array(), $modifiers, $callee, $previousCaller, $miniTrace);\n }\n\n $modifiers = $modifiers[0];\n if ($assignment[1] !== -1) {\n $modifiers .= '@';\n }\n\n $paramsString = preg_replace(\"[\\x07+]\", ' ', substr($source, $bracket[1] + 1));\n // we now have a string like this:\n // <parameters passed>); <the rest of the last read line>\n\n // remove everything in brackets and quotes, we don't need nested statements nor literal strings which would\n // only complicate separating individual arguments\n $c = strlen($paramsString);\n $inString = $escaped = $openedBracket = $closingBracket = false;\n $i = 0;\n $inBrackets = 0;\n $openedBrackets = array();\n\n while ($i < $c) {\n $letter = $paramsString[$i];\n\n if (! $inString) {\n if ($letter === '\\'' || $letter === '\"') {\n $inString = $letter;\n } elseif ($letter === '(' || $letter === '[') {\n $inBrackets++;\n $openedBrackets[] = $openedBracket = $letter;\n $closingBracket = $openedBracket === '(' ? ')' : ']';\n } elseif ($inBrackets && $letter === $closingBracket) {\n $inBrackets--;\n array_pop($openedBrackets);\n $openedBracket = end($openedBrackets);\n $closingBracket = $openedBracket === '(' ? ')' : ']';\n } elseif (! $inBrackets && $letter === ')') {\n $paramsString = substr($paramsString, 0, $i);\n break;\n }\n } elseif ($letter === $inString && ! $escaped) {\n $inString = false;\n }\n\n // replace whatever was inside quotes or brackets with untypeable characters, we don't\n // need that info. We'll later replace the whole string with '...'\n if ($inBrackets > 0) {\n if ($inBrackets > 1 || $letter !== $openedBracket) {\n $paramsString[$i] = \"\\x07\";\n }\n }\n if ($inString) {\n if ($letter !== $inString || $escaped) {\n $paramsString[$i] = \"\\x07\";\n }\n }\n\n $escaped = ! $escaped && ($letter === '\\\\');\n $i++;\n }\n\n // by now we have an un-nested arguments list, lets make it to an array for processing further\n $arguments = explode(',', preg_replace(\"[\\x07+]\", '...', $paramsString));\n\n // test each argument whether it was passed literary or was it an expression or a variable name\n $parameters = array();\n $blacklist = array('null', 'true', 'false', 'array(...)', 'array()', '\"...\"', '[...]', 'b\"...\"',);\n foreach ($arguments as $argument) {\n $argument = trim($argument);\n\n if (is_numeric($argument)\n || in_array(str_replace(\"'\", '\"', strtolower($argument)), $blacklist, true)\n ) {\n $parameters[] = null;\n } else {\n $parameters[] = $argument;\n }\n }\n\n return array($parameters, $modifiers, $callee, $previousCaller, $miniTrace);\n }", "title": "" }, { "docid": "f68120200d4c4dc8b37e0f4d808a40c8", "score": "0.60362303", "text": "private function getCallerInfo()\n {\n $callerInfo = array();\n $backtrace = \\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 13);\n foreach ($backtrace as $i => $frame) {\n $method = $frame['class'] . '::' . $frame['function'];\n if (\\in_array($method, array('CLogger::log', 'YiiBase::log'), true) === false) {\n continue;\n }\n $callerInfo = $frame;\n // check if log called by some other wrapper method\n if (\\in_array($backtrace[$i + 1]['function'], array('log', 'error', 'warn', 'warning'), true)) {\n $callerInfo = $backtrace[$i + 1];\n }\n break;\n }\n return $callerInfo;\n }", "title": "" }, { "docid": "9c25c55338f5767de58b80945e7fcfb6", "score": "0.6015785", "text": "public static function caller_backtrace() {\n return static::protected_caller_backtrace();\n }", "title": "" }, { "docid": "958f4160d089a4c2fbd698410442ac0d", "score": "0.6007715", "text": "public function get_caller():array;", "title": "" }, { "docid": "d10018d3624b5d398510c2ec32bd22d6", "score": "0.593056", "text": "function get_backtrace($html = false, $skip=0)\n{\n\t$str = '';\n\tif ($html) $str .= '<table border=0>';\n\t$trace = debug_backtrace();\n\n\tforeach($trace as $trn => $tr) {\n\t\tif ($trn <= $skip) continue;\n\t\tif ($html) $str .= '<tr><td>';\n\t\t$str .= $tr['file'].':'.$tr['line'].': ';\n\t\tif ($html) $str .= '</td><td>';\n\t\tif (isset($tr['type'])) {\n\t \t\tif($tr['type'] == '::') {\n\t\t\t\t$str .= $tr['class'].'::';\n\t\t\t} else if($tr['type'] == '->') {\n\t\t\t\t$str .= '('.$tr['class'].' Object)'.'->';\n\t\t\t}\n\t\t}\n\t\t$str .= $tr['function'].'(';\n\t\t\n\t\tif(is_array($tr['args'])) {\n\t\t\t$args = array();\n\t\t\tforeach($tr['args'] as $n=>$a) {\n\t\t\t\tif (is_object($tr['args'][$n]))\n\t\t\t\t\t$args[$n] = \"(\".get_class($tr['args'][$n]).\" Object)\";\n\t\t\t\telseif (is_array($tr['args'][$n]))\n\t\t\t\t\t$args[$n] = \"(Array[\".count($tr['args'][$n]).\"])\";\n\t\t\t\telse\n\t\t\t\t\t$args[$n] = \"'\".$tr['args'][$n].\"'\";\n\t\t\t}\n\t\t\t$str .= implode(',',$args);\n\t\t}\n\t\t$str .= ')</td>';\n\t}\n\n\tif ($html) $str .= '</tr></table>';\n\treturn $str;\n}", "title": "" }, { "docid": "629cccd29a25f2ab7a2570b3b177b4bd", "score": "0.5920985", "text": "function print_parsed_backtrace() {\r\n\t$backtrace = debug_backtrace();\r\n\t\r\n\tfor($i = 1, $j = count($backtrace); $i < $j; $i++) {\r\n\t\t$frame = $backtrace[$i];\r\n\t\t\r\n\t\tif(isset($frame['class'])) {\r\n\t\t\t$function = $frame['class'] . $frame['type'] . $frame['function'];\r\n\t\t} else {\r\n\t\t\t$function = $frame['function'];\r\n\t\t}\r\n\t\t\r\n\t\tprint $function . '()';\r\n\t\t\r\n\t\tif($i != ($j - 1)) {\r\n\t\t\tprint ', ';\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "2ec96b9052c2306e67435fa461fed97b", "score": "0.5919319", "text": "private static function getCallerLine($levels = 2)\n {\n $bt = debug_backtrace();\n\n $file = isset($bt[$levels]['file']) ? $bt[$levels]['file'] : '';\n $line = isset($bt[$levels]['line']) ? $bt[$levels]['line'] : '';\n\n return array($file, $line);\n }", "title": "" }, { "docid": "466668b5c1ef164707a3b4356dc64e44", "score": "0.5909221", "text": "public static function printBackTrace()\n {\n echo '<table>';\n echo '<th style=\"background-color: rgba(255,255,0,0.1); border:1px solid; font-weight: bold; padding: 5px;\">File</th>';\n echo '<th style=\"background-color: rgba(255,255,0,0.1); border:1px solid; font-weight: bold; padding: 5px;\">Function</th>';\n echo '<th style=\"background-color: rgba(255,255,0,0.1); border:1px solid; font-weight: bold; padding: 5px;\">Line</th>';\n\n foreach (debug_backtrace() as $backTrace) {\n $fileName = str_replace(__DIR__ . '/', '', $backTrace['file']);\n echo '<tr>';\n echo '<td onclick=\"let selection = window.getSelection();\n let range = document.createRange();\n range.selectNodeContents(this);\n selection.removeAllRanges();\n selection.addRange(range);\n execCommand(\\'copy\\');\"\n style=\"\n background-color: rgba(0,0,0,0.05);\n padding: 5px;\n border:1px solid;\"\n >'\n . $fileName\n . '</td>';\n echo '<td style=\"background-color: rgba(0,0,0,0.05); padding: 5px; border:1px solid;\">' . $backTrace['function'] . '</td>';\n echo '<td style=\"background-color: rgba(0,0,0,0.05); padding: 5px; border:1px solid;\"> #' . $backTrace['line'] . '</td>';\n echo '</tr>';\n }\n echo '</table>';\n exit;\n }", "title": "" }, { "docid": "319f5c8adcb76d677cc4904b106c4f04", "score": "0.5903898", "text": "protected static function protected_caller_backtrace() {\n $backtraces = debug_backtrace(@DEBUG_BACKTRACE_IGNORE_ARGS);\n\n $caller_backtrace = $backtraces[2];\n\n return $caller_backtrace;\n\n }", "title": "" }, { "docid": "2cd2b803deba2814f328e639716548c5", "score": "0.58889514", "text": "protected function seek_trace() {\n $e = new Exception();\n $trace = $e->getTrace();\n\n // Remove first (here !), second (known in dmllib) and third (db call).\n\n $t = array_shift($trace);\n while (preg_match('/perflib|moodle_database|moodlelib/', @$t['file'])) {\n $t = array_shift($trace);\n }\n\n return array_shift($trace);\n }", "title": "" }, { "docid": "4e2305650a1bc1830cec05c6bb1181aa", "score": "0.58885974", "text": "protected function getStackTrace(): string {\n $frames = $this->getInspector()->getFrames();\n\n $stacktrace = '';\n foreach ($frames as $index => $frame) {\n /* @var Frame $frame */\n $stacktrace .= sprintf(\"#%-3d <%s:%d>\\t%s::%s(%s)\\n\",\n count($frames) - $index - 1, $frame->getFile(), $frame->getLine(), $frame->getClass(),\n $frame->getFunction(), $this->getFunctionArgs($frame)\n );\n }\n return $stacktrace;\n }", "title": "" }, { "docid": "1dc9cb62c69ff28975d6288b48713333", "score": "0.5864368", "text": "function getBacktrace($frame = null)\n {\n if (defined('PEAR_IGNORE_BACKTRACE')) {\n return null;\n }\n if ($frame === null) {\n return $this->backtrace;\n }\n return $this->backtrace[$frame];\n }", "title": "" }, { "docid": "de8fbd5ab17486305347470794845727", "score": "0.5829547", "text": "public static function getLastExecutedLines($length = NULL) {\r\n\t\t$dbgTrace = debug_backtrace();\r\n\t\t\r\n\t\tif($length == NULL) {\r\n\t\t\t$length = count($dbgTrace);\r\n\t\t} else {\r\n\t\t\t$length = min($length + 1, count($dbgTrace));\r\n\t\t}\r\n\t\t\r\n\t\t$lines = array();\r\n\t\tfor($dbgIndex = 1; $dbgIndex < $length; $dbgIndex++) {\r\n\t\t\t$dbgInfo = $dbgTrace[$dbgIndex];\r\n\t\t\t\r\n\t\t\t$lines[] = array('line' => $dbgInfo['line'],\r\n\t\t\t\t\t\t\t 'file' => $dbgInfo['file']);\r\n\t\t}\r\n\t\treturn $lines;\r\n\t}", "title": "" }, { "docid": "33dfa9d0bd1aefd048458e9fc9bbbd29", "score": "0.58217025", "text": "public function getTraceAsString();", "title": "" }, { "docid": "33dfa9d0bd1aefd048458e9fc9bbbd29", "score": "0.58217025", "text": "public function getTraceAsString();", "title": "" }, { "docid": "33dfa9d0bd1aefd048458e9fc9bbbd29", "score": "0.58217025", "text": "public function getTraceAsString();", "title": "" }, { "docid": "f7a54c705b4ee071111e198d364b2d76", "score": "0.58205664", "text": "public function debugStack(): array\n {\n $fn = static function ($mw) {\n return \\sprintf(\n '[<%s: resource %s>, %s]',\n Types::getClassOrType($mw[0]),\n \\md5(\\spl_object_hash($mw[0])),\n isset($mw[1]) ? \\sprintf('\"%s\"', $mw[1]) : 'null'\n );\n };\n\n return [\n 'html' => \\array_map($fn, $this->stack['html']),\n 'json' => \\array_map($fn, $this->stack['json']),\n 'xml' => \\array_map($fn, $this->stack['xml']),\n ];\n }", "title": "" }, { "docid": "38fb6f09bd3d350b5b1be874be844c55", "score": "0.5767223", "text": "function generate_backtrace()\r\n\t{\r\n\t\t$backtrace = '';\r\n\t\tif(function_exists(\"debug_backtrace\"))\r\n\t\t{\r\n\t\t\t$trace = debug_backtrace();\r\n\t\t\t$backtrace = \"<table style=\\\"width: 100%; margin: 10px 0; border: 1px solid #aaa; border-collapse: collapse; border-bottom: 0;\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" border=\\\"0\\\">\\n\";\r\n\t\t\t$backtrace .= \"<thead><tr>\\n\";\r\n\t\t\t$backtrace .= \"<th style=\\\"border-bottom: 1px solid #aaa; background: #ccc; padding: 4px; text-align: left; font-size: 11px;\\\">File</th>\\n\";\r\n\t\t\t$backtrace .= \"<th style=\\\"border-bottom: 1px solid #aaa; background: #ccc; padding: 4px; text-align: left; font-size: 11px;\\\">Line</th>\\n\";\r\n\t\t\t$backtrace .= \"<th style=\\\"border-bottom: 1px solid #aaa; background: #ccc; padding: 4px; text-align: left; font-size: 11px;\\\">Function</th>\\n\";\r\n\t\t\t$backtrace .= \"</tr></thead>\\n<tbody>\\n\";\r\n\r\n\t\t\t// Strip off this function from trace\r\n\t\t\tarray_shift($trace);\r\n\r\n\t\t\tforeach($trace as $call)\r\n\t\t\t{\r\n\t\t\t\tif(empty($call['file'])) $call['file'] = \"[PHP]\";\r\n\t\t\t\tif(empty($call['line'])) $call['line'] = \"&nbsp;\";\r\n\t\t\t\tif(!empty($call['class'])) $call['function'] = $call['class'].$call['type'].$call['function'];\r\n\t\t\t\t$call['file'] = str_replace(MYBB_ROOT, \"/\", $call['file']);\r\n\t\t\t\t$backtrace .= \"<tr>\\n\";\r\n\t\t\t\t$backtrace .= \"<td style=\\\"font-size: 11px; padding: 4px; border-bottom: 1px solid #ccc;\\\">{$call['file']}</td>\\n\";\r\n\t\t\t\t$backtrace .= \"<td style=\\\"font-size: 11px; padding: 4px; border-bottom: 1px solid #ccc;\\\">{$call['line']}</td>\\n\";\r\n\t\t\t\t$backtrace .= \"<td style=\\\"font-size: 11px; padding: 4px; border-bottom: 1px solid #ccc;\\\">{$call['function']}</td>\\n\";\r\n\t\t\t\t$backtrace .= \"</tr>\\n\";\r\n\t\t\t}\r\n\t\t\t$backtrace .= \"</tbody></table>\\n\";\r\n\t\t}\r\n\t\treturn $backtrace;\r\n\t}", "title": "" }, { "docid": "7d001860fb1c24a37ee98b3b41e5ef9b", "score": "0.5765465", "text": "final function getTraceAsString();", "title": "" }, { "docid": "2689cd35957b36956bbfc070cad463d2", "score": "0.5741525", "text": "public function printBackTrace()\n {\n fprintf($this->traceFile, \"%s [\", $this->tracePrompt);\n if (!empty($this->backtrace)) {\n $last = count($this->backtrace) - 1;\n $display = $last - 4;\n for ($i = 0; $i < $last; $i ++) {\n fprintf($this->traceFile, \" %s\", $this->backtrace[$i][0]);\n if ($i > $display) {\n fprintf($this->traceFile, \"('%s')\", $this->truncateText($this->backtrace[$i][1]));\n }\n }\n fprintf($this->traceFile, \"][%s('%s')\", $this->backtrace[$last][0], $this->truncateText($this->backtrace[$last][1]));\n return $last;\n }\n return null;\n }", "title": "" }, { "docid": "1ff1631b5b9744162e72abb7987a015d", "score": "0.57362765", "text": "static protected function getTraces($exception, $format = 'txt')\n {\n $traceData = $exception->getTrace();\n array_unshift($traceData, array(\n 'function' => '',\n 'file' => $exception->getFile() != null ? $exception->getFile() : null,\n 'line' => $exception->getLine() != null ? $exception->getLine() : null,\n 'args' => array(),\n ));\n\n $traces = array();\n if ($format == 'html')\n {\n $lineFormat = 'at <strong>%s%s%s</strong>(%s)<br />in <em>%s</em> line %s <a href=\"#\" onclick=\"toggle(\\'%s\\'); return false;\">...</a><br /><ul class=\"code\" id=\"%s\" style=\"display: %s\">%s</ul>';\n }\n else\n {\n $lineFormat = 'at %s%s%s(%s) in %s line %s';\n }\n\n for ($i = 0, $count = count($traceData); $i < $count; $i++)\n {\n $line = isset($traceData[$i]['line']) ? $traceData[$i]['line'] : null;\n $file = isset($traceData[$i]['file']) ? $traceData[$i]['file'] : null;\n $args = isset($traceData[$i]['args']) ? $traceData[$i]['args'] : array();\n $traces[] = sprintf($lineFormat,\n (isset($traceData[$i]['class']) ? $traceData[$i]['class'] : ''),\n (isset($traceData[$i]['type']) ? $traceData[$i]['type'] : ''),\n $traceData[$i]['function'],\n self::formatArgs($args, false, $format),\n self::formatFile($file, $line, $format, null === $file ? 'n/a' : sfDebug::shortenFilePath($file)),\n null === $line ? 'n/a' : $line,\n 'trace_'.$i,\n 'trace_'.$i,\n $i == 0 ? 'block' : 'none',\n self::fileExcerpt($file, $line)\n );\n }\n\n return $traces;\n }", "title": "" }, { "docid": "1b23361d019d7574beb9371c29894ac5", "score": "0.5723303", "text": "public function getFault()\n {\n if ($this->fault) {\n $org = $this->fault->getTrace()[1];\n return [\n 'fault' => [\n 'message' => $this->fault->getMessage(),\n 'caller' => $org['file'] .':' .$org['line'],\n ],\n ];\n }\n }", "title": "" }, { "docid": "7fc9170e709c04ab9010e3c03c36626b", "score": "0.57052046", "text": "protected function returnStackTrace() {\n\t\ttry {\n\t\t\tthrow new \\Exception();\n\t\t} catch (\\Exception $e) {\n\t\t\treturn $e->getTrace();\n\t\t}\n\t}", "title": "" }, { "docid": "19e5820e2066e2f96b127a0aa5165fe8", "score": "0.5676142", "text": "public function dumpBacktrace(array $backtrace)\n {\n $index = 0;\n $output = '';\n while ($backtrace) {\n $item = array_pop($backtrace);\n $file = isset($item['file']) ? $item['file'] : '';\n $line = isset($item['line']) ? $item['line'] : '';\n\n if (strpos($file, '(')) {\n $start = strpos($file, '(');\n $end = strpos($file, ')');\n $line = trim(substr($file, $start + 1, $end - $start - 1));\n $file = trim(substr($file, 0, $start));\n }\n\n $function = '';\n if (isset($item['function'])) {\n $function = isset($item['class']) ? $item['class'] . $item['type'] . $item['function'] : $item['function'];\n }\n\n $args = array();\n if (isset($item['args']) && is_array($item['args'])) {\n foreach ($item['args'] as $arg) $args[] = gettype($arg);\n }\n $args = implode(', ', $args);\n\n if ($file) {\n $output .= sprintf('#%s %s(%s) at %s(%s)%s', $index, $function, $args, $file, $line, PHP_EOL);\n } else {\n $output .= sprintf('#%s %s(%s)%s', $index, $function, $args, PHP_EOL);\n }\n\n $index++;\n }\n\n return $output;\n }", "title": "" }, { "docid": "5a27107cd4e4cf856398fc4877e3a30b", "score": "0.5675781", "text": "function getTraceAsString( )\n\t{\n\t\t//Get the trace array\n\t\t$trace = JException::getTrace();\n\n\t\t$result = '';\n\t\tforeach ($trace as $back)\n\t\t{\n\t\t\tif (isset($back['file']) && strpos($back['file'], 'error.php') === false) {\n\t\t\t\t$result .= '<br />'.$back['file'].':'.$back['line'];\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "9bba9669e6065faf040cb1bb4f5dc8fd", "score": "0.5664857", "text": "protected function _get_backtrace_string( )\n\t{\n\t\t$trace = debug_backtrace(false);\n\n\t\t$root_dir = (defined('ROOT_DIR')) ? ROOT_DIR : '';\n\n\t\t// ignore the first two entries of the backtrace array\n\t\t// (this method, and the self::write method)\n\t\t$output = '';\n\t\tfor ($i = 2, $count = count($trace); $i < $count; ++$i) {\n\t\t\t$index = $i - 2;\n\t\t\t$cur = $trace[$i];\n\n\t\t\t$file = '';\n\t\t\tif ( ! empty($cur['file'])) {\n\t\t\t\t$file = ' '.DIRECTORY_SEPARATOR.str_replace($root_dir, '', $cur['file']);\n\t\t\t}\n\n\t\t\t$line = '';\n\t\t\tif ( ! empty($cur['line'])) {\n\t\t\t\t$line = ' ('.$cur['line'].')';\n\t\t\t}\n\n\t\t\t$func = $cur['function'];\n\t\t\tif ( ! empty($cur['class'])) {\n\t\t\t\t$func = $cur['class'].$cur['type'].$func;\n\t\t\t}\n\n\t\t\t$args = ' ';\n\t\t\tif ( ! empty($cur['args'])) {\n\t\t\t\t$args = var_export($cur['args'], true);\n\t\t\t\t$args = preg_replace('/\\r?\\n/', \"\\n\\t\\t\\t\\t\", $args);\n\t\t\t}\n\n\t\t\t$output .= \"\\t\\t\\t#{$index}{$file}{$line}: {$func}({$args})\\n\";\n\t\t}\n\n\t\treturn substr($output, 0, -1);\n\t}", "title": "" }, { "docid": "3cbce6426382e4305ce007f70e52ced8", "score": "0.5651603", "text": "public function findArguments(): array\n {\n $arguments = [];\n if ('phpdbg' === PHP_SAPI)\n {\n $arguments[] = '-qrr';\n }\n\n return $arguments;\n }", "title": "" }, { "docid": "abfa4cbf7cd3a5771842710aeb5cc5ac", "score": "0.564905", "text": "protected function getSafeTrace(\\Exception $exception)\n {\n if (!$this->app['debug'] && !($this->app['session']->isStarted() && $this->app['session']->has('authentication'))) {\n return [];\n }\n\n $rootPath = $this->app['resources']->getPath('root');\n $trace = $exception->getTrace();\n foreach ($trace as $key => $value) {\n $trace[$key]['args_safe'] = $this->getSafeArguments($trace[$key]['args']);\n\n // Don't display the full path, trim 64-char hexadecimal file names.\n if (isset($trace[$key]['file'])) {\n $trace[$key]['file'] = str_replace($rootPath, '[root]', $trace[$key]['file']);\n $trace[$key]['file'] = preg_replace('/([0-9a-f]{16})[0-9a-f]{48}/i', '\\1…', $trace[$key]['file']);\n }\n }\n\n return $trace;\n }", "title": "" }, { "docid": "62a4b223baf02ca1c3978e231bc954d6", "score": "0.5647244", "text": "public function getOriginalTraceAsString(): string;", "title": "" }, { "docid": "f06b0697ee7b26f7fe494063e0221902", "score": "0.5646173", "text": "protected function debugStringBacktrace()\n {\n $trace = '';\n $count = 0;\n // format backtrace\n foreach (debug_backtrace() as $item) {\n // ignore current file form backtrace\n if (isset($item['file']) && $item['file'] === __FILE__) {\n continue;\n }\n\n // prepare args\n $args = '';\n\n // check args\n if (!isset($item['args'])) {\n $item['args'] = array();\n }\n\n // format arguments, if there is any\n if (0 < count($item['args'])) {\n foreach ($item['args'] as $a) {\n switch (true) {\n case is_array($a):\n $args .= 'Array';\n break;\n case is_object($a):\n $args .= get_class($a);\n break;\n case is_bool($a):\n $args .= ( true === $a ? 'true' : 'false');\n break;\n case is_numeric($a):\n $args .= $a;\n break;\n case is_null($a):\n $args .= 'NULL';\n break;\n case is_string($a):\n $args .= \"'\" . $a . \"'\";\n break;\n\n default:\n $args .= gettype($a);\n break;\n }\n $args .= ',';\n }\n }\n\n $trace .= sprintf(\n '#%d %s(%s): %s%s(%s)%s',\n $count,\n (isset($item['file']) ? $item['file'] : ''),\n (isset($item['line']) ? $item['line'] : ''),\n (isset($item['class']) ? $item['class'] . $item['type'] : ''),\n (isset($item['function']) ? $item['function'] : '' ),\n trim($args, ','),\n PHP_EOL\n );\n\n $count++;\n }\n\n return $trace;\n }", "title": "" }, { "docid": "a6dd07223dc8f1997977127e73884ce5", "score": "0.5641648", "text": "public function getCaller():array { return $this->caller; }", "title": "" }, { "docid": "b5444bf74a006aaa2006dd7b6cda3385", "score": "0.5630199", "text": "public function getArray()\n\t{\n\t\treturn $this->_namespace->trail;\n\t}", "title": "" }, { "docid": "50e983aa8753554f9df7f16f81f1f565", "score": "0.5612371", "text": "public function getTrace()\n {\n return $this->get('trace');\n }", "title": "" }, { "docid": "952880eff3584db4de91d9ab7faa12dc", "score": "0.56078494", "text": "static function get_stack_trace($start_trace_index=0,$trace=array()) {\t\n\t\t\t\n\t\t\t$trace = $trace ? $trace : debug_backtrace();\n\t\t\t\n\t\t\tarray_shift($trace);\n\t\t\t\n\t\t\t$traces = array();\n\t\t\t\n\t\t\tfor($index=$start_trace_index;$index<count($trace);$index++) {\n\t\t\t\t\n\t\t\t\t$backtrace = get_value($trace,$index);\n\t\t\t\t\n\t\t\t\t$arguments = get_value($backtrace,\"args\",array());\t\t\t\t\n\t\t\t\t\n\t\t\t\t$function_arguments = array();\n\n\t\t\t\tforeach($arguments as $argument) {\n\n\t\t\t\t\t$type = gettype($argument);\n\t\t\t\t\t\n\t\t\t\t\tif($type==\"integer\" || $type==\"double\")\n\t\t\t\t\t\t$function_arguments[] = $argument;\n\t\t\t\t\t\t\n\t\t\t\t\telseif($type==\"string\") {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$argument = htmlspecialchars(STRING_UTIL::get_dot_dot_dot_string($argument,64));\n\t\t\t\t\t\t$function_arguments[] = '\"'.str_replace(\"\\\\\",\"/\",$argument).'\"';\n\t\t\t\t\t\n\t\t\t\t\t} elseif($type==\"array\")\n\t\t\t\t\t\t$function_arguments[] = \"Array(\".count($argument).\")\";\n\t\t\t\t\t\n\t\t\t\t\telseif($type==\"object\")\n\t\t\t\t\t\t$function_arguments[] = 'Object('.get_class($argument).\")\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\telseif($type==\"resource\")\n\t\t\t\t\t\t$function_arguments[] = \"Resource(\".$argument.\")\";\n\t\t\t\t\t\n\t\t\t\t\telseif($type==\"boolean\")\n\t\t\t\t\t\t$function_arguments[] = $argument ? \"True\" : \"False\";\n\t\t\t\t\t\n\t\t\t\t\telseif($type==\"NULL\")\n\t\t\t\t\t\t$function_arguments[] = \"null\";\n\t\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t\t$function_arguments[] = \"Unknown\";\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$filename \t= get_value($backtrace,\"file\",\"N/A\");\n\t\t\t\t$filename \t= str_replace(\"\\\\\",\"/\",$filename);\n\t\t\t\t$line_number \t= get_value($backtrace,\"line\");\n\t\t\t\t$class \t\t= get_value($backtrace,\"class\");\n\t\t\t\t$function \t= get_value($backtrace,\"function\");\n\t\t\t\t$type \t\t= get_value($backtrace,\"type\");\n\t\t\t\t\n\t\t\t\t$traces[] = array(\"line_number\"=>$line_number,\"file\"=>$filename,\"class\"=>$class,\"type\"=>$type,\"function\"=>$function,\"function_arguments\"=>$function_arguments);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t \treturn $traces;\n\t\t}", "title": "" }, { "docid": "687628e55150ae815a53ef5b05adbafb", "score": "0.560455", "text": "private static function getTextBackTrace($backtrace)\n {\n $str = '';\n\n foreach ($backtrace as $step) {\n if ($step['function'] != 'getTextBackTrace' && $step['function'] != 'handle_error') {\n if (isset($step['file']) && isset($step['line'])) {\n $str .= 'In '.$step['file'].' at line '.$step['line'].': ';\n }\n if (isset($step['class']) && isset($step['type']) && isset($step['function'])) {\n $str .= $step['class'].$step['type'].$step['function'].'(';\n }\n\n if (is_array($step['args'])) {\n $drawn = false;\n $params = '';\n foreach ($step['args'] as $param) {\n $params .= self::getPhpVariableAsText($param);\n //$params .= var_export($param, true);\n $params .= ', ';\n $drawn = true;\n }\n $str .= $params;\n if ($drawn == true) {\n $str = substr($str, 0, strlen($str) - 2);\n }\n }\n $str .= ')';\n $str .= \"\\n\";\n }\n }\n\n return $str;\n }", "title": "" }, { "docid": "cde05671d84b8fe4653bc9357a5a823b", "score": "0.55480534", "text": "public static function trace(array $trace = NULL)\n\t{\n\t\tif ($trace === NULL)\n\t\t{\n\t\t\t// Start a new trace\n\t\t\t$trace = debug_backtrace();\n\t\t}\n\n\t\t// Non-standard function calls\n\t\t$statements = array('include', 'include_once', 'require', 'require_once');\n\n\t\t$output = array();\n\t\tforeach ($trace as $step)\n\t\t{\n\t\t\tif ( ! (isset($step['function']) AND isset($step['file'])))\n\t\t\t{\n\t\t\t\t// Ignore this line, it has unusable data\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Set the function name\n\t\t\t$function = $step['function'];\n\n\t\t\t// Set the file and line\n\t\t\t$file = self::debug_path($step['file']);\n\t\t\t$line = $step['line'];\n\n\t\t\tif (isset($step['class']))\n\t\t\t{\n\t\t\t\t// Change the function to a method\n\t\t\t\t$function = $step['class'].$step['type'].$function;\n\t\t\t}\n\n\t\t\tif (isset($step['args']))\n\t\t\t{\n\t\t\t\tif (in_array($function, $statements))\n\t\t\t\t{\n\t\t\t\t\t// Sanitize the path name\n\t\t\t\t\t$function .= ' '.self::debug_path($step['args'][0]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Sanitize the function arguments\n\t\t\t\t\t$function .= '('.implode(', ', $args = array_map('Kohana::debug_var', $step['args'])).')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$output[] = array(\n\t\t\t\t'function' => $function,\n\t\t\t\t'file' => self::debug_path($step['file']),\n\t\t\t\t'line' => $step['line']);\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "0a01e6b4a98a956746c9a8f0869c9e00", "score": "0.55243367", "text": "public static function trace(array $options = [])\n {\n $self = Debugger::getInstance();\n $defaults = [\n 'depth' => 999,\n 'format' => $self->_outputFormat,\n 'args' => false,\n 'start' => 0,\n 'scope' => null,\n 'exclude' => ['call_user_func_array', 'trigger_error']\n ];\n $options = Hash::merge($defaults, $options);\n $backtrace = debug_backtrace();\n $count = count($backtrace);\n $back = [];\n $_trace = [\n 'line' => '??',\n 'file' => '[internal]',\n 'class' => null,\n 'function' => '[main]'\n ];\n for ($i = $options['start']; $i < $count && $i < $options['depth']; $i++) {\n $trace = $backtrace[$i] + ['file' => '[internal]', 'line' => '??'];\n $signature = $reference = '[main]';\n\n if (isset($backtrace[$i + 1])) {\n $next = $backtrace[$i + 1] + $_trace;\n $signature = $reference = $next['function'];\n\n if (!empty($next['class'])) {\n $signature = $next['class'] . '::' . $next['function'];\n $reference = $signature . '(';\n\n if ($options['args'] && isset($next['args'])) {\n $args = [];\n\n foreach ($next['args'] as $arg) {\n $args[] = Debugger::exportVar($arg);\n }\n\n $reference .= implode(', ', $args);\n }\n\n $reference .= ')';\n }\n }\n\n if (in_array($signature, $options['exclude'])) {\n continue;\n }\n\n if ($options['format'] === 'points' && $trace['file'] !== '[internal]') {\n $back[] = ['file' => $trace['file'], 'line' => $trace['line']];\n } elseif ($options['format'] === 'array') {\n $back[] = $trace;\n } else {\n if (isset($self->_templates[$options['format']]['traceLine'])) {\n $tpl = $self->_templates[$options['format']]['traceLine'];\n } else {\n $tpl = $self->_templates['base']['traceLine'];\n }\n\n $trace['path'] = static::trimPath($trace['file']);\n $trace['reference'] = $reference;\n\n unset($trace['object'], $trace['args']);\n\n $back[] = Text::insert($tpl, $trace, ['before' => '{:', 'after' => '}']);\n }\n }\n\n if ($options['format'] === 'array' || $options['format'] === 'points') {\n return $back;\n }\n\n return implode(\"\\n\", $back);\n }", "title": "" }, { "docid": "80099ec144f50919f524e14f1d8ff48d", "score": "0.55184025", "text": "function smarty_function_debug_backtrace($params, Zikula_View $view)\n{\n if (!isset($params['fulltrace'])) {\n return prayer(array_slice(debug_backtrace(), 8));\n } else {\n return prayer(debug_backtrace());\n }\n}", "title": "" }, { "docid": "bfdee121a4092d5f675827c5d6eab614", "score": "0.5516853", "text": "public function trace()\n {\n if (!$this->cfg['collect']) {\n return;\n }\n $args = \\func_get_args();\n $meta = $this->internal->getMetaVals(\n $args,\n array(\n 'caption' => 'trace',\n 'channel' => $this->cfg['channelName'],\n 'columns' => array('file','line','function'),\n )\n );\n $backtrace = $this->errorHandler->backtrace();\n // toss \"internal\" frames\n for ($i = 1, $count = \\count($backtrace)-1; $i < $count; $i++) {\n $frame = $backtrace[$i];\n $function = isset($frame['function']) ? $frame['function'] : '';\n if (!\\preg_match('/^'.\\preg_quote(__CLASS__).'(::|->)/', $function)) {\n break;\n }\n }\n $backtrace = \\array_slice($backtrace, $i-1);\n // keep the calling file & line, but toss ->trace or ::_trace\n unset($backtrace[0]['function']);\n $this->appendLog('trace', array($backtrace), $meta);\n }", "title": "" }, { "docid": "91dbc54e0e25c87789c8c5c57774787d", "score": "0.55106944", "text": "public function pointerExecution()\n {\n $excAvailable = [\n POINTER_LIST[0] => $this->collectibilityList,\n POINTER_LIST[1] => $this->collectibilityGroup,\n ];\n\n $result = [];\n\n foreach ($this->resultPointer as $dt) {\n $main = $excAvailable[$dt];\n\n if (isset($main['chart'])) {\n $result[] = $main;\n } else {\n foreach ($main as $chart) {\n $result[] = $chart;\n }\n }\n }\n\n\n\n return $result;\n }", "title": "" }, { "docid": "16779d5d9ff1b293b5677824602b2191", "score": "0.55014867", "text": "function trace(array $trace=NULL) {\n\t\tif (!$trace) {\n\t\t\t$trace=debug_backtrace(FALSE);\n\t\t\t$frame=$trace[0];\n\t\t\tif (isset($frame['file']) && $frame['file']==__FILE__)\n\t\t\t\tarray_shift($trace);\n\t\t}\n\t\t$debug=$this->hive['DEBUG'];\n\t\t$trace=array_filter(\n\t\t\t$trace,\n\t\t\tfunction($frame) use($debug) {\n\t\t\t\treturn $debug && isset($frame['file']) &&\n\t\t\t\t\t($frame['file']!=__FILE__ || $debug>1) &&\n\t\t\t\t\t(empty($frame['function']) ||\n\t\t\t\t\t!preg_match('/^(?:(?:trigger|user)_error|'.\n\t\t\t\t\t\t'__call|call_user_func)/',$frame['function']));\n\t\t\t}\n\t\t);\n\t\t$out='';\n\t\t$eol=\"\\n\";\n\t\t// Analyze stack trace\n\t\tforeach ($trace as $frame) {\n\t\t\t$line='';\n\t\t\tif (isset($frame['class']))\n\t\t\t\t$line.=$frame['class'].$frame['type'];\n\t\t\tif (isset($frame['function']))\n\t\t\t\t$line.=$frame['function'].'('.\n\t\t\t\t\t($debug>2 && isset($frame['args'])?\n\t\t\t\t\t\t$this->csv($frame['args']):'').')';\n\t\t\t$src=$this->fixslashes(str_replace($_SERVER['DOCUMENT_ROOT'].\n\t\t\t\t'/','',$frame['file'])).':'.$frame['line'];\n\t\t\t$out.='['.$src.'] '.$line.$eol;\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "9eac07596352be7c7236b3c2e162ddf7", "score": "0.546548", "text": "private static function getHTMLBackTrace($backtrace)\n {\n $str = '';\n\n foreach ($backtrace as $step) {\n if ($step['function'] != 'getHTMLBackTrace' && $step['function'] != 'handle_error') {\n $str .= '<tr><td style=\"border-bottom: 1px solid #EEEEEE\">';\n $str .= ((isset($step['class'])) ? htmlspecialchars($step['class'], ENT_NOQUOTES, 'UTF-8') : '').\n ((isset($step['type'])) ? htmlspecialchars($step['type'], ENT_NOQUOTES, 'UTF-8') : '').htmlspecialchars($step['function'], ENT_NOQUOTES, 'UTF-8').'(';\n\n if (is_array($step['args'])) {\n $drawn = false;\n $params = '';\n foreach ($step['args'] as $param) {\n $params .= self::getPhpVariableAsText($param);\n //$params .= var_export($param, true);\n $params .= ', ';\n $drawn = true;\n }\n $str .= htmlspecialchars($params, ENT_NOQUOTES, 'UTF-8');\n if ($drawn == true) {\n $str = substr($str, 0, strlen($str) - 2);\n }\n }\n $str .= ')';\n $str .= '</td><td style=\"border-bottom: 1px solid #EEEEEE\">';\n $str .= ((isset($step['file'])) ? htmlspecialchars(self::displayFile($step['file']), ENT_NOQUOTES, 'UTF-8') : '');\n $str .= '</td><td style=\"border-bottom: 1px solid #EEEEEE\">';\n $str .= ((isset($step['line'])) ? $step['line'] : '');\n $str .= '</td></tr>';\n }\n }\n\n return $str;\n }", "title": "" }, { "docid": "eb925ecd166fcfb622754591a4a3a953", "score": "0.5464847", "text": "public function GetTrace ()\r\n\r\n\t{\r\n\t\treturn (Game::$trace);\r\n\t}", "title": "" }, { "docid": "ec226425bef1178e4ce00767a7793ba5", "score": "0.546254", "text": "protected static function getEvalContext(Throwable $exception)\n {\n if (Str::contains($exception->getFile(), \"eval()'d code\")) {\n return [\n $exception->getLine() => \"eval()'d code\",\n ];\n }\n }", "title": "" }, { "docid": "53c3c080eecf9bdf53588d482ef50bd3", "score": "0.54606134", "text": "function get_caller(){\n\t\t$trace = array_reverse(debug_backtrace());\n\t\t$caller = array();\n\t\n\t\tforeach($trace as $call){\n\t\t\tif(isset($call['class']) && __CLASS__ == $call['class']){\n\t\t\t\tcontinue; // Filter out wpdb calls.\n\t\t\t}\n\t\t\t$caller[] = isset($call['class']) ? \"{$call['class']}->{$call['function']}\" : $call['function'];\n\t\t}\n\t\n\t\treturn join(', ', $caller);\n\t}", "title": "" }, { "docid": "3e8e2cc1830937ca937b69a863b43551", "score": "0.54290295", "text": "function __getExecutableLines($content) {\n\t\tif (is_array($content)) {\n\t\t\t$manager =& CodeCoverageManager::getInstance();\n\t\t\t$result = array();\n\t\t\tforeach ($content as $file) {\n\t\t\t\t$result[$file] = $manager->__getExecutableLines(file_get_contents($file));\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\t$content = h($content);\n\t\t// arrays are 0-indexed, but we want 1-indexed stuff now as we are talking code lines mind you (**)\n\t\t$content = \"\\n\" . $content;\n\t\t// // strip unwanted lines\n\t\t$content = preg_replace_callback(\"/(@codeCoverageIgnoreStart.*?@codeCoverageIgnoreEnd)/is\", array('CodeCoverageManager', '__replaceWithNewlines'), $content);\n\t\t// strip php | ?\\> tag only lines\n\t\t$content = preg_replace('/[ |\\t]*[&lt;\\?php|\\?&gt;]+[ |\\t]*/', '', $content);\n\n\t\t// strip lines that contain only braces and parenthesis\n\t\t$content = preg_replace('/[ |\\t]*[{|}|\\(|\\)]+[ |\\t]*/', '', $content);\n\t\t$result = explode(\"\\n\", $content);\n\t\t// unset the zero line again to get the original line numbers, but starting at 1, see (**)\n\t\tunset($result[0]);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "3e1a54c669fbeed7394322cbc72e1f2c", "score": "0.541369", "text": "public function getLastError(): array\n {\n return $this->last_error;\n }", "title": "" }, { "docid": "9b2d576abfe46a77065320341a82d6e4", "score": "0.541128", "text": "public function getFailedExecutedStatements(): array\n {\n return \\array_filter($this->executedStatements, static function ($s) {\n return ! $s->isSuccess();\n });\n }", "title": "" }, { "docid": "2ba49301a604f5fce56a4632bdbc590f", "score": "0.5398743", "text": "public function getCalls() {\r\n return $this->_storage->toArray();\r\n }", "title": "" }, { "docid": "55638619bab3517062916eaf42c8f2e8", "score": "0.5384197", "text": "protected function getIdentifyingLocation(array $stacktrace): array\n {\n $fallback = [\n 'UNKNOWN',\n 0,\n ];\n foreach ($stacktrace as $level) {\n if (isset($level['filename'])) {\n // ignore unrelated files that sometimes appear in the error report\n if ($level['filename'] === 'tracekit/tracekit.js') {\n continue;\n }\n\n if ($level['filename'] === 'error_report.js') {\n // in case the error really is in the error_report.js file save it for\n // later\n if ($fallback[0] === 'UNKNOWN') {\n $fallback = [\n $level['filename'],\n $level['line'],\n ];\n }\n\n continue;\n }\n\n return [\n $level['filename'],\n $level['line'],\n ];\n }\n\n if (isset($level['scriptname'])) {\n return [\n $level['scriptname'],\n $level['line'],\n ];\n }\n\n continue;\n }\n\n return $fallback;\n }", "title": "" }, { "docid": "a358212f7eb2adc4247daf9e30a5aa25", "score": "0.538366", "text": "function trace()\n\t{$trace=debug_backtrace();\n\tforeach($trace as $t)\n\t{\n\t\tif (in_array($t['function'], \n\t\t\t\t\t array('include', 'include_once', 'require', 'require_once')))\n\t\t{\n\t\t\t$file_path=$t['file'];//gesamter Pfad inkl. Filename und Extention.\n\t\t\t\n\t\t\t//Filenamen\n\t\t\t$parts = pathinfo($file_path);//Vorbereitung\n\t\t\t$filename = $parts['basename'];//Filename incl. extention.\n\t\t\t$filetype = $parts['extension'];//Nur die extention.\n\t\t\t$path_only = $parts['dirname'];//Nur der Pfad.\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn ($filename);\n}", "title": "" }, { "docid": "dc60694ff3b33606c0bbcdd36a2211ac", "score": "0.53824794", "text": "private function findStackFrame()\n {\n $trace = debug_backtrace();\n foreach ($trace as $f) {\n if (!array_key_exists('class', $f)) {\n continue;\n }\n $class = $f['class'];\n if (preg_match('/LoggingBundle/', $class) &&\n $class != 'LOCKSSOMatic\\LoggingBundle\\Command\\ExportLogsCommand') {\n continue;\n }\n if (!preg_match('/^LOCKSSOMatic/', $class)) {\n continue;\n }\n return $f;\n }\n }", "title": "" }, { "docid": "836b215afcc709936f28cb3c187f2215", "score": "0.53706926", "text": "public static function parseThrowable(Throwable $th) : array\n {\n $data = [\n 'code' => \\method_exists($th, 'getNo') ? $th->getNo() : $th->getCode(),\n 'info' => \\method_exists($th, 'getInfo') ? $th->getInfo() : $th->getMessage(),\n 'name' => \\method_exists($th, 'getName') ? $th->getName() : Util::getObjectName($th),\n 'file' => $th->getFile(),\n 'line' => $th->getLine(),\n 'call' => \\explode(PHP_EOL, $th->getTraceAsString()),\n ];\n\n if (\\method_exists($th, 'getContext')) {\n $data['more'] = $th->getContext();\n }\n\n if ($previous = $th->getPrevious()) {\n $data['last'] = Util::parseThrowable($previous);\n }\n\n return $data;\n }", "title": "" }, { "docid": "533bcb119a89cc1ec7ba922981457fdf", "score": "0.5365701", "text": "public static function getStack($stacktrace) {\n $output = \"\";\n $i = 1;\n foreach($stacktrace as $node) {\n $output .= \"\\t $i. \".basename($node['file']) .\" : \" .$node['function'] .\" (\" .$node['line'].\")\\n\";\n $i++;\n }\n\t\treturn $output;\n }", "title": "" }, { "docid": "55147eb620465739108891e397f9114d", "score": "0.53526926", "text": "public function getHistoryStrings(): array\n {\n return $this->historyAsStrings;\n }", "title": "" }, { "docid": "645f8e7333dc115d0bb3e12e3aa9c6d8", "score": "0.5349905", "text": "public function get(): array\n {\n return $this->stack;\n }", "title": "" }, { "docid": "802086b13e6ef5a16ab8860df34087f3", "score": "0.53326315", "text": "private static function print_backtrace( $trace = null )\n\t{\n\t\tif ( !isset( $trace ) ) {\n\t\t\t$trace = debug_backtrace();\n\t\t}\n\t\tprint \"<pre class=\\\"backtrace\\\">\\n\";\n\t\t$defaults = array(\n\t\t\t'file' => '[core]',\n\t\t\t'line' => '(eval)',\n\t\t\t'class' => '',\n\t\t\t'type' => '',\n\t\t\t'args' => array(),\n\t\t);\n\n\t\tforeach ( $trace as $n => $a ) {\n\t\t\t$a = array_merge( $defaults, $a );\n\n\t\t\tif ( $a['class'] == 'Error' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( strpos( $a['file'], FILMIO_PATH ) === 0 ) {\n\t\t\t\t$a['file'] = substr( $a['file'], strlen( FILMIO_PATH ) + 1 );\n\t\t\t}\n\n\t\t\tif ( defined( 'DEBUG_ARGS' ) ) {\n\t\t\t\t$args = array();\n\t\t\t\tforeach ( $a['args'] as $arg ) {\n\t\t\t\t\t$args[] = htmlentities( str_replace(\n\t\t\t\t\t\tarray( \"\\n\", \"\\r\" ),\n\t\t\t\t\t\tarray( \"\\n \", '' ),\n\t\t\t\t\t\tvar_export( $arg, true )\n\t\t\t\t\t) );\n\t\t\t\t}\n\t\t\t\t$args = implode( \", \", $args );\n\t\t\t\tif ( strlen( $args ) > 1024 ) {\n\t\t\t\t\t$args = substr( $args, 0, 1021 ) . '&hellip;';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$args = count( $a['args'] ) == 0 ? ' ' : sprintf( _n( ' &hellip;%d arg&hellip; ', ' &hellip;%d args&hellip; ', count( $a['args'] ) ), $a['args'] );\n\t\t\t}\n\n\t\t\tprintf(\n\t\t\t\t_t( \"%s line %d:\\n %s(%s)\\n\" ),\n\t\t\t\t$a['file'],\n\t\t\t\t$a['line'],\n\t\t\t\t$a['class'].$a['type'].$a['function'],\n\t\t\t\t$args\n\t\t\t);\n\t\t}\n\t\tprint \"\\n</pre>\\n\";\n\t}", "title": "" }, { "docid": "68e16b3bdfc8d20e6d01ae5eecedebdc", "score": "0.5318926", "text": "public static function getErrorCaller($offset = 1)\n { \n\t$caller = array();\n $bt = debug_backtrace(false);\n\t$bt = array_slice($bt, $offset);\n $bt = array_reverse( $bt );\n\t\n foreach ( (array) $bt as $call ) {\n\t \n\t if ( ! isset( $call['class'] ) )\n\t\tcontinue;\n\t \n if ( @$call['class'] == __CLASS__ )\n continue;\n\t \n\t $function = $call['class'] . '->'.$call['function'];\n \n\t if( isset($call['line']) )\n\t\t$function .= ' line '.$call['line'];\n\t \n $caller[] = $function;\n }\n\t\n $caller = implode( ', ', $caller );\n\t\n return $caller;\n }", "title": "" }, { "docid": "9ceb8970f1cab87740806fbdaf123da8", "score": "0.53050584", "text": "protected function getCalledPosition($level = 1)\r\n {\r\n $traces = debug_backtrace();\r\n\r\n $file = isset($traces[$level]['file']) ? $traces[$level]['file'] : $traces[$level + 1]['file'];\r\n $line = isset($traces[$level]['line']) ? $traces[$level]['line'] : $traces[$level + 1]['line'];\r\n\r\n return array($file, $line);\r\n }", "title": "" }, { "docid": "93abf6543b0fa2257dfa1de96accb89b", "score": "0.5297784", "text": "function td():string\n{\n $trace = debug_backtrace();\n echo '<pre style=\"background:#F2F2F2;border:solid 1px;padding:1em; font-size:12pt\">';\n echo '<h2><u>Trace</u></h3>';\n echo '<b>file</b> : <span style=\"color:red\">'.$trace[0]['file'].\"</span>\";\n echo '<br><b>line</b> : <span style=\"color:blue\">'.$trace[0]['line'].\"</span>\";\n if (isset($trace[1]['function'])) {\n echo '<br><b>function</b> : <span style=\"color:blue\">'.$trace[1]['function'].\"</span>\";\n }\n if (isset($trace[1]['class'])) {\n echo '<br><b>class</b> : <span style=\"color:red\">'.$trace[1]['class'].\"</span>\";\n }\n echo '</pre>';\n echo '<h2><u>Dump</u></h3>';\n $args = func_get_args();\n if (!empty($args)) { \n call_user_func('dd', ((count($args) > 1)? $args : $args[0]) );\n }else{\n dd();\n }\n}", "title": "" }, { "docid": "0b4401847f2e4c70c571ed085b6a9c97", "score": "0.5296752", "text": "public function getFrames()\n {\n if($this->frames === null) {\n $frames = $this->exception->getTrace();\n\n // If we're handling an ErrorException thrown by Whoops,\n // get rid of the last frame, which matches the handleError method,\n // and do not add the current exception to trace. We ensure that\n // the next frame does have a filename / linenumber, though.\n if($this->exception instanceof ErrorException && empty($frames[1]['line'])) {\n $frames[1] = isset($frames[1]) ? $frames[1] + $frames[0] : $frames[0];\n array_shift($frames);\n } else {\n $firstFrame = $this->getFrameFromException($this->exception);\n array_unshift($frames, $firstFrame);\n }\n $this->frames = new FrameCollection($frames);\n }\n\n return $this->frames;\n }", "title": "" }, { "docid": "7f71817594c291316d90dcdd3e4b9a70", "score": "0.52955693", "text": "public function __debugInfo(): array\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "8308d64b02c5abd20ece610e9dd68043", "score": "0.52817464", "text": "public function __debugInfo(): array\n {\n try {\n $count = $this->count();\n } catch (Exception $e) {\n $count = 'An exception occurred while getting count';\n }\n\n return [\n 'count' => $count,\n ];\n }", "title": "" }, { "docid": "c23de1104a02a5d2cb05e348da484b1d", "score": "0.5275509", "text": "public function getErrorList() : array {\n\t\t$file = func_get_arg( 0 );\n\t\tswitch ( $file ) {\n\t\t\tcase 'SlowMetaQueryUnitTest.success.inc':\n\t\t\t\treturn [];\n\n\t\t\tcase 'SlowMetaQueryUnitTest.fail.inc':\n\t\t\t\treturn [\n\t\t\t\t\t7 => 1,\n\t\t\t\t\t14 => 1,\n\t\t\t\t\t27 => 1,\n\t\t\t\t\t37 => 1,\n\t\t\t\t\t47 => 1,\n\t\t\t\t\t59 => 1,\n\t\t\t\t\t78 => 1,\n\t\t\t\t\t94 => 1,\n\t\t\t\t\t98 => 1,\n\t\t\t\t\t105 => 1,\n\t\t\t\t];\n\t\t}\n\t\treturn [];\n\t}", "title": "" }, { "docid": "4706ef44e99560861176262fc495370f", "score": "0.526998", "text": "function getTraceback()\n {\n if (!$this->body) {\n throw new CeleryException('Called getTraceback before task was ready');\n }\n return $this->body->traceback;\n }", "title": "" }, { "docid": "89a027d95b9b3f6dc130bd228306c59a", "score": "0.5269975", "text": "public function getDebug(): array\n {\n }", "title": "" }, { "docid": "1eb1cc103c82097a6ec736c5acb0f210", "score": "0.52641964", "text": "public function popBackTrace()\n {\n return array_pop($this->backtrace);\n }", "title": "" }, { "docid": "57cc5c8caa244afe19e335af8be49c5e", "score": "0.52501875", "text": "public function getError()\r\n {\r\n $_arr = array();\r\n if( !is_null( $this->DBH ) ) array_push( $_arr, $this->DBH->errorInfo() );\r\n if( !is_null( $this->STMT ) ) array_push( $_arr, $this->STMT->errorInfo() );\r\n\r\n return $_arr;\r\n }", "title": "" }, { "docid": "ca142fb331caab20e3ee2c7ddb6aa908", "score": "0.5244173", "text": "public function __toString() {\n\t\treturn implode(\"\\n\", $this->trace);\n\t}", "title": "" }, { "docid": "c427663712cbee0c4006c3b8a8b77d70", "score": "0.52434546", "text": "public function parseLogStackTrace(?string $stackTrace) : array;", "title": "" }, { "docid": "69ade3eb0346c7d2f44f874acf3b1d70", "score": "0.5228596", "text": "static function get_debugtrace($errno,$errmsg,$filename,$linenum,$stack_trace_steps,$format=self::OUTPUT_FORMAT_HTML,$stack_trace=array()) {\n\n\t\t\t//DB trigger error - correct\n\t\t\t//CMODEL error - correct\n\t\t\t$stack_trace = $stack_trace ? $stack_trace : self::get_stack_trace($stack_trace_steps);\n\n\t\t\t$pointer = 0;\n\t\t\tforeach($stack_trace as $index=>$trace) {\n\t\t\t\tif(\tget_value($trace,\"function\")==\"system_error_handler\" || \n\t\t\t\t\t(get_value($trace,\"class\")==\"MODEL_COMPLEX\" && get_value($trace,\"function\")==\"__call\"))\n\t\t\t\t\t\t$pointer = $index + 1;\n\t\t\t}\n\t\t\n\t\t\t$stack_trace = array_slice($stack_trace, $pointer);\n\t\t\t\t\t\n\t\t\tif(strpos($errmsg,\"Call to undefined CMODEL method\")!==false) {\n\t\t\t\t$trace = array_shift($stack_trace);\n\n\t\t\t\t$linenum = get_value($trace,\"line_number\");\n\t\t\t\t$filename = get_value($trace,\"file\");\n\t\t\t}\t\n\n\t\t\t$filename = FILE_UTIL::get_sanitized_path($filename);\n\n\t\t\treturn self::get_backtrace_table($errno, $errmsg, $filename, $linenum, $stack_trace, $format)->get_table();\t\t\t\t\t\t\t\n\t\t}", "title": "" } ]
a3316d9b3ae0cee109703d9ba228ac5a
Removes all existing cached files from the server
[ { "docid": "e61fa4c5f0683e77a1d552c40f2eb216", "score": "0.6987666", "text": "public function clear_cache() {\n\n // Only allow AJAX requests\n if (!$this->input->is_ajax_request()) {\n return show_404();\n }\n\n // Remove all logs\n foreach($this->_getCacheFiles() as $file) {\n delete_file($file, true);\n }\n\n }", "title": "" } ]
[ { "docid": "2b64bf9c1d6f970b6bdbe5f4ef4e767a", "score": "0.8482171", "text": "public static function removeCacheFiles() {}", "title": "" }, { "docid": "6f84571e39855cab3067eacfae093f05", "score": "0.820143", "text": "public function removeCache() {\r\n $files = $this->caches;\r\n while (count($files) > 0) {\r\n @unlink(array_shift($files));\r\n }\r\n\r\n }", "title": "" }, { "docid": "6936bc73db41b7f7e28a6fb10ff7709f", "score": "0.8161177", "text": "function clearCache() {\n\t\t\t$d = opendir(SERVER_ROOT.\"cache/\");\n\t\t\twhile ($f = readdir($d)) {\n\t\t\t\tif ($f != \".\" && $f != \"..\" && !is_dir(SERVER_ROOT.\"cache/\".$f)) {\n\t\t\t\t\tunlink(SERVER_ROOT.\"cache/\".$f);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8e54498f427f0ee93209a7427f69fc11", "score": "0.81394875", "text": "private function\n\tCleanupCache()\n\t{\n\t\t$cached_files = (glob(\"$this->CacheTmp/emuwebcache*\"));\n\t\tforeach($cached_files as $file)\n\t\t{\n\t\t\t$cacheseconds = $this->Cache * 60 * 60;\n\t\t\t$expiretime = filemtime($file) + $cacheseconds;\n\t\t\tif (time() >= $expiretime)\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * Remove the file\n\t\t\t\t */\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "23240222190c1699d04b596c33550599", "score": "0.80742335", "text": "public function clearCachefiles () {\r\n\t\r\n\t}", "title": "" }, { "docid": "374b3a0f21ccc969e87632c3fa6c4eb7", "score": "0.8045551", "text": "public function clearCacheFiles()\n {\n if (false === $this->cache) {\n return;\n }\n foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->cache), RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile()) {\n @unlink($file->getPathname());\n }\n }\n }", "title": "" }, { "docid": "4a1838bef7519b17bfabf12d86fda5bc", "score": "0.79571944", "text": "private function delete_cache_files() {\n\t\tforeach ( $this->cache_dirs as $dir ) {\n\t\t\t$this->delete( $this->cache_path . $dir );\n\t\t}\n\t}", "title": "" }, { "docid": "b616206f111749ff6b1af948057b502c", "score": "0.76870906", "text": "public function clearCache(){\n if(file_exists($this->file)){\n @unlink($this->file);\n }\n }", "title": "" }, { "docid": "f25549fe8ea03da081f16504107f2c3c", "score": "0.76433754", "text": "public static function cache_clear() {\n if (file_exists(Atomic::$config['cache'] . self::$cache)) {\n unlink(Atomic::$config['cache'] . self::$cache);\n }\n }", "title": "" }, { "docid": "f93998c9dbb9dbaf146db82aef5a7f8b", "score": "0.75870764", "text": "public function clear_cache() \n\t{\n\t\tself::$ci->load->helper('file');\n\t\t\n\t\t$cache_path = $_SERVER['DOCUMENT_ROOT'] . '/' . self::$asset_base . '/' . self::$asset_cache_folder . '/';\n\t\t\n\t\tdelete_files($cache_path);\n\t}", "title": "" }, { "docid": "afbc12305e2375a4539ca7f3cf1cf9dc", "score": "0.75096035", "text": "public function\n delete_all()\n {\n parent::delete_all();\n\n foreach (glob($this->get_cache_dir_name() . '/*') as $cache_file) {\n unlink($cache_file);\n }\n }", "title": "" }, { "docid": "60e0af634fcd5c402949d0e567064b04", "score": "0.74756867", "text": "public function actionClean() {\n $deletedArr=[];\n $errorArr=[];\n foreach(Finder::find('*')->in(CACHE_DIRECTORY) as $file=>$info){\n try{\n FileSystem::delete($file);\n $deletedArr[]=$file;\n }catch (\\Exception $e){\n $errorArr[]=$file;\n }\n }\n $response=[\n 'state'=>(empty($errorArr)?'OK':'error'),\n 'deleted'=>$deletedArr,\n 'errors'=>$errorArr\n ];\n $this->sendJson($response);\n }", "title": "" }, { "docid": "a735403fd807dfe9184846cabbb21616", "score": "0.7436293", "text": "function clearCache()\n {\n $cacheDir = $this->container->getParameter('kernel.cache_dir');\n\n $kernel = $this->container->get('kernel');\n\n $cacheDir = realpath($cacheDir.'/../');\n\n\n foreach (array (/*'frontdev','frontprod',*/'dev','prod') as $env)\n {\n foreach (array ('UrlGenerator','UrlMatcher') as $file)\n {\n $cachedFile = $cacheDir.'/'.$env.'/app'.ucfirst($env).$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n\n\n $cachedFile = $cacheDir.'/'.$env.'/app'.$env.$file.'.php';\n //print '<br>'.$cachedFile;\n if (file_exists($cachedFile)) @unlink ($cachedFile);\n }\n }\n\n\n if (function_exists('apc_clear_cache')) apc_clear_cache('user');\n //exit();\n\n }", "title": "" }, { "docid": "1341723ee00914173bcc9f624c6e7112", "score": "0.7388545", "text": "public function flush() {\r\n\t\tglobal $SITE_DIR;\r\n\t\t$directoryHandle = opendir($SITE_DIR . 'data/cache');\r\n\t\twhile (false !== ($filename = readdir($directoryHandle))) {\r\n\t\t\tif (substr($filename, 0, strlen($this->prefix)) == $this->prefix) {\r\n\t\t\t\tunlink($SITE_DIR . 'data/cache/' . $filename);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ae844f5ae507c83f94add7e22eb9c0d9", "score": "0.73552334", "text": "public function clear()\n {\n $iterator = new DirectoryIterator($this->cacheDirectory);\n $extensionPattern = '/' . preg_quote(self::CACHE_SUFFIX) . '$/';\n\n foreach ($iterator as $file) {\n if (false === $file->isFile()) {\n continue;\n }\n\n if (0 === preg_match($extensionPattern, $file->getBaseName())) {\n continue;\n }\n\n unlink($file->getPathName());\n }\n }", "title": "" }, { "docid": "dbcc6d74d535da8fb0086bf91121fec5", "score": "0.7318209", "text": "public static function purgeCaches() {}", "title": "" }, { "docid": "6d5d50d85a2e70980e3ad59036017460", "score": "0.73017746", "text": "public function clear_cache() {\n\t\tif (file_exists($this->cache_path)) {\n\t\t\tunlink($this->cache_path);\n\t\t}\n\t}", "title": "" }, { "docid": "5c10299be4f08b49af3a1b2dfd6792fc", "score": "0.7283043", "text": "public function clearCache()\n {\n @unlink($this->cacheFileName());\n $this->initialize();\n }", "title": "" }, { "docid": "43babca73e70293b95d77786c76442bf", "score": "0.71790123", "text": "public function _cacheClear() {\n\t\t$content = null;\n\t\tif ( ZC_CACHE == 'apc' ) {\n\t\t\t$info = apc_cache_info( 'user' );\n\t\t\tforeach ( $info[ 'cache_list' ] as $item ) {\n\t\t\t\tif ( preg_match( '/^\\Q'. ZC_CACHE_PREFIX. '\\E/', $item[ 'info' ] ) )\n\t\t\t\t\tapc_delete( $item[ 'info' ] );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( ( $dh = opendir( ZC_CACHE_DIR ) ) !== false ) {\n\t\t\t\twhile( ( $file = readdir( $dh ) ) !== false ) {\n\t\t\t\t\tif ( ! preg_match( '/\\.cache$/', $file ) || is_dir( $file ) ) continue;\n\t\t\t\t\tunlink( ZC_CACHE_DIR. '/'. $file );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6ebc1676ef4da6585c34134c4d823da3", "score": "0.71674854", "text": "public static function purgeTemplateCache() {\n\t\t$dir = static::getAbsRoot() . getenv('CACHE_DIRECTORY');\n\n\t\tstatic::emptyFolder($dir);\n\t}", "title": "" }, { "docid": "32e0759f66f03b09a478d68ab0472014", "score": "0.7154159", "text": "public function purgeScriptCache()\n\t{\n\t\t// assets/js and assets/css\n\t\tforeach (array('assets/js', 'assets/css') as $dir)\n\t\t{\n\t\t\t// Purge the folder\n\t\t\t$objFolder = new \\Folder($dir);\n\t\t\t$objFolder->purge();\n\n\t\t\t// Restore the index.html file\n\t\t\t$objFile = new \\File('templates/index.html', true);\n\t\t\t$objFile->copyTo($dir . '/index.html');\n\t\t}\n\n\t\t// Recreate the internal style sheets\n\t\t$this->import('StyleSheets');\n\t\t$this->StyleSheets->updateStyleSheets();\n\n\t\t// Also empty the page cache so there are no links to deleted scripts\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the script cache', __METHOD__, TL_CRON);\n\t}", "title": "" }, { "docid": "0490f20a458851d818aa4cf6b9cf060e", "score": "0.7153663", "text": "static function cleanupTmpFiles(){\n $files = CHOQ_FileManager::getFiles(CHOQ_ACTIVE_MODULE_DIRECTORY.\"/tmp\");\n foreach($files as $file){\n if(preg_match(\"~filecontents\\.|import\\.~i\", basename($file))){\n if(filemtime($file) < time() - self::CACHETIME) unlink($file);\n }\n }\n }", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.7142648", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.7142648", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.7142648", "text": "public function clearCache();", "title": "" }, { "docid": "640b37039053ddfc4f8f358db8f5bbf6", "score": "0.7118551", "text": "function cleanup()\n {\n // *Always* clean up the cache after changing configuration, else\n // the configuration change will first be seen after cache time is run out.\n $this->log(\"-------\");\n $cacheDir = $this->getCacheDirectory();\n if (is_dir($cacheDir) && $handle = opendir($cacheDir)) {\n while (false !== ($file = readdir($handle))) {\n $filename = $cacheDir . '/' . $file;\n if (!is_dir($filename)) {\n $this->log(\"CLEANUP CACHE: \" . $filename);\n unlink($filename);\n }\n }\n }\n }", "title": "" }, { "docid": "b9c54b6bec4a28a644198bb1368ba8cb", "score": "0.7109927", "text": "protected function deleteCacheEntries(): void\n {\n\t\tif(($cachePath = $this->folder->getCachePath(true))) {\n\n\t\t\t$di\t= new DirectoryIterator($cachePath);\n\n\t\t\tforeach($di as $fileinfo) {\n\t\t\t\tif(\t$fileinfo->isDot() ||\n\t\t\t\t\t!$fileinfo->isFile() ||\n\t\t\t\t\tstrpos($fileinfo->getFilename(), $this->filename) !== 0\n\t\t\t\t) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tunlink($fileinfo->getRealPath());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a1e5e82a1793706e51159705300bd517", "score": "0.7097491", "text": "private function clearTestCache()\n {\n $finder = (new Finder())\n ->in(self::CACHE_ROOT)\n ->ignoreDotFiles(Finder::IGNORE_DOT_FILES);\n\n $filesystem = new Filesystem();\n\n $filesystem->remove($finder->files());\n $filesystem->remove($finder->directories());\n }", "title": "" }, { "docid": "9ddd9630ae8630e3f0f38fe8438381d2", "score": "0.7091894", "text": "function ClearCache()\n\t{\n\t\tglobal $gCms;\n\t\t$smarty =& $gCms->GetSmarty();\n\n\t\t$smarty->clear_all_cache();\n\t\t$smarty->clear_compiled_tpl();\n\n\t\tif (is_file(TMP_CACHE_LOCATION . '/contentcache.php'))\n\t\t{\n\t\t\tunlink(TMP_CACHE_LOCATION . '/contentcache.php');\n\t\t}\n\n\t\t@touch(cms_join_path(TMP_CACHE_LOCATION,'index.html'));\n\t\t@touch(cms_join_path(TMP_TEMPLATES_C_LOCATION,'index.html'));\n\t}", "title": "" }, { "docid": "9bd29937b8759df95841a20320be6314", "score": "0.7079338", "text": "protected function clear_caches()\n {\n }", "title": "" }, { "docid": "827b67dfe0b4b92bbc0e02cf7447d30a", "score": "0.7078808", "text": "protected function _clearCachedTemplates()\n\t{\n\t\t$directories = array(\n\t\t\tISC_ADMIN_TEMPLATE_CACHE_DIRECTORY,\n\t\t\tISC_FRONT_TEMPLATE_CACHE_DIRECTORY,\n\t\t);\n\t\tforeach($directories as $directory) {\n\t\t\t$dh = opendir($directory);\n\t\t\tif (!$dh) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\twhile (($file = readdir($dh)) !== false) {\n\t\t\t\tif (substr($file, -4) != '.php') {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t@unlink($directory . '/' . $file);\n\t\t\t}\n\n\t\t\tclosedir($dh);\n\t\t}\n\t}", "title": "" }, { "docid": "fe03422346ce837b07f498dbc72c8ed6", "score": "0.7068956", "text": "private function clear_caching()\n {\n require_code('caches3');\n erase_comcode_page_cache();\n erase_block_cache(true);\n //persistent_cache_delete('OPTIONS'); Done by set_option\n erase_persistent_cache();\n erase_cached_templates(false, null, TEMPLATE_DECACHE_WITH_ANYTHING_INTERESTING);\n }", "title": "" }, { "docid": "13eea7fa7afae15f4a8dc040637f2252", "score": "0.70551187", "text": "private function clearPluginCache()\n {\n $cacheDirectory = $this->myApplication->getTempPath()->withFilePath(FilePath::parse('michaelhall/html-validator-plugin/'));\n if (!is_dir($cacheDirectory->__toString())) {\n return;\n }\n\n foreach (scandir($cacheDirectory->__toString()) as $cacheFile) {\n if ($cacheFile === '.' || $cacheFile === '..' || substr($cacheFile, -5) !== '.json') {\n continue;\n }\n\n unlink($cacheDirectory->__toString() . $cacheFile);\n }\n rmdir($cacheDirectory->__toString());\n }", "title": "" }, { "docid": "4a70d481d0f5c3d892b22cd35c5e7de0", "score": "0.70461816", "text": "public function purgeImageCache()\n\t{\n\t\t// Walk through the subfolders\n\t\tforeach (scan(TL_ROOT . '/assets/images') as $dir)\n\t\t{\n\t\t\tif ($dir != 'index.html' && strncmp($dir, '.', 1) !== 0)\n\t\t\t{\n\t\t\t\t// Purge the folder\n\t\t\t\t$objFolder = new \\Folder('assets/images/' . $dir);\n\t\t\t\t$objFolder->purge();\n\n\t\t\t\t// Restore the index.html file\n\t\t\t\t$objFile = new \\File('templates/index.html', true);\n\t\t\t\t$objFile->copyTo('assets/images/' . $dir . '/index.html');\n\t\t\t}\n\t\t}\n\n\t\t// Also empty the page cache so there are no links to deleted images\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Purged the image cache', __METHOD__, TL_CRON);\n\t}", "title": "" }, { "docid": "b190371e7db91bee9dbd28065fab26c0", "score": "0.7028215", "text": "public function clearCache() {}", "title": "" }, { "docid": "b190371e7db91bee9dbd28065fab26c0", "score": "0.7027262", "text": "public function clearCache() {}", "title": "" }, { "docid": "7a84754f092e131b283f50a37dc78e8d", "score": "0.70224684", "text": "private function __deleteCache()\n {\n $iterator = new RecursiveDirectoryIterator(CACHE);\n foreach(new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file)\n {\n $path_info = pathinfo($file);\n \n if($path_info['dirname'] == ROOT . DS . \"tmp\" . DS . \"cache\")\n {\n \t$file_name = $path_info['filename'];\n \t$file_arr = str_split($file_name, 25);\n \t\n if($file_arr[0] == \"UserMgmt_rules_for_group_\")\n {\n \tunlink($file->getPathName());\n }\n }\n }\n }", "title": "" }, { "docid": "304fa82ffda5436c63d6f3e708777dfd", "score": "0.6986334", "text": "public function invalidateAll() : void\n {\n $files = glob($this->path . \"/*\"); // get all file names\n foreach ($files as $file) { // iterate files\n if (is_file($file)) {\n unlink($file); // delete file\n }\n }\n }", "title": "" }, { "docid": "4840db95a2e2f75cd14bd672fd5dc9fb", "score": "0.69491816", "text": "protected static function flush()\n\t{\n\t\t$items = new fIterator(path('storage').'views');\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\tif ($item->isFile() and $item->getBasename() !== '.gitignore')\n\t\t\t{\n\t\t\t\t@unlink($item->getRealPath());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d2c81011e535bfc6d5adbfe3e2d9fd7b", "score": "0.69332284", "text": "protected function clear()\n {\n $msg = new Message();\n \n if(!Dir::exist('storage/cache/'))\n {\n Dir::makeFolder('storage/', 'cache');\n $msg->success('Cache folder was successfully cleared.');\n }\n\n $dir = new Directory('storage/cache');\n \n foreach($dir->files() as $file)\n {\n if($file->is('php'))\n {\n $msg->success('Cache file has been cleared.');\n $file->delete();\n }\n }\n\n $core = new Reader('public/js/core.js');\n\n if($core->exist())\n {\n $msg->success('Core javascript cache file has been cleared.');\n $core->delete();\n }\n }", "title": "" }, { "docid": "48b857f977ca0e39da55945ff25893f1", "score": "0.69226545", "text": "public static function clear_file_contents_cache() {\n\t\tself::$file_contents = [];\n\t}", "title": "" }, { "docid": "d54c4f311dbd91d42a549f42a7220cd9", "score": "0.69196856", "text": "abstract public function cacheClean();", "title": "" }, { "docid": "4f1f580eb549fcc04463b134b004f296", "score": "0.6904437", "text": "function w3tc_cdn_purge_files() {\n\t\t$title = __( 'Content Delivery Network (CDN): Purge Tool', 'w3-total-cache' );\n\t\t$results = array();\n\n\t\t$files = Util_Request::get_array( 'files' );\n\n\t\t$purge = array();\n\n\t\t$common = Dispatcher::component( 'Cdn_Core' );\n\n\t\tforeach ( $files as $file ) {\n\t\t\t$local_path = $common->docroot_filename_to_absolute_path( $file );\n\t\t\t$remote_path = $common->uri_to_cdn_uri( $common->docroot_filename_to_uri( $file ) );\n\n\t\t\t$purge[] = $common->build_file_descriptor( $local_path, $remote_path );\n\t\t}\n\n\t\tif ( count( $purge ) ) {\n\t\t\t$common->purge( $purge, false, $results );\n\t\t} else {\n\t\t\t$errors[] = __( 'Empty files list.', 'w3-total-cache' );\n\t\t}\n\n\t\t$path = str_replace( get_home_url(), '', get_stylesheet_directory_uri() );\n\t\tinclude W3TC_INC_DIR . '/popup/cdn_purge.php';\n\t}", "title": "" }, { "docid": "7498e8d7ce8cf5a9dd93378cba8ca1eb", "score": "0.6903804", "text": "function sed_diskcache_clearall()\n{\n\tglobal $cfg;\n\n\tsed_diskcache_clear($cfg['cache_dir'], false);\n\tforeach (glob(\"{$cfg['cache_dir']}/*\", GLOB_ONLYDIR) as $dir)\n\t{\n\t\tsed_diskcache_clear($dir);\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "4389117d43277a5ce7a114dd3a545f88", "score": "0.68982184", "text": "public function invalidateCaches()\n {\n ManifestHelper::invalidateCaches();\n }", "title": "" }, { "docid": "5572e1f230adfeb3a2b158bdd1b38c0a", "score": "0.68746865", "text": "public function delete_all()\n\t{\n\t\t$this->_cache_dir_usable or $this->_check_cache_dir();\n\n\t\treturn $this->_delete_file($this->_cache_dir, TRUE);\n\t}", "title": "" }, { "docid": "f37ad1b7d002fb24f96e6187fd78da28", "score": "0.6870671", "text": "public function clearCache(): void;", "title": "" }, { "docid": "d683907f57206ce55f0d7ead0c2e6d3b", "score": "0.6860045", "text": "public function clearCacheEntries(): void\n {\n\t\t$this->deleteCacheEntries();\n\t}", "title": "" }, { "docid": "91e2694ef089ee05690cc3f2a2181616", "score": "0.6836902", "text": "protected function clearCaches()\n {\n $this->callSilent('clear-compiled');\n $this->callSilent('cache:clear');\n $this->callSilent('route:clear');\n $this->callSilent('config:clear');\n $this->callSilent('view:clear');\n Cache::flush();\n }", "title": "" }, { "docid": "a661b66a6ce295d0a3c0ad707a7ae64e", "score": "0.683617", "text": "public function delete_all()\n\t{\n\t\tdelete_files($this->db->cachedir, TRUE, TRUE);\n\t}", "title": "" }, { "docid": "9eb3376ac0b6f4609f60eb84ee851be4", "score": "0.68265927", "text": "private function clearCache($allCache = true){\n \tif (is_dir($this->cache_dir)) {\n \t\tif ($dh = opendir($this->cache_dir)) {\n \t\t\twhile (($file = readdir($dh)) !== false) {\n \t\t\t\tif (filemtime($this->cache_dir . $file) < (time() - ($this->cache_time * 61)) || $allCache) {\n \t\t\t\t\t@unlink($this->cache_dir . $file);\n \t\t\t\t}\n \t\t\t}\n \t\t\tclosedir($dh);\n \t\t}\n \t}\n }", "title": "" }, { "docid": "93efd64dec6c8062fc9063ee9e343208", "score": "0.68140846", "text": "function cleancache() {\n\tLiber::loadClass('SiteMapCache', 'APP', true)->cleanCache();\n\n\t$temp_path = Liber::conf('APP_PATH').'temp/';\n\n\tif ( !file_exists($temp_path) ) {\n\t\tumask(0007);\n\t\tmkdir($temp_path, 0770, true);\n\t}\n\n\t$cache_path = Liber::conf('APP_ROOT').Liber::conf('FUNKY_PATH');\n\tif ( (basename(Liber::conf('FUNKY_PATH'))) and file_exists($cache_path) ) {\n\t\treturn rename( $cache_path, $temp_path.'_'.date('Ymdhis'));\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "e1512fc8404d8c3c154e0d7e3c6d1a8b", "score": "0.6789721", "text": "public function unlinkTempFiles() {}", "title": "" }, { "docid": "8526b0af28ebf96b2c65834694fa0058", "score": "0.6788823", "text": "public function clean() {\n // Clean Temporary Files\n if (is_dir($this->tmpPath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->tmpPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n\n // Clean Cache Files\n if (is_dir($this->cachePath)) {\n $objects = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->cachePath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n foreach ($objects as $name => $object) {\n if (!$object->isDir()) {\n @unlink($name);\n }\n }\n }\n }", "title": "" }, { "docid": "2c54644a7a651f037c1f1ab15629ba3e", "score": "0.678865", "text": "public function removeRegisteredFiles() {}", "title": "" }, { "docid": "e1512fc8404d8c3c154e0d7e3c6d1a8b", "score": "0.6788049", "text": "public function unlinkTempFiles() {}", "title": "" }, { "docid": "1793af66df2e681eb06db9fb58f54e00", "score": "0.67822987", "text": "public function clean()\n\t{\n\t\t$this->storage->clean([Cache::ALL => TRUE]);\n\t}", "title": "" }, { "docid": "d55f3eaa71ab3c82dc6ef3d11714c81e", "score": "0.6767133", "text": "private function clean_cache()\n\t{\n\t\t//gc probability\n\t\t$gc = rand(1, Kohana::config($this->type.'.cache_gc'));\n\t\tif ($gc != 1) return FALSE;\n\t\t$cache = new DirectoryIterator(Kohana::config($this->type.'.cache_folder'));\n\t\twhile ($cache->valid())\n\t\t{\n\t\t\t// if file is past maximum cache settings delete file\n\t\t\t$cached = date('U', $cache->getMTime());\n\t\t\t$max = time() + Kohana::config($this->type.'.cache_clean_time');\n\t\t\tif ($cache->isFile() AND ($cached > $max))\n\t\t\t{\n\t\t\t\tunlink($cache->getPathname());\n\t\t\t}\n\t\t\t$cache->next();\n\t\t}\n\t}", "title": "" }, { "docid": "32b4b9a1721dc9196e43685d0e520b34", "score": "0.6766756", "text": "public function clearCache(){\n\t\t\n\t\t// Set the state and tell plugins.\n\t\t$this->setState('EMPTYING_CACHE');\n\t\t$this->notifyObservers();\n\t\t\n\t\t//Include the file operations class\n\t\tinclude(\"core/lib/FileOperations.php\");\n\t\t\n\t\t//Start up file operations class\n\t\t$fop = new FileOperations();\n\t\t\n\t\t//Let user know about the clearing cache title\n\t\t$this->getController()->getPaging()->setContentTitle(\"Clearing Page Cache\");\n\t\t\n\t\t//Clear the contents of the cache - and show progress.\n\t\t$this->getController()->getPaging()->setContent($fop->emptyDir(\"cache\"));\n\t}", "title": "" }, { "docid": "5235200c46b47e40c14b92856332bf22", "score": "0.6764541", "text": "function ag_clean_wm_cache() {\n\trequire_once(AG_DIR . '/functions.php');\n\t\n\t$wp_dirs = wp_upload_dir();\n\t$cache_dir = trailingslashit($wp_dirs['basedir']) . 'ag_watermarked';\n\t\n\t// folder exists?\n\tif(!@file_exists($cache_dir)) {\n\t\tdie('success');\t\n\t}\n\t\n\t// clean\n\tforeach(scandir($cache_dir) as $file) {\n\t\t$ext = ag_stringToExt($file);\n\t\t$accepted = array('.jpg', '.jpeg', '.gif', '.png');\n\t\t\n\t\tif(in_array($ext, $accepted) && file_exists($cache_dir.'/'.$file)) {\n\t\t\tunlink($cache_dir.'/'.$file);\n\t\t}\t\n\t}\n\n\tdie('success');\n}", "title": "" }, { "docid": "eed098d3b85bfe8a5bc5e641b347dca5", "score": "0.6748985", "text": "public function purgeCaptchaFiles()\n\t{\n\t\tforeach (new DirectoryIterator($this->captchaDir) as $fileInfo) {\n\t\t\tif($fileInfo->isFile()) {\n\t\t\t\tif ($fileInfo->getMTime() < $this->expTime) {\n\t\t\t\t\tunlink($this->captchaDir . DIRECTORY_SEPARATOR . $fileInfo->getFilename());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2a079b6f79ec0b92bc71a92c050fee29", "score": "0.67442423", "text": "public function garbage_collect()\n\t{\n\t\t$this->_cache_dir_usable or $this->_check_cache_dir();\n\n\t\t$this->_delete_file($this->_cache_dir, TRUE, FALSE, TRUE);\n\t\treturn;\n\t}", "title": "" }, { "docid": "97cd9114a8502f548dce884eae1ca796", "score": "0.67372656", "text": "public function clear_cache(): void;", "title": "" }, { "docid": "266b11d241799637999d5f820034065e", "score": "0.67204237", "text": "function delcache($dir = \"site/cache/cart/\") {\r\n if (is_dir($dir)) {\r\n if ($handle = opendir($dir)) {\r\n while (false !== ($file = readdir($handle))) {\r\n if (strlen($file) > 4 && file_exists($dir . '/' . $file)) {\r\n chmod($dir . '/' . $file, 0777);\r\n @unlink($dir . '/' . $file);\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ba3b34c76b5ab9fbe29c645f55a92803", "score": "0.67107004", "text": "protected function emptyCacheDirectory()\n {\n foreach (new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->service->getOptions()->getCachePath(), \\RecursiveDirectoryIterator::SKIP_DOTS), \\RecursiveIteratorIterator::CHILD_FIRST\n ) as $oFileinfo) {\n if ($oFileinfo->isDir()) {\n rmdir($oFileinfo->getRealPath());\n } elseif ($oFileinfo->getBasename() !== '.gitignore') {\n unlink($oFileinfo->getRealPath());\n }\n }\n }", "title": "" }, { "docid": "3b56bc06980615e325c56d13ae289770", "score": "0.6710185", "text": "public function clear() {\n\t\t$counter = 0;\n\t\t$files = glob( $this->cache_directory . '*' );\n\n\t\tforeach ( $files as $file ) {\n\t\t\tif ( is_file( $file ) ) {\n\t\t\t\tunlink( $file );\n\t\t\t\t$counter ++;\n\t\t\t}\n\t\t}\n\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "9f5aa215cbff3264dbafcf98a6fb485d", "score": "0.6708854", "text": "public function deleteUnusedFiles(){\n \n }", "title": "" }, { "docid": "6ab0ce58bffb5854d74c67674b2173fe", "score": "0.66804343", "text": "public function clearResizedImagesCache(): void\n {\n $this->mediaDirectory->delete(Resizer::IMAGE_RESIZE_CACHE_DIR);\n }", "title": "" }, { "docid": "f3aab6615e065ff2d925f26fc4771107", "score": "0.6676932", "text": "public function removeCacheFile()\n {\n $finder = new Finder();\n $finder->files()->in($this->cacheDir)->name('database.resources.php');\n $deleted = true;\n foreach ($finder as $file) {\n $path = $file->getRealPath();\n $this->invalidateSystemCacheForFile($path);\n $deleted = unlink($path);\n\n $metadata = $path . '.meta';\n if (file_exists($metadata)) {\n $this->invalidateSystemCacheForFile($metadata);\n unlink($metadata);\n }\n }\n\n return $deleted;\n }", "title": "" }, { "docid": "22aed2daaafc1201e88cc2282a3c9283", "score": "0.6654035", "text": "public function cleanUpCache()\n\t{\n\t\tif (!$this->getCodePath()) \n\t\t{\n\t\t\t$this->findTemplate(); $this->setCodeFile();\n\t\t\tif (!$this->getCodePath()) throw new PHPTAL_ConfigurationException(\"No codefile\");\n\t\t}\n\t\t\n\t\t$filename = $this->getCodePath();\t\t\n\t\t$phptalCacheFiles = glob($filename . '*');\n\t\tif ($phptalCacheFiles) foreach($phptalCacheFiles as $file)\n\t\t{\n\t\t if (substr($file, 0, strlen($filename)) !== $filename) continue; // safety net\n\t\t\t@unlink($file);\n\t }\n $this->_prepared = false;\n\t}", "title": "" }, { "docid": "ae27918dd53b160a5c7b1105bed85af2", "score": "0.66397184", "text": "public function cacheClean( )\n {\n\n if( isset($_SESSION['CACHE']) )\n {\n unset($_SESSION['CACHE']);\n }\n\n }", "title": "" }, { "docid": "a885f9875ed394411780b301ac1ab67d", "score": "0.6626784", "text": "public function clear()\n {\n sfToolkit::clearDirectory($this->getConfigCacheDir());\n }", "title": "" }, { "docid": "8216b1d9914678ea68ce8c9442499f33", "score": "0.66120654", "text": "private function flushImageCache()\n {\n $this->imagesCache = null;\n $this->variantImages = null;\n }", "title": "" }, { "docid": "c5ca5a9007b33fb44bd107eba7c0e253", "score": "0.6607441", "text": "public static function cleanTemplatesCache()\r\n {\r\n $path = APP_VAR_DIR.'/_compiled/site/*';\r\n exec('rm -rf '.$path);\r\n return true;\r\n }", "title": "" }, { "docid": "7e0df0e3120bad045ea3dc6ef3e11cf9", "score": "0.6597694", "text": "private function flushImageCache(): void\n {\n $this->imagesCache = null;\n $this->variantImages = null;\n }", "title": "" }, { "docid": "efc96b072de62ec7671ccc15546caa39", "score": "0.6588383", "text": "protected static function clearCompiled()\n {\n $laravel = new Application(getcwd());\n\n if (file_exists($servicesPath = $laravel->getCachedServicesPath())) {\n @unlink($servicesPath);\n }\n\n if (file_exists($packagesPath = $laravel->getCachedPackagesPath())) {\n @unlink($packagesPath);\n }\n }", "title": "" }, { "docid": "83d6f1cb9acae0fb88ec41734cd0d7ce", "score": "0.6588364", "text": "public function clearCacheAndStats() {\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tforeach (Shop::getContextListShopID() as $id_shop) {\n\t\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop)) {\n\t\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache(Shop::getContextListShopID());\n\t\t}\n\t\telse {\n\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/')) {\n\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache', false);\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache();\n\t\t}\n\t}", "title": "" }, { "docid": "9a732a9b3bda1654c21dd9805369d781", "score": "0.65838593", "text": "static function purgeCache()\n {\n $cache =& wfGetMainCache();\n $cache->delete('vp:surveyslist');\n }", "title": "" }, { "docid": "64c8af15ca35c4005ced8ae5e876e31d", "score": "0.65776205", "text": "public function clearExpired() {\r\n\t\t$options = $this->getOptions ();\r\n\t\t$namespace = $options->getNamespace ();\r\n\t\t$prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator ();\r\n\t\t\r\n\t\t$flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_FILEINFO;\r\n\t\t$path = $options->getCacheDir () . str_repeat ( DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel () ) . DIRECTORY_SEPARATOR . $prefix . '*.dat';\r\n\t\t$glob = new GlobIterator ( $path, $flags );\r\n\t\t$time = time ();\r\n\t\t$ttl = $options->getTtl ();\r\n\t\t\r\n\t\tErrorHandler::start ();\r\n\t\tforeach ( $glob as $entry ) {\r\n\t\t\t$mtime = $entry->getMTime ();\r\n\t\t\tif ($time >= $mtime + $ttl) {\r\n\t\t\t\t$pathname = $entry->getPathname ();\r\n\t\t\t\tunlink ( $pathname );\r\n\t\t\t\t\r\n\t\t\t\t$tagPathname = substr ( $pathname, 0, - 4 ) . '.tag';\r\n\t\t\t\tif (file_exists ( $tagPathname )) {\r\n\t\t\t\t\tunlink ( $tagPathname );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$error = ErrorHandler::stop ();\r\n\t\tif ($error) {\r\n\t\t\tthrow new Exception\\RuntimeException ( \"Failed to clear expired items\", 0, $error );\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "ba28b4dadfdfa5b8e6fa54d1be323f66", "score": "0.6574721", "text": "public function cleanUpGarbage()\n\t{\n\t\t$phptalCacheFilesExpire = time() - $this->getCacheLifetime() * 3600 * 24;\n\t\t$upperLimit = $this->getPhpCodeDestination() . 'tpl_' . $phptalCacheFilesExpire . '_';\n\t\t$lowerLimit = $this->getPhpCodeDestination() . 'tpl_0_';\n\t\t$phptalCacheFiles = glob($this->getPhpCodeDestination() . 'tpl_*.' . $this->getPhpCodeExtension() . '*');\n\n\t\tif ($phptalCacheFiles)\n\t\t{\n\t\t\tforeach($phptalCacheFiles as $index => $file)\n\t {\n\t\t\t\tif ($file > $upperLimit && substr($file,0,strlen($lowerLimit)) !== $lowerLimit)\n\t\t\t\t{\n\t\t\t\t unset($phptalCacheFiles[$index]);\n\t\t\t\t}\n\t }\n\t foreach($phptalCacheFiles as $file)\n\t {\n\t $time = filemtime($file);\n\t if ($time && $time < $phptalCacheFilesExpire) @unlink($file);\t\t\t \n\t\t }\n\t }\n\t}", "title": "" }, { "docid": "187048aa47601225247c976b2fda21bc", "score": "0.65668637", "text": "protected function purgeCache() {\n\t\tConfigboxCacheHelper::purgeCache();\n\t}", "title": "" }, { "docid": "3b2c0ae88aeae78fe5c6726f7556531c", "score": "0.656608", "text": "function reset_caches() {\n \n $this->ext->reset_caches();\n \n }", "title": "" }, { "docid": "1ccc38979049cef4151e904059e7618b", "score": "0.65568537", "text": "public function removeCache()\n {\n $this->getHttpClientBuilder()->removeCache();\n }", "title": "" }, { "docid": "a4f28f0b6e02af0921f41d009d58afdc", "score": "0.6548475", "text": "protected function _resetPersistentCache() {\n $oUtils = Registry::getUtils();\n $sCacheDir = $oUtils->getCacheFilePath(null, true);\n $aDir = glob($sCacheDir.'*');\n if(is_array($aDir)) {\n $aDir = preg_grep(\"/c_fieldnames_|c_tbdsc_|_allfields_/\", $aDir);\n foreach($aDir as $iKey => $sData) {\n if(!is_dir($sData)) {\n @unlink($sData);\n }\n }\n }\n }", "title": "" }, { "docid": "0832d22ba61692356e4b316078925683", "score": "0.65405786", "text": "public function clearCache()\n\t{\n\t\t$e107 = e107::getInstance();\n\t\t$e107->ecache->clear_sys(UC_CACHE_TAG);\n\t}", "title": "" }, { "docid": "9e2d80b98ca623e1ea8a1c7b631d27f3", "score": "0.65377325", "text": "function clearAjaxCacheFiles($startDate = NULL) {\n\n\t\t$dir = PATH_site.'typo3temp/tx_woehrlseminare/';\n\t\tif ($startDate === NULL)\n\t\t\tsystem ('rm '.$dir.'calfile*');\n\t\telse {\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file) {\n\t\t\t\t$fileDetails = preg_split('/_/', $file);\n\t\t\t\tif ($startDate > $fileDetails[2] && $startDate < $fileDetails[3])\n\t\t\t\t\tsystem ('rm '.$dir.$file);\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "57f6636d6418e13637d74aa7cbbc005f", "score": "0.65308136", "text": "function clearCache () {\n $this->reset();\n while (list (,$img) = each ($this->arrayList)) {\n $img->clearCache ();\n }\n }", "title": "" }, { "docid": "fa58c455c740668050ed074ab525154e", "score": "0.6529059", "text": "protected static final function clearCache () {\r\n // Do a new FileDirectory, prepended DOCUMENT_ROOT;\r\n \t$cacheFile = new FileDirectory (CACHE_DIR, TRUE);\r\n \t// Clean-up EVERYTHING, except the dots;\r\n \t// Should use DirectoryIterator here, to be implemented soon;\r\n for ($i = 2, $cacheCount = count ($cacheFile = scandir ($cacheFile)); $i < $cacheCount; ++$i) {\r\n // Just do skip over .dirs and .files;\r\n if ($cacheFile[$i][0] != '.') {\r\n UNLINK ($cacheDirectory . _S . $cacheFile[$i]);\r\n }\r\n }\r\n\r\n // Do return ...\r\n return new B (TRUE);\r\n }", "title": "" }, { "docid": "c501f645aaa8a66b6fe3fe7bbd20c04d", "score": "0.652464", "text": "protected function removeFiles() {}", "title": "" }, { "docid": "b58c02173b6b356529ab7bd76fe2fbff", "score": "0.6514055", "text": "private function purgeCache()\n\t{\n\t\tJLoader::import('joomla.application.helper');\n\t\tJLoader::import('joomla.cms.application.helper');\n\n\t\t// Site client\n\t\t$client = class_exists('Joomla\\\\CMS\\\\Application\\\\ApplicationHelper') ? \\Joomla\\CMS\\Application\\ApplicationHelper::getClientInfo(0) : JApplicationHelper::getClientInfo(0);\n\n\t\t$er = @error_reporting(0);\n\t\t$cache = JFactory::getCache('');\n\t\t$cache->clean('sillylongnamewhichcantexistunlessyouareacompletelyparanoiddeveloperinwhichcaseyoushouldnotbewritingsoftwareokay', 'notgroup');\n\t\t@error_reporting($er);\n\t}", "title": "" }, { "docid": "8d3d75c18b2662b66e1509db851c0fce", "score": "0.6510992", "text": "public static function clear_file_cache( $force_delete = false ){\r\n\t\t// Use this variable to ensure this only runs once per request\r\n\t\tstatic $done = false;\r\n\t\tif ( $done && !$force_delete ) return;\r\n\r\n\t\tif( !get_transient('sow:cleared') || $force_delete ) {\r\n\r\n\t\t\trequire_once ABSPATH . 'wp-admin/includes/file.php';\r\n\t\t\tif( WP_Filesystem() ) {\r\n\t\t\t\tglobal $wp_filesystem;\r\n\t\t\t\t$upload_dir = wp_upload_dir();\r\n\r\n\t\t\t\t$list = $wp_filesystem->dirlist( $upload_dir['basedir'] . '/siteorigin-widgets/' );\r\n\t\t\t\tif ( ! empty( $list ) ) {\r\n\t\t\t\t\tforeach($list as $file) {\r\n\t\t\t\t\t\tif( $file['lastmodunix'] < time() - self::$css_expire || $force_delete ) {\r\n\t\t\t\t\t\t\t// Delete the file\r\n\t\t\t\t\t\t\t$wp_filesystem->delete( $upload_dir['basedir'] . '/siteorigin-widgets/' . $file['name'] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Set this transient so we know when to clear all the generated CSS.\r\n\t\t\tset_transient('sow:cleared', true, self::$css_expire);\r\n\t\t}\r\n\r\n\t\t$done = true;\r\n\t}", "title": "" }, { "docid": "1828830989ea76f8cdd30d7a12ffd24e", "score": "0.650306", "text": "private function destroyCache()\r\n\t{\r\n\t\t$memcache = new \\Memcached();\r\n\t\t$memcache->addServer('localhost', 11211);\r\n\t\t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n\t\t$cache_data = $memcache->delete($key);\r\n\t}", "title": "" }, { "docid": "a03e6e07837113f10e068cbce8b2a70b", "score": "0.6488238", "text": "function clean_old_files(){\n\t$files = scandir(OUTPUT_FOLDER);\n\tforeach($files as $file){\n\t\tif($file != '.' && $file != '..'){\n\t\t\t$ext = substr($file,-4,4);\n\t\t\tif($ext == 'json'){\n\t\t\t\t$filemtime = filemtime(OUTPUT_FOLDER.'/'.$file);\n\t\t\t\t$diff = time() - $filemtime;\n\t\t\t\tif($diff >= FILE_LIFETIME){\n\t\t\t\t\t@unlink(OUTPUT_FOLDER.'/'.$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "25752411b915379b2a97a8bf62cb495c", "score": "0.64871514", "text": "public function clearCache()\n {\n $this->cache->deleteAll();\n }", "title": "" }, { "docid": "8a3c32c2b204915fce04c6741e425bec", "score": "0.6482524", "text": "public static function clear(): void\n {\n static::getCache()->clear();\n }", "title": "" }, { "docid": "2aa975a9e6238b3e850676802486ad29", "score": "0.6476299", "text": "public function purgeAll() : void\n {\n // Run event: onCacheAfterPurgeAll\n flextype('emitter')->emit('onCacheAfterPurgeAll');\n\n // Remove cache directory\n Filesystem::deleteDir(PATH['cache']);\n\n // Save and Mute error_reporting\n $errorReporting = error_reporting();\n error_reporting(0);\n\n // Clear stat cache\n clearstatcache();\n\n // Clear opcache\n function_exists('opcache_reset') and opcache_reset();\n\n // Restore error_reporting\n error_reporting($errorReporting);\n\n // Run event: onCacheAfterPurgeAll\n flextype('emitter')->emit('onCacheAfterPurgeAll');\n }", "title": "" }, { "docid": "8ad302b9b76d892b6e4328c6d592ee0e", "score": "0.6475469", "text": "public static function flush() : bool\n {\n $cache_files = glob(self::$config['cache_path'].'/*.cache', GLOB_NOSORT);\n \n foreach ($cache_files as $file) {\n @unlink($file);\n }//end foreach\n \n return true;\n \n }", "title": "" }, { "docid": "1bda14fb5a15d152043ecd95d2d8bc89", "score": "0.64748687", "text": "function rexseo_purgeCacheFiles($ext='.content')\n{\n global $REX;\n $pattern = $REX['INCLUDE_PATH'].'/generated/articles/*'.$ext;\n $purge_files = glob($pattern);\n\n if(is_array($purge_files) && count($purge_files)>0)\n {\n foreach ($purge_files as $file)\n {\n unlink($file);\n }\n }\n}", "title": "" }, { "docid": "4994ab54e1f3052bcbb7d1ec5d15ddbb", "score": "0.6466177", "text": "public function clear($uri = '')\n {\n if ($uri == '') {\n $files = glob($this->getDirectory() . DIRECTORY_SEPARATOR . '*.cache');\n foreach ($files as $file) {\n unlink($file);\n }\n }\n\n $filename = $this->getCacheFilename($uri);\n\n if (file_exists($filename)) {\n unlink($filename);\n }\n }", "title": "" }, { "docid": "ce788135f58f8f4a0d8b43f477cbbcac", "score": "0.64646757", "text": "public function flushCaches() {}", "title": "" } ]
a604e4c07a22e73100d1ef5710e4c861
okey etwas witzlos die md5 Geschichte hier
[ { "docid": "b44091dbfefaf89fdae14f0675703910", "score": "0.0", "text": "function checklogin($password){\n if(md5($password)==md5(\"thepassword\")){\n $_SESSION[\"mypw\"]=md5($password) ;\n return true;\n }else{\n return false;\n }\n}", "title": "" } ]
[ { "docid": "93ad0cc61aca0d89bfc2bfbba8747f2d", "score": "0.6792449", "text": "function Md5_pass($data){\n\t\t$data = md5($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "feaab6b8117c8c9eb49e68e853ac6550", "score": "0.6766697", "text": "function enc5($value){\n\t$data = md5($value);\n\treturn $data;\n}", "title": "" }, { "docid": "83da88609d175c4fc3d4c306e15dddff", "score": "0.67387265", "text": "function isMd5();", "title": "" }, { "docid": "3c3015dc0d8bf699f35a68bef5cba346", "score": "0.6707735", "text": "public function md5($raw_output = false);", "title": "" }, { "docid": "ef17be1e0a864ced404e9555388bcb34", "score": "0.6659566", "text": "function md5Encode(){\n $token = getToken();\n $apikey = getApiKey();\n $accessKey = md5($token.$apikey);\n return $accessKey;\n }", "title": "" }, { "docid": "966a9276f1689810af89218676d7d9cb", "score": "0.66397125", "text": "function sodium_crypto_auth_keygen(): string {}", "title": "" }, { "docid": "67512e124d7b4c67742eff8bea456be3", "score": "0.66286075", "text": "private function make_hash($key)\n {\n return md5($key);\n }", "title": "" }, { "docid": "7d9e225741a0209c707703bec7a8efe9", "score": "0.65121835", "text": "public function getRealKey($key)\n {\n return $this->m_path . md5($key);\n }", "title": "" }, { "docid": "6539d3e0f2b09ff2523fdd056679b8d4", "score": "0.64987093", "text": "function SecretKey($data) { return md5($data); }", "title": "" }, { "docid": "1a70a4519a56a71698d4c3ebbe472dd6", "score": "0.649263", "text": "public function makeHash () ;", "title": "" }, { "docid": "18b209e7e00dd8917bfd5428f8791625", "score": "0.64502454", "text": "function md5(\\Google\\Service\\PeopleService\\Person $c);", "title": "" }, { "docid": "c649eaa4a304b0a0697ae97c3c712761", "score": "0.6431678", "text": "function encript($pass){\r\n return \"MD5('\".$pass.\"')\";\r\n }", "title": "" }, { "docid": "b270075c4b741b3500a336edd10da922", "score": "0.64050484", "text": "private function getKey() {\n\n if ($this->key != \"\") return $this->key;\n $id = $this->user->ID;\n $guid = $this->user->Guid;\n $this->key = base64_encode($id . '+' . md5($guid));\n\n return $this->key;\n }", "title": "" }, { "docid": "bc7bde6d9658d70e3e39e6dfbfec7cc0", "score": "0.6376299", "text": "function get_hash($id){\n return substr(md5($id.'moreplannerv1'),0,5);\n}", "title": "" }, { "docid": "590287d7d4db64db5e2f9cbbe516f5bc", "score": "0.6339145", "text": "function sodium_crypto_generichash_keygen(): string {}", "title": "" }, { "docid": "949a013ab59eba75450ac099c2d0e956", "score": "0.6335029", "text": "private static function getKey()\n {\n return md5(uniqid(session_id().rand(), true));\n }", "title": "" }, { "docid": "8dade22e450e887ef550586fb720ec8a", "score": "0.6331432", "text": "function ga_md5($name){\r\n\t\t$parts = explode('&auth=', $name);\r\n\t\tif(is_array($parts) && count($parts) > 1){\r\n\t\t\t$name = $parts[0];\r\n\t\t}\r\n\t\treturn md5($name);\r\n\t}", "title": "" }, { "docid": "8f8d560b6314621cdfc53c88c2c3c44b", "score": "0.63004744", "text": "public function md5sum()\n\t{\n\t\tvar_dump($this);\n\t\treturn md5($this->readAll());\n\t}", "title": "" }, { "docid": "8beffa9da7a772bb7a7e7d7b24b35ecf", "score": "0.62887293", "text": "protected function calculateUserKey() {\n return $this->keyPrefix . (\\Yii::$app->user->identity->id); //md5\n }", "title": "" }, { "docid": "3769bd3a2580bc747e54f6a415386293", "score": "0.62832075", "text": "public function key();", "title": "" }, { "docid": "3769bd3a2580bc747e54f6a415386293", "score": "0.62832075", "text": "public function key();", "title": "" }, { "docid": "3769bd3a2580bc747e54f6a415386293", "score": "0.62832075", "text": "public function key();", "title": "" }, { "docid": "3769bd3a2580bc747e54f6a415386293", "score": "0.62832075", "text": "public function key();", "title": "" }, { "docid": "3769bd3a2580bc747e54f6a415386293", "score": "0.62832075", "text": "public function key();", "title": "" }, { "docid": "179b5561a4789b3a5ad132684e97da4b", "score": "0.62794566", "text": "public function getHash()\n {\n $in = $this->getNumber() . 'fashk' . $this->getCvv() . 'teryui' . $this->getExpYear() . 'wdljk' . $this->getExpMonth();\n $result = md5($in);\n return $result;\n }", "title": "" }, { "docid": "91150495a890e38c75fa2802a306153f", "score": "0.6256307", "text": "function sodium_crypto_shorthash_keygen(): string {}", "title": "" }, { "docid": "c559d5ce43224a44a07b43946113148f", "score": "0.6239124", "text": "private function getMd5()\n {\n return $this->md5;\n }", "title": "" }, { "docid": "f1735008e762def8699e8baff5785a09", "score": "0.6232864", "text": "private function ha1()\n {\n if ($this->_message->algorithm && $this->_message->algorithm == 'MD5-sess') {\n return md5(sprintf(\"%s:%s:%s\", sprintf(\"%s:%s:%s\", $this->_user, $this->_realm, $this->_pass), $this->_message->nonce, $this->_message->cnonce));\n } else {\n return md5(sprintf(\"%s:%s:%s\", $this->_user, $this->_realm, $this->_pass));\n }\n }", "title": "" }, { "docid": "8f01d436c19d1fbe329bec7c5d497dcb", "score": "0.62220407", "text": "function hash(){\n\t\t$hh=hash_init( \"md5\" );\n\t\tforeach(static::$attributesForHashing as $atrName)hash_update($hh,$this->$atrName);\n\t\t$h=unpack('L',hash_final( $hh ,1));\n\t\t$this->hash=$h[1];\n\t\treturn $h[1];\n\t}", "title": "" }, { "docid": "e67e5fbf83fd19e262692782049bf006", "score": "0.6221101", "text": "function security_encode($data, $key = '')\n{\n $CI =& get_instance();\n\n $data = md5($data);\n\n if ($key != '') {\n $data .= $key;\n $data = md5($data);\n }\n\n $data .= $CI->config->item('encryption_key');\n $data = md5($data);\n\n return $data;\n}", "title": "" }, { "docid": "8c7dcf7b0afc3e4e6d1c51fb4370e3d8", "score": "0.6217859", "text": "private function encypt($value)\n {\n return md5($value);\n }", "title": "" }, { "docid": "14b530a5561c1613adebabed409ec035", "score": "0.62125236", "text": "private function createMD5Hash()\n {\n return md5_file($this->src);\n }", "title": "" }, { "docid": "63e6ddc96d4fcbf8eb4495aec158bd72", "score": "0.6204783", "text": "private function generateKey(){\n\t\tdo{\n\t\t\t$key = sha1(microtime(true).mt_rand(10000,90000));\n\t\t\t$unicityTest = $this->Photo->findBySecretkey($key);\t\t\n\t\t}while(!empty($unicityTest));\n\t\t\n\t\t//$this->out('[SUCCESS] The Generated Key is: '.substr($key,0,10));\n\t\treturn substr($key,0,20);\n\t}", "title": "" }, { "docid": "8fd342e6051bba78c1e66349c32a8689", "score": "0.6160794", "text": "public function hash();", "title": "" }, { "docid": "8fd342e6051bba78c1e66349c32a8689", "score": "0.6160794", "text": "public function hash();", "title": "" }, { "docid": "8fd342e6051bba78c1e66349c32a8689", "score": "0.6160794", "text": "public function hash();", "title": "" }, { "docid": "916cdca4ed6678c76a27e8ef9f7c95be", "score": "0.61494756", "text": "function canMd5()\n {\n return false;\n }", "title": "" }, { "docid": "2b17ec849fbe6d97c3f02c900c2fe72f", "score": "0.6142812", "text": "static function md5URI() {\n return md5( url( self::$path ));\n }", "title": "" }, { "docid": "8855e7814052b92a11f47afc43dd5522", "score": "0.6133275", "text": "private function generateKey()\r\n {\r\n $key = '';\r\n \r\n for($i=0; $i<8; $i++)\r\n { \r\n $key .= mt_rand();\r\n }\r\n\r\n return md5($key);\r\n }", "title": "" }, { "docid": "f52303f8739c25e74506cb1d18ef16c9", "score": "0.61328226", "text": "public function digest() {}", "title": "" }, { "docid": "07a105fdc2d88b403f48646b298598bb", "score": "0.61247003", "text": "function sodium_crypto_stream_keygen(): string {}", "title": "" }, { "docid": "66a80266898139c68c048b10f850d458", "score": "0.61050385", "text": "public function canMd5()\n {\n return false;\n }", "title": "" }, { "docid": "5395e2503fd6d63d7b63bd847d81659d", "score": "0.6102349", "text": "public function getMd5Cred()\n {\n return $this->getKey('Md5Cred');\n }", "title": "" }, { "docid": "9f1cb13aed887717ea61429455918dc2", "score": "0.60820705", "text": "public function getHash(): string\n {\n return md5($this->path.$this->map->getId()->implode('-'));\n }", "title": "" }, { "docid": "c4736b6d838487b8feef0a12725bd8de", "score": "0.60790944", "text": "public function hash() {\n\n\t\t$parts = array_filter( [\n\t\t\t$this->type(),\n\t\t\t$this->handle(),\n\t\t\t$this->source()\n\t\t] );\n\n\t\treturn md5( implode( '-', $parts ) );\n\t}", "title": "" }, { "docid": "cd997e723e5c1540fdef3e6153b418a0", "score": "0.60790586", "text": "function sodium_crypto_kdf_keygen(): string {}", "title": "" }, { "docid": "12c8094376ec7d5f359b12e3c024fc39", "score": "0.6066252", "text": "public function makeCacheKey()\n {\n return md5($this->url);\n }", "title": "" }, { "docid": "67c6abcbbc84d41676e99e4b9d9585a6", "score": "0.60616416", "text": "public function hash(): string;", "title": "" }, { "docid": "898a600c2bc0f4922de6a9ce85640228", "score": "0.60595137", "text": "public function getHash()\n {\n\t\t$fields = $this->toArray();\n\t\treturn md5(\n\t\t\tjson_encode($fields)\n\t\t);\n\t}", "title": "" }, { "docid": "71ea0e93cdf0a5fd130dd35efa74fa68", "score": "0.60581046", "text": "private function ha2()\n {\n if ($this->_message->qop && $this->_message->qop == 'auth-int') {\n return md5(sprintf(\"%s:%s:%s\", $this->_message->method, $this->_message->uri, md5($this->_message->raw)));\n } else {\n return md5(sprintf(\"%s:%s\", $this->_message->method, $this->_message->uri));\n }\n }", "title": "" }, { "docid": "5d31f05c4a6f6225f7f1616bd45fd65c", "score": "0.60568637", "text": "public function md5Config()\n {\n return md5(json_encode((array)$this->config));\n }", "title": "" }, { "docid": "60d447e4d8d900ba3752f9f78198a0b7", "score": "0.605567", "text": "public function key() : string {\n\t\treturn wp_hash( $this->path );\n\t}", "title": "" }, { "docid": "76a441acd62535fcd2b07fd626331368", "score": "0.60511905", "text": "function cryptCCHoldernameCrypt($cc_holdername, $key)\r\n{\r\n return base64_encode($cc_holdername);\r\n}", "title": "" }, { "docid": "cdf9a032fc26af1c9a8da4afb36be394", "score": "0.6049208", "text": "function sodium_crypto_secretbox_keygen(): string {}", "title": "" }, { "docid": "a91aa04f106c8d81ec3eb2e901cca503", "score": "0.6046768", "text": "function mkPasskey(){\r\n\r\n\tglobal $dbLink, $fid, $uid;\r\n\t\r\n$site_keyQ = \"SELECT `value` FROM `xbt_config` WHERE name='torrent_pass_private_key'\";\r\n\tif($result = $dbLink->query($site_keyQ)){\r\n\t\twhile ($row = $result->fetch_row()){\r\n\t\t\t$site_key=$row[0];}\r\n\t\t$result->close();\r\n\t}\r\n\r\n$torInHash = \"SELECT `info_hash` FROM `xbt_files` WHERE fid={$fid}\";\r\n\r\nif($result = $dbLink->query($torInHash)){\r\n\t\twhile ($row = $result->fetch_row()){\r\n\t\t\t$info_hash_bin=$row[0];}\r\n\t\t$result->close();\r\n\t}\r\n\r\n$info_hash=bin2hex($info_hash_bin);\r\n\r\n$torPaQu = \"SELECT `torrent_pass_version` FROM `xbt_users` WHERE uid={$uid}\";\r\n\r\nif($result = $dbLink->query($torPaQu)){\r\n\t\twhile ($row = $result->fetch_row()){\r\n\t\t\t$torrent_pass_version=$row[0];}\r\n\t\t$result->close();\r\n\t}\r\n\r\n$passkey = sprintf('%08x%s', $uid, substr(sha1(sprintf('%s %d %d %s', $site_key, $torrent_pass_version, $uid, pack('H*', $info_hash))), 0, 24));\r\n\r\nreturn $passkey;\r\n\r\n}", "title": "" }, { "docid": "cd7f3852a6fe862412a7c5c8f5d668d4", "score": "0.60389596", "text": "public function getRandomKey()\r\n\t{ \r\n return md5(uniqid(rand()));\t \r\n\t}", "title": "" }, { "docid": "9fd8f6a7616318b2f2768943c0b88399", "score": "0.60328716", "text": "public function getMd5()\n {\n return $this->get(self::MD5);\n }", "title": "" }, { "docid": "9fd8f6a7616318b2f2768943c0b88399", "score": "0.60328716", "text": "public function getMd5()\n {\n return $this->get(self::MD5);\n }", "title": "" }, { "docid": "9fd8f6a7616318b2f2768943c0b88399", "score": "0.60328716", "text": "public function getMd5()\n {\n return $this->get(self::MD5);\n }", "title": "" }, { "docid": "d7959a1bce32cc6096355c8b546af33b", "score": "0.6029734", "text": "function getHash() {\r\n return md5(implode('', $this->files));\r\n }", "title": "" }, { "docid": "251482e852587d7dc6c8f843c7688197", "score": "0.6018912", "text": "public function createKey(){\n return md5(uniqid(rand(), true));\n }", "title": "" }, { "docid": "bb90346626d4c99984862fed1cc0d78a", "score": "0.6014582", "text": "function md5Hash($h) {\n\t\treturn md5(join(\":\", $h));\n\t}", "title": "" }, { "docid": "a0a3ac5e73b5b521332701277af1053b", "score": "0.6006278", "text": "public static function key():string ;", "title": "" }, { "docid": "3cb1eaf00ad89bd95962871cc6b65703", "score": "0.6005829", "text": "public static function digest() { }", "title": "" }, { "docid": "dd0e17d4ddad93c5465aaf8e8ca563d5", "score": "0.60022634", "text": "function _objectkey($n)\n {\n return substr($this->_md5_16($this->encryption_key.pack('VXxx',$n)),0,10);\n }", "title": "" }, { "docid": "0fa9214a3b41e3d34f37fdce5b5ec518", "score": "0.59955406", "text": "#[Pure]\n protected function hash(\n string $key\n ): string {\n return md5($key);\n }", "title": "" }, { "docid": "dd73acba5565e6df210b129227d0e430", "score": "0.59898233", "text": "function codigoverificacao($nome, $sobrenome, $email, $telefone) {\n $codigo = implode ('', array(substr($nome, strlen($nome)/2), substr($sobrenome, 0, strlen($sobrenome)/2), strlen($email), substr($telefone, strlen($telefone)/6, - strlen($telefone)/6)));\n return md5($codigo);\n}", "title": "" }, { "docid": "1cd67ed74a01914794de0eb8276d4934", "score": "0.5984171", "text": "function isRFC2617Md5();", "title": "" }, { "docid": "a26c0eda2ae0c690213246715e7f8db0", "score": "0.5975005", "text": "public function hash ()\n {\n $this->_prepare ();\n return md5 ($this->_objects_SQL);\n }", "title": "" }, { "docid": "aaf6e7aa62838f666769805d783affa1", "score": "0.5968597", "text": "function creat_sign($value){\r\n\tif (empty($value)){\r\n\t\t$value = time ();\r\n\t}\r\n\techo \"Data:\".$value;\r\n\techo \"<br>\";\r\n\techo date('Y-m-d h:i:s', $value);\r\n\t$unSign = \"timestamp=\".$value;\r\n\techo \"<br>\".$unSign;\r\n\t$sign_key = \"KoQAW@ee@IR!Q@w348lPuh06ik4LDkJl\";\r\n\t$res = $unSign.$sign_key;\r\n\techo \"<br>\".$res;\r\n\t$sign = md5($res);\r\n\techo \"<br>\".$sign;\r\n}", "title": "" }, { "docid": "4a1ee9563b5b827aa7b0aea88f6b02f1", "score": "0.59661674", "text": "function gen_md5_password($len = 8) {\n\t\t// of some random data\n\t\treturn substr(md5(rand().rand()), 0, $len);\n\t}", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.596113", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.596113", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.596113", "text": "public function getHash();", "title": "" }, { "docid": "ea821af06f564165bca96054adc40f6a", "score": "0.5949393", "text": "public function getHashMd5(): ?string;", "title": "" }, { "docid": "0f3c20ebb9e87621c3493bc62678d98e", "score": "0.5941326", "text": "public function getMd5()\n {\n return $this->md5;\n }", "title": "" }, { "docid": "d7c61a04f2c6c29f240115186a90cf28", "score": "0.59328973", "text": "public function getHashOn(): string;", "title": "" }, { "docid": "8d069b15f7b1041a07ce79aaf8195665", "score": "0.59281063", "text": "function affwp_auth_hash( $data, $key, $add_auth_key = true ) {\n\tif ( true === $add_auth_key ) {\n\t\t$auth_key = defined( 'AUTH_KEY' ) ? AUTH_KEY : '';\n\n\t\t$data = $data . $auth_key;\n\t}\n\treturn hash_hmac( 'md5', $data, $key );\n}", "title": "" }, { "docid": "29d5aee84d8d4554bf06677ad2939eb7", "score": "0.5912694", "text": "function get_hash($s1) {\r\n\t//creates hash for passwords and password reset key\r\n\t$hash = sha1(md5($s1 . 'Cute=Puffin?4747'));\r\n\treturn $hash;\r\n}", "title": "" }, { "docid": "82d8166621818b9d9c72faf3761e7343", "score": "0.5909658", "text": "function make_hash($str){\n return sha1(md5($str));\n\t}", "title": "" }, { "docid": "6b1559f09ec454917b6c910ad53f15c7", "score": "0.5909213", "text": "private function __digest() {\n\t\t$this->digestClass->setKey($this->_secret());\n\t\t$tt = $this->signatureBaseString();\n\t\treturn $this->digestClass->hash($this->signatureBaseString(), Hmac::BINARY);\n\t}", "title": "" }, { "docid": "f00c874653cd129dd4756000ff5f4e00", "score": "0.5904785", "text": "private function generateKey()\n {\n //Get the IP-address of the user\n $ip = $_SERVER['REMOTE_ADDR'];\n\n //We use mt_rand() instead of rand() because it is better for generating random numbers.\n //We use 'true' to get a longer string.\n //See http://www.php.net/mt_rand for a precise description of the function and more examples.\n $uniqid = uniqid(mt_rand(), true);\n\n //Return the hash\n return md5($ip . $uniqid);\n }", "title": "" }, { "docid": "e898dfcd2aceb9b9eab19107c462d7f5", "score": "0.58885384", "text": "function _md5_16($string)\n {\n return md5($string, true);\n }", "title": "" }, { "docid": "a1b51db67ff344dc9c1ebba0980d9c13", "score": "0.5885814", "text": "public function getKey(): string\n {\n return md5(get_class($this));\n }", "title": "" }, { "docid": "98af96414ebcf48be11755ace992d480", "score": "0.5885488", "text": "function _generateMD5Salt()\n {\n $MD5Salt = '$1$';\n /* We are supposed to fill the salt with 8 characters for MD5 */\n $chars = \"0123456789abcdefghijklmopqrstuvwxyz\";\n for ($i = 0; $i < 8; $i++)\n {\n $MD5Salt .= $chars[rand(0, strlen($chars)-1)];\n }\n $MD5Salt .= '$';\n return $MD5Salt;\n }", "title": "" }, { "docid": "780c7440a4e967f8ca1301eb0abaa78d", "score": "0.58825463", "text": "public function key () {}", "title": "" }, { "docid": "aff6a7104fd86f3a8841c07041c18684", "score": "0.5880014", "text": "function DefineVerificationKey() {\n\treturn md5(\n\t\tsprintf(\n\t\t\t'%04x%04x%04x%03x4%04x%04x%04x%04x',\n\t\t\tmt_rand(0, 65535),\n\t\t\tmt_rand(0, 65535),\n\t\t\tmt_rand(0, 4095),\n\t\t\tbindec(substr_replace(sprintf('%016b', mt_rand(0, 65535)), '01', 6, 2)),\n\t\t\tmt_rand(0, 65535),\n\t\t\tmt_rand(0, 65535),\n\t\t\tmt_rand(0, 65535),\n\t\t\tmt_rand(0, 65535)\n\t\t)\n\t);\n}", "title": "" }, { "docid": "b0ca195cf4b8bd231039f74a8da554ad", "score": "0.5878495", "text": "function GenPasword($p1,$p2){\n $codedpassword=md5(md5($p1).md5($p2));\n return $codedpassword;///'read'.md5('123'.$p1.'321').md5('123'.$p2.'321')\n\n}", "title": "" }, { "docid": "5f5b6d84f17ab30273b9bcb1a2b1be11", "score": "0.58726674", "text": "public function key() {}", "title": "" }, { "docid": "7f21a278d73dbf030e336fc838c0e5e8", "score": "0.58720255", "text": "public function getKey()\n {\n return md5($this->getQ());\n }", "title": "" }, { "docid": "5fdd83fedadf8d4aff89364e2cf00569", "score": "0.58714634", "text": "function getGmPublicKey();", "title": "" }, { "docid": "bc49a7820ff039f40a26f11c068a22b7", "score": "0.5871198", "text": "public function getDefaultHash(){ }", "title": "" }, { "docid": "9467982860c24eadb9fcb089062d347e", "score": "0.5861911", "text": "public function fingerprint() {\n\t\t//start w/ a secret key\n\t\t$fp = library::catalog()->hashpass;\n\t\t\n\t\t//add the first 2 blocks of the ip\n\t\t$blocks = explode(\".\", $_SERVER['REMOTE_ADDR']); \n\t\t$fp .= $blocks[0].\".\".$blocks[1]; \n\n\t\t//mix in the browser id\n\t\t$fp.= $_SERVER['HTTP_USER_AGENT'];\n\t\t\n\t\t//finally add the session id\n\t\t$fp.= session_id();\n\t\t\n\t\t//and hash the whole thing\n\t\treturn md5($fp);\n\t}", "title": "" }, { "docid": "4164ac68a78c286c6e2cf377c530dd2c", "score": "0.5855256", "text": "function md5_rand()\n {\n $time = time();\n $numRand = getRandStr(10);\n\n return strtoupper(md5($time . $numRand));\n }", "title": "" }, { "docid": "27abb324aa90a5c6d361fbe00dcc6a05", "score": "0.5853188", "text": "public function key(){ }", "title": "" }, { "docid": "1acd053e89ddf7a735c35640f7e04d5a", "score": "0.5852097", "text": "public function testHmacMD5_1()\n {\n $data = 'Hi There';\n $key = str_repeat(\"\\x0b\", 16);\n $hmac = Zend_Crypt_Hmac::compute($key, 'MD5', $data);\n $this->assertEquals('9294727a3638bb1c13f48ef8158bfc9d', $hmac);\n }", "title": "" }, { "docid": "df8192a1111c90a3b31e4dd696e1a6a0", "score": "0.5850344", "text": "public function createHash() : string\n {\n return Str::random(config('ninja.key_length'));\n }", "title": "" }, { "docid": "e7fbf28f79c7568b9ea26dc63db0bc38", "score": "0.5848871", "text": "private function hash()\n {\n return Str::hash($this->name);\n }", "title": "" }, { "docid": "273a83588c76995cc3189a11a99daed8", "score": "0.5842776", "text": "protected function getUniqueKey()\n {\n return sha1(getmypid() . 'dontPanik' . microtime(true));\n }", "title": "" }, { "docid": "80f5ae5e904e57996aa7a50f6ed7ab98", "score": "0.5836593", "text": "private function hasher($data) {\n\t\t$key = $this->secretkey;\n\t\tif(strlen($key) > 64)\n\t\t\t$key = pack('H40', sha1($key));\n\t\tif(strlen($key) < 64)\n\t\t\t$key = str_pad($key, 64, chr(0));\n\t\t$ipad = (substr($key, 0, 64) ^ str_repeat(chr(0x36), 64));\n\t\t$opad = (substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64));\n\t\treturn sha1($opad . pack('H40', sha1($ipad . $data)));\n\t}", "title": "" }, { "docid": "84bd7cea2b152cb65016d4dd7959ff21", "score": "0.58337414", "text": "function canMd5()\n {\n return false; // ?? Is this correct? can we store passwords as md5 in ldap?\n }", "title": "" } ]
bf2796ad976114819dddcd2233d2263c
A numerically indexed list of association names of this persistent class. This array includes identifier associations if present on this class.
[ { "docid": "21e3c3739a0853e9721e7108f4b9a1b4", "score": "0.6716054", "text": "function getAssociationNames();", "title": "" } ]
[ { "docid": "fcdce915b15de92d1d325b25025e0ce9", "score": "0.71014977", "text": "public function associations(): array\n {\n return $this->_associations;\n }", "title": "" }, { "docid": "573376397730491d437ee2782743594f", "score": "0.69653577", "text": "public function getAssociations()\n {\n return array_keys($this->entityManager->getClassMetadata($this->repositoryName)->getAssociationMappings());\n }", "title": "" }, { "docid": "defb78089d1a9a551eb53c2132d39bfa", "score": "0.68390965", "text": "public function associationData()\n {\n return [\n 'many-to-one' => [\n ClassMetadata::MANY_TO_ONE,\n 'orm_many_to_one',\n ],\n 'one-to-many' => [\n ClassMetadata::ONE_TO_MANY,\n 'orm_one_to_many',\n ],\n 'one-to-one' => [\n ClassMetadata::ONE_TO_ONE,\n 'orm_one_to_one',\n ],\n 'many-to-many' => [\n ClassMetadata::MANY_TO_MANY,\n 'orm_many_to_many',\n ],\n ];\n }", "title": "" }, { "docid": "a81199f392a9a5d137b97c6cf8eda852", "score": "0.62975657", "text": "public function getAssociations(): array;", "title": "" }, { "docid": "11d4c6812f168a62cbe4525cac5e833d", "score": "0.6202916", "text": "public static function nombreAssociations() {\n $req = 'SELECT COUNT(*)\n FROM association_vehicule_conducteur';\n\n return Db::dbQuery($req);\n }", "title": "" }, { "docid": "a3b305f13a467fa7f8e3c29c824132d1", "score": "0.6201943", "text": "public static function nombreAssociations() {\n $req = 'SELECT COUNT(*)\n FROM association_vehicule_conducteur';\n return Db::dbQuery($req);\n }", "title": "" }, { "docid": "18708951c5992ed92eb06c31c38da274", "score": "0.59629637", "text": "public function ids() {\n $ids = array_keys($this->models);\n return $ids;\n }", "title": "" }, { "docid": "9684750f6cda4bbe6af43104fb879284", "score": "0.58950824", "text": "public function getSimpleAssocAttrNames()\n {\n $res = array();\n foreach ( $this->hasOne as $attr => $type )\n {\n $res[] = DatabaseNormalization::simpleAssoc( $attr );\n }\n return $res;\n }", "title": "" }, { "docid": "4e7b306b7c35ebee8c1d65d0d6197daf", "score": "0.58773667", "text": "public function getRelatedIds()\n {\n $related = $this->getRelated ();\n $fullKey = $related->getQualifiedKeyName ();\n return $this->getQuery ()->select ( $fullKey )->lists ( $related->getKeyName () );\n }", "title": "" }, { "docid": "03ccc2e1ab841f2e019daca7f4c74104", "score": "0.5676656", "text": "public function getAssociates()\n {\n return $this->associates;\n }", "title": "" }, { "docid": "34c4569e7cc8471b5857d52dafa4c057", "score": "0.56645864", "text": "public function getAutoIdsAttribute()\n {\n return $this->autos()->get()->pluck('id')->toArray();\n }", "title": "" }, { "docid": "0016199ca803900ab73bfeb367bb1d84", "score": "0.56633115", "text": "public function getServiceAssociations()\n\t{\n\t\treturn $this->serviceAssociations;\n\t}", "title": "" }, { "docid": "8bdc34a60415743a10576ff4cce312be", "score": "0.5651981", "text": "public function getEntityClasses()\n {\n $mappingConfig = $this->getMappingConfig();\n\n return array_keys($mappingConfig);\n }", "title": "" }, { "docid": "5e03498e96432144df6c0269ab565be9", "score": "0.5636482", "text": "public function getNrCascadeOptions()\n {\n return [\n 'cascade' => [\n 'list' => [\n 'seriousInfringements' => [\n 'entity' => 'SeriousInfringement',\n 'parent' => 'case',\n ],\n ]\n ]\n ];\n }", "title": "" }, { "docid": "3e06dcc2eb377a0f6255f8d45803f137", "score": "0.56354713", "text": "public function getIdentifier()\n {\n if (!$this->identifiers) {\n foreach ($this->getClass() as $items) {\n foreach ($items as $item) {\n if ($item instanceof IdentifierInterface) {\n foreach ($item->getIdentifier() as $name => $fields) {\n $this->identifiers[$name] = ['key' => $fields, 'type' => $this->getTypeOfField($name), 'name' => $name];\n }\n }\n }\n }\n }\n return $this->identifiers;\n }", "title": "" }, { "docid": "0d565a959029e54e665249e5fb95c3db", "score": "0.56303704", "text": "public function getConsortialIDs()\n {\n return $this->getFieldArray('035', 'a', true);\n }", "title": "" }, { "docid": "43bb103ee0bffaff486bd0175eef8e1b", "score": "0.55592597", "text": "public function getIdentifierFields ()\n {\n return array();\n }", "title": "" }, { "docid": "25463245d68ae3b3f44a52c48f71c243", "score": "0.5559165", "text": "public function getIdentifierFieldNames()\n {\n return array_keys($this->getIdentifier());\n }", "title": "" }, { "docid": "c05419be817d225203a01421460e5e0e", "score": "0.5543776", "text": "public function getIdentifierFieldNames(): array;", "title": "" }, { "docid": "a3b895f53969f9b6ed1b6762964395fb", "score": "0.55272037", "text": "public function getIdentifiers();", "title": "" }, { "docid": "d6527d1d533f67ee998d9a689f9beba1", "score": "0.5522696", "text": "public function getIdentifiers()\n {\n return $this->identifiers;\n }", "title": "" }, { "docid": "b71b6e1a2b40e2425dcf4d80085f2496", "score": "0.551406", "text": "public function relationNames()\r\n {\r\n return [\r\n 'absensis',\r\n 'siswas'\r\n ];\r\n }", "title": "" }, { "docid": "2b466efa3e31275673fc639a418163de", "score": "0.5499618", "text": "public function relationNames()\r\n {\r\n return [\n 'cartaoAluno'\n ];\r\n }", "title": "" }, { "docid": "5e70df8465c96a2b6161131a8eaed927", "score": "0.5466601", "text": "public function relationNames()\n {\n return [\n 'immobilien',\n 'kunde'\n ];\n }", "title": "" }, { "docid": "20ee927ff724a17936921c5abdbc0945", "score": "0.54511106", "text": "public function getIdentifierFieldNames(string $class): array;", "title": "" }, { "docid": "343164ce2654d2934db4390db862fce7", "score": "0.5422973", "text": "public function relationNames()\r\n {\r\n return [\n 'especie',\n 'lance'\n ];\r\n }", "title": "" }, { "docid": "54a093124124000f11cd62e10669a9d8", "score": "0.54180086", "text": "function &getAssocTypes() {\n\t\treturn $this->_assocTypes;\n\t}", "title": "" }, { "docid": "8f03675fc20eb8c189da474107814a24", "score": "0.5412666", "text": "public function getAll()\n {\n return $this->_identifiers;\n }", "title": "" }, { "docid": "312da9367cee3e7890e119b3cd878e99", "score": "0.5407318", "text": "public function relationNames()\n {\n return [\n 'ekskuls'\n ];\n }", "title": "" }, { "docid": "f89cb2751331b1ab7e0f34ed0cffc625", "score": "0.5394288", "text": "public function relationNames()\r\n {\r\n return [\r\n 'akumulasiPoints',\r\n 'siswas'\r\n ];\r\n }", "title": "" }, { "docid": "d612ad7eb2d3781fb2019016d5b78dda", "score": "0.5369669", "text": "public function getIdentities(): array;", "title": "" }, { "docid": "b9386fcdcf8c12b5c80b6ddb786650bf", "score": "0.53664756", "text": "public function relationNames()\r\n {\r\n return [\r\n 'pegawais',\r\n 'siswas',\r\n 'waliMurs'\r\n ];\r\n }", "title": "" }, { "docid": "22f811013891095a2974405d6e14027a", "score": "0.5358523", "text": "public function relations()\n {\n // class name for the relations automatically generated below.\n return array();\n }", "title": "" }, { "docid": "a5da1cb6084947b4e2ac753e6cea2524", "score": "0.5318095", "text": "public function getIdentities()\n {\n return [\\Ss\\Collection\\Model\\Collection::CACHE_TAG . '_' . $this->getCollection()->getId()];\n }", "title": "" }, { "docid": "c4fb912ea10ea4695b907ebfa1e81b3b", "score": "0.5316545", "text": "public function getAssoc_relateds() {\n $relateds = array();\n \n $bizRelations = wcmBizrelation::getBizobjectRelations($this);\n foreach ($bizRelations as $bizRelation) {\n $related = array(\"relation\"=>$bizRelation, \"object\"=> new $bizRelation[\"destinationClass\"]($this->getProject(), $bizRelation[\"destinationId\"]));\n $relateds[] = $related;\n }\n return $relateds;\n }", "title": "" }, { "docid": "ea1dbace98131b6fd01563bc92ff76b4", "score": "0.5305201", "text": "public function relationNames()\n {\n return [\n 'jeniskelamins',\n 'cutis',\n 'izins',\n 'jenispegawai',\n 'pangkatgolongan',\n 'pendidikanpegawai',\n 'sekolah',\n 'statuspegawai',\n ];\n }", "title": "" }, { "docid": "a8e288bf46ad0cfdaf9f4d9b66c21572", "score": "0.5303886", "text": "public function toArray() {\n $reserved_names = array(\"has_one\",\"belongs_to\",\"has_many\",\"has_and_belongs_to_many\");\n $modelName = $this->_modelName;\n $array = array();\n foreach ($this->_columns as $column) {\n if ( !in_array($column,$reserved_names) ) {\n $array[$column] = $this->$column;\n }\n }\n return $array;\n }", "title": "" }, { "docid": "fac8adf915023aba99f7cc7de412ec52", "score": "0.5299231", "text": "public function relationNames()\n {\n return [\n 'siswas'\n ];\n }", "title": "" }, { "docid": "1a8d348868c492047de1c9306c40adb0", "score": "0.52942723", "text": "public function AssociativeKeys()\n {\n if(!is_null($this->assoc))\n return $this->assoc;\n\n foreach(array_keys($this->data[0]) as $k)\n if(!is_integer($k))\n return ($this->assoc = true);\n return ($this->assoc = false);\n }", "title": "" }, { "docid": "0e5c6cd9708ea99da50c73f54acf2525", "score": "0.5293464", "text": "protected function getNewAssociations()\n {\n $associations = array();\n\n $sql = \"SELECT id, parent_id FROM emails WHERE parent_type='Notes' AND \" .\n $this->db->getNotEmptyFieldSQL('parent_id');\n $stmt = $this->db->getConnection()->executeQuery($sql);\n\n while ($row = $stmt->fetch()) {\n if (!$this->associationExists($row['id'], $row['parent_id'])) {\n $this->log(\"Association does not exist for email id: {$row['id']} with parent id: {$row['parent_id']}\");\n $associations[] = $this->getValues($row['id'], $row['parent_id']);\n }\n }\n\n return $associations;\n }", "title": "" }, { "docid": "f00fedca1d9f22a6d9bff8657f7f64a5", "score": "0.52870345", "text": "public function getNames()\n {\n return array_keys((array) $this);\n }", "title": "" }, { "docid": "edfe45f946919785fc3b15053f48098d", "score": "0.5277512", "text": "public function getConjuresList()\n {\n return array_keys($this->conjures);\n }", "title": "" }, { "docid": "47a11a84ba1b949d2e4018d8a7e77870", "score": "0.52699554", "text": "public function relationNames()\n {\n return [\n 'pegawais'\n ];\n }", "title": "" }, { "docid": "9d2530979f6e01895e0d5e4b18adbd78", "score": "0.52612054", "text": "public function getAllIdentifiers() {}", "title": "" }, { "docid": "0a177e12293bfae682a59ebcc97cf231", "score": "0.5256593", "text": "public function ids()\n {\n return $this->_ids;\n }", "title": "" }, { "docid": "3be87e5831c5fe6a2b8ba8a9fecf1980", "score": "0.52498925", "text": "public function relationNames()\n {\n return [\n 'educador',\n 'user',\n 'planoEducadorLicencas'\n ];\n }", "title": "" }, { "docid": "63b5af0e56c2e5c8cf4476cec000f27f", "score": "0.5247444", "text": "public function fetchAllClassIds ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_obj = new Acad_Model_StudentClass();\r\n $student_class_obj->setMember_id($member_id);\r\n return $student_class_obj->fetchClassIds();\r\n }", "title": "" }, { "docid": "a16ac11180aadaa9a2af26677b386e71", "score": "0.5241137", "text": "public function relationNames()\n {\n return [\n 'jeniskaryasiswa',\n 'siswa'\n ];\n }", "title": "" }, { "docid": "f3185177c4b54bc2d70e816101a8c611", "score": "0.5240042", "text": "protected function getRelations()\n {\n return array();\n }", "title": "" }, { "docid": "40764ee6b8c316709104ad607015c6db", "score": "0.52349144", "text": "protected function getSerializableAttributeNames(): array {\n return array_keys(get_object_vars($this));\n }", "title": "" }, { "docid": "28bd0312bf3d5ef1298c810bb650cef5", "score": "0.52275604", "text": "public function keys()\n {\n return array('id');\n }", "title": "" }, { "docid": "6a97960182765fe08f065495532624f1", "score": "0.5195277", "text": "public function relationNames()\n {\n return [\n 'detailpengisiantracers',\n 'jenisjawaban',\n 'pertanyaan'\n ];\n }", "title": "" }, { "docid": "90d1319f5a57a5447783cfcf2c393b7a", "score": "0.51951283", "text": "public static function propertyNames()\n {\n return array('id', 'cid', 'name','quantity','destiny','damaged','hire','adddate');\n }", "title": "" }, { "docid": "016c8103c5c626ca2b1509c89988fb6d", "score": "0.5192149", "text": "public function getIds();", "title": "" }, { "docid": "c247c5ccb471d84844ba5b0dd40b0f97", "score": "0.51879126", "text": "public static function getIDProperties()\n {\n return static::$ids;\n }", "title": "" }, { "docid": "4f22fb1eadfe291f176598aa4498bbac", "score": "0.51848024", "text": "public function attributeNames()\n {\n $className = get_class($this);\n if (!isset(self::$_names[$className])) {\n $class = new ReflectionClass(get_class($this));\n $names = array();\n foreach ($class->getProperties() as $property) {\n $name = $property->getName();\n if ($property->isPublic() && !$property->isStatic())\n $names[] = $name;\n }\n return self::$_names[$className] = $names;\n } else\n return self::$_names[$className];\n }", "title": "" }, { "docid": "00456136f897b581545a7bba944b10f6", "score": "0.51831776", "text": "public function getArrayOfChildIdentifiersAttribute() : array\n {\n $idArray = [];\n\n foreach ($this->allChild->pluck('array_of_child_identifiers') as $array) {\n $idArray = array_merge($array, $idArray);\n }\n\n return array_merge($idArray, [$this->id]);\n }", "title": "" }, { "docid": "54fc58b939e16cdefbb6801a79329447", "score": "0.5182872", "text": "public function relationNames()\n {\n return [\n 'alertStatus',\n 'cap',\n 'event',\n 'risk',\n 'alertAlertHistories',\n 'alertCaps'\n ];\n }", "title": "" }, { "docid": "15a815d1d8e59d97326376dfc464d61d", "score": "0.5180144", "text": "protected static function getClassAliases()\n {\n return [];\n }", "title": "" }, { "docid": "1f74dd9f69020d37bf13533f658a35fb", "score": "0.51736027", "text": "public function identifiers()\n {\n return $this->belongsToMany(Identifier::class)->withTimestamps();\n }", "title": "" }, { "docid": "483cfad9a1c5c9a5dde0662aa62b741f", "score": "0.5171025", "text": "function keys() {\n return array_keys($this->a);\n }", "title": "" }, { "docid": "cb5c6568fca1ab6c9ad7b0878dbc8bb8", "score": "0.5165936", "text": "public function keys() {\n\t\treturn array_keys($this->toArray());\n\t}", "title": "" }, { "docid": "f7195787629e849cf8f639f26c99cd69", "score": "0.5158823", "text": "public static function getBaseIdentifierNames(): array\n {\n return [\n [''],\n ['1'],\n ['foo'],\n ['Foo'],\n ['bar'],\n ['Bar'],\n ['foo_bar'],\n ];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "4924f2310789afc026c1d4cbfa92967e", "score": "0.5157338", "text": "public function getIdentities()\n {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "cd3a52f40e46391a5213ee0d2b8f366a", "score": "0.51513094", "text": "public function relationNames()\n {\n return [\n 'events'\n ];\n }", "title": "" }, { "docid": "010a03412b024f3cca39bc646b7046ff", "score": "0.5150162", "text": "public function getManyAssocValues()\n {\n $res = array();\n foreach ( $this->hasMany as $attr => $type )\n {\n $objectList = $this->attributeValues[ $attr ];\n if ( $objectList == self::NOT_LOADED_ASSOC ) $res[$attr] = array();\n else\n {\n $res[$attr] = array_filter( $objectList ); // Saco nulls del array\n }\n }\n return $res;\n }", "title": "" }, { "docid": "f986d3c2f748f40ce73958bc5af185bc", "score": "0.51501316", "text": "public function getClassList()\n {\n $classList = array();\n $resultSet = TrackingUtils::getAllClasses();\n \n if( !$resultSet->isEmpty() )\n {\n $resultRow = $resultSet->fetch();\n while( $resultRow )\n {\n $classList[ $resultRow['id'] ] = $resultRow['name'];\n $resultRow = $resultSet->fetch();\n }\n }\n \n return $classList;\n }", "title": "" }, { "docid": "cb257a82e460e4c3dadbcbffc50eac56", "score": "0.5147979", "text": "public function fetchAllClassIds ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_obj = new Core_Model_StudentClass();\r\n $student_class_obj->setMember_id($member_id);\r\n return $student_class_obj->fetchClassIds();\r\n }", "title": "" }, { "docid": "918187897a8c0b0fe9e20238dbd652cb", "score": "0.5141215", "text": "public function relationNames()\r\n {\r\n return [\n 'vendas'\n ];\r\n }", "title": "" }, { "docid": "df4c6264e31fa068b7d233a380f08601", "score": "0.5139303", "text": "public function getIdClasses() {\n return intval($this->idClasses);\n }", "title": "" }, { "docid": "fd7ab666defd694d83b474208aee69f3", "score": "0.5133645", "text": "public function getClassList()\n\t{\n\t\treturn array_keys($this->_classes);\n\t}", "title": "" }, { "docid": "5daa445d9101f7a75ab9df8d5fb4da90", "score": "0.5133217", "text": "public function getIdentities() {\n return [self::CACHE_TAG . '_' . $this->getId()];\n }", "title": "" }, { "docid": "50fbc26c3fab5af88d679a10f6c5e262", "score": "0.51286286", "text": "public function getObjectIds();", "title": "" }, { "docid": "cecc5ece490f4019934a33bc9e4ac368", "score": "0.5118438", "text": "public function toArray() {\r\n return $this->associativeArray();\r\n }", "title": "" }, { "docid": "671231a58db3ac19535e4c0898ba9c3c", "score": "0.51171404", "text": "public function getPrimaryKeys()\n {\n return array_keys($this->getArrayCopy());\n }", "title": "" }, { "docid": "a024f165c5c1be9dc363ad58ed319611", "score": "0.51106703", "text": "public function asType($property = 'id', $associate = false) {\n $ids = array();\n if ($this->count == 0) {\n return;\n }\n if ($associate) {\n foreach ($this->items as $object)\n $ids[$object->id] = $object->read_attribute($property);\n } else {\n foreach ($this->items as $object)\n $ids[] = $object->read_attribute($property);\n }\n return $ids;\n }", "title": "" }, { "docid": "4bb28e52223ee19d617e17f9cb0a1643", "score": "0.50902796", "text": "public function getAssociation()\n {\n\n }", "title": "" }, { "docid": "eefab75772dd22d9e42fafa136fe0428", "score": "0.5086831", "text": "public function getIdsString()\n {\n return implode(',', $this->getCategoryIds());\n }", "title": "" }, { "docid": "36421a27cf538b602d0fd98cc605769b", "score": "0.50815046", "text": "public function getAcls() {\n\t\treturn $this->acls;\n\t}", "title": "" }, { "docid": "72cbf8872efcf13ae87b603728048159", "score": "0.50781", "text": "public function getAllClassNames(): array\n {\n $auditEntityRepository = $this->getAuditObjectManager()\n ->getRepository(Entity\\AuditEntity::class);\n\n $classNames = [];\n foreach ($this->getEntityConfigCollection() as $className => $config) {\n $classNames[] = $auditEntityRepository->generateClassName($className);\n }\n\n return $classNames;\n }", "title": "" }, { "docid": "d9559792aeeccf9e958677a2dc754da1", "score": "0.50766134", "text": "public function getActivationIdentifiers()\n {\n return $this->activation_identifiers;\n }", "title": "" }, { "docid": "ed90ab67b3f136a521b1b8e057f83463", "score": "0.506668", "text": "public function getInterfaceIDs() : array;", "title": "" }, { "docid": "ee44a6dfa2190046d377cc5b9f893215", "score": "0.5062223", "text": "public function keys()\n {\n return array_keys($this->collection);\n }", "title": "" }, { "docid": "ce17a87a7a115396aca6d8da20d221c2", "score": "0.50612336", "text": "public function keys()\n {\n return array_keys($this->all());\n }", "title": "" }, { "docid": "edf1190f98878d9c1b9be6aff04b1a04", "score": "0.50483346", "text": "public function getExistingNames()\n {\n return array_keys($this->createQueryBuilder()\n ->select('name')\n ->hydrate(false)\n ->getQuery()\n ->execute()\n ->toArray());\n }", "title": "" }, { "docid": "12300ae8be118fb9a4c8d73c7cbaccf3", "score": "0.5038679", "text": "public function keys()\n {\n return array_keys($this->_db);\n }", "title": "" }, { "docid": "12300ae8be118fb9a4c8d73c7cbaccf3", "score": "0.5038679", "text": "public function keys()\n {\n return array_keys($this->_db);\n }", "title": "" }, { "docid": "65bdb51579d25eef4d50657fe082fcdd", "score": "0.5033899", "text": "public function asContainArray(): array\n {\n $associations = [];\n foreach ($this->_associations as $assoc) {\n $associations += $assoc->asContainArray();\n }\n $config = $this->_config;\n if ($this->_forMatching !== null) {\n $config = ['matching' => $this->_forMatching] + $config;\n }\n\n return [\n $this->_name => [\n 'associations' => $associations,\n 'config' => $config,\n ],\n ];\n }", "title": "" }, { "docid": "432c5cd756c4e53c10ccbdd9c716694b", "score": "0.5033715", "text": "public function getTaxonomyIds()\n {\n return $this->taxonomy_ids;\n }", "title": "" }, { "docid": "432c5cd756c4e53c10ccbdd9c716694b", "score": "0.5033715", "text": "public function getTaxonomyIds()\n {\n return $this->taxonomy_ids;\n }", "title": "" }, { "docid": "24c8915d3f58d38ba7e0630fe385af9b", "score": "0.503243", "text": "public function getPrimaryKeys()\n\t{\n\t\treturn array_keys($this->getArrayCopy());\n\t}", "title": "" }, { "docid": "b2ecd10b9e011ceeb4c078a11e65ea2c", "score": "0.50250137", "text": "public static function getIdentifierFields() {\n\t\treturn self::$PRIMARY_KEYS;\n\t}", "title": "" }, { "docid": "b2ecd10b9e011ceeb4c078a11e65ea2c", "score": "0.50250137", "text": "public static function getIdentifierFields() {\n\t\treturn self::$PRIMARY_KEYS;\n\t}", "title": "" }, { "docid": "b2ecd10b9e011ceeb4c078a11e65ea2c", "score": "0.50250137", "text": "public static function getIdentifierFields() {\n\t\treturn self::$PRIMARY_KEYS;\n\t}", "title": "" } ]
927d37bef92f4cc6bafd35d6de3ad514
Authenticates against the supplied adapter
[ { "docid": "caa05ed2a5e2bbe69f260f549fa378df", "score": "0.6852947", "text": "public function authenticate(Yan_Auth_Adapter_Interface $adapter)\n\t{\n\t\t$result = $adapter->authenticate();\n\n\t\tif ($result->isValid()) {\n\t\t\t$this->getStorage()->write($result->getIdentity());\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" } ]
[ { "docid": "ad0fb1f02cbcf54f1781a9053a09ca78", "score": "0.69013536", "text": "public function authenticate()\r\n {\r\n // ...\r\n }", "title": "" }, { "docid": "6060220cd70d7955c694a5acd7c4282b", "score": "0.68968785", "text": "public function authenticate() {}", "title": "" }, { "docid": "98f1eecbd2b2929a5d11c3eae10645aa", "score": "0.6884698", "text": "public abstract function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.68794835", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.68794835", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.68794835", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.68794835", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.68794835", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.68794835", "text": "public function authenticate();", "title": "" }, { "docid": "5743b7f11efb61c638f41d3c8e879e05", "score": "0.68663955", "text": "abstract public function authenticate();", "title": "" }, { "docid": "ac0bded8d776981717cc527739016db2", "score": "0.66762537", "text": "public function authenticate()\n {\n }", "title": "" }, { "docid": "6ceb8aba11bf38552ccb721a0bd2da50", "score": "0.6620887", "text": "public function authenticate(){\n\t\treturn $this->adapter->authenticate();\n\t\t}", "title": "" }, { "docid": "0dac96f6762ef8a33148042ef3fa51fb", "score": "0.6514928", "text": "public function authenticate($identity);", "title": "" }, { "docid": "c5b72981afa4f647445c1e2c76bb1846", "score": "0.641507", "text": "public function Authenticate();", "title": "" }, { "docid": "9ecf2065de931725c9966f7320b49966", "score": "0.64050627", "text": "public function authenticate() {\n try {\n // sanitize this?\n $authuri = BASE_URI . '/users/' . USERNAME . '/login?password=' . PASSWORD;\n\n $response = $this->client->request('POST', $authuri, [\n 'on_stats' => function (GuzzleHttp\\TransferStats $stats) use (&$url) {\n $url = $stats->getEffectiveUri();\n }]);\n\n //echo \"Sending request to \" . $url . \"\\n\";\n } catch (GuzzleHttp\\Exception\\ServerException $e) {\n } catch (GuzzleHttp\\Exception\\ClientException $e) {\n throw new Exception(\"Unable to authenticate:\\n\" . $e); // non available page!\n }\n if ($response->getStatusCode() == 200) {\n //echo \"Successfully authenticated!\\n\";\n $data = json_decode($response->getBody(), true);\n $this->session_id = $data['session']; // make a test for this \n //echo \"Session id \" . $this->session_id . \" saved.\\n\";\n } else {\n throw new Error(\"Something went wrong with your request. Unable to authenticate.\\n\");\n }\n }", "title": "" }, { "docid": "0f3d4fa51b5b09d82c058461592793c9", "score": "0.62808704", "text": "public function authenticate()\n {\n if ($this->username != '' && $this->password != '') {\n\n $api = new DataAdapter();\n $api->user_name = $this->username;\n $api->password = $this->password;\n $rs = $api->login();\n\n if ($rs) {\n $this->setState('id', $rs['user_id']);\n $this->setState('user_id', $rs['user_id']);\n $this->setState('full_name', $rs['full_name']);\n $this->setState('username', $rs['user_name']);\n $this->setState('mobile', $rs['mobile']);\n $this->setState('avatar', $rs['avatar']);\n\n $result = true;\n } else {\n $result = false;\n }\n } else {\n $result = false;\n }\n\n return $result;\n }", "title": "" }, { "docid": "ff319c108db46f5829437a12ca2e2f75", "score": "0.6269349", "text": "public function authenticate(Zend_Auth_Adapter_Interface $adapter)\n {\n // Authenticates against the supplied adapter.\n $result = $adapter->authenticate();\n\n /*\n * ZF-7546 - prevent multiple succesive calls from storing inconsistent\n * results.\n *\n * Ensure storage has clean state.\n */\n if ($this->hasIdentity()) {\n $this->clearIdentity();\n }\n\n if ($result->isValid()) {\n $this->getStorage()\n ->write($adapter->getResultRowObject());\n }\n\n return $result;\n }", "title": "" }, { "docid": "1c5a3e759ff20b06997bdfe55cd9417f", "score": "0.62570035", "text": "public function getAuthAdapter(\\Gems_User_User $user, $password);", "title": "" }, { "docid": "1334a8241a3cb8441137cdf75d15bced", "score": "0.6231731", "text": "protected abstract function handleAuthentication();", "title": "" }, { "docid": "2e1f77c1eff64104811dff4e02ae5cd5", "score": "0.622997", "text": "public function authenticated();", "title": "" }, { "docid": "fdaaef9c5a732d08b159ecff3b07cbcc", "score": "0.62245905", "text": "public function testAuthenticateSuccess(): void\n {\n $this->_adapter->setIdentity('my_username');\n $this->_adapter->setCredential('my_password');\n $result = $this->_adapter->authenticate();\n $this->assertTrue($result->isValid());\n }", "title": "" }, { "docid": "c3f1c860b70dfb66587d717cb5b344fd", "score": "0.6207223", "text": "public function authenticate()\n {\n return parent::authenticate();\n }", "title": "" }, { "docid": "3c47a61bec7021afc4dae6860eae2023", "score": "0.6197913", "text": "public function authenticate() {\n // sso\n if ($_SESSION['Zend_Auth']['logged_in']) {\n $this->logger->log('AuthAdapter::authenticate() SSO CONDITION', Zend_Log::INFO);\n\n $this->username = $_SESSION['Zend_Auth']['SSO_details']['email'];\n $this->password = $_SESSION['Zend_Auth']['SSO_details']['password'];\n }\n if ($this->username == '' || $this->password == '')\n return new Zend_Auth_Result(0, array($this->username, $this->password));\n\n // authenticate...\n $query = \"SELECT * FROM \" . TBL_USER . \" WHERE email = ? AND password = ?\";\n $row = $this->db->fetchAll($query, array($this->username, $this->password));\n\n $this->logger->log('AuthAdapter::authenticate() AUTHENTICATING', Zend_Log::INFO);\n\n if ($row[0]['email'] == $this->username || $_SESSION['Zend_Auth']['logged_in']) {\n $this->logger->log('AuthAdapter::authenticate() AUTHENTICATED', Zend_Log::INFO);\n\n return new Zend_Auth_Result(1, $row[0]);\n } else {\n $logger = Zend_Registry::get('log');\n $logger->log('Authentication Failure', Zend_Log::NOTICE);\n return new Zend_Auth_Result(0, array($this->username, $this->password));\n }\n }", "title": "" }, { "docid": "da625bf5d884d532e5154daadc57391c", "score": "0.6179376", "text": "function Authenticate(){\r\n\t}", "title": "" }, { "docid": "ec926135d1b367d8d22dccdc15e298bd", "score": "0.6169643", "text": "public function setAuthAdapter( Zend_Auth_Adapter_Interface $adapter )\n\t{\n\t\t$this->_authAdapter = $adapter;\n\t}", "title": "" }, { "docid": "c2fd32fc8793cd0a474495f38b6b5da2", "score": "0.61679065", "text": "function authenticate($params);", "title": "" }, { "docid": "0cb7ed4ac5763503156e0c3d5b6643d6", "score": "0.6167783", "text": "public function testAuthenticateProvidesCallbackWithIdentityAndCredentials()\n {\n $adapter = $this->adapter;\n $adapter->setIdentity('testIdentity');\n $adapter->setCredential('testCredential');\n $that = $this;\n $callback = function ($identity, $credential) use ($that, $adapter) {\n $that->assertEquals($identity, $adapter->getIdentity());\n $that->assertEquals($credential, $adapter->getCredential());\n };\n $this->adapter->setCallback($callback);\n $this->adapter->authenticate();\n }", "title": "" }, { "docid": "d2665830d12a95f43af04cf991c7c52a", "score": "0.6141319", "text": "public function authenticate(User $user);", "title": "" }, { "docid": "47f1732dd8e9a68747d95b4f0ca9cfa3", "score": "0.61292875", "text": "abstract function getAuthBackend();", "title": "" }, { "docid": "a300d89f6011d2a320a98f1d2c5848ca", "score": "0.6119322", "text": "private function auth()\n {\n $url = $this->getFullUrl('/auth.json');\n\n $data = ['auth_key' => $this->apiKey];\n\n $response = $this->makeRequest(self::METHOD, $url, $data);\n\n if ($response['comment'] == 'not authenticated') {\n $data['new'] = 'true';\n $response = $this->makeRequest(self::METHOD, $url, $data);\n }\n\n if (isset($response['data']['key']) && isset($response['data']['key_id'])) {\n $this->authKey = $response['data']['key'];\n $this->authKeyId = $response['data']['key_id'];\n }\n }", "title": "" }, { "docid": "e02a2bd1343f642fd022d775f1bc79d7", "score": "0.6112232", "text": "public function authenticate()\n {\n // ...\n //(AdapterInterface $adapter, $table = null, Platform\\AbstractPlatform $sqlPlatform = null)\n // d($adapter = new AdapterDB($configArray));\n \n $sql =new Sql($this->db->getTableGateway()->getAdapter());\n $table =\"user\"; \n \n $where = array('username'=>$this->username, 'password'=>$this->password);\n $requete = $sql->select()\n ->from($table)->where($where)\n ;\n $statement = $sql->prepareStatementForSqlObject($requete);\n $result= $statement->execute()->current();\n \n \n \n \n \n \n // $this->db->getTableGateway()->getAdapter()->query($requete)->execute();\n if ($result == true){\n $result = new Result(1, array('user'=>$this->username, 'password'=>$this->password));\n // echo \"connecion etablie\";\n \n // return $result;\n }else{\n $result = new Result(0, array('user'=>$this->username, 'password'=>$this->password));\n //echo \"Bad Credential\";\n \n }\n \n \n // echo $result->isValid();\n \n // $result->isValid();\n \n \n return $result;\n \n }", "title": "" }, { "docid": "d741d3b5bebd2de35dc9ff3118d041b8", "score": "0.61094975", "text": "public function auth() {\n $this->appAuthentication = new AppAuthentication($this->appKey,$this->appSecret);\n }", "title": "" }, { "docid": "1636a9cccb12e7e7cc0180b25e98f893", "score": "0.6082184", "text": "public function auth();", "title": "" }, { "docid": "ded6ccc26aeaa016e0a51ad4b1b274a8", "score": "0.60604686", "text": "public function _authenticate() {\n\t// @codingStandardsIgnoreEnd\n\t\treturn parent::_authenticate();\n\t}", "title": "" }, { "docid": "1c281051c574e40c31efce4c3f9b8b50", "score": "0.60546505", "text": "public function authenticate ( $email, $password );", "title": "" }, { "docid": "90ca23d715631775321c407ed4fbb609", "score": "0.60393083", "text": "public function authenticate($adapter)\n {\n if ($this->hasIdentity()) {\n $this->clearIdentity();\n }\n $loginResult = new Result(Result::FAILURE_UNKNOWN, '', 'Login Error: Contact Administrator.');\n if ($adapter) {\n $loginResult = $adapter->authenticate();\n }\n if ($loginResult && $loginResult->isValid()) {\n $this->getStorage()->write($loginResult->getIdentity());\n }\n return $loginResult;\n }", "title": "" }, { "docid": "b8886b6d5fb93343a4f8f9140a6fcf7c", "score": "0.602771", "text": "public function authenticateRequest(){\r\n $this->authenticationHandler->authenticate();\r\n }", "title": "" }, { "docid": "81c1d589a18a1171617aed5dfd7458c8", "score": "0.6006172", "text": "abstract public function authenticate(array $credentials);", "title": "" }, { "docid": "8a0cd05b4139e86c46309aca13661659", "score": "0.60048145", "text": "public function auth() {\r\n\r\n }", "title": "" }, { "docid": "bec383f5eb9aa1ff0f62423165d8de80", "score": "0.5987475", "text": "public function authenticate($user, $request, $response);", "title": "" }, { "docid": "969dd18c6d7162a72f4d3cf3229c76d5", "score": "0.59780115", "text": "public function authenticate(array $config);", "title": "" }, { "docid": "0b79471b4fbe7c77e6293cbe5855dbaa", "score": "0.5959966", "text": "public function testAuthenticateSuccessWithTreatment(): void\n {\n $this->_adapter = new Adapter\\DbTable($this->_db, 'users', 'username', 'password', '?');\n $this->_adapter->setIdentity('my_username');\n $this->_adapter->setCredential('my_password');\n $result = $this->_adapter->authenticate();\n $this->assertTrue($result->isValid());\n }", "title": "" }, { "docid": "b4154ea1a21e4e817e4c52c8becf832e", "score": "0.5958717", "text": "public function authenticate()\n {\n $session = Zend_Registry::get('session');\n $session->authentication = new ArrayObject(\n Model_User::getAuthUser(),\n ArrayObject::ARRAY_AS_PROPS\n );\n }", "title": "" }, { "docid": "9e07685e3a85250b7f21d14e4a237d71", "score": "0.59380156", "text": "public function loginUser($authInfo);", "title": "" }, { "docid": "9e07685e3a85250b7f21d14e4a237d71", "score": "0.59380156", "text": "public function loginUser($authInfo);", "title": "" }, { "docid": "7703b3d53f9748ecd6b0645b0676bb94", "score": "0.59377784", "text": "protected function authenticate()\n {\n $this->load->library('users/auth');\n\n // Ensure the user is logged in.\n $this->auth->restrict();\n $this->set_current_user();\n }", "title": "" }, { "docid": "1ed516889163879c72b2f89399a881d4", "score": "0.59131694", "text": "function authenticate(){\n\n\t\t$params = array('app_id'=>$this->app_id,'app_secret'=>$this->app_secret, 'device_id'=>$this->device_id);\n\n\t\t$response = $this->request->make_request(PicovicoUrl::app_authenticate, $params, NULL, PicovicoRequest::POST, PicovicoRequest::ANONYMOUS);\n\n\t\tif(isset($response['access_key']) AND isset($response['access_token'])){\n\t\t\t$this->set_login_tokens($response['access_key'], $response['access_token']);\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "4744cd08ff45290f21dabb4c45f41e01", "score": "0.59062076", "text": "public function authenticate()\n {\n if (!$this->provider)\n {\n throw new RuntimeException('This adapter must be configured with an OAuth provider '\n .'before authentication can occur');\n }\n\n if (!($tokenData = $this->provider->getAccessTokenData()))\n return $this->_failureResult();\n\n return new AuthResult(AuthResult::SUCCESS, new AccessTokenIdentity($tokenData));\n }", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.58977336", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.5897523", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "7f69657c70818b5d8a4a5c18192e9398", "score": "0.58973384", "text": "protected function getBackendUserAuthentication() {}", "title": "" }, { "docid": "26e25127ffac4fe0ccbbb6113a678b32", "score": "0.5865931", "text": "protected function authenticate()\n {\n // Load the Auth library before the parent constructor to ensure the\n // current user's settings are honored by the parent\n $this->load->library('users/ion_auth');\n\n // implement below functionality\n /*\n * // Ensure the user is logged in.\n * $this->auth->restrict();\n *\n * $this->set_current_user();\n */\n }", "title": "" }, { "docid": "16171288a88c244114d459ebbcba55b3", "score": "0.58638763", "text": "public function setAdapter(App_Auth_Adapter $adapter)\n {\n $this->adapter = $adapter;\n RETURN $this;\n }", "title": "" }, { "docid": "befaf28889645a007c396dd591eec313", "score": "0.5850794", "text": "public function authenticate()\n\t{\n\t\t$consumer = Consumer::forge($this->config);\n\t\t\n\t\t// Load the provider\n\t\t$provider = Provider::forge($this->provider);\n\t\t\n\t\t// Create the URL to return the user to\n\t\t$callback = Arr::get($this->config, 'callback') ?: Uri::create(Config::get('autho.urls.callback', \\Request::active()->route->segments[0].'/callback'));\n\t\t$callback = rtrim($callback, '/').'/'.$this->provider;\n\t\t\n\t\t// Add the callback URL to the consumer\n\t\t$consumer->callback($callback); \n\n\t\t// Get a request token for the consumer\n\t\t$token = $provider->request_token($consumer);\n\n\t\t// Store the token\n\t\tCookie::set('oauth_token', base64_encode(serialize($token)));\n\n\t\t// Redirect to the twitter login page\n\t\tResponse::redirect($provider->authorize_url($token, array(\n\t\t\t'oauth_callback' => $callback,\n\t\t)));\n\t}", "title": "" }, { "docid": "3ce6942c986027d85e46ec177503f3cb", "score": "0.5842085", "text": "public function authenticate(Request $request);", "title": "" }, { "docid": "3ce6942c986027d85e46ec177503f3cb", "score": "0.5842085", "text": "public function authenticate(Request $request);", "title": "" }, { "docid": "e9cc3ace36e56c646cbf79f9ec5a46fe", "score": "0.5810123", "text": "public function authenticate()\n {\n $identity = $this->getIdentity();\n $results = $this->model->findByIdentity($identity);\n\n $identityObject = null;\n $count = 0;\n foreach ($results as $identityObject) {\n if ($count > 1) {\n return new Result(\n Result::FAILURE_IDENTITY_AMBIGUOUS,\n $identity,\n ['More than one record matches the supplied identity.']\n );\n }\n $count++;\n }\n\n if ($count == 0) {\n return new Result(\n Result::FAILURE_IDENTITY_NOT_FOUND,\n $identity,\n ['A record with the supplied identity could not be found.']\n );\n }\n\n if ($identityObject instanceof ObjectInterface) {\n if ($identityObject->validateCredential($this->getCredential())) {\n return new Result(Result::SUCCESS, $identity);\n } // else\n return new Result(\n Result::FAILURE_CREDENTIAL_INVALID,\n $identity,\n ['wrong password']\n );\n }\n\n return new Result(\n Result::FAILURE_UNCATEGORIZED,\n $identity,\n ['generic error']\n );\n }", "title": "" }, { "docid": "44b6b89f588ee721d1ba3fd93a1c7245", "score": "0.5806114", "text": "public function authenticate ($username, $password) {}", "title": "" }, { "docid": "5f6bf509c9e151c029b6a89ef2cfee71", "score": "0.58053505", "text": "public function authenticate(Adapter $adapter, $rememberMe = true)\n {\n $result = null;\n \n if ('' == $this->getIdentity()) {\n $adapterResult = $adapter->authenticate();\n\t\t\t\n if ($adapterResult->isValid()) {\n $sessionEntity = $this->_entityName;\n $newSession = new $sessionEntity(\n $this->_expire,\n $adapterResult->getPersonObject(),\n $_SERVER['HTTP_USER_AGENT'],\n $_SERVER['REMOTE_ADDR']\n );\n $this->_entityManager->persist($newSession);\n\t\t\t\t\n $this->getStorage()->write($newSession->getId());\n if ($rememberMe) {\n setcookie(\n $this->_namespace . '_' . $this->_cookieSuffix, $newSession->getId(), time() + $this->_expire, '/'\n );\n } else {\n setcookie(\n $this->_namespace . '_' . $this->_cookieSuffix, '', -1, '/'\n );\n }\n \n $result = $adapterResult;\n \n if (isset($this->_action))\n $this->_action->succeededAction($result);\n } else {\n $result = $adapterResult;\n if (isset($this->_action))\n $this->_action->failedAction($adapterResult);\n }\n } else {\n $session = $this->_entityManager->getRepository($this->_entityName)->findOneById(\n $this->getIdentity()\n );\n\n if (null !== $session) {\n $sessionValidation = $session->validateSession(\n \t$this->_entityManager,\n $_SERVER['HTTP_USER_AGENT'],\n $_SERVER['REMOTE_ADDR']\n );\n\n if (true !== $sessionValidation) {\n $this->getStorage()->write($sessionValidation);\n if ($rememberMe) {\n setcookie(\n $this->_namespace . '_' . $this->_cookieSuffix, $sessionValidation, time() + $this->_expire, '/'\n );\n } else {\n setcookie(\n $this->_namespace . '_' . $this->_cookieSuffix, '', -1, '/'\n );\n }\n }\n\n\t\t\t\t$result = new Result(\n Result::SUCCESS,\n $session->getPerson()->getUsername(),\n array(\n 'Authentication successful'\n ),\n $session->getPerson()\n );\n } else {\n $this->clearIdentity();\n }\n }\n\t\t\n $this->_entityManager->flush();\n\n return $result;\n }", "title": "" }, { "docid": "a158334f6c3b5869c7bc8f2f0f93630d", "score": "0.5799482", "text": "public function authenticate()\n {\n if ($this->_identity != self::$_username || $this->_credential != self::$_password) {\n return new Zend_Auth_Result(Zend_Auth_Result::FAILURE,\n null, array('Authentication failure.'));\n }\n\n return new Zend_Auth_Result(Zend_Auth_Result::SUCCESS,\n $this->_identity, array('Authentication sucessful.'));\n }", "title": "" }, { "docid": "5d3af14a6b55a9a2f9b49432fc6d7248", "score": "0.57983845", "text": "protected function auth() { return $this->_auth(); }", "title": "" }, { "docid": "20fe0bca896027567262560a0f63b391", "score": "0.57956743", "text": "public function processAction(){\n if (! $this->request->isPost()) {\n return $this->redirect()->toRoute(NULL,\n array('controller' => 'Auth',\n 'action' => 'auth'\n ));\n }\n $post = $this->getRequest()->getPost();\n//\n $dbAdapter = $this->getServiceLocator()->get('Zend\\Db\\Adapter\\Adapter');\n//\n $config = $this->getServiceLocator()->get('Config');\n//\n $salt = $config['salt'];\n//\n $authAdapter = new CredentialTreatmentAdapter(\n $dbAdapter,\n 'users',\n 'user_email',\n 'user_password',\n \"MD5(?) AND user_role = 'admin'\"\n //\"MD5(CONCAT('$salt', ?, user_password)) AND user_role = 'admin'\"\n );\n//\n $authAdapter\n ->setIdentity($post->user_email)\n ->setCredential($post->user_password)\n ;\n//\n $auth = new AuthenticationService();\n $result = $auth->authenticate($authAdapter);\n//\n switch ($result->getCode()):\n case Result::FAILURE_IDENTITY_NOT_FOUND:\n //\n $this->flashMessenger()\n ->setNamespace('not_admin')\n ->addMessage('wrong email/pasword');\n //\n return $this->redirect()->toRoute(NULL, array(\n 'controller' => 'Auth', 'action' => 'auth'\n ));\n //\n break;\n case Result::FAILURE_CREDENTIAL_INVALID:\n //\n $this->flashMessenger()\n ->setNamespace('not_admin')\n ->addMessage('admin-only allowed');\n //\n return $this->redirect()->toRoute(NULL, array(\n 'controller' => 'Auth', 'action' => 'auth'\n ));\n //\n break;\n case Result::SUCCESS:\n $storage = $auth->getStorage();\n $storage->write($authAdapter->getResultRowObject(\n null,\n 'user_password'\n ));\n $session = new Container('admin');\n $time = 900;\n if($post->rememberMe){\n $session -> remember = $time;\n }\n $session -> user_email = $post->user_email;\n return $this->redirect()->toRoute('index' , array( // instead of NULL as usually - route mane !!!\n 'controller' => 'Index',\n 'action' => 'index',\n ));\n break;\n default:\n //\n break;\n endswitch;\n }", "title": "" }, { "docid": "8b05bdbf237450bbd73ced52adbbb58c", "score": "0.5793887", "text": "public function authentic(){\n return $this->authenticator->authenticate();\n }", "title": "" }, { "docid": "1a89b4d5ad581bd5fc7b92f9b8ddb092", "score": "0.5789788", "text": "public function authenticate()\n {\n $this->ensureIsNotRateLimited();\n\n $validator = Validator::make($this->all(), [\n 'tenant_id' => 'required|exists:users,tenant_id',\n 'nickname' => 'required|exists:users,nickname',\n 'password' => 'required',\n ]);\n\n if ($validator->fails()) {\n RateLimiter::hit($this->throttleKey());\n throw ValidationException::withMessages($validator->errors()->toArray());\n }\n\n if (! Auth::attempt($this->only('tenant_id', 'nickname', 'password'), $this->filled('remember'))) {\n RateLimiter::hit($this->throttleKey());\n\n throw ValidationException::withMessages([\n 'nickname' => __('auth.failed'),\n ]);\n }\n\n RateLimiter::clear($this->throttleKey());\n }", "title": "" }, { "docid": "d335a64c98509d65160bfc7baa54721a", "score": "0.57773364", "text": "public function authenticate()\n {\n\n $result = array(\n 'code' => Result::FAILURE,\n 'identity' => array(\n 'userName' => $this->userName,\n ),\n 'messages' => array()\n );\n\n $restService = new RestService($this->createArrData(), 'POST', 'rest/login');\n $response = $restService->call($this->request);\n\n if ($response->getStatusCode() == 200) {\n $result['code'] = Result::SUCCESS;\n }\n else {\n return new Result(\n Result::FAILURE_CREDENTIAL_INVALID,\n array(),\n array('Failure due to invalid credential being supplied')\n );\n }\n return new Result($result['code'], $result['identity'], $result['messages']);\n }", "title": "" }, { "docid": "fc2336a6416ffbbeac4f0f18be2f06e3", "score": "0.5767905", "text": "public function requireAuth();", "title": "" }, { "docid": "1df4f38b256e9ef7bcd9e46f11c3b401", "score": "0.5767191", "text": "function authenticate(){\n\t\treturn parent::authenticate();\n\t}", "title": "" }, { "docid": "6a75b1c105acf03320671b9ed0f4b568", "score": "0.5766692", "text": "abstract public function authenticate(&$state);", "title": "" }, { "docid": "7466e5feecb2947fd08e3e3bf715f8c1", "score": "0.5765656", "text": "function auth() {\n $body = array(\n 'username' => $this->input->post('username'),\n 'password' => $this->input->post('password')\n );\n\n $date = gmdate('D, d M Y H:i:s \\G\\M\\T', time());\n\n $contentMd5 = base64_encode(md5(json_encode($body), true));\n $contentType = $this->mimeType['json'];\n $authorization = self::__authorization_header('post', $contentType, $date, config_item('x-sam-api-key'), 'v1/i/login', $contentMd5);\n\n $array = array(\n 'date' => $date,\n 'MD5' => $contentMd5,\n 'Type' => $contentType,\n 'auth' => $authorization,\n 'resource' => 'v1/i/login',\n 'verb' => 'post',\n 'api-key' => config_item('x-sam-api-key')\n );\n\n\n $this->output->set_content_type('application/json');\n $this->output->set_output(json_encode($array));\n }", "title": "" }, { "docid": "bb6dfd788c4e52959681d97301eb94db", "score": "0.5753084", "text": "public function authenticate() {\n if ( Auth::attempt( ['email' => $email, 'password' => $password, 'verified' => 1] ) ) {\n // Authentication passed...\n return redirect()->intended( '/' );\n }\n }", "title": "" }, { "docid": "cfcb21f707cb96052b6f8304821c3045", "score": "0.5748239", "text": "public function authenticate()\n {\n try\n {\n $this->checkUser();\n }\n catch (\\Exception $e)\n {\n switch ($e->getMessage()) {\n case self::WRONG_DATA:\n return $this->result(\\Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, self::BAD_DATA_MESSAGE);\n case self::UNAPROVED:\n return $this->result(\\Zend_Auth_Result::FAILURE_CREDENTIAL_INVALID, self::UNAPROVED_MESSAGE);\n default:\n throw $e;\n }\n }\n return $this->result(\\Zend_Auth_Result::SUCCESS);\n\n }", "title": "" }, { "docid": "1821ff01f129eb117404ae1a4c589f1b", "score": "0.57429516", "text": "protected function _getAuthAdapter($formData)\n {\n $dbAdapter = Zend_Registry::get('db');\n $authAdapter = new Zend_Auth_Adapter_DbTable($dbAdapter);\n $authAdapter->setTableName('users')\n ->setIdentityColumn('username')\n ->setCredentialColumn('password')\n ->setCredentialTreatment('SHA1(?)');\n\n // get \"salt\" for better security\n $config = Zend_Registry::get('config');\n $salt = $config->auth->salt;\n $password = $salt.$formData['password'];\n \n $authAdapter->setIdentity($formData['username']);\n $authAdapter->setCredential($password);\n\n return $authAdapter;\n }", "title": "" }, { "docid": "c2cf36b17413c31656a84d8efd843660", "score": "0.5738088", "text": "public function authenticate()\r\n {\r\n // Retrieve the user's information (e.g. from a database)\r\n // and store the result in $row (e.g. associative array).\r\n // If you do something like this, always store the passwords using the\r\n // PHP password_hash() function!\r\n if (empty($this->currentIdentity)) {\r\n $success = false;\r\n $identity = [];\r\n } else {\r\n $success = true;\r\n $identity = $this->currentIdentity;\r\n }\r\n\r\n if (!empty($this->account)) {\r\n $identity['username'] = null;\r\n $identity['usuario'] = null;\r\n $identity['acesso'] = null;\r\n $identity['reuniao'] = null;\r\n $u = $this->account['username'];\r\n $p = $this->account['password'];\r\n $usuario = $this->account['usuario'];\r\n\r\n if (empty($usuario)) {\r\n $usuario = $this->usuarioTable->getUsuarioByEmail($u);\r\n }\r\n $usuarioMatch = empty($usuario) ? false : $usuario->usuario_senha === $p;\r\n if ($usuarioMatch) {\r\n // $uaut = $usuario->usuario_autorizado;\r\n /*if (empty($uaut)) {\r\n return new Result(Result::FAILURE, $u, [\r\n 'Sua conta ainda não foi autorizada pelo administrador!',\r\n ]);\r\n }*/\r\n $acesso = $this->registerAcessoUsuario($usuario);\r\n $reuniao = null;\r\n if (!empty($usuario->id_reuniao)) {\r\n $reuniao = $this->localReuniaoTable->getLocalReuniao($usuario->id_reuniao);\r\n if (!empty($reuniao)) {\r\n $reuniao = $reuniao->toArraySessao();\r\n }\r\n }\r\n $identity['username'] = $usuario->usuario_email;\r\n $identity['usuario'] = $usuario->toArraySessao();\r\n $identity['acesso'] = $acesso->toArray();\r\n $identity['reuniao'] = $reuniao;\r\n $success = true;\r\n } else {\r\n return new Result(Result::FAILURE_CREDENTIAL_INVALID, $u, [\r\n 'Login ou senha inválidos'\r\n ]);\r\n }\r\n\r\n }\r\n\r\n if (!empty($this->facebook)) {\r\n $identity['facebook'] = $this->facebook;\r\n $success = true;\r\n }\r\n\r\n if (!empty($this->google)) {\r\n $identity['google'] = $this->google;\r\n $success = true;\r\n }\r\n\r\n if (!empty($this->twitter)) {\r\n $identity['twitter'] = $this->twitter;\r\n $success = true;\r\n }\r\n\r\n if (!empty($this->linkedin)) {\r\n $identity['linkedin'] = $this->linkedin;\r\n $success = true;\r\n }\r\n\r\n // if (!empty($this->github)) {\r\n // $identity['github'] = $this->github;\r\n // $success = true;\r\n // }\r\n\r\n // if (!empty($this->paypal)) {\r\n // $identity['paypal'] = $this->paypal;\r\n // $success = true;\r\n // }\r\n\r\n if (!empty($this->reuniao)) {\r\n $identity['reuniao'] = $this->reuniao->toArraySessao();\r\n }\r\n\r\n if ($success) {\r\n return new Result(Result::SUCCESS, $identity);\r\n } else {\r\n return new Result(Result::FAILURE_CREDENTIAL_INVALID, [], [\r\n 'Nenhuma credencial informada'\r\n ]);\r\n }\r\n }", "title": "" }, { "docid": "8c627357272c95b53badb0c0c483119d", "score": "0.5731329", "text": "public function authenticate() {\n \treturn new Zend_Auth_Result(Zend_Auth_Result::SUCCESS, 'anonymous');\n }", "title": "" }, { "docid": "ca6212cec962b8b8f42450837ac32f02", "score": "0.57094485", "text": "public function authenticate()\n {\n // grab the user details\n $socialite = Socialite::driver($this->driver)->user();\n\n // if no email address is available, see if we can request it\n $email = $socialite->email ?: (new EmailRequest)->get($this->driver, $socialite);\n\n // get our user details and log them in\n $user = $this->getUser($email, $socialite);\n Auth::login($user);\n\n return $user;\n }", "title": "" }, { "docid": "3de5559dbb4b29bc2d38e613150d47f3", "score": "0.57024914", "text": "public function authenticate()\n {\n return true;\n }", "title": "" }, { "docid": "d273fdad5941d8cbd3da692b157e4227", "score": "0.5690653", "text": "public function authenticate($username, $password);", "title": "" }, { "docid": "d273fdad5941d8cbd3da692b157e4227", "score": "0.5690653", "text": "public function authenticate($username, $password);", "title": "" }, { "docid": "7432b37f0c3fc5d32c20fe89211d3d0e", "score": "0.56890345", "text": "protected function authenticate()\n {\n $user = User::create([\n 'name' => 'Lucas Yang',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n $this->actingAs($user);\n\n $this->app['request']->setUserResolver(function () use ($user) {\n return $user;\n });\n }", "title": "" }, { "docid": "12a3d1861039af6745e5294a144ee4c0", "score": "0.5687971", "text": "private function auth()\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$this->setRequestOptions(\"https://{$this->apiAuthURL}/\".self::API_VERSION, \"GET\");\r\n\t\t\t\t$response = $this->sendRequest();\r\n\t\t\t\t$this->xAuthToken\t= $response['headers']['X-Auth-Token'];\r\n\t\t\t\t$this->xSessionUrl\t= $response['headers']['X-Server-Management-Url'];\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\t\t\t\tthrow $e;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "99e0b56922e94e34f71c5c34ef3a7b5e", "score": "0.56823915", "text": "public function authenticate()\n {\n $username = $this->_siteInfo->username;\n $password = $this->_siteInfo->password;\n\n $httpClient = $this->_httpClient;\n $httpClient->setParameterGet(array(\n 'username' => $username,\n 'password' => $password,\n 'wptoolaction' => 'login'\n ));\n\n $httpRequest = $httpClient->request();\n if (!$httpRequest->isSuccessful()) {\n return false;\n }\n\n $responseObj = $this->_getJsonResponse();\n if ($responseObj->authenticated === true) {\n $this->_isAuthenticated = true;\n $this->_userObject = $responseObj->response;\n return true;\n }\n\n $this->_authError = $responseObj->response;\n return false;\n }", "title": "" }, { "docid": "e69dac1f540cb884905cdfabda181f7f", "score": "0.5675733", "text": "public function authenticate()\r\n {\r\n $query = $this->_getQuery();\r\n $result = $query->execute($this->_getQueryParams());\r\n if ($this->_isValidCollection($result)) {\r\n $record = $result->getFirst();\r\n if ($this->_isValidRecord($record)) {\r\n $this->_setResultRecord($record);\r\n return $this->_createResult();\r\n }\r\n }\r\n return $this->_getResult();\r\n }", "title": "" }, { "docid": "355ec1b5d0c96e06b25f065e27ade8b5", "score": "0.5668129", "text": "public abstract function authenticate($username, $password);", "title": "" }, { "docid": "52f94db0c8357d4b9117b2119022650b", "score": "0.56608117", "text": "public function __invoke(ContainerInterface $container)\n {\n return new MyAuthAdapter(\n $container->get(Adapter::class)\n );\n }", "title": "" }, { "docid": "42cff0906cb987d7f59c0feea2ad231b", "score": "0.56490046", "text": "public function authenticate($login, $password);", "title": "" }, { "docid": "336898ab4327aba6f600a5c774defed1", "score": "0.5639155", "text": "public function login() {\n //The authenticate function will cause a redirect to the OpenID provider\n // unless the current url contains a code parameter. In that case, the\n // code will be used to aquire tokens from the api endpoint.\n\n try {\n $success = $this->oidcClient->authenticate();\n } catch (OpenIDConnectClientException $exception) {\n if (App::environment('local')) {\n throw $exception;\n }\n abort(400);\n }\n\n if ($success) {\n //Request user info from the endpoint. This will be used below.\n $userInfo = $this->oidcClient->requestUserInfo();\n\n //Retrieve (or create) user that matches token\n $token = $this->tokenParser->parse($this->oidcClient->getIdToken());\n $user = $this->userProvider->retrieveByCredentials($token->getClaims());\n\n //Store refresh token\n $iss = $token->getClaim('iss');\n $sub = $token->getClaim('sub');\n $this->tokenStorage->saveRefresh($iss, $sub, $this->oidcClient->getRefreshToken());\n\n //Update user model if it differs from openid user\n if($user->name !== $userInfo->name ||\n $user->email !== $userInfo->email) {\n $user->name = $userInfo->name;\n $user->email = $userInfo->email;\n $user->save();\n }\n\n //Set user in guard\n Auth::setUser($user);\n\n\n //Save id token stateless log-in\n $this->requestTokenParser->save($token);\n\n //Create a response redirecting user to intended route or home page\n $response = redirect()->intended(route($this->homeRoute()));\n\n return $response;\n } else {\n Session::forget('url.intented');\n return redirect()->route($this->homeRoute());\n }\n }", "title": "" }, { "docid": "8c2cd465f1385b25e27a05aa06246eb2", "score": "0.5626565", "text": "public function authenticate() {\n\t\t$resource = \"auth\";\n\n\t\t$url = $this->buildUrl($resource);\n\n\t\t$authorizationHeader = $this->generateAuthorizationHeader(\"GET\", $resource, \"\");\n\n\t\t$response = file_get_contents($url, false, stream_context_create(array(\n\t\t\t\"http\" => array(\n\t\t\t\t\"ignore_errors\" => true,\n\t\t\t\t\"method\" => \"GET\",\n\t\t\t\t\"header\" => \"Authorization: \". $authorizationHeader .\"\\r\\n\".\n\t\t\t\t\t\t\t\"Content-Type: application/x-www-form-urlencoded\\r\\n\"\n\t\t\t)\n\t\t)));\n\n\t\t$headers = parseHeaders($http_response_header);\n\t\tif ($headers[\"response_code\"] != 200 || $response === false) {\n\t\t\tthrow new Exceptions\\AuthorizationException(\"Authentication failed!\");\n\t\t}\n\n\t\t$parsedResponse = json_decode($response);\n\t\t$authenticationResponse = new Contracts\\AuthenticationResponse($parsedResponse);\n\n\t\t// Set token on the credentials\n\t\t$token = new Auth\\AuthenticationToken($authenticationResponse->token, $authenticationResponse->dateExpires);\n\t\t$this->credentials->setToken($token);\n\t\treturn $token;\t\t\n\t}", "title": "" }, { "docid": "b93afdbff4e38340a2f818f7a99abb7c", "score": "0.5611169", "text": "public function authenticate()\n {\n if (Auth::attempt(['email' => $email, 'password' => $password])) {\n // Authentication passed...\n return redirect('/dashboard');\n }\n }", "title": "" }, { "docid": "46c0957684f6486d63ea84aa341b4f18", "score": "0.56104255", "text": "public function authenticatePlatypus() {\n\t\t\n\t}", "title": "" }, { "docid": "1402f1801ced6c8b644f511ddcbcc582", "score": "0.56016016", "text": "public function authenticate()\n {\n $this->_authenticateSetup();\n\n $dbSelect = $this->_authenticateCreateSelect();\n $identity = $this->_authenticateQuerySelect($dbSelect);\n $authResult = $this->_authenticateValidateResultSet($identity);\n\n if ($authResult instanceof Zend_Auth_Result) {\n return $authResult;\n }\n\n /// _authenticateValidateResult() attempts to make certain that only\n /// one record was returned in the resultset.\n return $this->_authenticateValidateResult(array_shift($identity));\n }", "title": "" }, { "docid": "43a98880d798fd03f3e43b75da5ac411", "score": "0.559355", "text": "public function getAuthentication();", "title": "" }, { "docid": "21424ff63bdcaea573d074d8c5e22dba", "score": "0.5593112", "text": "public function authenticate()\n {\n $x_rainbow_app_auth = AuthTool::x_rainbow_app_auth(Settings::findMonoValue('$.application.appID'), Settings::findMonoValue('$.application.appSecret'), Settings::findMonoValue('credentials.password'));\n $accept = AuthTool::$accept; // string | application/json\n $x_rainbow_client = AuthTool::$x_rainbow_client; // string | the app used\n $x_rainbow_client_version = AuthTool::$x_rainbow_client_version; // string | 1.10.7\n try {\n $this->authClientApi = new AuthenticationApi(\n $this->guzzleHttpClient,\n $this->authConfig\n );\n $result = $this->authClientApi->getBasicLogin($x_rainbow_app_auth, $accept, $x_rainbow_client, $x_rainbow_client_version);\n return $result;\n } catch (Exception $e) {\n echo 'Exception when calling AuthenticationApi->getBasicLogin: ', $e->getMessage(), PHP_EOL;\n throw $e;\n }\n }", "title": "" }, { "docid": "67763a8ed0ade301d0ff8018b012b14e", "score": "0.5589606", "text": "public function getAuth(): AuthInterface;", "title": "" }, { "docid": "c74fd2aab82434faaa8598020462bf89", "score": "0.5585802", "text": "public function authenticate()\n\t{\n\t\t$this->validateLogin();\n\t\n\t\t// Login to Bikeshare\n\t\t$data = array(\n\t\t\t'username' => $this->username,\n\t\t\t'password' => $this->password,\n\t\t);\n\t\t\n\t\t// Post and authenticate to Bikeshare\n\t\t$data = http_build_query($data); // Convert array to http query string\n\t\t$opts = array(\n\t\t 'http' => array(\n\t\t 'method' => \"POST\",\n\t\t 'header' => \"User-Agent: \". self::USER_AGENT .\"\\r\\n\" .\n\t\t \"Content-Type: application/x-www-form-urlencoded\\r\\n\" .\n\t\t \"Content-Length: \" . strlen($data) . \"\\r\\n\",\n\t\t 'content' => $data\n\t\t )\n\t\t);\n\t\t\n\t\t$context = stream_context_create($opts);\n\t\t$loginPage = file_get_contents(\"https://www.capitalbikeshare.com/login\", false, $context);\n\n\t\t// Destroy password and data\n\t\tunset($this->password);\n\t\tunset($data);\n\n\t\t// Check for redirect header\n\t\t$headers = $this->http_parse_headers($http_response_header);\n\n\t\t// If we are not redirected, login must be invalid\n\t\tif (!isset($headers['Location']))\n\t\t{\n\t\t\tthrow new APIException('Invalid username or password');\n\t\t}\n\t\t\n\t\t$this->fillCookieJar($http_response_header);\n\n\t\t$this->isAuthenticated = true;\n\t}", "title": "" }, { "docid": "5521df30632e387b54dc9ec3a0c59767", "score": "0.5585104", "text": "abstract public function isAuthenticated();", "title": "" }, { "docid": "8e9739979836a2b0d65d529a10095f64", "score": "0.55738986", "text": "public function authenticate()\n {\n $object = 'login';\n $url = sprintf('/api/%s/version/%s', $object, $this->version);\n $parameters = array(\n 'email' => $this->email,\n 'password' => $this->password,\n 'user_key' => $this->userKey,\n 'format' => $this->format\n );\n\n $this->apiKey = $this->doPost($object, $url, $parameters);\n\n return $this->apiKey;\n }", "title": "" }, { "docid": "d92be0b9a764d5b4a16f360ac4d6b434", "score": "0.55702007", "text": "private function authenticate()\n {\n // Getting request headers\n $headers = apache_request_headers();\n $response = array();\n\n // Verifying Authorization Header\n if (isset($headers['Authorization'])) {\n\n // get the api key\n $api_key = $headers['Authorization'];\n // validating api key\n if (!$this->user->isValidApiKey($api_key)) {\n // api key is not present in users table\n $response[\"error\"] = true;\n $response[\"message\"] = \"Access Denied. Invalid Api key\";\n $this->outputJSON($response, 200);\n exit;\n } else {\n global $user_id;\n // get user primary key id\n $user_id = $this->user->getUserId($api_key);\n }\n } else {\n // api key is missing in header\n $response[\"error\"] = true;\n $response[\"message\"] = \"Api key is misssing\";\n $this->outputJSON($response, 200);\n exit;\n }\n }", "title": "" }, { "docid": "72f5a1af22f50fe60a8b11ddfc4df4a2", "score": "0.5569734", "text": "public function authenticate() {\n\t\t\n\t\t//Hacky workaround for getting redirect URI from Guzzle\n\t\t/** @var Uri */\n\t\t$uri = new Uri();\n\t\t$handler = HandlerStack::create();\n\t\t$handler->push(Middleware::mapRequest(function(RequestInterface $request) use (&$uri){\n\t\t\t$uri = $request->getUri();\n\t\t\treturn $request;\n\t\t}));\n\t\t\n\t\t$client = new GuzzleClient([\n\t\t\t'handler' => $handler,\n\t\t\t'base_uri' => 'https://auth.api.sonyentertainmentnetwork.com',\n\t\t\t'cookies' => $this->_CookieJar,\n\t\t\t'decode_content' => 'gzip',\n\t\t\t//'debug' => true\n\t\t]);\n\t\t\n\t\t//1. GET authorise page\n\t\ttry{\n\t\t\t$resp = $client->get('/2.0/oauth/authorize', [\n\t\t\t\t'query' => [\n\t\t\t\t\t'response_type' => 'code',\n\t\t\t\t\t'client_id' => '78420c74-1fdf-4575-b43f-eb94c7d770bf',\n\t\t\t\t\t'redirect_uri' => 'https://www.bungie.net/en/User/SignIn/Psnid',\n\t\t\t\t\t'scope' => 'psn:s2s',\n\t\t\t\t\t'request_locale' => 'en'\n\t\t\t\t]\n\t\t\t]);\n\t\t}\n\t\tcatch(TransferException $ex){\n\t\t\tthrow new PsnAuthenticationException(\n\t\t\t\t\t'Failed to get PSN login page', 0, $ex);\n\t\t}\n\n\t\t//2. POST login details\n\t\t//Allow redirects to bungie.net (if any)\n\t\ttry{\n\t\t\t$resp = $client->post('/login.do', [\n\t\t\t\t'form_params' => [\n\t\t\t\t\t//'params' => $dom->getElementById('brandingParams')->getAttribute('value'),\n\t\t\t\t\t'j_username' => $this->_Email,\n\t\t\t\t//\t'rememberSignIn' => 'on',\n\t\t\t\t\t'j_password' => $this->_Password\n\t\t\t\t]\n\t\t\t]);\n\t\t}\n\t\tcatch(TransferException $ex){\n\t\t\tthrow new PsnAuthenticationException(\n\t\t\t\t\t'Failed to POST PSN details', 0, $ex);\n\t\t}\n\t\t\n\t\t//3. Check for failure\n\t\t\n\t\t//Try to get error from PSN login page\n\t\tif(StringFunctions::contains($uri->getQuery(), 'authentication_error')){\n\t\t\t\n\t\t\t$dom = HtmlDomParser::str_get_html($resp->getBody());\n\t\t\t$matches = array();\n\t\t\t\n\t\t\tif(($errDiv = $dom->getElementById('errorDivMessage')) !== null){\n\t\t\t\t\\preg_match('/^(.+?)<br/ius', \\trim($errDiv->innertext), $matches);\n\t\t\t}\n\t\t\t\n\t\t\tthrow new PsnAuthenticationException(isset($matches[1])\n\t\t\t\t\t? $matches[1] : 'Unknown error');\n\t\t\t\n\t\t}\n\t\t\n\t\t//Check for unregistered bungie.net user\n\t\tif(StringFunctions::endsWith(\\strtolower($uri->getPath()), 'register')){\n\t\t\tthrow new BungieAuthenticationException('Unregistered user');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "0412e61d72903be520253fe6ca52d3f4", "score": "0.55649346", "text": "public function auth($username, $password, $method = CURLAUTH_BASIC);", "title": "" }, { "docid": "32a4d17e9d13a7aba28d349899334520", "score": "0.5561088", "text": "private function attemptAuth()\n\t{\n\t\t$guid = Request::segment(2);\n\t\t$method = Request::segment(3, 'empty');\n\t\t$ip_address = Request::ip();\n\t\t$fullUrl = Request::fullUrl(); // if request fails, only then log the full query string\n\n\t\tif ( Input::get( 'cryptotype' ) ) {\n\t\t\t$this->crypto_type_id = Input::get( 'cryptotype' );\n\t\t}\n\n\t\t$error = $this->checkQueryRequiredArgs();\n\n\t\tif ( $error ) {\n\t\t\tLog::error(\"Query arguments not correct. Error: $error. Arguments - GUID: $guid, method: $method, ipAddress: $ip_address. Full URL: $fullUrl\");\n\t\t\treturn false;\n\t\t}\n\t\t$user_valid = $this->validateUser( $guid ); // error is printed inside #validateUser function\n\t\tif ( $user_valid['status'] == 'error' ) {\n\t\t\tLog::error('User not validated. Error: ' . $user_valid['message'] . \". Arguments - GUID: $guid, method: $method, ipAddress: $ip_address. Full URL: $fullUrl\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" } ]
c02ba1ce1fa03a6c6cf1925155836874
Generated from protobuf field string Company = 5;
[ { "docid": "a1572ad1c4f13743ba006d6d8d821ee0", "score": "0.58728516", "text": "public function getCompany()\n {\n return $this->Company;\n }", "title": "" } ]
[ { "docid": "70cc27ddd7e9c5ee53c87134cdb69c2a", "score": "0.6341465", "text": "public function getCompany() {\n return @$this->attributes['company'];\n }", "title": "" }, { "docid": "4584ccdc5b63c689733c9ad35bdf2328", "score": "0.60331666", "text": "function getCompanyId() {\n return $this->getFieldValue('company_id');\n }", "title": "" }, { "docid": "d4f74b59cbd01da7f5dcd816b01a9d97", "score": "0.60023236", "text": "public function setCompany($var)\n {\n GPBUtil::checkString($var, True);\n $this->Company = $var;\n\n return $this;\n }", "title": "" }, { "docid": "747911cc86b1ddd2142641f2ebc67101", "score": "0.5967792", "text": "public function getCompanyName();", "title": "" }, { "docid": "1be48cccfc74cc9dcf886c2f7d80992a", "score": "0.59378904", "text": "public function getCompanyName() {\n\t\treturn $this->data['COMPANYNAME'];\n\t}", "title": "" }, { "docid": "b29b425d4647e22f6929070010ee5abd", "score": "0.5920087", "text": "public function getCompanyName(){\r\n\t\treturn $this -> name;\r\n\t}", "title": "" }, { "docid": "8b68d3394aa5ef8ee8c9f1c61a307384", "score": "0.5909421", "text": "public function getCompanyName()\n {\n return $this->company_name;\n }", "title": "" }, { "docid": "8b68d3394aa5ef8ee8c9f1c61a307384", "score": "0.5909421", "text": "public function getCompanyName()\n {\n return $this->company_name;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.58285785", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.58285785", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.58285785", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.58285785", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "2a6bc6ffd241e83132018440cdf3f810", "score": "0.58285785", "text": "public function getCompany()\n {\n return $this->company;\n }", "title": "" }, { "docid": "f88dbd11c389c5f0b9bb25a063ed51c9", "score": "0.5827334", "text": "public function getCompanyName()\n {\n return $this->companyName;\n }", "title": "" }, { "docid": "c1b3b3a00e5fb2238f483c3c80273eb4", "score": "0.58146095", "text": "public function getCompanyName()\n {\n\n return $this->company_name;\n }", "title": "" }, { "docid": "c1b3b3a00e5fb2238f483c3c80273eb4", "score": "0.58146095", "text": "public function getCompanyName()\n {\n\n return $this->company_name;\n }", "title": "" }, { "docid": "e89510fc34ca54bd6aef7259f3f89705", "score": "0.5802371", "text": "public function GenerateCompanyName(){\n $all_company = [\n 'COLT',\n 'Kalashnikov',\n 'H&K',\n 'Glock',\n 'SIG Sauer'\n ];\n return $all_company;\n }", "title": "" }, { "docid": "9eb28372190ef9b7bc7806a3d7bf753e", "score": "0.5795331", "text": "public function getCompany() {\n return $this->company;\n }", "title": "" }, { "docid": "0e98fd0a0d5baed3916e1d50a6cc82da", "score": "0.570816", "text": "public function getCompanyName()\n {\n return $this->companyName;\n }", "title": "" }, { "docid": "2a7398e77f458df5fc784e115d0d3b05", "score": "0.570555", "text": "public function getCompanyName()\n {\n return $this->_companyName;\n }", "title": "" }, { "docid": "259e61e91675ff3a2f2be014ef4012c6", "score": "0.5677425", "text": "public function getCompany()\n {\n return $this->_company;\n }", "title": "" }, { "docid": "9be4a4eab99a5805482e178fbecaf6f2", "score": "0.56657636", "text": "public function setCompany($company);", "title": "" }, { "docid": "8880cba5dbbd92a08978bc50431804b0", "score": "0.56604904", "text": "public function getCompanyId()\n {\n return $this->CompanyId;\n }", "title": "" }, { "docid": "a37c48f02d2224a7efb95cdb3b523943", "score": "0.56555754", "text": "public function company(){\n $faker = Faker::create('nl_NL');\n return $faker->company;\n\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.5641741", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.5641741", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "380747096f67b21b693b80d006f85c56", "score": "0.5641741", "text": "public function getCompanyId()\n {\n return $this->company_id;\n }", "title": "" }, { "docid": "06b609ad1dae7fabd8b08d5f91ca3d46", "score": "0.5632968", "text": "public function getCompany()\n\t\t{\n\t\t\t\treturn $this->company;\n\t\t}", "title": "" }, { "docid": "c3404bacfae35f6bb3374bd6f3ead928", "score": "0.55737764", "text": "public function getCompanyCode()\n {\n return isset($this->CompanyCode) ? $this->CompanyCode : null;\n }", "title": "" }, { "docid": "b76e7587be23341a39f4af50d4dd2ff9", "score": "0.55630904", "text": "public function getCompanyName()\n {\n return $this->getParameter('company_name');\n }", "title": "" }, { "docid": "aa2858685b378fec6b3481a1d02634bc", "score": "0.5544757", "text": "public function getCompany();", "title": "" }, { "docid": "aa2858685b378fec6b3481a1d02634bc", "score": "0.5544757", "text": "public function getCompany();", "title": "" }, { "docid": "d9404e9e2af313b755b9292bd50b8266", "score": "0.55007964", "text": "public function getCompanyComplement()\n {\n return $this->companyComplement;\n }", "title": "" }, { "docid": "dfad063181502993345ff6488fe11d7f", "score": "0.54979575", "text": "public function getCompanyId()\n {\n return $this->companyId;\n }", "title": "" }, { "docid": "28a4b6d304e2f339323f9817a1796854", "score": "0.5497255", "text": "public function getCompanyName()\n {\n return isset($this->CompanyName) ? $this->CompanyName : null;\n }", "title": "" }, { "docid": "76d6dc988b7199adbb62bd3bd60046f7", "score": "0.54299855", "text": "public function getCompanyName()\n {\n if (is_null($this->companyName)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_COMPANY_NAME);\n if (is_null($data)) {\n return null;\n }\n $this->companyName = (string) $data;\n }\n\n return $this->companyName;\n }", "title": "" }, { "docid": "ad1a19e216974d4ae9ddb56b9e6c6dfa", "score": "0.5424934", "text": "public function setCompany($company) {\n $this->company = $company;\n }", "title": "" }, { "docid": "38ee2a9fda604d0b13837ad62f7b7168", "score": "0.54090667", "text": "public function getCompanyName()\n {\n return $this->getIfSet('name', $this->data->company);\n }", "title": "" }, { "docid": "535de7f193694ec83b4517fa1485e35b", "score": "0.5367856", "text": "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "title": "" }, { "docid": "535de7f193694ec83b4517fa1485e35b", "score": "0.5367856", "text": "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "title": "" }, { "docid": "535de7f193694ec83b4517fa1485e35b", "score": "0.5367856", "text": "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "title": "" }, { "docid": "535de7f193694ec83b4517fa1485e35b", "score": "0.5367856", "text": "public function __construct(Company $company)\n {\n $this->company = $company;\n }", "title": "" }, { "docid": "f9984eb111f961b33ebe94910832d4c6", "score": "0.5366187", "text": "public function getCompanyId()\n {\n return (int) $this->get('CompanyID');\n }", "title": "" }, { "docid": "43914faefe44dacb20d5bd7c00292130", "score": "0.53257793", "text": "public function __toString()\n {\n return $this->getCompany() . ' (' . $this->getFirstname() . ' ' . $this->getLastname() . ')';\n }", "title": "" }, { "docid": "08e8926de8fb603aaf5e29413e09a1c2", "score": "0.53116167", "text": "public function getCompanyAddress()\n {\n return $this->company_address;\n }", "title": "" }, { "docid": "60ce52b79fed517df28d81fa27ce01f1", "score": "0.53077996", "text": "public function getCompanyBusinessName()\n {\n return $this->getIfSet('businessName', $this->data->company);\n }", "title": "" }, { "docid": "b22b659ee7b19fb76b0adb4db5d98090", "score": "0.52944183", "text": "protected function getCompanyId()\n {\n return craft()->config->get('tobiasAxCompanyId');\n }", "title": "" }, { "docid": "4494ebb0686b0b1a3cd8fae85e37f675", "score": "0.5288275", "text": "function setCompanyId($value) {\n return $this->setFieldValue('company_id', $value);\n }", "title": "" }, { "docid": "9ea6707a53ed4c31c52ea9ac6b98f60f", "score": "0.5285269", "text": "private function getCompanyStreetLabel(CompanyInterface $company)\n {\n $streetLabel = '';\n $streetData = $company->getStreet();\n $streetLabel .= (!empty($streetData[0])) ? $streetData[0] : '';\n $streetLabel .= (!empty($streetData[1])) ? ' ' . $streetData[1] : '';\n\n return $streetLabel;\n }", "title": "" }, { "docid": "080b5228f7f8da57f4c895cee88faf3d", "score": "0.5271613", "text": "public function getBillingCompany()\n {\n return $this->data['billing']['x_company'];\n }", "title": "" }, { "docid": "edfe2fa9c86ebc52d0e1bf827b73a44b", "score": "0.5258633", "text": "public function getIdCompany(): int\n {\n return $this->idCompany;\n }", "title": "" }, { "docid": "f4f18e7a368a17a45dbbb78c6765c014", "score": "0.52259696", "text": "public function setCompany($company)\n {\n $reg = MQF_Registry::instance();\n $reg->setCompany($company);\n $this->company = $company;\n }", "title": "" }, { "docid": "7381013f5b61415214f3a375d7268e41", "score": "0.52080715", "text": "public function getLevyCompanyNo()\n {\n return $this->levyCompanyNo;\n }", "title": "" }, { "docid": "4a5159bf32b434dad414abfb6c0d2381", "score": "0.51840866", "text": "public function uniqueId()\n {\n return \"company-\".$this->developer->id;\n }", "title": "" }, { "docid": "d329ba7e63920944f7a12ad2e6319471", "score": "0.51810867", "text": "public function fillCompanyName()\n {\n if (! empty($this->company_name)) {\n return $this;\n }\n if (empty($this->company_id)) {\n return $this;\n }\n\n $company = Company::find($this->company_id);\n\n $this->company_name = $company->company_name;\n\n return $this;\n }", "title": "" }, { "docid": "b104e7aa84ad9259e41034267427ae34", "score": "0.51758415", "text": "public function company(Company $company = NULL)\n\t{\n\t\treturn $this->field_object('company', $company);\n\t}", "title": "" }, { "docid": "be6335771fade6a0d99f19342bb72cd5", "score": "0.51626056", "text": "public function model()\n {\n return Company::class;\n }", "title": "" }, { "docid": "be6335771fade6a0d99f19342bb72cd5", "score": "0.51626056", "text": "public function model()\n {\n return Company::class;\n }", "title": "" }, { "docid": "be6335771fade6a0d99f19342bb72cd5", "score": "0.51626056", "text": "public function model()\n {\n return Company::class;\n }", "title": "" }, { "docid": "1cb241f11c07f2b4ead4f589bb613aa7", "score": "0.5159093", "text": "public function getCompanyName(): ?string\n {\n return $this->companyName;\n }", "title": "" }, { "docid": "a857a97c5ed31d85d479ccda61729f30", "score": "0.5155851", "text": "public function getCompanyPhone()\n {\n return $this->company_phone;\n }", "title": "" }, { "docid": "053491e5acb6e8272e0525c915186b0b", "score": "0.51511353", "text": "function getCompanyName($company_id) {\n global $highrise_api_key, $highrise_username;\n $highrise_api = new HighriseAPICall($highrise_api_key, $highrise_username);\n \n $company = $highrise_api->makeAPICall('GET', '/companies/' . $company_id . '.xml');\n $name = (string) $company->name;\n return $name;\n}", "title": "" }, { "docid": "053491e5acb6e8272e0525c915186b0b", "score": "0.51511353", "text": "function getCompanyName($company_id) {\n global $highrise_api_key, $highrise_username;\n $highrise_api = new HighriseAPICall($highrise_api_key, $highrise_username);\n \n $company = $highrise_api->makeAPICall('GET', '/companies/' . $company_id . '.xml');\n $name = (string) $company->name;\n return $name;\n}", "title": "" }, { "docid": "8b60987302a8336ac9b04fae58c088e9", "score": "0.5144088", "text": "public function getApplicationUserCompanyName(): string\n {\n if ($this->user) {\n return $this->user->company_name ?? '';\n }\n\n if ($this->company_name) {\n return $this->company_name ?? '';\n }\n\n return '';\n }", "title": "" }, { "docid": "cc5cedca835cf0b94461e0dbb59191ad", "score": "0.51414245", "text": "protected function populateFields(Company &$company, $input)\n {\n \n $company->name = $input['name'];\n }", "title": "" }, { "docid": "247a722ba15c6faefefc6e0f4a94505d", "score": "0.51412976", "text": "public function definition()\n {\n return [\n 'name' => $this->faker->company,\n ];\n }", "title": "" }, { "docid": "f16dd434baae4de2855c86a2afcb8f2c", "score": "0.5136928", "text": "public function getCompanyAdress()\n {\n return $this->companyAdress;\n }", "title": "" }, { "docid": "f16dd434baae4de2855c86a2afcb8f2c", "score": "0.5136928", "text": "public function getCompanyAdress()\n {\n return $this->companyAdress;\n }", "title": "" }, { "docid": "4b8b69115cfce1f6c56f21d38249af82", "score": "0.51237226", "text": "function eshopbox_pip_print_company_name() {\n\t if (get_option('eshopbox_pip_company_name') != '') {\n\t return get_option('eshopbox_pip_company_name') . '<br />';\n\t }\n\t}", "title": "" }, { "docid": "7df206c1b6cb68ff9dcafa0d3a0a0ba3", "score": "0.5109817", "text": "function searchcompany($domain){\n $nwe = new capToHubspot();\n $companies = $nwe->readHubspotComanyByDomain($domain);\n foreach($companies as $company){\n echo 'company : '.$company->companyId.PHP_EOL;\n }\n \n}", "title": "" }, { "docid": "4a21921fa84e840f974a28f12de748b8", "score": "0.51021326", "text": "public function fake() : Company\n\t{\n\t\treturn Company::make([\n\t 'name' => 'Epikfy e-commerce',\n\t 'description' => 'Laravel e-commerce solution.',\n\t 'email' => '[email protected]',\n\t 'logo' => 'epikfy.jpg',\n\t 'slogan' => 'Epikfy e-commerce.',\n\t 'contact_email' => '[email protected]',\n\t 'sales_email' => '[email protected]',\n\t 'support_email' => '[email protected]',\n\t 'phone_number' => '+14056696453',\n\t 'cell_phone' => '+14056696453',\n\t 'address' => '4576 SE 44',\n\t 'state' => 'OK',\n\t 'city' => 'Norman',\n\t 'zip_code' => '79002',\n\t 'website' => 'http://epikfy.com',\n\t 'twitter' => 'https://twitter.com/_Epikfy',\n\t 'facebook' => 'https://www.facebook.com/Epikfyecommerce',\n\t 'keywords' => 'Epikfy',\n\t 'about' => 'Laravel e-commerce solution.',\n\t 'terms' => 'Epikfy e-commerce terms & conditions.',\n\t 'refunds' => 'Epikfy e-commerce refunds policies',\n\t\t]);\n\t}", "title": "" }, { "docid": "d5110d81885c320755eb1dd01eaf697e", "score": "0.5088885", "text": "public function testAutocompleteCompanies() {\n // Create\n $this->phactory->create('companies');\n\n // Declare\n $query = substr( self::COMPANY_NAME, 0, 3 );\n\n // Get\n $entries = $this->report->autocomplete_companies( $query );\n\n // Assert\n $this->assertEquals( self::COMPANY_NAME, $entries[0]['company'] );\n }", "title": "" }, { "docid": "9909368e5ba3443614ab51f7ec1a6b5b", "score": "0.50801104", "text": "private function checkContractedCompany($customer){\n\n if (!isset($customer->contractedCompany) || trim($customer->contractedCompany) === '') {\n return $customer->company;\n }\n return $customer->company .\" on behalf of \". $customer->contractedCompany;\n }", "title": "" }, { "docid": "be0f59013c33b5e133b39e827cf9b9f7", "score": "0.50694126", "text": "public function message()\n {\n return 'Invalid company id.';\n }", "title": "" }, { "docid": "db8e3c7f86d0f867c2109d961f799853", "score": "0.5062184", "text": "public function companyOrFullname() {\n\t\t\n\t\treturn !empty($this->company) ? $this->company : $this->fullname();\n\t}", "title": "" }, { "docid": "eef29ed737145f98ecd0f84f4fd70099", "score": "0.5027284", "text": "public function Get_Company_Data(&$data)\n\t{\n\t\t$company_properties = array(\n\t\t\t\t\t'COMPANY_NAME',\n\t\t\t\t\t'COMPANY_PHONE_NUMBER',\n\t\t\t\t\t'COMPANY_DEPT_NAME',\n\t\t\t\t\t'COMPANY_EMAIL',\n\t\t\t\t\t'COMPANY_FAX',\n\t\t\t\t\t'COMPANY_LOGO_LARGE',\n\t\t\t\t\t'COMPANY_LOGO_SMALL',\n\t\t\t\t\t'COMPANY_NAME_LEGAL',\n\t\t\t\t\t'COMPANY_NAME_SHORT',\n\t\t\t\t\t'COMPANY_ADDR_CITY',\n\t\t\t\t\t'COMPANY_ADDR_STATE',\n\t\t\t\t\t'COMPANY_ADDR_STREET',\n\t\t\t\t\t'COMPANY_ADDR_ZIP',\n\t\t\t\t\t'COMPANY_ADDR_UNIT',\n\t\t\t\t\t'COMPANY_ADDR',\n\t\t\t\t\t'COMPANY_SITE',\n\t\t\t\t\t'COMPANY_SUPPORT_FAX',\n\t\t\t\t\t'COMPANY_SUPPORT_PHONE',\n\t\t\t\t\t'COMPANY_SUPPORT_EMAIL',\n\t\t\t\t\t'COMPANY_COLLECTIONS_FAX',\n\t\t\t\t\t'COMPANY_COLLECTIONS_EMAIL',\n\t\t\t\t\t'COMPANY_COLLECTIONS_PHONE',\n\t\t\t\t\t'COMPANY_COLLECTIONS_CODE',\n\t\t\t\t\t'COMPANY_NAME_FORMAL',\n\t\t\t\t\t'COMPANY_PRE_SUPPORT_FAX',\n\t\t\t\t\t'COMPANY_PRE_SUPPORT_PHONE',\n\t\t\t\t\t'COMPANY_PRE_SUPPORT_EMAIL',\n\t\t\t\t\t'LOAN_NOTICE_DAYS',\n\t\t\t\t\t'LOAN_NOTICE_TIME',\n\t\t\t\t\t'COLLECTIONS_EMAIL',\n\t\t\t\t\t'COLLECTIONS_PHONE',\n\t\t\t\t\t'COLLECTIONS_FAX',\n\t\t\t\t\t'PRE_SUPPORT_EMAIL',\n\t\t\t\t\t'PRE_SUPPORT_PHONE',\n\t\t\t\t\t'PRE_SUPPORT_FAX',\n\t\t\t\t\t'SUGGESTED_PAYMENT_INCREMENT',\n\t\t\t\t\t'CSO_LENDER_NAME_LEGAL',\n\t\t\t\t\t'PAYMENT_STREET',\n\t\t\t\t\t'PAYMENT_CITY',\n\t\t\t\t\t'PAYMENT_ZIP',\n\t\t\t\t\t'PAYMENT_BANK',\n\t\t\t\t\t'PAYMENT_ABA',\n\t\t\t\t\t'PAYMENT_ACCOUNT',\n\t\t\t);\n\n\t\tforeach($company_properties as $property)\n\t\t{\n\t\t\t$val = ECash::getConfig()->$property;\n\t\t\tif(! empty($val))\n\t\t\t{\n\t\t\t\t$n = strtolower($property);\n\t\t\t\t$data->{$n} = $val;\n\t\t\t}\n\t\t}\n\t\t$data->paydown_percent = $data->business_rules['principal_payment']['principal_payment_percentage'].'%';\t\n\t\t$data->LoanNoticeTime = $this->format_time($data->loan_notice_time);\t\t\n\t\t\n\t\t$data->TimeCSMFOpen = $this->format_time(Company_Rules::Get_Config(\"company_start_time\"));\n\t\t$data->TimeCSMFClose = $this->format_time(Company_Rules::Get_Config(\"company_close_time\"));\n\t\t$data->TimeCSSatOpen = $this->format_time(Company_Rules::Get_Config(\"sat_company_start_time\"));\n\t\t$data->TimeCSSatClose = $this->format_time(Company_Rules::Get_Config(\"sat_company_close_time\"));\n\t\t$data->TimeZoneCS = Company_Rules::Get_Config(\"time_zone\");\n\t\t\t\n\t}", "title": "" }, { "docid": "88d351952f98487a3539f3bf9bb87aec", "score": "0.5016914", "text": "public function __construct(Client $client, array $company)\n {\n parent::__construct($client, $company);\n\n $this->id = $this->getValue('id');\n $this->name = $this->getValue('name');\n $this->ownerId = $this->getValue('owner_id');\n $this->ownerName = $this->getValue('owner_username');\n $this->slogan = $this->getValue('slogan');\n $this->tag = $this->getValue('tag');\n\n $this->logo = $this->getValue('logo');\n $this->cover = $this->getValue('cover');\n $this->information = $this->getValue('information');\n $this->rules = $this->getValue('rules');\n $this->requirements = $this->getValue('requirements');\n $this->website = $this->getValue('website');\n\n $this->social = new Social(\n $this->getValue('socials.twitter'),\n $this->getValue('socials.facebook'),\n $this->getValue('socials.twitch'),\n $this->getValue('socials.discord'),\n $this->getValue('socials.youtube'),\n );\n\n $this->games = new Game(\n $this->getValue('games.ats'),\n $this->getValue('games.ets'),\n );\n\n $this->membersCount = $this->getValue('members_count');\n $this->recruitment = $this->getValue('recruitment');\n $this->language = $this->getValue('language');\n $this->verified = $this->getValue('verified');\n $this->validated = $this->getValue('validated');\n $this->createdAt = new Carbon($this->getValue('created'), 'UTC');\n }", "title": "" }, { "docid": "06c8283090bf504371faf4fa4a6168ce", "score": "0.5015381", "text": "public function getProductionCompany()\n {\n return $this->productionCompany;\n }", "title": "" }, { "docid": "f1227209490b1285e71117279dad85d3", "score": "0.5004018", "text": "public function setCompanyName(?string $companyName): void\n {\n $this->companyName = $companyName;\n }", "title": "" }, { "docid": "d9b7cf81b82341b0b2ba6e743f8838b3", "score": "0.49886298", "text": "public function getCompanyAddress()\n {\n return $this->getIfSet('address', $this->data->company);\n }", "title": "" }, { "docid": "3d71a2dc254c2079733ba3c728b109e9", "score": "0.4978358", "text": "public function getCustomerCompany()\n {\n return $this->customer_company;\n }", "title": "" }, { "docid": "8fb78b3e79056e22b6875e0f02ddcede", "score": "0.49634504", "text": "public function getBothcompanytitle() {\n return $this->id . ' ' . $this->title;\n }", "title": "" }, { "docid": "742cbe0af292bc6d32fc556c2d14f709", "score": "0.49437946", "text": "function fieldCek()\n {\n $f = array(\n 'companycode'=>'Kode Perusahaan' \n );\n return $f;\n }", "title": "" }, { "docid": "4a0586652d57aeebcfefc446d27d16f1", "score": "0.49404562", "text": "public function create(Company $company)\n {\n //\n }", "title": "" }, { "docid": "4a0586652d57aeebcfefc446d27d16f1", "score": "0.49404562", "text": "public function create(Company $company)\n {\n //\n }", "title": "" }, { "docid": "392c6b41edf70123670d0d38c64f7670", "score": "0.49262723", "text": "public function definition()\n {\n $companyName = $this->faker->company;\n\n return [\n 'name' => $companyName,\n 'corporate_name' => strtoupper($companyName),\n 'phone_number' => $this->faker->phoneNumber,\n 'email' => $this->faker->unique()->safeEmail,\n 'street_address' => $this->faker->streetAddress,\n 'city' => $this->faker->city,\n 'postcode' => $this->faker->postcode\n ];\n }", "title": "" }, { "docid": "5162b39ff50ba339519de3a9939f8949", "score": "0.49173138", "text": "public function setCompanyID()\n {\n return $this->setAttribute('company_id', auth()->user()->branch->company_id);\n }", "title": "" }, { "docid": "dace4f57c12aa42f1c40d6caddaf61a9", "score": "0.49049607", "text": "public function getCompanyUserName()\n {\n return $this->CompanyUserName;\n }", "title": "" }, { "docid": "416dbdcec8d3f94fcf9f37e07af009d9", "score": "0.48996508", "text": "public function setCompanyName($name){\r\n\t\t$this->name = $name;\r\n\t}", "title": "" }, { "docid": "49b237b03d707fe57d55bc9beda2b1d1", "score": "0.48948058", "text": "function getCustomerIdByName($company)\n {\n global $objDatabase;\n\n $objResult = $objDatabase->Execute(\"SELECT `id` FROM `\".DBPREFIX.\"module_{$this->moduleNameLC}_contacts` WHERE `contact_type` = '1' AND `customer_name` = '\". contrexx_raw2db($company).\"' LIMIT 0, 1\");\n\n return (int) $objResult->fields['id'];\n }", "title": "" }, { "docid": "4bbac4e165b8d50511bf9fcccb7a26dd", "score": "0.4883147", "text": "public function setCompany(int $company): self\n\t\t{\n\t\t$this->company = $company;\n\n\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "d8daf080c258bced5cfa8152d9d45232", "score": "0.48813745", "text": "public function setCompanyId($var)\n {\n GPBUtil::checkString($var, True);\n $this->CompanyId = $var;\n\n return $this;\n }", "title": "" }, { "docid": "d682320cb6ecb340dc5e6f592637f477", "score": "0.48784295", "text": "public function getEmployCompanyNo()\n {\n return $this->employCompanyNo;\n }", "title": "" }, { "docid": "8f68c43a7cdf9883ae7f1b8e039a354c", "score": "0.48769572", "text": "public function setCompanyIdAttribute($value)\n {\n if (empty($value)) {\n $value = null;\n }\n $this->attributes['company_id'] = $value;\n }", "title": "" }, { "docid": "2d57b076f34574eaaaf3cc971f76e317", "score": "0.48651275", "text": "private function Get_Company_Data(&$data)\n\t{\n\t\tif(isset($this->companies[$data['company_name_short']]))\n\t\t{\n\t\t\t$comp = $this->companies[$data['company_name_short']];\n\t\t\t$data['company_name']\t\t\t= $comp['company_name'];\n\t\t\t$data['company_name_short']\t = $data['company_name_short'];\n\t\t\t$data['company_phone'] = $comp['phone'];\n\t\t\t$data['company_fax'] = $comp['fax'];\n\t\t\t$data['company_email'] = $comp['email'];\n\t\t\t$data['company_street']\t\t\t= $comp['street'];\n\t\t\t$data['company_city']\t\t\t= $comp['city'];\n\t\t\t$data['company_state']\t\t\t= $comp['state'];\n\t\t\t$data['company_zip']\t\t\t= $comp['zip'];\n\t\t\t$data['ent_short_url']\t\t\t= $comp['ent_short_url'];\n\t\t $data['ent_site'] = $comp['url'];\n\t\t $data['teleweb_phone']\t\t\t= $comp['teleweb_phone'];\n\t\t}\n\t}", "title": "" }, { "docid": "09dfc0fda7bea9fffad526b4d63ba522", "score": "0.4859719", "text": "public function definition() {\n static $count = 1;\n static $reg = 11;\n\n return [\n 'name' => 'Company ' . $count,\n 'name_old' => 'Old Name ' . $count,\n 'reg_no' => '202010700' . $reg,\n 'reg_no_old' => 'A10700' . $reg++,\n 'email' => 'company' . $count . '@example.com',\n 'phone_no' => '012345678' . $count++,\n 'reg_address' => 'Alamat Baris 1',\n 'reg_address2' => 'Alamat Baris 2',\n 'reg_address3' => 'Alamat Baris 3',\n 'reg_postcode' => '57000',\n 'reg_city' => 'Bukit Jalil',\n 'reg_country' => 'Kuala Lumpur',\n 'buss_address' => 'Alamat Bisnes Baris 1',\n 'buss_address2' => 'Alamat Bisnes Baris 2',\n 'buss_address3' => 'Alamat Bisnes Baris 3',\n 'buss_postcode' => '47100',\n 'buss_city' => 'Puchong',\n 'buss_country' => 'Selangor',\n 'ssm_cert' => 'assets/uploads/ssm_cert.pdf',\n 'auth_letter' => 'assets/uploads/auth_letter.pdf',\n 'consultant' => false,\n 'status' => 0\n ];\n }", "title": "" }, { "docid": "0f831da1f02a6e8be7990b344d8a002a", "score": "0.48544064", "text": "public function setCompany($request)\n {\n }", "title": "" }, { "docid": "830156d47e957b6b99004a5ee4e6d1bf", "score": "0.48537034", "text": "public function getCompanyId() {\n\n //If auth login is not admin\n if($this->getAuth()->user()->id == null) {\n return $this->getAuth()->user()->company_id;\n }\n\n return $this->getAuth()->user()->id;\n }", "title": "" }, { "docid": "388b7aa4b9d22ba3296e99d8e4673c6f", "score": "0.48377177", "text": "public function setCompanyName($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->company_name !== $v) {\n $this->company_name = $v;\n $this->modifiedColumns[] = AdvsPeer::COMPANY_NAME;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "dd78f97d8b71d98ae73c884498249c16", "score": "0.48180673", "text": "static function getAddress($company,$type='address',$delim=', '){\n\t\t$address = '';\n\t\tfor( $x=1; $x<5; $x++ ){\n\t\t\t$address .= self::getParameter($type.'_'.$x,$company)!='' ? self::getParameter($type.'_'.$x,$company).($x!=4 ? $delim : '') : '';\n\t\t}\n\t\t$address = preg_replace(\"/\".$delim.\"$/\",\"\",$address);\n\t\t$address .= $delim.self::getParameter($type.'_code',$company);\n\t\treturn $address;\n\t}", "title": "" } ]
c33099e3bad8ed7f201e3a469b628b91
Generated from protobuf field .clarifai.api.DeleteMetadata delete_metadata = 4;
[ { "docid": "8b9f005afed47b97eb84b70c95e08fef", "score": "0.78506446", "text": "public function setDeleteMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\DeleteMetadata::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "title": "" } ]
[ { "docid": "a84bfaeaf95c02052e585ee115a7771e", "score": "0.78511524", "text": "public function getDeleteMetadata()\n {\n return $this->readOneof(4);\n }", "title": "" }, { "docid": "356b1b4295131ee766b5b54ed6ef46d9", "score": "0.72129273", "text": "public function delMetadata() {}", "title": "" }, { "docid": "356b1b4295131ee766b5b54ed6ef46d9", "score": "0.72129273", "text": "public function delMetadata() {}", "title": "" }, { "docid": "356b1b4295131ee766b5b54ed6ef46d9", "score": "0.72129273", "text": "public function delMetadata() {}", "title": "" }, { "docid": "a912401cb7023f80bcd9e72e00063545", "score": "0.7179248", "text": "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "title": "" }, { "docid": "722ef64fdc82fe08603816ea6cb02f88", "score": "0.7108365", "text": "public function testDeleteMetadata1UsingDELETE()\n {\n }", "title": "" }, { "docid": "7c809c3d8cd6909c5d939353f15dc5b8", "score": "0.7098135", "text": "public function testDeleteMetadata3UsingDELETE()\n {\n }", "title": "" }, { "docid": "a473729849d78a8efbe52c94f8df1931", "score": "0.6920272", "text": "public function testDeleteMetadata2UsingDELETE()\n {\n }", "title": "" }, { "docid": "d06c07670f16f25f8b3cd930c1ceb6ad", "score": "0.67563146", "text": "public function testDeleteMetadata()\n {\n }", "title": "" }, { "docid": "2f7e43ace96d133565648cadfa17c1cb", "score": "0.66558295", "text": "function acf_delete_metadata($post_id = 0, $name = '', $hidden = \\false)\n{\n}", "title": "" }, { "docid": "d44778d1aae3a9d35a3e994293105246", "score": "0.63200575", "text": "public function delMetadata() {\n throw new Exception('Not implemented yet');\n }", "title": "" }, { "docid": "d821bfd16dc0623387760f43e1f8deaf", "score": "0.6149513", "text": "public function deleteMetadata($path)\n {\n require_once 'Zend/Cloud/OperationNotAvailableException.php';\n throw new Zend_Cloud_OperationNotAvailableException('Deleting metadata not implemented');\n }", "title": "" }, { "docid": "6546dd010b95ac6f546e59e7b589d167", "score": "0.60713", "text": "public function getDelete()\n {\n return $this->readOneof(5);\n }", "title": "" }, { "docid": "c141f3f9feac0b4f8cd9f6bc2b35d687", "score": "0.60127807", "text": "public function delete_meta( $key, $value = '', $delete_all = false );", "title": "" }, { "docid": "813846643b4c0ff701577b1354b92b8f", "score": "0.58818847", "text": "public function deleteMetaData($args){\n\t\treturn $this->db->delete(\n\t\t\t$this->metaDataTable,\n\t\t\t\t[\n\t\t\t\t\t\"AND\" => [\n\t\t\t\t\t\t$this->metaDataQueryBy => $args\n\t\t\t\t\t] \n\t\t\t\t]\n\t\t\t);\n\t}", "title": "" }, { "docid": "65c3533af6c3ada0ae57acfbdd38bdd2", "score": "0.5746706", "text": "public function getDeleteFromDataset()\n {\n return $this->readOneof(7);\n }", "title": "" }, { "docid": "913d9bb19625b7897d096dff94dea577", "score": "0.5673829", "text": "protected function applyDelete() {\n\t\t$entity_types = $this->getRegisteredEntityTypes();\n\t\t$tag_names = $this->getTagNames();\n\t\tif (empty($entity_types) || empty($tag_names)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$metadata = elgg_get_metadata([\n\t\t\t'type_subtype_pairs' => $entity_types,\n\t\t\t'metadata_names' => $tag_names,\n\t\t\t'metadata_value' => $this->from_tag,\n\t\t\t'metadata_case_sensitive' => false,\n\t\t\t'limit' => false,\n\t\t\t'batch' => true,\n\t\t\t'batch_inc_offset' => false,\n\t\t]);\n\t\t\n\t\tforeach ($metadata as $md) {\n\t\t\t$entity = $md->getEntity();\n\t\t\t$md->delete();\n\t\t\t\n\t\t\t// let system know entity has been updated\n\t\t\t$entity->save();\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3a516593ae5ab91ea81fede06ddd30a8", "score": "0.5658475", "text": "function carton_delete_order_item_meta( $item_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\treturn delete_metadata( 'order_item', $item_id, $meta_key, $meta_value, $delete_all );\n}", "title": "" }, { "docid": "ce67eb7d4cffd543d6e7a229f007bc03", "score": "0.5641205", "text": "function delete_metadata_by_mid($meta_type, $meta_id)\n {\n }", "title": "" }, { "docid": "0bf1162d2e958a32596ff099348871c8", "score": "0.56209767", "text": "protected function deleteMeta()\n {\n $sql = sprintf(\n 'DELETE FROM %sfaqattachment WHERE id = %d',\n PMF_Db::getTablePrefix(),\n $this->id\n );\n\n $this->db->query($sql);\n }", "title": "" }, { "docid": "1271370b56ca01c83f353e90a203602c", "score": "0.559132", "text": "function delete_comment_meta($comment_id, $meta_key, $meta_value = '')\n {\n }", "title": "" }, { "docid": "1cc6af345fed68d6fcfb0347ce331c62", "score": "0.5574167", "text": "public function deletemeta($meta) {\n\t\tif ($this->req ['auth_type'] == 'oauth') {\n\t\t\tif (( int ) $meta == 0) {\n\t\t\t\t$oRow = $this->oMetas->getById ( $meta );\n\t\t\t\tif (is_array ( $oRow )) {\n\t\t\t\t\t$meta = ( int ) $oRow ['idmeta'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (( int ) $meta > 0) {\n\t\t\t\t\n\t\t\t\t$oTableCompMetas = new Application_Model_Table ();\n\t\t\t\t$oTableCompMetas->setTable ( 'comp_metas' );\n\t\t\t\t$oTableCompMetas->setPrimary ( 'idcomp_meta' );\n\t\t\t\t$oSelect = $oTableCompMetas->fetchAll ( $oTableCompMetas->select ()->from ( $oTableCompMetas->getTable () )->where ( 'metas_idmeta=' . ( int ) $meta ) );\n\t\t\t\tif (isset ( $_GET ['force'] ) && $_GET ['force'] == 'yes') {\n\t\t\t\t\tif ($this->isExtendable ()) {\n\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED', 'comps_affected' => ( int ) $oSelect->count () ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_EXTEND_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ($this->isDeleteable ()) {\n\t\t\t\t\t\tif ($oSelect->count () == 0) {\n\t\t\t\t\t\t\t$oRowToDelete = $this->oMetas->fetchRow ( $this->oMetas->select ()->where ( $this->oMetas->getPrimary () . '=' . $meta ) );\n\t\t\t\t\t\t\tif ($this->oMetas->deleteMeta ( $meta )) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$iGiveBudgetBack = $this->usr;\n\t\t\t\t\t\t\t\tif (isset ( $oRowToDelete->accounts_idaccount ) && ( int ) $oRowToDelete->accounts_idaccount > 0) {\n\t\t\t\t\t\t\t\t\t$iIdCreator = ( int ) $oRowToDelete->accounts_idaccount;\n\t\t\t\t\t\t\t\t\t$iGiveBudgetBack = ($iIdCreator > 0) ? $iIdCreator : $iGiveBudgetBack;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->setUsage ( $iGiveBudgetBack, array ('maxmetas' => - 1 ) );\n\t\t\t\t\t\t\t\t$this->addEntry ( 'response', array ('meta' => $meta, 'message' => 'META_WAS_DELETED' ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_IN_TOUCH_WITH_COMPOSITE' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'MISSING_DELETE_RIGHT' ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'META_NOT_FOUND' ) );\n\t\t\t}\n\t\t} else {\n\t\t\t$this->addEntry ( 'response', $this->oError->throwError ( 'OAUTH_ACCESS_ONLY' ) );\n\t\t}\n\t\treturn $this->getResponse ();\n\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55606127", "text": "public function delete();", "title": "" }, { "docid": "9874a164a48376dfc1f6df13d8795c60", "score": "0.55560863", "text": "public function getDeleteConcepts()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "d244da7196e6b77c76c0a2b52b5bcfe4", "score": "0.5519384", "text": "public function deleteMetadata($path)\n {\n $fileKey = sha1($path);\n $this->getMetadataCache()->set(self::METADATA . $fileKey, []);\n $this->getMetadataCache()->delete(self::VISIBILITY . $fileKey);\n $this->getContentCache()->delete($fileKey);\n }", "title": "" }, { "docid": "03cf0dd4be6e1f7760864337c470de3c", "score": "0.5515961", "text": "public function delete( $id ) {\n\t\treturn delete_metadata( $this->type(), $id, $this->key );\n\t}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.5513645", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.5513414", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.551301", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.551301", "text": "public function delete() {}", "title": "" }, { "docid": "1a4dce6fe6f74317a10f79fe4ddd1e7e", "score": "0.5512914", "text": "public function deleteMetadata($name)\n {\n $query = $this->db\n ->where('registry_object_id', $this->id)\n ->where('attribute',$name)\n ->delete('registry_object_metadata');\n if ($query) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "5e06cee20f9c4d9dc8bea70fdbb9e8ef", "score": "0.5476975", "text": "public function delete() {\n\t\t$this->deleted = true;\n\t}", "title": "" }, { "docid": "5cf1fda2306e1874cf670130bcd5afa7", "score": "0.5473449", "text": "public function delete()\n {\n try {\n $connection = $this->resourceConfig->getConnection();\n $connection->delete(\n $this->resourceConfig->getMainTable(),\n [\n $connection->quoteInto('path = ?', Data::XML_META_TAG),\n ]\n );\n $this->cleanCache();\n $response = ['status' => 'OK'];\n } catch (\\Exception $e) {\n $this->logError($e);\n $response['status'] = 'FAILED';\n $response['message'] = $e->getMessage() . '. For more info please check magento squarefeed log file.';\n\n }\n return [$response];\n }", "title": "" }, { "docid": "6e3ec9a61828c6db14979c3669887f50", "score": "0.5459994", "text": "function mDELETE(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DELETE;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:14:3: ( 'delete' ) \n // Tokenizer11.g:15:3: 'delete' \n {\n $this->matchString(\"delete\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "fb02dd5f98e846bc86f7f11e6be753c6", "score": "0.5459952", "text": "protected function deleteMeta() {\n Meta::deleteAll([\n 'owner' => $this->tableName(),\n 'owner_id' => $this->{static::meta_id_field()}\n ]);\n }", "title": "" }, { "docid": "1963bdf729fa309eb8e4e86c35f5cf64", "score": "0.5449742", "text": "protected function MetaAfterDelete() {\n\t\t}", "title": "" }, { "docid": "bfe3b6d51ea43f05531f7e339dafc9d7", "score": "0.54196686", "text": "protected function deleted()\n {\n $this->response = $this->response->withStatus(204);\n $this->jsonBody($this->payload->getOutput());\n }", "title": "" }, { "docid": "f66e5a7caec4696948f4b9d1ae6b679a", "score": "0.54169804", "text": "public static function delete() {\n\n\n\t\t}", "title": "" }, { "docid": "6701f80285040ee195f0dbfe03237557", "score": "0.541561", "text": "public function DELETE() {\n #\n }", "title": "" }, { "docid": "617199d3e76472515f6a86eb83ca5b1f", "score": "0.5408667", "text": "public function delete_meta()\n {\n # process the request which it must be post and ajax request\n if (request()->isPost() && request()->isAjax()) {\n \n $objectId = request()->getPost('object-id', 'int');\n $object = request()->getPost('object', 'alphanum');\n \n $this->setJsonResponse();\n\n $object = PostMeta::findFirstByMeta_id($objectId);\n\n if(!$object) {\n $this->jsonMessages['messages'][] = [\n 'type' => 'warning',\n 'content' => 'Object not found!'\n ];\n return $this->jsonMessages;\n }\n $object->delete();\n\n \n $this->jsonMessages['messages'][] = [\n 'type' => 'success',\n 'content' => 'Object has been deleted!'\n ];\n return $this->jsonMessages;\n \n\n }\n }", "title": "" }, { "docid": "1b814506044707e04fc4e35f31808d9f", "score": "0.5404019", "text": "public function getDelete()\n {\n if (array_key_exists(\"delete\", $this->_propDict)) {\n return $this->_propDict[\"delete\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "0e94cab376404619ae213e37db2c664b", "score": "0.53986734", "text": "public function delete_delete(){\n $response = $this->PersonM->delete_person(\n $this->delete('id')\n );\n $this->response($response);\n }", "title": "" }, { "docid": "edfc38e0103ea8231510cdeca4865268", "score": "0.5390011", "text": "public function deleteCommentMeta($id, $name)\n {\n $this->runWpCliCommand('comment', 'meta delete', func_get_args());\n }", "title": "" }, { "docid": "b436b8f3198dbc8f82c2aa3a599def28", "score": "0.5388099", "text": "#[@test]\n public function deleteFlag() {\n $action= $this->parseCommandSetFrom('\n if size :over 500K {\n addflag \"\\\\Deleted\";\n }\n ')->commandAt(0)->commands[0];\n $this->assertClass($action, 'peer.sieve.action.AddFlagAction');\n $this->assertEquals(array('\\Deleted'), $action->flags);\n }", "title": "" }, { "docid": "6480f50547b930a8694c08f58813cf6f", "score": "0.5386108", "text": "function delete_meta($mid)\n {\n }", "title": "" }, { "docid": "cad8d51ca2d9d33cd16baa9ff85691b2", "score": "0.5380238", "text": "public function testThatDeleteMetaDeletesData() {\n\t\t$this->assertEmpty( self::$users_repo::get_meta( 1, 'auth0_id' ) );\n\t\t$this->assertEmpty( self::$users_repo::get_meta( 1, 'auth0_obj' ) );\n\t\t$this->assertEmpty( self::$users_repo::get_meta( 1, 'last_update' ) );\n\n\t\t$this->storeAuth0Data( 1 );\n\n\t\t$this->assertNotEmpty( self::$users_repo::get_meta( 1, 'auth0_id' ) );\n\t\t$this->assertNotEmpty( self::$users_repo::get_meta( 1, 'auth0_obj' ) );\n\t\t$this->assertNotEmpty( self::$users_repo::get_meta( 1, 'last_update' ) );\n\n\t\tself::$users_repo->delete_auth0_object( 1 );\n\n\t\t$this->assertEmpty( self::$users_repo::get_meta( 1, 'auth0_id' ) );\n\t\t$this->assertEmpty( self::$users_repo::get_meta( 1, 'auth0_obj' ) );\n\t\t$this->assertEmpty( self::$users_repo::get_meta( 1, 'last_update' ) );\n\t}", "title": "" }, { "docid": "752632c1c82bfec9e7d473c2444af2a0", "score": "0.5380186", "text": "public function getMetadataToRemove()\n {\n if (array_key_exists(\"metadataToRemove\", $this->_propDict)) {\n return $this->_propDict[\"metadataToRemove\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "ef0eed083f7e0f44faefc6fcbad5bce3", "score": "0.5362216", "text": "public function delete(): void\n {\n }", "title": "" }, { "docid": "ac4f45b99b3a11728ae1409797c25c03", "score": "0.53606945", "text": "function delete()\n {\n }", "title": "" }, { "docid": "cff466466cb9e3f59f6f324348216204", "score": "0.5357849", "text": "public static function filter__delete_post_metadata( $check, $object_id, $meta_key, $meta_value, $delete_all ) {\n\t\t\tif ( $meta_key != self::$_wpseo_canonical_meta_key ) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "1c18996161499556f381ce4e2c429aa2", "score": "0.5347371", "text": "protected function getDeleteResponse()\n\t{\n\t\treturn new Api\\Response\\Delete();\n\t}", "title": "" }, { "docid": "a728addf51b8054f1050f2388217b0a5", "score": "0.5343818", "text": "public function MetaDeletable() {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "7fbeef1f5c322686c42da3a8a892ea81", "score": "0.534332", "text": "public function delete(): void;", "title": "" }, { "docid": "e1f750dbe0ff384f1fc7ec06167bd4b1", "score": "0.5339932", "text": "function delete_post_meta($term_id, $taxonomy, $meta_key, $meta_value = '') {\n\n return delete_metadata('post', $post_id, $meta_key, $meta_value);\n}", "title": "" }, { "docid": "8f15ea4cbed3df1638aecd406565cb6e", "score": "0.5334925", "text": "public function unsetMetadata(): void\n {\n $this->metadata = [];\n }", "title": "" }, { "docid": "31dc62c2485e434b87ad387cf294106d", "score": "0.5327173", "text": "public function delete()\n\t{\n\t\t$this->plugin->setResponse('in delete');\n\t}", "title": "" }, { "docid": "7bf9c10f6b902a85bee13a4bf8df9287", "score": "0.5316853", "text": "public abstract function delete();", "title": "" }, { "docid": "a21c41eee461c964f45e2b50d899e515", "score": "0.53125536", "text": "public function delete() {\r\n }", "title": "" }, { "docid": "62fbc210869151c7efce16a3f991d40e", "score": "0.5307069", "text": "function delete() {\n global $DB;\n if($this->mayI(DELETE)) {\n $DB->metadata->delete($this->ID);\n $DB->content->delete($this->ID, false);\n $DB->spine->delete($this->ID);\n return parent::delete();\n } else return false;\n }", "title": "" }, { "docid": "8c331ff7cce96fc9420ed4b32862b2e8", "score": "0.5306882", "text": "function delete_post_meta($post_id, $meta_key, $meta_value = '')\n {\n }", "title": "" }, { "docid": "4459526fb363c97f83bf25710f19b56b", "score": "0.5297334", "text": "public function test__GetDelete()\n\t{\n\t\t$this->assertThat(\n\t\t\t$this->object->objects->delete,\n\t\t\t$this->isInstanceOf('JAmazons3OperationsObjectsDelete')\n\t\t);\n\t}", "title": "" }, { "docid": "662b4150b3a2f24f49071102e211782c", "score": "0.5293165", "text": "public function delete_meta( &$object, $meta ) {\n\t\t}", "title": "" }, { "docid": "a50217d315184108f90eb059b0b083f5", "score": "0.5288636", "text": "abstract public static function deleted($callback);", "title": "" }, { "docid": "12db9b7c83bd0606698cce6b29132c9a", "score": "0.5287151", "text": "public function setDelete($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Spanner\\V1\\Mutation\\Delete::class);\n $this->writeOneof(5, $var);\n\n return $this;\n }", "title": "" }, { "docid": "11e803918425e51a44370f790bc16be8", "score": "0.52830696", "text": "function delete() {\n }", "title": "" }, { "docid": "4e9484f0f189b483845e487957550414", "score": "0.52830184", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "16133002ea23329549fcdbae1312fcbb", "score": "0.5280187", "text": "function delete_carton_term_meta( $term_id, $meta_key, $meta_value = '', $delete_all = false ) {\n\treturn delete_metadata( 'carton_term', $term_id, $meta_key, $meta_value, $delete_all );\n}", "title": "" }, { "docid": "8639d30c8ec9f8f7adee902a6926a296", "score": "0.527547", "text": "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "title": "" }, { "docid": "8639d30c8ec9f8f7adee902a6926a296", "score": "0.527547", "text": "public function delete()\n {\n return $this->apiCall('delete', '');\n }", "title": "" }, { "docid": "21d1696393ee1d970f4a8498bdd62104", "score": "0.5261869", "text": "protected function parse_model_response_delete($id) {\t\n\t\n\t\t/* only return the deleted id */\n\t\treturn array($this->properties->id_attribute => $id);\t \t\t\t \n }", "title": "" }, { "docid": "e03d3767ab93e0a463efd9db2a76af45", "score": "0.5261131", "text": "public function delete()\r\n\t{\r\n\t}", "title": "" }, { "docid": "0c4eb2478866a210b0ccf5541c307263", "score": "0.52505606", "text": "public function delete() : bool;", "title": "" }, { "docid": "0c4eb2478866a210b0ccf5541c307263", "score": "0.52505606", "text": "public function delete() : bool;", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.525042", "text": "abstract public function delete();", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.525042", "text": "abstract public function delete();", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.525042", "text": "abstract public function delete();", "title": "" }, { "docid": "bed0f0cf89f329db57f22e4d696c2cb0", "score": "0.525042", "text": "abstract public function delete();", "title": "" }, { "docid": "e0cf80bd2832c56d404ccd896b49c12e", "score": "0.52487683", "text": "public function delete()\n\t{\n\t}", "title": "" }, { "docid": "239287136ce040f884fbfd3b2381ffdb", "score": "0.5238497", "text": "function delete()\n {\n }", "title": "" }, { "docid": "f094e23dfa10af9fd21ec16a303cb1e1", "score": "0.52298534", "text": "public function getDeleteFlag()\r\n {\r\n return $this->deleteFlag;\r\n }", "title": "" }, { "docid": "b933b3e5a8f78c5b4335915923323e47", "score": "0.52294457", "text": "public static function delete(){\r\n }", "title": "" }, { "docid": "b115d6a4e3e5ffb24c009bd4a6eddbca", "score": "0.52274686", "text": "public function deleteMeta($key, $value = null)\n {\n // dump($this->ID, $key, $value);\n return delete_user_meta($this->ID, $key, $value);\n }", "title": "" }, { "docid": "1eb235a2ff05b49bde24b94562bba796", "score": "0.52249146", "text": "public function isDelete();", "title": "" }, { "docid": "1a2aefad55259a0fa1d1fa2605ce8dff", "score": "0.52209413", "text": "function DELETE($options) \n\t\t{\n\t\t\t$options[\"path\"] = urldecode($options[\"path\"]);\n\t\t \n\t\t //Parameter des Datastorages laden\n\t\t\t$path_explode = explode(\"/\",$options[\"path\"]);\n\t\t\t$ds_path = substr($options[\"path\"],strlen($path_explode[1])+2);\n\t\t\tif(substr($ds_path,-1)==\"/\")\n\t\t\t\t$ds_path=substr($ds_path,0,-1);\n\n\t\t //Parameter des Datastorages laden\n\t\t\t$ds = getDatastorageByName($path_explode[1],$this->config_appinfos);\n\t\t\tif($ds){\n\t\t\t\t//Datei/Ordner löschen\n\t\t\t\t$result = $ds->deleteFile($ds_path);\n\n\t\t\t\treturn \"204 No Content\";\n\t\t\t} else {\n\t\t\t\treturn \"404 Not found\";\n\t\t\t}\n\t\t return \"404 Not found\";\n\t\t}", "title": "" }, { "docid": "ae9ce563585b0c01d2bb7f71c8bb6740", "score": "0.5217479", "text": "public function Do_delete_Example1(){\n\n\t}", "title": "" }, { "docid": "611110aa3420a50b9ada4a7257f449b6", "score": "0.52106917", "text": "public static function delete() {\r\n\t\t\r\n\t}", "title": "" } ]
653e7beb3365d018bc51f9de6fe6e5f7
Define accessor that will fetch the campaign metric data from the Facebook ads api.
[ { "docid": "a244f1badbaa89533caa52d70c028490", "score": "0.74904054", "text": "public function getMetricsAttribute()\n {\n $fields = $this->metric_fields;\n $start_date = $this->metric_start_date;\n $end_date = $this->metric_end_date;\n $time_increment = $this->metric_time_increment;\n\n // This will serve as the cache key name.\n //\n $identifier = Str::slug(\"{$this->fb_campaign_id} {$start_date} {$end_date} {$time_increment}\");\n\n // Assign account to a variable so that we can inject it\n // into the cache closure.\n //\n $account = $this;\n\n // How many minutes do we want the cache to remember this information?\n //\n $minutes_to_remember = 0; //1;\n\n // Define the closure that will be used by the cache facade.\n //\n $closure = function() use($account, $fields, $start_date, $end_date, $time_increment)\n {\n return $account\n ->accessFacebook()\n ->getAdAccount()\n ->getInsightsBetweenDates( $fields, $start_date, $end_date, $time_increment );\n };\n\n return Cache::remember($identifier, $minutes_to_remember, $closure);\n }", "title": "" } ]
[ { "docid": "5364488ffcc8be3d8fa181950bca544f", "score": "0.59698224", "text": "protected function get_metric()\n {\n return (object) array(\n 'distributionChannel'\t => $this->user,\n 'username'\t\t\t\t\t => $this->user,\n 'requestUniqueIdentifier'\t=> time(),\n 'requestDate'\t\t\t\t => date('Y-m-dP'),\n );\n }", "title": "" }, { "docid": "80958ff7918ecb684218eba97a16ea66", "score": "0.5748557", "text": "public function gaContentMetrics(){\n return $this;\n }", "title": "" }, { "docid": "18bd97be0c7db549cfd6b4f653ccef6c", "score": "0.56433034", "text": "public function getCampaignBudget()\n {\n return $this->campaign_budget;\n }", "title": "" }, { "docid": "c6e911aa006646d756604a6959c53492", "score": "0.56331235", "text": "public function fetch_campaigns()\n {\n return $this->get_data(\"campaigns\");\n }", "title": "" }, { "docid": "4a86b325f9e5d1ad9592bd2f83cb46be", "score": "0.5604077", "text": "public function get_metrics()\n {\n //print_r($_GET);\n\n $client = (new Http())->getClient();\n\n $metrics = new Metrics($client);\n\n $this->metricsParam = $this->getMetricsArguments($_GET);\n $this->metricsParam['sub_account_id'] = $this->db['sub_account_id'];\n\n $result = $metrics->get($this->metricsParam);\n\n wp_send_json_success($result);\n }", "title": "" }, { "docid": "89986d9b39aa747cfc5d53f6d483dca2", "score": "0.56026614", "text": "public function getMetrics()\r\n {\r\n return $this->metrics;\r\n }", "title": "" }, { "docid": "c7254d7396b06744a379997d728d96df", "score": "0.5592879", "text": "public static function getCampaignStats()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('id, name')\n\t\t\t->from($db->quoteName('#__cmdonation_campaigns'))\n\t\t\t->order($db->quoteName('id') . ' DESC');\n\n\t\t$db->setQuery($query);\n\t\t$campaigns = $db->loadObjectList('id');\n\n\t\t// Check for errors.\n\t\tif (count($errors = $db->get('Errors')))\n\t\t{\n\t\t\tJError::raiseError(500, implode(\"\\n\", $errors));\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!empty($campaigns))\n\t\t{\n\t\t\tforeach ($campaigns as &$campaign)\n\t\t\t{\n\t\t\t\t$query->clear()\n\t\t\t\t\t->select('SUM(amount)')\n\t\t\t\t\t->from($db->quoteName('#__cmdonation_donations'))\n\t\t\t\t\t->where($db->quoteName('campaign_id') . ' = ' . $db->quote($campaign->id))\n\t\t\t\t\t->where($db->quoteName('status') . ' = ' . $db->quote('COMPLETED'));\n\n\t\t\t\t$db->setQuery($query);\n\t\t\t\t$amount = $db->loadResult();\n\n\t\t\t\t// Check for errors.\n\t\t\t\tif (count($errors = $db->get('Errors')))\n\t\t\t\t{\n\t\t\t\t\tJError::raiseError(500, implode(\"\\n\", $errors));\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$campaign->amount = $amount;\n\t\t\t}\n\t\t}\n\n\t\treturn $campaigns;\n\t}", "title": "" }, { "docid": "3117b8179ecbacc24756fe260b09d2a6", "score": "0.5583266", "text": "public function metric() {\n return $this->belongsTo('App\\Metric');\n }", "title": "" }, { "docid": "1054e8b0825f55ddf2d56fceef7f9937", "score": "0.5552981", "text": "public function getBannerData()\n {\n $field = null;\n if (empty($this->bannerField)) {\n $field = 'meta_banner';\n } else {\n $field = $this->bannerField;\n }\n\n return $this->{$field};\n }", "title": "" }, { "docid": "feb01a3689a150d3023d233debbf9190", "score": "0.5487239", "text": "public function getMetrics()\n {\n return $this->metrics;\n }", "title": "" }, { "docid": "03d18eba9513458925422ab295016361", "score": "0.54660916", "text": "function get_analytics_data($access_token=\"\",$from_date=\"\",$to_date='')\n\t{\n\t\t$url = \"https://graph.facebook.com/v4.0/me/insights/?metric=page_messages_total_messaging_connections,page_messages_new_conversations_unique,page_messages_blocked_conversations_unique,page_messages_reported_conversations_unique&access_token={$access_token}&since={$from_date}&until={$to_date}\";\n \t$ch = curl_init();\n \t$headers = array(\"Content-type: application/json\");\n \tcurl_setopt($ch, CURLOPT_URL, $url);\n \tcurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n \t// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); \n \tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); \n \tcurl_setopt($ch, CURLOPT_COOKIEJAR,'cookie.txt'); \n \tcurl_setopt($ch, CURLOPT_COOKIEFILE,'cookie.txt'); \n \tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n \tcurl_setopt($ch, CURLOPT_USERAGENT, \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3\");\n \t$st=curl_exec($ch); \n \t$result=json_decode($st,TRUE);\n \treturn $result;\n\t}", "title": "" }, { "docid": "5d6967cfa8dd41ea2ff7b466bb707933", "score": "0.54130405", "text": "public function getGaData() {\n $analytics = new Pas_Analytics_Gateway($this->getId(), $this->getPassword());\n $analytics->setProfile($this->getProfile());\n $timeframe = new Pas_Analytics_Timespan($this->getTimeSpan());\n $dates = $timeframe->getDates();\n $analytics->setStart($dates['start']);\n $analytics->setEnd($dates['end']);\n $analytics->setMetrics(array(\n Zend_Gdata_Analytics_DataQuery::METRIC_SPEED_AVG_PAGE_LOAD_TIME,\n Zend_Gdata_Analytics_DataQuery::METRIC_SPEED_METRICS_SAMPLE\n\n )\n );\n $analytics->setDimensions(array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH,\n )\n );\n $analytics->setFilters(array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::EQUALS . $this->_path\n ));\n $analytics->setMax($this->getLimit());\n $analytics->setSort(Zend_Gdata_Analytics_DataQuery::METRIC_SPEED_AVG_PAGE_LOAD_TIME);\n $analytics->setSortDirection(true);\n $this->_results = $analytics->getData();\n $this->_total = $analytics->getTotal();\n return $this;\n }", "title": "" }, { "docid": "129c2342a4f441e4740b4779814925c7", "score": "0.5403667", "text": "public function getMetric()\n {\n return 1;\n }", "title": "" }, { "docid": "840536c1f9fe9d1c43ce045e9b9e3890", "score": "0.5382473", "text": "public function get()\n {\n return $this->campaigns;\n }", "title": "" }, { "docid": "9d9a776c947a30e1e725f2e7b8276322", "score": "0.53614074", "text": "public function getAllCampaignsDetails(){\n $totalCampaigns = Campaign::query()->get()->count();\n $approvedCampaigns = Campaign::query()->where('status', 'approved')->get();\n $pendingCampaigns = Campaign::query()->where('is_approval', true)->where('status', 'pending')->get();\n $savedCampaigns = Campaign::query()->where('is_approval', null)->where('status', 'pending')->get();\n $campaigns = Campaign::query()->get();\n $totalDonation = 0;\n foreach ($campaigns as $campaign){\n $totalDonation += $campaign->fund_raised;\n }\n $response = [];\n return Response::raw(200, array_merge($response,[\"campaigns\" => $campaigns, \"total_campaigns\" => $totalCampaigns, \"approved_campaigns\" => $approvedCampaigns, \"pending_campaigns\" => $pendingCampaigns,\"saved_campaigns\" => $savedCampaigns, \"total_donation\" => $totalDonation]));\n }", "title": "" }, { "docid": "e775100b774f5ec45d45226845669187", "score": "0.53587574", "text": "public function get_statistics()\n {\n\n // brands requests count (for the current month) (total, aziende, privati) (exact number and percentage)\n\n // % and exact number of leads for aziende and privati (current year)\n\n // % and exact number of brands (current year)\n\n $months = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\n $current_month = date(\"M\");\n $year = date(\"Y\");\n $brandsQuery = Brand::all('name');\n $brands = [];\n\n foreach ($brandsQuery as $brand)\n $brands[] = $brand->name;\n\n $stats = new \\stdclass;\n $stats->leads_per_month_aziende = new \\stdclass;\n $stats->leads_per_month_privati = new \\stdclass;\n\n foreach ($months as $month)\n {\n $stats->leads_per_month_aziende->{$month} = lead::where('year', $year)->where('month', $month)->where('business', 1)->count();\n $stats->leads_per_month_privati->{$month} = lead::where('year', $year)->where('month', $month)->where('business', 0)->count();\n }\n\n $stats->leads_brands_current_month_aziende = new \\stdclass;\n $stats->leads_brands_current_month_privati = new \\stdclass;\n\n foreach ($brands as $brand)\n {\n $stats->leads_brands_current_month_aziende->{$brand} = lead::where('year', $year)->where('month', $current_month)->where('business', 1)->where('brand', $brand)->count();\n $stats->leads_brands_current_month_privati->{$brand} = lead::where('year', $year)->where('month', $current_month)->where('business', 0)->where('brand', $brand)->count();\n }\n \n return response()->json($stats, 201);\n }", "title": "" }, { "docid": "08e2bfb2b5ed7567a87834ad09ce50ac", "score": "0.53124547", "text": "function keyDimensions(){\n \treturn array(\"ga:Campaign\",\"ga:Source\",\"ga:Keyword\",\"ga:SocialNetwork\",\"ga:HasSocialSourceReferral\",\"ga:ReferralPath\",\"ga:Medium\",\"ga:AdContent\");\n }", "title": "" }, { "docid": "6ef14adf243e02f6d8aa07bf68588a70", "score": "0.52765715", "text": "public function __construct(Google_Client $client)\n {\n parent::__construct($client);\n $this->servicePath = 'analytics/v3/';\n $this->version = 'v3';\n $this->serviceName = 'analytics';\n\n $this->data_ga = new Google_Service_Analytics_DataGa_Resource(\n $this,\n $this->serviceName,\n 'ga',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'data/ga',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'ids' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'start-date' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'end-date' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'metrics' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'sort' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'dimensions' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'segment' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'samplingLevel' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'filters' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'output' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),\n )\n )\n );\n $this->data_mcf = new Google_Service_Analytics_DataMcf_Resource(\n $this,\n $this->serviceName,\n 'mcf',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'data/mcf',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'ids' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'start-date' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'end-date' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'metrics' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'sort' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'dimensions' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'samplingLevel' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'filters' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),\n )\n )\n );\n $this->data_realtime = new Google_Service_Analytics_DataRealtime_Resource(\n $this,\n $this->serviceName,\n 'realtime',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'data/realtime',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'ids' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'metrics' => array(\n 'location' => 'query',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'sort' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'dimensions' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'filters' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),\n )\n )\n );\n $this->management_accountSummaries = new Google_Service_Analytics_ManagementAccountSummaries_Resource(\n $this,\n $this->serviceName,\n 'accountSummaries',\n array(\n 'methods' => array(\n 'list' => array(\n 'path' => 'management/accountSummaries',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),\n )\n )\n );\n $this->management_accountUserLinks = new Google_Service_Analytics_ManagementAccountUserLinks_Resource(\n $this,\n $this->serviceName,\n 'accountUserLinks',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/entityUserLinks/{linkId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/entityUserLinks',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/entityUserLinks',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/entityUserLinks/{linkId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_accounts = new Google_Service_Analytics_ManagementAccounts_Resource(\n $this,\n $this->serviceName,\n 'accounts',\n array(\n 'methods' => array(\n 'list' => array(\n 'path' => 'management/accounts',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),\n )\n )\n );\n $this->management_customDataSources = new Google_Service_Analytics_ManagementCustomDataSources_Resource(\n $this,\n $this->serviceName,\n 'customDataSources',\n array(\n 'methods' => array(\n 'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),\n )\n )\n );\n $this->management_customDimensions = new Google_Service_Analytics_ManagementCustomDimensions_Resource(\n $this,\n $this->serviceName,\n 'customDimensions',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDimensionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDimensionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'ignoreCustomDataSourceLinks' => array(\n 'location' => 'query',\n 'type' => 'boolean',\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDimensions/{customDimensionId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDimensionId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'ignoreCustomDataSourceLinks' => array(\n 'location' => 'query',\n 'type' => 'boolean',\n ),\n ),\n ),\n )\n )\n );\n $this->management_customMetrics = new Google_Service_Analytics_ManagementCustomMetrics_Resource(\n $this,\n $this->serviceName,\n 'customMetrics',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customMetricId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customMetricId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'ignoreCustomDataSourceLinks' => array(\n 'location' => 'query',\n 'type' => 'boolean',\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customMetrics/{customMetricId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customMetricId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'ignoreCustomDataSourceLinks' => array(\n 'location' => 'query',\n 'type' => 'boolean',\n ),\n ),\n ),\n )\n )\n );\n $this->management_experiments = new Google_Service_Analytics_ManagementExperiments_Resource(\n $this,\n $this->serviceName,\n 'experiments',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'experimentId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'experimentId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'experimentId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'experimentId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_filters = new Google_Service_Analytics_ManagementFilters_Resource(\n $this,\n $this->serviceName,\n 'filters',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/filters/{filterId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'filterId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'management/accounts/{accountId}/filters/{filterId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'filterId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/filters',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/filters',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/filters/{filterId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'filterId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/filters/{filterId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'filterId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_goals = new Google_Service_Analytics_ManagementGoals_Resource(\n $this,\n $this->serviceName,\n 'goals',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'goalId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'goalId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals/{goalId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'goalId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_profileFilterLinks = new Google_Service_Analytics_ManagementProfileFilterLinks_Resource(\n $this,\n $this->serviceName,\n 'profileFilterLinks',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/profileFilterLinks/{linkId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_profileUserLinks = new Google_Service_Analytics_ManagementProfileUserLinks_Resource(\n $this,\n $this->serviceName,\n 'profileUserLinks',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/entityUserLinks/{linkId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_profiles = new Google_Service_Analytics_ManagementProfiles_Resource(\n $this,\n $this->serviceName,\n 'profiles',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_segments = new Google_Service_Analytics_ManagementSegments_Resource(\n $this,\n $this->serviceName,\n 'segments',\n array(\n 'methods' => array(\n 'list' => array(\n 'path' => 'management/segments',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),\n )\n )\n );\n $this->management_unsampledReports = new Google_Service_Analytics_ManagementUnsampledReports_Resource(\n $this,\n $this->serviceName,\n 'unsampledReports',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports/{unsampledReportId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'unsampledReportId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/unsampledReports',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'profileId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),\n )\n )\n );\n $this->management_uploads = new Google_Service_Analytics_ManagementUploads_Resource(\n $this,\n $this->serviceName,\n 'uploads',\n array(\n 'methods' => array(\n 'deleteUploadData' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/deleteUploadData',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDataSourceId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads/{uploadId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDataSourceId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'uploadId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDataSourceId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'uploadData' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/uploads',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'customDataSourceId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_webPropertyAdWordsLinks = new Google_Service_Analytics_ManagementWebPropertyAdWordsLinks_Resource(\n $this,\n $this->serviceName,\n 'webPropertyAdWordsLinks',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyAdWordsLinkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyAdWordsLinkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyAdWordsLinkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityAdWordsLinks/{webPropertyAdWordsLinkId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyAdWordsLinkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_webproperties = new Google_Service_Analytics_ManagementWebproperties_Resource(\n $this,\n $this->serviceName,\n 'webproperties',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'patch' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}',\n 'httpMethod' => 'PATCH',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->management_webpropertyUserLinks = new Google_Service_Analytics_ManagementWebpropertyUserLinks_Resource(\n $this,\n $this->serviceName,\n 'webpropertyUserLinks',\n array(\n 'methods' => array(\n 'delete' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}',\n 'httpMethod' => 'DELETE',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'insert' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),'list' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'max-results' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n 'start-index' => array(\n 'location' => 'query',\n 'type' => 'integer',\n ),\n ),\n ),'update' => array(\n 'path' => 'management/accounts/{accountId}/webproperties/{webPropertyId}/entityUserLinks/{linkId}',\n 'httpMethod' => 'PUT',\n 'parameters' => array(\n 'accountId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'webPropertyId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n 'linkId' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->metadata_columns = new Google_Service_Analytics_MetadataColumns_Resource(\n $this,\n $this->serviceName,\n 'columns',\n array(\n 'methods' => array(\n 'list' => array(\n 'path' => 'metadata/{reportType}/columns',\n 'httpMethod' => 'GET',\n 'parameters' => array(\n 'reportType' => array(\n 'location' => 'path',\n 'type' => 'string',\n 'required' => true,\n ),\n ),\n ),\n )\n )\n );\n $this->provisioning = new Google_Service_Analytics_Provisioning_Resource(\n $this,\n $this->serviceName,\n 'provisioning',\n array(\n 'methods' => array(\n 'createAccountTicket' => array(\n 'path' => 'provisioning/createAccountTicket',\n 'httpMethod' => 'POST',\n 'parameters' => array(),\n ),\n )\n )\n );\n }", "title": "" }, { "docid": "5fcdc80034e009ff09423241f8e0af96", "score": "0.5266287", "text": "public function getMetric()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "e0dd94306f5001486c27cba290b55747", "score": "0.526536", "text": "public function get(Request $request){\n\n switch ($request->type){\n case 'getAdvertisementAnalytics':\n $advertisement_id = $request->advertisement_id;\n $year = $request->year;\n $month = $request->month;\n $day = $request->day;\n if(!$year){\n $year = date('Y');\n }\n\n $advertisement = Advertisement::where('id',$advertisement_id)->first();\n\n if(!$advertisement){\n return ['status'=> false];\n }\n\n\n // -- ADV Analytics\n $analytics = collect($advertisement->analytics($advertisement->id,$year,$month,$day))->map(function($data){\n $date = explode('-',explode(' ',$data->user_action_date_time)[0]);\n $data->yearMonth = $date[0].'-'.$date[1];\n $data->month = (int)$date[1];\n return $data;\n });\n\n $clickAnalytics = collect($analytics)->where('user_action_type','=','click')->count();\n $viewAnalytics = collect($analytics)->where('user_action_type','=','view')->count();\n\n // Gender\n $maleAnalytics = collect($analytics)->where('gender','=','male')->count();\n $femaleAnalytics = collect($analytics)->where('gender','=','female')->count();\n $nullAnalytics = collect($analytics)->where('gender','=',null)->count();\n\n $groupByDateClickAnalytics = collect($analytics)\n ->where('user_action_type','=','click')\n ->groupBy('month')\n ->toArray();\n\n // ----\n $groupByDateViewAnalytics = collect($analytics)\n ->where('user_action_type','=','view')\n ->groupBy('month')\n ->toArray();\n\n\n $monthsClick = [];\n if(!empty($groupByDateClickAnalytics)){\n for($i=1;$i<=12;$i++){\n if(isset($groupByDateClickAnalytics[$i])){\n $monthsClick[$i] = count($groupByDateClickAnalytics[$i]);\n }else{\n $monthsClick[$i] = 0;\n }\n }\n }\n\n $monthsView = [];\n if(!empty($groupByDateViewAnalytics)){\n for($i=1;$i<=12;$i++){\n if(isset($groupByDateViewAnalytics[$i])){\n $monthsView[$i] = count($groupByDateViewAnalytics[$i]);\n }else{\n $monthsView[$i] = 0;\n }\n }\n }\n // -- ADV Analytics\n\n return [\n 'status'=> true,\n 'year'=> $year,\n 'monthsView'=> $monthsView,\n 'monthsClick'=> $monthsClick,\n 'clickAnalytics'=> $clickAnalytics,\n 'viewAnalytics'=> $viewAnalytics,\n 'maleAnalytics'=> $maleAnalytics,\n 'femaleAnalytics'=> $femaleAnalytics,\n 'nullAnalytics'=> $nullAnalytics\n ];\n\n break;\n\n // MOSTAFA\n // finduser\n case 'user':\n $word = $request->word;\n $data = User::where('id','=',$word)\n ->orwhere('firstname','LIKE','%'.$word.'%')\n ->orwhere('lastname','LIKE','%'.$word.'%')\n ->orwhere('email','LIKE','%'.$word.'%')\n ->orwhere('mobile','LIKE','%'.$word.'%')\n ->orwhere('national_id','=',$word)\n ->get(['id','firstname','lastname']);\n\n $return = [];\n foreach ($data as $value) {\n $return[] = [\n 'id'=> $value->id,\n 'value'=> $value->firstname.' '.$value->lastname.' #ID:'.$value->id\n ];\n }\n return $return;\n break;\n\n // MOSTAFA\n case 'getNextAreas':\n return \\App\\Libs\\AreasData::getNextAreas($request->id,$this->systemLang);\n break;\n case 'staff':\n $word = $request->word;\n $data = Staff::where('name','LIKE','%'.$word.'%')\n ->orWhere('email','LIKE','%'.$word.'%')\n ->orWhere('mobile1','LIKE','%'.$word.'%')\n ->get(['id','name']);\n\n $return = [];\n foreach ($data as $value) {\n $return[] = [\n 'id'=> $value->id,\n 'value'=> $value->name.' #ID:'.$value->id\n ];\n }\n\n return $return;\n break;\n case 'merchant':\n $word = $request->word;\n $data = Merchant::where('name_ar','LIKE',\"%$word%\")\n ->orWhere('name_en','LIKE',\"%$word%\")\n ->orWhere('description_ar','LIKE',\"%$word%\")\n ->orWhere('description_en','LIKE',\"%$word%\")\n ->orWhere('id',$word)\n ->get(['id',\"name_{$this->systemLang} as name\"]);\n\n $return = [];\n foreach ($data as $value) {\n $return[] = [\n 'id'=> $value->id,\n 'value'=> $value->name.' #ID:'.$value->id\n ];\n }\n return $return;\n break;\n\n case 'productcategory':\n $word = $request->word;\n $data = Auth::user()->merchant()->merchant_product_catgories()->where(function($query) use ($word) {\n $query->where('name_ar','LIKE',\"%$word%\")\n ->orWhere('name_en','LIKE',\"%$word%\")\n ->orWhere('description_ar','LIKE',\"%$word%\")\n ->orWhere('description_en','LIKE',\"%$word%\")\n ->orWhere('id',$word);\n })\n ->Active()\n ->get(['id',\"name_{$this->systemLang} as name\"]);\n\n $return = [];\n foreach ($data as $value) {\n $return[] = [\n 'id'=> $value->id,\n 'value'=> $value->name.' #ID:'.$value->id\n ];\n }\n return $return;\n break;\n\n case 'product':\n $catid = (int) $request->catid;\n\n $data = Auth::user()->merchant()->merchant_products()\n ->select(['id',\"merchant_products.name_{$this->systemLang} as name\",'price'])\n ->where('merchant_product_category_id','=',$catid)\n ->withCount('attribute')\n ->Active()\n ->get();\n\n $return = [];\n foreach ($data as $value) {\n $return[] = [\n 'id'=> $value->id,\n 'value'=> $value->name.' #ID:'.$value->id,\n 'price'=> $value->product_price(),\n 'attribute'=>$value->attribute_count\n ];\n }\n\n return $return;\n break;\n\n case 'productAttributes':\n $proid = (int) $request->proid;\n $lang = $this->systemLang;\n $attributes = ProductAttribute::viewData($this->systemLang,[])->where('product_id','=',$proid)->get();\n\n $oldattributevalues = Attribute::whereIn('id',$attributes->pluck('attribute_id'))\n ->with(['attributeValue'=>function($sqlQuery)use($lang){\n $sqlQuery->select(['id','attribute_id','text_'.$lang.' as text','is_default']);\n }])->get();\n\n return $attributes->groupBy('attribute_id');\n\n break;\n case 'customer':\n $word = $request->word;\n if(strlen($word < 11))\n return;\n $data = User::where('mobile','=',$word)\n ->orwhere('mobile','LIKE','%'.$word.'%')\n ->get(['id','mobile'])->first();\n\n return $data;\n break;\n\n case 'getTransaction':\n $id = $request->id;\n $ownerMD5 = $request->ownerMD5;\n\n $data = WalletTransaction::with(['model','fromWallet','toWallet','transactions_status'])->find($id);\n if(!$data){\n return ['status'=> false];\n }\n $result = $data->toArray();\n if($data->fromWallet == null){\n $result['fromType'] = ' -- ';\n $result['fromName'] = ' -- ';\n }else{\n $result['fromType'] = WalletData::getWalletOwnerType($data->fromWallet->walletowner_type);\n if($ownerMD5 == md5($data->fromWallet->walletowner_id.$data->fromWallet->walletowner_type)){\n $result['fromName'] = '<span style=\"color: red;\">'.getWalletOwnerName($data->fromWallet,$this->systemLang).'</span>';\n }else{\n $result['fromName'] = getWalletOwnerName($data->fromWallet,$this->systemLang);\n }\n }\n if($data->toWallet == null){\n $result['toType'] = ' -- ';\n $result['toName'] = ' -- ';\n }else{\n $result['toType'] = WalletData::getWalletOwnerType($data->toWallet->walletowner_type);\n if($ownerMD5 == md5($data->toWallet->walletowner_id.$data->toWallet->walletowner_type)){\n $result['toName'] = '<span style=\"color: red;\">'.getWalletOwnerName($data->toWallet,$this->systemLang).'</span>';\n }else{\n $result['toName'] = getWalletOwnerName($data->toWallet,$this->systemLang);\n }\n }\n\n $result['modelName'] = WalletData::getModelTypeByModel($data->model_type);\n $result['updated_at'] = $data->updated_at->diffForHumans();\n\n if($result['modelName'] == 'invoice'){\n $result['payment_services_name'] = $data->model_data->payment_services->{'name_'.$this->systemLang};\n }else{\n // @TODO: order\n //$result['payment_services_name'] = $data->model->payment_services->{'name_'.$this->systemLang};\n }\n return ['status'=> true,'data'=>$result];\n br.eak;\n }\n }", "title": "" }, { "docid": "d4659c1f603a412dbe340677003348f2", "score": "0.52523845", "text": "public function getCampaign()\n {\n return $this->campaign;\n }", "title": "" }, { "docid": "d4659c1f603a412dbe340677003348f2", "score": "0.52523845", "text": "public function getCampaign()\n {\n return $this->campaign;\n }", "title": "" }, { "docid": "e861eee9bb0e49591d3843f0eed5cda0", "score": "0.5246197", "text": "public function getCampaignFeed()\n {\n return $this->campaign_feed;\n }", "title": "" }, { "docid": "ce1b1967c51101c47a5715a939985da4", "score": "0.5198767", "text": "function get_metrics($deployment_id, $ago = \"-15 minutes\") {\n global $table;\n // get DateTime.Ticks in past\n $ago = str_to_ticks($ago);\n // build query\n $filter = \"DeploymentId eq '$deployment_id' and Role eq 'WebRole' and PartitionKey gt '0$ago'\";\n $filter='';\n // run query\n $metrics = $table->retrieveEntities('WADPerformanceCountersTable', $filter);\n \n $arr = array();\n foreach ($metrics AS $m) {\n // Global totals\n $arr['totals'][$m->countername]['count'] = (!isset($arr['totals'][$m->countername]['count'])) ? 1 : $arr['totals'][$m->countername]['count'] + 1;\n $arr['totals'][$m->countername]['total'] = (!isset($arr['totals'][$m->countername]['total'])) ? $m->countervalue : $arr['totals'][$m->countername]['total'] + $m->countervalue;\n $arr['totals'][$m->countername]['average'] = (!isset($arr['totals'][$m->countername]['average'])) ? $m->countervalue : $arr['totals'][$m->countername]['total'] / $arr['totals'][$m->countername]['count'];\n \n \n // Totals by instance\n $arr[$m->roleinstance][$m->countername]['count'] = (!isset($arr[$m->roleinstance][$m->countername]['count'])) ? 1 : $arr[$m->roleinstance][$m->countername]['count'] + 1;\n $arr[$m->roleinstance][$m->countername]['total'] = (!isset($arr[$m->roleinstance][$m->countername]['total'])) ? $m->countervalue : $arr[$m->roleinstance][$m->countername]['total'] + $m->countervalue;\n $arr[$m->roleinstance][$m->countername]['average'] = (!isset($arr[$m->roleinstance][$m->countername]['average'])) ? $m->countervalue : ($arr[$m->roleinstance][$m->countername]['total'] / $arr[$m->roleinstance][$m->countername]['count']);\n }\n return $arr;\n}", "title": "" }, { "docid": "dfd2044f8fb9ccad0ce313d95539f13e", "score": "0.5196534", "text": "public function testApiV2MetricsGet()\n {\n }", "title": "" }, { "docid": "d64ebb804c34ea96aa029d19e7df8dff", "score": "0.5191872", "text": "function getAdgroupAds($token,$ClientID,$aid){\n\t$user = new AdWordsUser();\n\tPrevInitAdwordsUserSettings($user);\n\t$campains = array();\n\tif(LoadAdWordsAccessTokenForClient($user, $token) ){ \n\t\t$user->SetClientCustomerId($ClientID); \n\t\t\n\t\t$reportQuery = 'SELECT Id,Headline FROM AD_PERFORMANCE_REPORT '\n . 'WHERE AdGroupId = '.$aid.' AND Status = ENABLED';\n\n\t\t$options = array('version' => ADWORDS_VERSION);\n\t\t$name = 'c'.time().'.csv';\n\t\t$filePath = $_SERVER['DOCUMENT_ROOT'].'/admetric/csv/'.$name;\n\t\t$reportFormat = 'CSV';\n\t\t$filePath = NULL;\n\t\t$reportData = ReportUtils::DownloadReportWithAwql($reportQuery, $filePath, $user,\n\t\t$reportFormat, $options);\n\t\t$i=1;\n\t\t$Data = str_getcsv($reportData, \"\\n\");\n\t\t\n\t\tforeach($Data as &$Row){\n\t\t\t$Row = str_getcsv($Row, \",\");\n\t\t \tif($i>2){\n\t\t\t\t$newArr = array();\n\t\t\t\t$newArr['id'] = $Row[0];\n\t\t\t\t$newArr['name'] = $Row[1];\n\t\t\t\t$newArr['a'] = $ClientID;\n\t\t\t\t$newArr['ai'] = $aid;\n\t\t\t\t$campains[] = $newArr;\n\t\t\t\t\n\t\t\t}\n\t\t\t$i++;\n\t\t }\n\t\t}\n\t$in = (count($campains)-1);\n\tunset($campains[$in]);\n\t/*echo ((round(microtime(true) * 1000))-$current).'<br>';\n\techo '<pre>';\n\tprint_r($campains);exit;*/ \n\t//unset($campains[($in-1)]);\n\treturn $campains;\n}", "title": "" }, { "docid": "d8d47d8e536795e49ad1db358afb1341", "score": "0.5186015", "text": "public function getStatistics();", "title": "" }, { "docid": "d8d47d8e536795e49ad1db358afb1341", "score": "0.5186015", "text": "public function getStatistics();", "title": "" }, { "docid": "5aaa2424c56f271f3cb7632ecbcd040b", "score": "0.51806945", "text": "public static function getMetrics()\n {\n return array(\n 'message_count' => 'Message Count',\n 'message_count-first24hrs' => 'Message Count - First 24 Hours',\n 'message_count-second24hrs' => 'Message Count - Second 24 Hours',\n 'error_count' => 'Error Count',\n 'error_count-first24hrs' => 'Error Count - First 24 Hours',\n 'user_count' => 'User Count',\n 'user_count-first24hrs' => 'User Count - First 24 Hours',\n 'total_response_time' => 'Total Response Time',\n 'max_response_time' => 'Maximum Response Time',\n 'min_response_time' => 'Minimum Response Time',\n 'end_point_response_time' => 'Endpoint Response Time'\n );\n }", "title": "" }, { "docid": "70dc1a25d1e4151658a798dc419d526f", "score": "0.51806754", "text": "function getLiveCampaignInfo()\n {\n $today = date('Y-m-d');\n $sql = \"SELECT \n camp_id,\n no_exams \n FROM campaign WHERE start_date <= '$today' AND end_date >= '$today' AND status = 1 LIMIT 1\";\n $result = $this->conn->query($sql);\n if(mysqli_num_rows($result) == 1)\n {\n $row = mysqli_fetch_row($result);\n $this->campaignID = $row[0];\n $this->numExams = $row[1];\n }\n }", "title": "" }, { "docid": "34172a7966a01645a8779635fb995eaa", "score": "0.5152313", "text": "public function fetch() {\n $startTime = microtime(true);\n\n $ret = call_user_func_array(array('parent', __FUNCTION__), func_get_args());\n\n if ($this->metricsEnabled) {\n $this->metrics['requests'][] = array(\n 'method' => __FUNCTION__,\n 'args' => func_get_args(),\n 'timeout' => $timeout = microtime(true) - $startTime,\n );\n\n $this->metrics['timeout']+=$timeout;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "9b7ad96bcebafaf5477b97f2655599a7", "score": "0.5148865", "text": "public function getActionMetrics(array $options)\n {\n if (!isset($options['id'])) {\n $this->mockException('Campaign id is required!', 'GET');\n } // @codeCoverageIgn\n\n if (!isset($options['action_id'])) {\n $this->mockException('Action id is required!', 'GET');\n } // @codeCoverageIgn\n\n $path = $this->campaignPath($options['id'], ['actions', $options['action_id'], 'metrics']);\n unset($options['id']);\n unset($options['action_id']);\n\n return $this->client->get($path, $options);\n }", "title": "" }, { "docid": "d83f4d8066defebf4aced2f6ced82d73", "score": "0.514373", "text": "public function getData()\n {\n $db = $this->getDbConnection();\n $variables = $this->getVariables();\n\n $query = 'SHOW STATUS';\n $rows = $db->fetchAll($query);\n foreach ($rows as $row) {\n $rowName = strtolower(array_shift($row));\n $rowValue = array_shift($row);\n \n if (array_key_exists($rowName, $variables)) {\n $variableType = $variables[$rowName];\n $this->addMetric($rowName, $rowValue, $variableType);\n }\n }\n\n return $this->metrics;\n }", "title": "" }, { "docid": "5402c9bcdcb8a69896a9fd73985b8672", "score": "0.51427877", "text": "public function getStats();", "title": "" }, { "docid": "5402c9bcdcb8a69896a9fd73985b8672", "score": "0.51427877", "text": "public function getStats();", "title": "" }, { "docid": "5402c9bcdcb8a69896a9fd73985b8672", "score": "0.51427877", "text": "public function getStats();", "title": "" }, { "docid": "2511bb18595ad3892b10a846f200fbb9", "score": "0.51388943", "text": "function getspeedReport($analytics) {\r\n $VIEW_ID = \"207950363\";\r\n\r\n // Create the DateRange object.\r\n $dateRange = new Google_Service_AnalyticsReporting_DateRange();\r\n $dateRange->setStartDate(\"2019-07-01\");\r\n $dateRange->setEndDate(\"today\");\r\n\r\n // Create the Metrics object.\r\n\r\n $avgPageLoadTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgPageLoadTime->setExpression(\"ga:avgPageLoadTime\");\r\n $avgPageLoadTime->setAlias(\"avgPageLoadTime\");\r\n\r\n $avgDomainLookupTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgDomainLookupTime->setExpression(\"ga:avgDomainLookupTime\");\r\n $avgDomainLookupTime->setAlias(\"avgDomainLookupTime\");\r\n\r\n $avgPageDownloadTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgPageDownloadTime->setExpression(\"ga:avgPageDownloadTime\");\r\n $avgPageDownloadTime->setAlias(\"avgPageDownloadTime\");\r\n\r\n $avgRedirectionTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgRedirectionTime->setExpression(\"ga:avgRedirectionTime\");\r\n $avgRedirectionTime->setAlias(\"avgRedirectionTime\");\r\n\r\n $avgServerConnectionTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgServerConnectionTime->setExpression(\"ga:avgServerConnectionTime\");\r\n $avgServerConnectionTime->setAlias(\"avgServerConnectionTime\");\r\n\r\n $avgServerResponseTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgServerResponseTime->setExpression(\"ga:avgServerResponseTime\");\r\n $avgServerResponseTime->setAlias(\"avgServerResponseTime\");\r\n\r\n $avgDomInteractiveTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgDomInteractiveTime->setExpression(\"ga:avgDomInteractiveTime\");\r\n $avgDomInteractiveTime->setAlias(\"avgDomInteractiveTime\");\r\n\r\n\r\n $avgDomContentLoadedTime =new Google_Service_AnalyticsReporting_Metric();\r\n $avgDomContentLoadedTime->setExpression(\"ga:avgDomContentLoadedTime\");\r\n $avgDomContentLoadedTime->setAlias(\"avgDomContentLoadedTime\");\r\n\r\n\r\n $pageLoadTime =new Google_Service_AnalyticsReporting_Metric();\r\n $pageLoadTime->setExpression(\"ga:pageLoadTime\");\r\n $pageLoadTime->setAlias(\"pageLoadTime\");\r\n\r\n//Create the Dimensions object.\r\n\r\n // Create the ReportRequest object.\r\n $request = new Google_Service_AnalyticsReporting_ReportRequest();\r\n $request->setViewId($VIEW_ID);\r\n $request->setDateRanges($dateRange);\r\n // $request->setDimensions(array($avgPageLoadTime,$avgDomainLookupTime,$avgPageDownloadTime,$avgRedirectionTime,$avgServerConnectionTime,$avgServerResponseTime,$avgDomInteractiveTime,$avgDomContentLoadedTime,$pageLoadTime));\r\n $request->setMetrics(array($avgPageLoadTime,$avgDomainLookupTime,$avgPageDownloadTime,$avgRedirectionTime,$avgServerConnectionTime,$avgServerResponseTime,$avgDomInteractiveTime,$avgDomContentLoadedTime,$pageLoadTime));\r\n\r\n $body = new Google_Service_AnalyticsReporting_GetReportsRequest();\r\n $body->setReportRequests( array( $request) );\r\n return $analytics->reports->batchGet( $body );\r\n}", "title": "" }, { "docid": "c63336c1527475b137cd9c92e785ddac", "score": "0.510237", "text": "public function getMeasurements();", "title": "" }, { "docid": "0b6d5b1e5061544230e50cc73b350932", "score": "0.5101564", "text": "public function getCampaignResult()\n {\n return $this->readOneof(10);\n }", "title": "" }, { "docid": "9042ef7dd7aeb5e6a18b6137b7ab6a4b", "score": "0.5099211", "text": "public function getAllMetrics()\n {\n return $this->all_metrics;\n }", "title": "" }, { "docid": "d3b80f78a159d2e46fd2f13f8554c905", "score": "0.50904405", "text": "public function campaign() {\n eval(file_get_contents(\"../../../../sql/ptu/db.php\"));\n\n if ($this->checkBasicRequest() && $this->method == 'GET' && $this->checkUserAuth()) {\n // GET LIST OF CAMPAIGNS api/vi/campaign\n if (!array_key_exists('id', $_GET)) {\n $stmt = $db->prepare(\"SELECT campaign_id, campaign_name, campaign_data FROM campaigns \".\n \"WHERE user_firebase_id=:fid\");\n\n $stmt->execute(array(\"fid\" => $_SERVER['PHP_AUTH_USER']));\n\n $campaigns = $stmt->fetchAll();\n\n return $campaigns;\n }\n // GET CAMPAIGN BY ID api/v1/campaign/?=id\n else {\n $stmt = $db->prepare(\"SELECT campaign_id, campaign_name, campaign_data FROM campaigns \".\n \"WHERE campaign_id=:id AND user_firebase_id=:fid\");\n\n $stmt->execute(array(\"id\" => $_GET['id'], \"fid\" => $_SERVER['PHP_AUTH_USER']));\n\n $campaign = $stmt->fetch();\n\n return $campaign;\n }\n }\n // CREATE NEW CAMPAIGN\n else if ($this->checkBasicRequest() && $this->method == 'POST' && $this->checkUserAuth()) {\n $stmt = $db->prepare(\"INSERT INTO campaigns (user_firebase_id, campaign_name, campaign_data) \".\n \"VALUES (:fid, :name, :data)\");\n\n $stmt->execute(array(\"fid\" => $_SERVER['PHP_AUTH_USER'], \"name\" => $_POST['name'],\n \"data\" => isset($_POST['data']) ? $_POST['data'] : NULL));\n\n return $db->lastInsertId();\n }\n // UPDATE CAMPAIGN\n else if ($this->checkBasicRequest() && $this->method == 'PUT' && $this->checkUserAuth()) {\n $stmt = $db->prepare(\"UPDATE campaigns SET campaign_data=:data WHERE campaign_id=:id\");\n\n $stmt->execute(array(\"data\" => $_POST['data'], \"id\" => $_POST['id']));\n\n return true;\n }\n else {\n http_response_code(400);\n die;\n }\n }", "title": "" }, { "docid": "2ea76b49d44aa26295b4ae1a6f821ccf", "score": "0.50829446", "text": "private function get()\n {\n // Convert units to an acceptable format\n $units = in_array($this->units, ['auto', 'us', 'uk2']) ? 'imperial' : 'metric';\n\n // Temperature and Wind Speed Unit Mappings\n $unit = $this->getUnit($this->units);\n\n // Build the URL\n $url = '?lat=' . $this->lat\n . '&lon=' . $this->long\n . '&units=' . $units\n . '&lang=' . $this->lang\n . '&appid=[API_KEY]';\n\n // Cache expiry date\n $cacheExpire = Date::now()->addSeconds($this->cachePeriod);\n\n if ($this->options['isPaidPlan'] ?? 0 == 1) {\n // We build our data from multiple API calls\n // Current data first.\n $data = $this->queryApi($this->apiUrl . $this->forecastCurrent . $url, $cacheExpire);\n $data['current'] = $this->parseCurrentIntoFormat($data);\n\n $timezoneOffset = (int)$data['timezone'] / 3600;\n $this->timezone = (new \\DateTimeZone(($timezoneOffset < 0 ? '-' : '+') . abs($timezoneOffset)))->getName();\n\n // Pick out the country\n $country = $data['sys']['country'] ?? null;\n\n $this->logger->debug('Trying to determine units for Country: ' . $country);\n\n // If we don't have a unit, then can we base it on the timezone we got back?\n if ($this->units === 'auto' && $country !== null) {\n // Pick out some countries to set the units\n if ($country === 'GB') {\n $unit = $this->getUnit('uk2');\n } else if ($country === 'US') {\n $unit = $this->getUnit('us');\n } else if ($country === 'CA') {\n $unit = $this->getUnit('ca');\n } else {\n $unit = $this->getUnit('si');\n }\n }\n\n // Then the 16 day forecast API, which we will cache a day\n $data['daily'] = $this->queryApi($this->apiUrl . $this->forecastDaily . $url, $cacheExpire->copy()->addDay()->startOfDay())['list'];\n } else {\n // We use onecall\n $data = $this->queryApi($this->apiUrl . $this->forecastCombined . $url, $cacheExpire);\n\n $this->timezone = $data['timezone'];\n\n // Country based on timezone (this is harder than using the real country)\n if ($this->units === 'auto') {\n if (Str::startsWith($this->timezone, 'America')) {\n $unit = $this->getUnit('us');\n } else if ($this->timezone === 'Europe/London') {\n $unit = $this->getUnit('uk2');\n } else {\n $unit = $this->getUnit('si');\n }\n }\n }\n\n // Using units:\n $this->logger->debug('Using units: ' . json_encode($unit));\n\n // Parse into our forecast.\n // Load this data into our objects\n $this->currentDay = new Forecast();\n $this->currentDay->temperatureUnit = $unit['tempUnit'] ?: 'C';\n $this->currentDay->windSpeedUnit = $unit['windUnit'] ?: 'KPH';\n $this->currentDay->visibilityDistanceUnit = $unit['visibilityUnit'] ?: 'km';\n $this->processItemIntoDay($this->currentDay, $data['current'], $units, true);\n\n // Process each day into a forecast\n foreach ($data['daily'] as $dayItem) {\n $day = new Forecast();\n $day->temperatureUnit = $this->currentDay->temperatureUnit;\n $day->windSpeedUnit = $this->currentDay->windSpeedUnit;\n $day->visibilityDistanceUnit = $this->currentDay->visibilityDistanceUnit;\n $this->processItemIntoDay($day, $dayItem, $units);\n\n $this->forecast[] = $day;\n }\n\n // Enhance the currently with the high/low from the first daily forecast\n $this->currentDay->temperatureHigh = $this->forecast[0]->temperatureHigh;\n $this->currentDay->temperatureMaxRound = $this->forecast[0]->temperatureMaxRound;\n $this->currentDay->temperatureLow = $this->forecast[0]->temperatureLow;\n $this->currentDay->temperatureMinRound = $this->forecast[0]->temperatureMinRound;\n $this->currentDay->temperatureMorning = $this->forecast[0]->temperatureMorning;\n $this->currentDay->temperatureMorningRound = $this->forecast[0]->temperatureMorningRound;\n $this->currentDay->temperatureNight = $this->forecast[0]->temperatureNight;\n $this->currentDay->temperatureNightRound = $this->forecast[0]->temperatureNightRound;\n $this->currentDay->temperatureEvening = $this->forecast[0]->temperatureEvening;\n $this->currentDay->temperatureEveningRound = $this->forecast[0]->temperatureEveningRound;\n $this->currentDay->temperatureMean = $this->forecast[0]->temperatureMean;\n $this->currentDay->temperatureMeanRound = $this->forecast[0]->temperatureMeanRound;\n }", "title": "" }, { "docid": "648927bb5ad8e0111fbacc9b4323b604", "score": "0.5076645", "text": "public function getCampaignsActives() {\n }", "title": "" }, { "docid": "224c6f67e360ad3ff0aade6dfac27119", "score": "0.507421", "text": "function get_url_metrics($url) {\n if (!is_array($url)) {\n if (strpos($url, ',')) {\n $url = explode(',', $url);\n\n foreach ($url as $key => $value) {\n if (empty($value)){\n unset($url[$key]);\n }\n }\n } else {\n $url = array($url);\n }\n }\n\n // Discard urls if count is greater than 10\n if (count($url) > 10) {\n $urlChunk = array_chunk($url, 10, true);\n $url = $urlChunk[0];\n }\n\n $fields_required = array(\n 'fmrp',\n 'fmrr',\n 'pda',\n 'ueid',\n 'ufq',\n 'uid',\n 'umrp',\n 'umrr',\n 'upa',\n 'upl',\n 'us',\n 'ut',\n 'uu',\n 'utrp',\n 'utrr',\n );\n $fields_bits = array_intersect_key($this->url_metric_col_bit_flags, array_fill_keys($fields_required, false));\n $cols = 0;\n\n // @todo - this flag forms an int value larger than 32bit. Likely only works\n // on 64bit servers. Harden this!\n foreach ($fields_bits as $field_name => $bitmask_64bit) {\n $cols |= $bitmask_64bit;\n }\n\n $apiUrl = \"http://lsapi.seomoz.com/linkscape/url-metrics/\";\n if (count($url) == 1) {\n $apiUrl .= urlencode($url[0]);\n }\n \n $apiUrl .= \"?Cols=\". $cols; \n //$apiUrl .= \"?Cols=103616268349\";\n\n $dg_params = array(\n 'cache_key' => \"$apiUrl:url-metrics\",\n 'data_sources' => $this->format_data_sources_for_data_getter(array(\"local\", \"live\")),\n 'url_getter_params' => array(\n 'url' => $apiUrl,\n 'curl_options' => array (\n CURLOPT_USERPWD => api_username . \":\" . api_key\n ),\n 'user_agent' => 'Daytalytics API, Doubledot Media (doubledotmedia.com/contact)',\n ),\n );\n\n if (count($url) > 1) {\n $dg_params['url_getter_params'] += array('post_data' => json_encode($url));\n }\n\n $data = DataGetter::get_data_or_throw($this, $dg_params);\n return $this->parse_url_metrics($data);\n }", "title": "" }, { "docid": "4c78d71ce57524e6d038110152bd121d", "score": "0.5062903", "text": "private static function get_metric( $date, $mobile ) {\n\n // Get valid profiles\n $profiles = self::get_profiles();\n\n // Sort profiles into array of ids only\n $profile_ids = array();\n foreach ($profiles as $profile) {\n $profile_ids[] = $profile['id'];\n }\n\n // Get metrics for all valid profiles\n $data = ORM::for_table('analytics_total')\n ->where( 'date', $date )\n ->where_in('profile_id', $profile_ids)\n ->find_array();\n\n // Check if mobile data needs adding to totals\n if ( $mobile && $data ) {\n\n // Get mobile data for each profile\n foreach ($data as $key => $metrics) {\n\n // Get mobile data\n $mobile_data = self::get_mobile_data($metrics['profile_id'], $date);\n\n // Merge with profile metrics\n $data[$key] = array_merge($metrics, $mobile_data);\n }\n }\n\n // Return metrics with indexes changed to profile ids\n return self::convert_index_to_ids($data);\n }", "title": "" }, { "docid": "070ccc33e6b74fdb0d761dde1d6c2264", "score": "0.505614", "text": "private function populateDashboard()\n {\n // Get items counts data for the Insights section.\n $insights = $this->itemDomain->getUserItemsCounts();\n $items = $this->itemDomain->getUserItems();\n\n\n $data = array(\n \"totalItems\" => $insights->totalItems,\n \"totalProducts\" => $insights->totalProducts,\n \"totalServices\" => $insights->totalServices,\n \"items\" => $items\n );\n\n return $data;\n }", "title": "" }, { "docid": "cfd071f7595acf1ae93f6511292acc8a", "score": "0.5039995", "text": "function getAccountCampaigns($token,$ClientID){\n\t$user = new AdWordsUser();\n\tPrevInitAdwordsUserSettings($user);\n\t$campains = array();\n\tif(LoadAdWordsAccessTokenForClient($user, $token) ){ \n\t\t$user->SetClientCustomerId($ClientID); \n\t\t\n\t\t$reportQuery = 'SELECT CampaignId,CampaignName,AverageCpe FROM CAMPAIGN_PERFORMANCE_REPORT '\n . 'WHERE ExternalCustomerId = '.$ClientID;\n\n\t\t$options = array('version' => ADWORDS_VERSION);\n\t\t$name = 'c'.time().'.csv';\n\t\t$filePath = $_SERVER['DOCUMENT_ROOT'].'/admetric/csv/'.$name;\n\t\t$reportFormat = 'CSV';\n\t\t//$filePath = NULL;\n\t\tReportUtils::DownloadReportWithAwql($reportQuery, $filePath, $user,\n\t\t$reportFormat, $options);\n\t\t//echo ((round(microtime(true) * 1000))-$current).'<br>';\n\t\t//echo '<pre>';\n\t\t//print_r($reportData);\n\t\t//exit;\n\t\t$file = fopen($filePath,\"r\");\n\t\t$i=1;\n\t\t\n\t\twhile(!feof($file))\n\t\t {\n\t\t\t $cpcArray = fgetcsv($file);\n\t\t \tif($i>2){\n\t\t\t\t$newArr = array();\n\t\t\t\t$newArr['id'] = $cpcArray[0];\n\t\t\t\t$newArr['name'] = $cpcArray[1];\n\t\t\t\t$newArr['cpc'] = $cpcArray[2];\n\t\t\t\t$campains[] = $newArr;\n\t\t\t}\n\t\t\t/*if($i>3){\n\t\t\t\tbreak;\n\t\t\t}*/\n\t\t\t$i++;\n\t\t }\n\n\t\tfclose($file);\n\t\tunlink($filePath);\n\t\t\n\t\t}\n\t$in = (count($campains)-1);\n\tunset($campains[$in]);\n\tunset($campains[($in-1)]);\n\treturn $campains;\n}", "title": "" }, { "docid": "75fe8926cdc02e188e4ba57474d88606", "score": "0.49931046", "text": "public function getCampaignsCountAttribute()\n {\n return self::campaignscount();\n }", "title": "" }, { "docid": "6df8a7c78579b415c573bf9178ad8eed", "score": "0.49919102", "text": "public function load_ad_account_campaigns() {\n \n // Get selected account\n $account = $this->CI->ads_account_model->get_account($this->CI->user_id, 'facebook');\n \n if ( $account ) {\n \n // Get account's campaigns\n $account_campaigns = json_decode(get(MIDRUB_ADS_FACEBOOK_GRAPH_URL . $account[0]->net_id . '/campaigns?fields=name,status,insights,objective&limit=10&access_token=' . $account[0]->token), true);\n\n if ( isset($account_campaigns['data'][0]) ) {\n \n if ( file_exists(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $account[0]->net_id . '-campaigns.json') ) {\n unlink(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $account[0]->net_id . '-campaigns.json');\n }\n \n $this->create_cache(MIDRUB_BASE_USER_APPS_FACEBOOK_ADS . 'cache/' . $account[0]->net_id . '-campaigns.json', json_encode($account_campaigns, JSON_PRETTY_PRINT));\n \n $data = array(\n 'success' => TRUE,\n 'campaigns' => $account_campaigns['data'],\n 'previous' => '',\n 'next' => '',\n 'words' => array(\n 'new_campaign' => $this->CI->lang->line('new_campaign'),\n 'delete' => $this->CI->lang->line('delete'),\n 'reports' => $this->CI->lang->line('reports'),\n 'name' => $this->CI->lang->line('name'),\n 'status' => $this->CI->lang->line('status'),\n 'remaining_budget' => $this->CI->lang->line('remaining_budget'),\n 'start' => $this->CI->lang->line('start'),\n 'end' => $this->CI->lang->line('end'),\n 'previous' => $this->CI->lang->line('previous'),\n 'next' => $this->CI->lang->line('next'),\n )\n );\n \n if ( isset($account_campaigns['paging']['previous']) ) {\n $data['previous'] = $account_campaigns['paging']['previous'];\n }\n \n if ( isset($account_campaigns['paging']['next']) ) {\n $data['next'] = $account_campaigns['paging']['next'];\n }\n\n echo json_encode($data);\n exit();\n \n }\n \n }\n \n $data = array(\n 'success' => FALSE,\n 'words' => array(\n 'new_campaign' => $this->CI->lang->line('new_campaign'),\n 'delete' => $this->CI->lang->line('delete'),\n 'reports' => $this->CI->lang->line('reports'),\n 'name' => $this->CI->lang->line('name'),\n 'status' => $this->CI->lang->line('status'),\n 'previous' => $this->CI->lang->line('previous'),\n 'next' => $this->CI->lang->line('next'),\n )\n );\n\n echo json_encode($data);\n \n }", "title": "" }, { "docid": "b6d4dffb89ca2cf59db54220c047fd66", "score": "0.49682963", "text": "public function getUsage(\n $granularity = 'minute',\n $includeCurrentInterval = true\n ) {\n // Get the ApiAxle Api object for this Api model.\n $axleApi = new AxleApi(Yii::app()->params['apiaxle'], $this->code);\n \n // Get the starting timestamp for the data we care about.\n $timeStart = \\UsageStats::getTimeStart(\n $granularity,\n $includeCurrentInterval\n );\n \n // Retrieve the stats from ApiAxle.\n $axleStats = $axleApi->getStats($timeStart, false, $granularity, 'false');\n \n // Reformat the data for easier use.\n $dataByCategory = array();\n foreach ($axleStats as $category => $categoryStats) {\n $tempCategoryData = array();\n foreach ($categoryStats as $responseCode => $timeData) {\n if (count($timeData) <= 0) {\n continue;\n }\n $tempResponseCodeData = array();\n foreach ($timeData as $timestamp => $numHits) {\n $tempResponseCodeData[$timestamp] = $numHits;\n }\n if (count($tempResponseCodeData) > 0) {\n $tempCategoryData[$responseCode] = $tempResponseCodeData;\n }\n }\n $dataByCategory[$category] = $tempCategoryData;\n }\n \n // Sum the cached and uncached hits, then sum that with the errors.\n $successfulUsage = UsageStats::combineUsageCategoryArrays(\n $dataByCategory['uncached'],\n $dataByCategory['cached']\n );\n $usage = UsageStats::combineUsageCategoryArrays(\n $successfulUsage,\n $dataByCategory['error']\n );\n \n // Return the resulting data.\n return $usage;\n }", "title": "" }, { "docid": "4a4b37e2df56ebff6dbe0b491b120eb9", "score": "0.49639785", "text": "function getsocialreport($analytics) {\r\n $VIEW_ID = \"207950363\";\r\n\r\n // Create the DateRange object.\r\n $dateRange = new Google_Service_AnalyticsReporting_DateRange();\r\n $dateRange->setStartDate(\"2019-07-01\");\r\n $dateRange->setEndDate(\"today\");\r\n\r\n // Create the Metrics object.\r\n\r\n // $organicSearches =new Google_Service_AnalyticsReporting_Metric();\r\n // $organicSearches->setExpression(\"ga:organicSearches\");\r\n // $organicSearches->setAlias(\"organicSearches\");\r\n\r\n\r\n\r\n//Create the Dimensions object.\r\n$socialActivityContentUrl = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialActivityContentUrl->setName(\"ga:socialActivityContentUrl\");\r\n\r\n\r\n\r\n\r\n // Create the ReportRequest object.\r\n $request = new Google_Service_AnalyticsReporting_ReportRequest();\r\n $request->setViewId($VIEW_ID);\r\n $request->setDateRanges($dateRange);\r\n $request->setDimensions(array($socialActivityContentUrl));\r\n // $request->setMetrics(array($organicSearches));\r\n\r\n $body = new Google_Service_AnalyticsReporting_GetReportsRequest();\r\n $body->setReportRequests( array( $request) );\r\n return $analytics->reports->batchGet( $body );\r\n}", "title": "" }, { "docid": "d5d411214afb53e1104c24c3f25b4e18", "score": "0.49611974", "text": "function getStats() {\n\n }", "title": "" }, { "docid": "bfec8814117202a7cd6b9bd365e49cfd", "score": "0.4946994", "text": "public function getApiData();", "title": "" }, { "docid": "5385519b69d25ad5a1cdad3f01156aca", "score": "0.49413905", "text": "public function actionGetDashboardMetrics() {\n $metrics = array(\n 'cpu' => $this->getCpuUsage(),\n 'mem' => $this->getUsedMem(),\n 'disk' => $this->getUsedDiskSpace(),\n );\n \n echo CJSON::encode($metrics);\n }", "title": "" }, { "docid": "4100efb002ba73316050ce5b63df80d3", "score": "0.49217972", "text": "public function statistics(CampaignStatisticsRequest $request)\n {\n $request = $request->all();\n $campaign_ids = $request['campaign_ids'];\n $result = $this->campaignService->getStatistics($campaign_ids);\n return $result;\n }", "title": "" }, { "docid": "f61105e60ded372b5949d986abfbafd8", "score": "0.48932558", "text": "public function getCampaignBudgetResult()\n {\n return $this->readOneof(8);\n }", "title": "" }, { "docid": "44e6aa108acc0feade17676d8ab4431a", "score": "0.4878367", "text": "public function get_statistics($id);", "title": "" }, { "docid": "42d2ab5af5598a766038d5c900cd7199", "score": "0.48700842", "text": "public function getCpaAttribute()\n {\n $cpa = 0;\n\n foreach( $this->metrics as $metric )\n {\n $cpa = $cpa + $metric['cost_per_total_action'];\n }\n\n return $cpa;\n }", "title": "" }, { "docid": "ded564c0ca5f70a9fe5fae23eeeb1c45", "score": "0.486727", "text": "public function getAd()\n {\n return $this->ad;\n }", "title": "" }, { "docid": "711bc543270e700b0f27a1baa41fb4dc", "score": "0.48671654", "text": "public static function getStatsData(){\r\n\r\n\t\t$searches = array( '[user_id]', '[api_key]' );\r\n\t\t$replaces = array( \r\n\t\t\tget_option( OPTIONS_USER_ID ), \r\n\t\t\tget_option( OPTIONS_API_KEY ) \r\n\t\t);\r\n\t\t\r\n\t\t$url = str_replace( $searches, $replaces, GALAXY_ZOO_STATS_URL );\r\n\t\t$xmlData = DataManager::requestData( $url );\r\n\t\t\r\n\t\t$data = FALSE;\r\n\t\ttry {\r\n\t\t\t$data = @simplexml_load_string( $xmlData );\r\n\t\t}\r\n\t\tcatch( Exception $e ){};\r\n\t\t\r\n\t\treturn $data;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "55cc183223d0d58a435be78c91c7946b", "score": "0.48669446", "text": "public function getData($profileId, $metric, $from, $until, $dimension = 'date') {\n // for the last 14 days.\n return $this->service->data_ga->get(\n 'ga:' . $profileId,\n $from,\n $until,\n 'ga:' . $metric,\n array('dimensions' => 'ga:' . $dimension)\n );\n }", "title": "" }, { "docid": "1a050800df6f4fc0af8981bf0c59e7c4", "score": "0.48409355", "text": "function getCampaignsAdgroups($token,$ClientID,$cid){\n\t$user = new AdWordsUser();\n\tPrevInitAdwordsUserSettings($user);\n\t$campains = array();\n\tif(LoadAdWordsAccessTokenForClient($user, $token) ){ \n\t\t$user->SetClientCustomerId($ClientID); \n\t\t\n\t\t$reportQuery = 'SELECT AdGroupId,AdGroupName FROM ADGROUP_PERFORMANCE_REPORT '\n . 'WHERE CampaignId = '.$cid.' AND AdGroupStatus = ENABLED';\n\n\t\t$options = array('version' => ADWORDS_VERSION);\n\t\t$name = 'c'.time().'.csv';\n\t\t$filePath = $_SERVER['DOCUMENT_ROOT'].'/admetric/csv/'.$name;\n\t\t$reportFormat = 'CSV';\n\t\t$filePath = NULL;\n\t\t$reportData = ReportUtils::DownloadReportWithAwql($reportQuery, $filePath, $user,\n\t\t$reportFormat, $options);\n\t\t$i=1;\n\t\t$Data = str_getcsv($reportData, \"\\n\");\n\t\t\n\t\tforeach($Data as &$Row){\n\t\t\t$Row = str_getcsv($Row, \",\");\n\t\t \tif($i>2){\n\t\t\t\t$newArr = array();\n\t\t\t\t$newArr['id'] = $Row[0];\n\t\t\t\t$newArr['name'] = $Row[1];\n\t\t\t\t$newArr['a'] = $ClientID;\n\t\t\t\t$newArr['c'] = $cid;\n\t\t\t\t$campains[] = $newArr;\n\t\t\t\t\n\t\t\t}\n\t\t\t$i++;\n\t\t }\n\t\t}\n\t$in = (count($campains)-1);\n\tunset($campains[$in]);\n\t/*echo ((round(microtime(true) * 1000))-$current).'<br>';\n\techo '<pre>';\n\tprint_r($campains);exit;*/ \n\t//unset($campains[($in-1)]);\n\treturn $campains;\n}", "title": "" }, { "docid": "eca69915398929b859f0f962999aa69a", "score": "0.48379657", "text": "public function callMethods(){ \n $this->queryAdInsights();\n $this->setFields();\n $this->setAdInsightsArray();\n $this->getAdInsightsArray();\n // $this->setAdDates();\n }", "title": "" }, { "docid": "08acd9bae5888bd206110969f8f69b5d", "score": "0.4837826", "text": "public function getMeasures(){\n try{\n $measures = DB::table('unidad_medidas')->select('*')->get();\n if(count($measures)>0)\n $response = Response::json($measures, 200, [], JSON_NUMERIC_CHECK);\n else\n $response = Response::json(['message' => 'Record not found'], 204);\n }\n catch (Illuminate\\Database\\QueryException $e) {\n dd($e);\n } catch (PDOException $e) {\n dd($e);\n }\n return $response; \n }", "title": "" }, { "docid": "84d5ef5d359286da59c738b624dd1ddb", "score": "0.48367614", "text": "public function getData($ocqQuery)\r\n\t{\r\n\t\t$measures = $ocqQuery->measures;\r\n\t\t$dimensions = $ocqQuery->dimensions;\r\n\t\t$filters = $ocqQuery->filters;\r\n\r\n\t\t$ret = array();\r\n\r\n\t\t// count is always included\r\n\t\tif (!isset($measures['count']))\r\n\t\t\t$measures['count'] = \"sum\";\r\n\r\n\t\t$where = $this->buildSliceQuery($filters);\r\n\t\t$query = \"SELECT * FROM facts_\".$this->id;\r\n\t\t// Do a join to get foreign keys\r\n\t\t// TODO: join foreign values here in [fielname]_val\r\n\t\t// this will also make it easy to format timestamps\r\n\t\tif ($where)\r\n\t\t\t$query .= \" WHERE $where\";\r\n\r\n\t\t// Loop through the results and summarize them\r\n\t\t// Should we be doing this in the database instead?\r\n\t\t// Right now I'd rather put the load on the client than the database, that may change\r\n\t\t// as the dataset grows though\r\n\t\t$result = $this->dbh->Query($query);\r\n\t\tfor ($i = 0; $i < $this->dbh->GetNumberRows($result); $i++)\r\n\t\t{\r\n\t\t\t$row = $this->dbh->GetRow($result, $i);\r\n\r\n\t\t\tforeach ($measures as $mname=>$magg)\r\n\t\t\t{\r\n\t\t\t\t$meas = $this->getMeasure($mname, false);\r\n\r\n\t\t\t\t// If no dimensions then just populate measures\r\n\t\t\t\tif (!count($dimensions) && $meas)\r\n\t\t\t\t{\r\n\t\t\t\t\t$ret[$mname] = $this->aggregateValue($row['m_' . $meas->id], $ret[$mname], $magg);\r\n\t\t\t\t}\r\n\t\t\t\telse if ($meas)\r\n\t\t\t\t{\r\n // dimension 1\r\n $dim1 = $this->getDimension($dimensions[0]['name']);\r\n $d1val = $this->getDimensionValFromKey($dim1->name, $row[\"dim_\".$dim1->id], $dimensions[0]['fun']);\r\n \r\n if(!isset($ret[$d1val]))\r\n {\r\n $ret[$d1val] = array();\r\n $ret[$d1val]['count'] = 0;\r\n }\r\n else if(!is_array($ret[$d1val]))\r\n {\r\n $ret[$d1val] = array();\r\n $ret[$d1val]['count'] = 0;\r\n }\r\n \r\n\t\t\t\t\tif(count($dimensions) == 2)\r\n\t\t\t\t\t{\r\n // dimension 2\r\n\t\t\t\t\t\t$dim2 = $this->getDimension($dimensions[1]['name']);\r\n\t\t\t\t\t\t$d2val = $this->getDimensionValFromKey($dim2->name, $row[\"dim_\".$dim2->id], $dimensions[1]['fun']);\r\n \t\t\t\t\t\t\r\n\t\t\t\t\t\tif (!is_array($ret[$d1val][$d2val]))\r\n\t\t\t\t\t\t{\r\n $ret[$d1val][$d2val] = array();\r\n $ret[$d1val][$d2val]['count'] = 0;\r\n unset($ret[$d1val]['count']);\r\n }\r\n \r\n $ret[$d1val][$d2val]['count']++;\r\n\t\t\t\t\t\t$ret[$d1val][$d2val][$mname] = $this->aggregateValue($row['m_' . $meas->id], $ret[$d1val][$d2val][$mname], $magg);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (count($dimensions) == 1)\r\n\t\t\t\t\t{\r\n $dimMeasVal = null;\r\n if(isset($ret[$d1val][$mname]))\r\n $dimMeasVal = $ret[$d1val][$mname];\r\n \r\n\t\t\t\t\t\t$ret[$d1val]['count']++;\r\n\t\t\t\t\t\t$ret[$d1val][$mname] = $this->aggregateValue($row['m_' . $meas->id], $dimMeasVal, $magg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->dbh->FreeResults($result); // keep it clean and small\r\n\r\n\t\t// Now handle avg\r\n\t\tforeach ($measures as $mname=>$magg)\r\n\t\t{\r\n\t\t\tif ($magg != \"avg\")\r\n\t\t\t\tcontinue; // skip\r\n\r\n\t\t\t$meas = $this->getMeasure($mname, false);\r\n\r\n\t\t\t// If no dimensions then just populate measures\r\n\t\t\tif (!count($dimensions) && $meas)\r\n\t\t\t{\r\n $ret[\"count\"] = $i;\r\n\t\t\t\t$ret[$mname] = $ret[$mname] / $ret[\"count\"];\r\n\t\t\t}\r\n\t\t\telse if ($meas)\r\n\t\t\t{\r\n\t\t\t\tif (count($dimensions) == 2)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($ret as $dim1name=>$dim1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach ($dim1 as $dim2name=>$dim2)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$ret[$dim1name][$dim2name][$mname] = $dim2[$mname] / $dim2[\"count\"];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if (count($dimensions) == 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($ret as $dim1name=>$dim1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$ret[$dim1name][$mname] = $dim1[$mname] / $dim1[\"count\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "86d9fa591436a7b36804362545bfc43a", "score": "0.48339605", "text": "public function getCampaignSummary()\n\t\t{\n\t\t\treturn $this->campaign_summary;\n\t\t}", "title": "" }, { "docid": "1109403c47a75cc1ae830d7b24dce4ed", "score": "0.482995", "text": "protected function doGetStats()\n {\n // Not possible, as of yet\n }", "title": "" }, { "docid": "6e25b4e818cd490e3eefaabb88bd670d", "score": "0.48182875", "text": "abstract public function fetchMetadata();", "title": "" }, { "docid": "e2bf58f55f8ced8a1403b7ac83da59c0", "score": "0.48133272", "text": "function gettrafficsources($analytics) {\r\n $VIEW_ID = \"207950363\";\r\n\r\n // Create the DateRange object.\r\n $dateRange = new Google_Service_AnalyticsReporting_DateRange();\r\n $dateRange->setStartDate(\"2019-07-01\");\r\n $dateRange->setEndDate(\"today\");\r\n\r\n // Create the Metrics object.\r\n\r\n $organicSearches =new Google_Service_AnalyticsReporting_Metric();\r\n $organicSearches->setExpression(\"ga:organicSearches\");\r\n $organicSearches->setAlias(\"organicSearches\");\r\n\r\n\r\n\r\n//Create the Dimensions object.\r\n$referralPath = new Google_Service_AnalyticsReporting_Dimension();\r\n$referralPath->setName(\"ga:referralPath\");\r\n\r\n$source = new Google_Service_AnalyticsReporting_Dimension();\r\n$source->setName(\"ga:source\");\r\n\r\n$medium = new Google_Service_AnalyticsReporting_Dimension();\r\n$medium->setName(\"ga:medium\");\r\n\r\n$sourceMedium = new Google_Service_AnalyticsReporting_Dimension();\r\n$sourceMedium->setName(\"ga:sourceMedium\");\r\n\r\n$keyword = new Google_Service_AnalyticsReporting_Dimension();\r\n$keyword->setName(\"ga:keyword\");\r\n\r\n$adContent = new Google_Service_AnalyticsReporting_Dimension();\r\n$adContent->setName(\"ga:adContent\");\r\n\r\n$socialNetwork = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialNetwork->setName(\"ga:socialNetwork\");\r\n\r\n$hasSocialSourceReferral = new Google_Service_AnalyticsReporting_Dimension();\r\n$hasSocialSourceReferral->setName(\"ga:hasSocialSourceReferral\");\r\n\r\n\r\n\r\n // Create the ReportRequest object.\r\n $request = new Google_Service_AnalyticsReporting_ReportRequest();\r\n $request->setViewId($VIEW_ID);\r\n $request->setDateRanges($dateRange);\r\n $request->setDimensions(array($referralPath,$source,$medium,$sourceMedium,$keyword,$adContent,$socialNetwork,$hasSocialSourceReferral));\r\n $request->setMetrics(array($organicSearches));\r\n\r\n $body = new Google_Service_AnalyticsReporting_GetReportsRequest();\r\n $body->setReportRequests( array( $request) );\r\n return $analytics->reports->batchGet( $body );\r\n}", "title": "" }, { "docid": "b77a0aa96411709a3f7713824adf4e72", "score": "0.48121405", "text": "public function getDetailValueAttribute() \n {\n return Datasource::find($this->datasource_id)->CacheDatasourceStats->last()->getDotValue($this->detail);\n }", "title": "" }, { "docid": "73539234c30cada66b5f2dcfd2f0d0c5", "score": "0.4810997", "text": "private function query($metric)\n {\n //make sure parameters are set properly\n\n $apiKey = ($this->platform == PLATFORM_IOS)?FLURRY_API_KEY_IOS:FLURRY_API_KEY_ANDROID;\n\n //create a unique hash for this particular call, just aggregate the parameters for this particular\n //call to create an \"ID\" for this report\n $hash = md5($this->platform .$this->startDate . $this->endDate . $this->version . $this->country . $this->groupBy);\n\n //if the cache did not expire and we have data stored, just return it without\n //having to make a network call to the API\n if(\n time() < $_SESSION['query'][$metric][$hash]['TTL'] &&\n isset($_SESSION['query'][$metric][$hash]['data']))\n return $_SESSION['query'][$metric][$hash]['data'];\n\n //if the cache expired and we have data, lets remove it so we can\n //make a fresh call and repopulate with fresh data\n if(isset($_SESSION['query'][$metric][$hash])) unset($_SESSION['query'][$metric][$hash]);\n\n //lets setup the parameters for the query\n $query_params = array(\n 'METRIC_NAME'=>$metric,\n 'APIACCESSCODE'=>FLURRY_ACCESS_CODE,\n 'APIKEY'=>$apiKey,\n 'STARTDATE'=>$this->startDate,\n 'ENDDATE'=>$this->endDate,\n 'COUNTRY'=>$this->country,\n 'VERSIONNAME'=>$this->version,\n 'GROUPBY'=>$this->groupBy\n );\n\n //FLURRY_API_URL contains the URL call with dummy place holders for params\n $query = FLURRY_API_URL;\n\n //lets iterate through the dummy parameters and replace them with our\n //parameters above\n foreach($query_params as $param=> $key)\n {\n $query = str_replace($param,$key,$query);\n }\n\n //initialize a new curl instance and make the call\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$query);\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\n //lets decode the JSON and turn it into an associative array\n $result = json_decode(curl_exec($ch),true);\n\n //lets store our results into the session cache\n $_SESSION['query'][$metric][$hash]['data'] = $result;\n\n //lets create a new expiry for this result so we can cache it until then\n $_SESSION['query'][$metric][$hash]['TTL'] = time() + QUERY_TTL;\n\n //return the results back to the requesting method of this class\n return $result;\n }", "title": "" }, { "docid": "95e5a4aaab954ccbaf309a18dd7e505c", "score": "0.47988036", "text": "public function getGoogleAnalytics()\n {\n return $this->google_analytics;\n }", "title": "" }, { "docid": "b1037c28b0ba2cc1bf75a0154a2b3d72", "score": "0.47961068", "text": "public function __invoke() {\n\t\ttry {\n\n\t\t\t$this->loggedin_user_id = $_SESSION['user']['id'];\n\n\t\t\t// chart preparation date range\n\t\t\tif ((!array_key_exists('analytics_from', $_SESSION) || $_SESSION['analytics_from'] != '') && (!array_key_exists('analytics_to', $_SESSION) || $_SESSION['analytics_to'] != '')) {\n\t\t\t\t$from = date(\"Y-m-d\", strtotime(date(\"Y-m-d\", strtotime(date(\"Y-m-d\"))) . \"-1 month\"));\n\t\t\t\t$to = date('Y-m-d');\n\t\t\t\t$_SESSION['analytics_from'] = $from;\n\t\t\t\t$_SESSION['analytics_to'] = $to;\n\t\t\t}\n\n\t\t\t// calling analytics data default 1 month date range\n\t\t\t$analytics = new Analyticssuper($this->dbConn, $_SESSION['analytics_from'], $_SESSION['analytics_to']);\n\t\t\t$result = $analytics->getDashboardDetails();\n\t\t\t// p($result); exit;\n\t\t\t$no_of_contacts = isset($result['contacts']) ? $result['contacts'] : 0;\n\t\t\t$no_of_active_deals = isset($result['active_deals']['total']) ? $result['active_deals']['total'] : 0; // as total also a index/row\n\t\t\t$total_value_of_active_deals = isset($result['active_deals']['total_value']) ? number_format($result['active_deals']['total_value'], 2) : 0;\n\t\t\t$no_of_won_deals = isset($result['won_deals']['total']) ? $result['won_deals']['total'] : 0;\n\t\t\t$won_deals_value = $no_of_won_deals > 0 ? number_format($result['won_deals']['total_value'], 2) : 0;\n\t\t\t$avg_won_deals_value = $no_of_won_deals > 0 ? number_format($result['won_deals']['avg'], 2) : 0;\n\t\t\t$no_of_lost_deals = $result['lost_deals']['total'];\n\t\t\t$lost_deal_value = $no_of_lost_deals > 0 ? number_format($result['lost_deals']['total_value']) : 0;\n\t\t\t$avg_own_deals = $result['avg_own_deals'];\n\t\t\t$avg_sales_cycle = round($result['avg_sales_cycle']);\n\t\t\t$conversion_rate = $result['conversion_rate'];\n\t\t\t$contacts_bulk_uploaded = $result['contacts_bulk_uploaded'];\n\t\t\t$google_calendar_push = $result['google_calendar_push'];\n\t\t\t$task_to_do = $result['tasks_to_do'];\n\t\t\t$task_completed = $result['tasks_completed'];\n\t\t\t$task_completed = $result['tasks_completed'];\n\t\t\t$all_task_to_do_total = 0;\n\t\t\t$all_task_completed_total = 0;\n\t\t\t$task_completed_email = 0;\n\t\t\t$task_completed_phone = 0;\n\t\t\t$task_completed_meeting = 0;\n\t\t\t$task_completed_task = 0;\n\n\t\t\tif (!empty($task_to_do)) {\n\t\t\t\t$all_task_to_do_total = $task_to_do['all_total'];\n\t\t\t}\n\n\t\t\tif (!empty($task_completed)) {\n\t\t\t\t$all_task_completed_total = $task_completed['all_total'];\n\t\t\t\t// for each type of task completed as total\n\t\t\t\tforeach ($task_completed as $task) {\n\t\t\t\t\tswitch ($task['description']) {\n\t\t\t\t\tcase 'Email':\n\t\t\t\t\t\t$task_completed_email = $task['total'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Phone':\n\t\t\t\t\t\t$task_completed_phone = $task['total'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Meeting':\n\t\t\t\t\t\t$task_completed_meeting = $task['total'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$task_completed_task = $task['total'];\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$response = $this->twig->render('admin/super/pipeline.html.twig', ['uri' => $_SERVER['REQUEST_URI'], 'session_user' => isset($_SESSION['user']) ? $_SESSION['user'] : [], 'admin_to_go' => $this->admin_to_go, 'link' => $this->link, 'nav_link' => $this->nav_link, 'key' => $_SESSION['csrf'], 'user_token' => $_SESSION['user_token'], 'currency' => $this->currency, 'no_of_contacts' => $no_of_contacts, 'no_of_active_deals' => $no_of_active_deals, 'no_of_won_deals' => $no_of_won_deals, 'no_of_lost_deals' => $no_of_lost_deals, 'todo_descs' => $this->todo_descs, 'deals' => $this->deals, 'countries' => $this->countries, 'stage' => $this->stage, 'stages' => $this->stages, 'duration_select' => $this->duration_select, 'owner' => $this->owner, 'from' => $_SESSION['analytics_from'], 'to' => $_SESSION['analytics_to'], 'google_auth_url' => $this->google_auth_url, 'header_totals' => $this->header_totals, 'avg_own_deals' => $avg_own_deals, 'avg_sales_cycle' => $avg_sales_cycle, 'total_value_of_active_deals' => $total_value_of_active_deals, 'won_deals_value' => $won_deals_value, 'avg_won_deals_value' => $avg_won_deals_value, 'conversion_rate' => $conversion_rate, 'lost_deal_value' => $lost_deal_value, 'no_of_tasks_to_do' => $all_task_to_do_total, 'task_completed' => $task_completed, 'no_of_tasks' => $all_task_completed_total, 'task_completed_email' => $task_completed_email, 'task_completed_meeting' => $task_completed_meeting, 'task_completed_task' => $task_completed_task, 'task_completed_phone' => $task_completed_phone, 'contacts_bulk_uploaded' => $contacts_bulk_uploaded, 'google_calendar_push' => $google_calendar_push]);\n\n\t\t\treturn $response;\n\t\t} catch (\\Exception $exception) {\n\t\t\t$this->misc->log('Manager ' . __METHOD__, $exception);\n\t\t}\n\t}", "title": "" }, { "docid": "a032ddfd7af480f020d6ab1141538ce7", "score": "0.47950417", "text": "public static function detailedCampaignStats($campaign_id, $from = '', $to = '', $start = 0, $length = 10, $order = [ 0 => [ 'column' => 4, 'dir' => 'desc']]) {\n// if ( !$return ) {\n // make some predefined date if they are empty\n if (empty($from)) {\n $from = '-30 Days';\n }\n if (empty($to)) {\n $to = '';\n }\n // format those dates so they inlude some final time stamp and if equa add +-1 day so the graph will look normal\n\n if ($from == $to) {\n $begin = new \\DateTime(date('Y-m-d', strtotime($from . ' -1 day')) . ' 00:00:00', new \\DateTimeZone('America/New_York'));\n $end = new \\DateTime(date('Y-m-d', strtotime($to . ' +1 day')) . ' 23:59:59', new \\DateTimeZone('America/New_York'));\n } else {\n $begin = new \\DateTime(date('Y-m-d', strtotime($from)) . ' 00:00:00', new \\DateTimeZone('America/New_York'));\n $end = new \\DateTime(date('Y-m-d', strtotime($to)) . ' 23:59:59', new \\DateTimeZone('America/New_York'));\n }\n // make the datatables order readable\n $order_by = 'created_at';\n $order_directon = 'desc';\n switch ($order[0]['column']) {\n case 0:\n $order_by = 'created_at';\n break;\n case 1:\n $order_by = 'label';\n break;\n case 2:\n $order_by = 'name';\n break;\n case 3:\n $order_by = 'referer';\n break;\n case 4:\n default:\n $order_by = 'created_at';\n break;\n }\n if ($order[0]['dir'] == 'asc') {\n $order_directon = 'asc';\n }\n\n // pull from mongo all the needed data\n $all_data = static::where('campaign_id', intval($campaign_id))->\n whereBetween('created_at', [\n new \\MongoDate(strtotime($begin->format('d-m-Y H:i:s'))),\n new \\MongoDate(strtotime($end->format('d-m-Y H:i:s')))\n ]\n )->orderBy($order_by, $order_directon)->get();\n\n\n // predefine some standard format stuff\n $return = [\n 'data' => [],\n 'graph' => [ 'labels' => [], 'datasets' => []],\n 'summary' => [],\n 'draw' => \\Input::get('draw'),\n 'recordsTotal' => $all_data->count(),\n 'recordsFiltered' => $all_data->count()\n ];\n // predefine some needed arrays\n $graph_raw = [];\n $templates = [];\n $diff_templates = [];\n $template_name_array = [];\n\n // fill the array of labels for the graph ( X coordinate )\n $interval = \\DateInterval::createFromDateString('1 day');\n $period = new \\DatePeriod($begin, $interval, $end);\n $graph_data_pd = [];\n foreach ($period as $dt) {\n $return['graph']['labels'][] = date('m-d-Y', strtotime($dt->format(\"Y-m-d\")));\n $graph_data_pd[strtotime($dt->format(\"Y-m-d\"))] = 0;\n }\n\n foreach ($all_data as $record) {\n// if ( $record->event == 'navigate' ) {\n $graph_raw[$record->template] = $graph_data_pd;\n// }\n $diff_templates[] = $record->template;\n\n// $graph_raw[ $record->template ][ strtotime( date( 'Y-m-d', strtotime( $record->created_at ) ) ) ] = 0;\n }\n //get all diferent templates used because joining mongo and mysql can not work\n\n $usedTemplates = UserTemplates::whereIn('id', $diff_templates)->get();\n foreach ($usedTemplates as $ut) {\n $template_name_array[$ut->id] = $ut->name;\n }\n // frst pass trough saved events\n $sc = 0;\n $lc = 0;\n\n $unique = [];\n\n foreach ($all_data as $record) {\n $row = [];\n // make the event look nicer\n switch ($record->event) {\n case 'page_open':\n $row['event'] = 'Landed';\n break;\n case 'navigate':\n if ($record->label == 'out') {\n $row['event'] = 'Exit';\n } elseif ($record->label == 'mailto') {\n $row['event'] = 'Open Email';\n } else {\n $row['event'] = '';\n }\n break;\n case 'read':\n $row['event'] = 'read the page';\n break;\n case 'optin':\n $row['event'] = 'Optin';\n break;\n case 'pixel':\n $row['event'] = 'Conversion';\n break;\n }\n\n $row['link_text'] = ( $record->event == 'page_open' ) ? ( '' ) : ( $record->name );\n $row['time'] = date('Y-m-d H:i:s', strtotime($record->created_at));\n $row['template_id'] = $record->template;\n $row['from'] = $record->referer;\n $row['name'] = ( isset($template_name_array[$record->template]) ) ? ( $template_name_array[$record->template] ) : ( '' );\n\n //$row['debug'] = $record; // TODO: delete this line\n\n if ($sc >= $start && $lc <= $length) {\n $lc = $lc + 1;\n $return['data'][] = $row;\n }\n\n // add all Optin events to the graph data\n if($row['event'] == 'Optin') {\n $graph_raw[$record->template][strtotime(date('Y-m-d', strtotime($record->created_at)))] += 1;\n }\n\n // collect summary data for the template: impressions, clicks, opt-ins, and conversions\n if(!isset($return['summary'][$record->template]))\n {\n $pixel_url = route('get_pixel', ['user_template_id'=>$record->template]);\n //$pixel_img = htmlspecialchars(\"<img src='\".$pixel_url.\"'>\");\n $return['summary'][$record->template] = [\n 'name' => $row['name'],\n 'id' => $record->template,\n 'pixel_url' => $pixel_url,\n 'total_events' => 0, // ?\n 'total_out' => 0, // ?\n 'read_page' => 0, // ?\n 'total_unique' => 0,\n 'total_opened' => 0, // \"Landed\", impressions\n 'total_mailto' => 0, // \"Open Email\", clicks\n 'click_percent' => 0, // (total_mailto / total_opened) NOTE: this is NOT a count of pixel hits\n 'total_optin' => 0,\n 'optin_percent' => 0, // (total_optin / total_opened)\n 'total_pixel' => 0,\n 'pixel_percent' => 0, // (total_pixel / total_opened)\n ];\n $unique[$record->template] = [];\n }\n\n if (!isset($unique[$record->template][md5($record->id_address . date('y-m-d', strtotime($record->created_at)))])) {\n $unique[$record->template][md5($record->id_address . date('y-m-d', strtotime($record->created_at)))] = 1;\n }\n\n if($record->event != 'page_open' && $record->event != 'read')\n {\n $return['summary'][$record->template]['total_events'] += 1;\n }\n\n\n if($record->event == 'page_open')\n {\n $return['summary'][$record->template]['total_opened'] += 1;\n }\n\n if($record->event == 'navigate' && $record->label == 'mailto')\n {\n $return['summary'][$record->template]['total_mailto'] += 1;\n }\n\n if($record->event == 'navigate' && $record->label == 'out')\n {\n $return['summary'][$record->template]['total_out'] += 1;\n }\n\n if($record->event == 'read')\n {\n $return['summary'][$record->template]['read_page'] += 1;\n }\n\n if($record->event == 'optin')\n {\n $return['summary'][$record->template]['total_optin'] += 1;\n }\n\n if($record->event == 'pixel')\n {\n $return['summary'][$record->template]['total_pixel'] += 1;\n }\n\n // calculate percentages of visitors\n if ($return['summary'][$record->template]['total_opened'] > 0)\n {\n $return['summary'][$record->template]['click_percent'] = ( round($return['summary'][$record->template]['total_mailto'] / $return['summary'][$record->template]['total_opened'], 3) * 100 ) . '%';\n\n $return['summary'][$record->template]['optin_percent'] = ( round($return['summary'][$record->template]['total_optin'] / $return['summary'][$record->template]['total_opened'], 3) * 100 ) . '%';\n\n $return['summary'][$record->template]['pixel_percent'] = ( round($return['summary'][$record->template]['total_pixel'] / $return['summary'][$record->template]['total_opened'], 3) * 100 ) . '%';\n }\n\n /*\n if (isset($return['summary'][$record->template]['total_events'])) {\n $return['summary'][$record->template]['total_events'] += 1;\n } else {\n $return['summary'][$record->template]['total_events'] = 1;\n }\n */\n\n $sc = $sc + 1;\n }\n\n foreach($unique as $template => $items)\n {\n $return['summary'][$template]['total_unique'] = count($items);\n }\n\n $return['summary'] = array_values($return['summary']); // re-index array from 0\n //$return['recordsTotal'] = count($return['summary']->count());\n //$return['recordsFiltered'] = count($return['summary']);\n\n// sort( $graph_raw[ $record->template ] );\n// get the other part of graph data\n // \\Clockwork::info( $graph_raw );\n foreach ($graph_raw as $tid => $tv) {\n $color = rand(0, 360) . ',60%,70%';\n $finaldata = [\n 'label' => 'Removed template',\n 'fillColor' => 'hsla(' . $color . ',0.2)',\n 'strokeColor' => 'hsla(' . $color . ',0.5)',\n 'pointColor' => 'hsla(' . $color . ',1)',\n 'pointStrokeColor' => 'hsla(' . $color . ',1)',\n 'pointHighlightFill' => 'hsla(' . $color . ',1)',\n 'pointHighlightStroke' => 'hsla(' . $color . ',1)',\n 'data' => array_values($tv),\n ];\n foreach ($usedTemplates as $usedTemplate) {\n if ($usedTemplate->id == $tid) {\n $finaldata['label'] = $usedTemplate->name;\n }\n }\n $return['graph']['datasets'][] = $finaldata;\n }\n // Generate statistic summary\n //$data[ 'summary' ] = static::getMultiBasicInfo( $campaign_id );\n\n $expiresAt = Carbon::now()->addMinutes(5);\n\n// Cache::store( 'memcached' )->put( 'singlecampaigndata_' . join( '_', $campaign_id ), $return, $expiresAt );\n// }\n return $return;\n }", "title": "" }, { "docid": "ee4457ba935e70622a1aeac19bfd8860", "score": "0.47906294", "text": "public function getItemMetrics($value)\n {\n $componentLoader = new MIDAS_ComponentLoader();\n $itemmetricComponent = $componentLoader->loadComponent('ItemMetric', 'batchmake');\n return $itemmetricComponent->getMetrics();\n }", "title": "" }, { "docid": "38faafa610e9c26291fd386e028b7f81", "score": "0.47902182", "text": "public function actionGetsquibkeydata() {\n $id = $_GET['id'];\n $campaigns = Campaign::find()->select(['id'])->where(['user_id' => $id])->asArray()->all();\n $campaign_ids = array_column($campaigns, 'id');\n\n if (isset($_GET['load']) && $_GET['load'] == 'init') {\n for ($i = 300; $i > 0; $i--) {\n $visitorsCount[] = Visitor::find()->where(['campaign_id' => $campaign_ids])->andWhere(\"UNIX_TIMESTAMP(last_visited) >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL $i SECOND))\")->count();\n }\n $this->setHeader(200);\n return json_encode(array('status' => 1, 'data' => $visitorsCount, JSON_PRETTY_PRINT));\n } else {\n $visitorCount = Visitor::find()->where(['campaign_id' => $campaign_ids])->andWhere(\"UNIX_TIMESTAMP(last_visited) >= UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 300 SECOND))\")->count();\n $this->setHeader(200);\n return json_encode(array('status' => 1, 'data' => (int) $visitorCount, JSON_PRETTY_PRINT));\n }\n }", "title": "" }, { "docid": "7d6dd6a182734b867aadf63378b07679", "score": "0.4785936", "text": "function GetTextAdsDataFromReportExVedio(AdWordsUser &$user, $CurClientID,$StartDate, $EndDate)\n\n{ \n \n $PredicatesArray = array(); \n\n /*if($AdGroupIDs != null && count($AdGroupIDs) > 0)\n\n array_push($PredicatesArray, new Predicate('AdGroupId', 'IN', $AdGroupIDs)); */\n\n $date = date('Y-m-d',strtotime('-1 day'));\n array_push($PredicatesArray, new Predicate('CampaignStatus', 'EQUALS', 'ENABLED')); \n array_push($PredicatesArray, new Predicate('AdGroupStatus', 'EQUALS', 'ENABLED')); \n array_push($PredicatesArray, new Predicate('CreativeStatus', 'EQUALS', 'ENABLED')); \n\n \n\n /*if($CampaignIDs != null && count($CampaignIDs) > 0)\n\n array_push($PredicatesArray, new Predicate('CampaignId', 'IN', $CampaignIDs));*/ \n\n \n\n /* if($ConvCount > 0) \n\n array_push($PredicatesArray, new Predicate('ConvertedClicks', 'GREATER_THAN_EQUALS', (float)$ConvCount )); \n*/\n //else\n\n // array_push($PredicatesArray, new Predicate('Cost', 'GREATER_THAN_EQUALS', 1)); \n\n \n\n \n \n return GetCampaignsData_through_AdHoc_ReportsEx($user, $CurClientID,\n\n 'VIDEO_PERFORMANCE_REPORT', \n\n 'Video Performance Report ',\n\n array('Date','CreativeStatus','CreativeId','CampaignId','CampaignName','AdGroupName','Ctr', 'Cost', 'Clicks','Impressions','Engagements','EngagementRate'), \n\n $StartDate,\n\n $EndDate,\n\n $PredicatesArray); \n\n}", "title": "" }, { "docid": "612c51869b968bdc4c481cbe72e8fec2", "score": "0.47799337", "text": "public function getBannerCampaigns() {\n return $this->_aBannerCampaigns;\n }", "title": "" }, { "docid": "112280da9aa175f13fdab455bf75720e", "score": "0.47725222", "text": "public function getStats() {\n if (empty($this->data))\n return $this;\n\n $db = DB::getInstance();\n\n $uids = $this->filter('id');\n\n $query = '\n SELECT i.id, COUNT(i.mid) AS messages,\n SUM(i.count) AS responses, g.groups\n FROM (\n SELECT m.id AS mid, m.sender_id AS id,\n COUNT(m.id) AS count\n FROM messages m\n LEFT\n JOIN responses r \n ON r.message_id = m.id\n WHERE m.sender_id IN (#uids#)\n GROUP\n BY (m.id)\n ) AS i\n LEFT\n JOIN (\n SELECT COUNT(gm.user_id) AS groups, gm.user_id AS id\n FROM group_members gm\n WHERE gm.user_id IN (#uids#)\n GROUP\n BY gm.user_id\n ) AS g\n ON g.id = i.id\n GROUP\n BY i.id';\n\n $stats = array();\n $result = $db->query($query, array('uids' => $uids));\n if ($result->num_rows)\n while ($res = $result->fetch_assoc())\n $stats[ intval($res['uid']) ] = array_map('intval', $res);\n\n $this->joinDataById($stats, 'stats', array('messages' => 0, 'responses' => 0, 'groups' => 0));\n\n return $this;\n }", "title": "" }, { "docid": "1747f7cd1930d520c53aae3403f0a2c9", "score": "0.4761903", "text": "public function model()\n {\n return CampaignDailyActivity::class;\n }", "title": "" }, { "docid": "b81c5bbd65af2a9a44d47aa843821781", "score": "0.47605598", "text": "protected function _getData() {\n $helper = Mage::helper('unityreports');\n $db = Mage::getSingleton('unityreports/utils')->getDb();\n\n try {\n $_counters = array(\n 'orders' => 'sales/order',\n 'invoices' => 'sales/invoice',\n 'creditmemos' => 'sales/creditmemo',\n 'customers' => 'customer/entity',\n 'products' => 'catalog/product',\n 'categories' => 'catalog/category',\n );\n foreach ($_counters as $counter => $entity) {\n $data[$counter] = $helper->getTableCount($entity);\n }\n\n //get active categories\n $categories = Mage::getModel('catalog/category')\n ->getResourceCollection()\n ->addAttributeToFilter(\n 'is_active', array('eq' => 1)\n );\n $data['active_categories'] = $categories->count();\n\n //get enabled products\n $products = Mage::getModel('catalog/product')\n ->getResourceCollection()\n ->addAttributeToFilter(\n 'status', array('eq' => Mage_Catalog_Model_Product_Status::STATUS_ENABLED)\n );\n $data['active_products'] = $products->count();\n\n //add counters date\n $data['counters_date'] = date('Y-m-d');\n\n return $data;\n } catch (Exception $ex) {\n $helper->debug($ex, Zend_Log::ERR);\n $helper->debug('FILE: ' . __FILE__ . 'LINE: ' . __LINE__);\n return null;\n }\n }", "title": "" }, { "docid": "bb4f83c9b612159782d72bbe8bd7a0b6", "score": "0.47592282", "text": "public function adsfn_get($limit, $offset) {\n //this query use to limit and order to get\n $ads = $this->Advertisement->ads_get_value($limit, $offset);\n $data = array();\n foreach ($ads as $count => $value):\n $id = $value->ID;\n $image = $this->Advertisement->get_images_byID($id);\n $images = array();\n foreach ($image as $count2 => $value2) {\n// $img = array(\n// 'img'=> $value2->Images,\n// );\n $images[] = $value2->Images;\n }\n $hint = array(\n 'any show' => '0=Hide, 1=Show',\n 'caption_line' => 'Ad Title ',\n 'country_code' => '2 Digit Code ex. IN, US, AU etc.',\n 'pay_status' => 'This ads payment successfully then 1 other wise 0=pending amount',\n 'ads_type' => '0=Free ad, 1=Paid Ad'\n );\n \n //remove html tag in description\n $string_html = $value->Description;\n $description_without = preg_replace('/<[^<|>]+?>/', '', htmlspecialchars_decode($value->Description));\n $description_without = htmlentities($description_without, ENT_QUOTES, \"utf8_general_ci\");\n //video link\n if ($value->Video != NULL && strpos($value->Video, 'http') === false) {\n $value->Video = base_url() . 'uploads/video/' . $value->Video;\n }\n \n if(strpos($value->Video, 'youtube') || strpos($value->Video, 'youtu.be')){\n $youtube = $this->youtubeapi->youtube_link($value->Video);\n// $json_youtube = json_decode($youtube);\n $youtube_get = json_decode($youtube);\n $value->Video = $youtube_get[0]->url;\n }\n $obj = array(\n 'id' => $value->ID,\n 'advertiser_id' => $value->UserID,\n 'category_id' => $value->CategID,\n 'business_name' => $value->BusinessName,\n 'caption_line' => $value->CaptionLine,\n 'keyword' => $value->Keyword,\n 'description' => $description_without,\n 'url1' => $value->Url1,\n 'url1_show' => $value->Url1Show,\n 'url2' => $value->Url2,\n 'url2_show' => $value->Url2Show,\n 'url3' => $value->Url3,\n 'url3_show' => $value->Url3Show,\n 'url4' => $value->Url4,\n 'url4_show' => $value->Url4Show,\n 'url5' => $value->Url5,\n 'url5_show' => $value->Url5Show,\n //'country_code' => $value->CountryCode,\n 'business_address' => $value->BusinessAddress,\n 'business_address_show' => $value->BusinessAddressShow,\n 'landmark' => $value->LandmarkAddress,\n 'landmark_show' => $value->LandmarkAddressShow,\n 'city' => $value->City,\n 'city_show' => $value->CityShow,\n 'state' => $value->State,\n 'state_show' => $value->StateShow,\n 'country' => $value->Country,\n 'country_show' => $value->CountryShow,\n 'post_code' => $value->PostCode,\n 'post_code_show' => $value->PostCodeShow,\n 'email_id' => $value->Email,\n 'email_id_show' => $value->EmailShow,\n 'land_line' => $value->LandLine,\n 'land_line_show' => $value->LandLineShow,\n 'cell_no' => $value->CellNo,\n 'cell_no_show' => $value->CellNoShow,\n 'whatsApp_no' => $value->WhatsAppNo,\n 'whatsApp_no_show' => $value->WhatsAppNoShow,\n 'video' => $value->Video,\n 'pay_status' => $value->PayStatus,\n 'ads_type' => $value->AdsType,\n 'status_id' => $value->StatusID,\n 'created_by' => $value->CreatedBy,\n 'created_date' => $value->CreatedDT,\n 'last_modified_by' => $value->LastModifiedBy,\n 'last_modified_date' => $value->LastModifiedDT,\n 'deleted_by' => $value->DeletedBy,\n 'deleted_date' => $value->DeletedDT,\n 'images' => $images,\n 'Hint' => $hint\n );\n $data[] = $obj;\n endforeach;\n// $data=array(\n// 'limit'=> $limit,\n// 'order'=> $offset\n// );\n\n $this->response([\n 'status' => true,\n 'ads' => $data,\n ], 200);\n }", "title": "" }, { "docid": "e49d1a11b1e581f1c633352b8c47c309", "score": "0.47583562", "text": "public function fetch_campaign_details($campaign_id)\n {\n return $this->get_data('campaigns/' . $campaign_id, [\n 'include' => implode(',', [\n 'benefits',\n 'creator',\n 'goals',\n 'tiers'\n ])\n ]);\n }", "title": "" }, { "docid": "268801373e0a2a6b9fa157154e9a63ff", "score": "0.47576776", "text": "public function registerMetrics(): array;", "title": "" }, { "docid": "efa5c8da27e156ad10f2a057df041242", "score": "0.4754033", "text": "function get_stats() {\n\t\treturn $this->stats;\n\t}", "title": "" }, { "docid": "8255bb81aa25c51ba7cc16b43cf7ea8c", "score": "0.47525564", "text": "public static function get_meta_data($email_campaign_id, $meta_key = '', $single = true)\n {\n return get_metadata('email_campaign', $email_campaign_id, $meta_key, $single);\n }", "title": "" }, { "docid": "f6cad40eff5395539f35850567f59e65", "score": "0.47490737", "text": "public function advertCountGlobal()\n {\n// return $this->hasMany('')\n }", "title": "" }, { "docid": "26aa358e14e57d0939f52749ae8dea5c", "score": "0.47480032", "text": "function getVisitsGraph()\n\t{\n\t\t# Get the value from the database\n\t\t$cached = unserialize(get_option('google_stats_visitsGraph_' . $this->id));\n\t\t$updated = false;\n\n\t\t# Check if the call has been made before\n\t\tif ( is_array($cached) ) {\n\n\t\t\t# Check if the last time called was within two hours, if so, mark to not retrieve and grab the stats array\n\t\t\tif ( $cached['lastcalled'] > ( time() - 7200 ) ) {\n\t\t\t\t$updated = true;\n\t\t\t\t$stats = $cached['stats'];\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t# If the stats need to be updated\n\t\tif ( ! $updated ) {\n\t\t\n\t\t\t# Get the metrics needed to build the visits graph\n\t\t\t$before = date('Y-m-d', strtotime('-31 days'));\n\t\t\t$yesterday = date('Y-m-d', strtotime('-1 day'));\n\t\t\t$stats = $this->api->getMetrics('ga:visits', $before, $yesterday, 'ga:date', 'ga:date');\n\t\t\t\n\t\t\t# Store the serialized stats in the database\n\t\t\t$newStats = serialize(array('stats'=>$stats, 'lastcalled'=>time()));\n\t\t\tupdate_option('google_stats_visitsGraph_' . $this->id, $newStats);\n\t\t\n\t\t}\n\t\t\n\t\t# Create a list of the data points for graphing\n\t\t$data = '';\n\t\t$max = 0;\n\t\t\n\t\t# Check the size of the stats array\n\t\tif ( !isset($stats) || !is_array($stats) || count($stats) <= 0 ) {\n\t\t\t$data = '0,0';\n\t\t} else {\n\t\t\tforeach ( $stats AS $stat ) {\n\t\t\t\t# Verify the number is numeric\n\t\t\t\tif ( is_numeric($stat['ga:visits']) )\n\t\t\t\t\t$data .= $stat['ga:visits'] . ',';\n\t\t\t\telse\n\t\t\t\t\t$data .= '0,';\n\t\t\t\n\t\t\t\t# Update the max value if greater\n\t\t\t\tif ( $max < $stat['ga:visits'] )\n\t\t\t\t\t$max = $stat['ga:visits'];\n\t\t\t}\n\t\t\t\n\t\t\t# Shorten the string to remove the last comma\n\t\t\t$data = substr($data, 0, -1);\n\t\t}\n\t\t\n\t\t# Add a fake stat if need be\n\t\tif ( !isset($stat['ga:visits']) )\n\t\t\t$stat['ga:visits'] = 0;\n\t\t\n\t\t# Output the graph\n\t\techo '<script type=\"text/javascript\">var ga_visits = [' . $data . '];</script>';\n\t\techo '<span class=\"ga_visits\" title=\"' . sprintf(__('The most visits on a single day was %d. Yesterday there were %d visits.', 'google-analyticator'), $max, $stat['ga:visits']) . '\"></span>';\n\t}", "title": "" }, { "docid": "54e6601a32e7a0d570fb4db371532974", "score": "0.47444442", "text": "public function userStats() {\n\t\treturn $this->curl($this->apiURL,\"GET\",NULL);\n\t}", "title": "" }, { "docid": "54e6601a32e7a0d570fb4db371532974", "score": "0.47444442", "text": "public function userStats() {\n\t\treturn $this->curl($this->apiURL,\"GET\",NULL);\n\t}", "title": "" }, { "docid": "ba870a9d95ca4e794594ae6d57f56328", "score": "0.47440144", "text": "public function campaign()\n {\n return $this->belongsTo(Campaign::class);\n }", "title": "" }, { "docid": "49bb52444261082eaa33843cad65d8fc", "score": "0.4736347", "text": "public function availableMetrics()\n {\n return $this->lens()->availableCards($this)\n ->whereInstanceOf(Metric::class);\n }", "title": "" }, { "docid": "22923f8e746144a0f0416889e059dd66", "score": "0.4733693", "text": "public function campaign()\n\t{\n\t\treturn $this->belongsTo(Campaign::class);\n }", "title": "" }, { "docid": "fb7f6b30381c51b89e2beff1f44ea11b", "score": "0.47280625", "text": "public function getDatasourceDatapointsCount($datasourceParam) {\n $datasource = Datasource::where('id', $datasourceParam)->first();\n return $datasources->datapoints->count();\n//Reponse by Dingo\n//return $this->response->array($project->datasources);\n}", "title": "" }, { "docid": "1c8c902d5dc9e166c97f4472c420ed72", "score": "0.4723861", "text": "public function campaign()\n {\n return $this->belongsTo('App\\Campaign');\n }", "title": "" }, { "docid": "b468f0c8a771bc39a11f6857b68be140", "score": "0.472242", "text": "function getsocialinteractionReport($analytics) {\r\n $VIEW_ID = \"207950363\";\r\n\r\n // Create the DateRange object.\r\n $dateRange = new Google_Service_AnalyticsReporting_DateRange();\r\n $dateRange->setStartDate(\"2019-07-01\");\r\n $dateRange->setEndDate(\"today\");\r\n\r\n // Create the Metrics object.\r\n\r\n $socialInteractions =new Google_Service_AnalyticsReporting_Metric();\r\n $socialInteractions->setExpression(\"ga:socialInteractions\");\r\n $socialInteractions->setAlias(\"socialInteractions\");\r\n\r\n $uniqueSocialInteractions =new Google_Service_AnalyticsReporting_Metric();\r\n $uniqueSocialInteractions->setExpression(\"ga:uniqueSocialInteractions\");\r\n $uniqueSocialInteractions->setAlias(\"uniqueSocialInteractions\");\r\n\r\n $socialInteractionsPerSession =new Google_Service_AnalyticsReporting_Metric();\r\n $socialInteractionsPerSession->setExpression(\"ga:socialInteractionsPerSession\");\r\n $socialInteractionsPerSession->setAlias(\"socialInteractionsPerSession\");\r\n\r\n//Create the Dimensions object.\r\n\r\n$socialInteractionNetwork = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialInteractionNetwork->setName(\"ga:socialInteractionNetwork\");\r\n\r\n$socialInteractionAction = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialInteractionAction->setName(\"ga:socialInteractionAction\");\r\n\r\n$socialInteractionNetworkAction = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialInteractionNetworkAction->setName(\"ga:socialInteractionNetworkAction\");\r\n\r\n$socialInteractionTarget = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialInteractionTarget->setName(\"ga:socialInteractionTarget\");\r\n\r\n$socialEngagementType = new Google_Service_AnalyticsReporting_Dimension();\r\n$socialEngagementType->setName(\"ga:socialEngagementType\");\r\n\r\n // Create the ReportRequest object.\r\n $request = new Google_Service_AnalyticsReporting_ReportRequest();\r\n $request->setViewId($VIEW_ID);\r\n $request->setDateRanges($dateRange);\r\n $request->setDimensions(array($socialInteractionNetwork,$socialInteractionAction,$socialInteractionNetworkAction,$socialInteractionTarget,$socialEngagementType));\r\n $request->setMetrics(array($socialInteractions,$uniqueSocialInteractions,$socialInteractionsPerSession));\r\n\r\n $body = new Google_Service_AnalyticsReporting_GetReportsRequest();\r\n $body->setReportRequests( array( $request) );\r\n return $analytics->reports->batchGet( $body );\r\n}", "title": "" }, { "docid": "1bbafc4c8f2bc1956da627fbcc477f12", "score": "0.4721261", "text": "public function getMyCampaign(): Campaign\n {\n $this->onlyAvailableAuthenticated('getMyCampaign');\n\n return $this->getHydratedEntity(\n $this->buildUrl('current_user/campaigns', Campaign::class)\n );\n }", "title": "" }, { "docid": "2d57113b0e83822499f86f2ec0045f66", "score": "0.471839", "text": "protected function data()\n {\n $limit = $this->setting->get('ibanners::widget-banners-amount', locale(), 5);\n\n return ['banners' => $this->banner->latest($limit)];\n }", "title": "" }, { "docid": "13364b810bedcc2896edadc9acce4dd6", "score": "0.4718188", "text": "public function getCampaignId()\n {\n return $this->campaign_id;\n }", "title": "" }, { "docid": "0be66b38d27fbe21b595d4e49b3472cb", "score": "0.47126254", "text": "public function getCampaignID()\n {\n return $this->CampaignID;\n }", "title": "" } ]
720749a709590c277e4b145f7640ae72
Return is enable output WARN level message
[ { "docid": "9765e69b3a4032464ec3fb71fb47d7f6", "score": "0.79865444", "text": "function isWarnEnabled(){\n return $this->logLevel >= self::WARN_LEVEL;\n }", "title": "" } ]
[ { "docid": "4829023ae16f7ab900f6080b0af8c49b", "score": "0.79955876", "text": "public function isWarnEnabled(){\n\t\treturn $this->_log_level >= self::WARN_LEVEL; \n\t}", "title": "" }, { "docid": "4e4faac3c2b572d378aee23a67c5c7ae", "score": "0.6772641", "text": "function warn() {\n\n\t\t// Is the abstraction layer for calling the control blog missing?\n\t\tif( $this -> is_ready ) { return FALSE; }\n\n\t\t// Then create an error message.\n\t\t$message = $this -> get_message();\n\n\t\t// Print the warning in network admin.\n\t\tif( is_network_admin() && ( current_filter() == 'network_admin_notices' ) ) {\n\n\t\t\techo $message;\n\n\t\t\treturn TRUE;\n\n\t\t// Print the warning in single-site admin.\n\t\t} elseif( ! is_network_admin() && ( current_filter() == 'admin_notices' ) ) {\n\n\t\t\techo $message;\n\n\t\t\treturn TRUE;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "79971dd17742b15f3c9b704a45473e1a", "score": "0.65595007", "text": "public function setWarningLogLevel() {\n $this->logLevel = self::WARNING;\n }", "title": "" }, { "docid": "82ec871bc9361335e0ad9cc2c2314368", "score": "0.63524616", "text": "public function printWarning();", "title": "" }, { "docid": "f1070d3bf32576e83a3f1026bab4c503", "score": "0.62182444", "text": "public function getWarnLog(bool $mergeLines): string\n {\n return $this->getLog(Project::MSG_WARN, $mergeLines);\n }", "title": "" }, { "docid": "55d920309369672aba9de4f07840f020", "score": "0.61136466", "text": "public function warning( $msg )\n {\n\n $this->write( 'WARN: '.$msg );\n\n }", "title": "" }, { "docid": "49e6049015a9e0ad029e23653ab885b9", "score": "0.60935295", "text": "public function thereAreWarnings() {\n return $this->_thereAreErrorLevel( self::WARNING );\n }", "title": "" }, { "docid": "f297f8c79a0d35225b80a1bbbd80788a", "score": "0.60438585", "text": "public function assignWarningMessages()\n {\n $warningMessages = array();\n $lengowLink = new LengowLink();\n if (LengowConfiguration::get('LENGOW_IMPORT_SINGLE_ENABLED')) {\n $warningMessages[] = $this->locale->t('order.screen.import_single_warning_message');\n }\n if (LengowConfiguration::debugModeIsActive()) {\n $warningMessages[] = $this->locale->t(\n 'order.screen.debug_warning_message',\n array('url' => $lengowLink->getAbsoluteAdminLink('AdminLengowMainSetting'))\n );\n }\n if (LengowCarrier::hasDefaultCarrierNotMatched()) {\n $warningMessages[] = $this->locale->t(\n 'order.screen.no_carrier_warning_message',\n array('url' => $lengowLink->getAbsoluteAdminLink('AdminLengowOrderSetting'))\n );\n }\n if (!empty($warningMessages)) {\n $message = join('<br/>', $warningMessages);\n } else {\n $message = false;\n }\n $this->context->smarty->assign('warning_message', $message);\n }", "title": "" }, { "docid": "24a2cc7053496c4ff931ce37277903b5", "score": "0.6022072", "text": "public function warn( $logValue ) {\n\t\t$this->write( $logValue, self::LEVEL_WARN );\n\t}", "title": "" }, { "docid": "beb54f9fda9ac4c2a4c7a53f24217494", "score": "0.5989237", "text": "public function getWarnings() {\n return $this->checkErrorNone( self::WARNING );\n }", "title": "" }, { "docid": "d5df127c3daf788e97897ca7e62f18bf", "score": "0.59817386", "text": "public function hasWarningMessages()\n {\n return $this->countbyPropertyValue('type', Message::TYPE_WARN) > 0 ? true : false;\n }", "title": "" }, { "docid": "61dbdbb5120caf52f5a303ff592986d9", "score": "0.59726024", "text": "public function hasWarning();", "title": "" }, { "docid": "9af2db4b8b06c024e54f345f2ad753ed", "score": "0.59277153", "text": "function log_warn(string|Throwable $message): bool\n{\n return app()->logger->logWarn($message);\n}", "title": "" }, { "docid": "9d40169dab5136614d3867f1229e3c97", "score": "0.5918312", "text": "public static function log_warn($message) {\n self::$logger->log($message, Logger::WARNING);\n }", "title": "" }, { "docid": "12be6d729aa9438aae8825b1bae09777", "score": "0.59083", "text": "public function GetWarnings();", "title": "" }, { "docid": "51be2f7a522ae360e8674308ab24a3cd", "score": "0.59065646", "text": "public function warning($message);", "title": "" }, { "docid": "e584b386f3f5c23d565087b35a33097f", "score": "0.5884524", "text": "public function getWarnings ();", "title": "" }, { "docid": "2b33309cd8648096aec48602b68d8c21", "score": "0.58821446", "text": "static function warn($msg){\n if ( is_array($msg) ){\n foreach($msg as $m){\n self::warn($m);\n }\n }\n else{\n self::setNotification('warn',$msg);\n }\n }", "title": "" }, { "docid": "5e2e4dbeaca64bd3cad8fabdc7447db0", "score": "0.5881327", "text": "function output_warning($text) {\n echo \"[warning]||\" . now_datetime_micro() . '||' . $text . PHP_EOL;\n}", "title": "" }, { "docid": "70d50651617940504e342fe7d43c3713", "score": "0.58728504", "text": "public function getWarning()\n {\n return $this->warning;\n }", "title": "" }, { "docid": "8febc664b6b3900c35af6da76d87379b", "score": "0.5846216", "text": "function warning($msg, $e=null)\r\n{\r\n Logger::getDefault()->warning($msg, $e);\r\n}", "title": "" }, { "docid": "124cec26c2619ffa5a733378e827cfb0", "score": "0.5842214", "text": "public function getWarnings();", "title": "" }, { "docid": "7653c1c45e730d00956ba4888a3648bf", "score": "0.5828814", "text": "public function hasWarnings(): bool;", "title": "" }, { "docid": "b34890cbf9c052f55449c8d42a41b4a8", "score": "0.5820073", "text": "public function getDisableReportMessage()\n {\n \tif (!is_null($this->getPrimaryKey()))\n \t{\n \t\t$items = $this->getRecords();\n \t\t$disablemessage = array();\n \t\tforeach ($items as $item)\n \t\t{\n \t\t\tif (is_null($item->getFunctions()->getProposal()->getPrimaryKey()))\n \t\t\t{\n \t\t\t\tarray_push($disablemessage, \"One or more items do not have a Proposal\");\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n \t\tif ($this->loggedOutPastThirtyDays())\n \t\t{\n \t\t\tarray_push($disablemessage, \"One or more items were Logged Out More Than 30 Days Ago\");\n \t\t}\n \t\treturn implode('; ',$disablemessage);\n \t}\n \treturn \"This is an unsaved, new group\";\n }", "title": "" }, { "docid": "4dffb31dc069769aa0dd88465497ab8a", "score": "0.58108115", "text": "function warning($important) {\n if ($this->warner) {\n $args = func_get_args();\n is_bool($important) ? array_shift($args) : $important = true;\n call_user_func($this->warner, call_user_func_array('sprintf', $args),\n $important, $this);\n }\n }", "title": "" }, { "docid": "229acf2dcc8dc6238ce4cb1f1c59b25e", "score": "0.5803101", "text": "public function flashWarning(): string\n {\n return FlashType::WARNING;\n }", "title": "" }, { "docid": "8e6d3a4029a956f6fddf9a7f884ae9f9", "score": "0.580147", "text": "public static function warn($message)\n {\n Controller::getCurrentController()\n ->getRenderer()\n ->addMessage('<pre>' . $message . '</pre>', Renderer::WARN_MESSAGE);\n }", "title": "" }, { "docid": "cce44680e5992b0a4690a206bdb027d9", "score": "0.5750845", "text": "public function show_warning() {\n foreach ( $this->setting_warning as $k => $warning ) {\n echo \"<div id='message' class='error'><p>\" . $warning . \"</p></div>\";\n }\n }", "title": "" }, { "docid": "16ffcf665e8503b00ffa2e250bd1a50f", "score": "0.569102", "text": "public function adminDisplayWarning($msg)\n {\n }", "title": "" }, { "docid": "229a497b4408f6779e30f3bf16bb4133", "score": "0.56865096", "text": "public function warn($str)\n {\n $this->write(Decorate::warn($str), true);\n }", "title": "" }, { "docid": "53c1711a324f5ef7ac694c98078bed39", "score": "0.56813425", "text": "public function logWarnings() {\n\t\tif ( count( self::$warnings ) > 0 ) {\n\t\t\tforeach ( self::$warnings as $key=>$value ) {\n\t\t\t\tif ($key == 0) {\n\t\t\t\t\tExceptionHandler::exception( 'Warning: '.$value->message, 'log' );\n\t\t\t\t}else {\n\t\t\t\t\tExceptionHandler::exception( 'Warning['.$key.']: '.$value->message, 'log' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "99a1caca5f392b7b24f0bb2852ed3d86", "score": "0.56520104", "text": "function isInfoEnabled(){\n return $this->logLevel >= self::INFO_LEVEL;\n }", "title": "" }, { "docid": "488f30ab05b8a0023d701612342ba092", "score": "0.56511015", "text": "function mbb_warning() {\n\t$html = '<div class =\"update-nag\"><p>%s</p></div>';\n\t$msg = 'The MBB Theme Companion plugin is not activated. Please make sure it is installed and activated before continuing.';\n\techo esc_html( sprintf( $html, $msg ) );\n}", "title": "" }, { "docid": "3e4eeb64bedd30d78656a12f26264049", "score": "0.5641359", "text": "public function getWarnMessage($type)\n {\n if (!array_key_exists($type, $this->warnLogs)) {\n return $type;\n }\n return $this->warnLogs[$type];\n }", "title": "" }, { "docid": "423628683db8b09207fefa9789ff5c80", "score": "0.56305194", "text": "public function printWarnings() {\n\t\tif ( count( self::$warnings ) > 0 ) {\n\t\t\tforeach ( self::$warnings as $key=>$value ) {\n\t\t\t\tif ($key == 0) {\n\t\t\t\t\techo \"\\n\".'<div style=\"background-color:yellow;color:red;\"><strong>Warning:</strong> '.$value->message.'</div>';\n\t\t\t\t}else {\n\t\t\t\t\techo \"\\n\".'<div style=\"background-color:yellow;color:red;\"><strong>Warning['.$key.']:</strong> '.$value->message .'</div>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a71d406effa11107fdbf751c301f2d62", "score": "0.56180364", "text": "public static function warning($msg){\n\t\tif(isset($_SERVER['SERVER_SOFTWARE'])){\n \t\t\tprint '<div id=\"kumbiaDisplay\" class=\"warning_message\">'.$msg.'</div>'.\"\\n\";\n\t\t} else {\n\t\t\tprint strip_tags($msg).\"\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "55e2ac64237f7b3cb454efd8dd0f0a41", "score": "0.56179065", "text": "function showWarning($msg)\n {\n if (function_exists('print_error')) {\n print_error($msg);\n } else {\n echo sprintf('<div align=\"center\"><font color=\"red\">%s</font></div>', $msg);\n }\n }", "title": "" }, { "docid": "e59b12c6067d5e1a0e92ed2f10ea3248", "score": "0.5606925", "text": "public static function warning($message)\n {\n return (new self)->writeLog($message, 'WARNING'); \n }", "title": "" }, { "docid": "e93eb6eda7085d8d8f65f085f27b4d07", "score": "0.5602236", "text": "public function allWarnings();", "title": "" }, { "docid": "e472527987c9cb78e22b1f924a4c1d0d", "score": "0.5599998", "text": "private function _warn($message, array $context = array())\n {\n if (ENV === 'debug') {\n return $this->_logger->warn($message, $context);\n }\n }", "title": "" }, { "docid": "f63c93298e66f4782686ce7deef71611", "score": "0.55943424", "text": "public function hasWarnings()\n {\n return $this->has('warning');\n }", "title": "" }, { "docid": "be611bc61ffaaf5e46b441b78a90c523", "score": "0.55868715", "text": "public function getWarnings()\n {\n return $this->filterByType(Message::WARNING);\n }", "title": "" }, { "docid": "c1a464524762b94e46feed41f6a656cd", "score": "0.558206", "text": "public function get_warnings() {\n\t\treturn $this->warnings;\n\t}", "title": "" }, { "docid": "c1a464524762b94e46feed41f6a656cd", "score": "0.558206", "text": "public function get_warnings() {\n\t\treturn $this->warnings;\n\t}", "title": "" }, { "docid": "3748df822ca8d540402b416dd6b4b79a", "score": "0.555601", "text": "function show_warning ($msg)\n{\n $a = _trigger_message(func_get_args());\n\n _message(serialize($a), E_USER_WARNING);\n}", "title": "" }, { "docid": "ed2f0be1e2978cbbd00cf5b690bb4ceb", "score": "0.55488694", "text": "public function warn ( $msg )\n {\n self::getInstance()->getLog()->warn( $msg );\n }", "title": "" }, { "docid": "a89fa27e84520bc60986e342db496843", "score": "0.5539689", "text": "public function warning($msg)\n {\n if ($this->logger) {\n return $this->logger->warning($msg);\n }\n }", "title": "" }, { "docid": "92dbd54069bc9287477c676a6d4ee7bd", "score": "0.5537335", "text": "abstract public function warning (...$msg);", "title": "" }, { "docid": "b0493a9ba69cb1b6f6770cf7e3dc62db", "score": "0.5526432", "text": "public function warn($message)\n {\n return $this->log('WARNING: ' . $message, true);\n }", "title": "" }, { "docid": "6d579ce97bbee139e1c6fa6950c17509", "score": "0.5524667", "text": "public static function warn(string $message){\n\t\tLogger::log($message, \"WARNING\");\n\t}", "title": "" }, { "docid": "33f433bb7fac44f74a6bfc593ea619d8", "score": "0.55197334", "text": "public function getWarnings()\n {\n return $this->warnings;\n }", "title": "" }, { "docid": "33f433bb7fac44f74a6bfc593ea619d8", "score": "0.55197334", "text": "public function getWarnings()\n {\n return $this->warnings;\n }", "title": "" }, { "docid": "33f433bb7fac44f74a6bfc593ea619d8", "score": "0.55197334", "text": "public function getWarnings()\n {\n return $this->warnings;\n }", "title": "" }, { "docid": "33f433bb7fac44f74a6bfc593ea619d8", "score": "0.55197334", "text": "public function getWarnings()\n {\n return $this->warnings;\n }", "title": "" }, { "docid": "6fd566d395231e644efd45122841bc4c", "score": "0.5506814", "text": "function warnings(): array { return $this->warnings; }", "title": "" }, { "docid": "cd6e9ba499f53411a73a7bab8491e664", "score": "0.5506295", "text": "public static function warning($str) {\n self::send_message($str, self::LEVEL_WARNING);\n }", "title": "" }, { "docid": "e847f51fc89799aac7a28b6c2d2c5405", "score": "0.54941994", "text": "public function warn($sentence);", "title": "" }, { "docid": "ad0c2eb9bac7f941a48387a8f39672a5", "score": "0.5480516", "text": "function addWarning($msg)\n {\n $this->addMessage($msg, 'warning');\n }", "title": "" }, { "docid": "4aa2be1a64cc4c94a92fc17e45214a17", "score": "0.5476203", "text": "public function isErrorEnabled(){\n\t return $this->_log_level >= self::ERROR_LEVEL;\t\n\t}", "title": "" }, { "docid": "15cf825a0bf041d53dfe686ae4394f58", "score": "0.5466577", "text": "private function Warning(){\n\t\t\t\t$warnings = func_get_args();\n\n\t\t\t\tif(false === empty($warnings)){\n\t\t\t\t\techo '<div class=\"user-message warning\">';\n\t\t\t\t\t\tforeach($warnings as $warning){\n\t\t\t\t\t\t\techo '<h3>'. $warning .'</h3>';\n\t\t\t\t\t\t}\n\t\t\t\t\techo '</div>';\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "27ab7c258f27f6aa7be611f9fcebe2c7", "score": "0.5462571", "text": "public function getWarningsJSON() {\n return json_encode( $this->checkErrorNone( self::WARNING, true ) );\n }", "title": "" }, { "docid": "35df2489de9fe36d3d1d673ce6f22011", "score": "0.5457557", "text": "public static function warning ($msg) {\n // Check the log configuration.\n if (self::$level & 2) {\n // Get the message interpolated with the context.\n $msg = self::interpolate(func_get_args());\n // Log the new warning entry.\n self::log('warning', $msg);\n }\n }", "title": "" }, { "docid": "b0d5fb59aa1d3b5906e8004bbdd69322", "score": "0.54563135", "text": "function warn()\r\n {\r\n if ($this->error == '') {\r\n $this->error = mysql_error();\r\n }\r\n \r\n // return the error infor \r\n $result['data'] = $this->error;\r\n $json = json_encode($result);\r\n echo $json;\r\n }", "title": "" }, { "docid": "a06235e7d17ab912393cee61713126af", "score": "0.5452019", "text": "protected function console($text){\n $this->firephp->warn($text);\n }", "title": "" }, { "docid": "7c0dddfcb8b85b695d4b70ff31ac2f10", "score": "0.54462844", "text": "public function getWarnings()\n {\n return $this->_warnings;\n }", "title": "" }, { "docid": "021a04df0be5bcc9e8fd245bf1aa6d0c", "score": "0.5443546", "text": "function wtbChatRoom_warning()\n{\n\tif(!get_option(\"wtb_chatroom_username\") || !get_option(\"wtb_chatroom_api\") || !get_option(\"wtb_chatroom_url\")) {\n\t\techo \"\n\t\t<div id='wtb-warning' class='error'>\n\t\t\t<p>You will need to complete the Website Toolbox Chat Room <a href='options-general.php?page=wtbchatroomoptions'>Settings</a> in order for the plugin to work.</p>\n\t\t</div>\n\t\t\";\n\t}\t\n}", "title": "" }, { "docid": "599b4da9b677230628d0d6616d4ee2c2", "score": "0.5433254", "text": "public function warn($message = '', $caller = null )\n {\n $this->sendOsclass('WARN', $message, $caller);\n }", "title": "" }, { "docid": "eafb5752b5f33e31fd67a3b7d97b7f8b", "score": "0.5417745", "text": "public function getWarning() {\n\t\treturn new Foursquare_Warning_output(Temboo_Results::getSubItemByKey($this->base, \"warning\"));\n\t}", "title": "" }, { "docid": "a90bc0828d4b68872e2f279cda6cf885", "score": "0.541033", "text": "function showWarnings(string $message=''): void {\n echo $message;\n if ($this->warnings)\n echo '<pre><i>',Yaml::dump(['Warnings'=> $this->warnings], 999),\"</i></pre>\";\n }", "title": "" }, { "docid": "21cde1273fb7d5c9bd596ba4216f7033", "score": "0.5410323", "text": "public function ExportWarning()\n\t{\n\t\techo $this->ParseTemplate(\"oscommerce.export.warning\");\n\t}", "title": "" }, { "docid": "fcc1c0bd78c9a410488187fe798bfc70", "score": "0.5406208", "text": "public function loggingIsEnabled()\r\n {\r\n return $this->loggingEnable;\r\n }", "title": "" }, { "docid": "7bad762dc929e08dcb6222bc37aa1054", "score": "0.5396536", "text": "function warning($string) {\n\tlogmsg(LOG_WARNING, \"warning: $string\");\n}", "title": "" }, { "docid": "e0ea5e3f0ed576fe2c3cec1a8b4c8a5f", "score": "0.53870225", "text": "public function isWarned()\n {\n if( !isset($this->data['warned']) )\n {\n throw new E_OTS_NotLoaded();\n }\n\n return $this->data['warned'];\n }", "title": "" }, { "docid": "e9e78cea7a018593ed22588cb9546e62", "score": "0.53854626", "text": "public function warn($message, array $context = array())\n {\n return true;\n }", "title": "" }, { "docid": "b6722b00cdf6da039996ede73010d49b", "score": "0.53812325", "text": "private function showWarning($war) {\r\n echo $war;\r\n }", "title": "" }, { "docid": "42c64c413f946b99fd482d01830b7a73", "score": "0.5380855", "text": "public function warnings() {\n\t\treturn $this->_warnings;\n\t}", "title": "" }, { "docid": "b72c7ec6214b75f672ac2ec55b98c7b5", "score": "0.5372198", "text": "protected function _isEnabled()\n {\n return $this->_getConfig()->getIsEnabled() ? 'Enabled' : 'Disabled';\n }", "title": "" }, { "docid": "99b959cc68967d16871b645a461857dd", "score": "0.53581506", "text": "#[InternalModulesAPI]\n public function addWarning(int $type, ?string $msg = null): true\n {\n $this->warning[] = ['type' => $type, 'msg' => $msg];\n\n return true;\n }", "title": "" }, { "docid": "b645971968faf0f596c899b53a66848c", "score": "0.53540415", "text": "function isErrorEnabled(){\n return $this->logLevel >= self::ERROR_LEVEL;\n }", "title": "" }, { "docid": "ace9b4295b78aaa92d197ff3e52d5d26", "score": "0.53471076", "text": "function testLogWarning()\n\t{\n\t\t// initialize the log time\n\t\t$line = __LINE__;\n\t\t// initialize the message to log\n\t\t$message = \"Test entry\";\n\t\t// log a message to the mail system\n\t\t$this->logger->warning($message, $line);\n\t}", "title": "" }, { "docid": "c41238301293edd97692c767d2012e20", "score": "0.5345067", "text": "protected function getErrorFlashMessage() {\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "1932e09093e7bcbc2dc786689cc4153c", "score": "0.5342316", "text": "public function throwWarning($warning){$this->warningMessage = $warning;}", "title": "" }, { "docid": "a53144fc990bf869480e21e4eedbf0d3", "score": "0.53383917", "text": "public function warn($message,$sender){\n if( !$this->isWarnEnabled())return;\n $this->_output('WARN',$message,$sender);\n return $this;\n }", "title": "" }, { "docid": "ddfbe8704ec35e2814ca74f339a69a8b", "score": "0.5331037", "text": "function outputWarning($message)\n{\n $date = date(\"Y/m/d H:i:s O\");\n $output = sprintf(\"[%s][WARNING] %s\\n\", $date, $message);\n\n fwrite(STDERR, $output);\n}", "title": "" }, { "docid": "c5b1f2485b25b2bc72688e05a707af30", "score": "0.5329919", "text": "public function validationWarnings();", "title": "" }, { "docid": "a84934d82bdd8db7475189de969d3b7e", "score": "0.5326205", "text": "public function warning(string $message, $includeNewline = false);", "title": "" }, { "docid": "7f1bac3b8c5f38ba5d41aa213dc1bd7e", "score": "0.53261894", "text": "public function warnings() {\n\n return $this->warnings;\n }", "title": "" }, { "docid": "f17d73b79e2ca6d6577b784eebaf50c6", "score": "0.53185797", "text": "public function getLogLevel(): string;", "title": "" }, { "docid": "fc013586063b5bec0df23a78e012baaa", "score": "0.53010446", "text": "public function enable_disable_logging() {\n\t\t$enable = filter_input( INPUT_GET, 'bitscr_logging_enabled', FILTER_SANITIZE_STRING );\n\t\tif ( ! empty( $enable ) && in_array( $enable, [ 'yes', 'no' ], true ) ) {\n\t\t\tupdate_option( 'bitscr_logging_enabled', $enable );\n\t\t}\n\t}", "title": "" }, { "docid": "99b78ec503fb7ee385651028af839d0b", "score": "0.52990866", "text": "protected function maybe_add_deprecation_notice()\n\t{\n\t\tif (!isset($this->attributes['wp_lemon']['deprecated'])) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$deprecation = $this->attributes['wp_lemon']['deprecated'];\n\t\t$message = sprintf(__('This block is deprecated since version %1$s. Please replace this block in favor of %2$s.', 'bulldozer'), $deprecation['since'], $deprecation['use']);\n\t\t$this->add_notification($message, 'warning');\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2abeeca87c786e88910aadaed19f559e", "score": "0.5298493", "text": "public function warnStep($text)\n {\n $text = $this->formatStepText($text);\n\n $this->line('<fg=yellow>==></> <options=bold>'.$text.'</>');\n }", "title": "" }, { "docid": "6d6363efaa7e58f3c98eed55c24d3f2c", "score": "0.5296516", "text": "public function needLog()\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "160cecaac2e83d86684cace5664824de", "score": "0.5288996", "text": "function checkWarnings(){ \n $this->warnings = array();\n if ($this->daNotFunctioning) $this->warnings[] = \"Not Enough Energy to Operator Correctly\";\n if ($this->daSteamFeed->massFlow<0) $this->warnings[] = \"Negative Steam Flow\";\n if ($this->daSteamFeed->massFlow==0) $this->warnings[] = \"No Steam Flow\";\n if ($this->daSteamFeed->specificEnthalpy==$this->daWaterFeed->specificEnthalpy) $this->warnings[] = \"Steam and Water Specific Enthalpy Equal\";\n \n if ($this->daSteamFeed->specificEnthalpy<$this->daWaterFeed->specificEnthalpy) $this->warnings[] = \"Water Specific Enthalpy Greater Than Steam\";\n \n if ($this->feedwater->specificEnthalpy>$this->daWaterFeed->specificEnthalpy\n and $this->feedwater->specificEnthalpy>$this->daSteamFeed->specificEnthalpy) $this->warnings[] = \"Steam Specific Enthalpy too Low for Feedwater Requirements\";\n return count($this->warnings);\n }", "title": "" }, { "docid": "790fbe39d366d299725612afeb53aa17", "score": "0.5281361", "text": "function isFatalEnabled(){\n return $this->logLevel >= self::FATAL_LEVEL;\n }", "title": "" }, { "docid": "a6a653a10fb2ac163d23645d45628b3a", "score": "0.5275771", "text": "public function isVerboseLoggingEnabled()\n {\n return false;\n return $this->isSettingEnabled('verbose_logging');\n }", "title": "" }, { "docid": "c10d96e0971a452b4ccef8f39bcd16e3", "score": "0.5267131", "text": "public function logWarning($message, $data = null) {\n if($this->logLevel >= self::WARNING)\n $this->_log('WARNING', $message, $data);\n }", "title": "" }, { "docid": "c5a9d3ba756b55f286bceaf08701b41e", "score": "0.52652645", "text": "public function pauseWarnings()\n {\n $this->_pauseWarnings = true;\n }", "title": "" }, { "docid": "4771ac65baa2ca3d3f73e57d2c59c752", "score": "0.52612245", "text": "public function debugWarnings()\n {\n $stmt = $this->_query('SHOW WARNINGS', true);\n\n $warnings = [];\n while ($warning = $stmt->fetch_assoc()) {\n $warnings[] = $warning;\n }\n\n foreach ($warnings as $warning) {\n Tools::atkwarning(\"MYSQL warning '{$warning['Level']}' (Code: {$warning['Code']}): {$warning['Message']}\");\n }\n }", "title": "" }, { "docid": "8bb3ae3cdc67d7572c1baf292340c196", "score": "0.52544844", "text": "public function testWarningToCustomLog(): void\n {\n $this->_logger = $this->_setUpCustomLogger();\n\n $this->_logger->warning('warning message');\n\n $this->assertStringEqualsFile($this->_pathToLogfile, 'warning message [priority: 4]');\n }", "title": "" }, { "docid": "d6c23facbc87153913764f67def876bd", "score": "0.52533853", "text": "protected function getLoggerLevel()\n {\n return \\Monolog\\Logger::DEBUG;\n }", "title": "" } ]
56f17d39509ed6f025fbb2f884aefdab
Uses a singleton pattern and a factory pattern to return the data manager. The configuration determines which data manager class is to be instantiated.
[ { "docid": "d9e136f010db74d41af1bbfee7e324c2", "score": "0.79275304", "text": "static function get_instance()\r\n {\r\n if (!isset(self :: $instance))\r\n {\r\n $type = Configuration :: get_instance()->get_parameter('general', 'data_manager');\r\n require_once dirname(__FILE__) . '/data_manager/' . strtolower($type) . '_user_data_manager.class.php';\r\n $class = __NAMESPACE__ . '\\\\' . Utilities :: underscores_to_camelcase($type) . 'UserDataManager';\r\n self :: $instance = new $class();\r\n }\r\n return self :: $instance;\r\n }", "title": "" } ]
[ { "docid": "6102a82da33d20164e1433b4eeb7d2be", "score": "0.76935166", "text": "static function get_instance()\n\t{\n\t\tif (!isset (self :: $instance))\n\t\t{\n\t\t\t$type = Configuration :: get_instance()->get_parameter('general', 'data_manager');\n\t\t\trequire_once dirname(__FILE__).'/data_manager/'.Utilities :: camelcase_to_underscores($type).'.class.php';\n\t\t\t$class = __NAMESPACE__ . '\\\\' . $type.'HandbookDataManager';\n\t\t\tself :: $instance = new $class ();\n\t\t}\n\t\treturn self :: $instance;\n\t}", "title": "" }, { "docid": "bbae68590f8bd13e733c4686672f25d3", "score": "0.6928294", "text": "private function getManager()\n {\n if ($this->manager === null) {\n $this->manager = new Manager($this->dsn, ['connectTimeoutMS' => 10000]);\n }\n\n return $this->manager;\n }", "title": "" }, { "docid": "cc4fa4ad7416fa270fccd9ee28d352d8", "score": "0.6447629", "text": "abstract public function getManager($type);", "title": "" }, { "docid": "df8412ea12d67dd34a95f8d1fa842f90", "score": "0.64323837", "text": "public function createApplicationManager()\n {\n return new Manager($this->getOptions());\n }", "title": "" }, { "docid": "2b4ede7fc0759c16bcabba2a979bc007", "score": "0.63786525", "text": "public static function getManager(){\n if(is_null(self::$manager)){\n // Init Manager\n self::$manager = new Zend_Cache_Manager;\n $front = array('automatic_serialization'=>true, 'cache_id_prefix' => 'default_');\n if(isset(self::$config['store']['lifetime']) && self::$config['store']['lifetime'] > 0){\n $front['lifetime'] = intval(self::$config['store']['lifetime']);\n }else{\n $front['lifetime'] = null;\n }\n $cachedir = self::$cachedir.DIRECTORY_SEPARATOR.'zend'.DIRECTORY_SEPARATOR.'default';\n if(!is_dir($cachedir)){\n // Directory does not exist, try to create it\n if(@mkdir($cachedir, 0777, true) === false){\n throw new Exception('Cache directory does not exist and could not be created.');\n }\n }\n $cachedir = realpath($cachedir);\n $front['caching'] = (bool)self::$config['store']['enabled'];\n $options = array('frontend'=>array('name'=>'Core','options'=>$front),'backend'=>array('name'=>'File','options'=>array('cache_dir'=>$cachedir)));\n self::$manager->setCacheTemplate('default', $options);\n $options['frontend']['options']['cache_id_prefix'] = Zend_Cache_Manager::PAGETAGCACHE.'_';\n $options['backend']['options']['cache_dir'] = self::$cachedir.DIRECTORY_SEPARATOR.'zend'.DIRECTORY_SEPARATOR.Zend_Cache_Manager::PAGETAGCACHE;\n $cachedir = $options['backend']['options']['cache_dir'];\n if(!is_dir($cachedir)){\n // Directory does not exist, try to create it\n if(@mkdir($cachedir, 0777, true) === false){\n throw new Exception('Cache directory does not exist and could not be created.');\n }\n }\n self::$manager->setTemplateOptions(Zend_Cache_Manager::PAGETAGCACHE, $options);\n }\n return self::$manager;\n }", "title": "" }, { "docid": "75ae6a8858c0d21c8bd5a8f3ec3131b7", "score": "0.6366674", "text": "public static function &getInstance(): Manager\n\t\t{\n\t\t\tstatic $obj;\n\t\t\tif (!$obj)\n\t\t\t{\n\t\t\t\t$obj = new self;\n\t\t\t}\n\n\t\t\treturn $obj;\n\t\t}", "title": "" }, { "docid": "b39da2c2f3a1aff102a99f282d332069", "score": "0.62863433", "text": "public static function getDBManager() {\n\t\t$implementor = new MySQLManager();\n\t\t\n\t\treturn $implementor;\n\t}", "title": "" }, { "docid": "0b64f7034bc848e2025931a04619dc19", "score": "0.62709785", "text": "protected function _getInstanceManager()\n {\n $i = new D2LWS_Instance(array(\n 'dirs' => array(\n __DIR__ . '/../configs',\n __DIR__ . '/configs',\n ),\n ));\n\n if (getenv('SOAP_CLIENT')) {\n $i->getSoapClient()->setClientClassName(\n 'D2LWS_Soap_Client_Adapter_' . getenv('SOAP_CLIENT')\n );\n }\n\n return $i;\n }", "title": "" }, { "docid": "c03e81f67dde6aa94a77402e375583b4", "score": "0.6269891", "text": "public static function &getInstance() {\n\t\tstatic $instance = NULL;\n\t\tif (!isset($instance))\n\t\t\t$instance = new Manager();\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "b05dea144d356c936b9d52807b3692a3", "score": "0.6269188", "text": "protected function getMetadataManager()\n {\n return MetaDataManager::getManager(array($this->platform));\n }", "title": "" }, { "docid": "bd287b23a6439c3b141f3f5566d70694", "score": "0.62400544", "text": "public static function get_instance()\n {\n if (!self::$_instance) {\n self::$_instance = new Data();\n }\n\n return self::$_instance;\n }", "title": "" }, { "docid": "723c449898fcb52fb76be9de885e9317", "score": "0.6236169", "text": "public static function getInstance()\n {\n if (self::$instance != null) {\n return self::$instance;\n }\n\n self::$manager = !empty($GLOBALS['sugar_config']['xhprof_config']['manager']) ?\n $GLOBALS['sugar_config']['xhprof_config']['manager'] :\n self::$manager;\n\n if (is_file('custom/include/SugarXHprof/' . self::$manager . '.php')) {\n require_once 'custom/include/SugarXHprof/' . self::$manager . '.php';\n } elseif (is_file('include/SugarXHprof/' . self::$manager . '.php')) {\n require_once 'include/SugarXHprof/' . self::$manager . '.php';\n }\n\n if (class_exists(self::$manager) && is_subclass_of(self::$manager, __CLASS__)) {\n self::$instance = new self::$manager();\n } else {\n self::$instance = new self();\n }\n\n self::$instance->loadConfig();\n\n return self::$instance;\n }", "title": "" }, { "docid": "fe17e4f647c18eeaf8d41fd623f14082", "score": "0.6224117", "text": "static public function get_instance()\n\t{\n\t\tif (self::$instance == NULL)\n\t\t{\n\t\t\t$config = cms_config();\n\t\t\t\n\t\t\t$conn_string = $config['dbms'] . ':dbname=' . $config['db_name'] . ';host=' . $config['db_hostname'];\n\t\t\tif ($config['db_port'] != '')\n\t\t\t\t$conn_string .= ';port=' . $config['db_port'];\n\t\t\t\n\t\t\t$attrs = array(PDO::ATTR_PERSISTENT => true);\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$class = 'CmsPdoMysqlDatabase';\n\t\t\t\t$attrs = $attrs + call_user_func_array($class.'::get_connection_attributes', array()); //Add driver specific attributes\n\t\t\t\tself::$instance = new $class($conn_string, $config['db_username'], $config['db_password'], $attrs);\n\t\t\t\tself::$instance->_database_name = $config['db_name'];\n\t\t\t}\n\t\t\tcatch (PDOException $e)\n\t\t\t{\n\t\t\t\techo 'Connection failed: ' . $e->getMessage();\n\t\t\t}\n\t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "4bdc57bb12d8e1d992a18038a8d54bf2", "score": "0.6216642", "text": "public function createManager()\n {\n // setup Doctrine\n $devMode = true;\n $settings = Setup::createAnnotationMetadataConfiguration(array(__DIR__.'/src'), $devMode);\n\n $config = $this->container['config']->getDbConfig();\n\n // connect to the DB\n $conn = array(\n 'driver' => $config['driver'],\n 'user' => $config['username'],\n 'password' => $config['password'],\n 'dbname' => $config['database'],\n );\n\n // get the entity manager\n return \\Doctrine\\ORM\\EntityManager::create($conn, $settings);\n }", "title": "" }, { "docid": "0f09856f6b442f8a26d1a0de76f4617e", "score": "0.6180763", "text": "public static function getDBManager()\n\t{\n\t\treturn \\Aimeos\\MW\\DB\\Factory::createManager( self::getConfig(), 'DBAL' );\n\t}", "title": "" }, { "docid": "3ece019967f8e7950af93111431a1bb6", "score": "0.61769855", "text": "public static function getInstance() {\n return !self::$instance ? new dataLayer() : self::$instance;\n }", "title": "" }, { "docid": "f3253c64ca7d9d56cc0871cfa5e79bec", "score": "0.6153457", "text": "public static function getTypeInstance($type, $config = array())\n {\n global $sugar_config;\n\n if(empty($config['db_manager'])) {\n // standard types\n switch($type) {\n case \"mysql\":\n if (empty($sugar_config['mysqli_disabled']) && function_exists('mysqli_connect')) {\n $my_db_manager = 'MysqliManager';\n } else {\n $my_db_manager = \"MysqlManager\";\n }\n break;\n case \"mssql\":\n \tif ( function_exists('sqlsrv_connect')\n && (empty($config['db_mssql_force_driver']) || $config['db_mssql_force_driver'] == 'sqlsrv' )) {\n $my_db_manager = 'SqlsrvManager';\n } elseif (self::isFreeTDS()\n && (empty($config['db_mssql_force_driver']) || $config['db_mssql_force_driver'] == 'freetds' )) {\n $my_db_manager = 'FreeTDSManager';\n } else {\n $my_db_manager = 'MssqlManager';\n }\n break;\n default:\n $my_db_manager = self::getManagerByType($type, false);\n if(empty($my_db_manager)) {\n display_stack_trace();\n $GLOBALS['log']->fatal(\"unable to load DB manager for: $type\");\n sugar_die(\"Cannot load DB manager\");\n }\n }\n } else {\n $my_db_manager = $config['db_manager'];\n }\n\n // sanitize the name\n $my_db_manager = preg_replace(\"/[^A-Za-z0-9_-]/\", \"\", $my_db_manager);\n\n if(!empty($config['db_manager_class'])){\n $my_db_manager = $config['db_manager_class'];\n } else {\n SugarAutoLoader::requireWithCustom(\"include/database/{$my_db_manager}.php\");\n }\n\n if(class_exists($my_db_manager)) {\n return new $my_db_manager();\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1dc6a99ebfd72de760864ccee04949ff", "score": "0.6126249", "text": "public function getInstance($data = null);", "title": "" }, { "docid": "6834de0a64acf96f2d8555ab74b58bff", "score": "0.6103783", "text": "public static function\n\t\tget_instance()\n\t{\n\t\tif (self::$instance == NULL) {\n\t\t\tself::$instance = new Database_DatabaseClassFactory();\n\t\t}\n\n\t\treturn self::$instance;\n\t\t#if (!isset($_SESSION['database-class-factory'])) {\n\t\t# $_SESSION['database-class-factory']\n\t\t# = new Database_DatabaseClassFactory();\n\t\t#}\n\t\t#\n\t\t#return $_SESSION['database-class-factory'];\n\t}", "title": "" }, { "docid": "8fdfcf892e602cc5b16808fff3c87bf6", "score": "0.6083265", "text": "public function get_manager() {\n\t\treturn $this->manager;\n\t}", "title": "" }, { "docid": "5d9f534aff24e2edef9b869c5f2e8557", "score": "0.60761005", "text": "public function get_factory_manager()\n {\n if ( ! $this->factory_manager) {\n\t $this->factory_manager = new FactoryManager($this->entity_manager);\n }\n\t return $this->factory_manager;\n }", "title": "" }, { "docid": "a790e0dba1729da3d123f67925284970", "score": "0.6038251", "text": "static function &getDataStore($name = '_dynamic_data_', $type = 'data')\n {\n switch ($type)\n {\n case 'table':\n sys::import('xaraya.datastores.sql.flattable');\n $datastore = new FlatTableDataStore($name);\n break;\n case 'data':\n sys::import('xaraya.datastores.sql.variabletable');\n $datastore = new VariableTableDataStore($name);\n break;\n case 'hook':\n sys::import('xaraya.datastores.hook');\n $datastore = new HookDataStore($name);\n break;\n case 'function':\n sys::import('xaraya.datastores.function');\n $datastore = new FunctionDataStore($name);\n break;\n case 'uservars':\n sys::import('xaraya.datastores.usersettings');\n // TODO: integrate user variable handling with DD\n $datastore = new UserSettingsDataStore($name);\n break;\n case 'modulevars':\n sys::import('xaraya.datastores.sql.modulevariables');\n // TODO: integrate module variable handling with DD\n $datastore = new ModuleVariablesDataStore($name);\n break;\n\n // TODO: other data stores\n case 'ldap':\n sys::import('xaraya.datastores.ldap');\n $datastore = new LDAPDataStore($name);\n break;\n case 'xml':\n sys::import('xaraya.datastores.file.xml');\n $datastore = new XMLFileDataStore($name);\n break;\n case 'csv':\n sys::import('xaraya.datastores.file.csv');\n $datastore = new CSVFileDataStore($name);\n break;\n case 'dummy':\n default:\n sys::import('xaraya.datastores.dummy');\n $datastore = new DummyDataStore($name);\n break;\n }\n return $datastore;\n }", "title": "" }, { "docid": "0e5c746d9ca3d16b1db0828a1e1c23c2", "score": "0.60176855", "text": "public static function instance() {\n if(is_null(self::$instance)) {\n // Get credentials for connection\n $Config = Doctrine_Config::instance();\n\n // Get credentials\n $credentials = self::getConnectionCredentials();\n\n // Get Eventmanager\n $EventManager = Doctrine_Eventmanager::instance();\n\n // Create entitymanager\n $entityManager\t\t= \\Doctrine\\ORM\\EntityManager::create($credentials, $Config, $EventManager);\n\n // Set the entityManager\n self::$instance = $entityManager;\n }\n // Return the entity manager\n return self::$instance;\n }", "title": "" }, { "docid": "201d71848f06db648e789c17985f5ce5", "score": "0.6003658", "text": "public static function get_records_manager() {\n if (!isset(self::$recordsmanager)) {\n self::$recordsmanager = new records_manager();\n }\n\n return self::$recordsmanager;\n }", "title": "" }, { "docid": "e3566df949fa016d5518095a9df8f35b", "score": "0.5973253", "text": "public static function createConfigurationManager(): ConfigurationManager\n {\n return new ConfigurationManager();\n }", "title": "" }, { "docid": "caad55531035de5531f6d7a8d3a611dc", "score": "0.5969174", "text": "protected function getDaoInstance() {\n $dao = new RegistryDao();\n $dao->setDefaultReaderWriter(self::$doctrineAdapter);\n return $dao;\n }", "title": "" }, { "docid": "3a26f195d453db1e3c6eaad914f95968", "score": "0.5964994", "text": "public function getServiceManager(): ServiceManager {\n static $serviceManager = NULL;\n if(!$serviceManager) {\n if(($f = $this->getValueCache()->fetchValue(\"main-config\")) && ($p = $this->getValueCache()->fetchValue(\"parameter-config\"))) {\n $config = require $this->getSkylineAppDirectory( CompilerConfiguration::SKYLINE_DIR_COMPILED ) . DIRECTORY_SEPARATOR . $f;\n global $_MAIN_CONFIGURATION;\n $_MAIN_CONFIGURATION = $config;\n\n ServiceManager::rejectGeneralServiceManager();\n $serviceManager = ServiceManager::generalServiceManager($config[ MainKernelConfig::CONFIG_SERVICES ]);\n\n $parameters = require $this->getSkylineAppDirectory( CompilerConfiguration::SKYLINE_DIR_COMPILED ) . DIRECTORY_SEPARATOR . $p;\n foreach($parameters as $parameterName => $parameterValue)\n $serviceManager->setParameter($parameterName, $parameterValue);\n\n $serviceManager->addCustomArgumentHandler(function($key, $value) {\n if(is_string($value) && strpos($value, '$(') !== false)\n return SkyGetPath($value, false);\n return $value;\n }, \"LOCATIONS\");\n } else {\n throw new \\Exception(\"Using Service Manager is only available after compiling main config and parameter config\");\n }\n }\n return $serviceManager;\n }", "title": "" }, { "docid": "16f627ff5087255a6126c11364f365a3", "score": "0.59461653", "text": "private function registerManager()\n {\n $class = (app()->environment() === 'testing') ? StacheTestManager::class : Manager::class;\n\n $manager = new $class(\n $this->stache,\n new Loader($this->stache),\n new UpdateManager($this->stache),\n new Persister($this->stache)\n );\n\n $this->app->instance(Manager::class, $manager);\n }", "title": "" }, { "docid": "6b1c506d4200d447d7d5defeadd5dcb8", "score": "0.59449327", "text": "public function getManager()\n\t\t{\n\t\t\treturn $this->manager;\n\t\t}", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.59270763", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.59270763", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "94d68c9cc909a3e091a98fe99bd6e20c", "score": "0.592151", "text": "function &getInstance()\n {\n static $instance = NULL;\n if ($instance == NULL)\n $instance = new atkFixtureManager();\n return $instance;\n }", "title": "" }, { "docid": "e67f8e2822c4e655b743295021072b72", "score": "0.58896196", "text": "static public function getInstance()\n {\n static $instance;\n \n if ( !$instance )\n {\n $instance = new ComMigratorStore(); \n }\n \n return $instance;\n }", "title": "" }, { "docid": "13f52330cd8a3a9d97af8e47661b9dcb", "score": "0.588565", "text": "public static function instance()\n {\n global $container;\n return $container->getService(\"dao\");\n //return self::$_instance;\n }", "title": "" }, { "docid": "38bd1d8603abacd284442c1fc247120e", "score": "0.586482", "text": "public static function manager()\n\t{\n\t\t$registry = Zend_Registry::getInstance(); \n\t\t$application = $registry->get(ZEND_APP_REG_ID);\n\t\t\n\t\t//ensure resource Session has/is initialized;\n\t\t$application->getBootstrap()->bootstrap('indexing');\n\t\t\n\t \treturn $application->getBootstrap()->getResource('indexing');\n\t}", "title": "" }, { "docid": "198f646eee3f431c83f4d66ba1993ed1", "score": "0.5860855", "text": "public function getManager () {\n\t\tif ($this->_manager===null)\n\t\t{\n\t\t\tforeach ($this->getApplication()->getModules() as $module)\n\t\t\t{\n\t\t\t\tif ($module instanceof FCmsModule) $this->_manager=$module;\n\t\t\t}\n\t\t\tif ($this->_manager===null) \n\t\t\tthrow new TConfigurationException(\"cms_manager_module_not_found\");\n\t\t}\n\t\treturn $this->_manager;\n\t}", "title": "" }, { "docid": "282cd643cf4b44b744af6605f1ab0078", "score": "0.58497304", "text": "public static function getInstance() {\n\n if(is_null(self::$_instance)) {\n self::$_instance = new ConfManager(CONF);\n }\n\n return self::$_instance;\n }", "title": "" }, { "docid": "278775410407545b05e7935dde540e00", "score": "0.5818171", "text": "function &getManager() {\n\t\tstatic $instance;\n\t\t\n\t\tif (!isset($instance)) {\n\t\t\t$instance = new TemplateManager();\n\t\t}\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "4ee59836a6697248d2fff9a1266c78d9", "score": "0.5816229", "text": "public static function getInstance() {\n \n\t\t\tif(is_null(self::$_instance))\n\t\t\t{\n\t\t\t\tself::$_instance = new DataExtractor(); \n\t\t\t}\n\t\t\treturn self::$_instance;\n\t\t}", "title": "" }, { "docid": "1402569cdd5ed44ae8106524d0b693e1", "score": "0.5815962", "text": "public static function getInstance(){\n\t\tif (!isset( self:: $INSTANCE)) {\n\t\t\tself:: $INSTANCE = new Database();\n\t\t}\n\t\treturn self:: $INSTANCE;\n\t}", "title": "" }, { "docid": "69b9949dbe72c844422dabca831b3d6c", "score": "0.5814151", "text": "protected function getManager()\n {\n if ($this->manager === null) {\n $this->manager = Shopware()->Models();\n }\n return $this->manager;\n }", "title": "" }, { "docid": "6e5bcb4202d3a1a4a19087c8528a89e4", "score": "0.57873005", "text": "public function getDatabaseManager()\n {\n return $this->dbm;\n }", "title": "" }, { "docid": "b3e6b5498b319bf9ae4f1542e9a8d41b", "score": "0.57735664", "text": "public static function getInstance() : \\Core\\Structures\\Singleton\n {\n if (null === self::$instance) \n {\n self::$instance = new ConnectionManager();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "0b614d20bd6da2bc09ea440827052ef0", "score": "0.57627004", "text": "public function init()\n {\n $options = $this->getOptions();\n \n //require doctrine core\n require_once('Doctrine/lib/Doctrine.php');\n \n //setup autoloading for doctrine core and models\n $loader = Zend_Loader_Autoloader::getInstance();\n $loader->pushAutoLoader(array('Doctrine', 'autoload'));\n $loader->pushAutoLoader(array('Doctrine', 'modelsAutoLoad'));\n \n //tell doctrine to load the models but load them conservatively\n $manager = Doctrine_Manager::getInstance();\n $manager->setAttribute(Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);\n $manager->setAttribute(Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE, true);\n Doctrine::loadModels($options[\"modelPath\"]);\n \n $manager->openConnection($options[\"connectionString\"], 'db');\n \n //return doctrine manager as the resource that was bootstrapped\n return $manager;\n }", "title": "" }, { "docid": "0a9ee2f78a9cd16010f85f5f65cd8ec3", "score": "0.5762197", "text": "private function getDbMan()\n {\n global $DB;\n\n return $DB->get_manager();\n }", "title": "" }, { "docid": "1c7ede450546bbedb3d18fb595e1f0c9", "score": "0.57486224", "text": "public static function obtain()\n\t{\n \t\tif(is_null(self::$instance))\n \t\t{\n \t\t\tself::$instance = new Config;\n \t\t}\n\t\treturn self::$instance;\n\t}", "title": "" }, { "docid": "d41bb3e76cdcec16d2a2a05a0f6c8bf0", "score": "0.574825", "text": "function getDb(/*$type*/)\n{\n static $database, $type;\n if($database)\n return $database;\n\n if(func_num_args() == 1)\n $type = func_get_arg(0);\n\n $systems = getConfig()->get('systems');\n // load configs only once\n if($systems !== null)\n $type = $systems->database;\n\n switch($type)\n {\n case 'SimpleDb':\n $database = new DatabaseSimpleDb();\n break;\n case 'MySql':\n $database = new DatabaseMySql();\n break;\n }\n\n if($database)\n return $database;\n\n throw new Exception(\"DataProvider {$type} does not exist\", 404);\n}", "title": "" }, { "docid": "009c486e34884909e1621ad2aaf8eb86", "score": "0.5729597", "text": "public static function factory() {\n\t\tstatic $instance = false;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "90d5464fbb9abc422c9c7285d8e10a85", "score": "0.56987244", "text": "public static function createReportManager()\n {\n $mail_driver = ucfirst( camel_case( config('mail.driver') ) );\n $file_path = sprintf(\"%s/../ReportManager/%sReportManager.php\", __DIR__, $mail_driver);\n $mailer_choice = file_exists( $file_path ) ? $mail_driver : 'Default';\n $class_name = config('mass_mailer.package_namespace') . 'ReportManager\\\\' . $mailer_choice . 'ReportManager';\n\n return self::create( $class_name );\n }", "title": "" }, { "docid": "dc1fe952099ca6c86e9032f01dcd7b4b", "score": "0.56759274", "text": "protected function getObjectManager(): ObjectManager\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "2bfff4a2f007eb79530b9fdfd17ebd8e", "score": "0.5666477", "text": "public function __construct(){\n $this->database = new DBManager();\n }", "title": "" }, { "docid": "3a886ca1d963c68cae414c2b652e535d", "score": "0.56498873", "text": "static function getInstance()\n {\n if (!ServiceManager::$instance) {\n ServiceManager::$instance = new ServiceManager();\n }\n return ServiceManager::$instance;\n }", "title": "" }, { "docid": "5794712d13ff899bf76794e273689557", "score": "0.5627426", "text": "public static function getInstance() {\n if (!isset(self::$instance)) {\n self::$instance = new EmployeeManager();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "978ce8877c36eda9e1565f8df0712000", "score": "0.56249154", "text": "public static function getInstance(){\n if( !isset( self::$INSTANCE ) ){\n self::$INSTANCE = new Database();\n }\n return self::$INSTANCE;\n }", "title": "" }, { "docid": "9d9062010b422f6c1286e9be735cba75", "score": "0.5611129", "text": "static function &GetInstance($configuration_name = \"default\",$options = array()){\n\t\t$options[\"class_name\"] = \"OracleMole\";\n\t\treturn parent::GetInstance($configuration_name,$options);\n\t}", "title": "" }, { "docid": "30d28f5bda70c6dffed64fb7c6265dd9", "score": "0.5592893", "text": "public static function getInstance()\n\t{\n\t\tif (!self::$m_pInstance)\n\t\t{\n\t\t\tself::$m_pInstance = new Database();\n\t\t}\n\n\t\treturn self::$m_pInstance;\n\t}", "title": "" }, { "docid": "88100befde4bd17f09c2c8840ab2f4fd", "score": "0.5591116", "text": "public static function getInstance(){\n if (!isset(self::$INSTANCE)){\n self::$INSTANCE = new Database();\n }\n return self::$INSTANCE;\n }", "title": "" }, { "docid": "f2c1b77ccd821c59eb190367aa27f4a8", "score": "0.5586908", "text": "public static function getInstanceData($data) {\n return parent::getInstance($data, __CLASS__);\n }", "title": "" }, { "docid": "f2c1b77ccd821c59eb190367aa27f4a8", "score": "0.5586908", "text": "public static function getInstanceData($data) {\n return parent::getInstance($data, __CLASS__);\n }", "title": "" }, { "docid": "0755e75b072ae96db602d80a1399965c", "score": "0.55768853", "text": "public function MeManager()\n\t{\n\t\treturn $this->meManager;\n\t}", "title": "" }, { "docid": "ef872fdcf14741ef72f67e5be91aa1a2", "score": "0.55761194", "text": "public function getManager()\n {\n $manager = $this->manager;\n if (null === $manager) {\n $registry = $this->getRegistry();\n $manager = $registry->getManagerForClass(RootNode::class);\n $this->manager = $manager;\n }\n\n return $manager;\n }", "title": "" }, { "docid": "c29e4b3fa592fdf25a42a474bf7c15fc", "score": "0.55727214", "text": "public static function getInstance($config)\n {\n return new Database($config);\n }", "title": "" }, { "docid": "2ac88810f8d1dd6d77016b43ac9c3049", "score": "0.5567202", "text": "public static function getInstance()\n {\n if( !isset(self::$INSTANCE) ) {\n self::$INSTANCE = new Database();\n }\n\n return self::$INSTANCE;\n }", "title": "" }, { "docid": "ca95eda24414a30cd88f65756bf270ef", "score": "0.5563444", "text": "public function manager()\n {\n }", "title": "" }, { "docid": "d2e2696aad9e369931473da0e6575cab", "score": "0.5557653", "text": "protected function getModule_ManagerService()\n {\n return $this->services['module.manager'] = new \\phpbb\\module\\module_manager($this->get('cache.driver'), $this->get('dbal.conn'), $this->get('ext.manager'), 'phpbb_modules', './../', 'php');\n }", "title": "" }, { "docid": "a4887e4ac742ce62165ff90e848dc74a", "score": "0.55517906", "text": "public static function getInstance() {\n\t\tif (self::$_instance === null) {\n\t\t\t// pregatim instanta daca nu o avem setata\n\t\t\tself::$_instance = new Database();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "827aef3737312c5a560399c01980e6cf", "score": "0.5540913", "text": "public function getInstance($data = null)\n {\n if($data instanceof Folder) {\n $data->setFilelib($this->getFilelib());\n return $data;\n }\n\n $className = $this->getClass();\n $folder = new $className();\n if($data) {\n $folder->fromArray($data); \n }\n $folder->setFilelib($this->getFilelib());\n return $folder; \n }", "title": "" }, { "docid": "989378cf333573902e0565371a9f9816", "score": "0.5533098", "text": "public function manager()\n {\n return $this->app->make(GoogleManager::class);\n }", "title": "" }, { "docid": "d684de9ab228403f337f77fb12fd24f7", "score": "0.55305105", "text": "public static function get(): static|IntegrationManager;", "title": "" }, { "docid": "e4b63e7b1adc2e6de703f7da8f71418e", "score": "0.5526566", "text": "public static function getInstance($name) {\n\n // If the requested Dao is already registered, returns the existing instance\n if (isset(self::$_instances[$name])) {\n return self::$_instances[$name];\n }\n\n // Get the requested dao config\n $daoConfig = App::getInstance()->getConf()->getDao($name);\n\n // Get the dao class name\n $daoClassName = $daoConfig['class'];\n\n // Instantiates the given dao\n $dao = new $daoClassName();\n\n // If the dao does not extend the Dao class, throw an exception\n if (!$dao instanceof Dao) {\n throw new InvalidTypeException('The dao named [' . $name . '] is not valid: Dao expected, [%s] given instead', $dao);\n }\n\n // Setup\n $dao->setup();\n\n // If the dao has no corresponding table name, throw an exception\n if (empty($dao->_tableName)) {\n throw new DaoException('The dao class [' . $daoClassName . '] has been created without a table name.');\n }\n\n // If the dao has no corresponding primary key name, sets the default one\n if (empty($dao->_primaryKeyName)) {\n $dao->_primaryKeyName = self::DEFAULT_PK_NAME;\n }\n\n // Get the dao connection name (if any)\n $daoConnectionName = isset($daoConfig['connection']) ? $daoConfig['connection'] : null;\n\n // Sets the appropriate connection\n $dao->setConnection(DbConnection::getInstance($daoConnectionName));\n\n // Gestion du cache\n if (isset($daoConfig['cache']) && $dao->_hasCachedMethods()) {\n $dao = CachedDao::create($dao, $daoConfig['cache']);\n }\n\n // Store the Dao in the list of instances\n self::$_instances[$name] = $dao;\n\n // Returns the Dao\n return $dao;\n }", "title": "" }, { "docid": "8ac9fe31087160497369b8d621c1ec2a", "score": "0.5521975", "text": "protected function getManager()\n {\n $gdm = $this->get('wobblecode_manager.document_manager')\n ->setDocument('WobbleCodeUserBundle:Organization')\n ->setKey('organization')\n ->setAcceptFromRequest(['page', 'query', 'itemsPerPage'])\n ->setItemsPerPage(2)\n ->setQueryFields(['name', 'type']);\n\n return $gdm;\n }", "title": "" }, { "docid": "ce2e0351905df13831e1ecf2b853d6ce", "score": "0.5520589", "text": "public static function manager(string $table = '', array $options = []): AbstractManagerClass\n {\n if (!empty($table)) {\n $table_name = $table;\n if (strpos($table, '.') !== false) {\n $segments = explode('.', $table);\n $table_name = array_pop($segments);\n }\n $project_namespace = self::config('project_namespace') ?? '';\n if (substr($project_namespace, 0, 1) != '\\\\') {\n $project_namespace = \"\\\\$project_namespace\";\n }\n if (substr($project_namespace, -1) != '\\\\') {\n $project_namespace .= '\\\\';\n }\n $namespace = $options['namespace'] ?? $project_namespace;\n $class_name = $namespace . 'Manager\\\\' .\n StrKit::convert($table_name, StrKit::CASE_U_CAMEL) . AbstractManagerClass::MODEL_TYPE;\n if (class_exists($class_name)) {\n $class = new $class_name($options);\n return $class;\n }\n }\n\n return new ManagerAgent($table, $options);\n }", "title": "" }, { "docid": "28e1bdf4184d012d061c08c633d54719", "score": "0.5520146", "text": "public static function getInstance() {\n if (!self::$instance instanceof self) {\n Bolts_Log::info(\"Creating plugin manager\"); \n self::$instance = new self;\n }\n return self::$instance;\n }", "title": "" }, { "docid": "4e929b7283f738e0624515bf85ef716a", "score": "0.551964", "text": "protected function createObject()\n {\n //这里的配置,请从Config读取\n $conf = new Config(\\EasySwoole\\EasySwoole\\Config::getInstance()->getConf('database'));\n $db = new MysqlPoolObj($conf);\n return $db;\n }", "title": "" }, { "docid": "6d995f265ae871170446f9799b5939c3", "score": "0.5517165", "text": "protected function getObjectManager()\n {\n if ($this->objectManager === null) {\n $this->objectManager = new ObjectManager($this);\n }\n\n return $this->objectManager;\n }", "title": "" }, { "docid": "29c00fed89eaa9d715096923bba7c2f9", "score": "0.5515962", "text": "public function getConfigurationManager(): ConfigurationManagerInterface\n {\n return $this->configurationManager;\n }", "title": "" }, { "docid": "424114d055ea3ca09bf83fcd257af958", "score": "0.5514769", "text": "public static function createMailingListManager()\n {\n $mail_driver = ucfirst( camel_case( config('mail.driver') ) );\n $file_path = sprintf(\"%s/../MailingListManager/%sMailingListManager.php\", __DIR__, $mail_driver);\n $mailer_choice = file_exists( $file_path ) ? $mail_driver : 'Default';\n $class_name = config('mass_mailer.package_namespace') . 'MailingListManager\\\\' . $mailer_choice . 'MailingListManager';\n\n return self::create( $class_name );\n }", "title": "" }, { "docid": "b7416068e74434ffb62ab618744541e8", "score": "0.55138344", "text": "static public function instance() {\n\t\tstatic $objDB;\n\t\t\n\t\tif(!isset($objDB)) {\n\t\t\t$objDB = new Database();\n\t\t}\n\t\t\n\t\treturn $objDB;\n\t}", "title": "" }, { "docid": "f71a5ce54e95d53981bb6afdc1260d6d", "score": "0.5509033", "text": "public static function factory($data)\n {\n $class = get_called_class();\n $result = new $class;\n $result->hydrate($data);\n\n return $result;\n }", "title": "" }, { "docid": "2f3ae504b9d153ebae2b89b4638f6511", "score": "0.5506945", "text": "public static function getInstance()\n {\n return new self();\n }", "title": "" }, { "docid": "c824cbdfd41643f306a42056323b7fda", "score": "0.5503553", "text": "public static function getInstance()\n {\n if (! isset(self::$instance))\n {\n $localSettingCacheService = new LocalSettingCacheService();\n $userIdentifier = Session::get_user_id();\n self::$instance = new self($localSettingCacheService, $userIdentifier);\n }\n \n return self::$instance;\n }", "title": "" }, { "docid": "fc49b19d7798cb100f84309e892dfcb2", "score": "0.54998934", "text": "public static function getInstance()\n {\n return new self;\n }", "title": "" }, { "docid": "74cbfc7db0836a1000d6f717077918e5", "score": "0.549872", "text": "public static function getInstance ()\n {\n return self::getCachedInstance();\n }", "title": "" }, { "docid": "b480625d36c0b9617e36ebef2498a29f", "score": "0.54957765", "text": "public function factory( array $data = [] ) {\n\t\t$model = $this->newQuery()->getModel()->newInstance();\n\t\t$this->setModelData( $model, $data );\n\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "aa20698cfb127d77a303342d452158dd", "score": "0.5490195", "text": "protected function manager($inherited = true)\n {\n if ($inherited) {\n // Get the inherited manager.\n // Example: if using $vfi->client, we actually get Dynatron/Iam here, NOT Dynatron/Vfi becuase Vfi inherits from Iam\n return app($this->realNamespace());\n } else {\n // Get the first non-inherited manager.\n // Example: if using $vfi->client, we actually get Dynatron/Vfi here, even though Vfi inherts from Iam, we want Vfi\n $class = get_class($this);\n $baseClass = substr($class, 0, strrpos($class, '\\\\'));\n return app($baseClass);\n }\n }", "title": "" }, { "docid": "9043f3fe30a21ac62061befee3e658d9", "score": "0.54881644", "text": "public function factory( array $data ) {\n\t\t$model = $this->newQuery()->getModel()->newInstance();\n\t\t$this->setModelData( $model, $data );\n\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "4ba8bd520697482491cd491f1aadc1e9", "score": "0.5485433", "text": "function &singleton() {\n\t\tstatic $singleton;\n\t\tif (! is_object($singleton) ) {\n\t\t\t$singleton = new Forum_Queries();\n\t\t\t$singleton->init();\n\t\t}\n\n\t\treturn $singleton;\n\t}", "title": "" }, { "docid": "cf72138e3f1a4da354f852ce95633469", "score": "0.54818255", "text": "public function getDefinitionManager()\n {\n return $this->dm;\n }", "title": "" }, { "docid": "76f2a98e8dea1ffb5f5e023b188cbe7f", "score": "0.54687554", "text": "protected function getManager() {\n\t\tif ($this->em != null) return $this->em;\n\t\n\t\t$this->em = $this->getContainer()->get('doctrine')->getManager();\n\t\t$this->em->getConnection()->getConfiguration()->setSQLLogger(null);//Turn off sql logger\n\t\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "11b67fe12b56b077fe877645747366bf", "score": "0.5465968", "text": "public function __invoke()\n {\n if (!$this->aclManager) {\n $this->aclManager = new AclManager;\n $this->aclManager->setSection(\"module\")->setModule($this->getController()->getModule());\n }\n return $this->aclManager;\n }", "title": "" }, { "docid": "7992ce1b97a99b4afa4f7d39225f0c60", "score": "0.5462421", "text": "public static function instance(){\n if(!isset(self::$singleton)){\n self::$singleton = new CorsoDiLaureaFactory();\n }\n \n return self::$singleton;\n }", "title": "" }, { "docid": "5bd137d0f27041cdccdfb69b0adeed70", "score": "0.5460888", "text": "protected abstract function getDAO();", "title": "" }, { "docid": "ad073102ee97e1d97bd9c5b69c8de3c3", "score": "0.54590297", "text": "private function cb_transient_manager() {\n\t\treturn new DLM_Transient_Manager();\n\t}", "title": "" }, { "docid": "1281234aa3db10130b9bb1f9be9f849d", "score": "0.5458765", "text": "public static function instance($data);", "title": "" }, { "docid": "4cf740d4f21eac783f28526eb1f25e1b", "score": "0.54587173", "text": "public static function getInstance()\n {\n if (self::$instance == null) {\n\n $db = $GLOBALS['database'];\n\n /** @var \\PDO */\n self::$instance = new Database($db['dsn'], $db['user'], $db['pass'], []);\n self::$instance->setAttribute(Database::ATTR_ERRMODE, Database::ERRMODE_EXCEPTION);\n self::$instance->setAttribute(Database::ATTR_DEFAULT_FETCH_MODE, Database::FETCH_OBJ);\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "1f88c06dc1d93897f6288ab0a0aa468b", "score": "0.545742", "text": "public static function getInstance() {\n if (self::$instance == null) {\n self::$instance = new AdminMapper();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "30ec8631a75c7c9dd1a0f80b594dad13", "score": "0.5454232", "text": "function &getInstance(){\n\t\t\n\t\tstatic $instance = null;\n\t\tif ( $instance === null ){\n\t\t\t$instance = new Dataface_PermissionsTool();\n\t\t}\n\t\treturn $instance;\n\t}", "title": "" }, { "docid": "526f83b5aee97617ea0d21453b180275", "score": "0.5453224", "text": "public static function getInstance() {\n if (empty(self::$instance)) {\n self::$instance = new Database();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "03e6cec17228472fd930fb6488d595ea", "score": "0.5452331", "text": "static function getInstance()\n {\n if (self::$_instance === null) {\n $frontend = 'Core';\n $frontendOptions = [\n 'lifetime' => 3600,\n 'automatic_serialization' => true,\n ];\n $backend = 'File';\n\n $cacheDir = ROOT_PATH . DIRECTORY_SEPARATOR . 'tmp/sys_cache/';\n\n if (!is_dir($cacheDir))\n {\n $oldMask = @umask(0);\n mkdir($cacheDir, 0750, true);\n chmod($cacheDir, 0750);\n umask($oldMask);\n }\n\n $backendOptions = [\n 'cache_dir' => $cacheDir\n ];\n\n self::$_instance = Zend_Cache::factory(\n $frontend,\n $backend,\n $frontendOptions,\n $backendOptions\n );\n }\n return self::$_instance;\n }", "title": "" }, { "docid": "957845c54cc6fe006f76f28e0e57f6c5", "score": "0.5446283", "text": "public static function getInstance()\n {\n return new static();\n }", "title": "" } ]
1c0d63b04fa7c1e2b50608658de238d9
Check if files are acceptable
[ { "docid": "1dc1f23961def7455eba841bb91adef9", "score": "0.75464076", "text": "public function checkFiles(){\n\t\tforeach($this->_files as $key => $upload){\n\t\t\t$ok = true;\n\t\t\tswitch(true){\n\t\t\t\tcase strpos($upload->name,'.php')!==false:\n\t\t\t\tcase strpos($upload->name,'.php3')!==false:\n\t\t\t\t\t$ok = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(isset($this->_options)){\n\t\t\t\tforeach($this->_options as $optionKey => $params){\n\t\t\t\t\tswitch($optionKey){\n\t\t\t\t\t\tcase 'forcename':\n\t\t\t\t\t\t\t$upload->name = $params.'.'.$upload->getExtension();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'accept':\n\t\t\t\t\t\t\tif(!in_array($upload->getExtension(),$params)){\n\t\t\t\t\t\t\t\t$this->setError('Ce type de fichier n\\'est pas autorisé : '.$upload->getExtension());\n\t\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'refuse':\n\t\t\t\t\t\t\tif(in_array($upload->getExtension(),$params)){\n\t\t\t\t\t\t\t\t$this->setError('Ce type de fichier n\\'est pas autorisé : '.$upload->getExtension());\n\t\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'count':\n\t\t\t\t\t\t\tif( count($this->_files) > $params){\n\t\t\t\t\t\t\t\t$this->setError('Le nombre de fichiers est dépassé. Nombre de fichier(s) autorisé(s) : '.$params);\n\t\t\t\t\t\t\t\t$ok = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($ok===false){\n\t\t\t\tunset($this->_files[$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "17d3ca5a870cf7eb2102c4d9f5264e7f", "score": "0.7269546", "text": "function file_check($file){\n\n\t\t// stuff we definitely don't want to see in a file name\n\t\t$bad = array(\"../\",\"./\",\"<!--\",\"-->\",\"<\",\">\",\"'\",'\"','&','$','#','{','}','[',']','=',';','?',\"%20\",\"%22\",\"%3c\",\"%253c\",\"%3e\",\"%0e\",\"%28\",\"%29\",\"%2528\",\"%26\",\"%24\",\"%3f\",\"%3b\",\"%3d\");\n\n\t\t// if there are excludes, consider them \"bad\"\n\t\tif(is_array($this->options->exclude))\n\t\t\t$bad = array_merge($bad, $this->options->exclude);\n\n\t\t// get rid of any of the above\n\t\t$file = stripslashes(str_replace($bad, '', $file));\n\n\t\t// make sure the file is really a file still\n\t\treturn is_file($file);\n\n\t}", "title": "" }, { "docid": "01a0868c444581c775836f3595930f4a", "score": "0.7193886", "text": "function check_files($filenames) {\n if (\n !is_dir($filenames->dir)\n || !file_exists($filenames->parser)\n || !file_exists($filenames->intr)\n || !file_exists($filenames->xml)\n || !file_exists($filenames->cfg)\n ){\n fwrite(STDERR, \"ERROR: Invalid File was specified\\n\");\n exit(41);\n }\n}", "title": "" }, { "docid": "dc8a4f9cfb705d4da66b320d6ea95c63", "score": "0.709999", "text": "public function isOkFileNeeded();", "title": "" }, { "docid": "5626dfc66e43e838ce5622b1365ca4eb", "score": "0.7090923", "text": "public function fileValidate() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$typeFile = array('image/gif' , 'image/jpeg' , 'image/jpg' , 'image/png');\n\t\t\n\t\tif(empty($_FILES['file']['name'])) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(in_array($_FILES['file']['type'] , $typeFile)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b518d848d7c64c8ad878f6a9be6293ff", "score": "0.70049775", "text": "public function validate( $fileName )\n {\n return in_array( $fileName , $this->acceptedFileList );\n }", "title": "" }, { "docid": "3377f8879d2cf2b20fe4939a5391c633", "score": "0.6847408", "text": "function isValidFile($file, $allowed_types = array('image/jpeg','image/gif')){\t\t\n\t\tif(in_array(trim($this->getMime($file)), $allowed_types)){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "64caa23be2e9b2409f856b9be1b8f09f", "score": "0.68335736", "text": "private function fileCheck()\n\t{\n\t\tif (\n\t\t (($this->ext == \".jpg\")||($this->ext == \".JPG\"))\n\t\t&& ($this->file[\"size\"] < $this->fileSizeLimit)\n\t\t&&(($this->file[\"type\"] == \"image/jpeg\")||($this->file[\"type\"] == \"image/jpg\")))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "bd4a71286a9c39736f185c326b4fa7f6", "score": "0.6805726", "text": "function checkUploadConditions(){\n\n\t\t//-------- extension and type check -----------//\n\t\t$arr = explode(\".\", $this->name);\n\t\t$ext = $arr[count($arr)-1];\n\t\tforeach ($this->supported_extensions as $each_ext => $type) {\n\t\t\t$each_type = explode(\",\", $type);\n\t\t\tforeach ($each_type as $type) {\n\t\t\t\tif (string_strtolower($each_ext) == string_strtolower($ext) && $this->type == $type) $allow = TRUE;\n\t\t\t\tif (string_strtolower($each_ext) == string_strtolower($ext) && \"all\" == $type) $allow = TRUE;\n\t\t\t}\n\t\t}\n\t\tif (!$allow) {\n\t\t\t$this->error_type = 1;\n\t\t\treturn FALSE;\n\t\t}\n\t\t//----------------------------------------------//\n\n\t\t//------ size check ----------------------------//\n\t\tif($this->size > $this->max_file_size) {\n\t\t $this->error_type = 2;\n\t\t return FALSE;\n\t\t}\n\t\t//----------------------------------------------//\n\n\n\t\t//----- directory check ------------------------//\n\t\tif(!file_exists($this->dst_dir)){\n\t\t if(!$this->createDiretoryStructure()){\n\t\t\t$this->error_type = 3;\n\t\t\treturn FALSE;\n\t\t } else {\n\t\t\treturn TRUE;\n\t\t }\n\t\t} elseif (!is_writable($this->dst_dir)){\n\t\t $this->error_type = 4;\n\t\t return FALSE;\n\t\t} else {\n\t\t return TRUE;\n\t\t}\n\t\t//----------------------------------------------//\n\n\t }", "title": "" }, { "docid": "2d0487559cdb5f5cc810eb86ac39af69", "score": "0.6775835", "text": "function ft_check_file($file) {\n // Check against file blacklist.\n if (FILEBLACKLIST != \"\") {\n $blacklist = explode(\" \", strtolower(FILEBLACKLIST));\n if (in_array(strtolower($file), $blacklist)) {\n return FALSE;\n } else {\n return TRUE;\n }\n } else {\n return TRUE;\n }\n}", "title": "" }, { "docid": "93379fce75599520389e0cd1671a806d", "score": "0.67752814", "text": "function validate_actuals_file() {\n return validate_post_file($this->request->getPost(\"file_name\"));\n }", "title": "" }, { "docid": "0733b65bacb43c35db470aed520ea520", "score": "0.67332715", "text": "function isAllowedFile($filename) {\n\tif (!defined('ALLOWED_FILES')) return true;\n\t$allowedFiles = explode('|', ALLOWED_FILES);\n\tforeach ($allowedFiles as $allowedFile) {\n\t\tif (fnmatch($allowedFile, strtolower($filename))) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "551cb663b6ccfb659bae0235d8a1e602", "score": "0.6728111", "text": "function validate_file() {\n return validate_post_file($this->request->getPost(\"file_name\"));\n }", "title": "" }, { "docid": "551cb663b6ccfb659bae0235d8a1e602", "score": "0.6728111", "text": "function validate_file() {\n return validate_post_file($this->request->getPost(\"file_name\"));\n }", "title": "" }, { "docid": "a08ab5196b70a203dc69dce6a3405e1e", "score": "0.66929716", "text": "protected function is_valid(){\n if (empty ($this->_file['name'])){\n $this->set_error(1);\n return false;\n }\n if (empty ($this->_uploads_folder) || !file_exists($this->_uploads_folder)){\n $this->set_error(2);\n return false;\n }\n if (!in_array ($this->_ext, $this->_allowed_exts)){\n $this->set_error(3);\n return false;\n }\n if (!$this->validate_size()){\n $this->set_error(4);\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "f00b55ad898e35ee3617de4117a6e427", "score": "0.66563565", "text": "public function isFileUploadValid()\r\n {\r\n // Get multiple files uploaded\r\n $files = $_FILES[$this->_nameFiles];\r\n $files['tmp_name'] = array_filter($files['tmp_name']);\r\n $file_count = count($files['tmp_name']);\r\n $allow_extentions = array_filter(array_map('trim', explode(',', $this->_privateValidators['Extension'])));\r\n\r\n for ($i = 0; $i < $file_count; $i++) {\r\n foreach ($this->_privateValidators as $key => $option) {\r\n $file_name = $files['name'][$i];\r\n $file_size = $files['size'][$i];\r\n\r\n if ($option && $file_name) {\r\n switch ($key) {\r\n case 'Extension':\r\n if (!in_array(pathinfo($file_name, PATHINFO_EXTENSION), $allow_extentions)) {\r\n $error_message = Zend_Registry::get('Zend_Translate')->_(\"The file '{$file_name}' has a false extension\");\r\n $this->_messages[] = $error_message;\r\n return false;\r\n }\r\n break;\r\n case 'Size':\r\n if ($file_size > $this->_privateValidators[$key]) {\r\n $allow_size = round(($this->_privateValidators[$key] / 1024), 2) . ' KB';\r\n $file_size = round(($file_size / 2014), 2) . ' KB';\r\n $error_message = Zend_Registry::get('Zend_Translate')->_(\"Maximum allowed size for file '{$file_name}' \"\r\n . \"is '{$allow_size}' but '{$file_size}' detected\");\r\n $this->_messages[] = $error_message;\r\n return false;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "7abe391f84c424df9f49fd6cc43db90e", "score": "0.6610509", "text": "private function _validates()\n {\n // file existance\n if (!file_exists($this->_filename)) {\n return false;\n }\n\n // file extension\n if (!preg_match('/\\.csv$/i', $this->_filename)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "7d4f233493c0fa81185819819da643ee", "score": "0.66103625", "text": "public function ValidateFile() {\r\n\t\t$fileName = explode(\".\", $_FILES[$this->file][$this->name]);\r\n\t\t$fileType = $_FILES[$this->file][$this->type];\r\n\t\t$fileExt = end($fileName);\r\n\t\t\r\n\t\tif (in_array($fileExt, $this->allowedExts) && in_array($fileType, $this->allowedFileTypes)) {\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "8181e11775be61fbb3d41c15326bd71c", "score": "0.65965474", "text": "function checkCorrectFile( $name, $is = 'jpg|jpeg' ){\n\t\treturn preg_match( '/^('.$is.'|)$/', $this->throwExtOfFile( $name ) );\n\t}", "title": "" }, { "docid": "41cc2de1ea05256d30a88c2f4a9d318e", "score": "0.65736896", "text": "public abstract function checkFormat($filename);", "title": "" }, { "docid": "053f52bfde28d000d82e166a9102b62f", "score": "0.6568683", "text": "function verifyFile($files, $name)\n{\n\t// If this request falls under any of them, treat it invalid.\n\tif (\n\t\t!isset($files[$name]['error']) ||\n\t\tis_array($files[$name]['error'])\n\t) {\n\t\tthrow new RuntimeException('Invalid parameters.');\n\t}\n\n\t// Check $files[$name]['error'] value.\n\tswitch ($files[$name]['error']) {\n\t\tcase UPLOAD_ERR_OK:\n\t\t\tbreak;\n\t\tcase UPLOAD_ERR_NO_FILE:\n\t\t\tthrow new RuntimeException('No file sent.');\n\t\tcase UPLOAD_ERR_INI_SIZE:\n\t\tcase UPLOAD_ERR_FORM_SIZE:\n\t\t\tthrow new RuntimeException('Exceeded filesize limit.');\n\t\tdefault:\n\t\t\tthrow new RuntimeException('Unknown errors.');\n\t}\n\n\t// You should also check filesize here.\n\tif ($files[$name]['size'] > 1000000) {\n\t\tthrow new RuntimeException('Exceeded filesize limit.');\n\t}\n\n\t// DO NOT TRUST $files[$name]['mime'] VALUE !!\n\t// Check MIME Type by yourself.\n\t$finfo = new finfo(FILEINFO_MIME_TYPE);\n\tif (false === $ext = array_search(\n\t\t$finfo->file($files[$name]['tmp_name']),\n\t\tarray(\n\t\t\t'jpg' => 'image/jpeg',\n\t\t\t'png' => 'image/png',\n\t\t\t'gif' => 'image/gif',\n\t\t),\n\t\ttrue\n\t)) {\n\t\tthrow new RuntimeException('Invalid file format.');\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "04db2e1bd75929bac80791e2920d0cc1", "score": "0.65685105", "text": "function checkValidFile($fileBaseName, $acceptList = null)\n{\n $valid = false;\n\n if ($fileBaseName && $acceptList == null) {\n /*\n * just accept\n */\n return true;\n }\n /*\n * check for injection\n */\n if (isInjected($fileBaseName)) {\n return false;\n }\n /*\n * split the file name to get extension\n */\n\n //var_dump($fileBaseName);\n\n $arrExt = explode('.', $fileBaseName);\n if (!is_array($arrExt)) {\n return false;\n }\n $ext = strtolower($arrExt[count($arrExt) - 1]);\n\n /*\n * check against the accepted format provided\n */\n $arrAccep = explode('/', $acceptList);\n foreach ($arrAccep as $curExt) {\n if ($ext == strtolower($curExt)) {\n $valid = true;\n break;\n }\n }\n return $valid;\n}", "title": "" }, { "docid": "ab5e1965c85fe41fcc51f7cbb7618980", "score": "0.65518284", "text": "function ft_check_fileactions() {\n if (FILEACTIONS === TRUE) {\n // Uploads are universally turned on.\n return TRUE;\n } else if (FILEACTIONS == TRUE && FILEACTIONS == substr(ft_get_dir(), 0, strlen(FILEACTIONS))) {\n // Uploads are allowed in the current directory and subdirectories only.\n return TRUE;\n }\n return FALSE; \n}", "title": "" }, { "docid": "627e6a37f38ffb28a180ca177db556eb", "score": "0.6534329", "text": "protected function validateFiles()\n {\n if (!is_file($this->file1)) {\n throw new DiffException('File #1 is not valid.');\n }\n\n if (!is_file($this->file2)) {\n throw new DiffException('File #2 is not valid.');\n }\n }", "title": "" }, { "docid": "a0fe4518fb68a26fd5c04c51f5c74167", "score": "0.6522273", "text": "public function supports($file);", "title": "" }, { "docid": "a0f47d8d5979bb51c9f9c936bd84d1ff", "score": "0.65204245", "text": "public function isFileAllowed($filePath);", "title": "" }, { "docid": "c816808b074e4a6e11385002291e2c9f", "score": "0.650747", "text": "public function validateFile(): bool;", "title": "" }, { "docid": "16b7f2fa3a43ef4f5c3f3b3eb25fd10a", "score": "0.6503393", "text": "public function validate_extension() {\n\t\tif(isset($this->source[\"tmp_name\"]) && file_exists($this->source[\"tmp_name\"])) {\n\t\t\t$exts = array(\"image/jpeg\",\"image/gif\",\"image/png\");\n\t\t\t$ext = $this->source[\"type\"];\n\t\t\t$valid = 0;\n\t\t\tforeach($exts as $current) {\n\t\t\t\tif($current == $ext) {\n\t\t\t\t\t$valid = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($valid != 1) {\n\t\t\t\t$this->error .= \"extension\";\n\t\t\t}\n\t\t} else {\n\t\t\t$this->error .= \"source\";\n\t\t}\n\t}", "title": "" }, { "docid": "acc78ebf13e3427624114c5aaae30dfb", "score": "0.650286", "text": "function is_valid_file($filename) {\n\tswitch ($filename) {\n\t\tcase '.':\n\t\t\treturn false;\n\t\t\tbreak;\n\t\t\n\t\tcase '..':\n\t\t\treturn false;\n\t\t\tbreak;\n\n\t\tcase '.DS_Store':\n\t\t\treturn false;\n\t\t\tbreak;\n\n\t\tcase 'album.json':\n\t\t\treturn false;\n\t\t\tbreak;\n\n\t\tcase 'readme.txt':\n\t\t\treturn false;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\treturn true;\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "7966641055f88fc712c5098942424078", "score": "0.64603645", "text": "protected function multipleFilesAllowed()\n {\n return $this->config->get('type') === 'assets';\n }", "title": "" }, { "docid": "0d93bdbc392e1f5934398d4aff8392e5", "score": "0.6450769", "text": "function valid_file_upload($fileName){\r\n $name = explode('.', $_FILES[$fileName]['name']);\r\n if($name[count($name)-1]=='txt'||$name[count($name)-1]=='fasta'||$name[count($name)-1]=='fa'){\r\n \treturn 1;\r\n }\r\n \treturn 0;\r\n}", "title": "" }, { "docid": "5656d7a528e744e00b94874e36c0dd8a", "score": "0.6446572", "text": "function isFileType($files) {\n $allowedExts = array(\"jpg\", \"jpeg\", \"gif\", \"png\", \"doc\", \"docx\", \"txt\", \"rtf\", \"pdf\", \"xls\", \"xlsx\", \"ppt\", \"pptx\");\n $temp = explode(\".\", $files);\n $extension = end($temp);\n if (in_array($extension, $allowedExts))\n return true;\n else\n return false;\n}", "title": "" }, { "docid": "1236ee109996683c3aec1d2bcf80bbee", "score": "0.6444494", "text": "private function __checkFile($uploadData = []) {\n\t\tif (!isset($uploadData['error']) || $uploadData['error'] == true) {\n\t\t\tLog::info('File upload error.');\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isset($uploadData['tmp_name']) || empty($uploadData['tmp_name'])) {\n\t\t\tLog::info('Missing file name.');\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!isset($uploadData['type'])) {\n\t\t\tLog::info('Missing Mime type.');\n\t\t\treturn false;\n\t\t}\n\n\t\t// May need to do some additional file checking in the future.\n\t\t// Look at https://secure.php.net/manual/en/function.id3-get-tag.php\n\t\t// Using mime_content_type() may return application/octet-stream on some mp3 files\n\t\t$allowed = [\n\t\t\t'png' => 'image/png',\n\t\t\t'jpg' => 'image/jpeg',\n\t\t\t'gif' => 'image/gif'\n\t\t];\n\t\tif (!array_search($uploadData['type'], $allowed)) {\n\t\t\tLog::info('Mime type not allowed. Type uploaded: ' . $uploadData['type']);\n\t\t\treturn true;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0b44eabed980731cbe3ba8000006192e", "score": "0.6429915", "text": "private function verifyFilePresence() {\n if (strlen($this->targetFileExtension) === 0 || strlen($this->targetFileName) === 0) {\n throw new Exception(\"No file has been set.\");\n }\n }", "title": "" }, { "docid": "355153fff241dc112e7eb517b90ab91a", "score": "0.6411962", "text": "private static function isValidType()\n\t{\n\t\tfor($i = 0; $i != count($_FILES['pics']['tmp_name']); ++$i)\n\t\t{\n\t\t\t$array = array('gif', 'jpg', 'png', 'jpeg', 'GIF', 'JPG', 'PNG', 'JPEG', 'PNG');\n\t\t\t$parts = explode('.', $_FILES['pics']['name'][$i]);\n\t\t\t$ext = end($parts);\n\t\t\t\n\t\t\tif(!in_array($ext, $array))\n\t\t\t{\n\t\t\t\t$error = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($error))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "f2b9b7318e50af670bd5fafb311245b1", "score": "0.64013237", "text": "function validate_file() {\n return validate_post_file($this->input->post(\"file_name\"));\n }", "title": "" }, { "docid": "7fb4992f99a306e17bfc09d1da967033", "score": "0.6397086", "text": "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}", "title": "" }, { "docid": "499cf73ed85f8449f06fc5e699cfc1da", "score": "0.63885003", "text": "function userfile_check()\n\t{\n\t\tif ($_FILES['avatar']['size'] > 0) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$this->form_validation->set_message('userfile_check', 'The {field} file is required');\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "30bd7f343c3d2b94a928789c8e57ef86", "score": "0.63560295", "text": "public function checkFileValid()\n\t{\n\t\t$flag = true;\n\t\t$ak901=$this->ak9->getAK901();\n\t\t$ak902=$this->ak9->getAK902();\n\t\t$ak903=$this->ak9->getAK903();\n\t\t$ak904=$this->ak9->getak904();\n\t\tif ($ak901!=AK9::AK901_A&&$ak901!=AK9::AK901_E) {\n\t\t\t$flag = false;\n\t\t}\n\t\tif ($ak902!=$ak903||$ak903!=$ak904) {\n\t\t\t$flag=false;\n\t\t}\n\t\treturn $flag;\n\t}", "title": "" }, { "docid": "075c50ea1f269b58c86357768d94615c", "score": "0.6351637", "text": "public function file_check($str){\n $allowed_mime_type_arr = array('image/gif','image/jpeg','image/pjpeg','image/png','image/x-png');\n $mime = get_mime_by_extension($_FILES['pic']['name']);\n if(isset($_FILES['pic']['name']) && $_FILES['pic']['name']!=\"\"){\n if(in_array($mime, $allowed_mime_type_arr)){\n return true;\n }else{\n $this->form_validation->set_message('file_check', 'Please select only pdf/gif/jpg/png file.');\n return false;\n }\n }else{\n $this->form_validation->set_message('file_check', 'Please choose a file to upload.');\n return false;\n }\n }", "title": "" }, { "docid": "4a8783db6f4c1e898947ba8cd8c320c6", "score": "0.634379", "text": "function hkm_validate_file( $file, $allowed_files = array() ) {\n\tif ( ! is_scalar( $file ) || '' === $file ) {\n\t\treturn 0;\n\t}\n\n\t// `../` on its own is not allowed:\n\tif ( '../' === $file ) {\n\t\treturn 1;\n\t}\n\n\t// More than one occurrence of `../` is not allowed:\n\tif ( preg_match_all( '#\\.\\./#', $file, $matches, PREG_SET_ORDER ) && ( count( $matches ) > 1 ) ) {\n\t\treturn 1;\n\t}\n\n\t// `../` which does not occur at the end of the path is not allowed:\n\tif ( false !== strpos( $file, '../' ) && '../' !== mb_substr( $file, -3, 3 ) ) {\n\t\treturn 1;\n\t}\n\n\t// Files not in the allowed file list are not allowed:\n\tif ( ! empty( $allowed_files ) && ! in_array( $file, $allowed_files, true ) ) {\n\t\treturn 3;\n\t}\n\n\t// Absolute Windows drive paths are not allowed:\n\tif ( ':' === substr( $file, 1, 1 ) ) {\n\t\treturn 2;\n\t}\n\n\treturn 0;\n}", "title": "" }, { "docid": "3f51a5aacf895b9ed1ba87c22385f563", "score": "0.6343614", "text": "public abstract function isFileExtensionOk($extension);", "title": "" }, { "docid": "0b9aeb585bb2b86a3df748d2f45ba937", "score": "0.6318511", "text": "public function checkFile(array $input)\n {\n return true;\n }", "title": "" }, { "docid": "583dcd15992a586bd5521a0816c608ae", "score": "0.6298455", "text": "public function checkMimeType($files)\n {\n\n foreach($files as $type)\n {\n\n // $type = mime_content_type($file);\n if($type === 'image/png' || $type === 'image/jpeg')\n {\n continue;\n }else{\n $this->err['photo'] = \"This is not a photo\";\n return false;\n }\n } \n return true;\n }", "title": "" }, { "docid": "fdc1ba230e8c3206e5a447dc84225798", "score": "0.62968946", "text": "public function accept() : bool{\n /** @var \\SplFileInfo $file */\n $file = $this->current();\n\n return !$this->isHidden($file) && !$this->is404($file) && $this->isCorrectExtension($file);\n }", "title": "" }, { "docid": "9b468539066af56f2aebf983badbcebc", "score": "0.62946445", "text": "public function checkFile() {\n \n // L'utilisateur a t'il selectionné quelque chose ?\n if ($this->_fileSize == 0)\n return \"Vous n'avez pas choisi de fichier à charger !\";\n \n // Est-ce bien un fichier téléchargé :\n if (! is_uploaded_file($this->_serverTempName))\n return \"Attaque par téléchargement de fichier critique détectée !\";\n \n // Verification du code erreur :\n switch ($this->_errNum) {\n case UPLOAD_ERR_INI_SIZE:\n return \"La taille du fichier chargé est trop grande pour le serveur !\";\n case UPLOAD_ERR_FORM_SIZE:\n return \"La taille du fichier chargé est trop grande pour cette page !\";\n case UPLOAD_ERR_PARTIAL:\n return \"Le fichier n'a pas été chargé dans sa totalité !\";\n case UPLOAD_ERR_NO_FILE:\n return \"Le fichier n'a pas été chargé sur le serveur !\";\n }\n \n return True;\n }", "title": "" }, { "docid": "80333deb87718a5a86f0be409e7e9711", "score": "0.6268075", "text": "private static final function checkFILEOperations () {\n // Set\n $_SESSION['FILES'] = new A ($_FILES);\n\n // Foreach\n foreach ($_SESSION['FILES']\n as $objK => $objV) {\n // Switch\n switch ($objV['error']) {\n\n case UPLOAD_ERR_INI_SIZE:\n self::setErrorOnInput (new S ($objK),\n _T ('Upload exceeds limit!'));\n break;\n\n case UPLOAD_ERR_FORM_SIZE:\n self::setErrorOnInput (new S ($objK),\n _T ('Upload exceeds max file size!'));\n break;\n\n case UPLOAD_ERR_PARTIAL:\n self::setErrorOnInput (new S ($objK),\n _T ('Upload was partial!'));\n break;\n\n case UPLOAD_ERR_NO_FILE:\n self::setErrorOnInput (new S ($objK),\n _T ('Upload field was empty!'));\n break;\n\n case UPLOAD_ERR_CANT_WRITE:\n self::setErrorOnInput (new S ($objK),\n _T ('Upload cannot be written to disk!'));\n break;\n\n case UPLOAD_ERR_EXTENSION:\n self::setErrorOnInput (new S ($objK),\n _T ('Upload is of an unknonw file type!'));\n break;\n }\n }\n\n // Check\n if (self::$objFormDataContainer\n ->offsetExists ('accepted_mime_types')) {\n // Set\n $aNotSoRandomString = _PIPE . time ();\n\n // Check\n if (self::$objFormDataContainer\n ->offsetGet ('accepted_mime_types')\n ->findPos (_PIPE) == FALSE) {\n // Set\n self::$objFormDataContainer\n ->offsetGet ('accepted_mime_types')\n ->appendString ($aNotSoRandomString);\n }\n\n // MIMEs\n $acceptedMIMETypes = self::$objFormDataContainer\n ->offsetGet ('accepted_mime_types')\n ->fromStringToArray (_PIPE);\n\n // Foreach\n foreach ($_SESSION['FILES'] as $objK => $objV) {\n // Chekc\n if (!$acceptedMIMETypes\n ->inArray ($objV['type'])\n ->toBoolean ()) {\n // Check\n if ($acceptedMIMETypes\n ->doCount ()->toInt () == 2) {\n // Set\n self::$objFormDataContainer\n ->offsetGet ('accepted_mime_types')\n ->doToken ($aNotSoRandomString, _NONE);\n }\n\n // Check\n if (self::$objFormDataContainer\n ->offsetExists ('upload_error_message')) {\n // Set\n self::setErrorOnInput (new S ($objK),\n self::$objFormDataContainer\n ->offsetGet ('upload_error_message'));\n } else {\n // Set\n self::setErrorOnInput (new S ($objK),\n _T ('Upload type forbidden. Accepted:')\n ->appendString (_SP)->appendString ($acceptedMIMETypes\n ->fromArrayToString (', ')));\n }\n }\n }\n }\n }", "title": "" }, { "docid": "8e6c68c7ca1e9b9aa1c2c20598b7f502", "score": "0.6259735", "text": "final private function checkFileExt(string $file){\n $sep = explode(\".\", $file);\n return in_array($sep[count($sep) - 1], self::ALLOWED_FORMATS);\n }", "title": "" }, { "docid": "994a360518ea3c38aba7a745f2f724f0", "score": "0.6259706", "text": "public function checkFileValidation($str)\n {\n $allowed_mime_type_arr = array(\n 'image/gif',\n 'image/jpeg',\n 'image/pjpeg',\n 'image/png',\n 'image/x-png'\n );\n\n $mime = get_mime_by_extension($_FILES['image']['name']);\n if (isset($_FILES['image']['name']) && $_FILES['image']['name'] != \"\") {\n if (in_array($mime, $allowed_mime_type_arr)) {\n return true;\n } else {\n $this->form_validation->set_message('checkFileValidation', 'Please select only gif/jpg/png file.');\n return false;\n }\n } else {\n $this->form_validation->set_message('checkFileValidation', 'Please choose a file to upload.');\n return false;\n }\n }", "title": "" }, { "docid": "22f6c37cb8fdab82756931578172f89a", "score": "0.62475353", "text": "function rpm_is_valid($filename)\n{\n}", "title": "" }, { "docid": "81b74d46f8d3ad46dc68d8fa2fc081ae", "score": "0.62460923", "text": "private function checkAllowedExtensions($fileName) {\n\n\t\t$fileExt = pathinfo($fileName, PATHINFO_EXTENSION);\n\n\t\tif (!in_array($fileExt,$this->allowedExtensions)) {\n\t\t\treturn errorHandle::errorMsg($fileName.\": Invalid file type \\\"\".$fileExt.\"\\\"\");\n\t\t}\n\n\t\treturn TRUE;\n\n\t}", "title": "" }, { "docid": "de74f8174d33d4bcd82782f89d9fdb3d", "score": "0.6237875", "text": "public function validateSampleFiles()\n {\n try {\n $linkUploader = $this->_fileUploader->create(['fileId' => 'sample_files']);\n $result = ['error' => false];\n } catch (\\Exception $e) {\n $msg = 'There is some problem in uploading sample files.';\n $result = ['error' => true, 'msg' => $msg];\n }\n return $result;\n }", "title": "" }, { "docid": "3c0895d4475d6790d74edbdbf9583588", "score": "0.6235487", "text": "private function runBasicValidations()\n {\n // Check if source exists\n if (!@file_exists($this->source)) {\n throw new TargetNotFoundException('File or directory not found: ' . $this->source);\n }\n\n // Check if the provided file's extension is valid\n /*\n $fileExtension = $this->getSourceExtension();\n if (!in_array(strtolower($fileExtension), self::$allowedExtensions)) {\n throw new InvalidFileExtensionException('Unsupported file extension: ' . $fileExtension);\n }*/\n\n // Check if the provided file's mime type is valid\n\n $fileMimeType = $this->getMimeTypeOfSource();\n if (!in_array($fileMimeType, self::$allowedMimeTypes)) {\n throw new InvalidFileExtensionException('Unsupported mime type: ' . $fileMimeType);\n }\n }", "title": "" }, { "docid": "ef546a798dedfc844b740cb2985ce7d2", "score": "0.62333536", "text": "private function fileVerification(UploadedFile $file) : bool {\n $mineType = mime_content_type($file->getRealPath());\n return preg_match($this->getParameter('id_images_allowed'), $mineType );\n }", "title": "" }, { "docid": "5e2c42e590952e72cddcd3247c546120", "score": "0.6222887", "text": "public function isValid() {\n if (!$this->fileIndexed) {\n $this->indexFile();\n }\n return $this->fileValid;\n }", "title": "" }, { "docid": "e8d8735700dbabee410d744ba190608c", "score": "0.6222311", "text": "function validate_file()\n {\n return validate_post_file($this->input->post(\"file_name\"));\n }", "title": "" }, { "docid": "174b11164a536f1a67736fa1fd26194e", "score": "0.6221096", "text": "function check_file($file) {\r\n\tif(is_array($file)) $file = $file[0];\r\n\t\r\n\tif(@file_exists(FCPATH . 'uploads/' . $file) == false)\r\n\t\treturn false;\r\n\t\t\r\n\tif(@filesize(FCPATH . 'uploads/' . $file) != false)\r\n\t\treturn number_format(filesize(FCPATH . 'uploads/' . $file) / 1048576, 2) . 'MB';\r\n\telse\r\n\t\treturn 'N/A';\r\n}", "title": "" }, { "docid": "376c66c03898eb2284b89db19f138ddd", "score": "0.6218721", "text": "public function is_file_valid() {\n\t\tif ( ! file_exists( $this->settings['file_path'] ) ) {\n\t\t\treturn 'The file you specified does not exist (' . $this->settings['file_path'] . ')';\n\t\t}\n\t\tif ( 0 == $this->get_filesize() ) {\n\t\t\treturn 'Your log file is empty.';\n\t\t}\n\t\t$mbs = $this->get_filesize() / 1024 / 1024; // in MB.\n\t\tif ( $mbs > 100 ) {\n\t\t\tif ( ! isset( $_GET['ignore'] ) ) {\n\t\t\t\treturn( \"Aborting. debug.log is larger than 100 MB ($mbs).\n\t\t\t\t\tIf you want to continue anyway add the 'ignore' queryvar\"\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "98717c52be6ff1b33abe28a7bad1c42d", "score": "0.6215081", "text": "function check_files() {\n\t\tif (!is_writable('.')) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif (!is_writable('index.php')) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif (!is_writable('application/models/upgrade2_model.php')) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "971032671579389ff46e0df4ecfdae80", "score": "0.620974", "text": "function edd_upload_file_check_extension( $filename ) {\n $extensions = edd_get_option( 'edd_upload_file_extensions', '' );\n $is_allowed = true;\n\n if( $extensions != '' ) {\n $extensions = explode( ',', $extensions );\n\n if( ! in_array( edd_get_file_extension( $_FILES['edd-upload-file']['name'] ), $extensions ) ) {\n $is_allowed = false;\n }\n }\n\n return $is_allowed;\n}", "title": "" }, { "docid": "d8179d25ad9c5b9342c62614db127489", "score": "0.6205741", "text": "private function isFilesValid(array $files, OutputInterface $output)\n {\n foreach ($files as $file) {\n // Check the file exists\n try {\n $fileObj = new File($file);\n } catch (FileNotFoundException $e) {\n $output->writeln(\"<error>File '$file' not found!</error>\");\n return false;\n }\n\n // Check the file extension\n $ext = $fileObj->getExtension();\n if ($ext !== 'yml' && $ext !== 'yaml') {\n $output->writeln(\"<error>File '$file' has an invalid extension! Must be either '.yml' or '.yaml'.</error>\");\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "2e5b012028c91f6a17333870ea1473f4", "score": "0.61892194", "text": "private function _file_allow($filename) {\n\t\treturn $this->_allow($filename, $this->file_include, $this->file_exclude);\n\t}", "title": "" }, { "docid": "95f6f33a3f563a9356eaf4b723bf0f58", "score": "0.6184466", "text": "function isAllowedFile($file)\n {\n $extension = strtolower(pathinfo($file, PATHINFO_EXTENSION));\n if ($extension == $file) {\n return false;\n }\n if (!in_array($extension, $this->allowedExtensions[$this->currentType])\n && !in_array('*', $this->allowedExtensions[$this->currentType])\n ) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "b964615f7b0b6dc4f43efd73f3019abd", "score": "0.61806303", "text": "function check_file_type($source) {\n $file_info = check_mime_type($source);\n\n switch ($file_info) {\n case 'application/pdf':\n return true;\n break;\n\n case 'application/msword':\n return true;\n break;\n\n case 'application/rtf':\n return true;\n break;\n case 'application/vnd.ms-excel':\n return true;\n break;\n\n case 'application/vnd.ms-powerpoint':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.text':\n return true;\n break;\n\n case 'application/vnd.oasis.opendocument.spreadsheet':\n return true;\n break;\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "title": "" }, { "docid": "fab3825d0809a0b49c4deed33e1bad3f", "score": "0.6178532", "text": "private function checkFileExtensionType() {\n $file_error = 0;\n if (!isset($_FILES['store_media'])) {\n return $file_error;\n }\n $file_name = basename($_FILES['store_media']['name']);\n //$filecheck = basename($_FILES['imagefile']['name']);\n if (!empty($file_name)) {\n $ext = strtolower(substr($file_name, strrpos($file_name, '.') + 1));\n //for video and images.\n\n if (!(((($ext == 'jpg' || $ext == 'gif' || $ext == 'png' || $ext == 'jpeg') &&\n ($_FILES['store_media']['type'] == 'image/jpeg' ||\n $_FILES['store_media']['type'] == 'image/jpg' ||\n $_FILES['store_media']['type'] == 'image/gif' ||\n $_FILES['store_media']['type'] == 'image/png'))))) {\n $file_error = 1;\n }\n }\n return $file_error;\n }", "title": "" }, { "docid": "1750cafebf9f0b0a32ac14dce54af68c", "score": "0.61714244", "text": "function checkFileName($filename) {\r\n\t\t$filename = substr($filename, strrpos($filename, '/') + 1);\r\n\t\tif (is_array($this->forbidden_files) && count($this->forbidden_files) > 0) {\r\n\t\t\tforeach ($this->forbidden_files as $id => $file) {\r\n\t\t\t\tif ($file == '') continue;\r\n\t\t\t\t$pos = strpos($filename, $file);\r\n\t\t\t\t/*\t \t\t$file_search = '';\r\n\t\t\t\t\t\t \t\tif (!(($as = strpos($file, '*')) === FALSE)) {\r\n\t\t\t\t\t\t \t\t\t$file_search = str_replace('*', '', $file);\r\n\t\t\t\t\t \t\t\t\tif ($as == 0) $pos = @strpos($filename, $file_search, (strlen($filename)-strlen($file_search)));\r\n\t\t\t\t\t \t\t\t\tif ($as == strlen($file_search)) $pos = (@strpos($filename, $file_search) != 0);\r\n\t\t\t\t\t\t \t\t} else {\r\n\t\t\t\t\t\t\t\t\t$pos = ($filename === $file);\r\n\t\t\t\t\t\t \t\t}\r\n\t\t\t\t*/\r\n\t\t\t\tif ($pos === FALSE)\tcontinue;\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "84e0977725bfa25d06de6ee2b428a138", "score": "0.61604387", "text": "function check_file_is_audio( $tmp ) \n{\n $allowed = array(\n 'audio/mpeg', 'audio/x-mpeg', 'audio/mpeg3', 'audio/x-mpeg-3', 'audio/aiff', \n 'audio/mid', 'audio/x-aiff', 'audio/x-mpequrl','audio/midi', 'audio/x-mid', \n 'audio/x-midi','audio/wav','audio/x-wav','audio/xm','audio/x-aac','audio/basic',\n 'audio/flac','audio/mp4','audio/x-matroska','audio/ogg','audio/s3m','audio/x-ms-wax',\n 'audio/xm'\n );\n \n // check REAL MIME type\n $finfo = finfo_open(FILEINFO_MIME_TYPE);\n $type = finfo_file($finfo, $tmp );\n finfo_close($finfo);\n \n // check to see if REAL MIME type is inside $allowed array\n if( in_array($type, $allowed) ) {\n return $type;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "f0756f15dae8195d9eb8a653e7af370a", "score": "0.61406", "text": "public function provider_should_upload_files_with_correct_mime_types()\n\t{\n\t\t$test_path = self::test_data_path();\n\t\treturn array(\n\t\t\tarray('css.tmp', $test_path.'/assets/css.tmp','application/octet-stream'),\n\t\t\tarray('css/foo.css', $test_path.'/assets/css/foo.css','text/css'),\n\t\t\tarray('js/foo.js', $test_path.'assets/js/foo.js', 'application/javascript')\n\t\t);\n\t}", "title": "" }, { "docid": "3258dd4392adf83fcd93c61f72948bf3", "score": "0.6135711", "text": "protected function validate_files_layout() {\n\n if (!is_array($this->extractfiles) or count($this->extractfiles) < 4) {\n // We need the English language pack with the name of the plugin at least.\n $this->add_message(self::ERROR, 'filesnumber');\n return false;\n }\n\n foreach ($this->extractfiles as $filerelname => $filestatus) {\n if ($filestatus !== true) {\n $this->add_message(self::ERROR, 'filestatus', array('file' => $filerelname, 'status' => $filestatus));\n return false;\n }\n }\n\n foreach (array_keys($this->extractfiles) as $filerelname) {\n if (!file_exists($this->extractdir.'/'.$filerelname)) {\n $this->add_message(self::ERROR, 'filenotexists', array('file' => $filerelname));\n return false;\n }\n }\n\n foreach (array_keys($this->extractfiles) as $filerelname) {\n $matches = array();\n if (!preg_match(\"#^([^/]+)/#\", $filerelname, $matches)\n or (!is_null($this->rootdir) and $this->rootdir !== $matches[1])) {\n $this->add_message(self::ERROR, 'onedir');\n return false;\n }\n $this->rootdir = $matches[1];\n }\n\n if ($this->rootdir !== clean_param($this->rootdir, PARAM_PLUGIN)) {\n $this->add_message(self::ERROR, 'rootdirinvalid', $this->rootdir);\n return false;\n } else {\n $this->add_message(self::INFO, 'rootdir', $this->rootdir);\n }\n\n return is_dir($this->extractdir.'/'.$this->rootdir);\n }", "title": "" }, { "docid": "df90d1b9e4ee5fc9e98a843a0e250fe1", "score": "0.6127271", "text": "public function check_files() {\n\t\tglobal $wp_version, $wp_local_package;\n\n\t\t$checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );\n\n\t\tif ( ! is_array( $checksums ) )\n\t\t\treturn false;\n\n\t\tforeach ( $checksums as $file => $checksum ) {\n\t\t\t// Skip files which get updated\n\t\t\tif ( 'wp-content' == substr( $file, 0, 10 ) )\n\t\t\t\tcontinue;\n\t\t\tif ( ! file_exists( ABSPATH . $file ) || md5_file( ABSPATH . $file ) !== $checksum )\n\t\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6ff4fa66aad153a27b2e2fc2669f7b6d", "score": "0.612119", "text": "function valida_arquivo_enviado($arquivo, $tipos_validos, $tamanho_arquivo) {\n /* se existe algum erro */\n if ($arquivo[\"error\"] > 0) {\n return 'Erro no envio do arquivo';\n }\n /* valida o tamanho do arquivo */\n if ($arquivo[\"size\"] > $tamanho_arquivo) {\n $kb = $tamanho / 1024;\n return \"O tamanho máximo do arquivo é $kb Kb!\";\n }\n /* valida os tipos de arquivos possíveis */\n $valida = 0;\n foreach ($tipos_validos as $tipo_valido => $ext) {\n if ($arquivo[\"type\"] == $tipo_valido) {\n $valida = 1;\n }\n }\n if ($valida == 0) {\n return \"Tipo de arquivo inválido!\";\n }\n\n /* verifica se o arquivo foi enviado sem erros para o diretorio temp */\n if (!is_uploaded_file($arquivo[\"tmp_name\"])) {\n return 'Erro ao processar arquivo!';\n }\n}", "title": "" }, { "docid": "d8959ecaffca9aeed70e7bfc79c285ef", "score": "0.6115749", "text": "public function acceptsFile(FileReference $ref);", "title": "" }, { "docid": "30364a97fa3746238ba8b856acd93b9e", "score": "0.61035454", "text": "private function canScanFile(array $file) {\n foreach ($this->options['include_extensions'] as $type) {\n if (stripos($file['filemime'], $type) !== FALSE) {\n return TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "27e61e0cc1a3e6fda16eb37f1cd2d6e2", "score": "0.61019", "text": "function gg_isFileForm($params) {\n\n // if there are no files being uploaded, do nuthin'\n if (sizeof($_FILES) > 0 ){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "70048d5628a49d21be82a74217072568", "score": "0.60850793", "text": "protected function validateMimes()\n {\n foreach($this->mimes as $key => $mime)\n {\n if(!preg_match('/^[a-z]+\\/[a-z]+$/', $mime))\n {\n throw new InvalidMimeTypeException('You tried setting an invalid mime');\n }\n }\n }", "title": "" }, { "docid": "6bfda56cf55c9357436c6d8f21468b84", "score": "0.60815257", "text": "public function testFile(){\n $this->assertTrue(file_exists('letters.txt'));\n $this->assertTrue(file_exists('letters_duplicate.txt'));\n $this->assertTrue(file_exists('letters_gibberish.txt'));\n $this->assertTrue(file_exists('letters_gibberish2.txt'));\n\n }", "title": "" }, { "docid": "580fa128ec07ddb040aac192a0c57c75", "score": "0.60786444", "text": "public function validateFileType( $path=null )\n\t{\n\t\tif ($path===null) {\n\t\t\t$path=$this->path->value;\n\t\t}\n\t\treturn (in_array(substr(strrchr($path, \".\"), 1), $this->allowed_extensions));\n\t}", "title": "" }, { "docid": "080a0f2c3d0ba4a8d14859c047641ca9", "score": "0.6076137", "text": "public function validateFileArgument(string $file): bool {\n\t\treturn is_file($file) || is_link($file);\n\t}", "title": "" }, { "docid": "cc5b64b33868ef0b0373de098c277da0", "score": "0.60746217", "text": "function checkForDisallowedFileTypes($url)\n{\n\t\n\t$disallowed = false;\n\t$filesDisallowedList = array(\".css\");\n\t\t\n\tforeach ($filesDisallowedList as $value) \n\t{\n\t\t//echo \"Value: $value<br />\\n\";\n\t\tif(contains($value,$url))\n\t\t{\n\t\t\t$disallowed = True;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\t\n\n\t\n\t\n\treturn $disallowed;\n}", "title": "" }, { "docid": "f837dfd7f1749cf76747c44134801726", "score": "0.60725427", "text": "public function fileCheck($target)\n {\n $file_ext = strtolower(substr($target, strrpos($target, '.')));\n $bool = true;\n if (!in_array($file_ext, $this->exts)) {\n $this->log[] = \"{$target} is not a PHP file.\";\n $bool = false;\n }\n if (!is_readable($target)) {\n $this->log[] = \"{$target} is not readable.\";\n $bool = false;\n }\n if (!is_writable($target)) {\n $this->log[] = \"{$target} is not writeable.\\nCheck file permissions\";\n $bool = false;\n }\n return $bool;\n }", "title": "" }, { "docid": "ddf3cca5b5f6d1b6269bbf0f2e4bdb4d", "score": "0.6069886", "text": "public function isFileInput()\n {\n return in_array($this->input_type, ['file', 'image', 'pdf', 'audio', 'video']);\n }", "title": "" }, { "docid": "58248bda517cf5c9741a873f6258fef3", "score": "0.6065284", "text": "public function testScanDoesNotAddsErrorWhenFileFound()\n {\n $validator = new FilesValidator(\n 'autoload.files',\n array(\\basename(__FILE__)),\n __DIR__,\n $this->mockClassMapGenerator(),\n $this->mockReport()\n );\n\n $validator->validate();\n }", "title": "" }, { "docid": "27d1ae0b4c35d1833fad9438f13b0041", "score": "0.605625", "text": "protected function _checkSrcIsFile($src)\n {\n $result = false;\n set_error_handler(function() { /* ignore errors */ });\n if (is_string($src) && is_file($src) && is_readable($src)) {\n $result = true;\n }\n restore_error_handler();\n return $result;\n }", "title": "" }, { "docid": "973c4d71ace1e475efbbc7697aaed0b9", "score": "0.60520697", "text": "private function fileInBlackList($fileName)\n{\n\tforeach ($this->uploadBlackList as $pattern) {\n\t\tif (fnmatch($pattern, $fileName)) return true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "b4b54d30cbe80f030c7ccb7a685b8648", "score": "0.60517186", "text": "function is_allowed_extension( $file ) {\r\n\t\tglobal $allowedExtensions;\r\n\t\tglobal $errorcode;\r\n\t\t$filename = $file['name'];\r\n\t\t$extension = explode('.', $filename );\r\n\t\t$extension = end($extension);\r\n\t\t$output = in_array($extension, $allowedExtensions );\r\n\t\tif ( ! $output ) {\r\n\t\t\t$errorcode = 2;\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6099e943ebc66491c5310a75cb920a93", "score": "0.6051643", "text": "static public function checkFile($file)\n {\n $fileErrs = [];\n if (!isset($file['error']))\n {\n $fileErrs[] = 'Prosím nahrajte obrázok';\n return $fileErrs;\n }\n else\n {\n if (is_array($file['error']))\n {\n $fileErrs[] = 'Nahrajte iba jeden súbor';\n return $fileErrs;\n }\n\n switch ($file['error'])\n {\n case UPLOAD_ERR_OK:\n break;\n case UPLOAD_ERR_NO_FILE:\n $fileErrs[] = 'Prosím nahrajte obrázok';\n return $fileErrs;\n case UPLOAD_ERR_INI_SIZE:\n case UPLOAD_ERR_FORM_SIZE:\n $fileErrs[] = 'Obrázok je príliš veľký';\n return $fileErrs;\n default:\n throw new \\RuntimeException('File upload error');\n }\n\n $finfo = finfo_open( FILEINFO_MIME_TYPE );\n $mtype = finfo_file( $finfo, $file['tmp_name'] );\n finfo_close( $finfo );\n if ( $mtype != ( \"image/png\" ) && $mtype != ( \"image/jpeg\" ))\n {\n $fileErrs[] = 'Obrázok musí byť .png alebo .jpeg';\n return $fileErrs;\n }\n }\n\n return $fileErrs;\n }", "title": "" }, { "docid": "f3b7615e7764107b3c426de537f5b181", "score": "0.60470414", "text": "public function fileMime(){\n if(!in_array($this->fileType, $this->allMIME)) {\n $this->ERRORS[] = \"Sorry, only JPG, JPEG, PNG & GIF files are allowed.\";\n $this->uploadOk = 4;\n }//end of if\n }", "title": "" }, { "docid": "ed411b32968cedbac9c09a27ec7c3777", "score": "0.6044912", "text": "function check_in_filetype($filename, $ext = array()) {\n $ext_valid = false;\n if (is_array($ext)) {\n if (count($ext) == 0) return true; // $ext=() means all accepted\n for ($i=0; $i<count($ext); $i++) { \n if (endsWith($filename, \".\" . $ext[$i])) {\n $ext_valid = true;\n }\n }\n } else {\n $ext_valid = endsWith($filename, \".$ext\");\n }\n return $ext_valid;\n}", "title": "" }, { "docid": "7ff1cb416f03af10536f5399862cdca6", "score": "0.6044162", "text": "public function valid() {\n\t\tif (is_null($this->file)) {\n\t\t\treturn TRUE; //nothing uploaded\n\t\t}\n\n\t\treturn (is_array($this->file)\n\t\t\tAND isset($this->file['error'])\n\t\t\tAND !is_array($this->file['error'])\n\t\t\tAND isset($this->file['name'])\n\t\t\tAND !is_array($this->file['name'])\n\t\t\tAND isset($this->file['type'])\n\t\t\tAND !is_array($this->file['type'])\n\t\t\tAND isset($this->file['tmp_name'])\n\t\t\tAND !is_array($this->file['tmp_name'])\n\t\t\tAND isset($this->file['size'])\n\t\t\tAND !is_array($this->file['size'])\n\t\t\tAND ((int) $this->file['error'] === UPLOAD_ERR_NO_FILE || (int) $this->file['error'] === UPLOAD_ERR_OK));\n\t}", "title": "" }, { "docid": "f0d0cc0899207da24cb4d241dffc83f4", "score": "0.60426545", "text": "public function hasFiles()\n {\n return $this->hasPrivateFiles() || $this->hasPrivateFiles();\n }", "title": "" }, { "docid": "ff7879050e334fe0268531d638f7bd2c", "score": "0.6041714", "text": "public function accept($file)\r\n {\r\n return in_array($file, $this->_array);\r\n }", "title": "" }, { "docid": "2eacdee93154eb3bac2bde26ca733b2e", "score": "0.6041149", "text": "function checkFileFormat() {\n\t$imageData = @getimagesize ( $_FILES [\"thumbnail\"] [\"tmp_name\"] );\n\t\n\t//only JPG allowed\n\tif ($imageData === FALSE || ! ($imageData [2] == IMAGETYPE_JPEG)) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "eca867ddf8508b23c3d9bfffdfea7a83", "score": "0.6040182", "text": "private function checkExtension() {\n return in_array(strtolower($this->getExtension()), \n $this->ValidExtensions);\n }", "title": "" }, { "docid": "4528cafb9ae2cff96f8bf078eed2614b", "score": "0.6037004", "text": "function checkFile($file='') : bool\n{\n $file = \"/\".ltrim($file, \"/\");\n $filePath = public_path($file);\n return (!empty($filePath) && is_file($filePath) && file_exists($filePath)) ? TRUE : FALSE;\n}", "title": "" }, { "docid": "2fb61d454e017ba73ff7a0553730d75f", "score": "0.6019424", "text": "function ft_check_upload() {\n if (UPLOAD === TRUE) {\n // Uploads are universally turned on.\n return TRUE;\n } else if (UPLOAD == TRUE && UPLOAD == substr(ft_get_dir(), 0, strlen(UPLOAD))) {\n // Uploads are allowed in the current directory and subdirectories only.\n return TRUE;\n }\n return FALSE; \n}", "title": "" }, { "docid": "2c731eaf02ce0e657ddad9615ad57e87", "score": "0.6019256", "text": "public function test_check_restrict_file_rule() {\n\t\t$test = new WD_Protect_Core_Dir();\n\t\t$htaccess_path = wp_defender()->get_plugin_path() . 'tests/hardener/sample-htaccess/wp-content/';\n\n\t\t/**\n\t\t * case 1:blank\n\t\t */\n\t\t$content = file( $htaccess_path . 'case1' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t//fix for case 1\n\t\t$this->check_wp_content( $htaccess_path . 'case1' );\n\t\t/**\n\t\t * case 2.1 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case21' );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case21' );\n\t\t/**\n\t\t * case 2.2 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case22' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\t$this->check_wp_content( $htaccess_path . 'case22' );\n\t\t/**\n\t\t * case 2.3 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case23' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case23' );\n\n\t\t/**\n\t\t * case 3 we have a mixed file, with rules\n\t\t */\n\t\t$content = file( $htaccess_path . 'case3' );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\t/**\n\t\t * case 4.1 we have one rule mixed\n\t\t */\n\t\t$content = file( $htaccess_path . 'case41' );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case41' );\n\t\t/**\n\t\t * case 4.2 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case42' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) != false );\n\t\t$this->check_wp_content( $htaccess_path . 'case42' );\n\t\t/**\n\t\t * case 4.3 we have one rule\n\t\t */\n\t\t$content = file( $htaccess_path . 'case43' );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::BROWSER_LISTING ) );\n\t\t$this->assertTrue( $test->check_rule( $content, WD_Protect_Core_Dir::PREVENT_PHP_ACCESS ) != false );\n\t\t$this->assertFalse( $test->check_rule( $content, WD_Protect_Core_Dir::PROTECT_HTACCESS ) );\n\t\t$this->check_wp_content( $htaccess_path . 'case43' );\n\t}", "title": "" }, { "docid": "20795249f625101ff5da64c3fc257b48", "score": "0.60150033", "text": "function check_file_type($file)\n {\n $file_types = array('png', 'jpg', 'jpeg');\n //$current_file_type - file type not case-sensitive\n $current_file_type = mb_strtolower(substr(strrchr($file['name'], '.'), 1));\n\n if(!in_array($current_file_type, $file_types)){\n return false;\n }\n if(@getimagesize($file['tmp_name'])==null){\n return false;\n }\n $file_mime_types = array('image/png', 'image/jpeg');\n $mime = getimagesize($file['tmp_name'])['mime'];\n if(!in_array($mime, $file_mime_types)){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "128f64bdd02f0143eacdbd20dbbc432f", "score": "0.60130847", "text": "function extension_exists($src_file_name){\r\n$supported_exts = array('gif','jpg','jpeg','png','php','html','htm','jpeg');\r\nreturn in_array(strtolower(pathinfo($src_file_name, PATHINFO_EXTENSION)), $supported_exts) ;\r\n}", "title": "" }, { "docid": "9a89f01fcc70cd82d28c16b223d70125", "score": "0.6003078", "text": "function checkError() {\n // If this request falls under any of them, treat it invalid.\n if (!isset($_FILES[$this->uploaded_file]['error']) || is_array($_FILES[$this->uploaded_file]['error']))\n throw new RuntimeException('Ungültige Datei!');\n\n // Check $_FILES['upfile']['error'] value.\n switch ($_FILES[$this->uploaded_file]['error']) {\n case UPLOAD_ERR_OK:\n break;\n case UPLOAD_ERR_NO_FILE:\n throw new RuntimeException('Keine Datei hochgeladen.');\n case UPLOAD_ERR_INI_SIZE:\n case UPLOAD_ERR_FORM_SIZE:\n throw new RuntimeException('Datei zu Groß.');\n default:\n throw new RuntimeException('Unbekannte Fehler.');\n }\n }", "title": "" }, { "docid": "dbef51bfea92cd688ea4a76e6dc510de", "score": "0.6000872", "text": "function file_name_valid($file)\n{\n if (preg_match(\"/[^A-Za-z0-9-_.\\/]/\",$file) == 0) return TRUE;\n return FALSE;\n}", "title": "" }, { "docid": "f065b007c13359d5a4b281704cffb966", "score": "0.5997018", "text": "public static function validateFile($file,$options)\n\t{\n\t\t$ext = strtolower(substr($file['name'],strrpos($file['name'],'.')+1));\n\t\t\t\t\n\t\t$errorsA = array();\n\t\t\n\t\t//File Format (extension)\n\t\tif(isset($options['formats'])){\n\t\t\t//split it on ,\n\t\t\t$format = false;\n\t\t\t$tB = explode(',',$options['formats']);\n\t\t\tif(count($tB)>0){\n\t\t\t\t//check to see if it exists\n\t\t\t\tif(in_array($ext,$tB)){\n\t\t\t\t\t$format = true;\n\t\t\t\t}\n\t\t\t}else if($ext == $options['formats']){\n\t\t\t\t$format = true;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\tif($format == true){\n\t\t\t\n\t\t\t}else{\n\t\t\t\t$errorsA[] = 'Incorrect File Format. File must be of type ['.$options['formats'].'].';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($options['dimensions'])){\n\t\t\t//loop through to see what fits\n\t\t\t$safe_size = false;\n\t\t\t$t_errors = array();\n\t\t\tforeach($options['dimensions'] as $dimension){\n\t\t\t\t$t = self::checkDimensions($file,$dimension);\n\t\t\t\tif($t===true){\n\t\t\t\t\t$safe_size = true;\n\t\t\t\t\tbreak;\t\t\t\t\t\t\n\t\t\t\t}else if(is_array($t)){\n\t\t\t\t\t$t_errors = array_merge($t_errors,$t);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($safe_size === false){\n\t\t\t\t$errorsA = array_merge($errorsA,$t_errors);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t\n\t\tif(isset($tA['check_size']) && $tA['check_size'] == 'true'){\n\t\t\t//\n\t\t}\n\t\t*/\n\t\tif(count($errorsA) > 0){\n\t\t\treturn $errorsA;\n\t\t}else{\n\t\t\treturn true;\n\t\t\t//all good\n\t\t}\n\t\t\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "548619a4f19bddef975d486bbb6e4991", "score": "0.0", "text": "public function index()\n {\n $datas = Team::latest()->get();\n return view('backend.team.team-index', compact('datas'));\n }", "title": "" } ]
[ { "docid": "d37ee75c4feac8dcd7712d902a70bf82", "score": "0.7607344", "text": "public function listAction()\n {\n \t/**\n \t * @todo return a paginated and ordered list, selecting only valid elements (move valid clause to rowset)\n \t */\n \t$this->view->resources = $this->_table->fetchAll(null, null, 15);\n }", "title": "" }, { "docid": "de80270cda7dc6348112d1542c1c3b6a", "score": "0.7491118", "text": "public function listingAction() {\r\n\r\n\t\t// Search Params\r\n\r\n\t\t// Do the show thingy\r\n\t\t\t// Get an array of friend ids\r\n\t\t\t// Get stuff\r\n\t\t\t// unset($values['show']);\r\n\r\n\t\t// Get blog paginator\r\n\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "7a3b535f1a43231cd882da50772ec5ee", "score": "0.74615455", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "8e2e0cd6669d378062a560c70954d431", "score": "0.74168706", "text": "public function indexAction(): void\n {\n $limit = (int) $this->Request()->getParam('limit', 1000);\n $offset = (int) $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "c11d55ce36b9b6bf39c0094bfe5d0fd7", "score": "0.7369403", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n //add url parameter as hidden input in the search form\n $urlParameters = $this->getUrlParameters('search');\n $this->request->request->set('extraParameters', $urlParameters);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n if (method_exists($this, $customMethodName = 'create'.$this->entity['name'].'SearchForm')) {\n $searchForm = $this->{$customMethodName}();\n } else {\n $searchForm = $this->createSearchForm();\n }\n\n return $this->render($this->entity['templates']['list'], array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'searchForm' => $searchForm->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ));\n }", "title": "" }, { "docid": "e008dc293c8e1bdcbf38634c0f67a5d1", "score": "0.7354826", "text": "public function listAction() {\r\n\t\t// Preload info\r\n\r\n\r\n\t\t// Search Params\r\n\r\n\r\n\t\t// Get paginator\r\n\t\t// Render\r\n\t\t$this -> _helper -> content -> setNoRender() -> setEnabled();\r\n\t}", "title": "" }, { "docid": "e508f26cee6b6110b5e315b37bf01715", "score": "0.73057467", "text": "public function actionList()\n {\n $entity = $this->getEntity();\n if (!$entity->canList()) {\n $this->setEntityFlash('error', 'Unable to list {name}.');\n $this->redirectParent();\n }\n $this->render('list', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "109b33b70bf69a93460d062b2f83502f", "score": "0.7226076", "text": "public function index()\n {\n $resources = $this->objStoreResource->getAllResource(auth()->id());\n return view('home.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "68f3dc8f909d1dfb5a37b582d41cec68", "score": "0.719963", "text": "public function index()\n {\n\n extract($this->getResourceNames());\n\n $items = $modelPath::sortable()->paginate();\n \n\n\n return $this->compileView($resourceMultiple . '.index', [$resourceMultiple => $items]);\n }", "title": "" }, { "docid": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.71897656", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\n }", "title": "" }, { "docid": "97f3caf6ecee75a55fbfadca2b98a829", "score": "0.7182086", "text": "protected function index()\n {\n $categories = Listing::paginate(10);\n return ListingResource::collection($categories);\n }", "title": "" }, { "docid": "7a45345cbd9a9dd304c36c4a494e5375", "score": "0.71166694", "text": "public function index()\n {\n return $this->response->paginator(\n $this->filterQuery()->orderBy('id', 'desc')->paginate(request('limit', 10)),\n $this->transformer,\n ['key' => $this->resource_key]\n );\n }", "title": "" }, { "docid": "7ca504ed4a4a2ab91d9d42ce768fbca1", "score": "0.7111673", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAll();\n\n return $this->render('resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "260bd7b6f859caf980dd2ec389de158f", "score": "0.70988476", "text": "public function listAction()\n {\n $this->users->denyAccessToPage('admin');\n \n $all = $this->users->findAll();\n $status = $this->users->IsAuthenticated();\n \n $this->theme->setTitle(\"Visa alla användare\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Visa alla användare\",\n 'status' => $status,\n ], 'main');\n \n $this->views->add('users/users-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "3ff8464571003af8b9340bbfec1e3e20", "score": "0.7088415", "text": "public static function listing()\n {\n echo new \\UMS\\Views\\Standard('listing.phtml');\n }", "title": "" }, { "docid": "24716f78fa1798ecee7344c0553e427b", "score": "0.70843154", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, array('paginator' => $paginator));\n\n $parameters = array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n );\n\n return $this->render('@VortexginWebBundle/EasyAdmin/list.html.twig', $parameters); \n }", "title": "" }, { "docid": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055708", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "title": "" }, { "docid": "f882d8455ca2c120342f2b2b1a1c2565", "score": "0.70281464", "text": "public function index()\n {\n $resources = DB::table('admin_resource')\n ->get()\n ->toArray();\n return view('admin.resource.index',compact('resources'));\n }", "title": "" }, { "docid": "ceecc69a5c7cd4cd8ab66be42cbae5ba", "score": "0.6991042", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst($this->crud->entity_name_plural);\n\n // get all entries if AJAX is not enabled\n if (! $this->data['crud']->ajaxTable()) {\n $this->data['entries'] = $this->data['crud']->getEntries();\n }\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n\t\t//return view('bcrud::list', $this->data);\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69853497", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\n }", "title": "" }, { "docid": "a7c37722ff451d4806db867c3084436e", "score": "0.6983112", "text": "public function listing() {\r\n\r\n\t\t// Get the list of incidents from the database\r\n\t\t$incidents = $this->incident_model->list_all();\r\n\r\n\t\t// Prepare the data for the page\r\n\t\t$data = array(\r\n\t\t\t\t'title' => 'Listing of Incidents',\r\n\t\t\t\t'view' => 'incident/list',\r\n\t\t\t\t'incident_listing' => $this->incident_model->list_all()\r\n\t\t\t);\r\n\r\n\t\t// Load the view\r\n\t\t$this->load->view('main_template', $data);\r\n\r\n\t}", "title": "" }, { "docid": "36e3954f88638a9532a787d2cc444a30", "score": "0.6979115", "text": "function listAction() {\n $existing_api = _factory('sitemin_api_model_api')->get_gateway();\n $rs['api'] = $existing_api;\n $rs['_token'] = defaultHelper::page_hash_set('api,list');\n $rs['tpl'] = '/sitemin/api/view/_api_list.phtml';\n $rs['TITLE'] = 'API LIST';\n return array('view' => '/sitemin/view/index.phtml', 'data' => array('rs' => $rs));\n }", "title": "" }, { "docid": "970e35836b9768276ac32a7f819d569f", "score": "0.6969622", "text": "public function index()\n {\n return \"Here is the listing page.\";\n }", "title": "" }, { "docid": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69587684", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\n }", "title": "" }, { "docid": "e04c1be5ce440db436266eabe923599a", "score": "0.6958369", "text": "public function index() {\n\t\tSession::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\t\t$this->all_rows = $this->model->tree();\n\n\t\tif(!$this->all_rows) $this->all_rows = array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "a4e3ca4a3d5bf61db50faf86a8841ea7", "score": "0.6958334", "text": "public function index()\n {\n return view('admin::resource.index');\n }", "title": "" }, { "docid": "7f07ef0085f42180361c2986a0c246bc", "score": "0.6919749", "text": "public function index () {\n\t\t$this->showAll();\n\t}", "title": "" }, { "docid": "aa6c01f133b8fa50888c5287d810e174", "score": "0.69041467", "text": "public static function list() {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include( __DIR__ . '/../views/books/list.php');\n\n }", "title": "" }, { "docid": "cdbe57e5f68037a7d673227250684866", "score": "0.68880165", "text": "public function index()\n {\n return SpecializationResource::collection(Spec::paginate(10));\n }", "title": "" }, { "docid": "ce119cc9f5dd3ee1904e1fd10c2e5f4f", "score": "0.68733615", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oAwardModel = new model_award();\n\t\t$tAwards = $oAwardModel->findAll();\n\n\t\t$oView = new _view('awards::list');\n\t\t$oView->tAwards = $tAwards;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "5cbfcb7b405ab167a69ee36809e4e4c6", "score": "0.687026", "text": "public function index()\n {\n // Get items\n // $items = Item::orderBy('type', 'asc')->paginate(5);\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of items as a resource\n return (ItemResource::collection($items))->response()->setStatusCode(200);\n }", "title": "" }, { "docid": "3880db888810873a15926adf0aeab153", "score": "0.68675166", "text": "public function action_list()\n {\n $model = Request::$current->param('model');\n $this->template->main->content = Model_Annex_Content::show_list($model);\n }", "title": "" }, { "docid": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68639404", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860631", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\n }", "title": "" }, { "docid": "0c8e64e28536e6fe176ead46e1742dc1", "score": "0.6852622", "text": "public function list()\n\t{\n\t\tglobal $venus;\n\t\t$this->prepare_items();\n\n\t\t$venus->plugins->run($this->prefix . 'list', $this);\n\t}", "title": "" }, { "docid": "fdd2aa08ee39ff613dfb2d2d853d735e", "score": "0.683835", "text": "public function index()\n {\n $this->checkPermission('shg_management_view');\n try {\n $data = $this->service->viewAllPartOne();\n $data = ShgListingResource::collection($data);\n\n return $this->respondWithSuccess($data);\n } catch (\\Throwable $th) {\n\n return $this->respondWithError($th);\n }\n }", "title": "" }, { "docid": "e5f507dbbe2411d3908a15f2210bc3ea", "score": "0.6836425", "text": "public function listAction() {\n $this->view->books = R::getAll('SELECT * FROM book WHERE title = :title', [':title' => 'Nodejs']);\n\n $this->render('list');\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "0745910a7b8ed31535e75cefd27b7b8c", "score": "0.6801322", "text": "public function showAllAction()\n {\n //find all recipes in database\n $recipes = $this->getDoctrine()->getRepository('AppBundle:Recipe')->findAll();\n\n // show all recipes as links(it is set in Twig)\n return ['recipes' => $recipes];\n }", "title": "" }, { "docid": "41b8938878fc471b8e628e34cd112379", "score": "0.68005955", "text": "public function index(): ListResourceCollection\n {\n return new ListResourceCollection(TodoList::paginate(10));\n }", "title": "" }, { "docid": "d3a3617a0e0a9e2771655b1532f470c2", "score": "0.6792327", "text": "public function index()\n\t{\n\t\treturn BookResource::collection(Book::paginate(10));\n\t\t\n\t}", "title": "" }, { "docid": "8a85663335231f3143dcbf588b19dbfa", "score": "0.67871946", "text": "public function index()\n {\n $substances = $this->model->paginate();\n return $this->getView(__FUNCTION__ , compact('substances'));\n }", "title": "" }, { "docid": "1d602c01714319f06611ab4c66abd251", "score": "0.6786255", "text": "public function index()\n {\n //Retrieve all podcasts, ordered in descending order by their id value\n $podcasts = Podcast::orderBy('id', 'desc')->paginate(15);\n //Return the list of podcasts as a collection of PodcastResource instances\n return PodcastResource::collection($podcasts);\n }", "title": "" }, { "docid": "49c1d78d94eec140cbd39c5a0665f7cf", "score": "0.67806053", "text": "public function index()\n {\n // Get modules\n $modules = Module::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of modules as a resource\n return ModuleResource::collection($modules);\n }", "title": "" }, { "docid": "b8bbd5c4b2b076654ec4820cf0f4f302", "score": "0.67777556", "text": "public function index()\n {\n return ResponseHelper::findSuccess(\n 'Items',\n ItemResource::collection(Item::all())\n );\n }", "title": "" }, { "docid": "d73771ef09d730c6579f2a991515d849", "score": "0.67710793", "text": "public function index()\n {\n $loans = Loan::paginate();\n return LoanResource::collection($loans);\n }", "title": "" }, { "docid": "cdf88fbb286dc19c1ad1e099d34c24cd", "score": "0.67550325", "text": "public function indexAction() {\n $this->view->headTitle('List Student');\n\n $currentPageNumber = $this->getParam(\"page\", 1);\n $itemPerPage = $this->getParam(\"size\", 3);\n\n $paginator = $this->__factoryPaginator($currentPageNumber, $itemPerPage);\n $this->view->listStudents = $paginator;\n }", "title": "" }, { "docid": "a558183236ee0a06301b5345bfbe3fe1", "score": "0.67493373", "text": "public function index()\n {\n $companies = Company::paginate();\n\n return $this->resp->ok(eRespCode::C_LISTED_200_00, new CompaniesPaginationResourceCollection($companies));\n }", "title": "" }, { "docid": "5f95d2756a5e123a83fb7c11ebb43128", "score": "0.6726971", "text": "public function showList()\n\t{\n\t\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t\tHTML_showTableHeading($I18N_objectStorageObjectName, $I18N_description, $I18N_status/*, $I18N_action*/);\n\t\tforeach ($this->foundObjects as $object)\n\t\t\tHTML_showTableRow($this->getCOSName($object), $this->getCOSDescription($object), $this->getCOSStatusHumanReadable($object)/*, $this->getCOSStatus($object)*/);\n\t}", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67253584", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "a69ac66edc8a557759a001c94242c947", "score": "0.6707937", "text": "function list() {\n global $app;\n $sth = $this->PDO->prepare(\"SELECT * FROM person\");\n $sth->execute();\n $result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n $app->render('default.php', [\"data\" => $result], 200);\n }", "title": "" }, { "docid": "7199baaacb728985be1992dbc56397e3", "score": "0.6706126", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n\r\n //return resources listing view\r\n return view(\\OogleeUConfig::get('config.user_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "61a33e299a8771fe4e3edd28a88e59b8", "score": "0.6694361", "text": "public function index()\n {\n $studentRecords = $this->studentRepository->getAllStudentRecords();\n return StudentResource::collection($studentRecords);\n }", "title": "" }, { "docid": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693349", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.66861296", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6677873", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.66639954", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6653828", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\n }", "title": "" }, { "docid": "aa14178a7d612bc110499d18b35cfe1c", "score": "0.6653656", "text": "public function index()\n {\n return TodoResource::collection($this->todoRepository->findAll());\n }", "title": "" }, { "docid": "da0cc4a612f27e870e1a151346a2b1e3", "score": "0.66501856", "text": "public function index()\n {\n $sub_brand_details = SubBrandDetails::paginate(10);\n return SubBrandDetailsResource::collection($sub_brand_details);\n }", "title": "" }, { "docid": "d1c36ec734b04a00b0316be8705fdc95", "score": "0.6647826", "text": "public function defaultAction()\n {\n $this->listing();\n }", "title": "" }, { "docid": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647669", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\n }", "title": "" }, { "docid": "d9dcf3302214d3795a06e4d23822d158", "score": "0.66456574", "text": "public function index()\n {\n $this->setDefaultData();\n $this->paginate = [\n 'contain' => ['RegisteredUsers', 'Listings'],\n 'conditions' => ['RegisteredUsers.username'\n => $this->Auth->user()['username']]\n ];\n $sellingLists = $this->paginate($this->SellingLists);\n\n $this->set(compact('sellingLists'));\n $this->set('_serialize', ['sellingLists']);\n }", "title": "" }, { "docid": "875081e376ab728c3750171aff9d42f9", "score": "0.6645129", "text": "public function index()\n {\n $items = $this->item->paginate(10);\n\n return $this->response->view('admin.item.index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "ddd89648877f652ca4fa01f7cfa10b0c", "score": "0.6634571", "text": "public function index()\n {\n return \\response()->json($this->listing->all());\n }", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.6627834", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\n }", "title": "" }, { "docid": "db782cdc73caf0645a9287f4d968586b", "score": "0.66271836", "text": "public function actionList()\n {\n $dataProvider = Event::getEventsForView();\n return $this->render('list', ['listDataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "9d24fae63c3b76b647f11d2a4ee6986d", "score": "0.6619498", "text": "public function listAction() {\n $this->layout('layout/json');\n\n $sSystemKey = $_REQUEST['systemkey'];\n\n # get list label from query\n $sLang = 'en_US';\n if(isset($_REQUEST['lang'])) {\n $sLang = $_REQUEST['lang'];\n }\n\n // translating system\n $translator = new Translator();\n $aLangs = ['en_US','de_DE'];\n foreach($aLangs as $sLoadLang) {\n if(file_exists(__DIR__.'/../../../oneplace-translation/language/'.$sLoadLang.'.mo')) {\n $translator->addTranslationFile('gettext', __DIR__.'/../../../oneplace-translation/language/'.$sLang.'.mo', 'skeleton', $sLoadLang);\n }\n }\n\n $translator->setLocale($sLang);\n\n try {\n $oInstanceTbl = CoreController::$oServiceManager->get(\\OnePlace\\Instance\\Model\\InstanceTable::class);\n } catch(\\RuntimeException $e) {\n echo 'could not load instances';\n return false;\n }\n\n try {\n $oInstance = $oInstanceTbl->getSingle($sSystemKey,'instance_apikey');\n } catch(\\RuntimeException $e) {\n echo 'could not find your instance sorry';\n return false;\n }\n\n try {\n $oTag = CoreController::$aCoreTables['core-tag']->select(['tag_key'=>'category']);\n $oTag = $oTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load tag';\n return false;\n }\n\n try {\n $oEntityTag = CoreController::$aCoreTables['core-entity-tag']->select(['tag_idfs'=>$oTag->Tag_ID,'entity_form_idfs'=>'article-single','tag_value'=>'Store Item']);\n $oEntityTag = $oEntityTag->current();\n } catch(\\RuntimeException $e) {\n echo 'could not load entity tag';\n return false;\n }\n\n try {\n $oArticleTbl = CoreController::$oServiceManager->get(\\OnePlace\\Article\\Model\\ArticleTable::class);\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n try {\n $aFields = $this->getFormFields('article-single');\n $oItemsDB = $oArticleTbl->fetchAll(false,['multi_tag'=>$oEntityTag->Entitytag_ID]);\n } catch(\\RuntimeException $e) {\n echo 'could not load article';\n return false;\n }\n\n $aItems = [];\n\n if(count($oItemsDB) > 0) {\n foreach($oItemsDB as $oItem) {\n $aPublicItem = ['id'=>$oItem->getID()];\n # add all fields to item\n foreach($aFields as $oField) {\n switch($oField->type) {\n case 'multiselect':\n # get selected\n $oTags = $oItem->getMultiSelectField($oField->fieldkey);\n $aTags = [];\n foreach($oTags as $oTag) {\n $aTags[] = ['id'=>$oTag->id,'label'=>$translator->translate($oTag->text,'skeleton',$sLang)];\n }\n $aPublicItem[$oField->fieldkey] = $aTags;\n break;\n case 'select':\n # get selected\n $oTag = $oItem->getSelectField($oField->fieldkey);\n if($oTag) {\n if (property_exists($oTag, 'tag_value')) {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->id, 'label' => $translator->translate($oTag->tag_value,'skeleton',$sLang)];\n } else {\n $aPublicItem[$oField->fieldkey] = ['id' => $oTag->getID(), 'label' => $translator->translate($oTag->getLabel(),'skeleton',$sLang)];\n }\n }\n break;\n case 'text':\n case 'date':\n case 'textarea':\n case 'currency':\n $aPublicItem[$oField->fieldkey] = $translator->translate($oItem->getTextField($oField->fieldkey),'skeleton',$sLang);\n break;\n default:\n break;\n }\n }\n $aItems[] = $aPublicItem;\n }\n }\n\n $aReturn = ['state'=>'success','message'=>'welcome '.$oInstance->getLabel(),'category'=>$oEntityTag->tag_value,'items'=>$aItems];\n echo json_encode($aReturn);\n\n return false;\n }", "title": "" }, { "docid": "fbeb130c8eeb567e7fad3c7305600c0c", "score": "0.66142017", "text": "public function index()\n {\n $this->authorize('list', Client::class);\n\n return $this->ok($this->repo->paginate($this->request->all()));\n }", "title": "" }, { "docid": "dd6a998d3bb458c37ae44d961b97d40b", "score": "0.6612911", "text": "public function index()\n {\n //get contacts \n $contacts = Contacts::all();\n\n //return collection of contacts as a resource\n return ContactsResource::collection($contacts);\n }", "title": "" }, { "docid": "cb2a32c859addaec7f6f5ede08ff0730", "score": "0.66128945", "text": "public function index()\n {\n $responds = Respond::all();\n return RespondForListResource::collection($responds);\n }", "title": "" }, { "docid": "1a54ebc6660394a2c42a760823c26a75", "score": "0.66118765", "text": "public function index()\n {\n //Get works\n $works = Work::paginate(15);\n \n //Return collection of works as a resource\n return WorkResource::collection($works);\n }", "title": "" }, { "docid": "5c88cf68eb91b67ee61edf19f3f2ae11", "score": "0.6608679", "text": "public function index()\n {\n $inven = Inventory::paginate(15);\n\n return InventoryResource::collection($inven);\n }", "title": "" }, { "docid": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6606226", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.6602104", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\n }", "title": "" }, { "docid": "68fd86bd147479dce20ee02a8707173a", "score": "0.6592657", "text": "public function index()\n {\n //\n return CardResource::collection($this->cardRepo->getAll());\n }", "title": "" }, { "docid": "42a6f7bb31023e697bf6d8fe877d4585", "score": "0.658499", "text": "public function index()\n {\n $items = Item::all();\n return $this->sendData('list', $items, 200);\n }", "title": "" }, { "docid": "c6efa0ee8e5b46e919fc3043bad53b51", "score": "0.65816754", "text": "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate());\n }", "title": "" }, { "docid": "28b9b7b045b952a1e51b3daabb3db025", "score": "0.65804577", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\n//\t\t\tif (!isset($this->request->get['parent_id'])) $this->request->get['parent_id'] = '0';\n\t\t\t\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data['num_rows'] = $parameters['num_rows'];\n\t\t}", "title": "" }, { "docid": "bb496e1f3376022c7114e22d5ed48267", "score": "0.6573981", "text": "public function index()\n\t{\n\t\t$this->getItem();\n\t}", "title": "" }, { "docid": "2d21f0bc716b4c176e994f7636cae49f", "score": "0.65646654", "text": "public function index()\n {\n $branches = Branch::paginate(15);\n return BranchResource::collection($branches);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\n }", "title": "" }, { "docid": "367f38d2314314134a538ae223f4cd5d", "score": "0.6560926", "text": "public function index () {\n permiss ( 'user.list' );\n\n $data = $this->entity\n ->with(['role'])\n ->where('id', '<>', \\Auth::id())\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "title": "" }, { "docid": "32b26e83b4a0ac1871cecd5a10eb2445", "score": "0.65592414", "text": "public function actionList()\r\n {\r\n $option = $this->getParams();\r\n $table = $this->getTableName($option);\r\n $model = $this->model($table);\r\n\r\n $list = $model->all(\r\n function ($ar) use ($table, $model, $option) {\r\n return $model->handleActiveRecord($ar, $table, $option);\r\n },\r\n null,\r\n Yii::$app->params['use_cache']\r\n );\r\n\r\n $this->success($list);\r\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "04afb7d77b84ccf4a4dd5ac14fa2c226", "score": "0.6552952", "text": "public function index()\n { \n $this->paginate = [\n 'order' => ['Firms.name' => 'ASC'],\n 'maxLimit' => 20\n ];\n $firms = $this->paginate($this->Firms);\n\n $this->set(compact('firms'));\n }", "title": "" }, { "docid": "6463720c82b75c6c9ffdb8fa297632ea", "score": "0.65498865", "text": "public function index()\n\t{\n $inventaries = Inventary::orderBy('updated_at', 'desc')->paginate(12);\n return view(self::$prefixView . 'lists', compact('inventaries'));\n\t}", "title": "" }, { "docid": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.6548072", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65461665", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6540258", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\n \n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65362406", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "3ce1999f8313263a55f4c0a4a6d107fc", "score": "0.6527433", "text": "public function index()\n\t{\n\t\tif(!$this->permission->has_permission(\"specialization_viewall\")){\n\t\t\techo \"No permissions\";\n\t\t\treturn;\n\t\t}\n\n\t\t// Get all specialization from db\n\t\t$specialization = $this->SpecializationModel->GetAll();\n\n\t\t// Define data array\n\t\t$data = array(\n\t\t\t\"specialization_list\" => $specialization\n\t\t);\n\n\t\t// Load specialization view\n\t\t$this->layout->view('manage_details/specialization/specialization',$data);\n\t}", "title": "" }, { "docid": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525593", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "0e0fe48e1d16e1503e2b168a9374594b", "score": "0.6524685", "text": "public function index()\n {\n $todos = $this->todo->fetchPaginated();\n\n if ($todos->count() > 0) {\n return $this->respondWithPaginatedData($todos);\n }\n return $this->respondWithNoContent();\n }", "title": "" } ]
b6ebe7a07cf2e8b9b4514ea0db0b8e05
Returns path copy data.
[ { "docid": "022b8a811050cf35e5b24c73cf2ee2a7", "score": "0.5640001", "text": "protected function getPathCopyData($path_id, $max_revision = null)\n\t{\n\t\t$where_clause = array(\n\t\t\t'PathId = :path_id',\n\t\t\t'CopyPathId IS NOT NULL',\n\t\t);\n\n\t\t$bind_params = array(\n\t\t\t'path_id' => $path_id,\n\t\t);\n\n\t\t// Copy made before, maximal revision.\n\t\tif ( isset($max_revision) ) {\n\t\t\t$where_clause[] = 'Revision <= :max_revision';\n\t\t\t$bind_params['max_revision'] = $max_revision;\n\t\t}\n\n\t\t$sql = 'SELECT Revision, CopyPathId\n\t\t\t\tFROM CommitPaths\n\t\t\t\tWHERE (' . implode(') AND (', $where_clause) . ')\n\t\t\t\tORDER BY Revision DESC\n\t\t\t\tLIMIT 1';\n\n\t\treturn $this->database->fetchOne($sql, $bind_params);\n\t}", "title": "" } ]
[ { "docid": "e6fe5cf315513b46e4e50bbe215c0dbc", "score": "0.68987936", "text": "public function getDataPath();", "title": "" }, { "docid": "57c9f7c5558a08ddf02b091a2da397b9", "score": "0.6766069", "text": "public function get_data_path()\n {\n // TODO: Implement get_data_path() method.\n }", "title": "" }, { "docid": "dce109966d2ab073e49432d41fdb282e", "score": "0.6583267", "text": "abstract protected function getDataPath();", "title": "" }, { "docid": "92676d7a3bee31a30ea994cad643b06f", "score": "0.637148", "text": "public function getPath() {\n return $this->data['path'];\n }", "title": "" }, { "docid": "fcd2a7a20745f4f5572fcf668ceed380", "score": "0.63690203", "text": "public function copy() {\n $Copy = $this->getEntity(\"File\");\n foreach ($this->schema[\"fields\"] as $key => $field)\n $Copy->set($key, $this->get($key));\n $info = pathinfo($Copy->get(\"uri\"));\n $path = ($Copy->get(\"dir\") == \"private\" ? PRIVATE_PATH : PUBLIC_PATH).BASE_PATH;\n $uri = $info[\"dirname\"].\"/\";\n $name = $Copy->get(\"name\");\n $ext = $Copy->get(\"extension\");\n for ($fname = $name.\"-0.\".$ext, $i = 1; file_exists($path.$uri.$fname); $fname = $name.\"-\".$i.\".\".$ext, $i++);\n if (file_exists($this->path())) {\n if (!copy($this->path(), $path.$uri.$fname)) {\n setmsg(\"Failed to copy file: \".$this->path().\" to \".$path.$uri.$fname, \"error\");\n return false;\n }\n }\n $Copy->set(\"uri\", $uri.$fname);\n if (!$Copy->save())\n return false;\n return $Copy;\n }", "title": "" }, { "docid": "58e55c4f1c24c51410c6d10621f903e4", "score": "0.6076377", "text": "public function get_dest_path()\n {\n return $this->dest_path;\n }", "title": "" }, { "docid": "280529a9a0f1d4cbb76ea3446ec4cb21", "score": "0.6053839", "text": "public function path()\n {\n return $this->fileData('name');\n }", "title": "" }, { "docid": "67650f9b283d910de388ad1f93d33be6", "score": "0.59562993", "text": "abstract public function backupData(): string;", "title": "" }, { "docid": "aa8d7d2e970766d44cd7275fcbdae2c1", "score": "0.5944383", "text": "public function getPath(){\r\t\treturn $this->path;\r\t}", "title": "" }, { "docid": "24eae6b5225ea86a731a6ff9c1c9d6d4", "score": "0.59297055", "text": "public function getFileData($path);", "title": "" }, { "docid": "764840b1d86dcfad0aefe4151ef10b75", "score": "0.586859", "text": "public function getPath() {\n\t\treturn $this->path;\t\n\t}", "title": "" }, { "docid": "1fb3cd6e84a4c451f8117d9fde7c37a6", "score": "0.5860603", "text": "public function getPath() {}", "title": "" }, { "docid": "1fb3cd6e84a4c451f8117d9fde7c37a6", "score": "0.5860603", "text": "public function getPath() {}", "title": "" }, { "docid": "cc9e1decc419ef21e161b3c778065729", "score": "0.5840674", "text": "public function getPath() {\n\t \treturn $this->path;\n\t }", "title": "" }, { "docid": "c32a380d1ce860dad717440348b0e6a2", "score": "0.58171636", "text": "protected function cascadingData()\n {\n $path = Path::directory(Path::clean(substr($this->path(), 5)));\n\n $segments = explode('/', $path);\n $segments[0] = '/';\n\n $data = [];\n\n while (count($segments)) {\n $path = Path::tidy(join('/', $segments));\n\n if ($folder = PageFolderAPI::whereHandle($path)) {\n $data = array_merge($folder->data(), $data);\n }\n\n array_pop($segments);\n }\n\n return $data;\n }", "title": "" }, { "docid": "db47475932954641e88019f14817d9ff", "score": "0.58148557", "text": "public function getDirectoryData();", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.5791452", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.5791452", "text": "public function getPath(): string;", "title": "" }, { "docid": "15258075f98602a04b0bcbdb10dd0135", "score": "0.5791452", "text": "public function getPath(): string;", "title": "" }, { "docid": "9e7825eecaafa99411928ff6965ff10b", "score": "0.5787868", "text": "function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "6049eff1ff2765fd41bcb110b5634f25", "score": "0.57750165", "text": "public function getPath();", "title": "" }, { "docid": "fae9c6dbe062f20bd4d972e62086b5a5", "score": "0.5770289", "text": "public function getPath()\n {\n $this->download();\n\n return Storage::disk($this->disk)->path($this->filename) ;\n }", "title": "" }, { "docid": "ac3863ae2c15bb87cbe1a219fe4a4474", "score": "0.57646394", "text": "function getPath(): string;", "title": "" }, { "docid": "9825b033dfc5b13828aa214382026d52", "score": "0.57468027", "text": "abstract function copy($sourcePath, $destinationPath);", "title": "" }, { "docid": "f180bd63c2e5e63d17b6d7556a455abd", "score": "0.5745942", "text": "function getPath();", "title": "" }, { "docid": "6de18a006887f54e8d26144590915483", "score": "0.5740431", "text": "public function getCopy()\n {\n return $this->ionOptionsXS['copy'];\n }", "title": "" }, { "docid": "e422e9e843babf66adcc7c04a65f2152", "score": "0.57281506", "text": "public function getPath() {\r\n return $this->_path;\r\n }", "title": "" }, { "docid": "5964f314943fd65ece07254187446884", "score": "0.57265496", "text": "public function getFinalPath();", "title": "" }, { "docid": "2490493eec20829534acd2ea2a9ff629", "score": "0.5713261", "text": "function getPath(){\n return $this->path;\n }", "title": "" }, { "docid": "9b3b8a6ff99854497f7bcf8ae5a3c63e", "score": "0.57042843", "text": "public function getPath()\r\n {\r\n return $this->_path;\r\n }", "title": "" }, { "docid": "eec288f700b0a25d038f5c36a204889b", "score": "0.5700763", "text": "public function getPath () \r\n {\r\n return $this->path;\r\n }", "title": "" }, { "docid": "df2422039ce2e5df56c82336ef7bb619", "score": "0.56966776", "text": "function getPath()\n\t{\n\t\treturn $this->_path;\n\t}", "title": "" }, { "docid": "08a81447cc895bff90b874fc6a494287", "score": "0.56940186", "text": "public function getPath ()\n {\n return $this->path;\n }", "title": "" }, { "docid": "dab797150ec123df004a04fca03fb648", "score": "0.5692692", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "0b6dc8dfd9fabebf8534c61887223b60", "score": "0.5685645", "text": "public function testCopyCopiesStorageProperly()\n {\n $data = 'contents';\n mkdir(self::$temp . DS . 'text');\n file_put_contents(self::$temp . DS . 'text' . DS . 'foo.txt', $data);\n\n Storage::copy(self::$temp . DS . 'text' . DS . 'foo.txt', self::$temp . DS . 'text' . DS . 'foo2.txt');\n\n $this->assertTrue(is_file(self::$temp . DS . 'text' . DS . 'foo2.txt'));\n $this->assertTrue($data === file_get_contents(self::$temp . DS . 'text' . DS . 'foo2.txt'));\n }", "title": "" }, { "docid": "182cd263b769decce7cd301eb7ccf0db", "score": "0.5685454", "text": "private function getData()\n\t{\n\t\tif(file_exists(self::$file_storage_path))\n\t\t{\n\t\t\treturn file_get_contents(self::$file_storage_path);\n\t\t}\n\t\treturn '[]';\n\t}", "title": "" }, { "docid": "493d533320c06c88ff9aff191aff6588", "score": "0.5685055", "text": "public function getPath()\r\n {\r\n return $this->path;\r\n }", "title": "" }, { "docid": "5a358bd7fb6a407aedf6025243f13f5e", "score": "0.56825703", "text": "public function path()\n {\n return $this->getRealPath();\n }", "title": "" }, { "docid": "5a358bd7fb6a407aedf6025243f13f5e", "score": "0.56825703", "text": "public function path()\n {\n return $this->getRealPath();\n }", "title": "" }, { "docid": "22a2b88aa62488b8a8809d90f9aa7f88", "score": "0.5679391", "text": "public function path() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "62fa5abcba3de2a23166071497fb158e", "score": "0.5677217", "text": "function getDataFolder(){\n return dirname(__FILE__) . '/../data';\n}", "title": "" }, { "docid": "3b9841c92969f88d37adcdae77ab103d", "score": "0.56747997", "text": "function getCopyedFileId() {\n\t\treturn $this->getData('copyedFileId');\n\t}", "title": "" }, { "docid": "def423e601b4db3f1901fa26b4f8cfb9", "score": "0.5654492", "text": "public function getPath() {\n return $this->_path;\n }", "title": "" }, { "docid": "870db70ecc7a6c0d7d94ff087fbfa24b", "score": "0.5649179", "text": "public function path()\n {\n return $this->path;\n }", "title": "" }, { "docid": "870db70ecc7a6c0d7d94ff087fbfa24b", "score": "0.5649179", "text": "public function path()\n {\n return $this->path;\n }", "title": "" }, { "docid": "870db70ecc7a6c0d7d94ff087fbfa24b", "score": "0.5649179", "text": "public function path()\n {\n return $this->path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.5647478", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.5647478", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.5647478", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "30ab2f1c00a7babf66ccaa52a97691f7", "score": "0.5647478", "text": "public function getPath()\n {\n return $this->_path;\n }", "title": "" }, { "docid": "0c57bb06ecb60303a81199c994368288", "score": "0.56472033", "text": "public function getPath() : string ;", "title": "" }, { "docid": "510aac315c36b176947e99d898d4f4a8", "score": "0.5645799", "text": "public function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "510aac315c36b176947e99d898d4f4a8", "score": "0.5645799", "text": "public function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "510aac315c36b176947e99d898d4f4a8", "score": "0.5645799", "text": "public function getPath() {\n\t\treturn $this->path;\n\t}", "title": "" }, { "docid": "17227c9921bebe4ac3c5446be0d22a5c", "score": "0.5643094", "text": "public function path(): string {\n\t\treturn $this->_path;\n\t}", "title": "" }, { "docid": "64c65bc4ba015536359334c47629e935", "score": "0.564054", "text": "abstract protected function getDestinationFilePath();", "title": "" }, { "docid": "5983c0fc932ada422a71215bc5ee9128", "score": "0.5639654", "text": "public function getFilePath();", "title": "" }, { "docid": "70ef99fc184ea8a041b395ed45bfa3ad", "score": "0.56358707", "text": "public function getPath()\n {\n return $this->file_path;\n }", "title": "" }, { "docid": "e84a5736e8dd4bef8422f2b11fa0ed7a", "score": "0.56323475", "text": "public function getRawPathInfo();", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.5627812", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.5627812", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.5627812", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.5627812", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.5627812", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "a9d7838e5d55306c0605ce0d24eff6bb", "score": "0.5627812", "text": "public function getPath() {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" }, { "docid": "2958d37e5d459882c6572ccac637d4ad", "score": "0.56193054", "text": "public function getPath()\n {\n return $this->path;\n }", "title": "" } ]
91401d527cbc6d9b66e35cb63656f844
Show form to create new blog status
[ { "docid": "e954bb1358232df01bd2825b8b310e12", "score": "0.73421997", "text": "public function create(BlogStatusCreateRequest $request)\n {\n return view('admin.blog-status.create-or-edit', [\n 'id' => null,\n 'title' => \"Create New Blog Status\",\n 'item' => new BlogStatus(),\n ]);\n }", "title": "" } ]
[ { "docid": "c3cd23d2320c238d7cb677bc31808154", "score": "0.70514184", "text": "public function actionCreate()\n {\n $model = new BlogForm();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "b35cc3e912eccd6f127c995c82755806", "score": "0.6901052", "text": "public function createAction() {\n\t\t// Check authoraiztion permisstion\n\t\tif (! $this->_helper->requireUser ()->isValid ())\n\t\t\treturn;\n\t\tif (! $this->_helper->requireAuth ()->setAuthParams ( 'blog', null, 'create' )->isValid ())\n\t\t\treturn;\n\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\n\t\t// Checking maximum blog allowed\n\t\t$this->view->maximum_blogs = $maximum_blogs = Engine_Api::_ ()->getItemTable ( 'blog' )->checkMaxBlogs ();\n\t\t$blog_number = Engine_Api::_ ()->getItemTable ( 'blog' )->getCountBlog ( $viewer );\n\t\tif ($maximum_blogs == 0 || $blog_number < $maximum_blogs) {\n\t\t\t$this->view->maximum_reach = false;\n\t\t} else {\n\t\t\t$this->view->maximum_reach = true;\n\t\t}\n\n\t\t// Prepare form\n\t\t$this->view->form = $form = new Ynblog_Form_Create ();\n\n\t\t// Post request checking\n\t\tif (! $this->getRequest ()->isPost ()) {\n\t\t\treturn;\n\t\t}\n\t\tif (! $form->isValid ( $this->getRequest ()->getPost () )) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Process\n\t\t$table = Engine_Api::_ ()->getDbTable ( 'blogs', 'ynblog' );\n\t\t$db = $table->getAdapter ();\n\t\t$db->beginTransaction ();\n\t\ttry {\n\t\t\t// Create blog\n\t\t\t$values = array_merge ( $form->getValues (), array (\n\t\t\t\t\t'owner_type' => $viewer->getType (),\n\t\t\t\t\t'owner_id' => $viewer->getIdentity ()\n\t\t\t) );\n\n\t\t\t// Moderation mode\n\t\t\t$blog_moderation = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.moderation', 0 );\n\t\t\tif ($blog_moderation) {\n\t\t\t\t$values ['is_approved'] = 0;\n\t\t\t} else {\n\t\t\t\t$values ['is_approved'] = 1;\n\t\t\t}\n\t\t\t$blog = $table->createRow ();\n\t\t\t$blog->setFromArray ( $values );\n\n\t\t\t$blog->save ();\n\t\t\t\n\t\t\t // Set photo\n\t\t if( !empty($values['photo']) ) {\n\t\t $blog->setPhoto($form->photo);\n\t\t }\n\n\t\t\t// Authorization set up\n\t\t\t$auth = Engine_Api::_ ()->authorization ()->context;\n\t\t\t$roles = array (\n\t\t\t\t\t'owner',\n\t\t\t\t\t'owner_member',\n\t\t\t\t\t'owner_member_member',\n\t\t\t\t\t'owner_network',\n\t\t\t\t\t'everyone'\n\t\t\t);\n\n\t\t\tif (empty ( $values ['auth_view'] )) {\n\t\t\t\t$values ['auth_view'] = 'everyone';\n\t\t\t}\n\n\t\t\tif (empty ( $values ['auth_comment'] )) {\n\t\t\t\t$values ['auth_comment'] = 'everyone';\n\t\t\t}\n\n\t\t\t$viewMax = array_search ( $values ['auth_view'], $roles );\n\t\t\t$commentMax = array_search ( $values ['auth_comment'], $roles );\n\n\t\t\tforeach ( $roles as $i => $role ) {\n\t\t\t\t$auth->setAllowed ( $blog, $role, 'view', ($i <= $viewMax) );\n\t\t\t\t$auth->setAllowed ( $blog, $role, 'comment', ($i <= $commentMax) );\n\t\t\t}\n\n\t\t\t// Add tags\n\t\t\t$tags = preg_split ( '/[,]+/', $values ['tags'] );\n\t\t\t$blog->tags ()->addTagMaps ( $viewer, $tags );\n\n\t\t\t// Add activity only if blog is published\n\t\t\tif ($values ['draft'] == 0 && $values ['is_approved'] == 1) {\n\t\t\t\t$action = Engine_Api::_ ()->getDbtable ( 'actions', 'activity' )->addActivity ( $viewer, $blog, 'ynblog_new' );\n\n\t\t\t\t// Make sure action exists before attaching the blog to the\n\t\t\t\t// activity\n\t\t\t\tif ($action) {\n\t\t\t\t\tEngine_Api::_ ()->getDbtable ( 'actions', 'activity' )->attachActivity ( $action, $blog );\n\t\t\t\t}\n\n\t\t\t\t// Send notifications for subscribers\n\t\t\t\tEngine_Api::_ ()->getDbtable ( 'subscriptions', 'ynblog' )->sendNotifications ( $blog );\n\n\t\t\t\t$blog->add_activity = 1;\n\t\t\t\t$blog->save ();\n\t\t\t}\n\t\t\t// Commit\n\t\t\t$db->commit ();\n\t\t}\n\n\t\tcatch ( Exception $e ) {\n\t\t\t$db->rollBack ();\n\t\t\tthrow $e;\n\t\t}\n\n\t\t$this -> _redirectCustom($blog);\n\t}", "title": "" }, { "docid": "a42a3388b1b9f57a3f2cf0ad28a87064", "score": "0.6893694", "text": "public function create()\n {\n return view(\"admin.blog.create\");\n }", "title": "" }, { "docid": "05812e98cfddc12b814c7258b2a953a8", "score": "0.6877584", "text": "public function create()\n {\n return view('admin.blogs.add-blog');\n }", "title": "" }, { "docid": "64a4345d92be9263409ea94a26cb417a", "score": "0.67797333", "text": "public function create()\n {\n return view('blog.form');\n }", "title": "" }, { "docid": "74b455a8232e38e0b9413d17821cc7c3", "score": "0.67793226", "text": "public function create()\n {\n return view('blog::form');\n }", "title": "" }, { "docid": "781df7453fa7077a887c348fcf9a323c", "score": "0.6765978", "text": "public function create()\n {\n return view('Admin.create_blog');\n }", "title": "" }, { "docid": "0a27c8d86b9b823d2d3565044547f53e", "score": "0.67639744", "text": "public function create()\n\t{\n\t\treturn View('admin.blog.create');\n\t}", "title": "" }, { "docid": "8fecbd8f692953984edc69ad390fb52c", "score": "0.67525893", "text": "public function create()\n {\n return view('admin.blog.add');\n }", "title": "" }, { "docid": "907c2499da6f223f34555b936558e385", "score": "0.6730715", "text": "public function create()\n {\n return view('our_blog.add');\n }", "title": "" }, { "docid": "cfb126c010dc2c638d3e351c9fd25dff", "score": "0.6727794", "text": "public function create()\n\t{\n\t\treturn view('blog.create');\n\t}", "title": "" }, { "docid": "20e1081a5154906a43fe5d2b3659b60e", "score": "0.6719424", "text": "public function create()\n {\n if(!Security::isAuthenticated())\n {\n header(\"Location: /\");\n exit();\n }\n $this->doCreate();\n\n $view = new View('blog_create');\n $view->title = 'Create Blog';\n $view->heading = 'Create Blog';\n $view->display();\n }", "title": "" }, { "docid": "d3d12b4e9b1545755025121da486753f", "score": "0.6692962", "text": "public function create()\n {\n // Admin only\n\n return view('blog.create');\n }", "title": "" }, { "docid": "de9aa579e776126b7cde828b31cadefd", "score": "0.6681419", "text": "public function manageAction() {\n\t\t// Check authoraiztion permisstion\n\t\tif (! $this->_helper->requireUser ()->isValid ())\n\t\t\treturn;\n\n\t\t// Render\n\t\t$this->_helper->content->setEnabled ();\n\n\t\t\t// Get navigation\n\t\t$this->view->navigation = $navigation = Engine_Api::_ ()->getApi ( 'menus', 'core' )->getNavigation ( 'ynblog_main' );\n\n\t\t// Get quick navigation\n\t\t$this->view->quickNavigation = $quickNavigation = Engine_Api::_ ()->getApi ( 'menus', 'core' )->getNavigation ( 'ynblog_quick' );\n\n\t\t// Prepare data\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\t\t$this->view->form = $form = new Ynblog_Form_Search ();\n\t\t$this->view->canCreate = $this->_helper->requireAuth ()->setAuthParams ( 'blog', null, 'create' )->checkRequire ();\n\t\t$form->removeElement ( 'show' );\n\n\t\t// Populate form\n\t\t$categories = Engine_Api::_ ()->getDbtable ( 'categories', 'ynblog' )->getCategoriesAssoc ();\n\t\tif (! empty ( $categories ) && is_array ( $categories ) && $form->getElement ( 'category' )) {\n\t\t\t$form->getElement ( 'category' )->addMultiOptions ( $categories );\n\t\t}\n\n\t\t// Process form\n\t\t$form->isValid ( $this->_getAllParams () );\n\t\t$values = $form->getValues ();\n\t\t$this->view->formValues = array_filter ( $values );\n\t\t$values ['user_id'] = $viewer->getIdentity ();\n\t\t$mode = $values ['mode'];\n\n\t\tif (isset ( $mode )) {\n\t\t\tif ($mode == '0') {\n\t\t\t\t$values ['draft'] = 1;\n\t\t\t} else if ($mode == '1') {\n\t\t\t\t$values ['draft'] = 0;\n\t\t\t\t$values ['is_approved'] = 0;\n\t\t\t} else if ($mode == '2') {\n\t\t\t\t$values ['draft'] = 0;\n\t\t\t\t$values ['is_approved'] = 1;\n\t\t\t}\n\t\t}\n\t\t// Get blog paginator\n\t\t$this->view->paginator = $paginator = Engine_Api::_ ()->ynblog ()->getBlogsPaginator ( $values );\n\t\t$items_per_page = Engine_Api::_ ()->getApi ( 'settings', 'core' )->getSetting ( 'ynblog.page', 10 );\n\t\t$paginator->setItemCountPerPage ( $items_per_page );\n\t\t$this->view->paginator = $paginator->setCurrentPageNumber ( $values ['page'] );\n\t}", "title": "" }, { "docid": "14e4a80c6ad7c03a86aa29475ac98e4a", "score": "0.6676497", "text": "public function create()\n {\n return view('admin.blog.create');\n }", "title": "" }, { "docid": "9935c71775d40e678027284c85cac96f", "score": "0.667244", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('blog.create');\n\t}", "title": "" }, { "docid": "f6951539e80016337bfcbe8f1004de22", "score": "0.66679364", "text": "public function create()\n {\n return view('dashboard.blog.create');\n }", "title": "" }, { "docid": "7551c141dd7891a0b3349fffacc23721", "score": "0.66266155", "text": "public function create()\n {\n return view('blog.create');\n\n }", "title": "" }, { "docid": "5388f5fb1f1091e5a56e1ae1aa5d5d3f", "score": "0.6615729", "text": "public function actionCreate()\n {\n $model = new Blog();\n $model->sort = 50;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "819a1243476168208005e86f7fa4688c", "score": "0.66026163", "text": "public function addAction(){\n\t\t$form = new BlogForm();\n\t\t\n\t\tif($this->getRequest()->isPost()){\n\t\t\t$this->_initPost();\n\t\t\t$this->saveBlogFromPost($form);\n\t\t}\n\t\t\n\t\treturn array('form' => $form);\n\t}", "title": "" }, { "docid": "01bdaa942e7ade9c6f1c6175302c07db", "score": "0.6597328", "text": "public function create(){\n return view('blog.create');\n }", "title": "" }, { "docid": "ec1503661282033d64fd382d59c3b4c9", "score": "0.6589271", "text": "public function create()\n {\n //\n return view('blog.create');\n }", "title": "" }, { "docid": "ca81534fdd703da29b5bd2f0583cf7a2", "score": "0.6575432", "text": "public function create()\n {\n return view('blogs.create'); \n }", "title": "" }, { "docid": "a1dc997d13ce9cbda2c8fc0fee0913d9", "score": "0.6569679", "text": "public function create()\n {\n return view('dashboard.pages.addblog');\n }", "title": "" }, { "docid": "f06d1ce65c114d4b530ec3dad8e24f8f", "score": "0.6562211", "text": "public function create()\n {\n return view('blog::create');\n }", "title": "" }, { "docid": "f06d1ce65c114d4b530ec3dad8e24f8f", "score": "0.6562211", "text": "public function create()\n {\n return view('blog::create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "2075b2875b0909fcd582ea3e9b293934", "score": "0.6544589", "text": "public function create()\n {\n return view('blog.create');\n }", "title": "" }, { "docid": "7343252a148165ff78b1d3628511344b", "score": "0.6539796", "text": "public function create()\n\t{\n return View::make('statuses.create');\n\t}", "title": "" }, { "docid": "99c568e92cbc6f24fc19b948385f3a3f", "score": "0.6529411", "text": "public function create()\n {\n return view('blog.createBlog');\n }", "title": "" }, { "docid": "93bdb61f4c19e69a0eb4ffbd1e57f9aa", "score": "0.652757", "text": "public function create()\n {\n return view('admin.pages.blog.createBlog');\n }", "title": "" }, { "docid": "2f6b3ce4c498be9d0edb135339059695", "score": "0.6521404", "text": "public function create()\n {\n return view('blogs.create');\n }", "title": "" }, { "docid": "2f6b3ce4c498be9d0edb135339059695", "score": "0.6521404", "text": "public function create()\n {\n return view('blogs.create');\n }", "title": "" }, { "docid": "a2945e80101b1b75ccf13194ee678fb8", "score": "0.6509492", "text": "public function newAction()\n {\n $blog = new Blog();\n $form = $this->createCreateForm($blog);\n\n return $this->render('AnarSuperPanelBundle:Blog:new.html.twig', array(\n 'blog' => $blog,\n 'form' => $form->createView(),\n 'action' => 'create',\n ));\n }", "title": "" }, { "docid": "8ac3c0f29c62b9821816a2e4f99057cb", "score": "0.64918244", "text": "public function create()\n {\n //return view('blog::create');\n }", "title": "" }, { "docid": "d2b1878b1955e4e86dd8c5b6426098c7", "score": "0.6479371", "text": "public function create()\n {\n //create new data\n return view('blog.create');\n }", "title": "" }, { "docid": "0df1e47f0f8b5e192d22907ac1135c32", "score": "0.64661384", "text": "public function create()\n {\n return view('admin.status.create');\n }", "title": "" }, { "docid": "0df1e47f0f8b5e192d22907ac1135c32", "score": "0.64661384", "text": "public function create()\n {\n return view('admin.status.create');\n }", "title": "" }, { "docid": "b23e8cfb7d771529681e0186046b67b7", "score": "0.6465699", "text": "public function create()\n {\n return view('blog/create');\n }", "title": "" }, { "docid": "450908e4921ec9ac384cee2e87156721", "score": "0.6460811", "text": "public function create()\n {\n $category=Category::select('id','name')->where('status',1)->get();\n return view('blog::blog.create',compact('category'));\n }", "title": "" }, { "docid": "bb557ac9a926da151376a2ed091e19f6", "score": "0.6459022", "text": "public function create()\n {\n Gate::authorize('haveaccess', 'blog.create');\n\n $categories = Category::all();\n $tags = Tag::all();\n\n return view('admin.blog.create', compact('categories', 'tags'));\n }", "title": "" }, { "docid": "73bcaede3e72f4640d125683a9dd7e73", "score": "0.6442129", "text": "public function create()\n {\n\t\treturn view('jobstatus.create');\n }", "title": "" }, { "docid": "d3be771bee5376c7ae6308eeaa1c400f", "score": "0.6417364", "text": "public function create() {\n\n return view(\"createBlog\");\n }", "title": "" }, { "docid": "ef11a313117351ab822f8ba42fa5843c", "score": "0.63949615", "text": "public function create()\n {\n $blog_categories = BlogCategory::all();\n return view('backend.blog_system.blog.create', compact('blog_categories'));\n }", "title": "" }, { "docid": "1a4738075303faaf7cca3b92d3de2a72", "score": "0.6352718", "text": "public function create()\n {\n $talent_categories = [];\n $talent_categories = TalentCatagory::all();\n return view('admin.blog.create-blog' , compact('talent_categories') );\n }", "title": "" }, { "docid": "752502f5b53a7021dd90cd7888962b82", "score": "0.632458", "text": "public function create()\n {\n return view('admin.statuses.create');\n }", "title": "" }, { "docid": "f6c29d4f2b89a93e7df2158266268edb", "score": "0.63176364", "text": "public function add()\n {\n $action = $this->Crud->action();\n $action->config('scaffold.fields', [\n 'title',\n 'body',\n 'intro',\n 'status' => [\n 'formatter' => function ($name, $value, $entity) {\n return $entity->statuses($value);\n },\n 'type' => 'select',\n 'options' => Post::statuses(),\n ],\n ]);\n $this->Crud->execute();\n }", "title": "" }, { "docid": "5296e7c19ce4c7c3ddccfa937dbdab31", "score": "0.6310123", "text": "public function create() {\n $statuses = Status::all();\n return view('edit')->with(compact(['statuses']));\n }", "title": "" }, { "docid": "90e6325a2b36db3d7bd753101ecbe99d", "score": "0.6309931", "text": "public function create(BlogRequest $request)\n {\n\n $blog = $this->repository->newInstance([]);\n Form::populate($blog);\n\n $this->theme->prependTitle(trans('blog::blog.names'));\n return $this->theme->of('blog::user.blog.create', compact('blog'))->render();\n }", "title": "" }, { "docid": "c7946913db7cffeb87cc1d111cd57b6f", "score": "0.63096815", "text": "public function newAction()\n {\n return $this->render('AppBlogBundle:Blog:new.html.twig');\n }", "title": "" }, { "docid": "a06b8f541ba92e20da6c11bf0c5533bb", "score": "0.6301176", "text": "public function create()\n {\n return view('status.create');\n }", "title": "" }, { "docid": "c696ef941d8cdd7f373f3f9497453bf3", "score": "0.62970614", "text": "public function add(){\n\t\t\t$this->load->language('catalog/blogs');\n\t\t\t$this->load->model('catalog/blogs');\n\t\t\t$this->document->setTitle('heading_title');\t\t\t\t\t\n\t\t\tif(($this->request->server['REQUEST_METHOD']=='POST')&&$this->validateForm()){\t\t\t\n\t\t\t\t$this->model_catalog_blogs->addBlogs($this->request->post);\n\t\t\t\t$this->session->data['success']=$this->language->get('text_success');\n\t\t\t\t$this->response->redirect($this->url->link('catalog/blogs','token='.$this->session->data['token'],'SSL'));\n\t\t\t}\n\n\t\t\t$this->getForm();\n\t\t}", "title": "" }, { "docid": "58d8b0add8d6801ce157248fc64d5868", "score": "0.6292161", "text": "public function create()\n {\n $statuses = Post::STATUSES;\n return view('admin.posts.create', compact('statuses'));\n }", "title": "" }, { "docid": "5e347ab3b36644abdd730816dca1d077", "score": "0.6291649", "text": "public function create()\n\t{ \n\t\t$tags = Tag::pluck('title','id')->all();\n\t\t$all_user = User::where('is_active','1')->pluck('name','id')->all();\n\t\treturn view('admin.blog.create',compact('tags','all_user'));\n\t}", "title": "" }, { "docid": "18aa226dd5a334f483b0b9412f9dcc20", "score": "0.62896603", "text": "public function index()\n {\n return view('blogs.new_blog');\n }", "title": "" }, { "docid": "28be6ce976396d7cff5e19d905557995", "score": "0.6278814", "text": "public function create()\n {\n return view('admin.pages.blogcat.create');\n }", "title": "" }, { "docid": "2edb71cfe83f065e2c49de10753ba313", "score": "0.62566245", "text": "public function create()\n {\n $data = Post::all();\n $cat = Category::where('status',true) -> latest() -> get();\n $tag = Tag::where('status',true) -> latest() -> get();\n return view('admin.post.create',[\n 'all_data' => $data,\n 'all_cat' => $cat,\n 'all_tag' => $tag,\n ]);\n }", "title": "" }, { "docid": "538c4c677ad5cb9b9bb2b237ad7e4b03", "score": "0.6249496", "text": "public function create()\n\t{\n\t\treturn $this->view('titan::blog.categories.create_edit');\n\t}", "title": "" }, { "docid": "50802f2cb3d2780800dea5f8545c7d5a", "score": "0.62445533", "text": "public function create(){\n $categories = BlogCategory::where(['is_deleted' => 0, 'is_active' => 1])->get();\n $newCategories = $this->getCategory($categories);\n return view('admin.blog.create', ['categories' => $newCategories]);\n }", "title": "" }, { "docid": "23e39eff19c22b73f84e650e529274ab", "score": "0.6239465", "text": "public function create()\n {\n return view('statuses.create');\n }", "title": "" }, { "docid": "180addc9c1e063aea0bc578a8cbc8339", "score": "0.62283075", "text": "public function create()\n {\n $form = new AdministrationForm();\n $form->route(Administration::route('blog.store'));\n $form->form(BlogForm::class);\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('blog::admin.module_name'), Administration::route('blog.index'));\n $breadcrumbs->push(trans('administration::admin.create'), Administration::route('blog.create'));\n });\n\n Administration::setTitle(trans('blog::admin.article') . ' - ' . trans('administration::admin.create'));\n\n return $form->generate();\n }", "title": "" }, { "docid": "fac98aa74a1d6999be62c14de9342e9b", "score": "0.62219465", "text": "public function create()\n {\n $danhSachDanhMuc = DanhMucBlog::get();\n return view('Administrator.Templates.Quanlyblog.AddBlog',compact('danhSachDanhMuc'));\n\n }", "title": "" }, { "docid": "c2055d06f8972a13c671b5cc5bb0fd54", "score": "0.6216565", "text": "public function add()\n {\n \n return view('admin.blogs.add');\n }", "title": "" }, { "docid": "e43e879673b8098243f689f58d53a064", "score": "0.6201065", "text": "function postCreationForm()\n{\n $postManager = new \\EricCodron\\Blog\\Model\\PostManager();\n\n $homeMenuURL = 'index.php';\n $blogMenuURL = 'index.php?action=listPosts';\n $contactMenuURL = 'index.php#contact';\n \n require('view/backend/postCreateView.php');\n}", "title": "" }, { "docid": "06bce5666253748c6de24688b9a37d50", "score": "0.62008864", "text": "public function create()\n {\n $categories = BlogCategory::all();\n\n return view('backend.blog.create', compact('categories'));\n }", "title": "" }, { "docid": "a62e9b039d70c376f15e84f5f99de647", "score": "0.61749417", "text": "public function create()\r\n {\r\n return view('back.post_tag.create', compact('blog_post', 'blog_tag'));\r\n }", "title": "" }, { "docid": "42f94890198db63bb7d4045debb3104d", "score": "0.617156", "text": "public function create()\n {\n $bloglar = Blog::where('blog_ust_id',null)->get();\n return view ('adminkurumsal.bloglar.create',compact('bloglar'));\n }", "title": "" }, { "docid": "64411784b3c875deb50ef655eede0c5e", "score": "0.61713755", "text": "public function create()\n {\n\n return view('blog.edit', ['title' => 'Đăng bài mới']);\n }", "title": "" }, { "docid": "26c2f82e11a0580069d194dc655f2fdf", "score": "0.6170209", "text": "public function create()\n {\n $tag= Tag::lists('name','name');\n return view('blog.create',compact('tag'))->with('title',\"Create New Blog\");\n }", "title": "" }, { "docid": "6309975f269fee2b9d99ad3e1382db13", "score": "0.616939", "text": "public function create()\n {\n return view('blogposts.create');\n }", "title": "" }, { "docid": "ed3ea3606c92d8f54f2bf11fe813048c", "score": "0.61550444", "text": "public function create()\n {\n $thms = Theme::get(); //fetch theme table\n $cats = Category::get(); //fetch categories table\n $tgs = Tag::get();\n $bios = Biog::get([\"id\", \"name\"]); \n\n return view('blogs.create_blog', ['tags'=>$tgs, 'categories'=>$cats, 'themes'=>$thms, \"bios\"=>$bios]); \n }", "title": "" }, { "docid": "268ca80db211be16188b78a16db77bd7", "score": "0.6146719", "text": "public function editAction() {\n\t\t// User checking\n\t\tif (! $this->_helper->requireUser ()->isValid ())\n\t\t\treturn;\n\t\t$viewer = Engine_Api::_ ()->user ()->getViewer ();\n\n\t\t// Get chosen blog to edit\n\t\t$blog = Engine_Api::_ ()->getItem ( 'blog', $this->_getParam ( 'blog_id' ) );\n\t\tif (! Engine_Api::_ ()->core ()->hasSubject ( 'blog' )) {\n\t\t\tEngine_Api::_ ()->core ()->setSubject ( $blog );\n\t\t}\n\t\tif (! $this->_helper->requireSubject ()->isValid ())\n\t\t\treturn;\n\t\tif (! $this->_helper->requireAuth ()->setAuthParams ( $blog, $viewer, 'edit' )->isValid ())\n\t\t\treturn;\n\n\t\t// Prepare form\n\t\t$this->view->form = $form = new Ynblog_Form_Edit ();\n\n\t\t// Populate form\n\t\t$form->populate ( $blog->toArray () );\n\n\t\t$tagStr = '';\n\t\tforeach ( $blog->tags ()->getTagMaps () as $tagMap ) {\n\t\t\t$tag = $tagMap->getTag ();\n\t\t\tif (! isset ( $tag->text ))\n\t\t\t\tcontinue;\n\t\t\tif ('' !== $tagStr)\n\t\t\t\t$tagStr .= ', ';\n\t\t\t$tagStr .= $tag->text;\n\t\t}\n\t\t$form->populate ( array (\n\t\t\t\t'tags' => $tagStr\n\t\t) );\n\t\t$this->view->tagNamePrepared = $tagStr;\n\n\t\t$auth = Engine_Api::_ ()->authorization ()->context;\n\t\t$roles = array (\n\t\t\t\t'owner',\n\t\t\t\t'owner_member',\n\t\t\t\t'owner_member_member',\n\t\t\t\t'owner_network',\n\t\t\t\t'registered',\n\t\t\t\t'everyone'\n\t\t);\n\n\t\tforeach ( $roles as $role ) {\n\t\t\tif ($form->auth_view) {\n\t\t\t\tif ($auth->isAllowed ( $blog, $role, 'view' )) {\n\t\t\t\t\t$form->auth_view->setValue ( $role );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($form->auth_comment) {\n\t\t\t\tif ($auth->isAllowed ( $blog, $role, 'comment' )) {\n\t\t\t\t\t$form->auth_comment->setValue ( $role );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// hide status change if it has been already published\n\t\tif ($blog->draft == \"0\") {\n\t\t\t$form->removeElement ( 'draft' );\n\t\t}\n\n\t\t// Check post/form\n\t\tif (! $this->getRequest ()->isPost ()) {\n\t\t\treturn;\n\t\t}\n\t\tif (! $form->isValid ( $this->getRequest ()->getPost () )) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Process\n\t\t$db = Engine_Db_Table::getDefaultAdapter ();\n\t\t$db->beginTransaction ();\n\n\t\ttry {\n\t\t\t$values = $form->getValues ();\n\n\t\t\t$blog->setFromArray ( $values );\n\t\t\t$blog->modified_date = date ( 'Y-m-d H:i:s' );\n\t\t\t$blog->save ();\n\t\t\t\n\t\t\t// Set photo\n\t\t if( !empty($values['photo']) ) {\n\t\t $blog->setPhoto($form->photo);\n\t\t }\n\n\t\t\t// Authorization\n\t\t\tif (empty ( $values ['auth_view'] )) {\n\t\t\t\t$values ['auth_view'] = 'everyone';\n\t\t\t}\n\n\t\t\tif (empty ( $values ['auth_comment'] )) {\n\t\t\t\t$values ['auth_comment'] = 'everyone';\n\t\t\t}\n\n\t\t\t$viewMax = array_search ( $values ['auth_view'], $roles );\n\t\t\t$commentMax = array_search ( $values ['auth_comment'], $roles );\n\n\t\t\tforeach ( $roles as $i => $role ) {\n\t\t\t\t$auth->setAllowed ( $blog, $role, 'view', ($i <= $viewMax) );\n\t\t\t\t$auth->setAllowed ( $blog, $role, 'comment', ($i <= $commentMax) );\n\t\t\t}\n\n\t\t\t// Handle tags\n\t\t\t$tags = preg_split ( '/[,]+/', $values ['tags'] );\n\t\t\t$blog->tags ()->setTagMaps ( $viewer, $tags );\n\n\t\t\t// Insert new activity if blog is just getting published and\n\t\t\t// approved\n\t\t\tif (! $blog->add_activity && ! $blog->draft && $blog->is_approved) {\n\t\t\t\t$action = Engine_Api::_ ()->getDbtable ( 'actions', 'activity' )->addActivity ( $viewer, $blog, 'ynblog_new' );\n\t\t\t\t// make sure action exists before attaching the blog to the\n\t\t\t\t// activity\n\t\t\t\tif ($action) {\n\t\t\t\t\tEngine_Api::_ ()->getDbtable ( 'actions', 'activity' )->attachActivity ( $action, $blog );\n\t\t\t\t}\n\n\t\t\t\t$blog->add_activity = 1;\n\t\t\t\t$blog->save ();\n\t\t\t}\n\n\t\t\t// Rebuild privacy\n\t\t\t$actionTable = Engine_Api::_ ()->getDbtable ( 'actions', 'activity' );\n\t\t\tforeach ( $actionTable->getActionsByObject ( $blog ) as $action ) {\n\t\t\t\t$actionTable->resetActivityBindings ( $action );\n\t\t\t}\n\n\t\t\t// Send notifications for subscribers\n\t\t\tEngine_Api::_ ()->getDbtable ( 'subscriptions', 'ynblog' )->sendNotifications ( $blog );\n\n\t\t\t$db->commit ();\n\t\t} catch ( Exception $e ) {\n\t\t\t$db->rollBack ();\n\t\t\tthrow $e;\n\t\t}\n\t\t$this -> _redirectCustom($blog);\n\t}", "title": "" }, { "docid": "d3c0ef0089a6a78513c3a041e9de6657", "score": "0.6142884", "text": "public function create()\n {\n return view('blog.ex');\n }", "title": "" }, { "docid": "7189c453190efaae1d854920ee9a738f", "score": "0.612717", "text": "public function create()\n {\n $item = new BlogCategory();\n $categoryList = $this->blogCategoryRepository->getForComboBox();\n\n return view('Blog.admin.categories.edit',\n compact('item','categoryList'));\n }", "title": "" }, { "docid": "e82e4ad8eb65a6af1a1a13b64e3ab38a", "score": "0.6121613", "text": "public function create()\n {\n $tags = Tag::all();\n return view('blogs.create', compact('tags'));\n\n }", "title": "" }, { "docid": "9f0f258572201dce938fb903be22f2f7", "score": "0.61012346", "text": "public function create()\n {\n $categories = Category::orderby('name')->get();\n return view('blog . create', compact('categories'));\n }", "title": "" }, { "docid": "6fd00180ac2c212a22237eb00594bcc5", "score": "0.6095506", "text": "public function create()\n {\n // $this->authorize('manage-taskstatus');\n\n return view('taskstatuses.create');\n }", "title": "" }, { "docid": "60c9cd49b31403b5a21b8a0e9ff16fc7", "score": "0.60890436", "text": "public function create()\n {\n $categories= BlogCategory::get();\n return view('admin.blog.create')->with('categories',$categories);\n }", "title": "" }, { "docid": "748e61c843e6a07007db87907b83d2b0", "score": "0.60831875", "text": "public function create()\n {\n return view('blogarea.create');\n }", "title": "" }, { "docid": "684af6b698b979d7be16fdd1380d6f32", "score": "0.6071361", "text": "public function create()\n {\n return view('blog.create', ['categories'=> Category::all()]);\n }", "title": "" }, { "docid": "31d85efeeae04c1205148dbd1c8fcd73", "score": "0.60710776", "text": "public function actionCreate()\n {\n $model = new statusrohs();\n\t\t$model->status = 'PENDING';\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "3e1fbbbb7f7eaba9fcda1ef0e8bd0d9f", "score": "0.6064349", "text": "public function create()\n {\n\n $categories = Category::all();\n return view('admin.blogs.create', compact('categories'));\n }", "title": "" }, { "docid": "affff0b635f29c27194e34cdc43dc859", "score": "0.6064241", "text": "public function create()\n {\n\n return view('letsblog::themes.master', [\n 'view' => lb_view('admin.posts.create'),\n 'types' => Post::getAllTypes()\n ]);\n }", "title": "" }, { "docid": "5c506c158af19c4619d31447976d9b78", "score": "0.6056369", "text": "public function create()\n {\n $c=Category::all();\n return view('admin.blog.create',compact('c'));\n }", "title": "" }, { "docid": "1f2261179795c7ee5b9fe4b8743da0bb", "score": "0.60547245", "text": "public function addModal()\n {\n \n\n return view('blogs.add');\n }", "title": "" }, { "docid": "29456fcdd2afd0fddd015df143e5119a", "score": "0.60465175", "text": "public function createAction() {\n // Only allow this for logged in users.\n parent::before();\n $this->user = Auth::getUser();\n\n $blog = new Blog(filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING));\n \n \n var_dump($blog->inputCustomer);\n\n if ($blog->save()) {\n Flash::addMessage('New post added', Flash::SUCCESS);\n $this->redirect('/post/index');\n } else {\n Flash::addMessage('Could not add post with blank entries', Flash::WARNING);\n View::renderTemplate('Post/new.html', [\n 'project' => $blog\n ]);\n }\n }", "title": "" }, { "docid": "7fea5073b3f281884dbb9da6533fc309", "score": "0.60398936", "text": "public function create()\n {\n $categories = Category::all();\n return view('frontend.blog.create', compact('categories'));\n }", "title": "" }, { "docid": "ca87edece09ab9321de19d859fa99c81", "score": "0.6039457", "text": "public function create()\n {\n $blog_categories = BlogCategory::all();\n return view('manager.blogs.create',['blog_categories' => $blog_categories]);\n }", "title": "" }, { "docid": "2e5caa062d63c00c04b5ae86283b69e0", "score": "0.6037459", "text": "public function createAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\t\t\n\t\t$form = new Member_Form_Archive();\n\t\t$form->setAction($this->_helper->url(\"save\"));\n\t\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "f119221dadfad407ac5e8a6434f8ce5b", "score": "0.6029233", "text": "public function createPost()\n {\n return View::make('blog.new_post');\n }", "title": "" }, { "docid": "8021c09dfb38a3e954bc81f48df700ca", "score": "0.60292125", "text": "public function create()\n {\n $user = User::find(Auth::id());\n if($user->isAbleTo('blogs')){\n return view('blogs-admin.blogs_create');\n }else{\n abort(403,\"You don't have permission to access this page\");\n }\n }", "title": "" }, { "docid": "822236daedf33dd1d19dd8475b60108d", "score": "0.60262346", "text": "public function postCreate()\n {\n // Declare the rules for the form validation\n $rules = array(\n 'title' => 'required|min:3',\n 'content' => 'required|min:3',\n );\n\n // Create a new validator instance from our validation rules\n $validator = Validator::make(Input::all(), $rules);\n\n // If validation fails, we'll exit the operation now.\n if ($validator->fails()) {\n // Ooops.. something went wrong\n return Redirect::back()->withInput()->withErrors($validator);\n }\n\n // Create a new blog post\n $post = new Post;\n\n // Update the blog post data\n $post->title = e(Input::get('title'));\n $post->slug = e(Str::slug(Input::get('title')));\n $post->excerpt = e(Input::get('excerpt'));\n $post->content = e(Input::get('content'));\n $post->meta_title = e(Input::get('meta-title'));\n $post->meta_description = e(Input::get('meta-description'));\n $post->meta_keywords = e(Input::get('meta-keywords'));\n $post->user_id = Sentinel::getUser()->id;\n\n // Was the blog post created?\n if ($post->save()) {\n // Redirect to the new blog post page\n return Redirect::to(\"admin/blogs/$post->id/edit\")->with('success', Lang::get('kit::admin/blogs/message.create.success'));\n }\n\n // Redirect to the blog post create page\n return Redirect::to('admin/blogs/create')->with('error', Lang::get('kit::admin/blogs/message.create.error'));\n }", "title": "" }, { "docid": "bd314fb0e3e2799093e0ba25120e34e4", "score": "0.6023299", "text": "public function create()\n {\n $data['categories']=Category::get();\n return view('blog.addblog',$data);\n }", "title": "" }, { "docid": "a9f4bba9e8962eace825de0f5e337609", "score": "0.6006084", "text": "public function getAddBlog() {\n return view ( 'cms::admin.latestnews.add');\n }", "title": "" } ]
aa2e48a5b8596975176009ba28021f40
Common::write_log( " PostMods > __construct : " );
[ { "docid": "5c9a425d0b3a3fe463d8cb3511987f8e", "score": "0.0", "text": "public function __construct( )\n\t{\n\n\t\tself::$Globals = parent::getGlobals( );\n\n\n\t\t#add_filter( 'gettext', array( $this, 'custom_enter_title' ), 1 );\n\t\t\n\t\t#add_filter( 'getdecsription', array( $this, 'custom_enter_desc' ), 1 );\n\t\tadd_action( 'init', array( $this, 'addExcerptsToPages' ), 1 );\n\t\tadd_action( 'admin_menu', array( $this, 'removeDefaultPostType' ), 1 );\n\t\tadd_action( 'admin_bar_menu', array( $this, 'removePostAdminToolbarMenuLinks' ), 999 );\n\t}", "title": "" } ]
[ { "docid": "259b0b506cdc71dda269d64076ea3cb1", "score": "0.77101374", "text": "public function post_construct(){}", "title": "" }, { "docid": "259b0b506cdc71dda269d64076ea3cb1", "score": "0.77101374", "text": "public function post_construct(){}", "title": "" }, { "docid": "ebdd7b3c6f7e296e13a61d78c614fbe3", "score": "0.7372021", "text": "function __construct($post, $module_atts = array()) {\r\n parent::__construct($post, $module_atts);\r\n }", "title": "" }, { "docid": "8493f1c3594216a37f1e72be167bef67", "score": "0.72679245", "text": "function __construct()\n {\n Log::Debug(self::TAG, \"__construct\");\n\n }", "title": "" }, { "docid": "820a836accd9742ad320ce6a8c36076c", "score": "0.71236223", "text": "function __construct($post) {\r\n parent::__construct($post);\r\n }", "title": "" }, { "docid": "ea96807e083448b77b7be6bec887c3a6", "score": "0.71211416", "text": "protected function _construct()\n {\n $this->_init('tbblog/post');\n }", "title": "" }, { "docid": "fb608361ec2f9bcc7857948154751a50", "score": "0.70893437", "text": "private function __construct()\n\t{\t\t\n\t}", "title": "" }, { "docid": "6d87be6ab9fb6ac6026b45e8f45c7617", "score": "0.70826757", "text": "private function __construct() {\n\t\n\t\t/* Class instantiation code */\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.70764136", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.70764136", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "eceb177e3e5e96a892ee52a5edc98c9f", "score": "0.70686036", "text": "function __construct($post) {\n parent::__construct($post);\n }", "title": "" }, { "docid": "ea0db09f4336a2572e994ff745c2ff4a", "score": "0.7058635", "text": "private function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "37e03da53a0bf04e1fab39549633cc1c", "score": "0.7058366", "text": "private function __construct() \n {//-------------------->> __construct()\n \n }", "title": "" }, { "docid": "cbd4f5b98354791aeee30473ed3bfb46", "score": "0.7048998", "text": "protected function __construct()\r\n {\r\n //TODO remove constructor's content\r\n $name = get_class($this);\r\n // echo 'creating ' . $name . ' @ ' . date('Y-m-d H:i:s');\r\n }", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.7042633", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.7042633", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "fbaf5228d7551312c3159fd522f8e87b", "score": "0.7037621", "text": "public function __construct(){\n\t$this->log(); // usa a função diretamente sem precisar de uma nova instância da classe\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.7033446", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.70275474", "text": "private function __construct () {}", "title": "" }, { "docid": "9eefcb250a85ee522411852dfd0c932e", "score": "0.70230424", "text": "function _construct(){\n parent::_construct();\n }", "title": "" }, { "docid": "86479c1416edaa6d7b3be04268147c9a", "score": "0.7022325", "text": "private function __construct(){}", "title": "" }, { "docid": "7260034e1dc7573fc2f39f9af3553eeb", "score": "0.70161855", "text": "private final function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "37acf3417a322287c2fbfeb9ef3cf3a6", "score": "0.7007117", "text": "private function __construct(){\n\t}", "title": "" }, { "docid": "37acf3417a322287c2fbfeb9ef3cf3a6", "score": "0.7007117", "text": "private function __construct(){\n\t}", "title": "" }, { "docid": "25a425f6fe7eb5f817292ddb4490dd66", "score": "0.70064175", "text": "public function __construct() {\n\t\tstatic::hook();\n\t}", "title": "" }, { "docid": "144a4367448855f64d87eb290d7aa8d7", "score": "0.7004841", "text": "private function __construct()\n {\n //echo(__METHOD__.'() => Class default constructor.<br />');\n }", "title": "" }, { "docid": "c542e1e5e514f692240370153fe5431f", "score": "0.70014954", "text": "private function __construct() {\n\n \t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "6eb2d20fe821a434b254f32d4d04746c", "score": "0.6987918", "text": "private function __construct() {\n\t}", "title": "" }, { "docid": "92957349e3037deb79bca81e65024bd5", "score": "0.6985129", "text": "private function __construct()\n {//-------------------->> __construct()\n\n }", "title": "" }, { "docid": "63781c49373b1d57ea4cd6b56c9d37e9", "score": "0.69841653", "text": "private function __construct()\r\n {\r\n \r\n\r\n }", "title": "" }, { "docid": "0d307902be1a9171cdcdc8c5e4dbbbcc", "score": "0.6979826", "text": "function _construct ()\n {\n\n parent::_construct ();\n\n }", "title": "" }, { "docid": "8184190fd902c3dfb1ee36580f240271", "score": "0.6971259", "text": "function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "6bd592f13b99fdb628b00e1854be4490", "score": "0.69701403", "text": "public function _construct()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "57aa3bdc59b5440543a281b6c5313962", "score": "0.696994", "text": "function __construct() {\r\n\r\n\t}", "title": "" }, { "docid": "c2aace2d28d2231114c492cdd5a7caad", "score": "0.69596034", "text": "function __construct(){\r\n\r\n\t}", "title": "" }, { "docid": "8932cb61b06312d6616b427f84b402b9", "score": "0.69579893", "text": "function __construct()\n \t{ \t\t\n \t}", "title": "" }, { "docid": "d9a3a515c7efc891701e846d536d5bed", "score": "0.69563526", "text": "function __construct ()\n {}", "title": "" }, { "docid": "d9a4b9459b72dac207f4aa549cae522b", "score": "0.69559246", "text": "function _construct() {\n parent::_construct();\n }", "title": "" }, { "docid": "af0ad0c1f62da0289926883dca9481cf", "score": "0.6954507", "text": "function __construct()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "d0f354b28259f13cc05d46a25bf41f6c", "score": "0.6951499", "text": "private function __construct()\n {}", "title": "" }, { "docid": "2ca0db111fa86304a73caf432b0ef867", "score": "0.6949429", "text": "public function _construct() {\r\n parent::_construct();\r\n }", "title": "" }, { "docid": "e663e0635b02d0cf6f9a399d29425e98", "score": "0.69441396", "text": "function __construct(){\r\n\r\n\r\n\t}", "title": "" }, { "docid": "738878611115cff2540f61ab90ab9258", "score": "0.693875", "text": "private function __construct ( /* void */ ) { /* void */ }", "title": "" }, { "docid": "e2d21a71a67a3215e6811f4c6862763a", "score": "0.69332254", "text": "final private function __construct() {\n\n\t}", "title": "" }, { "docid": "579c18de4b66e38afe1675e02b9e0410", "score": "0.69331306", "text": "protected final function __construct()\n {\n //\n }", "title": "" }, { "docid": "62e0584c27edeff5e8816912fe8bb396", "score": "0.6930559", "text": "function _construct() {\n\t\tparent::_construct();\n\t}", "title": "" }, { "docid": "62e0584c27edeff5e8816912fe8bb396", "score": "0.6930559", "text": "function _construct() {\n\t\tparent::_construct();\n\t}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.692739", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.692739", "text": "function __construct(){}", "title": "" }, { "docid": "a0c16c00c44155008a2950690c5f586e", "score": "0.6922192", "text": "function __construct() {\r\n\t}", "title": "" }, { "docid": "a0c16c00c44155008a2950690c5f586e", "score": "0.6922192", "text": "function __construct() {\r\n\t}", "title": "" }, { "docid": "a0c16c00c44155008a2950690c5f586e", "score": "0.6922192", "text": "function __construct() {\r\n\t}", "title": "" }, { "docid": "a0c16c00c44155008a2950690c5f586e", "score": "0.6922192", "text": "function __construct() {\r\n\t}", "title": "" }, { "docid": "29fb0ae42153ae270714768e15c329c1", "score": "0.6921455", "text": "function __construct () {\n\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.69214535", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.69214535", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.69214535", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "dfda5c23cb87baaba2e26d6f6ac1d66f", "score": "0.69157994", "text": "protected function __construct()\n\t{\n\t\t// Nothing here\n\t}", "title": "" }, { "docid": "dfda5c23cb87baaba2e26d6f6ac1d66f", "score": "0.69157994", "text": "protected function __construct()\n\t{\n\t\t// Nothing here\n\t}", "title": "" }, { "docid": "b6569a049e019f5115117e95e1cf3a96", "score": "0.6910615", "text": "protected function __construct()\n\t{\n\t}", "title": "" }, { "docid": "b6569a049e019f5115117e95e1cf3a96", "score": "0.6910615", "text": "protected function __construct()\n\t{\n\t}", "title": "" }, { "docid": "b6569a049e019f5115117e95e1cf3a96", "score": "0.6910615", "text": "protected function __construct()\n\t{\n\t}", "title": "" }, { "docid": "7c40f5777044be57ec92688f0d3b88c3", "score": "0.6905244", "text": "final private function __construct()\r\n\t\t{\r\n\r\n\t\t}", "title": "" }, { "docid": "5215c877d0440b5e43315f1f137c1206", "score": "0.6904158", "text": "function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "f141c414bfc2a6190473c73aa6f3415c", "score": "0.6902911", "text": "private function __construct()\n {\n //\n }", "title": "" }, { "docid": "f141c414bfc2a6190473c73aa6f3415c", "score": "0.6902911", "text": "private function __construct()\n {\n //\n }", "title": "" }, { "docid": "f141c414bfc2a6190473c73aa6f3415c", "score": "0.6902911", "text": "private function __construct()\n {\n //\n }", "title": "" }, { "docid": "638297fbb6e9e45e08c5b98979eb48b0", "score": "0.6902578", "text": "function __construct() \n\t{\n\t}", "title": "" }, { "docid": "6b8b1bb15e694ec71ec64f1f2cc7b986", "score": "0.690251", "text": "protected function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "6b8b1bb15e694ec71ec64f1f2cc7b986", "score": "0.690251", "text": "protected function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "6b8b1bb15e694ec71ec64f1f2cc7b986", "score": "0.690251", "text": "protected function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "2839f2dfb51a75a171ed9a0897a31847", "score": "0.68905205", "text": "private function __construct()\r\n {\r\n }", "title": "" }, { "docid": "2839f2dfb51a75a171ed9a0897a31847", "score": "0.68905205", "text": "private function __construct()\r\n {\r\n }", "title": "" }, { "docid": "2839f2dfb51a75a171ed9a0897a31847", "score": "0.68905205", "text": "private function __construct()\r\n {\r\n }", "title": "" }, { "docid": "f64c3fe2da9c1ef4d07ba7bc430597be", "score": "0.68874025", "text": "public function _construct()\n {\n parent::_construct();\n }", "title": "" }, { "docid": "0ad300bcde58ec3c28e4484bfbfade37", "score": "0.68862057", "text": "public function __Construct(){\n \n }", "title": "" }, { "docid": "e280830573598f069eb1514036b7c434", "score": "0.6885829", "text": "private function __construct() {\r\n }", "title": "" }, { "docid": "e280830573598f069eb1514036b7c434", "score": "0.6885829", "text": "private function __construct() {\r\n }", "title": "" }, { "docid": "201433bb2af3b93189c57497737f4f15", "score": "0.6884663", "text": "function __construct (){\n\t\t\n\t}", "title": "" }, { "docid": "d16b35e5235213c9cbb8e8d9415fc5a4", "score": "0.6880361", "text": "public function __construct() {\n\n\t\t// Eh bien.\n\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" }, { "docid": "a765ae9c07034d219ac8e08e31689071", "score": "0.6879945", "text": "function __construct() {\n\t}", "title": "" } ]
ffd31b37c2d023ec014c726da1b6e03c
Set max_heap_table_size value in Bytes. By default value is 64M
[ { "docid": "06577b78a89cb6abc2dbb2449bba2286", "score": "0.70742303", "text": "public function set($maxHeapTableSize = null)\n {\n $maxHeapTableSize = (int) (null === $maxHeapTableSize ? $this->defaultMaxHeapTableSie : $maxHeapTableSize);\n if (!$maxHeapTableSize) {\n throw new \\InvalidArgumentException('Wrong max_heap_table_size parameter');\n }\n\n $this->currentMaxHeapTableSize = (int)$this->connection->fetchOne('SELECT @@session.max_heap_table_size');\n if (!$this->currentMaxHeapTableSize) {\n throw new \\RuntimeException('Can not extract max_heap_table_size');\n }\n\n $this->connection->query('SET SESSION max_heap_table_size = ' . $maxHeapTableSize);\n }", "title": "" } ]
[ { "docid": "cd132ec58a2cdef106de1d9ed2396b5a", "score": "0.58950984", "text": "public function getHeapSize()\n {\n return parent::getHeapSize() + 8 +\n count($this->_sampleToGroupTable) * 8;\n }", "title": "" }, { "docid": "ed0326368f20da18f9263fbcbdd1138e", "score": "0.5839669", "text": "public function set_maximum_object_size($size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n Validation_Exception::is_valid($this->validate_maximum_object_size($size));\n\n $size = round($size);\n $this->_set_parameter('maximum_object_size', $size . ' KB', self::CONSTANT_NO_OFFSET, '');\n }", "title": "" }, { "docid": "94db7d563c2154f9420b12d73fc6fb4f", "score": "0.5777887", "text": "public function getMaxSize()\n {\n // Since $max is measured in bytes,\n // dividing $max by 1024 yields kB\n return number_format($this->_max/1024, 1) . 'kB';\n }", "title": "" }, { "docid": "334af4162a6ae931e6d6516963c3f246", "score": "0.57730895", "text": "public function setMaximumSize($val)\n {\n $this->_propDict[\"maximumSize\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fb4b0d4cd31edda980f76f9833645c4b", "score": "0.57629377", "text": "public function setMaxSize($max_size) {\n if (is_numeric($max_size)) {\n $this->max_size = $max_size;\n } else {\n $this->max_size = Util::humanReadableToBytes($max_size);\n }\n\n if ($this->max_size < 0 || $this->max_size == null) {\n throw new \\Exception('invalid max_size value');\n }\n }", "title": "" }, { "docid": "143aaaba423cf86abd1a8633d268df31", "score": "0.5703239", "text": "public function getMaxSize()\n {\n return number_format($this->max/1024, 1) . ' KB';\n }", "title": "" }, { "docid": "92f4d54b70aa025c98de9173ae047951", "score": "0.56887615", "text": "public function maxSize($size=0) {\n if ($size==0) $size=$this->params['maxSize'];\n $this->log_size = $size * (1024 * 1024); // calc megabyt to byte\n }", "title": "" }, { "docid": "c217cc8180540e7f71918e65d07d9c91", "score": "0.56289434", "text": "public function setMaxSize($maxsize)\n {\n $this->maxSize = $maxsize;\n \n if ($maxsize == 1)\n {\n unset($this->height);\n parent::setDefaultOption(TRUE);\n }\n }", "title": "" }, { "docid": "9ab03197ee5d7cc5c04e0aab6bf5b40a", "score": "0.55971557", "text": "public function getHeapSize()\n {\n return parent::getHeapSize() + 8 + 4 * count($this->_compatibleBrands);\n }", "title": "" }, { "docid": "3453952c963d25077fe68f7a15a9df08", "score": "0.55418265", "text": "public function setMaxSize($num)\n {\n if (is_numeric($num) && $num > 0)\n {\n $this->max = (int) $num;\n }\n }", "title": "" }, { "docid": "acae302d35896a8564c6bcb2245a9af3", "score": "0.5433216", "text": "public function getSize()\n {\n return $this->maxHeap->size();\n }", "title": "" }, { "docid": "1acf48528132866e2ce8250fc30ba26a", "score": "0.5428788", "text": "function max_upload_megabytes( $megabytes ) {\n trigger_before( 'max_upload_megabytes', $this, $this );\n $this->max_blob_length = ( $megabytes * 1024000 );\n }", "title": "" }, { "docid": "80b449a04755733dd44111f946b23820", "score": "0.53920734", "text": "public function getMaxSize()\n {\n return $this->size;\n }", "title": "" }, { "docid": "d473bc479375bd1550ef81c04dd60f6e", "score": "0.53414845", "text": "public function getMaximumSize()\n {\n if (array_key_exists(\"maximumSize\", $this->_propDict)) {\n return $this->_propDict[\"maximumSize\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "7cd7f0324d02a36ee1d1f027fcea15a1", "score": "0.5326425", "text": "public function setMaxHashCount($maxHashCount = null)\n {\n self::$maxHashCount = !is_null($maxHashCount) && is_int($maxHashCount) ? $maxHashCount : self::MAX_HASH_COUNT;\n }", "title": "" }, { "docid": "5145b84dae95305986aaffc4f75b9cce", "score": "0.5324449", "text": "public function maxHeapify(&$array = [], $index, $heapSize)\n {\n dump(\"check index $index, value is $array[$index]\");\n while (true) {\n\n $leftChildIndex = $index * 2 + 1;\n $rightChildIndex = $index * 2 + 2;\n $maxValueIndex = $index; // set current index as max value pointer\n\n // if left child greater than max, then assign left to max\n if ($leftChildIndex < $heapSize && $array[$leftChildIndex] > $array[$index]) {\n $maxValueIndex = $leftChildIndex;\n }\n\n // if right child greater than max, then assign right to max\n if ($rightChildIndex < $heapSize && $array[$rightChildIndex] > $array[$maxValueIndex]) {\n $maxValueIndex = $rightChildIndex;\n }\n\n if ($maxValueIndex === $index) {\n dump(\"max $maxValueIndex equal to index $index\");\n // if there is no more data greater than current index\n break;\n } else {\n\n dump(\"parent less than child for index $index, swap it with maxindex $maxValueIndex\");\n // swap the node\n $temp = $array[$index];\n $array[$index] = $array[$maxValueIndex];\n $array[$maxValueIndex] = $temp;\n $index = $maxValueIndex;\n }\n }\n }", "title": "" }, { "docid": "d29b640bda87fd4e1b7fd7bc4d2869d1", "score": "0.52506196", "text": "function osc_max_size_kb() {\n return (int)(getPreference('maxSizeKb'));\n }", "title": "" }, { "docid": "b33735da05e0c0228c503dc401b334db", "score": "0.5229496", "text": "public function getMaxMemory();", "title": "" }, { "docid": "02fccefeca37eab3e16b39062d6ac41b", "score": "0.5224506", "text": "public function setMaxAllowedBytes(int $maxAllowedBytes): self\n {\n $this->maxAllowedBytes = $maxAllowedBytes;\n\n return $this;\n }", "title": "" }, { "docid": "9a663c8f28c22bf77aef0cb49cdf60ed", "score": "0.52075875", "text": "public function getMaxLogFileSize()\n {\n if ($this->maxLogFileSize > 0) {\n return $this->maxLogFileSize;\n }\n return self::ONE_HUNDRED_MB;\n }", "title": "" }, { "docid": "7bf25689803b1d17f09727695f70f2f1", "score": "0.51833797", "text": "public function setMaxKeys($value)\n {\n return $this->set('MaxKeys', $value);\n }", "title": "" }, { "docid": "3e510d954e917e2c8a866aaffd0b2a07", "score": "0.5180124", "text": "public function setMaxQuerySize($size = 50)\n {\n if (!isset($size))\n return;\n $this->max_query_size = (int) $size * 1024;\n return;\n }", "title": "" }, { "docid": "d4fb32249824592b83e4106fe2540b52", "score": "0.5157583", "text": "public function getMaxQuerySize()\n {\n return (int) $this->max_query_size . \"Mb\";\n }", "title": "" }, { "docid": "1c6a6fa8cfdf105ccdbc5669258c759b", "score": "0.51439184", "text": "public function get_max_bytes() : int {\n return $this->maxbytes;\n }", "title": "" }, { "docid": "2a0d9263914590034e3383eeace946df", "score": "0.51416934", "text": "public function resizeToMaxLimit()\n {\n $virtualMachine = $this->getVirtualMachineFromConfig();\n $this->setVirtualMachine($virtualMachine);\n $virtualMachine->resizeToMaxLimit();\n }", "title": "" }, { "docid": "b3b05048a1140e1e45a6e237408a8c3b", "score": "0.5123898", "text": "public function setEnterpriseCloudPrintDiscoveryMaxLimit(?int $value): void {\n $this->getBackingStore()->set('enterpriseCloudPrintDiscoveryMaxLimit', $value);\n }", "title": "" }, { "docid": "5fe7548ec2a3e5ec180d7f5f30a5c864", "score": "0.5107903", "text": "public function setMaxSize($num)\n {\n if (!is_numeric($num)) {\n\n throw new Exception(\"Maximum size must be a number.\");\n\n }\n\n // cast _max as an integer\n $this->_max = (int) $num;\n }", "title": "" }, { "docid": "80bb2f3dbb1a012b538deccb164d7af3", "score": "0.5079594", "text": "static function setMaxLogSize( $size )\n {\n $GLOBALS['eZDebugMaxLogSize'] = $size;\n }", "title": "" }, { "docid": "82d7667e4fa13ec3ef41b57412e69479", "score": "0.5073505", "text": "public function getMaxAllowedBytes(): int\n {\n return $this->maxAllowedBytes;\n }", "title": "" }, { "docid": "7d7817736e125f6c04e58beeba79933e", "score": "0.5069518", "text": "public function get_maximum_object_size()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!$this->is_loaded)\n $this->_load_config();\n\n if (isset($this->config[\"maximum_object_size\"])) {\n $items = preg_split(\"/\\s+/\", $this->config[\"maximum_object_size\"][\"line\"][1]);\n\n if (isset($items[0])) {\n if (isset($items[1]))\n return $this->_size_in_kilobytes($items[0], $items[1]);\n else\n return $items[0];\n } else {\n return self::DEFAULT_MAX_OBJECT_SIZE;\n }\n } else {\n return self::DEFAULT_MAX_OBJECT_SIZE;\n }\n }", "title": "" }, { "docid": "7257ae61604dcf6c5086d98e30138488", "score": "0.5054808", "text": "public function buildMaxHeap(&$array)\n {\n $length = count($array);\n $start = (int)floor($length / 2 - 1);\n for ($i = $start; $i >= 0; $i--) {\n $this->maxHeapify($array, $i, $length);\n }\n }", "title": "" }, { "docid": "f4057688641f79d2b794465914732b65", "score": "0.50527996", "text": "public function setFileMaxSize($fileMaxSize) {\r\n\t\tif (is_string($fileMaxSize)) {\r\n\t\t\t$this->fileMaxSize = $this->_convertMaxFileSize($fileMaxSize);\r\n\t\t} else {\r\n\t\t\t$this->fileMaxSize = $fileMaxSize;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1fb09c292ba976ff36d530ef1c0a2e0d", "score": "0.50516677", "text": "protected function _validate_max_bytes($value, $max) {\n return $this->_validate_max(strlen($value), $max);\n }", "title": "" }, { "docid": "b57ea02af635df4ca96a2d244d0d6503", "score": "0.5050402", "text": "function getMaxKeySize()\n {\n return $this->_key_size;\n }", "title": "" }, { "docid": "b57ea02af635df4ca96a2d244d0d6503", "score": "0.5050402", "text": "function getMaxKeySize()\n {\n return $this->_key_size;\n }", "title": "" }, { "docid": "295bf4ac6d7373c780506959aacd2108", "score": "0.5042147", "text": "public function setMaximumSize( $newValue ) {\n\t\tif( $newValue > 1 ) {\n\t\t\t$this->_maximumSize\t= $newValue;\n\t\t\t// set size to the same value (seems to be a good idea)\n\t\t\t$this->_size\t= $newValue;\n\t\t} else {\n\t\t\t// deactivate feature if value is below 2\n\t\t\t$this->_maximumSize\t= null;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ef507de88380011ec2498e90ff2861d1", "score": "0.5020901", "text": "private function getPostMaxSize()\n {\n if (is_numeric($postMaxSize = \\ini_get('post_max_size'))) {\n return (int) $postMaxSize;\n }\n $metric = strtoupper(substr($postMaxSize, -1));\n $postMaxSize = (int) $postMaxSize;\n switch ($metric) {\n case 'K':\n return $postMaxSize * 1024;\n case 'M':\n return $postMaxSize * 1048576;\n case 'G':\n return $postMaxSize * 1073741824;\n default:\n return $postMaxSize;\n }\n }", "title": "" }, { "docid": "a403ff8927c2727583b31e3d921f8a23", "score": "0.50155467", "text": "function _phpset_memorylimit_MB($newvalue) {\n $current = @ini_get('memory_limit');\n if(preg_match(\"/(.*)M/\", $current, $matches)) {\n // Check if current value is less then new value\n if($matches[1] < $newvalue) {\n @ini_set('memory_limit', \"{$newvalue}M\");\n }\n }\n}", "title": "" }, { "docid": "624a76f270d8fad82420ebbb4602fc9f", "score": "0.49813527", "text": "public function setMaxMessageSize($val)\n {\n $this->_propDict[\"maxMessageSize\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "f0d8354d8b6b0c87e65219c7802b668e", "score": "0.4970197", "text": "public function setMaxFileSize($iSize) {\n\t\tif (is_numeric($iSize)) {\n\t\t\t$this->iMaxFileSize = $iSize;\n\t\t}\n\t}", "title": "" }, { "docid": "8fdd28e4cbb7f2cf266c7d328723354a", "score": "0.49595186", "text": "public function set_max_backups( $max ) {\n\n\t\tif ( empty( $max ) || ! is_int( $max ) )\n\t\t\tthrow new Exception( 'Argument 1 for ' . __METHOD__ . ' must be a valid integer' );\n\n\t\t$this->options['max_backups'] = $max;\n\n\t}", "title": "" }, { "docid": "16f36738cbcdfa410ac15ce1123b6d69", "score": "0.49584466", "text": "public function setMaxFileSize(int $bytes): void\n {\n $this->maxFileSize = $bytes;\n }", "title": "" }, { "docid": "00594eb9c50eb40daf87e53bb38cc245", "score": "0.4946952", "text": "public function setMaxFileSize($size = null)\n {\n $postMaxSize = $this->_getBinarySize(ini_get('post_max_size'));\n $fileMaxSize = $this->_getBinarySize(ini_get('upload_max_filesize'));\n \n // Start with the max size as the lower of the two php ini settings.\n $strictMaxSize = $postMaxSize->compare($fileMaxSize) > 0\n ? $fileMaxSize\n : $postMaxSize;\n\n // If the plugin max file size setting is lower, choose it as the strict max size\n $pluginMaxSizeRaw = trim(get_option(CsvImportPlugin::MEMORY_LIMIT_OPTION_NAME));\n if ($pluginMaxSizeRaw != '') {\n if ($pluginMaxSize = $this->_getBinarySize($pluginMaxSizeRaw)) {\n $strictMaxSize = $strictMaxSize->compare($pluginMaxSize) > 0\n ? $pluginMaxSize\n : $strictMaxSize;\n }\n }\n\n if ($size === null) {\n $maxSize = $this->_maxFileSize;\n } else {\n $maxSize = $this->_getBinarySize($size); \n }\n \n if ($maxSize === false || \n $maxSize === null || \n $maxSize->compare($strictMaxSize) > 0) {\n $maxSize = $strictMaxSize;\n }\n \n $this->_maxFileSize = $maxSize;\n }", "title": "" }, { "docid": "05685916a540eedc1af4ec77a40b0099", "score": "0.49386144", "text": "public function getTotalMaxSize() {\n return $this->getStats('limit_maxbytes');\n }", "title": "" }, { "docid": "7f185cf6f3c86726004a011841723c76", "score": "0.49180874", "text": "public function setMaxContextSize($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_context_size = $var;\n\n return $this;\n }", "title": "" }, { "docid": "b46fe7e678e6e7856e775030002a8902", "score": "0.49144882", "text": "public function setMaximumHeight($value)\n {\n return $this->set('MaximumHeight', $value);\n }", "title": "" }, { "docid": "adb41a3f008a8ed2e7efda20fa477a01", "score": "0.48746842", "text": "function wporg_themes_upload_size_limit() {\n\treturn 10 * MB_IN_BYTES;\n}", "title": "" }, { "docid": "01da491dbcfa00592629facbf2151478", "score": "0.4872924", "text": "public function setFileMaxSize( $iFileMaxSize)\n {\n $this->_iFileMaxSize = (int) $iFileMaxSize;\n }", "title": "" }, { "docid": "aa7445616a8fb97b9ec12969aac4d907", "score": "0.4868218", "text": "public function setMaxEntries(int $maxEntries): void\n {\n $this->countChecked = false;\n $this->maxEntries = $maxEntries;\n }", "title": "" }, { "docid": "58f46e5ddeefd004a409d845afc910ee", "score": "0.4844402", "text": "public function getMaxMessageSize()\n {\n if (array_key_exists(\"maxMessageSize\", $this->_propDict)) {\n return $this->_propDict[\"maxMessageSize\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "44324bf6434927fe2ea0a49e3f35db16", "score": "0.48409176", "text": "public function setMaxLength($value)\n\t{\n\t\t$this->setViewState('MaxLength',TPropertyValue::ensureInteger($value),0);\n\t}", "title": "" }, { "docid": "ebe22775c0ad08054a59a5a016c8b781", "score": "0.48379827", "text": "public function max($kB) {\n if(!is_int($kB)) {\n throw new InvalidArgumentException(\n 'You must pass an integer to this method');\n }\n $this->v['max'] = $kB;\n return $this;\n }", "title": "" }, { "docid": "efa1e96e3ad8e00f3715b1e6a1a11607", "score": "0.4833024", "text": "public function setMaxvalue($maxvalue){\n\t\t$this->maxvalue = $maxvalue;\n\t}", "title": "" }, { "docid": "69f9c1a9b62b8cb1738ce894f9166330", "score": "0.48171487", "text": "public static function _setSharedMemorySizeMB(int $size_mb)\n\t{\n\t\tself::$sharedMemSize = abs($size_mb) * (1024 ** 2);\n\t}", "title": "" }, { "docid": "1062e6ad47d06ad988085813db4304ca", "score": "0.4807673", "text": "public function setKiloBytesOfData($dataSizeInKB = 100);", "title": "" }, { "docid": "bbe539a0b9b2e5608b73acf0cbaa399d", "score": "0.48069352", "text": "public function setMax($max)\n {\n $this->max = $max;\n }", "title": "" }, { "docid": "bbe539a0b9b2e5608b73acf0cbaa399d", "score": "0.48069352", "text": "public function setMax($max)\n {\n $this->max = $max;\n }", "title": "" }, { "docid": "490a61a61f0d562a9741dfac04190309", "score": "0.4805586", "text": "public function setMax($max) {\n\t\t$this->max = $max;\n\t}", "title": "" }, { "docid": "bdc6a080debd322c15ce4896375aa5f4", "score": "0.4805429", "text": "public function get_wp_max_upload_size() {\n\t\t$in_bytes = 1000000;\n\t\t$wp_max_upload_size = 0;\n\t\tif ( wp_max_upload_size() > 1100000 ) {\n\t\t\t$wp_max_upload_size = floor( wp_max_upload_size() / $in_bytes );\n\t\t}\n\t\treturn $wp_max_upload_size;\n\t}", "title": "" }, { "docid": "86e3df55dc1ebbf6683521d608017f34", "score": "0.48023078", "text": "function sm_maxuploadbytes()\n\t\t{\n\t\t\tif (!function_exists('ini_bytes_val'))\n\t\t\t\t{\n\t\t\t\t\tfunction ini_bytes_val($ini_v)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ini_v = trim($ini_v);\n\t\t\t\t\t\t\t$s = Array('g' => 1 << 30, 'm' => 1 << 20, 'k' => 1 << 10);\n\t\t\t\t\t\t\treturn intval($ini_v) * ($s[strtolower(substr($ini_v, -1))] ?: 1);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$max=sm_settings('max_upload_filesize');\n\t\t\t$maxini = ini_bytes_val(ini_get('post_max_size'));\n\t\t\tif ($maxini<$max)\n\t\t\t\t$max=$maxini;\n\t\t\t$maxini = ini_bytes_val(ini_get('upload_max_filesize'));\n\t\t\tif ($maxini<$max)\n\t\t\t\t$max=$maxini;\n\t\t\treturn $max;\n\t\t}", "title": "" }, { "docid": "13553a27c10c5568bb4c1c6414df9971", "score": "0.4779786", "text": "public function setMemoryLimit($limit)\n {}", "title": "" }, { "docid": "362bb4e1ba822b763a518b4214e872da", "score": "0.4772158", "text": "public function set_maximum_file_download_size($size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n Validation_Exception::is_valid($this->validate_maximum_file_download_size($size));\n\n if ($size == 'none') {\n $this->_set_parameter('reply_body_max_size', $size, self::CONSTANT_NO_OFFSET, self::DEFAULT_REPLY_BODY_MAX_SIZE_VALUE);\n } else {\n $this->_set_parameter('reply_body_max_size', \"$size KB\", self::CONSTANT_NO_OFFSET, self::DEFAULT_REPLY_BODY_MAX_SIZE_VALUE);\n }\n }", "title": "" }, { "docid": "070ab6dfdaf690a0c9f7bd3d00f59bc8", "score": "0.47695172", "text": "public function testSetMax()\n {\n $validator = new File\\Size(['max' => 0, 'useByteString' => true]);\n $this->assertEquals('0B', $validator->getMax());\n\n $validator->setMax(1000000);\n $this->assertEquals('976.56kB', $validator->getMax());\n\n $validator->setMin(100);\n $this->assertEquals('976.56kB', $validator->getMax());\n\n $validator->setMax('100 AB');\n $this->assertEquals('100B', $validator->getMax());\n\n $validator->setMax('100 kB');\n $this->assertEquals('100kB', $validator->getMax());\n\n $validator->setMax('100 MB');\n $this->assertEquals('100MB', $validator->getMax());\n\n $validator->setMax('1 GB');\n $this->assertEquals('1GB', $validator->getMax());\n\n $validator->setMax('0.001 TB');\n $this->assertEquals('1.02GB', $validator->getMax());\n\n $validator->setMax('0.000001 PB');\n $this->assertEquals('1.05GB', $validator->getMax());\n\n $validator->setMax('0.000000001 EB');\n $this->assertEquals('1.07GB', $validator->getMax());\n\n $validator->setMax('0.000000000001 ZB');\n $this->assertEquals('1.1GB', $validator->getMax());\n\n $validator->setMax('0.000000000000001 YB');\n $this->assertEquals('1.13GB', $validator->getMax());\n }", "title": "" }, { "docid": "60f681b1d0b8157c1175d962b0d2c6e9", "score": "0.47519028", "text": "public function setMaxLimit($value)\n\t{\n\t\t$this->max_limit = (int)$value;\n\t}", "title": "" }, { "docid": "ec75e5cab2a5c819759dac63020606bd", "score": "0.4751259", "text": "public function SetArchiveMaxItems ($archiveMaxItems = 1000);", "title": "" }, { "docid": "d688392d77e999ec9c73444c36910dd9", "score": "0.47460282", "text": "public function getMaxUploadSize()\n\t{\n\t\t$maxUpload = (int)(ini_get('upload_max_filesize'));\n\t\t$maxPost = (int)(ini_get('post_max_size'));\n\t\t$memoryLimit = (int)(ini_get('memory_limit'));\n\t\t$uploadMb = min($maxUpload, $maxPost, $memoryLimit);\n\n\t\t// Convert MB to B and return\n\t\treturn $uploadMb * 1048576; // 1024 x 1024 = 1048576\n\t}", "title": "" }, { "docid": "e544a58f402a922ee246b46d3a6f2984", "score": "0.47360745", "text": "public function set_key_size($size) {\r\n\t\t$this->keySize = $size;\r\n\t}", "title": "" }, { "docid": "e1b445b1939324183d40f2614f41af3a", "score": "0.4731472", "text": "public function setMaximumLogFileSize(int $maximumLogFileSize): void\n {\n $this->maximumLogFileSize = $maximumLogFileSize;\n }", "title": "" }, { "docid": "b26c844da94b181df9c1a31f7d309a5e", "score": "0.4716401", "text": "public function setValueSize($var)\n {\n GPBUtil::checkInt32($var);\n $this->value_size = $var;\n\n return $this;\n }", "title": "" }, { "docid": "24b41c9b6dde80b556e137b306c8e85f", "score": "0.47142944", "text": "function blog_upload_space() {\n\t\treturn 1024 * 1024 * 15; // 15 terabytes\n\t}", "title": "" }, { "docid": "04999957f7b886bfa5e819ff6e7e1007", "score": "0.4709165", "text": "public function max(int $kilobyte)\n {\n $this->max = (1000 * $kilobyte);\n\n return $this;\n }", "title": "" }, { "docid": "baa8f34bd916d2740e878de7e8fd6e67", "score": "0.46828812", "text": "public static function memory_limits() {\n\t\tcheck_ajax_referer( SEARCHWP_PREFIX . 'settings' );\n\n\t\t$wp = wp_convert_hr_to_bytes( WP_MEMORY_LIMIT );\n\t\t$php = \\SearchWP\\Utils::get_memory_limit();\n\n\t\t// At least 64MB RAM is recommended if available.\n\t\t$recommended = 67108864; // 64MB.\n\t\t$sufficient = true; // Assume true in case recommended is not available.\n\n\t\t// If PHP has more memory avaiable than what is recommended...\n\t\tif ( $php > $recommended ) {\n\t\t\t// Memory is sufficient if WordPress is using more than what is recommended.\n\t\t\t$sufficient = $wp > $recommended;\n\t\t}\n\n\t\t$sufficient = (bool) apply_filters( 'searchwp\\memory_sufficient', $sufficient );\n\n\t\twp_send_json_success( [\n\t\t\t'wp' => size_format( $wp ),\n\t\t\t'php' => size_format( $php ),\n\t\t\t'recommended' => size_format( $recommended ),\n\t\t\t'sufficient' => $sufficient,\n\t\t] );\n\t}", "title": "" }, { "docid": "6c5a1c1d2c3c2931ca2b153ee2a668a1", "score": "0.46809775", "text": "public function getMaxFileSize()\n {\n if (!$this->_maxFileSize) {\n $this->setMaxFileSize();\n }\n return $this->_maxFileSize;\n }", "title": "" }, { "docid": "4c13b2bcd797e64e3792282129d7492e", "score": "0.46760395", "text": "function get_memory_limits(){\n return array(1,2,4,16,32,64,512,1024);\n }", "title": "" }, { "docid": "82d90113691fb2d491eeed7ca88cf520", "score": "0.46612105", "text": "public function set_cache_size($size)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n Validation_Exception::is_valid($this->validate_cache_size($size));\n\n $size = round($size / 1024); // MB for cache_dir\n $this->_set_parameter('cache_dir', $size, 3, self::DEFAULT_CACHE_DIR_VALUE);\n }", "title": "" }, { "docid": "3efdff1fd22595e1f83487105bfb3570", "score": "0.4649495", "text": "public function set_max_filesize($size) {\n $this->max_filesize = $size;\n }", "title": "" }, { "docid": "02c1483a967dea71a5dfbab9c292b18c", "score": "0.46418735", "text": "function yz_set_max_attachments_file_size( $size = null ) {\n // 10MB.\n return 10240000;\n}", "title": "" }, { "docid": "ce32f910ad7eca5a5a8c03e6655960dc", "score": "0.46385047", "text": "public function setMaxFileUploadSize($maxFileUploadSize)\n {\n $this->maxFileUploadSize = (int) $maxFileUploadSize;\n }", "title": "" }, { "docid": "08c11590f12ee23a07847b12a3b9ac68", "score": "0.46298105", "text": "function setMaximumValue($value) {\n\t\t$this->_maximumValue = $value;\n\t}", "title": "" }, { "docid": "f041138e6c7a438a1da75b776e7fae36", "score": "0.46277988", "text": "public function setMaxValue($value)\n {\n return $this->set('MaxValue', $value);\n }", "title": "" }, { "docid": "821454fe03c55dd58e15a5e2430a9b5b", "score": "0.46268004", "text": "public function setSize($value)\n {\n return $this->set('Size', $value);\n }", "title": "" }, { "docid": "1a653c5d46b8b443d4b72b0677a8905c", "score": "0.4624406", "text": "public function getMemoryLimit();", "title": "" }, { "docid": "5a6eef32885bf7b8338d66ceba878fd8", "score": "0.45981073", "text": "public function setSize($value)\n {\n return $this->setField('Size', $value);\n }", "title": "" }, { "docid": "41fa6fceade7b81cb16a6129e906ffbe", "score": "0.45919082", "text": "public function getMaxHashCount()\n {\n return isset(self::$maxHashCount) ? self::$maxHashCount : self::MAX_HASH_COUNT;\n }", "title": "" }, { "docid": "a6eea48892e256f7fbc898483fdcc02d", "score": "0.45738", "text": "public function setMaxHeight($aMaxHeight) {\n $this->maxHeight = $aMaxHeight;\n }", "title": "" }, { "docid": "ee89fc6693c46534f09cba9a24910023", "score": "0.4572097", "text": "public static function maxBytesUpload ()\n\t\t{\n\t\t\t$values = [\n\t\t\t\tini_get('post_max_size'),\n\t\t\t\tini_get('upload_max_filesize'),\n\t\t\t\tini_get('memory_limit'),\n\t\t\t];\n\n\t\t\t$min = false;\n\t\t\tforeach ($values as $v)\n\t\t\t{\n\t\t\t\tif ($v != -1)\n\t\t\t\t{\n\t\t\t\t\t$bytes = self::toBytes($v);\n\t\t\t\t\tif ($bytes != null)\n\t\t\t\t\t\t$min = $min ? min($min, $bytes) : $bytes;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $min ? $min : null;\n\t\t}", "title": "" }, { "docid": "e7852f0370fac050cfd7873372b34464", "score": "0.45669493", "text": "function hmbkp_get_max_attachment_size() {\n\n\t$max_size = '10mb';\n\n\tif ( defined( 'HMBKP_ATTACHMENT_MAX_FILESIZE' ) && wp_convert_hr_to_bytes( HMBKP_ATTACHMENT_MAX_FILESIZE ) )\n\t\t$max_size = HMBKP_ATTACHMENT_MAX_FILESIZE;\n\n\treturn wp_convert_hr_to_bytes( $max_size );\n\n}", "title": "" }, { "docid": "56a2adadf237e39403461e97cf037d25", "score": "0.4566497", "text": "public function get_max_upload_size() {\n\n\t\t$max_upload_size = 2097152; // 2MB.\n\t\t$wp_max_upload_size = wp_max_upload_size();\n\t\t$max_upload_size = min( $max_upload_size, $wp_max_upload_size );\n\n\t\treturn apply_filters( 'ig_es_max_upload_size', $max_upload_size );\n\t}", "title": "" }, { "docid": "cffbdff4fd1f6842da87a7a960ccb27c", "score": "0.4556743", "text": "public function setLargeThumbnail($value)\n\t{\n\n\t\t$this->_setThumbnail(self::THUMBNAIL_LARGE, $value);\n\n\t}", "title": "" }, { "docid": "51dc3ef7ab82e509ee9d8e12a5661a70", "score": "0.45553732", "text": "public function setMaximumLength($value)\n {\n return $this->set('MaximumLength', $value);\n }", "title": "" }, { "docid": "6f4f6a87c7209c452f6c54bcb8e15215", "score": "0.45354983", "text": "public function getMaxEntries(): int\n {\n return $this->maxEntries;\n }", "title": "" }, { "docid": "fb836c1fec4643ccd6f867455a57c249", "score": "0.4513273", "text": "public function setSize(?int $value): void {\n $this->getBackingStore()->set('size', $value);\n }", "title": "" }, { "docid": "23fa7b06b57f7601d9d15ef3d592435d", "score": "0.44970652", "text": "public function set_max_file_size($size) {\r\n\r\n\t\t$this->max_file_size\t= $size;\r\n\r\n\t\t//if max file size is set -> set callback\r\n\t\t$this->callbacks[]\t= 'check_file_size';\r\n\r\n\t}", "title": "" }, { "docid": "17ad54603f9f7adabceeb8ba6e038695", "score": "0.44743168", "text": "public function getMaxContextSize()\n {\n return $this->max_context_size;\n }", "title": "" }, { "docid": "4873406fca7282521ddbd62d195da52d", "score": "0.4473523", "text": "private function getMaxPages() {\n\n\t global $wpdb;\n\n\t if ( isset($this->maxPages) || is_null( $this->maxPages ) ) :\n\n\t\t $table = $this->getTable();\n $limit = $this->getLimit();\n\n\t\t $max_pages_query = sprintf('SELECT `id_contact_entries` FROM %s', $table );\n\t\t $this->maxPages = ceil($wpdb->query($max_pages_query)/$limit);\n endif;\n\n return $this->maxPages;\n\n\n }", "title": "" }, { "docid": "818aee5a010b87f69e45e8668c6199cc", "score": "0.4471877", "text": "private static function max_upload_size() {\n\t\t$u_bytes = self::convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );\n\t\t$p_bytes = self::convert_hr_to_bytes( ini_get( 'post_max_size' ) );\n\t\t$bytes = apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );\n\n\t\treturn $bytes;\n\t}", "title": "" }, { "docid": "2f546cbb81b61136ae510bde37be54cf", "score": "0.4447595", "text": "public function getCronPageSizeLimit()\n {\n //return 50;\n return $this->config('limit');\n }", "title": "" }, { "docid": "dde0a2b3bc9a73abd6cb54fa6b079247", "score": "0.44421825", "text": "function test_is_size_bigger_than_one_mb() {\n\t\t\t$number = pow( 1024, 2 ) + 1;\n\n\t\t\t$this->assertTrue( is_bigger_than_1mb( $number ) );\n\t}", "title": "" }, { "docid": "fe14f95b3e3b08e439514d998a97ca1b", "score": "0.4435277", "text": "public function setEstimatedDeliveryTimeMax($value);", "title": "" }, { "docid": "5ec3a022150ad08cd212424ae964fadf", "score": "0.4419142", "text": "public function getSizeAttribute($value)\n {\n return round(($value / 1024 / 1024) , 2) . ' mb';\n }", "title": "" } ]
78e73b9a549844f530cbc8507ad9dbe7
Method to set the value of field refund_applied
[ { "docid": "b76d5d8f6eba05e25532b4d84b29067b", "score": "0.64573497", "text": "public function setRefundApplied($refund_applied)\n {\n $this->refund_applied = $refund_applied;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "49e26634f97813ccef5ec9dae2d485d7", "score": "0.6315874", "text": "public function getRefundApplied()\n {\n return $this->refund_applied;\n }", "title": "" }, { "docid": "b2957d6ec4ac7141274c0d708202e014", "score": "0.56487495", "text": "public function setRefundedMoney(?Money $refundedMoney): void\n {\n $this->refundedMoney = $refundedMoney;\n }", "title": "" }, { "docid": "6437f0021ebdbf970d3051539d39b7fb", "score": "0.5643577", "text": "public function record_refund() {\n // This happens manually in test mode\n }", "title": "" }, { "docid": "480421de6bdfd173c9ab09e5c2dfa4da", "score": "0.553972", "text": "public function getRefundAppliedAt()\n {\n return $this->refund_applied_at;\n }", "title": "" }, { "docid": "a8194a865c60c865102f9e8146e67e2b", "score": "0.55185217", "text": "public function getRefundAmount(): float\n {\n return $this->refundAmount;\n }", "title": "" }, { "docid": "957f6254c1c8aededd4efc5a3b954660", "score": "0.5486923", "text": "public function setRefunded($refunded)\n {\n $this->refunded = $refunded;\n\n return $this;\n }", "title": "" }, { "docid": "684b6870867da6f4934f5358260b8072", "score": "0.544243", "text": "public function admin_set_referrer_payment(){\n\t\tController::loadModel('Referrer');\n\t\tif(!empty($this->request->data)){ //pr($this->request->data);die;\n\t\t\tif($this->Referrer->save($this->request->data, false)){\n\t\t\t\t$this->Session->setFlash(__('Amount set successfully!!', true), 'message', array('class'=>'message-green'));\n\t\t\t\t$this->redirect('/admin/invites/set_referrer_payment/');\n\t\t\t}else\n\t\t\t\t$this->Session->setFlash(__('Please Try Later!!', true), 'message', array('class'=>'message-red'));\n\t\t}\n\n\t\t$this->data = $this->Referrer->findById('1');\n\t}", "title": "" }, { "docid": "094a0b3c3736db82eb22d3e3c1468c81", "score": "0.53774685", "text": "public function setIsUsedForRefund($isUsedForRefund);", "title": "" }, { "docid": "55f94957e21b267fd15dfaebf07411c0", "score": "0.5291212", "text": "public function getRefunded()\n {\n return $this->refunded;\n }", "title": "" }, { "docid": "2f4ed64c0fee9f4e651e01e6f3f1be96", "score": "0.5281213", "text": "public function correctAmount(&$declineForm) {\n $post = Yii::app()->request->getPost('DeclineForm');\n $type = Yii::app()->request->getPost('type');\n $declineForm->attributes = $post;\n $action = '';\n\n switch($type) {\n case 'correct-payment':\n // Change model scenario\n $declineForm->setScenario('userInvoicingCorrection');\n $action = 'corrected';\n $status = AccUserJobPayment::STATUS_CORRECTED_BY_ADMIN;\n break;\n case 'close-payment':\n // Change model scenario\n $declineForm->setScenario('userInvoicingRest');\n $action = 'closed';\n $status = AccUserJobPayment::STATUS_CLOSED;\n break;\n case 'decline-payment':\n // Change model scenario\n $declineForm->setScenario('userInvoicingRest');\n $action = 'declined';\n $status = AccUserJobPayment::STATUS_DENIED_BY_ADMIN;\n break;\n default:\n break;\n }\n\n if($declineForm->validate()) {\n $userJobPayment = AccUserJobPayment::model()->findByPk($post['userJobPaymentId']);\n $userJobPayment->attributes = $post;\n // Correction amount will not be applied anymore\n $userJobPayment->correction_amount = 0;\n $userJobPayment->admin_id = Yii::app()->user->getId();\n $userJobPayment->decline_reason = NULL;\n $userJobPayment->status = $status;\n // Redirecting to avoid post confirmation after browser refresh.\n if($userJobPayment->save(false)) {\n $userJob = $userJobPayment->userJob;\n if($userJob instanceof UserJob) {\n $user = AccUser::model()->findByPk($userJob->user_id);\n // For closed payments no notification is being sent\n $user->sendPaymentEditedEmail($userJobPayment->id, $action);\n }\n\n if(!Yii::app()->request->isAjaxRequest) {\n $this->redirect(Yii::app()->request->getUrl());\n } else {\n Yii::app()->end('success');\n }\n }\n\n // Unset attributes\n $declineForm->unsetAttributes();\n }\n }", "title": "" }, { "docid": "20fb2ec4f195466a49e231ab63257461", "score": "0.5261939", "text": "public function paymentRefunded($reason = '')\n {\n $this->plugin->logs->logInfos(\"### paymentRefunded change status: \".$this->order->get_id());\n\n $this->order->update_status('refunded', $reason);\n WC()->cart->empty_cart();\n }", "title": "" }, { "docid": "cc8f60f1908cb2dedf665e5708f04f38", "score": "0.52582705", "text": "public function setRefundAppliedAt($refund_applied_at)\n {\n $this->refund_applied_at = $refund_applied_at;\n\n return $this;\n }", "title": "" }, { "docid": "aa03b764b00a224a3f5237242ec70fec", "score": "0.5234728", "text": "private function payment_status_refunded( $order, $posted ) {\n\t\t// Only handle full refunds, not partial\n\t\tif ( $order->get_total() == ( $posted['mc_gross'] * -1 ) ) {\n\n\t\t\t// Mark order as refunded\n\t\t\t$order->update_status( 'refunded', sprintf( __( 'Payment %s via Payssion Notify.', 'woocommerce' ), strtolower( $posted['state'] ) ) );\n\n\t\t\t$this->send_email_notification(\n\t\t\t\tsprintf( __( 'Payment for order #%s refunded/reversed', 'woocommerce' ), $order->get_order_number() ),\n\t\t\t\tsprintf( __( 'Order %s has been marked as refunded', 'woocommerce' ), $order->get_order_number())\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "85fbd7ab5abe4ff59ad3d801b1a24019", "score": "0.5217099", "text": "protected function refundToUserBalance()\n {\n // If plan is in trial, do not continue\n if ($this->hasTrial) {\n return;\n }\n\n // Get the price after coupon discount\n $price = $this->price - $this->couponDiscount;\n\n // If there is previous subscription and so previous user\n if ($this->previousSubscription) {\n $price = $this->previousSubscription->cancelAndRefund($this, $price);\n }\n\n // Update current user's balance\n if (($this->user->balance = $this->user->balance - $price) < 0) {\n $this->user->balance = 0;\n }\n\n $this->user->save();\n }", "title": "" }, { "docid": "a9e8cb4ae26ea4a8d098e58fba0b4aaf", "score": "0.5184163", "text": "public function setBaseTotalRefunded($amount);", "title": "" }, { "docid": "b0691339f5cd0bca62a62aae515923c3", "score": "0.5138865", "text": "public function get_total_refunded() {\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "da9a377d9668df7802c0cba12c32e689", "score": "0.5118821", "text": "public function getRefundTotal()\n {\n return $this->refund_total;\n }", "title": "" }, { "docid": "d82e2beabfc206fccc980f438c288516", "score": "0.5100416", "text": "public function processPayment()\n {\n if ( $payment = $this->subscriber->model->paymentSuccess ) {\n // make the refund value\n $payment->status = 'REFUNDING';\n\n $payment->save();\n\n // Create a Refund\n $payment->refunds()->create(['user_id' => Auth::user()->id, 'status' => 'PENDING']);\n }\n\n }", "title": "" }, { "docid": "5249f91cd9457a3ee0dcfc8ef17f2bfc", "score": "0.508345", "text": "public function refund($id = null)\n {\n $payment = $this->payment->findOrFail($id);\n $payment->update(['is_refunded' => 1]);\n return ajaxResponse(\n [\n 'id' => $payment->id,\n 'message' => langapp('changes_saved_successful'),\n 'redirect' => route('payments.view', $payment->id),\n ],\n true,\n Response::HTTP_OK\n );\n }", "title": "" }, { "docid": "ba3a184324b906b48b8f8e6c2d5debeb", "score": "0.5066535", "text": "protected function refund()\n {\n // TODO eventually cost will rise and they will require resources, so do this later\n $this->city->nation->resources->money += $this->buildingType->baseCost;\n $this->city->nation->resources->save();\n }", "title": "" }, { "docid": "fc5a917141681af9101835bd82ec8745", "score": "0.49780646", "text": "public function actionRefund(): void\n {\n $params = $this->getActionParams();\n\n if (craft()->depositManagement_mollie->refundPayment($params['id'])) {\n craft()->userSession->setNotice(Craft::t('Payment refunded'));\n } else {\n craft()->userSession->setError(craft()->depositManagement_mollie->getMollieError());\n }\n\n craft()->request->redirect('/admin/depositmanagement/payments');\n }", "title": "" }, { "docid": "f9288c0949ee89526a0521d5fc15b91b", "score": "0.49568102", "text": "public function revoke_referral_on_refund( $atts ) {\n\n\t\t$this->reject_referral( $atts['entry_id'] );\n\n\t\t$referral = affiliate_wp()->referrals->get_by( 'reference', $atts['entry_id'], $this->context );\n\t\t$amount = affwp_currency_filter( affwp_format_amount( $referral->amount ) );\n\t\t$name = affiliate_wp()->affiliates->get_affiliate_name( $referral->affiliate_id );\n\t\t$note = sprintf( __( 'AffiliateWP: Referral #%d for %s for %s rejected', 'affiliate-wp' ), $referral->referral_id, $amount, $name );\n\n\t\tFrmEntryMeta::add_entry_meta( $atts['entry_id'], 0, '', array( 'comment' => $note, 'user_id' => 0 ) );\n\n\t}", "title": "" }, { "docid": "529dddfee88e39f55cbc1a2f9a0febb8", "score": "0.49419758", "text": "public function restored(Refund $refund)\n {\n //\n }", "title": "" }, { "docid": "d64341d3af11489025e7046f3654f31d", "score": "0.48942953", "text": "function voucher_additionaldet_refund($voucherid)\n{\n\tglobal $db,$ecom_siteid;\n\t// Get the currency symbol and conversion rate in current order\n\t$sql_vouch = \"SELECT voucher_curr_symbol,voucher_curr_rate,voucher_value,\n\t\t\t\t\t\t\tvoucher_refundamt,voucher_paystatus,voucher_totalauthorizeamt\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tgift_vouchers\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tvoucher_id = \".$voucherid.\"\n\t\t\t\t\t\tLIMIT\n\t\t\t\t\t\t\t1\";\n\t$ret_vouch = $db->query($sql_vouch);\n\tif ($db->num_rows($ret_vouch))\n\t{\n\t\t$row_vouch \t= $db->fetch_array($ret_vouch);\n\t\t// Decide whether refund is possible\n\t\tif ($row_vouch['voucher_paystatus']=='REFUNDED')\n\t\t$alert = 'Sorry!! this voucher has already been refunded';\n\t\tif ($row_vouch['voucher_totalauthorizeamt']>0)\n\t\t\t$max_refund_total = $row_vouch['voucher_totalauthorizeamt']-$row_vouch['voucher_refundamt'];\n\t\telse\n\t\t\t$max_refund_total = ($row_vouch['voucher_value']-$row_vouch['voucher_refundamt']);\n\t\tif($max_refund_total ==0)\n\t\t$alert = 'Nothing to refund';\n\t}\n\t?>\n\t\t<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">\n\t\t<tr>\n\t\t <td colspan=\"2\" class=\"shoppingcartheader\">Please fill in the following details</td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td align=\"left\" valign=\"top\">Amount to be refunded <span class=\"redtext\">*</span></td>\n\t\t <td align=\"left\"><input type=\"text\" name=\"txt_refundamt\" /> &nbsp;&nbsp;<span class=\"shoppingcartpriceB\">Total Refundable Amount: </span> <span class=\"shoppingcartpriceB\"><?php echo print_price_selected_currency($max_refund_total,$row_vouch['voucher_curr_rate'],$row_vouch['voucher_curr_symbol'],true)?></span>\n\t\t <input type=\"hidden\" name=\"max_refundamt_allowed\" id=\"max_refundamt_allowed\" value=\"<?php echo print_price_selected_currency($max_refund_total,$row_vouch['voucher_curr_rate'],'',true)?>\" />\n\t\t <input type=\"hidden\" name=\"currency_symbol\" id=\"currency_symbol\" value=\"<?php echo $row_vouch['voucher_curr_symbol']?>\" />\n\t\t </td>\n\t\t </tr>\n\t\t<tr>\n\t\t <td width=\"21%\" align=\"left\" valign=\"top\">Reason <span class=\"redtext\">*</span></td>\n\t\t <td width=\"79%\" align=\"left\"><textarea name=\"txt_refundreason\" id=\"txt_refundreason\" cols=\"50\" rows=\"6\"></textarea></td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td align=\"left\" valign=\"top\">&nbsp;</td>\n\t\t <td align=\"left\" valign=\"top\">Reason will be automatically added to the notes section</td>\n\t\t </tr>\n\t\t<tr>\n\t\t <td align=\"left\" valign=\"top\">&nbsp;</td>\n\t\t <td align=\"right\" valign=\"top\"><input name=\"refund_submit\" type=\"button\" class=\"red\" id=\"refund_submit\" value=\"Click here to Refund\" onclick=\"validate_refund()\" /></td>\n\t\t </tr>\n\t </table>\n\t<?php\n}", "title": "" }, { "docid": "6b850efd996999fe76e4be8219b7797d", "score": "0.4886077", "text": "public static function set_cancelled( $args ) {\n\n $args = wp_parse_args( $args , array (\n 'payment_id' => 0 ,\n 'balance_payable_order_id' => 0 ,\n ) ) ;\n\n if ( _sumo_pp_payment_has_status( $args[ 'payment_id' ] , 'in_progress' , 'overdue' ) ) {\n if ( _sumo_pp_update_payment_status( $args[ 'payment_id' ] , 'cancelled' ) ) {\n\n _sumo_pp_add_payment_note( sprintf( __( 'Balance payment of order#%s is not paid so far. Payment is Cancelled.' , _sumo_pp()->text_domain ) , $args[ 'balance_payable_order_id' ] ) , $args[ 'payment_id' ] , 'success' , __( 'Payment Cancelled' , _sumo_pp()->text_domain ) ) ;\n\n update_post_meta( $args[ 'payment_id' ] , '_next_payment_date' , '' ) ;\n update_post_meta( $args[ 'payment_id' ] , '_next_installment_amount' , '0' ) ;\n update_post_meta( $args[ 'payment_id' ] , '_remaining_payable_amount' , '0' ) ;\n update_post_meta( $args[ 'payment_id' ] , '_remaining_installments' , '0' ) ;\n\n if ( $payment_cron = _sumo_pp_get_payment_cron( $args[ 'payment_id' ] ) ) {\n $payment_cron->unset_jobs() ;\n }\n\n _sumo_pp_send_payment_email( $args[ 'payment_id' ] , 'payment_cancelled' , $args[ 'balance_payable_order_id' ] ) ;\n\n do_action( 'sumopaymentplans_payment_is_cancelled' , $args[ 'payment_id' ] , $args[ 'balance_payable_order_id' ] , 'balance-payment-order' ) ;\n }\n }\n }", "title": "" }, { "docid": "307c3b0e52209d9777fdcf992c6bc618", "score": "0.48391524", "text": "protected function applyAmount()\n {\n // cleanup if the minimum purchase amount is not met.\n if ($this->clearOrderCouponDiscount()) {\n return;\n }\n\n $discount = $this->coupon->getAmount();\n $coupon_label = $this->translator->trans('coupon', [], 'checkout');\n\n $this->addOrderToCoupon($discount);\n\n $this->order->setDiscountLine($coupon_label, -$discount, 'coupon.code');\n\n $this->order->setAttribute('amount', 'coupon', $discount);\n $this->order->setAttribute('text', 'coupon', $coupon_label);\n }", "title": "" }, { "docid": "f0b7637dd86b17faed3275273cb114b5", "score": "0.48351315", "text": "public function refund() {\n $result = Braintree_Transaction::refund('f22c2zwk'); //for full refund\n //$result = Braintree_Transaction::refund('f22c2zwk','20.9'); //for partial refund\n if ($result) {\n echo \"<pre>\";\n print_r($result);\n echo \"</pre>\";\n }\n }", "title": "" }, { "docid": "ebe103ce024b4f98bb9efe06a027e072", "score": "0.480043", "text": "public function setDraft() {\n\t\t$this->status = 0;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "fe37963d9e065b90539ccb98772825b5", "score": "0.47926402", "text": "public function getIsUsedForRefund();", "title": "" }, { "docid": "86669090bd7dc3cd094e06349d56de33", "score": "0.47456065", "text": "function voucher_refund_amount($voucherid,$alert='')\n{\n\tglobal $db,$ecom_siteid;\n\t// Get the currency symbol and conversion rate in current order\n\t $sql_vouch = \"SELECT voucher_curr_symbol,voucher_curr_rate,voucher_value,\n\t\t\t\t\t\t\tvoucher_refundamt,voucher_paystatus,voucher_totalauthorizeamt\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tgift_vouchers\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tvoucher_id = \".$voucherid.\"\n\t\t\t\t\t\tLIMIT\n\t\t\t\t\t\t\t1\";\n\t$ret_vouch = $db->query($sql_vouch);\n\tif ($db->num_rows($ret_vouch))\n\t{\n\t\t$row_vouch \t= $db->fetch_array($ret_vouch);\n\t\t// Decide whether refund is possible\n\t\tif ($row_vouch['voucher_paystatus']=='REFUNDED')\n\t\t$alert = 'Sorry!! this voucher has already been refunded';\n\t\tif ($row_vouch['voucher_totalauthorizeamt']>0)\n\t\t\t$max_refund_total = $row_vouch['voucher_totalauthorizeamt']-$row_vouch['voucher_refundamt'];\n\t\telse\n\t\t\t$max_refund_total = ($row_vouch['voucher_value']-$row_vouch['voucher_refundamt']);\n\t\tif($max_refund_total ==0)\n\t\t$alert = 'Nothing to refund';\n\t}\n\t\tif ($row_vouch['voucher_value']>0) // case if deposit amount exists\n\t\t {\n\t\t \t$check_tot_amt = $row_vouch['voucher_value'];\n\n\t\t }\n\t\tif(($check_tot_amt>$row_vouch['voucher_refundamt']))\n\t\t{ \n\t?><div class=\"editarea_div\">\n\t\t<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\" class=\"fieldtable\">\n\t\t<?php\n\t\tif($alert)\n\t\t{\n\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\" align=\"center\" class=\"errormsg\">\n\t\t\t\t<?php\n\t\t\t\tif($alert==1)\n\t\t\t\techo \"Refund successfull\";\n\t\t\t\telse\n\t\t\t\techo \"Refund not successfull\";\n\t\t\t\t?>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t<?php\n\t\t}\n\t\t \n\t\t?>\n\t\t<tr>\n\t\t <td colspan=\"2\" class=\"shoppingcartheader\">Please fill in the following details</td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td align=\"left\" valign=\"top\">Amount to be refunded <span class=\"redtext\">*</span></td>\n\t\t <td align=\"left\"><input type=\"text\" name=\"txt_refundamt\" /> &nbsp;&nbsp;<span class=\"shoppingcartpriceB\">Total Refundable Amount: </span> <span class=\"shoppingcartpriceB\"><?php echo print_price_selected_currency($max_refund_total,$row_vouch['voucher_curr_rate'],$row_vouch['voucher_curr_symbol'],true)?></span>\n\t\t <input type=\"hidden\" name=\"max_refundamt_allowed\" id=\"max_refundamt_allowed\" value=\"<?php echo print_price_selected_currency($max_refund_total,$row_vouch['voucher_curr_rate'],'',true)?>\" />\n\t\t <input type=\"hidden\" name=\"currency_symbol\" id=\"currency_symbol\" value=\"<?php echo $row_vouch['voucher_curr_symbol']?>\" />\n\t\t </td>\n\t\t </tr>\n\t\t<tr>\n\t\t <td width=\"21%\" align=\"left\" valign=\"top\">Reason <span class=\"redtext\">*</span></td>\n\t\t <td width=\"79%\" align=\"left\"><textarea name=\"txt_refundreason\" id=\"txt_refundreason\" cols=\"50\" rows=\"6\"></textarea></td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td align=\"left\" valign=\"top\">&nbsp;</td>\n\t\t <td align=\"left\" valign=\"top\">Reason will be automatically added to the notes section</td>\n\t\t </tr>\n\t </table></div>\n\t <div class=\"editarea_div\">\n\t\t <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td width=\"100%\" align=\"right\" valign=\"middle\">\n\t\t\t\t\t<input name=\"refund_submit\" type=\"button\" class=\"red\" id=\"refund_submit\" value=\"Click here to Refund\" onclick=\"validate_refund()\" />\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>\n\t<?php \n\t}\n\t$sql_ref = \"SELECT refund_id,refund_on,refund_by,refund_amt\n\t\t\t\t\tFROM\n\t\t\t\t\t\tgift_voucher_details_refunded\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tgift_vouchers_voucher_id = $voucherid\n\t\t\t\t\tORDER BY\n\t\t\t\t\t\trefund_on DESC\";\n\t$ret_ref = $db->query($sql_ref);\n\tif($db->num_rows($ret_ref))\n\t{\n\t\t?>\n\t\t\t<table width=\"80%\" cellpadding=\"1\" cellspacing=\"1\" border=\"0\">\n\t\t\n\t\t<?php\n\t\t$table_varheaders \t\t= array('Sl No','Date','Refunded By','Refunded Amount');\n\t\t$headervar_positions\t= array('center','left','left','right');\n\t\t$var_colspans\t\t\t= count($table_varheaders);\n\t\t$varsrno\t\t\t\t= 1;\n\t\t$tot_amt \t\t\t\t= 0;\n\t\techo table_header($table_varheaders,$headervar_positions);\n\t\twhile ($row_ref = $db->fetch_array($ret_ref))\n\t\t{\n\t\t\t$tot_amt += $row_ref['refund_amt'];\n\t\t\t$cls = ($varsrno%2==0)?'listingtablestyleA':'listingtablestyleB';\n\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align=\"center\" width=\"8%\" class=\"<?php echo $cls?>\">\n\t\t\t\t\t\t<?php echo $varsrno?>.\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align=\"left\" width=\"20%\" class=\"<?php echo $cls?>\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\techo dateFormat($row_ref['refund_on'],'datetime');\n\t\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align=\"left\" class=\"<?php echo $cls?>\" width=\"45%\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo getConsoleUserName($row_ref['refund_by']);\n\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td align=\"right\" class=\"<?php echo $cls?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo print_price_selected_currency($row_ref['refund_amt'],$row_vouch['voucher_curr_rate'],$row_vouch['voucher_curr_symbol'],true);\n\t\t\t\t\t?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr id=\"refunddet_tr_<?php echo $row_ref['refund_id']?>\" style=\"display:none\">\n\t\t\t\t<td align=\"center\" width=\"8%\">&nbsp;</td>\n\t\t\t\t<td colspan=\"3\">\n\t\t\t\t<div id=\"refunddet_div_<?php echo $row_ref['refund_id']?>\">\n\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t<?php\n\t\t$varsrno++;\n\t\t}\n\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td align=\"center\" class=\"shoppingcartpriceB\">&nbsp;</td>\n\t\t\t\t<td align=\"center\" class=\"shoppingcartpriceB\">&nbsp;</td>\n\t\t\t\t<td align=\"right\" class=\"shoppingcartpriceB\">\n\t\t\t\tTotal Refunded\n\t\t\t\t</td>\n\t\t\t\t<td align=\"right\" class=\"shoppingcartpriceB\">\n\t\t\t\t\t<?php\n\t\t\t\t\techo print_price_selected_currency($tot_amt,$row_vouch['voucher_curr_rate'],$row_vouch['voucher_curr_symbol'],true);\n\t\t\t\t\t?>\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "3fc6b92e171c514acb60e84cb4b7dd8b", "score": "0.47389108", "text": "public function testSetReceiptWithInvalidValue()\n {\n $this->cancelEmergencyCommand->setReceipt('invalid');\n }", "title": "" }, { "docid": "ad43b0dbc6591db846a7008e063f501e", "score": "0.47367135", "text": "public function setSettlement()\n {\n $this->attributes['transaction_status'] = 'settlement';\n self::save();\n }", "title": "" }, { "docid": "9f458baf1c51a098249a5aece55decfa", "score": "0.47290018", "text": "public function callDoRefund()\n {\n $payment = $this->getPayment();\n $requestStr = '';\n\n $tmpArr = array(\n 'VERSION' => self::PBX_VERSION,\n 'DATEQ' => Mage::getModel('core/date')->date('dmYHis'),\n 'TYPE' => self::PBX_PAYMENT_ACTION_REFUND,\n 'NUMQUESTION' => $this->getQuestionNumberModel()->getNextQuestionNumber(),\n 'SITE' => $this->getSiteNumber(),\n 'RANG' => $this->getRang(),\n 'CLE' => $this->getCleNumber(),\n 'MONTANT' => str_pad($this->getMontant() * 100, 10, '0', STR_PAD_LEFT),\n 'DEVISE' => (string) $this->getCurrencyNumb(),\n 'REFERENCE' => base64_encode($payment->getOrder()->getRealOrderId()),\n 'PORTEUR' => $payment->getCcNumber(),\n 'DATEVAL' => Mage::getModel('core/date')->date('my', mktime(0, 0, 0, $payment->getCcExpMonth(), 1, $payment->getCcExpYear())),\n 'NUMAPPEL' => '',\n 'NUMTRANS' => '',\n );\n\n foreach ($tmpArr as $param => $value) {\n $requestStr .= $param . '=' . $value . '&';\n }\n\n $requestStr = substr($requestStr, 0, -1);\n $resultArr = $this->call($requestStr);\n\n $this->getQuestionNumberModel()\n ->increaseQuestionNumber();\n\n if ($resultArr === false) {\n return false;\n }\n\n $this->setTransactionId($resultArr['NUMTRANS']);\n\n return $resultArr;\n }", "title": "" }, { "docid": "6e74b7232e572c05849c473b9e6f71c9", "score": "0.4712408", "text": "public function changeDiscountOn($setData = null){\n $str_id = $this->_appSession->read('App.selectedStoreID');\n $settingsTbl = \\Cake\\ORM\\TableRegistry::get('StoreSettings');\n $d = $this->request->data;\n \n $rscd = $settingsTbl->find()->where([\n \"store_id\" => $str_id,\n \"meta_key\" => 's-screen-customer-discount'\n ])->first();\n if(!$rscd){\n $rscd = $settingsTbl->newEntity();\n }\n \n $rscdm = $settingsTbl->find()->where([\n \"store_id\" => $str_id,\n \"meta_key\" => 's-screen-customer-discount-msg'\n ])->first();\n if(!$rscdm){\n $rscdm = $settingsTbl->newEntity();\n }\n \n if($setData != NULL){\n $data = [\n \"store_id\" => $str_id,\n \"meta_key\" => \"s-screen-customer-discount\",\n \"meta_value\" => $d['s-screen-customer-discount'],\n ];\n $rscd = $settingsTbl->patchEntity($rscd, $data);\n $settingsTbl->save($rscd);\n if($d['s-screen-customer-discount'].\"\" == \"1\"){\n $data = [\n \"store_id\" => $str_id,\n \"meta_key\" => \"s-screen-customer-discount-msg\",\n \"meta_value\" => $d['s-screen-customer-discount-msg'],\n ];\n $rscdm = $settingsTbl->patchEntity($rscdm, $data);\n $settingsTbl->save($rscdm);\n }\n $result = [\n \"msg\" => \"Updated...\",\n \"error\" => 0\n ];\n }else{\n $result = [\"a\"=>$rscd->toArray(),\"b\"=>$rscdm->toArray()];\n }\n $this->set('result',$result);\n $this->set('_serialize',['result']);\n }", "title": "" }, { "docid": "a5e0e79268c733f6f86d5fb13237c095", "score": "0.47085917", "text": "function appthemes_escrow_refund( $post ) {\n\n\t$order = appthemes_get_order( $post->ID );\n\n\tif ( ! $order->is_escrow() ) {\n\t\treturn false;\n\t}\n\n\t$gateway_id = $order->get_gateway();\n\t$gateway = APP_Gateway_Registry::get_gateway( $gateway_id );\n\n\tif ( $gateway && ( APP_Gateway_Registry::is_gateway_enabled( $gateway_id, 'escrow' ) || current_user_can( 'manage_options' ) ) ) {\n\n\t\tif ( ! ( $gateway instanceof APP_Escrow_Payment_Processor ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$options = APP_Gateway_Registry::get_gateway_options( $gateway_id );\n\t\t$result = $gateway->fail_escrow( $order, $options );\n\n\t\tif ( ! $result ) {\n\t\t\tdo_action( 'appthemes_escrow_refund_failed', $order );\n\t\t} else {\n\t\t\tdo_action( 'appthemes_escrow_refunded', $order );\n\t\t}\n\n\t\treturn $result;\n\n\t} else {\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "cd3c11589754b3493f215b878a855d9b", "score": "0.46881133", "text": "public function setHasPayed()\n {\n $this->payed = true;\n $this->save();\n }", "title": "" }, { "docid": "20ec1bdb7db93020a4e3776ea648ec82", "score": "0.46739623", "text": "public function testRefund()\n {\n $companyId = 1;\n $creditLimitId = 2;\n $creditmemoTotal = 15.5;\n $creditmemoCurrency = 'USD';\n $orderId = '001';\n $commentText = 'Refund Comment';\n $orderCurrency = 'USD';\n $baseCurrency = 'RUB';\n $order = $this->createMock(\\Magento\\Sales\\Api\\Data\\OrderInterface::class);\n $creditmemo = $this->createMock(\\Magento\\Sales\\Api\\Data\\CreditmemoInterface::class);\n $this->companyOrder->expects($this->once())\n ->method('getCompanyIdForRefund')->with($order)->willReturn($companyId);\n $creditLimit = $this->createMock(\\Magento\\CompanyCredit\\Api\\Data\\CreditLimitInterface::class);\n $this->creditLimitManagement->expects($this->once())\n ->method('getCreditByCompanyId')->with($companyId)->willReturn($creditLimit);\n $creditLimit->expects($this->once())->method('getId')->willReturn($creditLimitId);\n $creditmemo->expects($this->once())->method('getBaseGrandTotal')->willReturn($creditmemoTotal);\n $this->priceCurrency->expects($this->once())\n ->method('round')->with($creditmemoTotal)->willReturn($creditmemoTotal);\n $creditmemo->expects($this->once())->method('getBaseCurrencyCode')->willReturn($creditmemoCurrency);\n $order->expects($this->once())->method('getIncrementId')->willReturn($orderId);\n $order->expects($this->once())->method('getBaseCurrencyCode')->willReturn($baseCurrency);\n $order->expects($this->once())->method('getOrderCurrencyCode')->willReturn($orderCurrency);\n $creditmemoComment = $this->createMock(\n \\Magento\\Sales\\Api\\Data\\CreditmemoCommentInterface::class\n );\n $creditmemo->expects($this->once())->method('getComments')->willReturn([$creditmemoComment]);\n $creditmemoComment->expects($this->once())->method('getComment')->willReturn($commentText);\n $creditBalanceOptions = $this->prepareCreditBalanceOptionsMock($orderId, $orderCurrency, $baseCurrency);\n $this->creditBalanceManagement->expects($this->once())->method('increase')\n ->with(\n $creditLimitId,\n $creditmemoTotal,\n $creditmemoCurrency,\n \\Magento\\CompanyCredit\\Model\\HistoryInterface::TYPE_REFUNDED,\n $commentText,\n $creditBalanceOptions\n );\n $this->creditBalance->refund($order, $creditmemo);\n }", "title": "" }, { "docid": "3836c8aa9c32742134ae98b1fafb3f10", "score": "0.467347", "text": "public function getRefundDate()\n {\n return $this->refundDate;\n }", "title": "" }, { "docid": "52e2069a9108cfd8875d15085078a447", "score": "0.4672407", "text": "public function setSuccess()\n {\n $this->attributes['transaction_status'] = 'success';\n self::save();\n }", "title": "" }, { "docid": "10d84c5154bc78e127bdf0eb12f8b91b", "score": "0.4654236", "text": "public function setPending()\n {\n $this->attributes['transaction_status'] = 'pending';\n self::save();\n }", "title": "" }, { "docid": "c5909fd874ecc465f430707d865d92a2", "score": "0.46308205", "text": "public function returnRefandData($observer) {\n $order = $observer->getOrder();\n if($value = Mage::registry('need_setnull_total_refunded')) {\n Mage::unregister('need_setnull_total_refunded');\n $order->setTotalRefunded($value)->save();\n }\n }", "title": "" }, { "docid": "b0395f6595a038859d727be12d04981d", "score": "0.46219337", "text": "public function setRefund($refund)\n {\n if (!is_bool($refund)) {\n throw new InvalidArgumentException('$refund deve ser boolean, foi passado '.gettype($refund));\n }\n\n if ($refund === true) {\n $this->setScope(self::REFUND);\n }\n\n return $this;\n }", "title": "" }, { "docid": "725eb6ea6d5036e246510ee09dcf9a74", "score": "0.46158132", "text": "protected function _applyObjectProperty()\r\n\t{\r\n\t\tparent::_applyObjectProperty();\r\n\r\n\t\tif(!is_null(Core_Array::getPost('current')))\r\n\t\t{\r\n\t\t\t$this->_object->setCurrent();\r\n\t\t}\r\n\r\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\r\n\t}", "title": "" }, { "docid": "90ce9815a133c2c8451fa40cdbefe71e", "score": "0.4602814", "text": "public function refund()\n\t{\n\t\treturn $this->getContextInstance('Refund');\n\t}", "title": "" }, { "docid": "ee69e58f310573579c7f934cda001e71", "score": "0.4600723", "text": "public function getRefundedMoney(): ?Money\n {\n return $this->refundedMoney;\n }", "title": "" }, { "docid": "23f37501eae10a5817f1c8bf3a6a7153", "score": "0.45967284", "text": "public function refund() {\n\t\t// payment status unset this params to get correct query\n\t\tunset($this->params['language'], $this->params['payment_method'], $this->params['secureKey']);\n\t\treturn $this->response(Http::get($this->links['REFUND'],\n\t\t\t[\n\t\t\t\t'query' => $this->params,\n\t\t\t]));\n\t}", "title": "" }, { "docid": "ced40c5c1c8026490d794c3b0ff5cfdc", "score": "0.45893282", "text": "public function isFullyRefunded()\n {\n return abs($this->getRemainingAmount()) <= 0.001 ;\n }", "title": "" }, { "docid": "bcd97abf1ffc8fd9b2431212c9777044", "score": "0.45883283", "text": "public function clearRefundAmounts()\n {\n $this->chargeRefundAmounts = [];\n }", "title": "" }, { "docid": "cb779dbac42348922c20d3a3097466aa", "score": "0.45877302", "text": "public function getRefundedAt()\n {\n return $this->refunded_at;\n }", "title": "" }, { "docid": "574f9ab86ce9c79b32c1a8d76b9c0b36", "score": "0.45725033", "text": "public function setRefundedAt($refunded_at)\n {\n $this->refunded_at = $refunded_at;\n\n return $this;\n }", "title": "" }, { "docid": "52156965464b82bf128433b575cf422d", "score": "0.45715782", "text": "public function refund(Varien_Object $payment, $amount)\n {\n if (!$this->canRefund()) {\n Mage::throwException(Mage::helper('payment')->__('Refund action is not available.'));\n }\n\t/* Rounding error may occur, checking if the differences is not less than 0.5c */\n if ($amount - $payment->getAmountPaid() - $payment->getAmountRefunded() >= 0.005) {\n Mage::throwException(Mage::helper('payment')->__('Invalid refund amount'));\n }\n\n /* Check transaction id */\n $creditMemo = Mage::registry('current_creditmemo');\n if (!$creditMemo->getInvoice()->getTransactionId()) {\n Mage::throwException(Mage::helper('payment')->__('Invalid transaction id'));\n }\n\n /* Refund online through PinPayment gateway*/\n $refundRequest = $this->_buildRefundRequest($payment, $amount);\n $httpResponse = $this->_postRequest($refundRequest, self::REQUEST_TYPE_REFUND);\n $result = Mage::getModel(\"pinpay/result\", $httpResponse);\n\n switch ($result->getGatewayResponseStatus()) {\n case $result::RESPONSE_CODE_APPROVED:\n // Sets the response token\n /* @var $payment Mage_Sales_Model_Order_Payment */\n $payment->setRefundTransactionId(''. $result->getRefundToken());\n $payment->setAmount($amount);\n if ($result->getRefundToken() != $payment->getParentTransactionId()) {\n $payment->setTransactionId($result->getRefundToken());\n }\n $shouldCloseCaptureTransaction = $payment->getOrder()->canCreditmemo() ? 0 : 1;\n $payment\n ->setIsTransactionClosed(1)\n ->setShouldCloseParentTransaction($shouldCloseCaptureTransaction);\n return $this;\n default:\n Mage::log('Refund could not be processed. ' . $result->getErrorDescription(), Zend_Log::INFO, self::$logFile);\n Mage::throwException((Mage::helper('pinpay')->__($result->getErrorDescription() . self::RESPONSE_APPEND_MSG)));\n }\n\n return $this;\n }", "title": "" }, { "docid": "ae6813ef5650ccfc8b20c1052e6fc325", "score": "0.45702744", "text": "public function refund(Varien_Object $payment, $requestedAmount)\n {\n // Log\n Mage::log('====== SFC_Autoship_Model_Payment_Method::refund called ======', Zend_Log::INFO, SFC_Autoship_Helper_Data::LOG_FILE);\n\n /** @var SFC_Autoship_Helper_Vault $vaultHelper */\n $vaultHelper = Mage::helper('autoship/vault');\n /** @var SFC_Autoship_Helper_Api $apiHelper */\n $apiHelper = Mage::helper('autoship/api');\n\n // Set website / store for config on API helper\n $store = Mage::app()->getStore($payment->getOrder()->getStoreId());\n $apiHelper->setConfigStore($store);\n\n // Get order, etc from $payment\n /** @var Mage_Sales_Model_Order $order */\n $order = $payment->getOrder();\n\n // Use API to create a new prior auth-capture transaction\n $platformTransaction = $vaultHelper->credit($payment->getCcTransId(), $requestedAmount, $order->getData('base_currency_code'));\n\n /**\n * Duplicate logic from standard Authorize.net payment method:\n * This means that we should close the parent transaction if we have refunded the full amount of original transaction\n */\n $shouldCloseRefundTransaction = 0;\n if ($this->_formatAmount($payment->getAmountPaid() - $payment->getAmountRefunded()) == $this->_formatAmount($requestedAmount)) {\n $shouldCloseRefundTransaction = 1;\n }\n\n // Save transaction details in $payment\n // Field cc_trans_id in payment should hold the single original (purchase or capture) trans id\n // (or just the single auth n capture trans id)\n $payment\n ->setIsTransactionClosed(1)\n ->setShouldCloseParentTransaction($shouldCloseRefundTransaction)\n ->setParentTransactionId($payment->getData('cc_trans_id'))\n ->setTransactionId($platformTransaction['id']);\n // This seems to be necessary to keep 1.5.1.x and 1.10.1.x from causing \"transaction already closed\" error on 1.5.1.x and 1.10.1.x\n $payment->setSkipTransactionCreation(true);\n // Create transaction\n $payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND);\n\n return $this;\n }", "title": "" }, { "docid": "4ed9171391839209a93e9ca9209fbbf4", "score": "0.45648146", "text": "public function admin_updateRefreshRate(){\r\n\t\t//GET: refresh rate id.\r\n\t\t$refreshRate = $this->RefreshRate->find('first');\r\n\t\t$refreshRate = Set::extract('RefreshRate',$refreshRate);\r\n\t\t$refreshRateId = $refreshRate['id'];\r\n\t\t//MODIFY: the request data array.\r\n\t\t$refreshRate = $this->request->data['Banner']['refresh_rate'];\r\n\t\tunset($this->request->data['Banner']);\r\n\t\t$this->request->data['RefreshRate']['refresh_rate'] = $refreshRate;\r\n\t\t//SET: id for the update purpose.\r\n\t\t$this->RefreshRate->id = $refreshRateId;\r\n\t\t$this->RefreshRate->save($this->request->data);\r\n\t\t//SET: flash message for the success of records updations.\r\n\t\t$this->Session->setFlash(__('Refresh Rate updated successfully'));\r\n\t\t$this->redirect(array('action' => 'admin_index'));\r\n\t}", "title": "" }, { "docid": "14a53671f7cde22aff9a6aa5642cde10", "score": "0.4557997", "text": "protected function refund()\n {\n if ($this->payment) {\n try {\n $this->user->void($this->payment->getTransactionReference());\n } catch (Throwable $exception) {\n $this->user->refund($this->payment->getTransactionReference());\n }\n\n $this->createTransaction(true);\n }\n }", "title": "" }, { "docid": "824313035855fb5e4bcd8e955b5473b2", "score": "0.45561045", "text": "public static function refund() {return new TransactionType(4);}", "title": "" }, { "docid": "08813b809c34422fca6a8b733a439f38", "score": "0.45391557", "text": "public function testUpdateResursAgreement()\n {\n }", "title": "" }, { "docid": "e0b2c7d1153644346e7afbdf99d78ab5", "score": "0.4539152", "text": "public function setFailed()\n {\n $this->attributes['transaction_status'] = 'failed';\n self::save();\n }", "title": "" }, { "docid": "5a005b395979d385bd3b56a5973788f1", "score": "0.45369053", "text": "public function send_refund(Order_Model $order)\n\t{\n\t\torders::history_entry($order, 'Sent Refund Notice to Customer');\n\t}", "title": "" }, { "docid": "e82fc2736828a0cbdc5d02c3ded7a268", "score": "0.4530647", "text": "public function setRewardsFieldOnTheFly(Varien_Event_Observer $observer)\n {\n $quote = $observer->getData('quote_item')->getQuote();\n $helper = Mage::helper('sfc_rewards');\n\n if($helper->isEnabled()){\n //@todo add flag if brain points for reorder is enabled\n if ($quote->getRewardsPointsSpending() > 0) {\n //Store quote data to subscription instance\n $subscription = $observer->getData('subscription');\n $rewardsDataFields = array(\n 'applied_rule_ids' => $quote->getAppliedRuleIds(),\n 'applied_redemptions' => $quote->getAppliedRedemptions(),\n 'rewards_points_spending' => $quote->getRewardsPointsSpending(),\n );\n $subscription->setUserDefinedFields($rewardsDataFields);\n $helper->logInfo(__METHOD__);\n }\n }\n }", "title": "" }, { "docid": "f885a15f947c834694d7bb278cb7b566", "score": "0.45269617", "text": "public function setRefundIds(?array $refundIds): void\n {\n $this->refundIds = $refundIds;\n }", "title": "" }, { "docid": "940bbc4d98719a479bb4614ab6e7fefa", "score": "0.45265588", "text": "public function setSuccess()\n {\n $this->attributes['transaction_status'] = 'success';\n self::save();\n }", "title": "" }, { "docid": "d0e3af8edccef91b6648695b12f21e56", "score": "0.45250928", "text": "public function actionUpdateStatus()\n {\n $this->requirePostRequest();\n $post = craft()->request->getPost();\n $paymentId = $post['id'];\n\n if (craft()->mollie_payment->update($paymentId)) {\n\n echo 'updated to paid';\n } else {\n\n echo 'payment not set to paid';\n }\n exit;\n }", "title": "" }, { "docid": "dfb20f4203215b52b7fe777a1c6ed3c2", "score": "0.45180687", "text": "public function isRefundable(): bool\n {\n return true;\n }", "title": "" }, { "docid": "9f6b2c457fd5d12c2e242d4edca3d5d5", "score": "0.4517711", "text": "public function validate_refund_amount( $data ) {\n global $wpdb;\n $order_id = $data['order_id'];\n $order = wc_get_order( $order_id );\n $item_totals_request = json_decode( $data['item_totals'], true );\n $item_tax_totals_request = json_decode( $data['item_tax_totals'], true );\n $already_refunded = array();\n $refund_manager = new Manager();\n\n if ( $refund_manager->has_pending_request( $order_id ) ) {\n $this->add_error(\n new WP_Error(\n 'dokan_pro_refund_error_has_pending_request',\n __( 'There is already a pending refund request for this order.', 'dokan' )\n )\n );\n return false;\n }\n\n $results = $wpdb->get_results(\n $wpdb->prepare(\n \"SELECT * FROM {$wpdb->prefix}dokan_refund WHERE order_id=%d AND status != %d\",\n $order_id,\n 2 // 2 is refund status cancel.\n )\n );\n\n foreach ( $results as $previous_refund ) {\n if ( ! empty( $previous_refund->item_totals ) ) {\n $item_totals_arr = json_decode( $previous_refund->item_totals, true );\n\n foreach ( $item_totals_arr as $line_item_id => $amount ) {\n $already_refunded[ $line_item_id ]['item_totals'] = ( isset( $already_refunded[ $line_item_id ]['item_totals'] ) ) ? ( (float) $already_refunded[ $line_item_id ]['item_totals'] + (float) $amount ) : (float) $amount;\n }\n }\n\n if ( ! empty( $previous_refund->item_tax_totals ) ) {\n $item_tax_totals_arr = json_decode( $previous_refund->item_tax_totals, true );\n\n foreach ( $item_tax_totals_arr as $line_item_id => $amount_array ) {\n $already_refunded[ $line_item_id ]['item_tax_totals'] = ( isset( $already_refunded[ $line_item_id ]['item_tax_totals'] ) ) ? ( (float) $already_refunded[ $line_item_id ]['item_tax_totals'] + (float) array_sum( $amount_array ) ) : (float) array_sum( $amount_array );\n }\n }\n unset( $item_totals_arr );\n unset( $item_tax_totals_arr );\n }\n\n foreach ( $order->get_items( array( 'line_item', 'shipping', 'fee' ) ) as $order_line_item_id => $order_line_item ) {\n $refunded_amount = ( isset( $already_refunded[ $order_line_item_id ]['item_totals'] ) && ! empty( $already_refunded[ $order_line_item_id ]['item_totals'] ) ) ? $already_refunded[ $order_line_item_id ]['item_totals'] : 0.00;\n $refunded_tax = ( isset( $already_refunded[ $order_line_item_id ]['item_tax_totals'] ) && ! empty( $already_refunded[ $order_line_item_id ]['item_tax_totals'] ) ) ? $already_refunded[ $order_line_item_id ]['item_tax_totals'] : 0.00;\n\n if ( isset( $item_totals_request[ $order_line_item_id ] ) && ( wc_format_decimal( $order_line_item->get_total(), wc_get_price_decimals() ) < ( $refunded_amount + wc_format_decimal( $item_totals_request[ $order_line_item_id ], wc_get_price_decimals() ) ) ) ) {\n $this->add_error(\n new WP_Error(\n 'dokan_pro_refund_error_excess_refund',\n // translators: Order Line Item name.\n sprintf( __( 'The refund amount %1$s is more than the permitted amount for line %2$s', 'dokan' ), wc_format_decimal( $item_totals_request[ $order_line_item_id ], wc_get_price_decimals() ), $order_line_item->get_name() )\n )\n );\n return false;\n }\n\n if ( isset( $item_totals_request[ $order_line_item_id ] ) && ( wc_format_decimal( $item_totals_request[ $order_line_item_id ], wc_get_price_decimals() ) < 0 ) ) {\n $this->add_error(\n new WP_Error(\n 'dokan_pro_refund_error_negative_refund_amount',\n // translators: Order Line Item name.\n sprintf( __( 'The Refund amount is negative number for line %s.', 'dokan' ), $order_line_item->get_name() )\n )\n );\n return false;\n }\n\n if ( isset( $item_tax_totals_request[ $order_line_item_id ] ) && ( wc_format_decimal( $order_line_item->get_total_tax(), wc_get_price_decimals() ) < ( $refunded_tax + wc_format_decimal( array_sum( $item_tax_totals_request[ $order_line_item_id ] ), wc_get_price_decimals() ) ) ) ) {\n $this->add_error(\n new WP_Error(\n 'dokan_pro_refund_error_tax_excess_refund',\n // translators: Order Line Item name.\n sprintf( __( 'The Refund tax amount is more than permitted amount for line %s', 'dokan' ), $order_line_item->get_name() )\n )\n );\n return false;\n }\n\n if ( isset( $item_tax_totals_request[ $order_line_item_id ] ) && ( min( $item_tax_totals_request[ $order_line_item_id ] ) < 0 ) ) {\n $this->add_error(\n new WP_Error(\n 'dokan_pro_refund_error_negative_refund_tax_amount',\n // translators: Order Line Item name.\n sprintf( __( 'The Refund tax amount is negative number for line %s', 'dokan' ), $order_line_item->get_name() )\n )\n );\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "18207b0d1e77c65b73a68197ae02f5cd", "score": "0.4507831", "text": "public function UpdateDiscountAction(){\n\n header('P3P: CP=\"IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA\"');\n header(\"Access-Control-Allow-Methods: POST,GET,OPTIONS\");\n header(\"Access-Control-Allow-Origin: *\");\n header('Access-Control-Allow-Headers: X-Requested-With');\n\n $social_network = strtolower(trim($_POST['social_network']));\n $discount_value = trim($_POST['set_discount']);\n \n $writeConnection = Mage::getSingleton('core/resource')->getConnection('core_write');\n\n if(!$writeConnection->query(\"UPDATE bloompa_settings SET value ='\".$discount_value.\"' WHERE product='BloompCommerce' AND param='discount_value_\".$social_network.\"'\")) \n exit(json_encode(array('status'=>'fail'))); \n\n exit(json_encode(array('status'=>'success')));\n }", "title": "" }, { "docid": "d612f749148c89f69a495f5102051a67", "score": "0.449164", "text": "public function setPending()\n {\n $this->attributes['transaction_status'] = 'pending';\n self::save();\n }", "title": "" }, { "docid": "98c0ab4983c28d93259a84ee10520f51", "score": "0.4480191", "text": "public function unlock($document_id)\n {\n try {\n $document = Document::find($document_id);\n \n $sets_count = $document->supply_sets->count();\n $ctz_sets_count = $document->supply_sets->where('status', 9)->count();\n\n $status = 0;\n\n if($ctz_sets_count == 0) //New\n $status = 1; \n else if($ctz_sets_count != $sets_count) //In process\n $status = 2; \n else //Done\n $status = 3; \n\n $document->fill([\n 'status' => $status,\n 'is_canceled' => 0,\n ])->update();\n Session::flash('message', 'Documento reactivado correctamente.');\n } catch(\\Exception $e) {\n back()->withErrors($e->getMessage());\n }\n }", "title": "" }, { "docid": "297344e03a91de50e5885c844e9fa3c6", "score": "0.4476108", "text": "function _cmdRset()\n {\n if ($this->_state == NET_POP3_STATE_TRANSACTION) {\n $data = $this->_sendCmd('RSET');\n if ($data) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "893431059374b77093abb37fc3e5fc16", "score": "0.44697505", "text": "public function process_refund(MeprTransaction $txn) {\n // This happens manually in test mode\n\t\tMeprUtils::debug_log('First Atlantic Commerce process_refund '. $txn);\n }", "title": "" }, { "docid": "7dfe88ac2c30157bbe18ceb3c9c56201", "score": "0.44670495", "text": "public function setDiscountAction()\n\t{\n\t\t$id = FrontController::getParams();\n\t\tif(!$_POST['update'])\n\t\t{\n\t\t\t$this -> view -> discountForm($id);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$result = $this -> facade -> updateDisc($id, $_POST['disc']);\n\t\t\tif($result === true)\n\t\t\t{\n\t\t\t\theader(\"Location: /~user8/book_shop/admin/discounts\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "46346793a2a894f5d122c5c292b8d54c", "score": "0.44633657", "text": "public function updated(ArInvoiceSettlement $arInvoiceSettlement)\n {\n //\n }", "title": "" }, { "docid": "c9f1e2adccb17e7d34779cd112f14668", "score": "0.44549432", "text": "public function getRemainingAmount()\n {\n return $this->getAmount() - $this->getRefundedAmount();\n }", "title": "" }, { "docid": "cb1d954f318295d25158b9946e4c60ba", "score": "0.44542733", "text": "function qod_update_post_status($value, $object, $field_name)\n{\n if (!$value || !is_string($value)) {\n return;\n }\n\n $post = get_post($object->ID);\n $post->post_status = $value;\n return wp_update_post($post);\n}", "title": "" }, { "docid": "8c820efd84ddf1117fbffb21c55f916c", "score": "0.44386885", "text": "public function toString()\n {\n return 'Refund success.';\n }", "title": "" }, { "docid": "a02740713aaef9033893563368ef9d9e", "score": "0.44379616", "text": "public function refundAccepted(AccountingModel $accounting)\n {\n $user = $accounting->findParentRow('\\Ppb\\Db\\Table\\Users');\n\n $this->setData(array(\n 'accounting' => $accounting,\n ));\n\n $this->_mail->setFrom($this->_settings['admin_email'], $this->_settings['email_admin_title'])\n ->setTo($user->getData('email'))\n ->setSubject('Refund Request Accepted');\n\n $this->_view->headerMessage = $this->_('Refund Request Accepted');\n $this->_view->clearContent()\n ->process('emails/refund-accepted.phtml');\n\n return $this;\n }", "title": "" }, { "docid": "b1ad3d7a080122ca2ef10cc42887d3ba", "score": "0.44377032", "text": "public function refundId(?string $value): self\n {\n $this->instance->setRefundId($value);\n return $this;\n }", "title": "" }, { "docid": "c41519ca80bcf0caca4459bc3f2eeaaa", "score": "0.4436708", "text": "public function testSetPosteRent() {\n\n $obj = new MouvementsStock();\n\n $obj->setPosteRent(\"posteRent\");\n $this->assertEquals(\"posteRent\", $obj->getPosteRent());\n }", "title": "" }, { "docid": "dec57d85ae6ba851a3be4b3bb1b4eaaf", "score": "0.44304276", "text": "public function mark_referral_complete_paypal( $atts ) {\n\n\t\tif ( isset( $atts['pay_vars']['completed'] ) && $atts['pay_vars']['completed'] ) {\n\n\t\t\tif ( isset( $atts['entry']->id ) ) {\n\n\t\t\t\t$entry_id = $atts['entry']->id;\n\n\t\t\t\t$this->complete_referral( $entry_id );\n\n\t\t\t\t$referral = affiliate_wp()->referrals->get_by( 'reference', $entry_id, $this->context );\n\t\t\t\t$amount = affwp_currency_filter( affwp_format_amount( $referral->amount ) );\n\t\t\t\t$name = affiliate_wp()->affiliates->get_affiliate_name( $referral->affiliate_id );\n\t\t\t\t$note = sprintf( __( 'AffiliateWP: Referral #%d for %s recorded for %s', 'affiliate-wp' ), $referral->referral_id, $amount, $name );\n\n\t\t\t\tFrmEntryMeta::add_entry_meta( $entry_id, 0, '', array( 'comment' => $note, 'user_id' => 0 ) );\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "d449b031e40bea5a1c9f3be424cb6b37", "score": "0.439961", "text": "public function markAsReferral(){\n\t\t$this->forceFill(['status' => TicketStatus::STATUS_DEPARTMENT_CHANGED])->save();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "075308abd589e887aab20093d26f308f", "score": "0.43990675", "text": "public function refund_parameters( $amount = null, $reason = '' ) {\n\t\t$data_source = $this->get_fields()->get_source();\n\t\t\n\t\tif ( ! $data_source instanceof Order_Source ) {\n\t\t\tthrow new \\Exception( __( 'Refunds are only processed against an existing order. Please pass an order source to be able to process the refund', 'wc_paysafe' ) );\n\t\t}\n\t\t\n\t\t$order = $data_source->get_source();\n\t\t\n\t\t/**\n\t\t * We need a Bank Account Token representation, so\n\t\t * 1. Attempt to get that from a saved token in the store\n\t\t *\n\t\t * - No: If we don't have a token, fail the process\n\t\t * - Yes: If we have a token\n\t\t * 1. Add the appropriate refund method by using the saved Bank Type to the order (eft, bacs)\n\t\t * 2. Add the token to the request\n\t\t *\n\t\t */\n\t\t\n\t\t$paysafe_order = new Paysafe_Order( $order );\n\t\t$token = $paysafe_order->get_order_profile_token();\n\t\t\n\t\tif ( ! $token ) {\n\t\t\tthrow new \\Exception( __( 'To refund a Direct Debit payment we need the customer to have saved their payment method to the Paysafe Vault. This transaction was not saved to the Paysafe Vault, so we cannot refund it.' ) );\n\t\t}\n\t\t\n\t\t$parameters = array(\n\t\t\t$paysafe_order->get_payment_type() => array(\n\t\t\t\t'paymentToken' => $token,\n\t\t\t),\n\t\t\t\n\t\t\t'merchantRefNum' => 'refund-' . $paysafe_order->get_order_number() . '-' . $paysafe_order->get_attempts_suffix( 'refund' ),\n\t\t\t'amount' => Formatting::format_amount( $amount ),\n\t\t\t'dupCheck' => true,\n\t\t\t'billingDetails' => $this->get_fields()->get_billing_fields()\n\t\t);\n\t\t\n\t\t$parameters = apply_filters( 'wc_paysafe_standalone_credit_parameters', $parameters, $order, $amount, $reason, $this->get_configuration()->get_gateway() );\n\t\t\n\t\treturn $parameters;\n\t}", "title": "" }, { "docid": "051834f5b55b553dc11422099c35f2a4", "score": "0.43909594", "text": "public function setRefundDate($var)\n {\n GPBUtil::checkString($var, True);\n $this->refundDate = $var;\n }", "title": "" }, { "docid": "38a6212eeb2aac503aac6856c4ce6ee4", "score": "0.43893188", "text": "public function isRefunded()\n {\n return $this->getOrderStatus() === self::PAYMENT_REFUNDED;\n }", "title": "" }, { "docid": "68bd9fda3d5d0dd466b99994c0c4789a", "score": "0.43888354", "text": "public function maybe_set_date_paid() {\n\t\treturn null;\n\t}", "title": "" }, { "docid": "4b338fa923ea59462c85493dc244fc01", "score": "0.43881744", "text": "public function setApplyed($var)\n {\n GPBUtil::checkBool($var);\n $this->Applyed = $var;\n\n return $this;\n }", "title": "" }, { "docid": "35d2a1eb1e082eb96c93fcb3b354e5d6", "score": "0.43874738", "text": "public function setFailed()\n {\n $this->attributes['transaction_status'] = 'failed';\n self::save();\n }", "title": "" }, { "docid": "2cb89ff47a84c6b6d90f7ca99b02e103", "score": "0.43867254", "text": "function change_uufp_custom_value($new_value){\n if($new_value != ''){\n $new_value=regulate_new_value($new_value); \n update_option( 'wpse_uufp_custom', $new_value);\n }\n}", "title": "" }, { "docid": "28b5af9b44e13146da851cff2a3749a0", "score": "0.4386107", "text": "public function set_payment_applied_order_ids($value)\n {\n\n // Data is ready, direct modification is forbidden\n if ($this->is_data_ready()) {\n return;\n }\n\n // Set payment_applied_order_ids property\n $this->set_property('payment_applied_order_ids', (array) $value);\n }", "title": "" }, { "docid": "3716beedb006bcb8fb2a7b33fe3bd92d", "score": "0.4384216", "text": "public function mark_referral_complete( $atts ) {\n\n\t\t$this->complete_referral( $atts['entry_id'] );\n\n\t\t$referral = affiliate_wp()->referrals->get_by( 'reference', $atts['entry_id'], $this->context );\n\t\t$amount = affwp_currency_filter( affwp_format_amount( $referral->amount ) );\n\t\t$name = affiliate_wp()->affiliates->get_affiliate_name( $referral->affiliate_id );\n\t\t$note = sprintf( __( 'AffiliateWP: Referral #%1$d for %2$s recorded for %3$s (ID: %4$d).', 'affiliate-wp' ),\n\t\t\t$referral->referral_id,\n\t\t\t$amount,\n\t\t\t$name,\n\t\t\t$referral->affiliate_id\n\t\t);\n\n\t\tFrmEntryMeta::add_entry_meta( $atts['entry_id'], 0, '', array( 'comment' => $note, 'user_id' => 0 ) );\n\n\t}", "title": "" }, { "docid": "55b4de356238039a2e41f6f8c3565fef", "score": "0.43671724", "text": "public function setRefundRequiresCardPresence(?bool $refundRequiresCardPresence): void\n {\n $this->refundRequiresCardPresence['value'] = $refundRequiresCardPresence;\n }", "title": "" }, { "docid": "760bcb737849b2995a0f425e86a06504", "score": "0.4362731", "text": "public function humanRefundStatus(){\n\t\tswitch( $this->refundStatus ){\n\t\t\tdefault :\n\t\t\tcase self::INVOICE_REFUND_NOT_ASKED :\n\t\t\t\treturn '-';\n\t\t\tcase self::INVOICE_REFUND_IN_PROGRESS :\n\t\t\t\treturn 'In progress';\n\t\t\tcase self::INVOICE_REFUND_REFUSED :\n\t\t\t\treturn 'Information incomplète';\n\t\t\tcase self::INVOICE_REFUNDED :\n\t\t\t\treturn 'Refunded';\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b97717e60c2fc3de03eec3d51b435592", "score": "0.4358647", "text": "private function makeRefund()\n {\n $api = $this->api;\n $statusName = $this->api->getOperationStatusName();\n if ($statusName != $api::OPERATION_COMPLETED && $statusName != $api::OPERATION_REJECTED) {\n die('OK');\n }\n \n $order = new Order((int)$this->getDotControl(Tools::getValue('control')));\n \n if ($statusName == $api::OPERATION_REJECTED) {\n $state = $this->config->getDotpayFailedRefundStatusId();\n $history = new OrderHistory();\n $history->id_order = $order->id;\n $history->changeIdOrderState($state, $history->id_order);\n $history->addWithemail(true);\n }\n \n $payments = OrderPayment::getByOrderId($order->id);\n $foundPaymet = false;\n $sumOfPayments = 0.0;\n foreach ($payments as $payment) {\n if ($payment->transaction_id == $this->api->getOperationNumber()) {\n die('PrestaShop - PAYMENT '.$this->api->getOperationNumber().' IS ALREADY SAVED');\n } elseif ($payment->transaction_id == $this->api->getRelatedOperationNumber()) {\n $foundPaymet = true;\n }\n if ($payment->payment_method == $this->module->displayName) {\n $sumOfPayments += (float)$payment->amount;\n }\n }\n if (!$foundPaymet) {\n die('PrestaShop - PAYMENT '.$this->api->getRelatedOperationNumber().' IS NOT SAVED');\n }\n $receivedAmount = (float)($this->api->getTotalAmount());\n \n if ($receivedAmount - $sumOfPayments >= 0.01) {\n die('PrestaShop - NO MATCH OR WRONG AMOUNT - '.$receivedAmount.' > '.$sumOfPayments);\n }\n \n $lastOrderState = new OrderState($order->getCurrentState());\n if ($lastOrderState->id != $this->config->getDotpayWaitingRefundStatusId()) {\n die('PrestaShop - REFUND HAVEN\\'T BEEN SUBMITTED');\n }\n \n if ($statusName == $api::OPERATION_COMPLETED) {\n $payment = $this->prepareOrderPayment($order, true);\n $payment->add();\n\n if ($receivedAmount < $sumOfPayments) {\n $state = $this->config->getDotpayPartialRefundStatusId();\n } else {\n $state = $this->config->getDotpayTotalRefundStatusId();\n }\n \n $history = new OrderHistory();\n $history->id_order = $order->id;\n $history->changeIdOrderState($state, $history->id_order);\n $history->addWithemail(true);\n }\n die('OK');\n }", "title": "" }, { "docid": "4d417bb5b3e62c3d7d79dfcac61eeda2", "score": "0.43568704", "text": "public function setFecret($fecret){\n\t\t$this->fecret = $fecret;\n\t}", "title": "" }, { "docid": "35d949365dd80298a46b3d09d5e08540", "score": "0.43562996", "text": "public function testUpdatePaypalAgreement()\n {\n }", "title": "" }, { "docid": "c992eead4cccbabf2b1709ba02c069fe", "score": "0.43554428", "text": "public function setResource(?GovernanceResource $value): void {\n $this->getBackingStore()->set('resource', $value);\n }", "title": "" }, { "docid": "d55a69ece09b5ad16c4869addd0ad335", "score": "0.43526542", "text": "protected function beforesaved()\r\n\t{\r\n\t\tif (($this->getValue(\"converted_opportunity_id\") || $this->getValue(\"converted_customer_id\")) && $this->getValue(\"f_converted\") != 't')\r\n\t\t{\r\n\t\t\t$this->setValue(\"f_converted\", 't');\r\n\t\t\t$this->setValue('ts_converted', date(DATE_ISO8601));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "930d92c06bb12ff65ad633ba50df228a", "score": "0.43391943", "text": "private function updateclientbalance() \n {\n \n\t\t$response = $this->login(true);\n\t\tif ($response[RESPONSE] == \"1\") \n {\n $login = $this->_request['clientusername'];\n \n include_once $_SERVER[\"DOCUMENT_ROOT\"] . \"/classes/reseller_class.php\";\n $resClsObj = new reseller_class();\n \n $clientUserId = $resClsObj->getUserId($login);\n $param['toUserEditFund'] = $clientUserId;\n $param['fundAmount'] = trim($this->_request['receivingAmount']);\n $param['balance'] = trim($this->_request['balance']);\n $param['partialAmt'] = trim($this->_request['partialAmt']);\n \n $action = trim($this->_request['action']);\n if($action == \"1\")\n {\n $param['changefunderEditFund'] = \"add\"; \n }\n elseif($action == \"0\")\n {\n $param['changefunderEditFund'] = \"reduce\"; \n }\n \n \n $param['otherPaymentType'] = trim($this->_request['otherPaymentType']);\n \n $paymentType = trim($this->_request['paymentType']);\n \n if($paymentType == \"0\")\n {\n $param['pType'] = \"prepaid\";\n }\n elseif($paymentType == \"1\")\n {\n $param['pType'] = \"partial\";\n }\n elseif($paymentType == \"2\")\n $param['pType'] = \"postpaid\";\n \n \n $paymentMode = trim($this->_request['paymentMode']);\n \n if($paymentMode == \"0\"){\n $param['fundPaymentType'] = \"Cash\";\n }elseif($paymentMode == \"1\"){\n $param['fundPaymentType'] = \"Memo\";\n }elseif($paymentMode == \"2\"){\n $param['fundPaymentType'] = \"Bank\";\n }elseif($paymentMode == \"3\")\n $param['fundPaymentType'] = \"Other\";\n else\n $param['fundPaymentType'] = \"Cash\";\n \n $param['fundDescription']= trim($this->_request['description']);\n $param['fundCurrency']= trim($this->_request['amountCurrency']);\n $param['partialCurrency']= trim($this->_request['partialAmtCurrency']);\n \n $fundResponse = $resClsObj->editFund($param,$response[CONTENT]['id']);\n $fundResponse = json_decode($fundResponse);\n\t\t\t\n \n if($fundResponse->status == \"success\")\n {\n $error[RESPONSE] = \"1\";\n }\n else\n {\n $error[RESPONSE] = \"0\";\n }\n $error[MESSAGE] = $fundResponse->msg;\n $this->response($this->json($error), 200);\n exit(); \n \n// if (empty($login) || strlen($login) < 5) {\n// $error = array(RESPONSE => \"0\", MESSAGE => \"Incomplete Details Username Must be more than 5 Character\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t\texit();\n//\t\t\t}\n//\n//\t\t\t$amount = $this->_request['amount'];\n//\t\t\tif (empty($amount) || !is_numeric($amount) || $amount < 0) {\n//\t\t\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"Incomplete Details Amount Must be more than 0\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t\texit();\n//\t\t\t}\n//\t\t\t$type = $this->_request['type'];\n//\t\t\tif (empty($type) || strlen($type) < 3) {\n//\t\t\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"Incomplete Details Type Must be provide\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t\texit();\n//\t\t\t}\n//\t\t\tif (($type != \"add\" && $type != \"reduce\")) {\n//\t\t\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"Incomplete Details Transfer-type must be add or reduce\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t\texit();\n//\t\t\t}\n//\n//\t\t\t\n// $login = $funobj->db->real_escape_string($login);\n//\t\t\t$funobj->db->select('id_client,account_state')->from('clientsshared')->where(\" id_reseller = '\" . $response[\"id\"] . \"' and login= '\" . $login . \"' \");\n//\t\t\t$result = $funobj->db->execute();\n//\t\t\tif ($result->num_rows > 0) {\n//\t\t\t\twhile ($row = $result->fetch_array(MYSQL_ASSOC)) {\n//\t\t\t\t\t$current_balance = $row[\"account_state\"];\n//\t\t\t\t\t$trans_tuserid = $row[\"id_client\"];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\telse if ($result->num_rows == 0) {\n//\t\t\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"Unable to fetch client details.\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t\texit();\n//\t\t\t}\n//\t\t\t\n//\t\t\tif($type==\"add\")\n//\t\t\t\t$newBalance = $current_balance + $amount;\n//\t\t\telse if($type==\"reduce\")\n//\t\t\t\t$newBalance = $current_balance - $amount;\n//\t\t\t\n//\t\t\tif($newBalance <0)\n//\t\t\t{\n//\t\t\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"User Do not have this much amount to reduce.\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t\texit();\n//\t\t\t}\n//\t\t\t$data = array('account_state' => $newBalance);\n//\t\t\t$funobj->db->update('clientsshared', $data)->where(\"id_reseller = '\" . $response[\"id\"] . \"' and login= '\" . $login . \"' \");\n//\t\t\t$updateQry=$funobj->db->getQuery();\n//\t\t\t$result = $funobj->db->execute();\t\t\t\t\n//\t\t\t\n//\t\t\tif ($funobj->db->affected_rows == 1) {\n//\t\t\t\t$data=array(\"trans_fuserid\"=>$response[\"id\"] , \"trans_tuserid\"=>$trans_tuserid, \"trans_amt\"=>$amount, \"trans_crnt_amt\"=>$current_balance, \"trans_date\"=>date(\"Y-m-d H:i:s\"),\" trans_type\"=>$type);\n//\t\t\t\t$table = 'reseller_transaction';\n//\t\t\t\t$funobj->db->insert($table, $data);\n//\t\t\t\t$insertQry=($funobj->db->getQuery());\n//\t\t\t\t$logresult = $funobj->db->execute();\n//\t\t\t\t$batchId=\"\";\n//\t\t\t\tif($logresult && $funobj->db->affected_rows == 1)\n//\t\t\t\t{\n//\t\t\t\t\t$returnResult = array(RESPONSE => \"1\", MESSAGE => \"Update Successfully\");\n//\t\t\t\t\t$this->response($this->json($returnResult), 200);\n//\t\t\t\t}\n//\t\t\t\telse{\n//\t\t\t\t\tmail(\"[email protected]\",\"Phone91 transaction Log\",\"Error While inserting trans log in db\");\n//\t\t\t\t\t$returnResult = array(RESPONSE => \"1\", MESSAGE => \"Update Successfully but error occur duing inserting log. Update: \".$updateQry.\" Insert qry \".$insertQry);\n//\t\t\t\t\t$this->response($this->json($returnResult), 200);\n//\t\t\t\t}\n//\t\t\t\n//\t\t\t\n//\t\t\t\t\n//\t\t\t} else {\n//\t\t\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"Unable to update at this time\");\n//\t\t\t\t$this->response($this->json($error), 200);\n//\t\t\t}\n\t\t}\n\t\t$error = array(RESPONSE => \"0\", MESSAGE => \"Incomplete Details\");\n\t\t$this->response($this->json($error), 200);\n\t}", "title": "" }, { "docid": "e4986935b5eff012c0b36af03b314110", "score": "0.43378362", "text": "public function setAmount($data) {\n parent::set(self::AMOUNT, $data);\n }", "title": "" }, { "docid": "3e4fa350a8d854f6cbd25292f9cab570", "score": "0.43343362", "text": "private function handle_fully_refunded_charge($amount, $currency)\n {\n $this->update_order_status(Omise_Payment::STATUS_REFUNDED);\n $this->order->add_order_note(\n sprintf(\n $this->allow_br('Opn Payments: Payment refunded.<br/>An amount %1$s %2$s has been refunded (manual sync).'),\n $amount,\n $currency\n )\n );\n }", "title": "" }, { "docid": "1833d7678d900aa31a92981fbee890b9", "score": "0.43340403", "text": "public function updateCreditTransaction($postVal,$id,$status) {\n\n\t\t\t$approvalDate = NULL;\n\n\t\t\tif($status==1) {\n\t\t\t\t$approvalDate = date('Y-m-d H:i:s');\n\t\t\t}\n\n\t\t\t$getData = array('fkcustomer_id' \t \t\t => $postVal['customer'],\n\t\t\t\t 'fklocation_id' \t\t\t => $postVal['location'],\n\t\t\t\t\t\t\t \t 'transaction_currency' \t => trim($postVal['currency']),\n\t\t\t\t\t\t\t \t 'exchange_rate' \t \t => trim($postVal['exchange_rate']),\n\t\t\t\t\t\t\t \t 'date' \t \t \t \t => $postVal['date'],\n\t\t\t\t\t\t\t \t 'memo' \t \t\t\t => stripslashes($postVal['memo']),\n\t\t\t\t\t\t\t \t 'approval_for' \t \t\t => trim($postVal['approval_for']),\n\t\t\t\t\t\t\t \t 'approval_date' \t \t \t => $approvalDate,\n\t\t\t\t\t\t\t \t 'credit_status' \t \t \t => $status,\n\t\t\t\t\t\t\t \t 'date_modified'\t\t\t\t => new Zend_Db_Expr('NOW()'));\n\n\t\t\t// echo '<pre>'; print_r($postVal); echo '</pre>'; die();\n\t\t\tif($this->remoteDb->update('credit',$getData,'id='.$id.'')) {\n\t\t\t\t\t\n\t\t\t\t\t$update_product_counter = $postVal['update_product_counter'];\n\t\t\t\t\tif(isset($update_product_counter) && !empty($update_product_counter) && $update_product_counter!=0) {\n\t\t\t\t\t\tfor ($i=1; $i <= $update_product_counter; $i++) { \n\t\t\t\t\t\t\t$tax_id \t\t\t = '';\n\t\t\t\t\t\t\t$tax_percentage \t = '';\n\t\t\t\t\t\t\t$pid \t\t \t = $postVal['pid_'.$i];\n\t\t\t\t\t\t\t$product_id \t\t = trim($postVal['product_id_'.$i]);\n\t\t\t\t\t\t\t$product_description = explode(\"_\",$postVal['product_description_'.$i]);\n\t\t\t\t\t\t\t$product_desc \t = $product_description[0];\n\t\t\t\t\t\t\t$quantity \t \t = trim($postVal['quantity_'.$i]);\n\t\t\t\t\t\t\t$price \t\t\t = trim(str_replace(\",\",\"\",$postVal['price_'.$i]));\n\t\t\t\t\t\t\t$discount_amount \t = trim(str_replace(\",\",\"\",$postVal['discount_amount_'.$i]));\n\t\t\t\t\t\t\t$taxes \t\t\t = \texplode(\"_\",$postVal['tax_code_'.$i]);\n\t\t\t\t\t\t\t$gst_amount \t\t = str_replace(\",\",\"\",trim($postVal['gst_amount_'.$i]));\n\t\t\t\t\t\t\t$tax_id \t\t\t = $taxes[0];\n\t\t\t\t\t\t\tif(isset($taxes[1]) && !empty($taxes[1])) {\n\t\t\t\t\t\t\t\t$tax_percentage = $taxes[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($quantity>0) {\n\t\t\t\t\t\t\t $getCreditData = array('product_id' \t\t => $product_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'product_description' => $product_desc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'quantity' \t\t \t => $quantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'unit_price' \t\t => $price,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'discount_amount'\t => $discount_amount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'fktax_id' \t\t => $tax_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'tax_value' \t\t => $tax_percentage,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'gst_amount' \t\t => $gst_amount);\n\t\t\t\t\t\t\t\t$updateCredit = $this->remoteDb->update('credit_product_list',$getCreditData,'id='.$pid.'');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$product_counter = $postVal['product_counter'];\n\t\t\t\t\tif(isset($product_counter) && !empty($product_counter) && $product_counter!=0) {\n\t\t\t\t\t\tfor ($i=++$update_product_counter; $i <= $product_counter; $i++) { \n\t\t\t\t\t\t\t$tax_id \t\t\t = '';\n\t\t\t\t\t\t\t$tax_percentage \t = '';\n\t\t\t\t\t\t\t$product_id \t\t = trim($postVal['product_id_'.$i]);\n\t\t\t\t\t\t\t$product_description = explode(\"_\",$postVal['product_description_'.$i]);\n\t\t\t\t\t\t\t$product_desc \t = $product_description[0];\n\t\t\t\t\t\t\t$quantity \t \t = trim($postVal['quantity_'.$i]);\n\t\t\t\t\t\t\t$price \t\t\t = trim(str_replace(\",\",\"\",$postVal['price_'.$i]));\n\t\t\t\t\t\t\t$discount_amount \t = trim(str_replace(\",\",\"\",$postVal['discount_amount_'.$i]));\n\t\t\t\t\t\t\t$taxes \t\t\t = \texplode(\"_\",$postVal['tax_code_'.$i]);\n\t\t\t\t\t\t\t$gst_amount \t\t = str_replace(\",\",\"\",trim($postVal['gst_amount_'.$i]));\n\t\t\t\t\t\t\t$tax_id \t\t\t = $taxes[0];\n\t\t\t\t\t\t\tif(isset($taxes[1]) && !empty($taxes[1])) {\n\t\t\t\t\t\t\t\t$tax_percentage = $taxes[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($quantity>0) {\n\t\t\t\t\t\t\t$getCreditDatas = array('fkcredit_id' \t => $id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'product_id' \t\t => $product_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'product_description' => $product_desc,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'quantity' \t\t \t => $quantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'unit_price' \t\t => $price,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'discount_amount'\t => $discount_amount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'fktax_id' \t\t => $tax_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'tax_value' \t\t => $tax_percentage,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'gst_amount' \t\t => $gst_amount);\n\n\t\t\t\t\t\t\t\t$insertCredit = $this->remoteDb->insert('credit_product_list',$getCreditDatas);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\t$expense_counter = $postVal['expense_counter'];\n\t\t\t\t\tif(isset($expense_counter) && !empty($expense_counter) && $expense_counter!=0) {\n\t\t\t\t\t\tfor ($i=1; $i <= $expense_counter; $i++) { \n\t\t\t\t\t\t\t$tax_id \t\t\t = '';\n\t\t\t\t\t\t\t$tax_percentage \t = '';\n\t\t\t\t\t\t\t$expense_type \t = $postVal['expense_id_'.$i];\n\t\t\t\t\t\t\t$epid \t\t\t \t = $postVal['epid_'.$i];\n\t\t\t\t\t\t\t$product_id \t\t = trim($postVal['eproduct_id_'.$i]);\n\t\t\t\t\t\t\t$product_description = trim($postVal['eproduct_description_'.$i]);\n\t\t\t\t\t\t\t$quantity \t \t = trim($postVal['equantity_'.$i]);\n\t\t\t\t\t\t\t$price \t\t\t = trim(str_replace(\",\",\"\",$postVal['eprice_'.$i]));\n\t\t\t\t\t\t\t$taxes \t\t\t = \texplode(\"_\",$postVal['etax_code_'.$i]);\n\t\t\t\t\t\t\t$gst_amount \t\t = str_replace(\",\",\"\",trim($postVal['egst_amount_'.$i]));\n\t\t\t\t\t\t\t$tax_id \t\t\t = $taxes[0];\n\t\t\t\t\t\t\tif(isset($taxes[1]) && !empty($taxes[1])) {\n\t\t\t\t\t\t\t\t$tax_percentage = $taxes[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(isset($expense_type) && !empty($expense_type)) {\n\t\t\t\t\t\t\t\t$expense_type = $expense_type;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$expense_type = NULL;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$getExpensesData = array('fkexpense_type' \t => $expense_type,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'product_id' \t\t => $product_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'product_description' => $product_description,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'quantity' \t\t \t => $quantity,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'unit_price' \t\t => $price,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'fktax_id' \t\t => $tax_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'tax_value' \t\t => $tax_percentage,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'gst_amount' \t\t => $gst_amount,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t 'row_type' => 2);\n\t\t\t\t\t\t\t\t$insertExpense = $this->remoteDb->update('credit_product_list',$getExpensesData,'id='.$epid.'');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\n\n\n\t\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn true;\t\n\t\t\t}\n\t}", "title": "" }, { "docid": "bd74dfdbc23f96df76ae8d2956fcf210", "score": "0.43320453", "text": "public function refund()\n {\n $url = $this->apiURL . $this->trApiKey . '/chargeback/transaction';\n\n $response = $this->requests($url, array(static::TITLE => $this->transactionID));\n\n $this->checkError($response);\n\n return $response;\n }", "title": "" } ]
a223c1a37179a686e1da776cda60b602
show the record with the given id
[ { "docid": "8bd5d4902e43385ecdcfdb4335c9939f", "score": "0.0", "text": "public function show($id)\n {\n return $this->address->findOrFail($id);\n }", "title": "" } ]
[ { "docid": "0b4f2e30c007d9275630ea97c71274b2", "score": "0.8926914", "text": "public function showRecord($id){\n\t}", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.8627217", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "632278ef3c97d87e87f73747874ee4c1", "score": "0.8587354", "text": "public function show($id){\n\t\t//\n\t}", "title": "" }, { "docid": "632278ef3c97d87e87f73747874ee4c1", "score": "0.8587354", "text": "public function show($id){\n\t\t//\n\t}", "title": "" }, { "docid": "632278ef3c97d87e87f73747874ee4c1", "score": "0.8587354", "text": "public function show($id){\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.8568049", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "41cd3ae993ee31964c23d5227ad73447", "score": "0.8563566", "text": "public function show ($id){\n \t \n \t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.85600007", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.85600007", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.85600007", "text": "public function show($id) {}", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.8559998", "text": "public function show($id){}", "title": "" }, { "docid": "63a92839c87307963a49b2b9d9cc5823", "score": "0.8559998", "text": "public function show($id){}", "title": "" }, { "docid": "c6dca6088fe0ea56875ba8545fc85201", "score": "0.85478866", "text": "public function show($id) {\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "8b33639674b143bef15ae6e02ea3ef1d", "score": "0.8521386", "text": "public function show($id) {\n\t\t\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.8520757", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "f90d515d4375630edf26c8da4a4eb602", "score": "0.8507887", "text": "public function show($id)\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f90d515d4375630edf26c8da4a4eb602", "score": "0.8507887", "text": "public function show($id)\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f90d515d4375630edf26c8da4a4eb602", "score": "0.8507887", "text": "public function show($id)\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "3e0593e091f5e6638e77a9fc6dbaa98c", "score": "0.8501668", "text": "public function show($id)\n\t\t{\n\t\t\t\t//\n\t\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.84967846", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.84967846", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.84967846", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.84967846", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.84967846", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "2cfc6cb6d950cc643bf98215269a0209", "score": "0.8494932", "text": "public function show($id)\n\t{\n\n\t\t\n\t}", "title": "" }, { "docid": "2cfc6cb6d950cc643bf98215269a0209", "score": "0.8494932", "text": "public function show($id)\n\t{\n\n\t\t\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.848824", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
032d3a8c8199acac83f99fde204bce02
Check whether permitted attributes are present.
[ { "docid": "e655459b4c448c3479276667a053b6b2", "score": "0.8081959", "text": "public function hasPermittedAttrs(): bool\n {\n return isset($this->_permittedAttrs);\n }", "title": "" } ]
[ { "docid": "5f554f9aac83ca48b995a4ac69037e37", "score": "0.748106", "text": "protected function validateRequiredAttributes()\n {\n if (!empty($this->requiredAttributes)) {\n $attributes = $this->fetchAttributes();\n foreach ($this->requiredAttributes as $openIdAttributeName) {\n if (!isset($attributes[$openIdAttributeName])) {\n return false;\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "5c7db33cf733b2db95c056d3a6124afc", "score": "0.7346862", "text": "protected function checkForRequiredAttributes()\n {\n if (! empty($this->requiredAttributes())) {\n foreach ($this->requiredAttributes() as $requiredAttribute) {\n if (! array_key_exists($requiredAttribute, $this->attributes)) {\n throw new RequiredAttributeNotPassed(\"The required attribute $requiredAttribute was not passed\");\n }\n }\n }\n }", "title": "" }, { "docid": "feec64315332b43bc384e303a673bc8d", "score": "0.73394465", "text": "public function hasAttributes()\n {\n return !empty($this->attributes);\n }", "title": "" }, { "docid": "66fd721da0e26f1b72dd8843c110d41d", "score": "0.722103", "text": "public function hasAttributes(): bool\n {\n if (count($this->attributes) > 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d1c20772e0181c065eecfe53263549ff", "score": "0.7214195", "text": "public function hasAttributes(): bool {\n return !empty($this->attributes);\n }", "title": "" }, { "docid": "c72b2a335c72c00779bf6944732ba13f", "score": "0.7101527", "text": "public function has_attributes() {\n foreach ( $this->get_attributes() as $attribute ) {\n if ( $attribute->get_visible() ) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "5bb2596d38440f0e1a685acb85a8cb88", "score": "0.70516557", "text": "public function hasAttrs ()\n {\n return count( $this->attrs ) > 0 ? TRUE : FALSE;\n }", "title": "" }, { "docid": "02aece87f796691bb960fca173ce26e0", "score": "0.6892943", "text": "private function has_required_attributes() {\n\t\t$attributes = $this->block->get_attributes();\n\t\t$rules = $this->definition['attributes'];\n\n\t\tif ( isset( $rules['required'] ) ) {\n\t\t\t// Ensure that all the required attributes exist in the attributes array.\n\t\t\tforeach ( $rules['required'] as $required_attr ) {\n\t\t\t\tif ( ! in_array( $required_attr, $attributes, true ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// All requirements met, passing.\n\t\t\treturn true;\n\t\t}\n\n\t\t// At least one attribute is required.\n\t\tif ( $rules['require_one_or_more'] ) {\n\t\t\treturn count( $attributes ) > 0;\n\t\t}\n\n\t\t// All requirements met, passing.\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7a90bbe4cfad1acb34ffe35f4ab5008f", "score": "0.6854554", "text": "protected function validateAttributes()\n {\n $this->isValid = false;\n }", "title": "" }, { "docid": "fdea6a88ce45914641194f656f8331c3", "score": "0.6802447", "text": "public function hasAttributes(): bool {\r\n\r\n if(null === $this -> tag) {\r\n return false;\r\n }\r\n\r\n return count($this -> tag -> getAttributes()) > 0;\r\n }", "title": "" }, { "docid": "764989f9338a466ebda2bb3cda99c9d8", "score": "0.67603374", "text": "public function hasNotNullAttributes() {\n return count(array_filter($this->attributes)) != 0;\n }", "title": "" }, { "docid": "2d92577acfe6decbd0397e02782aa419", "score": "0.67518336", "text": "public function hasPermitsRequired()\n {\n return $this->permitsRequired !== null;\n }", "title": "" }, { "docid": "2bb63956d5d45e974ec80322045bde45", "score": "0.67378527", "text": "public function validate_attributes()\n {\n return parent::validate_attributes();\n }", "title": "" }, { "docid": "7aa783ddaefb31ca5eb741ff65c80d99", "score": "0.66863734", "text": "protected function validatedAttributes(){\n\t return request()->validate([\n\t 'title' => 'required',\n 'body' => 'required',\n 'excerpt' => ['required', 'max:20'],\n //can see if entry exists in a table by column name\n 'tags' => 'exists:tags,id'\n ]);\n }", "title": "" }, { "docid": "d7c9b9b4d5ea21b39ed8aff01cf22453", "score": "0.65449685", "text": "private function has_attribute(){\n\t\t$object_variables = get_object_vars($this);\n\t\t//This will return true or false\n\t\treturn array_key_exists($attribute, $object_variables);\n\t}", "title": "" }, { "docid": "0d1a14b5b2b6325d25a6562ebd097579", "score": "0.6542392", "text": "public function hasExcludedAttrs(): bool\n {\n return isset($this->_excludedAttrs);\n }", "title": "" }, { "docid": "bb60622fd173a7469e81197c35703708", "score": "0.65382576", "text": "public function hasLockedAttributes()\n {\n return !empty($this->_lockedAttributes);\n }", "title": "" }, { "docid": "ccc188067ee87e363857336f674e3eab", "score": "0.6520319", "text": "protected function _attributeExists()\n {\n $attr = $this->_getAttribute();\n $attrExists = $attr->getId() ? true : false;\n\n return $attrExists;\n }", "title": "" }, { "docid": "2e7671a3e0ee76566c625f7613330bd9", "score": "0.65092504", "text": "public function hasAllAttributesSet()\n {\n return count($this->container) === count(self::$attributeMap);\n }", "title": "" }, { "docid": "1775bf314fbcbb5f54f0e6f2d0a23241", "score": "0.6488091", "text": "public function hasAttributes() {\r\n return $this->node->hasAttributes();\r\n }", "title": "" }, { "docid": "526f036b3be2f811d84afdc08b5e2c3d", "score": "0.6482999", "text": "function hasAttribute( $attr )\n {\n return in_array( $attr, $this->attributes() );\n }", "title": "" }, { "docid": "c3abcb22bcbd0bd65b5a1cea96e87b1b", "score": "0.64644814", "text": "public function isAllowed($attributes = [])\n {\n return $this->allows($attributes + ['skip' => true]);\n }", "title": "" }, { "docid": "24b4a8268454f48dc267739131fcbf12", "score": "0.64472085", "text": "public function allowedAttributes()\n {\n return collect($this->attributes)->filter(function ($item, $key) {\n return !collect($this->hidden)->contains($key) && $key !== 'id';\n })->merge([\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n // 'token' => $this->createToken('Unnuio')->accessToken\n ]);\n }", "title": "" }, { "docid": "201a5268bbdee099f7276ea40dcbf82b", "score": "0.6396327", "text": "public function isShowAttributesInIncluded();", "title": "" }, { "docid": "ba05503eec27802715f42b6df303c86c", "score": "0.6368586", "text": "public function valid()\n {\n\n if ($this->offsetGet('id_developer') === null) {\n return false;\n }\n if ($this->offsetGet('name') === null) {\n return false;\n }\n\n return $this->validProperties();\n }", "title": "" }, { "docid": "90bb2e221d3db8c54c3ee91b1a01cd62", "score": "0.6310888", "text": "function checkRequired()\t{\r\n\t\t$flag=1;\r\n\t\tif (trim($this->conf[\"requiredInfoFields\"]))\t{\r\n\t\t\t$infoFields = t3lib_div::trimExplode(\",\",$this->conf[\"requiredInfoFields\"]);\r\n\t\t\twhile(list(,$fName)=each($infoFields))\t{\r\n\t\t\t\tif (!trim($this->personInfo[$fName]))\t{\r\n\t\t\t\t\t$flag=0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $flag;\r\n\t}", "title": "" }, { "docid": "2b66b4e60dc9b335868ba35aa54bf5a9", "score": "0.62703353", "text": "public function hasAttribute($key) {\n return array_key_exists($key, $this->attributes);\n }", "title": "" }, { "docid": "bd30aeac2b36421ca5b27de07b15b55a", "score": "0.62383336", "text": "public function hasAttribute($name) {\n return array_key_exists($name, $this->attributes);\n }", "title": "" }, { "docid": "ba54badd39295d8e1352d2437a375601", "score": "0.62152874", "text": "public function totallyGuarded()\n {\n return count ( $this->fillable ) == 0 and $this->guarded == array (\n '*'\n );\n }", "title": "" }, { "docid": "0bdb24d9986d49d531d0049d50891e8d", "score": "0.6192076", "text": "protected function isInAllAttributes($key) {\n $valid_attributes = array_merge($this->getAllAttributes(), $this->getEloquentAttributes());\n return in_array($key, $valid_attributes) || $this->checkForRelationsAttributes($key);\n }", "title": "" }, { "docid": "5a429ce98774b1b15c7e74508870dc0d", "score": "0.61786604", "text": "function isValid()\n\t{\n\t\tif ($this->attribute->getIsRequired() && $this->value == null) return false;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0974867c6eac0eb0521a1414c7697356", "score": "0.61700886", "text": "private function CheckRequiredFields()\n\t{\n\t\tforeach ($this->_settings as $required_setting) {\n\t\t\tif (is_null($required_setting)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "79d3071a4c20f55e8bed819817fd1810", "score": "0.6162807", "text": "public function getCardRequiredAttribute()\n {\n return !empty($this->getParam('cardRequired'));\n }", "title": "" }, { "docid": "5c008a266994651b36f039304b9e5d45", "score": "0.6153619", "text": "public function totallyGuarded()\n {\n return count($this->fillable) == 0 && $this->guarded == array('*');\n }", "title": "" }, { "docid": "c9ee23498b8bd0ce45949c6da9755c4c", "score": "0.6137085", "text": "public function valid()\n{\nreturn count($this->listInvalidProperties()) === 0;\n}", "title": "" }, { "docid": "c199648059dead57c8bcedcf16989603", "score": "0.6119927", "text": "protected function _attributeIsUsedInCorrectForms()\n {\n $attr = $this->_getAttribute();\n $forms = $attr->getUsedInForms();\n $attrUsedFormsIsCorrect = true;\n if (in_array('checkout_register', $forms)\n || in_array('customer_account_create', $forms)\n || in_array('adminhtml_checkout', $forms)\n ) {\n $attrUsedFormsIsCorrect = false;\n }\n\n return $attrUsedFormsIsCorrect;\n }", "title": "" }, { "docid": "4f71a0fec519588569fc8c1feb6f9048", "score": "0.6115493", "text": "function hasAttr($name):bool {\r\n\t\t\t$class = get_called_class();\r\n\t\t\t$arr = $class::$attributes;\r\n\t\t\treturn array_key_exists($name, $arr);\r\n\t\t}", "title": "" }, { "docid": "49f30dfd7f23b54ed6b169d38d3369e9", "score": "0.6105791", "text": "public function getRequiredAttributes()\n {\n $requiredAttributes = array();\n $attributes = ArrayUtil::merge($this->attributes(), ObjectUtil::getClassPublicProperties(get_called_class(), true));\n foreach($attributes as $attribute)\n {\n if($this->isAttributeRequired($attribute))\n {\n $requiredAttributes[] = $attribute;\n }\n }\n return $requiredAttributes;\n }", "title": "" }, { "docid": "56e7c9813625405c953fefbe859180b2", "score": "0.60968006", "text": "public function testRequestedAttributesWithoutAttributes() {\n\t\t\n\t\t$this->Query->Controller->request\n\t\t\t->expects($this->any())\n\t\t\t->method('query')\n\t\t\t->with('attributes')\n\t\t\t->will($this->returnValue(false));\n\t\t\t\n\t\t$results = $this->Query->requestedAttributes();\n\t\t\n\t\t$this->assertEquals(array(), $results);\n\t\t\n\t}", "title": "" }, { "docid": "3ad1229d794dbf28ec83337eb8711bc6", "score": "0.6082682", "text": "public function totallyGuarded()\n {\n return count($this->getFillable()) == 0 && $this->getGuarded() == ['*'];\n }", "title": "" }, { "docid": "fd2372f149eb6008a822a625657f9cba", "score": "0.6077527", "text": "private function checkReq() : bool\r\n {\r\n if (count(array_intersect_key($this->required, $this->post)) == count($this->required)) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "e1b721f38d9803db9206b42f77a1100e", "score": "0.60750633", "text": "public function isValid()\n {\n return $this->resourcePlural != null\n && $this->action != null\n && $this->resourceSingular != null\n && $this->isRestful()\n && $this->hasOnlyAllowedChars();\n }", "title": "" }, { "docid": "63b78940dce5a104a832e4607071dec0", "score": "0.60719633", "text": "public function ContainsEmptyAttribute()\n {\n foreach(CG_PinAssignment::$attributes as $key => $data)\n {\n if($key === 'input' || $key === 'output')\n {\n foreach($data as $attribute)\n {\n if($this->$attribute == '')\n {\n $this->_error = 'All attributes cannot be empty';\n return true;\n }\n }\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "81ec01c47018fec7e26df03eedb89c77", "score": "0.60672593", "text": "public function hasAttribute($name)\n {\n if(!parent::hasAttribute($name))\n {\n if(self::$globalForm)\n {\n $fields = $this->_getFields();\n return isset($fields[$name]);\n }\n return false;\n }\n return true;\n\n }", "title": "" }, { "docid": "9848b298f90e176505d27b148256a7f5", "score": "0.60568184", "text": "public function totallyGuarded()\n {\n return (count($this->fillable) == 0) && ($this->guarded == array('*'));\n }", "title": "" }, { "docid": "a32ca6c1308ba2b738151fb5d8e19fd5", "score": "0.60506624", "text": "public function hasAttribute($attr) {\n\t\treturn isset($this->attributes[$attr]);\n\t}", "title": "" }, { "docid": "c0919b0c17a3067132b104d3025b96ff", "score": "0.60481113", "text": "public function totallyGuarded()\n\t{\n\t\treturn count($this->fillable) == 0 and $this->guarded == array('*');\n\t}", "title": "" }, { "docid": "417e56b490b0b9f7d2172884dddac4cd", "score": "0.6040037", "text": "protected function verifyData()\n\t{\n\t\tforeach ($this->_required as $field => $value) {\n\t\t\tif (is_null($this->_options[$field])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8ac82740ae946f2b58ad72247cd95f2c", "score": "0.6038716", "text": "protected function checkAttributesColumnsExists() {\r\n\t\ttry {\r\n\t\t\t// check defined columns\r\n\t\t\t$attributes\t\t= $this->getClassVar(\"attributes\");\r\n\t\t\t$createColumns\t= array();\r\n\t\t\tforeach ($attributes as $attribute) {\r\n\t\t\t\tif (count($attribute) < 1) continue;\r\n\t\t\t\tif (!array_key_exists($attribute[\"name\"], $this->params)) {\r\n\t\t\t\t\t$createColumns[]\t= $attribute[\"name\"];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (count($createColumns) > 0) {\r\n\t\t\t\t$this->addColumns($createColumns);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2d5687d29170f9b2a55a21d611d0a75b", "score": "0.60310537", "text": "public function hasAttribute($name)\n {\n return array_key_exists($name, $this->attributes);\n }", "title": "" }, { "docid": "56e1b8d22294bbc207d54cf9cdc39367", "score": "0.60280484", "text": "public function validateData(){\n $user = $this->_getModelProperty('user');\n if (!isset($user) || empty($user)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d3bcf77c86ac7ae1848fcb860d3747c4", "score": "0.60205317", "text": "protected function validate()\n {\n if (!$this->annotations->have('Attribute')) {\n throw new AnnotationException('A attribute need to have an attribute annotation.');\n }\n\n return true;\n }", "title": "" }, { "docid": "6097fe0b765eeed919c91e7fa4996049", "score": "0.6006738", "text": "public function check($required_attributes, $attributes) {\n $actual_attributes = array_keys($attributes);\n $missing_attributes = array_diff($required_attributes, $actual_attributes);\n $has_attributes = empty($missing_attributes);\n if(!$has_attributes) {\n $errmsg = \"Missing required CAS attributes: \".implode(\",\", $missing_attributes);\n throw new Casauth_Exception($errmsg);\n }\n }", "title": "" }, { "docid": "aa5d3e488543bc52bc441f7e18d4d891", "score": "0.6006487", "text": "public function permittedAttrs(): array\n {\n if (!$this->hasPermittedAttrs()) {\n throw new \\LogicException('permittedAttrs not set.');\n }\n return $this->_permittedAttrs;\n }", "title": "" }, { "docid": "46d834013906d6e48f1e3cc6a8e4a81a", "score": "0.6003574", "text": "public function necessaryAttributes()\n {\n return $this->_necessaryAttributes;\n }", "title": "" }, { "docid": "2fc8349420548f84f2ea03a9f36eb6b7", "score": "0.5979255", "text": "public function getSafeAttributes()\n {\n return ['name', 'email', 'password'];\n }", "title": "" }, { "docid": "760f7afd86410b2c4f219673b0da5cfb", "score": "0.5976973", "text": "public function validProperties()\n {\n\n if (array_key_exists('id_developer', $this->container) && $this->container['id_developer'] === null) {\n return false;\n }\n if (array_key_exists('id_developer', $this->container) && !preg_match(\"/^[a-z0-9]+(?:-[a-z0-9]+)*$/\", $this->container['id_developer'])) {\n return false;\n }\n if (array_key_exists('name', $this->container) && $this->container['name'] === null) {\n return false;\n }\n if (array_key_exists('name', $this->container) && (strlen($this->container['name']) > 100)) {\n return false;\n }\n if (array_key_exists('email', $this->container) && ($this->container['email'] !== null) && (strlen($this->container['email']) > 200)) {\n return false;\n }\n if (array_key_exists('url', $this->container) && ($this->container['url'] !== null) && (strlen($this->container['url']) > 200)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "666d1c79391f6c495bdf455130efde10", "score": "0.59717804", "text": "public function hasAttribute($name) {\n\n return $this->attributes->hasAttribute($name);\n\n }", "title": "" }, { "docid": "7af10b91c345ca0720e80850c8881012", "score": "0.59656316", "text": "public function testHasAttributes(array $attributes_to_assign, array $attributes_to_check) : void\r\n {\r\n $fake = $this->getFake($attributes_to_assign);\r\n \r\n foreach ($attributes_to_check as $attribute_name => $expected_value) {\r\n $this->assertEquals(\r\n $expected_value,\r\n $fake->hasAttribute($attribute_name)\r\n );\r\n }\r\n }", "title": "" }, { "docid": "278d8341075cea3804a06191db271f7a", "score": "0.59630114", "text": "function attributeExists($attrName) {\n\t\treturn array_key_exists($attrName, $this->tagAttributes);\n\t}", "title": "" }, { "docid": "7e4b50450679b552168bf3fbc8624885", "score": "0.59553236", "text": "public function isRequired(): bool\n {\n return $this->getRequired();\n }", "title": "" }, { "docid": "beaa1f9a004dc375cfd2ee76c668a828", "score": "0.59420735", "text": "protected function check_requirements() {\n if (!data_registry::defaults_set()) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "3230b02144827a4398e182cc8842ed8f", "score": "0.59410274", "text": "protected function getSupportedAttributes()\n {\n return array(\n self::ACCESS\n );\n }", "title": "" }, { "docid": "1b9dfe7bed19acd1ce92db4b6045f3f0", "score": "0.5939199", "text": "function isRequired()\n {\n return ! $this->isNullable() && ! $this->isGenerated() && $this->isUpdatable();\n }", "title": "" }, { "docid": "4f19510db824b1e300e5a88b40831f17", "score": "0.5933778", "text": "public function validate() {\n if($this->skipValidation) return true;\n\n foreach($this->attributes as $key => $value){\n if(isset($this->requiredMessages[$key]) && strlen($this->requiredMessages[$key])){\n if(!strlen($this->{$key})){\n $error = $this->requiredMessages[$key];\n $this->errors[$key] = $error;\n } else {\n $this->errors[$key] = null;\n }\n }\n }\n return $this->hasErrors() ? false : true;\n }", "title": "" }, { "docid": "ec979d97c70d50f8d5ab971b14744244", "score": "0.59311366", "text": "public function hasEmptyAttributes() {\r\n foreach ($this->getCategories() as $category) {\r\n foreach ($category->getAttributes() as $attribute) {\r\n $values = $attribute->getPartValues($this->id);\r\n $countVal = 0; \r\n foreach ($values as $value) {\r\n \t$countVal += 1;\r\n \tif ($value->value == \"\") {\r\n \treturn (true);\r\n \t}\r\n }\r\n if ($countVal == 0) {\r\n \treturn (true);\r\n }\t\r\n }\r\n }\r\n return (false);\r\n }", "title": "" }, { "docid": "0e30a90cd8c32eabd4ee5493aca7a9bb", "score": "0.5892614", "text": "public function check_context_attributes($attrmap) {\n\n if (empty($attrmap)) {\n return;\n }\n\n foreach ($attrmap as $key => $desc) {\n\n if (!is_array($desc)) {\n throw new \\moodle_exception('check_context_attributes expects a description, not a scalar mapping');\n }\n\n if ($desc['required']) {\n if (!array_key_exists($key, $this->context->params)) {\n $this->error(\"Required attribute $key not provided in input\");\n }\n }\n }\n\n if (!empty($this->context->params)) {\n foreach ($this->context->params as $key => $value) {\n if (!in_array($key, array_keys($attrmap))) {\n $this->error(\"Attribute $key not supported in input\");\n }\n }\n }\n }", "title": "" }, { "docid": "c2da0e7839b12425cf5cdb9c1865e998", "score": "0.58855486", "text": "public function attributeExists(string $name): bool {\n return $this->attributes()->exists($name);\n }", "title": "" }, { "docid": "bc456205b612e8590d8542bc59f6a560", "score": "0.5885272", "text": "public function isAllowed();", "title": "" }, { "docid": "247b393f00b6d2710739b564e1a23476", "score": "0.5880679", "text": "public function valid()\n {\n\n if ($this->container['file_as_mapping'] === null) {\n return false;\n }\n if ($this->container['gender'] === null) {\n return false;\n }\n if ($this->container['notes_format'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d3d20de3eeda88d66f83dc108e54c264", "score": "0.5864607", "text": "public function getValidAttributes(): array\n {\n return $this->validAttributes;\n }", "title": "" }, { "docid": "2800d1b33f610825c4c5273a26f1f53a", "score": "0.5857839", "text": "public function validate()\n {\n return ! (bool) (empty($this->accessKey) && empty($this->secretKey));\n }", "title": "" }, { "docid": "a841aa90f4d8a0d1b967ec365fad9b1b", "score": "0.585485", "text": "public function isRequired();", "title": "" }, { "docid": "a841aa90f4d8a0d1b967ec365fad9b1b", "score": "0.585485", "text": "public function isRequired();", "title": "" }, { "docid": "a841aa90f4d8a0d1b967ec365fad9b1b", "score": "0.585485", "text": "public function isRequired();", "title": "" }, { "docid": "a841aa90f4d8a0d1b967ec365fad9b1b", "score": "0.585485", "text": "public function isRequired();", "title": "" }, { "docid": "a841aa90f4d8a0d1b967ec365fad9b1b", "score": "0.585485", "text": "public function isRequired();", "title": "" }, { "docid": "c0a3d8fbd01dd05968413afb38f15513", "score": "0.58427954", "text": "public function isValidRequest()\n {\n return ! empty($this->getMSISDN()) && ! empty($this->getSessionId());\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" }, { "docid": "e6ef3fcd4e1311864830f22c2690e58d", "score": "0.58394426", "text": "public function valid()\n {\n return count($this->listInvalidProperties()) === 0;\n }", "title": "" } ]
ba9b6a8fe9c4f557838de18a0bf7f9b6
Enqueue scripts and styles.
[ { "docid": "feeb72c0eb4441036af29315b525e56b", "score": "0.0", "text": "function ladwp_scripts() {\n wp_enqueue_style( 'ladwp-fonts' , ladwp_get_font_url(), array(), null );\n\twp_enqueue_style( 'ladwp-fontawesome-style', get_template_directory_uri() . '/libs/font-awesome/css/font-awesome.min.css');\n\twp_enqueue_style( 'ladwp-bootstrap-style', get_template_directory_uri() . '/libs/bootstrap/css/bootstrap.min.css');\n wp_enqueue_style( 'ladwp-bxslider-style', get_template_directory_uri() . '/libs/bxslider/jquery.bxslider.min.css');\n\twp_enqueue_style( 'ladwp-style', get_stylesheet_uri() );\n\n\n\twp_enqueue_script( 'ladwp-bootstrap-js', get_template_directory_uri() . '/libs/bootstrap/js/bootstrap.min.js', array('jquery'), '20170217', true );\n wp_enqueue_script( 'ladwp-bxslider-js', get_template_directory_uri() . '/libs/bxslider/jquery.bxslider.min.js', array('jquery'), '20170223', true );\n\twp_enqueue_script( 'ladwp-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true );\n\twp_enqueue_script( 'ladwp-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true );\n\twp_enqueue_script( 'ladwp-custom-js', get_template_directory_uri() . '/js/custom_script.js', array(), '20170217', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" } ]
[ { "docid": "6fee99ee35367e284faffd0f89e7a25d", "score": "0.82784325", "text": "public function enqueueScripts() {\n }", "title": "" }, { "docid": "9151cd3d02120c12c94ea56ebef588b8", "score": "0.82360536", "text": "public function enqueue_scripts() {\n\n\t\tif ( ! $this->is_available() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// payment form assets\n\t\tif ( $this->supports_payment_form() ) {\n\n\t\t\t$this->enqueue_payment_form_assets();\n\t\t}\n\n\t\t// gateway-specific assets\n\t\t$this->enqueue_gateway_assets();\n\t}", "title": "" }, { "docid": "9d9594250d47ecbcb9a7618db86f43e1", "score": "0.8183751", "text": "private function register_scripts_and_styles()\n\t\t\t{\n\n\t\t\t\tif( is_admin() )\n\t\t\t\t{\n\n\t\t\t\t\t\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\n\t\t \t\t//wp_enqueue_script( 'jquery' );\n\t\t \t\t//wp_enqueue_script( 'jquery-moasaic-js', plugins_url( 'assets/js/jquery.mosaic.min.js' , __FILE__ ), array( 'jquery' ), false, true );\n\n\t\t \t\t//wp_enqueue_style( 'jquery-mosaic-css', plugins_url( 'assets/css/mosaic.css' , __FILE__ ) );\n\n\t\t\t\t}\n\n\t\t\t}", "title": "" }, { "docid": "e058b58f5b8f76e31fa7f61dc1cfa219", "score": "0.81502795", "text": "public function enqueueScripts() {\n\t\t\twp_enqueue_script( 'scriptaculous' );\n\t\t\twp_enqueue_script( 'underConstructionJS' );\n\t\t}", "title": "" }, { "docid": "a9216c65b756660de23691c8753368fb", "score": "0.8141012", "text": "public function enqueueScripts()\n {\n wp_deregister_script('jquery');\n wp_deregister_script('wp-embed');\n\n wp_enqueue_script('html5shiv', 'https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js');\n wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');\n wp_enqueue_script('respond', 'https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js');\n wp_script_add_data('respond', 'conditional', 'lt IE 9');\n\n // wp_enqueue_style('fonts', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800');\n wp_enqueue_style('app', $this->mix('styles/app.css'), [], '', 'all');\n\n // wp_enqueue_script('manifest', $this->mix('scripts/manifest.js'), [], '', true);\n // wp_enqueue_script('vendors', $this->mix('scripts/vendors.js'), [], '', true);\n wp_enqueue_script('app', $this->mix('scripts/app.js'), [], '', true);\n\n // Add ajax variables\n // $urls = array(\n // 'ajaxUrl' => admin_url('admin-ajax.php'),\n // 'templateUrl' => get_template_directory_uri(),\n // );\n // wp_localize_script('app', 'urls', $urls);\n }", "title": "" }, { "docid": "d35df8ad7d5bc84e5cddaeb4debdeb67", "score": "0.80935276", "text": "public function enqueue_scripts() {\n\t\twp_register_script( $this->_token . '-kiwi', esc_url( $this->assets_url ) . 'js/kiwi' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version, true );\n\t\twp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( $this->_token . '-kiwi' ), $this->_version );\n\n\t}", "title": "" }, { "docid": "b9779567a1235480dfffa2cd80e903fb", "score": "0.8090598", "text": "public function enqueue_scripts() {\n global $wp_scripts;\n foreach( $wp_scripts->queue as $handle ) {\n if($handle != 'common'){\n wp_dequeue_script($handle);\n }\n }\n\n wp_enqueue_style( 'taffy-style' );\n wp_enqueue_style( 'taffy-admin' );\n wp_enqueue_script( 'taffy-admin' );\n }", "title": "" }, { "docid": "01ac379c4d86183eadc2fc7ad0849213", "score": "0.8085342", "text": "public function enqueueScripts() {\n\t\t\t// wp_enqueue_script( 'js', BESTBUG_RPPRO_URL . '/assets/js/script.js', array( 'jquery' ), '1.0', true );\n\t\t}", "title": "" }, { "docid": "5c3455507910462b7e6200306388e617", "score": "0.80050904", "text": "public function cs_enqueue_scripts(){\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * CSS */\r\n\t\t\t\t\t\t\t\t\r\n\t\t\twp_enqueue_style('cs-boxshadow-style', $this->plugin_url.'/css/style.css', array(), self::VERSION);\r\n\t\t\t\r\n\t\t\t/**\r\n\t\t\t * JS */\r\n\t\t\t\t\t\t\t\t\r\n\t\t\twp_enqueue_script('cs-boxshadow-script', $this->plugin_url.'/js/script.js', array('jquery'), self::VERSION);\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "bf0a83bb69ae140041b43915ace077c1", "score": "0.7990576", "text": "function action__wp_enqueue_scripts() : void {\n\n\t\twp_dequeue_style( 'wp-block-library' );\n\t\twp_enhance_script( 'wp-embed', 'async' );\n\n\t}", "title": "" }, { "docid": "4ddc30bca40a278507ca0310e6ebadb0", "score": "0.79766566", "text": "public function register_scripts_and_styles() {\r\n\r\n\t}", "title": "" }, { "docid": "acb5e92cee27c5f9ac52c6deb4e5072f", "score": "0.79426825", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'loxo-front' );\n\t}", "title": "" }, { "docid": "5f767616ec11a45a15c4f0630927a97b", "score": "0.79395866", "text": "public function enqueue_scripts()\n {\n wp_enqueue_style( 'charity-styles', plugin_dir_url( __FILE__ ) . './assets/css/cs-style.css' );\n wp_enqueue_script( 'charity-js', plugin_dir_url( __FILE__ ) . './assets/js/charity-scheme.js', array('jquery'), false, true );\n // wp_enqueue_script( 'mu-main-scripts', plugin_dir_url( __FILE__ ) . './assets/js/mu-main.scripts.js', NULL, '1.0.0', true );\n }", "title": "" }, { "docid": "aa6418f4012513fecba2ea8ab3ee3be4", "score": "0.7925019", "text": "public function enqueueScript()\n {\n $this->scripts[] = $this->buildAsset('script');\n }", "title": "" }, { "docid": "5e35d26b42f044ced9e15e9cc14db25f", "score": "0.7923885", "text": "public function enqueue_scripts() {}", "title": "" }, { "docid": "14fd522413fa49fc8eb44e9ea2e2b275", "score": "0.7922668", "text": "public function enqueueScript()\n\t{\n\n\t\t//Enqueue slick\n\t\twp_enqueue_script('slick', $this->getAssetsUri('libraries/slick/slick.min.js'), ['jquery'], THEME_VERSION, true);\n\n\n\t\t// Enqueue the theme script\n\t\twp_enqueue_script('app', $this->getAssetsUri('scripts/app.js'), ['jquery', 'slick'], THEME_VERSION, true);\n\t}", "title": "" }, { "docid": "6a7829e1c813db56f19900f42e4221e3", "score": "0.79201853", "text": "public function _enqueueScripts() {\n\t\twp_enqueue_style('wp-color-picker');\n\t\twp_enqueue_media();\n\t\twp_enqueue_script('wp-color-picker');\n\t\twp_enqueue_script('jquery');\n\t}", "title": "" }, { "docid": "da4a171ef4836a6eee7a12f9b1d34939", "score": "0.7919855", "text": "public function enqueue_scripts () {\n\t\twp_register_script( $this->_token . '-frontend', esc_url( $this->assets_url ) . 'js/frontend' . $this->script_suffix . '.js', array( 'jquery' ), $this->_version );\n\t\twp_enqueue_script( $this->_token . '-frontend' );\n\t}", "title": "" }, { "docid": "474fe7397c81e8ae82582b4d52737dc1", "score": "0.7919164", "text": "public function enqueue_scripts() {\n\t\tif ( ! wct_is_talks() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Register jquery Raty\n\t\twp_register_script( 'jquery-raty', wct_get_js_script( 'jquery.raty' ), array( 'jquery' ), '2.7.0.imath', true );\n\n\t\t// Register tagging\n\t\twp_register_script( 'tagging', wct_get_js_script( 'tagging' ), array( 'jquery' ), '1.3.1', true );\n\n\t\twct_enqueue_style();\n\t}", "title": "" }, { "docid": "8dff43f5b0dd3472e7fc538b202c9919", "score": "0.7894314", "text": "public function load_scripts_and_styles() {\n\n\t\t// Include Bootstrap css/js framework.\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/inc/css/bootstrap.min.css', array() );\n\n\t\twp_enqueue_style( 'font-awesome' , '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css', array() );\n\n\t\t// Get the main stylesheet for the theme.\n\t\twp_enqueue_style( 'stylesheet', get_stylesheet_uri(), array(), '2013-10-18' );\n\n\t\t// Get the main stylesheet for the theme.\n\t\twp_enqueue_style( 'dynamic', get_template_directory_uri() . '/dynamic.css.php', array(), '2013-10-18' );\n\n\t\t// Include jQuery from WP Core\n\t\twp_enqueue_script( \"jquery\" );\n\n\t\t// Bootstrap.js file.\n\t\twp_enqueue_script( \"bootstrap-js\", get_template_directory_uri() . \"/js/bootstrap.min.js\" );\n\n\t\t// Mansonry script. Used in blog page for organizing content.\n\t\twp_enqueue_script( 'masonry-js', get_template_directory_uri() . '/js/masonry.pkgd.min.js' );\n\n\t\t// My little script addings for jQuery use.\n\t\twp_enqueue_script( 'custom-js', get_template_directory_uri() . '/js/custom.js' );\n\t\t\n\t}", "title": "" }, { "docid": "68a149a4ee94ac490cfc21d83a4c9e53", "score": "0.7869487", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'wsu-home-typekit', 'https://use.typekit.net/roi0hte.js', array(), false, false );\n\t\twp_enqueue_script( 'wsu-features', 'https://wsu.edu/wp-content/themes/wsu-home/js/wsu-feature.min.js', array( 'backbone' ), spine_get_script_version(), true );\n\n\t\tif ( defined( 'WSU_LOCAL_CONFIG' ) && WSU_LOCAL_CONFIG ) {\n\t\t\t$script = 'timeline.js';\n\t\t} else {\n\t\t\t$script = 'timeline.min.js';\n\t\t}\n\n\t\twp_enqueue_script( 'wsu-timeline', get_stylesheet_directory_uri() . '/js/' . $script, array( 'jquery' ), spine_get_script_version(), true );\n\t}", "title": "" }, { "docid": "617afb3f77f70cd5bf9303eaca153e54", "score": "0.7864112", "text": "public function enqueue_scripts() {\n\t\tif ( ! is_buddypress() ) {\n\t\t\twp_dequeue_style( 'bp-mentions-css' );\n\t\t\twp_dequeue_style( 'bp-legacy-css' );\n\t\t\twp_dequeue_script( 'bp-confirm' );\n\t\t\twp_dequeue_script( 'bp-widget-members' );\n\t\t\twp_dequeue_script( 'bp-jquery-query' );\n\t\t\twp_dequeue_script( 'bp-jquery-cookie' );\n\t\t\twp_dequeue_script( 'bp-jquery-scroll-to' );\n\t\t\twp_dequeue_script( 'bp-legacy-js' );\n\t\t\twp_dequeue_script( 'jquery-atwho' );\n\t\t\twp_dequeue_script( 'bp-mentions' );\n\t\t\treturn;\n\t\t}\n\n\t\t$suffix = is_rtl() ? '-rtl' : '';\n\t\twp_enqueue_style( 'mylisting-buddypress', c27()->template_uri( 'assets/dist/buddypress'.$suffix.'.css' ), [], \\MyListing\\get_assets_version() );\n\t\twp_enqueue_script( 'mylisting-buddypress', c27()->template_uri( 'assets/dist/buddypress.js' ), ['jquery'], \\MyListing\\get_assets_version(), true );\n\t}", "title": "" }, { "docid": "e5542f9aefad6841d9ef917c852e78dc", "score": "0.7857261", "text": "public function enqueue_styles_scripts() {\n\n\t\t\twp_register_script( 'rt-wcqv-frontend', get_theme_file_uri( 'assets/js/frontend.js' ), array( 'jquery' ), $this->version, true);\n\t\t\twp_enqueue_script( 'rt-wcqv-frontend' );\n\t\t\twp_enqueue_style( 'rt-quick-view', get_theme_file_uri( 'assets/css/rt-quick-view.css' ) );\n\t\t}", "title": "" }, { "docid": "f4d1a191c607ad54fa47d27b621be1a8", "score": "0.78556347", "text": "public function adminEnqueueScriptsHandler(){\n\t\t//default styles\n\t\twp_register_style('sk_admin-style', IGALLERY_TEMPPATH.'/com/sakurapixel/css/admin.css');\n\t\twp_enqueue_style('sk_admin-style');\t\t\t\t\n\t\t//default JS\n\t\twp_enqueue_script('jquery');\n\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "cb05b6a3f3c97bc64d3dfaff3754521b", "score": "0.78546065", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Onyx_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Onyx_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/onyx-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "0035fd3b896e2e354ddee7d0a2990369", "score": "0.78510237", "text": "public function on_enqueue_scripts ()\n {\n wp_register_style ('cap-dynamic-menu-front', plugins_url ('css/front.css', __FILE__));\n wp_register_script (\n 'cap-dynamic-menu-front',\n plugins_url ('js/front.js', __FILE__),\n array ('cap-jquery', 'cap-jquery-ui')\n );\n wp_enqueue_script ('cap-dynamic-menu-front');\n // wp_enqueue_style ('cap-dynamic-menu-front');\n }", "title": "" }, { "docid": "26e5f69b838ae147f2e23e94952b6b5e", "score": "0.7848334", "text": "public function enqueue_scripts()\n {\n wp_enqueue_style('ifm-importer-style');\n wp_enqueue_script('ifm-importer-admin');\n }", "title": "" }, { "docid": "1a603c54735d698f668b8c4c7321da32", "score": "0.7846163", "text": "public function enqueue_scripts() {\n\n\t}", "title": "" }, { "docid": "f61f49c37279d2ce80be472da8265470", "score": "0.78348833", "text": "public function enqueue_scripts() {\n\n // Main Javascript file.\n \\wp_register_script( ET_THEME_NAME . '-scripts', $this->manifest->get_assets_manifest_item( 'application.js' ), [], ET_THEME_VERSION, true );\n \\wp_enqueue_script( ET_THEME_NAME . '-scripts' );\n\n // Global variables for ajax and translations.\n \\wp_localize_script(\n ET_THEME_NAME . '-scripts',\n 'themeLocalization',\n [\n 'ajaxurl' => \\admin_url( 'admin-ajax.php' ),\n ]\n );\n }", "title": "" }, { "docid": "9d0ffb0ab734982acff05a8d22401c29", "score": "0.78340536", "text": "public function enqueue_scripts() {\n wp_enqueue_script( 'cmb2-calendar-main', plugins_url( 'assets/js/main.js', __FILE__ ), NULL, self::VERSION );\n wp_enqueue_style( 'cmb2-calendar-main', plugins_url( 'assets/css/style.css', __FILE__ ), NULL, self::VERSION );\n }", "title": "" }, { "docid": "0526a08e5ef0a79aae81a7b7f2e6e69d", "score": "0.78315264", "text": "function eaki_load_scripts(){\r\n\t\t\twp_enqueue_style( 'eaki-custom-style', get_template_directory_uri() . '/css/style.min.css', array(), '1.0.0', 'all' );\r\n\r\n\t wp_enqueue_script( 'eaki-vendors-scripts' , get_template_directory_uri() .'/js/vendors.min.js', array(), '1.0.0', 'true' );\r\n\r\n\t wp_enqueue_script( 'eaki-custom-scripts' , get_template_directory_uri() .'/js/custom.min.js', array(), '1.0.0', 'true' );\r\n\r\n\t\t}", "title": "" }, { "docid": "755487a03cef572835ac73dde60de86b", "score": "0.78162384", "text": "public function enqueueScripts() {\n\t\tif ( is_array( $this->scripts ) && count( $this->scripts ) ) {\n\t\t\tforeach ( $this->scripts as $scriptHandle => $scriptPath ) {\n\t\t\t\twp_enqueue_script( $scriptHandle );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e5e97f10458956a76534c0a3ce25d0b7", "score": "0.7810161", "text": "public function enqueue() {\n\t\twp_enqueue_style('evelynpos', $this->plugin_url. 'assets/css/style.css');\n\t\twp_enqueue_script('evelynpos-script', $this->plugin_url . 'assets/js/script.js', array('jquery'));\n\t\twp_enqueue_script('evelynpos-cookies', $this->plugin_url . 'assets/js/js_cookies.js', array('jquery'));\n\t}", "title": "" }, { "docid": "f2c8ab8ce6f1a941dbf368e403a346d8", "score": "0.7793053", "text": "public static function enqueue_style1(){\n\twp_enqueue_script( 'script-name' );\n\twp_enqueue_script( 'test-script-name' );\n\t\n\twp_enqueue_script( 'ace_code_highlighter_js' );\n\twp_enqueue_script( 'ace_mode_js' );\n\twp_enqueue_script( 'custom_css_js' );\n}", "title": "" }, { "docid": "7554af304b0de7106c6365ccb8af6b1a", "score": "0.77896243", "text": "public function enqueue_assets() {\n\t\twp_enqueue_script( 'jays_aliex_main' );\n\t}", "title": "" }, { "docid": "648f737a87a197c5ff53f740977c0ee1", "score": "0.77828884", "text": "function wedl_scripts() {\n\t\t// Theme stylesheet.\n\t\twp_enqueue_style( 'wiesendeliefde-style', get_template_directory_uri() . '/dist/css/style.min.css');\n\t\twp_enqueue_script( 'wiesendeliefde-script', get_template_directory_uri() . '/dist/js/main.min.js');\n\t}", "title": "" }, { "docid": "688d76b9d83e9f653f21e6b46b7864ee", "score": "0.77817523", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'cahnrs', 'http://repo.wsu.edu/cahnrs/0/cahnrs.min.css', array( 'spine-theme' ) );\n\t\twp_enqueue_style( 'spine-theme-child', get_stylesheet_directory_uri() . '/style.css', array( 'cahnrs' ) );\n\t\twp_enqueue_script( 'cahnrs', 'http://repo.wsu.edu/cahnrs/0/cahnrs.min.js', array( 'jquery' ) );\n\t}", "title": "" }, { "docid": "88aff03a3fb7ed7dfe2aca89dde64df0", "score": "0.7776365", "text": "function roots_scripts() {\n\t\twp_enqueue_style( 'tailwind', get_template_directory_uri().'/assets/css/tailwind.css' );\n\t\twp_enqueue_style( 'app', get_template_directory_uri() );\n\n\t\twp_enqueue_script( 'font-awesome', get_theme_file_uri( '/assets/js/fontawesome-all.js' ), array( 'jquery' ), '1.0', true );\n\t\twp_enqueue_script( 'app', get_theme_file_uri( '/assets/js/app.js' ), array( 'jquery' ), '1.0', true );\n\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "10da2226f3df5df998f4a8bdba081003", "score": "0.7773884", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'teft-block-library', plugins_url( 'teft-block-library/assets/styles/library.css' ) );\n\t}", "title": "" }, { "docid": "5aaf44c4013286e5c43ee6282b8c99a8", "score": "0.7751635", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Amazonpolly_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Amazonpolly_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/amazonpolly-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "270ff47c577464ce70f2f04712126fc3", "score": "0.774226", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_script( 'customize-posts' );\n\t\twp_enqueue_style( 'customize-posts-style' );\n\t}", "title": "" }, { "docid": "381ff1d71103da5b266247ef436179ed", "score": "0.77374375", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Wpmbt_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Wpmbt_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script(Wpmbt_Public::$plugin_name, plugin_dir_url(__FILE__) . 'js/wpmbt-public.js', array('jquery'), Wpmbt_Public::$version, false);\n\n\t}", "title": "" }, { "docid": "b50a2f0e7eda14f5d191ee668f082651", "score": "0.77346456", "text": "public function enqueueFrontendStyleAndScripts()\n {\n // @TODO for development only\n $version = time();\n wp_enqueue_style('font-awesome', 'https://use.fontawesome.com/releases/v5.1.1/css/all.css');\n wp_enqueue_style('bootstrap 4.1', 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/css/bootstrap.min.css');\n\n// wp_enqueue_script('jquery', '', [], false, true);\n// wp_enqueue_script('bootstrap-js', 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.2/js/bootstrap.min.js', array(), '', 'true');\n// wp_enqueue_script('bootstrap-popper', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js', array(), '', 'true');\n\n //greenfirends styles & scripts\n wp_enqueue_style('gf-style-admin', get_stylesheet_directory_uri() . '/assets/css/admin.css', [], $version);\n wp_enqueue_style('megamenu-mobile', get_stylesheet_directory_uri() . '/style.css', [], $version);\n wp_enqueue_style('gf-style', get_stylesheet_directory_uri() . '/style.css', [], $version);\n\n wp_enqueue_script('gf-front-js', get_stylesheet_directory_uri() . '/assets/js/front.js', ['jquery'], '', false);\n }", "title": "" }, { "docid": "cb5cf685dcec877813a20452c5dae586", "score": "0.77328736", "text": "public function scripts_styles() {\n\n\t\twp_enqueue_style('stylesheet', get_stylesheet_uri(), array(), $this->version);\n\t\twp_register_script('tinyAnimate', get_template_directory_uri() . '/js/utils/TinyAnimate.js', array(), $this->version, true);\n\t\twp_register_script('swipe', get_template_directory_uri() . '/js/utils/swipe.js', array(), $this->version, true);\n\t\twp_register_script('media-player', get_template_directory_uri() . '/js/utils/media-player.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('build', get_template_directory_uri() . '/js/utils/build.js', array(), $this->version, true);\n\t\twp_register_script('ajax', get_template_directory_uri() . '/js/utils/ajax.js', array(), $this->version, true);\n\t\twp_register_script('marquee', get_template_directory_uri() . '/js/utils/marquee.js', array(), $this->version, true);\n\t\twp_register_script('popup', get_template_directory_uri() . '/js/utils/popup.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('calendar', get_template_directory_uri() . '/js/utils/calendar.js', array(), $this->version, true);\n\n\n// \t\twp_enqueue_script('grid-system', get_template_directory_uri() . '/js/utils/grid-system.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('sticky', get_template_directory_uri() . '/js/utils/sticky.js', array(), $this->version, true);\n// \t\twp_enqueue_script('slideshow', get_template_directory_uri() . '/js/slideshow.js', array('media-player', 'swipe'), $this->version, true);\n// \t\twp_enqueue_script('grid', get_template_directory_uri() . '/js/grid.js', array('grid-system'), $this->version, true);\n// \t\twp_enqueue_script('projects-grid', get_template_directory_uri() . '/js/projects.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('project', get_template_directory_uri() . '/js/project.js', array('grid'), $this->version, true);\n// \t\twp_enqueue_script('image', get_template_directory_uri() . '/js/image.js', array('tinyAnimate'), $this->version, true);\n\t\twp_register_script('grid-slideshow', get_template_directory_uri() . '/js/grid-slideshow.js', array('media-player', 'swipe', 'build'), $this->version, true);\n\n\t\t// wp_enqueue_script('home', get_template_directory_uri() . '/js/home.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('header', get_template_directory_uri() . '/js/header.js', array('popup', 'sticky', 'marquee'), $this->version, true);\n\t\t// wp_enqueue_script('single', get_template_directory_uri() . '/js/single.js', array('grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('bios', get_template_directory_uri() . '/js/bios.js', array('popup'), $this->version, true);\n\t\t// wp_enqueue_script('agenda', get_template_directory_uri() . '/js/agenda.js', array('popup', 'ajax', 'build', 'calendar', 'grid-slideshow'), $this->version, true);\n\t\t// wp_enqueue_script('intro', get_template_directory_uri() . '/js/intro.js', array('media-player'), $this->version, true);\n\n\t\twp_enqueue_script('cookies', get_template_directory_uri() . '/js/utils/cookies.js', array('media-player'), $this->version, false);\n\n\n\t}", "title": "" }, { "docid": "d3db73bc14d07c586b553192908fd65c", "score": "0.77292097", "text": "public function enqueue_scripts()\n\t{\n\t\t// wp_enqueue_style('nd_timeline_style', plugin_dir_url(__FILE__) . \"css/timeline.css\");\n\t\t// wp_enqueue_script('nd_tsli_script', plugin_dir_url(__FILE__) . \"assets/tsli.js\", array(), '1.0.0', true);\t\n\t}", "title": "" }, { "docid": "c8f1cf02c48fa958fb3d7c611882f236", "score": "0.77285707", "text": "public function admin_scripts() {\n wp_enqueue_media();\n\n wp_enqueue_style( 'wp-trix', WP_TRIX_ASSETS . '/css/wp-trix.css', [], $this->version );\n\n wp_enqueue_script( 'trix-editor', WP_TRIX_ASSETS . '/js/trix.js', [], '0.9.5', true );\n wp_enqueue_script( 'wp-trix', WP_TRIX_ASSETS . '/js/wp-trix.js', [ 'jquery', 'trix-editor' ], $this->version, true );\n }", "title": "" }, { "docid": "a0cbd38e6dbaed4b089c7689d251fc56", "score": "0.77251095", "text": "function styles_scripts ()\n\t{\n\t\twp_enqueue_style ( \"Main CSS\", get_template_directory_uri () . \"/assets/styles/main.css\", null, \"1.0.0\", null );\n\t\twp_enqueue_script ( \"Main JS\", get_template_directory_uri () . \"/assets/scripts/build.js\", array ( 'jquery' ), 1.0, true );\n\t}", "title": "" }, { "docid": "a006bdd714bae5ffc466d2bfc76a1e40", "score": "0.77238524", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Allergenizer_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Allergenizer_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/allergenizer-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "b700881e8f65999870fe8b74b24eeb2e", "score": "0.77197", "text": "public function actionEnqueueScripts() {\n\t\t\tglobal $post;\n\t\t\tif ( empty( $post ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tforeach ( $this->shortcode_name as $shortcode_name ) {\n\t\t\t\tif ( $this->connected ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t$metaValue = get_post_meta( $post->ID, self::$meta_key_shorcode_assets_for_posts, true );\n\n\t\t\t\tif ( ! isset( $metaValue[ $shortcode_name ] ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$result = $this->assets( $metaValue[ $shortcode_name ], false, true );\n\n\t\t\t\tif ( ! $result ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$this->scripts->connect();\n\t\t\t\t$this->styles->connect();\n\n\t\t\t\t$this->connected = true;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "953e5e7c1e8b21b336bd10fc08711b93", "score": "0.77167684", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Vwm_Utility_Plugin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Vwm_Utility_Plugin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/vwm-utility-plugin-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "755bbec69bd29f71f09430dada023821", "score": "0.7714537", "text": "public function enqueueAdminStyleAndScripts()\n {\n //media uploader\n wp_enqueue_media();\n\n wp_enqueue_script('gf-admin-js', get_stylesheet_directory_uri() . '/assets/js/admin.js', ['jquery']);\n wp_enqueue_style('gf-admin-style', get_stylesheet_directory_uri() . '/assets/css/admin.css');\n }", "title": "" }, { "docid": "85796d13ba6f701cc91e0a2276b840ac", "score": "0.7706776", "text": "function ni_script_enqueuer() {\n\n // create array of all scripts for HTML head\n $head_scripts = \"\";\n\n // create array of all scripts for HTML footer\n $foot_scripts=array(\n 'app'=>'/dist/assets/js/app.js'\n );\n\n if ( $head_scripts ) {\n foreach($head_scripts as $key=>$sc)\n {\n wp_register_script( $key, get_template_directory_uri() . $sc, array('jquery'), '1.0', false );\n wp_enqueue_script( $key );\n }\n }\n\n if ( $foot_scripts ) {\n foreach($foot_scripts as $key=>$sc)\n {\n wp_register_script( $key, get_template_directory_uri() . $sc, array('jquery'), '1.0', true );\n wp_enqueue_script( $key );\n }\n }\n\n wp_register_style( 'screen', get_template_directory_uri().'/style.css', '', '', 'screen' );\n wp_register_style( 'app', get_template_directory_uri().'/dist/assets/css/app.css?v='.time(), '', '', 'screen');\n\n wp_enqueue_style( 'screen' );\n wp_enqueue_style( 'app' );\n}", "title": "" }, { "docid": "49d45f82de2d7567f8da11430ff2de77", "score": "0.76868814", "text": "public function enqueue_scripts() {\r\n\r\n\t\t/**\r\n\t\t * This function is provided for demonstration purposes only.\r\n\t\t *\r\n\t\t * An instance of this class should be passed to the run() function\r\n\t\t * defined in D2T_Loader as all of the hooks are defined\r\n\t\t * in that particular class.\r\n\t\t *\r\n\t\t * The D2T_Loader will then create the relationship\r\n\t\t * between the defined hooks and the functions defined in this\r\n\t\t * class.\r\n\t\t */\r\n\r\n\t\twp_enqueue_script( $this->d2t, plugin_dir_url( __FILE__ ) . 'js/d2t-admin.js', array( 'jquery' ), $this->version, false );\r\n\t\twp_enqueue_script( $this->d2t + '-ajax-requests', plugin_dir_url( __FILE__ ) . 'js/ajax-requests.js',\r\n\t\t\tarray( 'jquery' ), $this->version, false\r\n\t\t);\r\n\t\t// Bootstrap\r\n\t\twp_register_script( 'prefix_tether', plugin_dir_url( __FILE__ ) . 'js/tether.min.js' );\r\n\t\twp_enqueue_script( 'prefix_tether' );\r\n\t\twp_register_script( 'prefix_bootstrap', plugin_dir_url( __FILE__ ) . 'js/bootstrap.min.js' );\r\n\t\twp_enqueue_script( 'prefix_bootstrap' );\r\n\t}", "title": "" }, { "docid": "81bb130ecef037cb3ebf2e41c0fe0a5e", "score": "0.76821256", "text": "function lpwd_add_styles_and_scripts() {\n wp_enqueue_style( 'main', get_template_directory_uri() .'/src/css/main.css' ); \n wp_enqueue_script( 'perso', get_template_directory_uri() . '/dist/js/perso.js', array('jquery'), '2.0', true);\n wp_enqueue_script( 'navigation', get_template_directory_uri() . '/dist/js/main-csss-animation.js', array(), '2.0', true);\n\n wp_enqueue_script( 'nav', get_template_directory_uri() . '/dist/js/main-menu.js', array(), '2.0', true);\n wp_enqueue_script( 'menu-deroulant', get_template_directory_uri() . '/dist/js/menu-deroulant.js', array(), '2.0', true);\n wp_enqueue_script( 'scrollmagicLib', get_template_directory_uri() . '/dist/js/libraries/ScrollMagic.min.js', array(), '2.0', true);\n wp_enqueue_script( 'scrollmagic', get_template_directory_uri() . '/dist/js/scrollmagic.js', array(), '2.0', true);\n wp_enqueue_script( 'progressBar', get_template_directory_uri() . '/dist/js/loadingbar.js', array(), '2.0', true);\n\n }", "title": "" }, { "docid": "f4f79f0feba9f6259618b1fc9ff917ef", "score": "0.768169", "text": "protected function enqueueScript()\n {\n wp_enqueue_script( 'tags-suggest' );\n wp_enqueue_script( 'media' );\n $this->table->printJs();\n\n require_once dirname( __DIR__ ) . '/assets/script.php';\n }", "title": "" }, { "docid": "b710f438f86ff182978575a05b3071f8", "score": "0.768002", "text": "public function public_scripts() {\n wp_enqueue_style( 'bthis-css', BT_ASSETS_URI . '/bthis-public.css', array(), $this->version );\n\n wp_enqueue_script( 'bthis-public-js', BT_ASSETS_URI . '/bthis-public.js', array(), $this->version );\n wp_localize_script( 'bthis-public-js', 'bthis',\n array( 'ajax_url' => admin_url( 'admin-ajax.php' ) ) );\n }", "title": "" }, { "docid": "9b07213d14d16eff963f42888b687c6b", "score": "0.7678323", "text": "private function enqueueAssets()\n {\n add_action('admin_enqueue_scripts', function ($hook) {\n wp_enqueue_media();\n\n if ( ! ($this->scripts() OR $this->styles())) {\n return;\n }\n\n $thisPageHookSuffix = '_page_' . $this->menuSlug();\n if (preg_match(\"/{$thisPageHookSuffix}$/\", $hook)) {\n $prefix = $this->menuSlug() . '__' . static::class . '__';\n\n if ($this->scripts()) {\n foreach ((array)$this->scripts() as $script) {\n static::enqueueAsset($script, 'script', $prefix);\n }\n }\n if ($this->styles()) {\n foreach ((array)$this->styles() as $style) {\n static::enqueueAsset($style, 'style', $prefix);\n }\n }\n }\n });\n }", "title": "" }, { "docid": "08e90912000acb3093145eb9bfede83c", "score": "0.7660892", "text": "public function scripts_styles(){\n\t\twp_enqueue_style( 'style-events', get_template_directory_uri().'/functions/events.css' );\n\t\twp_enqueue_script( 'jquery-tools', get_template_directory_uri().'/js/jquery.tools.min.js', array(), '1.0', true );\n\t\twp_enqueue_script( 'script-events', get_template_directory_uri().'/functions/events.js', array('jquery'), '1.0.0', true );\n\t\twp_localize_script( 'script-events', 'AEH',\n\t\t\tarray(\n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' )\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "9a1933bfc785be2c443cb17033f58e15", "score": "0.7657771", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Snap_Affiliate_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Snap_Affiliate_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/snap-affiliate-admin.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "8993594f41c071c0b3d2d1412ef28ed7", "score": "0.76554006", "text": "function brick_scripts() {\n\t// CSS Minifier\n\twp_enqueue_style( 'style', get_template_directory_uri() .'/inc/style.php', array(), null );\n\t// Theme Base Scripts\n\twp_enqueue_script( 'base-scripts', get_template_directory_uri() . '/js/main.js', array(), '', true );\n}", "title": "" }, { "docid": "e93d65921dc99a91cd536017f67865ab", "score": "0.76546574", "text": "public function enqueue_assets(){\n\n\t\twp_enqueue_style( 'jmfe-styles' );\n\t\twp_enqueue_style( 'jmfe-vendor-styles' );\n\t\twp_enqueue_script( 'jmfe-vendor-scripts' );\n\t\twp_enqueue_script( 'jmfe-scripts' );\n\n\t}", "title": "" }, { "docid": "ab7592437f0cc0e7a30889fec7750ff4", "score": "0.7653505", "text": "function bootstrapBasicEnqueueScripts()\n\t{\n\t\twp_enqueue_style('bootstrap-style', get_template_directory_uri() . '/css/bootstrap.min.css');\n\t\twp_enqueue_style('bootstrap-theme-style', get_template_directory_uri() . '/css/bootstrap-theme.min.css');\n\t\twp_enqueue_style('fontawesome-style', get_template_directory_uri() . '/css/font-awesome.min.css');\n\t\twp_enqueue_style('main-style', get_template_directory_uri() . '/css/main.css');\n\n\t\twp_enqueue_script('modernizr-script', get_template_directory_uri() . '/js/vendor/modernizr.min.js');\n\t\twp_enqueue_script('respond-script', get_template_directory_uri() . '/js/vendor/respond.min.js');\n\t\twp_enqueue_script('html5-shiv-script', get_template_directory_uri() . '/js/vendor/html5shiv.js');\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('bootstrap-script', get_template_directory_uri() . '/js/vendor/bootstrap.min.js');\n\t\twp_enqueue_script('main-script', get_template_directory_uri() . '/js/main.js');\n\t\twp_enqueue_style('bootstrap-basic-style', get_stylesheet_uri());\n\t}", "title": "" }, { "docid": "93420bf69ab4bff0a491023694b7f1b8", "score": "0.7652832", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Dendra_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Dendra_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\t// wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/dendra-public.js', array( 'jquery' ), $this->version, false );\n\n\t\tif ( $this->client_js ) {\n\t\t\twp_register_script( $this->plugin_name . '-client', $this->client_js, array( ), $this->version, true );\n\t\t} else {\n\t\t\twp_register_script( $this->plugin_name . '-vue', 'https://unpkg.com/vue', array( ), $this->version, true );\n\t\t\twp_register_script( $this->plugin_name . '-client', plugin_dir_url( __FILE__ ) . 'js/dendraClient.umd.min.js', array( ), $this->version, true );\n\t\t}\n\n\t}", "title": "" }, { "docid": "ebf968ec20519a7997e8bd2110a86012", "score": "0.7651276", "text": "public static function scripts_and_styles() {\n\t\tif ( is_singular() ) {\n\t\t\tif ( '0' != get_comments_number() || \\DevHub\\post_type_has_source_code() || get_query_var( 'is_handbook' ) ) {\n\t\t\t\twp_enqueue_script( 'wporg-developer-function-reference', get_template_directory_uri() . '/js/function-reference.js', array( 'jquery', 'syntaxhighlighter-core', 'syntaxhighlighter-brush-php' ), '20150319', true );\n\t\t\t\twp_enqueue_style( 'syntaxhighlighter-core' );\n\t\t\t\twp_enqueue_style( 'syntaxhighlighter-theme-default' );\n\t\t\t}\n\n\t\t\twp_enqueue_script( 'wporg-developer-user-notes', get_template_directory_uri() . '/js/user-notes.js', array( 'quicktags' ), '20150618', true );\n\t\t\tif ( get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d184fcf694ed285e6d907edd99cd72f8", "score": "0.7647146", "text": "public function admin_enqueue_scripts()\n\t{\n\t\t$this->check_dependencies();\n\n\t\tif ( $this->missing_dependencies )\n\t\t{\n\t\t\treturn;\n\t\t}//end if\n\n\t\t// make sure go-ui has been instantiated and its resources registered\n\t\tgo_ui();\n\t}", "title": "" }, { "docid": "3a59c27aeeee67693b0c11d96e2d8b48", "score": "0.7646818", "text": "function scripts() {\n\t\t// wp-embed is not needed.\n\t\twp_deregister_script( 'wp-embed' );\n\n\t\t// remove jetpack devicepx.\n\t\twp_dequeue_script( 'devicepx' );\n\n\t\t// remove photon js\n\t\twp_dequeue_script( 'jetpack-photon' );\n\n\t\t// remove block library css\n\t\twp_dequeue_style( 'wp-block-library' );\n\n\t\tif ( defined( 'WP_ENV' ) && 'production' === WP_ENV || 'staging' === WP_ENV ) {\n\t\t\twp_enqueue_style( 'sockman-style', get_template_directory_uri() . '/assets/dist/css/' . $this->get_css_filename( 'style.css' ), '', null );\n\t\t} else {\n\t\t\twp_enqueue_style( 'sockman-style', get_template_directory_uri() . '/assets/dist/css/' . $this->get_css_filename( 'style-dev.css' ), '', null );\n\t\t}\n\n\t\twp_enqueue_script( 'sockman-script', get_template_directory_uri() . '/assets/dist/js/' . $this->get_js_filename( 'site.js' ), '', null, true );\n\n\t\tif ( defined( 'WP_ENV' ) && 'development' === WP_ENV ) {\n\t\t\t// wp_enqueue_script( 'livereload-server', get_home_url() . '/livereload.js?snipver=1&port=80', '', null, true );\n\t\t\twp_enqueue_script( 'livereload-server', 'http://127.0.0.1:35729/livereload.js', '', null, true );\n\t\t}\n\t}", "title": "" }, { "docid": "21be76c732c9fe456adf503b2272b39e", "score": "0.76438814", "text": "public function enqueueStylesAndScripts()\n {\n $this->registerStylesAndScripts();\n $this->wordpress->enqueueStyle(self::HANDLE_STYLE_LOGIN_FORM);\n }", "title": "" }, { "docid": "4476814f080bc19d43abcc025dd9db4c", "score": "0.76395345", "text": "function load_scripts(){\n // wp_enqueue_style( 'bootstrap', get_stylesheet_directory_uri() . '/css/bootstrap.min.css', array(). 'all');\n // wp_enqueue_style( 'current', get_stylesheet_directory_uri());\n // wp_enqueue_style( 'main', get_stylesheet_directory_uri() . '/css/main.css', array(). 'all');\n wp_enqueue_style('style', get_template_directory_uri() . '/dist/app.css', [], 1, 'all');\n\n \n wp_enqueue_script('main', get_template_directory_uri().'/js/bootstrap.min.js','',false,true);\n wp_enqueue_script('app', get_template_directory_uri().'/dist/app.js',[],1,true);\n\n wp_enqueue_script('jquery');\n}", "title": "" }, { "docid": "7688101ba3aa746d69b536da96931c94", "score": "0.76393265", "text": "function lpwd_add_styles_and_scripts() {\n wp_enqueue_style( 'main', get_template_directory_uri() .'/dist/css/main.css' ); \n wp_enqueue_style( 'load-fa', 'https://use.fontawesome.com/releases/v5.5.0/css/all.css' );\n wp_enqueue_script( 'perso', get_template_directory_uri() . '/dist/js/perso.js', array('jquery'), '2.0', true);\n wp_enqueue_script( 'navigation', get_template_directory_uri() . '/dist/js/main-csss-animation.js', array(), '2.0', true);\n wp_enqueue_script( 'Menu', get_template_directory_uri() . '/dist/js/menuBurger.js', array(), '2.0', true);\n \n }", "title": "" }, { "docid": "265e846c5aecdbe744be38020cd78cb0", "score": "0.763608", "text": "public function enqueue_scripts()\n {\n $this->enqueue_styles();\n wp_enqueue_script('jquery-plugin', plugins_url('assets/js/jquery.plugin.min.js', __FILE__), array('jquery'), self::VERSION);\n wp_enqueue_script('jquery-countdown', plugins_url('assets/js/jquery.countdown.min.js', __FILE__), array('jquery', 'jquery-plugin'), self::VERSION);\n wp_enqueue_script($this->plugin_slug . '-plugin-script', plugins_url('assets/js/public.js', __FILE__), array('jquery', 'jquery-countdown'), self::VERSION);\n }", "title": "" }, { "docid": "728be006080474ebbe910e7afcb0762e", "score": "0.7634053", "text": "public function enqueue_assets()\n {\n if (!wp_script_is('lspmb_main', 'registered')) {\n $this->register_assets();\n }\n wp_enqueue_media();\n wp_enqueue_script('media-upload');\n wp_enqueue_script('lspmb_main');\n wp_enqueue_style('lspmb_main');\n if ($this->filenames) {\n foreach ($this->filenames as $key => $file) {\n if (preg_match('/\\.js$/', $file)) {\n wp_enqueue_script($this->id.$file);\n }\n if (preg_match('/\\.css$/', $file)) {\n wp_enqueue_style($this->id.$file);\n }\n }\n }\n }", "title": "" }, { "docid": "7b49d69015b5f7b47e5ea611d3973939", "score": "0.76306975", "text": "public function enqueue_scripts() {\n /**\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in Plugin_Name_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The Plugin_Name_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n $enqueue_script_deps = apply_filters( 'clearfy_enqueue_script_deps', array( 'jquery', 'wp-color-picker' ) );\n wp_enqueue_script( $this->plugin_options->plugin_name, plugin_dir_url(__FILE__) . 'js/clearfy-admin.js', $enqueue_script_deps, $this->plugin_options->version, false );\n }", "title": "" }, { "docid": "c2807393f9b63198aaaf8d0061620de0", "score": "0.76235205", "text": "public function addScriptsAndStyles()\n {\n $assets = $this->getURL() . 'assets' . DS;\n // ==============================================================\n // Scripts\n // ==============================================================\n wp_enqueue_script('jquery');\n wp_enqueue_script(\n 'lolita-widget-subscribe-form',\n $assets . 'js' . DS . 'lolita_widget_subscribe_form.js',\n array('jquery'),\n false,\n true\n );\n\n // ==============================================================\n // Localize\n // ==============================================================\n wp_localize_script(\n 'lolita-widget-subscribe-form',\n 'lolita_widget_subscribe_form',\n array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'security' => LF_NONCE,\n )\n );\n }", "title": "" }, { "docid": "ad5a557bd20fee2e9099b46f7ac1ba74", "score": "0.76218957", "text": "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_vendors, plugin_dir_url(__FILE__) . 'js/andmoraho-vendors-public.js', array( 'jquery' ), $this->version, false);\n }", "title": "" }, { "docid": "f5bf8dd2790a899ef4adeead4f1b638d", "score": "0.7619162", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Flo_Instagram_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Flo_Instagram_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\t\t// disable cache in dev environment\n\t\t\tif(defined('FLO_ENVIROMENT') && FLO_ENVIROMENT === 'DEV') {\n\t\t\t\t$ver = mt_rand(0,99999);\n\t\t\t} else {\n\t\t\t\t$ver = $this->version;\n\t\t\t}\n\t\t\t\n\t\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/all.min.js', array( 'jquery' ), $ver, false );\n\t\t\twp_localize_script( $this->plugin_name, 'floAjaxUrl', admin_url( 'admin-ajax.php' ) );\n\n\t}", "title": "" }, { "docid": "d1f70846f11486e7720eb158f2ae9add", "score": "0.76182127", "text": "function enqueue() {\n\t\tif ( ! current_user_can( 'manage_options' ) || ! is_admin_bar_showing() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->livepress_config->script_debug()) {\n\t\t\twp_enqueue_script( 'livepress-toolbar', LP_PLUGIN_URL . 'js/livepress-admin-bar.full.js', array( 'jquery' ) );\n\t\t} else {\n\t\t\twp_enqueue_script( 'livepress-toolbar', LP_PLUGIN_URL . 'js/livepress-admin-bar.min.js', array( 'jquery' ) );\n\t\t}\n\n\t\twp_enqueue_style( 'livepress_main_sheets', LP_PLUGIN_URL . 'css/livepress.css' );\n\t\t\t\t\twp_enqueue_style('wp-jquery-ui-dialog');\n\n\t}", "title": "" }, { "docid": "74c5b4128033c2e28bcd72be8711affe", "score": "0.76133174", "text": "public function enqueue_scripts() {\n\t\tglobal $post;\n\n\t\twp_register_style( 'official-wordpress-events', plugins_url( 'official-wordpress-events.css', __FILE__ ), array(), 1 );\n\n\t\tif ( is_a( $post, 'WP_Post' ) && has_shortcode( $post->post_content, 'official_wordpress_events' ) ) {\n\t\t\twp_enqueue_style( 'official-wordpress-events' );\n\t\t}\n\t}", "title": "" }, { "docid": "ea904e49f81cec00b61ed860889b3bd0", "score": "0.76075965", "text": "function admin_enqueue_scripts() {\n\t\t\n\t\t// validate screen\n\t\tif( pdc_is_screen('widgets') || pdc_is_screen('customize') ) {\n\t\t\n\t\t\t// valid\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\treturn;\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t// load pdc scripts\n\t\tpdc_enqueue_scripts();\n\t\t\n\t\t\n\t\t// actions\n\t\tadd_action('pdc/input/admin_footer', array($this, 'admin_footer'), 1);\n\n\t}", "title": "" }, { "docid": "0ce2e485a11ad2d30913748b6692a893", "score": "0.7607102", "text": "function understrap_scripts() {\n\t\t// Get the theme data.\n\t\t$the_theme = wp_get_theme();\n\t\t$theme_version = $the_theme->get( 'Version' );\n\n\t\t$css_version = $theme_version . '.' . filemtime( get_template_directory() . '/css/theme.min.css' );\n\t\twp_enqueue_style( 'understrap-styles', get_template_directory_uri() . '/css/theme.min.css', array(), $css_version );\n wp_enqueue_style('canned-styles', 'https://fonts.googleapis.com/css?family=Baloo+Bhai|Stylish' . '/css/theme.min.css');\n\n\t\twp_enqueue_script( 'jquery' );\n\n\t\t$js_version = $theme_version . '.' . filemtime( get_template_directory() . '/js/theme.min.js' );\n\t\twp_enqueue_script( 'understrap-scripts', get_template_directory_uri() . '/js/theme.min.js', array(), $js_version, true );\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t}", "title": "" }, { "docid": "3fd48ed00cadbab48e73e1261c0d63ba", "score": "0.76059467", "text": "function addScriptsAndStyles() {\n wp_register_script('navionicsJS', 'http://webapiv2.navionics.com/dist/webapi/webapi.min.no-dep.js', array(), false, false);\n wp_register_style('navionicsCSS', 'http://webapiv2.navionics.com/dist/webapi/webapi.min.css', array(), false, 'all');\n wp_enqueue_script('navionicsJS');\n wp_enqueue_style('navionicsCSS');\n }", "title": "" }, { "docid": "40484cac4d0e2b935ecf38f71e04aa93", "score": "0.7593274", "text": "function scripts() {\n\n\t\tif ( ! class_exists( 'Customify_Font_Icons' ) ) {\n\t\t\trequire_once get_template_directory() . '/inc/customizer/class-customizer-icons.php';\n\t\t}\n\t\tCustomify_Font_Icons::get_instance()->enqueue();\n\n\t\t$suffix = $this->get_asset_suffix();\n\n\t\tdo_action( 'customify/load-scripts' );\n\n\t\t$css_files = apply_filters(\n\t\t\t'customify/theme/css',\n\t\t\tarray(\n\t\t\t\t'google-font' => Customify_Customizer_Auto_CSS::get_instance()->get_font_url(),\n\t\t\t\t'style' => $this->get_style_uri(),\n\t\t\t)\n\t\t);\n\n\t\t$js_files = apply_filters(\n\t\t\t'customify/theme/js',\n\t\t\tarray(\n\t\t\t\t'customify-themejs' => array(\n\t\t\t\t\t'url' => esc_url( get_template_directory_uri() ) . '/assets/js/theme' . $suffix . '.js',\n\t\t\t\t\t'ver' => self::$version,\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\tforeach ( $css_files as $id => $url ) {\n\t\t\t$deps = array();\n\t\t\tif ( is_array( $url ) ) {\n\t\t\t\t$arg = wp_parse_args(\n\t\t\t\t\t$url,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'deps' => array(),\n\t\t\t\t\t\t'url' => '',\n\t\t\t\t\t\t'ver' => self::$version,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\twp_enqueue_style( 'customify-' . $id, $arg['url'], $arg['deps'], $arg['ver'] );\n\t\t\t} elseif ( $url ) {\n\t\t\t\twp_enqueue_style( 'customify-' . $id, $url, $deps, self::$version );\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $js_files as $id => $arg ) {\n\t\t\t$deps = array();\n\t\t\t$ver = '';\n\t\t\tif ( is_array( $arg ) ) {\n\t\t\t\t$arg = wp_parse_args(\n\t\t\t\t\t$arg,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'deps' => '',\n\t\t\t\t\t\t'url' => '',\n\t\t\t\t\t\t'ver' => '',\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$deps = $arg['deps'];\n\t\t\t\t$url = $arg['url'];\n\t\t\t\t$ver = $arg['ver'];\n\t\t\t} else {\n\t\t\t\t$url = $arg;\n\t\t\t}\n\n\t\t\tif ( ! $ver ) {\n\t\t\t\t$ver = self::$version;\n\t\t\t}\n\n\t\t\twp_enqueue_script( $id, $url, $deps, $ver, true );\n\t\t}\n\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\n\t\twp_add_inline_style( 'customify-style', Customify_Customizer_Auto_CSS::get_instance()->auto_css() );\n\t\twp_localize_script(\n\t\t\t'customify-themejs',\n\t\t\t'Customify_JS',\n\t\t\tapply_filters( // phpcs:ignore\n\t\t\t\t'Customify_JS',\n\t\t\t\tarray(\n\t\t\t\t\t'css_media_queries' => Customify_Customizer_Auto_CSS::get_instance()->media_queries,\n\t\t\t\t\t'sidebar_menu_no_duplicator' => Customify()->get_setting( 'header_sidebar_menu_no_duplicator' ),\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tdo_action( 'customify/theme/scripts' );\n\t}", "title": "" }, { "docid": "1cf5ba3dc29409690e8f78459bbe5e44", "score": "0.7589878", "text": "public function enqueue_scripts() {\n\t\twp_enqueue_style( 'hb-burger-menu', HB_ASSETS_URI . 'css/hb-burger-menu.css', array(), '5.9.3' );\n\t\twp_enqueue_script( 'hb-burger-menu', HB_ASSETS_URI . 'js/hb-burger-menu.js', array( 'jquery' ), '5.9.3', true );\n\t}", "title": "" }, { "docid": "3071c2fcc6a589e11e7f5ce3e8e4bef4", "score": "0.75852597", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in LFEvents_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The LFEvents_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->lfevents, plugin_dir_url( __FILE__ ) . 'js/lfevents-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "247f8eb436fac827a2361adff63d1e1e", "score": "0.75827414", "text": "function enqueue_scripts() {\n\n\t\twp_register_script(\n\t\t\t'single-use-widget',\n\t\t\tplugins_url( 'single-use-widget.js', __FILE__ ),\n\t\t\tarray( 'jquery' ),\n\t\t\tfilemtime( __FILE__ ),\n\t\t\ttrue\n\t\t);\n\n\t\twp_localize_script(\n\t\t\t'single-use-widget',\n\t\t\t'singleUseWidget',\n\t\t\tarray( 'idBase' => $this->id_base )\n\t\t);\n\t\twp_enqueue_script( 'single-use-widget' );\n\n\t}", "title": "" }, { "docid": "cea062bb1588987a0e23af85c1aa5c5d", "score": "0.75786763", "text": "function educrm_theme_scripts() {\n\n\t\twp_enqueue_style( 'educrm-style', get_stylesheet_uri() );\n\n\t\twp_enqueue_style( 'educrm-bootstrap-css', get_theme_file_uri( '/assets/css/bootstrap.css' ) );\n\n\t\twp_enqueue_style( 'google-fonts', 'http://fonts.googleapis.com/css?family=Roboto:400,300,700|Open+Sans:700' );\n\n\t\twp_enqueue_script( 'educrm-bootstrap-script', get_theme_file_uri( '/assets/js/bootstrap.min.js' ), array( 'jquery' ), '', true );\n\n\t\twp_enqueue_script( 'educrm-my-script', get_theme_file_uri( '/assets/js/my-scripts.js' ), array( 'jquery' ), '', true );\n\n\t\twp_enqueue_script( 'educrm-acf-custom', get_theme_file_uri( '/assets/js/acf-customs.js' ), array( 'jquery' ), '', true );\n\n\t}", "title": "" }, { "docid": "c73aa884cc6abe327b630b32968229a1", "score": "0.75767475", "text": "public function enqueue_scripts_styles() {\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ) );\n\t\t\tadd_action( 'wp_enqueue_scripts', array( $this, 'wp_enqueue_styles' ) );\n\t\t}", "title": "" }, { "docid": "4dbf37327091e4fe22cdfb4af26a5893", "score": "0.75753284", "text": "private function enqueue() {\n\n\t\tadd_action( 'elementor/frontend/after_enqueue_scripts', function() {\n\n\t\t\twp_enqueue_style( 'thesaas-elementor-style', get_theme_file_uri( '/include/elementor/assets/css/style.css' ), array( 'elementor-editor' ) );\n\n\t\t\tif ( 'yes' !== get_option( 'elementor_expert_user', '' ) ) {\n\t\t\t\twp_enqueue_style( 'thesaas-elementor-limit', get_theme_file_uri( '/include/elementor/assets/css/limit.css' ), array( 'elementor-editor' ) );\n\t\t\t}\n\n\t\t} );\n\n\t}", "title": "" }, { "docid": "e1bfab976c02604af01936563acad7ba", "score": "0.75682634", "text": "public function scripts() {\n\t\tglobal $typenow, $pagenow;\n\t\t\n\t\tif ( ( $pagenow == 'edit.php' || $pagenow == 'post.php' ) && $typenow == 'sl_item' ) {\n\t\t\twp_register_style( 'simple-logging-css', plugins_url( '/css/simple-logging.css', __FILE__ ) );\n\t\t\twp_enqueue_style( 'simple-logging-css' );\n\t\t}\n\n\t}", "title": "" }, { "docid": "dd7eeda2bb7351cfdc5c57d91a12380e", "score": "0.7566004", "text": "public function dequeue_scripts() {\n\t\twp_dequeue_style( 'spine-theme-extra' );\n\t}", "title": "" }, { "docid": "2402d3b85a471648809292d376f04cbf", "score": "0.756578", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Woo_Partner_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Woo_Partner_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->woo_Partner, plugin_dir_url( __FILE__ ) . 'js/woo-Partner-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "03be1e134559eceb5707f548d35ce804", "score": "0.7565432", "text": "public function actionEnqueueScripts()\n {\n // We first have to pull all the scripts that don't have a blocker. Blockers can be added to script or\n // style through the settings for each. It must be a callable\n //\n $this->scripts = $this->scripts->filter(function(Asset $item) {\n return $item->isBlocked() !== false;\n });\n\n // All scripts must be registered first to allow the ability to localize them using the WP api\n //\n $this->scripts->map(function(Asset $item) {\n wp_register_script(\n $item->handle,\n $item->source(),\n $item->dependencies,\n $item->version(),\n $item->footer\n );\n });\n\n // Now we go through each localized object and add it to the queue\n //\n $this->localized->map(function($object) {\n if(is_callable($object['object'])) {\n $object['object'] = call_user_func_array($object['object'], []);\n }\n\n wp_localize_script(\n $object['handle'],\n $object['name'],\n $object['object']\n );\n });\n\n // Now we enqueue the script\n //\n $this->scripts->map(function(Asset $item) {\n wp_enqueue_script($item->handle);\n\n if($item->conditional) {\n wp_script_add_data($item->handle, 'conditional', $item->conditional);\n }\n });\n\n // The same as scripts, we pull styles that aren't blocked. Each blocker, just like scripts, can\n // be added to the style settings when registered\n //\n $this->styles = $this->styles->filter(function(Asset $item) {\n return !$item->isBlocked();\n });\n\n // Styles don't use localized items, so we just enqueue them\n //\n $this->styles->map(function(Asset $item) {\n wp_register_style(\n $item->handle,\n $item->source(),\n $item->dependencies,\n $item->version(),\n $item->screen\n );\n wp_enqueue_style($item->handle);\n });\n }", "title": "" }, { "docid": "af85b77ce893643450fba865a1535c17", "score": "0.7564855", "text": "public function enqueue_scripts()\n {\n wp_enqueue_style('prices-style', plugins_url('css/style.css', __FILE__));\n wp_enqueue_script('prices-script', plugins_url('js/script.js', __FILE__));\n wp_enqueue_script('jQuery');\n }", "title": "" }, { "docid": "829f9110bfcbc4eec197a88948fd80da", "score": "0.7564041", "text": "public function scripts()\n {\n // Get plugin version, to use for script loading\n $plugin = get_plugin_data(Pwyw::FILE, false, false);\n $version = $plugin['Version'];\n\n wp_enqueue_style('dashboard');\n wp_enqueue_script('dashboard');\n wp_enqueue_script(\n 'PWYW_admin4',\n plugins_url('/js/jquery.linkedsliders.js', Pwyw::FILE),\n array('jquery-ui-slider'),\n $version\n );\n wp_enqueue_script(\n 'popover',\n plugins_url('/js/jquery.popover-1.1.2.js', Pwyw::FILE),\n array(),\n $version\n );\n\n wp_enqueue_style(\n 'PWYW_admin',\n plugins_url('/assets/stylesheets/admin.css', Pwyw::FILE),\n array(),\n $version\n );\n\n // Unregister WordPress postbox script, and register our own if we\n // are on the plugin admin.\n $screen = get_current_screen();\n if ($screen->id == 'toplevel_page_PWYW-settings') {\n wp_deregister_script('postbox');\n wp_enqueue_script(\n 'pwyw-postbox',\n plugins_url('/assets/javascripts/pwyw-postbox.js', Pwyw::FILE),\n array('jquery-ui-sortable', 'underscore'),\n $version\n );\n }\n }", "title": "" }, { "docid": "38c6a81804ead27d33b550870e456859", "score": "0.75610137", "text": "public function adminScriptsAndStyles()\n { \n \twp_enqueue_style('taxonomy', $this->getFolderURL().'/css/taxonomy.css');\n }", "title": "" }, { "docid": "bb988b4962c49bb38d690135557f8104", "score": "0.7558422", "text": "function enqueue() {\n\t\t;\n\n\t\t//currently there is only an admin scripts folder\n\t\tif (get_current_screen() && get_current_screen()->post_type == \\Unity3_Slides::ID ) {\n\t\t\twp_enqueue_script( 'unity3_slide_smartslider-admin-script',SmartSlider::$url . \"scripts/admin/unity3-smart-slider.js\", array('jquery', 'acf-input'), Unity3::ver, false);\n\t\t\twp_enqueue_style( 'unity3_slide_smartslider-admin-style', SmartSlider::$url . \"/styles/admin/unity3-smart-slider.css\", false, Unity3::ver);\n\t\t}\n\n//\t\twp_enqueue_style( 'unity3-style', Unity3::$assets_url . \"/styles/{$folder}/unity3-{$folder}{$this->min}css\", false, Unity3::ver);\n\t}", "title": "" }, { "docid": "8c98b455eaf820a320cc40e1bd64011b", "score": "0.7557158", "text": "function manifest_scripts() {\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\twp_enqueue_style( 'fonts', get_template_directory_uri() . '/css/font-awesome.min.css' );\n\n\twp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );\n\twp_enqueue_script( 'masonary', get_template_directory_uri() . '/js/masonry.pkgd.min.js', array( 'jquery' ), '3.1.2', true );\n\twp_enqueue_script( 'html5', get_template_directory_uri() . '/js/html5.js', array(), '3.6', true );\n\twp_enqueue_script( 'manifest', get_template_directory_uri() . '/js/manifest.js', array( 'jquery' ), '1', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\tif ( is_singular() && wp_attachment_is_image() ) {\n\t\twp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n\t}\n}", "title": "" }, { "docid": "1c2909e2c2907d31ec44dd3bf7aea16d", "score": "0.75502914", "text": "public function enqueue_scripts()\n {\n wp_enqueue_script($this->andmoraho_tutorials, plugin_dir_url(__FILE__) . 'js/andmoraho-tutorials-public.js', array( 'jquery' ), $this->version, false);\n }", "title": "" }, { "docid": "7cef0486e8c7a2ea4905dd68ceafb827", "score": "0.75500053", "text": "function enqueue() {\n\t\twp_enqueue_style( 'imn-admin-style', IMN_PLUGIN_URL . 'assets/css/style.css' );\n\t\twp_register_script ( 'imn-admin-script', IMN_PLUGIN_URL . 'assets/js/script.js' );\n\t\twp_enqueue_script ( 'imn-admin-script' );\n\n\t}", "title": "" }, { "docid": "b101be5713dad1568f00759e7a8cc56d", "score": "0.75493056", "text": "public function adminEnqueueScripts() {\n\t\t\t// wp_enqueue_script( 'js', BESTBUG_RPPRO_URL . '/assets/admin/js/script.js', array( 'jquery' ), '1.0', true );\n\t\t}", "title": "" }, { "docid": "3104f9691540b83fd092cda6832af5b9", "score": "0.7545701", "text": "function freedom_script_enqueue() {\n //css\n wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.min.css',array(),'3.3.4','all');\n wp_enqueue_style('customstylecustomnameidthongtran',get_template_directory_uri() .'/css/freedom.css', array(),'1.0.0','all');\n \n //Js\n wp_enqueue_script('jquery');\n wp_enqueue_script('customjscustomnameidthongtran',get_template_directory_uri().'/js/freedom.js', array(),'1.0.1',true);\n wp_enqueue_script('bootstrapjs',get_template_directory_uri().'/js/bootstrap.min.js', array(),'3.3.4',true);\n\n }", "title": "" }, { "docid": "6af9e37bfa214e0a67876161a2f0e151", "score": "0.75452685", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Points_Of_Sale_Public_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Points_Of_Sale_Public_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name.'_selectric', plugin_dir_url( __FILE__ ) . 'js/jquery.selectric.min.js', array( 'jquery' ), $this->version, false );\n\t\twp_enqueue_script( $this->plugin_name.'_gmaps', 'https://maps.googleapis.com/maps/api/js?v=3.exp', array( 'jquery' ), $this->version, false );\n\t\twp_enqueue_script( $this->plugin_name.'_infobox', plugin_dir_url( __FILE__ ) . 'js/infobox.min.js', array( 'jquery' ), $this->version, false );\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/points-of-sale-public.js', array( $this->plugin_name.'_infobox' ), $this->version . date('dmYHis'), true );\n\n\t\twp_localize_script( $this->plugin_name, 'pos_data', $this->pos_localize_script() );\n\n\t}", "title": "" } ]
093eaf4a45683705a2231315728bafea
Display a listing of the aspectos ambientales.
[ { "docid": "8c2587741826c60772de433cc91452d6", "score": "0.65763056", "text": "public function index(Request $request)\n {\n\t\t$input=$request->all();\n\t\t$r=AspectosAmbientale::where('id', '<>', '0');\n\t\tif(isset($input['id']) and $input['id']<>null){\n\t\t\t$r->where('id', '=', $input['id']);\n\t\t}\n if(isset($input['proceso_id']) and $input['proceso_id']<>null){\n\t\t\t$r->where('proceso_id', '=', $input['proceso_id']);\n\t\t}\n if(isset($input['area_id']) and $input['area_id']<>null){\n\t\t\t$r->where('area_id', '=', $input['area_id']);\n\t\t}\n\t\tif(isset($input['actividad']) and $input['actividad']<>null){\n\t\t\t$r->where('actividad', 'like', '%'.$input['actividad'].'%');\n\t\t}\n $entity=Entity::find(Auth::user()->entity_id);\n if (Auth::user()->canDo('filtro_entity') or $entity->filtred_by_entity==1) {\n //dd('si puede');\n $r->where('entity_id', '=', Auth::user()->entity_id);\n }\n $aaProcesos = AaProceso::pluck('proceso','id')->all();\n $areas = Area::where('entity_id',Auth::user()->entity_id)->pluck('area','id')->all();\n\t\t$aspectosAmbientales = $r->with('aaproceso','area','aaaspecto','aaeme','aacondicione','aaimpacto','puesto','bnd','efecto','duracionaccion','probabilidad','imppotencial','impreal','entity','user')->paginate(25);\n\t\t//$aspectosAmbientales = AspectosAmbientale::with('aaproceso','area','aaaspecto','aaeme','aacondicione','aaimpacto','puesto','bnd','efecto','duracionaccion','probabilidad','imppotencial','impreal','entity','user')->paginate(25);\n\n return view('aspectos_ambientales.index', compact('aspectosAmbientales','aaProcesos','areas'));\n }", "title": "" } ]
[ { "docid": "edbc0f669785f8d02dcb2f47acfda11d", "score": "0.71612084", "text": "public function index()\n\t{\n //\n $aspects = Aspect::all();\n return View::make('module2.aspects.listAspects')->with('aspects',$aspects);\n\t}", "title": "" }, { "docid": "8e59c3fa48c0069a6fc7a770dc396c5d", "score": "0.65443325", "text": "public function listarAvistamientos(){\n\t\t$avistamientos = Avistamiento::all();\n\t\t\n\t\treturn view ('cpanel.listadoAvistamientos', [\n\t\t\t'avistamientos' => $avistamientos\n\t\t]);\n\t}", "title": "" }, { "docid": "0f7adcd6fee23336576af19419fce431", "score": "0.6373074", "text": "public function index()\n {\n $ambientes = Ambiente::paginate(8);\n\n return view('admin.ambiente.index', compact('ambientes'));\n }", "title": "" }, { "docid": "9f6eb94b83962f55c769f524dd56679f", "score": "0.6279767", "text": "public function index()\n {\n $absences = Absence::all();\n\n return view('admin.content.absence.index',compact('absences'));\n }", "title": "" }, { "docid": "30a3fb24e937a6bbdf101d774906ffc7", "score": "0.6208504", "text": "public function show($id)\n {\n $aspectosAmbientale = AspectosAmbientale::with('aaproceso','area','aaaspecto','aaeme','aacondicione','aaimpacto','puesto','bnd','efecto','duracionaccion','probabilidad','imppotencial','impreal','entity','user')->findOrFail($id);\n\n return view('aspectos_ambientales.show', compact('aspectosAmbientale'));\n }", "title": "" }, { "docid": "13f87afc6d09af563d4468f2b90544bd", "score": "0.61962324", "text": "public function index()\n {\n $attractions = Attraction::orderBy('name', 'asc')->paginate(15);\n\n return view('admin.attractions.index')->with([\n 'attractions' => $attractions,\n ]);\n }", "title": "" }, { "docid": "ff7f355dfcb321b0ce855245fc498991", "score": "0.61192554", "text": "public function index()\n {\n $data = Articale::orderBy('id','desc')->get();\n return view('dashboard.articales.index', compact('data'));\n }", "title": "" }, { "docid": "2203c5bb65dcad3984377a63f2a3cad4", "score": "0.61006224", "text": "public function avaliacao_list(){\n\t\t$this->load->model('avaliacao_model');\n\t\t$this->load->model('usuario_model');\n\n\n\t\t$data = array();\n\t\t$data['avaliacoes'] = $this->avaliacao_model->getAll();\n\t\t$data['usuarios'] = $this->usuario_model->getAll();\n\n\t\t$this->load->view('templates/panel_template/header');\n\t\t$this->load->view('painel/avaliacao_list', $data);\n\t\t$this->load->view('templates/panel_template/footer');\n\t}", "title": "" }, { "docid": "59edebf9e61af3b066db79698afbab29", "score": "0.6052303", "text": "public function index()\n {\n $aeronaves = Aeronave::All();\n $title = 'Lista de Aeronaves';\n\n return view('aeronaves.list-aeronaves', compact('title', 'aeronaves'));\n }", "title": "" }, { "docid": "2d258145b14d14790a3b77395bbcc722", "score": "0.6012078", "text": "public function index()\n {\n //\n $assistances = Assistance::orderBy('id', 'DESC')->paginate(10);\n return view('admin.assistances.index', compact('assistances'));\n }", "title": "" }, { "docid": "455be4769eb9eee0509a6ebb8951778f", "score": "0.6004055", "text": "public function index() \n\t{\n\t\tforeach ($this->animals as $animal) {\n\t\t\techo \"nama hewan: $animal[name] <br>\";\n\t\t}\n\t}", "title": "" }, { "docid": "01993907936fe0c17347dccd5c3bef33", "score": "0.5971854", "text": "public function index()\n {\n // $res=Artical::get();\n $acate=request()->acate??'';\n $atitle=request()->atitle??'';\n $where=[];\n if($acate){\n $where[]=[\"acate\",\"like\",\"%$acate%\"]; \n }\n if($atitle){\n $where[]=[\"atitle\",\"like\",\"%$atitle%\"]; \n }\n $pageSize=config('app.pageSize');\n $res=Artical::where($where)->orderby('aid','asc')->paginate($pageSize);\n return view('artical.index',['res'=>$res,'acate'=>$acate,'atitle'=>$atitle]);\n }", "title": "" }, { "docid": "eeedcd74f9ce392985ae4d850b7baafa", "score": "0.59688914", "text": "public function index()\n {\n $areas = Area::all();\n return view('mantenimientos.areaLista', compact('areas'));\n }", "title": "" }, { "docid": "f0cab511f1b3dcefde940d2c709e93e0", "score": "0.59681195", "text": "public function index()\n {\n $almacens = Almacen::OrderBy('almacens.id','DESC')\n ->get();\n\n return view('expediente.almacens.index', compact('almacens'));\n }", "title": "" }, { "docid": "2509900e39086769806310574b0d3306", "score": "0.59501225", "text": "public function index() {\n\n $avaliacoes = AvaliacaoDAO::all();\n require_once('views/avaliacao/index.php');\n\n }", "title": "" }, { "docid": "fd627724ee76cce101d08388e4667817", "score": "0.5947188", "text": "public function index()\n {\n $attraction = Attraction::all();\n\n return view('attractions')->with('attractions', $attraction);\n }", "title": "" }, { "docid": "2ef8fcb3ceb7236379079e4f9e338c61", "score": "0.5939979", "text": "function overview($experiment_id = null) {\n if ($experiment_id) {\n $experiments = $this->Abundancy->Experiment->find('list', array('conditions' => array('Experiment.id' => $experiment_id)));\n }\n else {\n $experiments = $this->Abundancy->Experiment->find('list');\n }\n $this->set(compact('experiments'));\n #$this->paginate = array('Annotation' => array(\n # 'contain' => false,\n # 'joins' => array(\n # array(\n # 'table' => 'abundancies',\n # 'alias' => 'Abundancy',\n # 'type' => 'inner',\n # 'conditions' => array(\n # 'Annotation.id = Abundancy.annotation_id'\n # )\n # )\n # ),\n # 'fields' => array(\n # 'Abundancy.normalized_abundance',\n # 'Annotation.id',\n # 'Abundancy.experiment_id'\n # ),\n # 'group' => array(\n # 'Annotation.id',\n # 'Abundancy.experiment_id'\n # )\n #));\n #$this->set('abundancies', $this->paginate_only($this->Abundancy->Annotation));\n $this->paginate = array('Abundancy' => array(\n 'group' => array(\n 'Abundancy.annotation_id',\n ),\n 'contain' => array('Annotation'),\n 'fields' => array(\n 'Annotation.accession_nr',\n 'Annotation.model_nr',\n 'Annotation.id'\n ),\n ));\n\n # add the extra fields so we get a exp on the x-axis and annotation on the y-axis\n foreach ($experiments as $id => $name) {\n $this->paginate['Abundancy']['fields'][] = \"(select normalized_abundance from abundancies where experiment_id = $id and annotation_id = Abundancy.annotation_id) as f_$id\";\n $this->Abundancy->additionalFields[] = \"f_$id\";\n # because we cannot use aliases in the order by clause of SQL, the above statement is also repeated in the abundancy model\n }\n $abundancies = $this->paginate_only($this->Abundancy);\n $this->set(compact('abundancies'));\n }", "title": "" }, { "docid": "914d652565eb9aab003e71b583a05489", "score": "0.5933201", "text": "public function index()\n {\n $afectats = Afectat::all();\n\n return AfectatResource::collection($afectats);\n }", "title": "" }, { "docid": "76649267ef9cda2e25acc13a053c622c", "score": "0.5932677", "text": "public function index() {\n\n $data['title'] = ucfirst('Espace athlète');\n \n //chargement des modèles\n $this->load->model('athlete_model');\n $this->load->model('event_model');\n $this->load->model('result_model');\n \n $data['athlete'] = $this->athlete_model->getBy('user_id', $this->session->userdata['id']);\n $data['events'] = $this->event_model->getEvents('desc', 10);\n $data['results'] = $this->result_model->getByAthlete($this->session->userdata['id'], 'desc', 10);\n\n //On charge la vue que l'on va injecter dans le layout \n $data['content'] = [$this->load->view('athlete/dashboard/index', $data, true)];\n\n $this->load->view('athlete/layout_athlete', $data);\n }", "title": "" }, { "docid": "f7d15b675b678bdc8c151831d9fd410e", "score": "0.59317255", "text": "public function index()\n {\n $data = [];\n $data['StaticContentManager1'] = Introduce::orderBy('id', 'asc')\n ->where('type', IntroduceSetting::IMAGE_TEXT)->get();\n $data['StaticContentManager2'] = Introduce::orderBy('id', 'asc')\n ->where('type', IntroduceSetting::TEXT_INPUT)->get();\n $data['StaticContentManager3'] = Introduce::orderBy('id', 'asc')\n ->where('type', IntroduceSetting::TEXT_TEXTAREA)->get();\n\n return view('backend.pages.introduces.list', $data);\n }", "title": "" }, { "docid": "591ca121f817e196c3c86e9768e4c0a9", "score": "0.5919166", "text": "public function actionIndex()\n {\n $searchModel = new ArticalSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "dafbe2b3b8bc3a3bc9ff5b34c3e51dff", "score": "0.5916878", "text": "public function index()\n {\n $moods = Moods::orderBy('hierarchy', 'ASC')->get();\n \n return view('moods')->withMoods($moods);\n }", "title": "" }, { "docid": "283ce7f7ba7059b7cdccbb3cc795e394", "score": "0.5904483", "text": "public function index()\n {\n $variations = Variation::with('technique')->get();\n \n return view('variations.index', compact('variations'));\n }", "title": "" }, { "docid": "129b0fd7c4bac2a1646622074c87405d", "score": "0.59032875", "text": "public function display(){\n $arts = Art::all();\n $arts = Art::paginate(4);\n\n\treturn view(\"Arts.Artsdisplay\", compact('arts'));\n\n }", "title": "" }, { "docid": "6223f48c7c78d1dda0e17449d46b6ed1", "score": "0.59023285", "text": "public function getIndex()\n {\n return Aviso::All();\n }", "title": "" }, { "docid": "6286efe82fcb1523ab33f810c088f2fb", "score": "0.5895158", "text": "public function showArch()\n {\n // we assume that every arch will have an associate\n $monsters = $this->monsterRepository->archMonsters();\n return view('monsters.showarchs', ['monsters' => $monsters, 'title' => 'Lista archow']);\n }", "title": "" }, { "docid": "b3d6e626ec6b0f9c65255d0f283c902b", "score": "0.58895355", "text": "public function show(Avaliacoes $avaliacoes)\n {\n //\n }", "title": "" }, { "docid": "3c39a4a93c1bbec1a85de4a66102a669", "score": "0.5886553", "text": "public function index()\n {\n $tracks = DB::table('tracks')\n ->join('authors', 'tracks.author_id', '=', 'authors.id')\n ->join('albumes', 'tracks.albume_id', '=', 'albumes.id')\n ->select(\n 'tracks.id',\n 'tracks.title',\n 'tracks.duration',\n 'tracks.created_at',\n 'tracks.updated_at',\n 'tracks.file',\n 'authors.firstName',\n 'authors.lastName',\n 'albumes.title as titleAlbume',\n 'albumes.folder')\n ->paginate(10);\n\n return View('admin/tracks_adm', [\n 'pistas' => $tracks,\n 'authors' => Author::All(),\n 'albumes' => Albume::All(),\n 'paht' => env('URL_BASE_AUDIOFILES')\n ]);\n }", "title": "" }, { "docid": "6b5db936273a813d17f1c0be5cb8e6c9", "score": "0.588262", "text": "public function index()\n {\n return ExperimentoFaixa::all();\n //return Experimento::latest()->paginate(10);\n }", "title": "" }, { "docid": "4748639f3a48766ea6440f37b3f75c2c", "score": "0.58683646", "text": "public function mostrarAlunos() {\r\n\t\tforeach($this->alunos as $aluno) {\r\n\t\t\techo $aluno->nome . '<br>';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8ce14c634c209f9a9ddf35e11c6dc60e", "score": "0.58675754", "text": "public function displayAnimals()\n {\n $animals = $this->manager->listLast10();\n $this->render('indexView', ['animals' => $animals]);\n }", "title": "" }, { "docid": "905fe160a2558012afa503354205fb66", "score": "0.5866951", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $absences = $em->getRepository('AppBundle:Absence')->findAll();\n\n return $this->render('absence/index.html.twig', array(\n 'absences' => $absences,\n ));\n }", "title": "" }, { "docid": "573459c1d93488df194e9f0305392489", "score": "0.5844481", "text": "public function index()\n {\n $modelArea = area::all();\n return view('area.list', compact('modelArea'));\n }", "title": "" }, { "docid": "2cb4c7aef03c6c04216e099a2bf21336", "score": "0.58389676", "text": "public function index()\n\t{\n\t\t$analises = Analise::orderBy('id', 'DESC')->paginate(25);\n\t\t$qtd = count($analises);\n\n\t\treturn View::make('analises.index', compact('analises', 'qtd'));\n\t}", "title": "" }, { "docid": "94a8c3b6a10d13ca41dbbc715da14dc2", "score": "0.58167017", "text": "public function index()\n {\n $atuacoes = $this->repository->orderBy('descricao')->all();\n //dd($Atuaçãos);\n\n return view('admin.atuacoes.index', compact('atuacoes'));\n }", "title": "" }, { "docid": "a42528361560918a53a4cd98ea84f817", "score": "0.5810032", "text": "public function index()\n {\n $exams = Exam::orderBy('created_at','desc')->paginate(10);\n return view('admindashboard.exams.index')->with('exams', $exams);\n }", "title": "" }, { "docid": "7e6c21e6158b51101bdb2e1764b4ee60", "score": "0.58099943", "text": "public function index()\n {\n return $this->assigmentRepository->list();\n }", "title": "" }, { "docid": "10353c47d2841d4677ade70c03a9424d", "score": "0.58050305", "text": "public function index() {\n $user = User::findOrFail(Auth::user()->id);\n\n return view('profile.adjectives.index', ['menu' => 'adjectives', 'user' => $user, 'title' => 'Επεξεργασία προφίλ - Στοιχεία χαρακτήρα']);\n }", "title": "" }, { "docid": "0740660399f527f29e5f493cf21cf323", "score": "0.58025753", "text": "public function show(Ambulancia $ambulancia)\n {\n //\n }", "title": "" }, { "docid": "2b2a6e976fb912b9e27df1d4b7510ea4", "score": "0.5802257", "text": "public function index()\n {\n //\n $avisos = Aviso::all()->sortByDesc('fecha_ini_aviso');\n return view(\"avisos.index\")->with('avisos',$avisos);\n \n }", "title": "" }, { "docid": "30be04a79649e3baf265b0695a348d22", "score": "0.57897305", "text": "public function index()\n {\n //\n $mapas = Imagen_mapa::get();\n return view('admin.mapas.index', compact(['mapas']));\n }", "title": "" }, { "docid": "f6baeee8ffdf177b3f0e0557e3794e4a", "score": "0.5788552", "text": "public function index()\n {\n $meanings = $this->meaning->paginate(10);\n return view('admin.meaning.index', compact('meanings'));\n }", "title": "" }, { "docid": "e5774be3116e4b3a450e997c826b8bd6", "score": "0.57860255", "text": "public function index()\n {\n $species = Specie::all();\n $managers = Manager::all();\n $animals = Animal::orderBy('name')->paginate(self::RESULTS_IN_PAGE)->withQueryString();\n return view('animal.index', ['species' => $species, 'managers' => $managers, 'animals' => $animals]);\n }", "title": "" }, { "docid": "563094539b1ef6d28e2174cfad9d1199", "score": "0.57832205", "text": "public function index()\n {\n //\n return view('artesano.index',['artedata'=>Artesano::all()]);\n }", "title": "" }, { "docid": "35bc4ad429cbd3f4905abc96c900f088", "score": "0.5780575", "text": "public function index()\n\t{\n\t\t$exams = Exam::all();\n\t\treturn $exams;\t\n\t}", "title": "" }, { "docid": "fbb110c3b588a2a016641a2b75ece0de", "score": "0.57627094", "text": "public function index()\n {\n //Mostramos las ausencias del usuario\n //Si es admin, ve las de todos los usuarios (para poder validarlas)\n // if (Auth::user()->is_admin == false ) {\n $absences['absences']=Absence::where('user_id', '=', Auth::user()->id)\n ->join('hours', 'absences.hour_id', '=', 'hours.id')\n ->orderBy('startdate', 'asc')\n ->simplepaginate(10, array('absences.*', 'hours.name as hourName'));\n // } else {\n // //ADMIN: Vista de las ausencias no validadas\n // $absences['absences']=Absence::where('validate', '=', 'NO')\n // ->join('users', 'absences.user_id', '=', 'users.id')\n // ->join('hours', 'absences.hour_id', '=', 'hours.id')\n // ->orderBy('startdate', 'asc')\n // ->simplepaginate(10, array('absences.*', 'hours.name as hourName', 'users.name as userName'));\n // }\n\n return view('absences.index',$absences);\n }", "title": "" }, { "docid": "75939202e6975976f39859517b954941", "score": "0.5760269", "text": "public function index()\n {\n $aos = Ao::all();\n return view('pages.aos.consulter', compact('aos'));\n }", "title": "" }, { "docid": "d1eb6847d28e5e260020cb4347d2a810", "score": "0.5759645", "text": "public function index() {\r\n # Gunakan foreach untuk menampilkan data array (index)\r\n foreach ($this->animals as $value) {\r\n echo $value. \",\";\r\n }\r\n }", "title": "" }, { "docid": "396efcaa683441a2d1c60343cbfb2a89", "score": "0.5759424", "text": "public function index()\n {\n $illustrations = Illustration::orderBy('created_at', 'desc')->paginate(10);\n return view('illustrations.index')->with('illustrations', $illustrations);\n }", "title": "" }, { "docid": "b78f329a4e9b4fb79d220708a6523f7a", "score": "0.5758192", "text": "public function index()\n {\n return AnimalResource::collection(Animal::all());\n }", "title": "" }, { "docid": "ae520fe00ed6f2210d876bac237ff64e", "score": "0.5748792", "text": "public function index()\n\t{\n\t\treturn View::make('areas.index', array('title'=>'Unidades de Negocio','areas'=>Area::orderBy('created_at', 'desc')->paginate(10)));\n\t}", "title": "" }, { "docid": "2c074fd3456ea63a90b43d5687f51d5d", "score": "0.5745732", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AmbientesCidmBundle:Ambiente')->findAll();\n\n return $this->render('AmbientesCidmBundle:Ambiente:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "6b5ce929c37daf730a7d642548943746", "score": "0.5745392", "text": "public function index()\n {\n $adventure = Adventures::all();\n return view('ALevel',compact('adventure'));\n }", "title": "" }, { "docid": "52945efc5fa4d1cd3c6d9ffa09b0fa9e", "score": "0.57414305", "text": "public function index()\n {\n $areas = Area::orderBy('name')->get();\n return view('areas.index', compact('areas'));\n }", "title": "" }, { "docid": "7be4f033386a5a5937bc982ad3964ec2", "score": "0.57411754", "text": "public function index()\n {\n $this->title = 'Зарегистрированные животные';\n \n $animals = $this->getAnimals();\n\t\t\n $this->content = view(env('THEME').'.admin.animals_content')->with(['animals' => $animals])->render();\n \n \n return $this->renderOutput(); \n \n }", "title": "" }, { "docid": "f293874dfece7f3479d9d53c5e842e47", "score": "0.57385904", "text": "public function index()\n {\n $photoshop = Exam::where('topics_id',1)->orderBy('id','asc')->get();\n $illustrator = Exam::where('topics_id',2)->orderBy('id','asc')->get();\n return view('users/Admin/exam-view')->with(array(\n 'photoshop' => $photoshop,\n 'illustrator' => $illustrator\n ));\n }", "title": "" }, { "docid": "46182e21bc872e77215d5721d469392d", "score": "0.57338154", "text": "function index() {\n $data['accessories'] = $this->Accessory_model->get_all_accessories();\n\n $data['_view'] = 'accessory/index';\n $this->load->view('layouts/main', $data);\n }", "title": "" }, { "docid": "5e998b9d09bb9c0c73d4541d294b3cc3", "score": "0.57197934", "text": "public function index()\n {\n return AtividadeResource::collection(Atividade::all());\n }", "title": "" }, { "docid": "23e9ae412ec2843da76d9c3a5c8a08dd", "score": "0.57100016", "text": "public function index()\n {\n $area = area_apms::simplePaginate(10);\n return view('area.index',compact('area'));\n }", "title": "" }, { "docid": "bd96bdfdd3ace40f325c0c325b2e4365", "score": "0.5708473", "text": "public function listacamereAction(){\n \n $tipo=$this->_getParam('tipo');\n $camere=$this->_utenteModel->getCamereByTipo($tipo,array('prezzo_camera'));\n $this->view->camere=$camere;\n }", "title": "" }, { "docid": "f2009d88a11ddffd93214e24d48c7971", "score": "0.5703401", "text": "public function index()\n\t{\n $areas = UaArea::all();\n return View::make('admin.uaareas.index')->withAreas($areas);\n\t}", "title": "" }, { "docid": "5405a5e917a0292da9ae76c83e54af2b", "score": "0.5685127", "text": "public function index()\n {\n $advertisings=Advertising::all();\n $advertising=$advertisings->first();\n $aside_advertisings=AsideAdvertising::all();\n $user = Auth::user();\n\n return view(\"admin.aside-advertising.index\", compact(\"aside_advertisings\", \"advertising\", \"user\"));\n }", "title": "" }, { "docid": "777f920c5d4655535a637ac91abd28e5", "score": "0.5682618", "text": "public function index()\n {\n return view('contentmanagement::Achievement.index')\n ->withAchievements($this->achievements->all());\n }", "title": "" }, { "docid": "f4959c0c960a5c5e0d627cb2c4bbb3ff", "score": "0.5679059", "text": "public function index()\n\t{\n\t\t$attributes = Attribute::all();\n\n\t\treturn view('attributes.index', compact('attributes'));\n\t}", "title": "" }, { "docid": "e2b6a9e2148b7e5f6bae64fb21344fbd", "score": "0.5678515", "text": "public function index()\n {\n return $listas = Lista::all();\n return view('listas.index', compact('listas'));\n }", "title": "" }, { "docid": "0773ad87a0103fe7eab1103e0ba6fc74", "score": "0.56777084", "text": "public function index()\n {\n $alternatifs = Alternatif::paginate();\n\n return view('alternatif.index', compact('alternatifs'))\n ->with('i', (request()->input('page', 1) - 1) * $alternatifs->perPage());\n }", "title": "" }, { "docid": "39513d5d911981d759186d81dbde721c", "score": "0.56725323", "text": "public function index()\n {\n // $animals = Animal::with('rescuers')->get();\n\n\n // $animals=Animal::where('aniStatus','Adopted')->get();\n\n // $adopters = Adopter::with('adopt_lines')->get();\n $adoptlines=Adoptline::with('adopter','animal')->get();\n // dd($adoptlines);\n \n//blade view\n return view('adoptline.index', compact('adoptlines'));\n }", "title": "" }, { "docid": "f5c69770a905690bbdcbd9c3ff416d7a", "score": "0.56703484", "text": "public function index()\n {\n \n $lineas = Linea::with('areas')->get();\n\n return View::make('decano.lineas.index')->with('lineas', $lineas);\n\n }", "title": "" }, { "docid": "74b29a052bb86e63a06f4d37ef809970", "score": "0.5668861", "text": "public function index()\n {\n $algoritms = Algoritm::all();\n\n\n return view('Algoritm/index', compact('algoritms'));\n }", "title": "" }, { "docid": "79b69efb20f8416a29556cd18c1747b8", "score": "0.5668487", "text": "public function index()\n {\n return view('achat.achat', [\n 'achats' => Achat::all(),\n 'products' => Product::all(),\n 'founisseurs' => Fournisseur::all(),\n ]);\n }", "title": "" }, { "docid": "7c5d2a07d1f6f99fcb7f16fb2eacc288", "score": "0.56652915", "text": "public function index()\n {\n //dd('ok');\n $logochanges = LogoChange::all();\n $portraits = Portrait::all();\n $portraitpackages = PortraitPackage::all();\n //dd($portraitpackages);\n\n return view('portraits_album', compact('logochanges', 'portraits', 'portraitpackages'));\n }", "title": "" }, { "docid": "26e0bd15f63602e7ad948cb305a7a484", "score": "0.5661236", "text": "public function index()\n {\n return view('admin.attributes.index')\n ->with('attributes', Attribute::paginate(10));\n }", "title": "" }, { "docid": "478189fdab1740010ac18e0c6f20c46b", "score": "0.56538624", "text": "public function index(){\n $agi_h = Hero::get()->where('attribute','AGI');\n $int_h = Hero::get()->where('attribute','INT');\n $str_h = Hero::get()->where('attribute','STR');\n \n return view('herolist')->with([\n 'agi_h' => $agi_h,\n 'int_h' => $int_h,\n 'str_h' => $str_h\n ]);\n }", "title": "" }, { "docid": "afd18366ee7322a03ef9857ebdeab32d", "score": "0.56532377", "text": "public function index()\n {\n $acronimos= Acronimo::all();\n return view('panel.dashboard.acronimo', compact('acronimos')); \n }", "title": "" }, { "docid": "851cb6017bf2be3654c3157ade809b26", "score": "0.56530136", "text": "public function alunos () {\n\t\t// Verifica permissões\n\t\tif (!$this->temPermissao(2)) {\n\t\t\treturn;\n\t\t}\n\t\t// Busca as infos e carrega a tela\n\t\t$data['alunos'] = $this->pessoa->buscaAlunos();\n\t\t$this->load->view('cms/lista_alunos', $data);\n\t}", "title": "" }, { "docid": "ccfa222b1d6efb867ac222c2462c2966", "score": "0.5650403", "text": "public function index()\n {\n $areas = Area::all();\n\n return view('admin.areas.index',compact('areas')); \n }", "title": "" }, { "docid": "aa5b860a001b89b197e0370c0a37c285", "score": "0.56390387", "text": "public function index()\n {\n //\n\n $areas = Area::Paginate();\n return view('admins.areas.index',compact('areas'));\n\n }", "title": "" }, { "docid": "e153ce789a97b31a3f94e0b75c2426eb", "score": "0.56380266", "text": "public function index()\n {\n //talk to model\n $areas = Areas::all();\n\n //pick view to display\n return view('areas.index', compact('areas'));\n }", "title": "" }, { "docid": "831c7f60956e436fb8647245038a8152", "score": "0.563515", "text": "public function indexAction()\n {\n $areapesca = $this->modelAreaPesca->select( NULL, 'tareap_areapesca', NULL );\n\n $this->view->assign(\"area_pesca\", $areapesca);\n }", "title": "" }, { "docid": "ec72d585d87cc4c28d994b7de0df8055", "score": "0.56263715", "text": "public function index()\n {\n return view('admin.alarm')->with('alarms',alarm::all());\n }", "title": "" }, { "docid": "7958993789787e8931b9c6bf236af70e", "score": "0.5625726", "text": "public function index()\n {\n $areas = Area::where(['estado'=>'Habilitado'])->paginate(10);\n\n return view('area.index',compact('areas'));\n }", "title": "" }, { "docid": "bbf929814b551e561e0a61db183ab74c", "score": "0.56252354", "text": "public function index()\n {\n if (request()->status == 'deleted') {\n $accessories = Accessory::onlyTrashed()->get();\n } else {\n $accessories = Accessory::all();\n }\n return view('accessories.index')->with(compact('accessories'));\n }", "title": "" }, { "docid": "e896eed1b5ec23b9c40ae87278b60e12", "score": "0.5622203", "text": "public function index()\n {\n //\n return DetalleEmbarazoPaciente::all();\n }", "title": "" }, { "docid": "b9967d9d60b40ceb8749112afc7556e3", "score": "0.56165546", "text": "public function index()\n {\n $animals = new Animals();\n $animals_list = DB::table('animals')->paginate(25);\n return view('admin.home', ['animals' => $animals_list]);\n }", "title": "" }, { "docid": "2999a5f26814f42c73757cf473de8668", "score": "0.56165016", "text": "public function index()\n {\n $alunos = Aluno::all();\n return view('index', compact('alunos')); \n }", "title": "" }, { "docid": "1e2537a8bb4468b4ea25d0d00f103b53", "score": "0.5615471", "text": "public function index()\n {\n //\n $amenities = Amenity::paginate(5);\n return view('amenities.index',compact(['amenities']));\n }", "title": "" }, { "docid": "3d7386445aefe0ae91a4c1105237e527", "score": "0.56118095", "text": "public function index()\n {\n $pk2mabaAbsensis = PK2MabaAbsensi::all();\n return view('panel-admin.pk2maba.absensi-index', compact('pk2mabaAbsensis'));\n }", "title": "" }, { "docid": "bcb27c19752dbba65d6e717443830e0e", "score": "0.5604844", "text": "public function index()\n {\n\n $admin = FinancialAdvisor::all(['fa_id','fa_name']);\n return \\View::make('admindashboard.index')->with('admin', $admin);\n }", "title": "" }, { "docid": "38e87bd6003fa7aa3b2966318785ba9f", "score": "0.56029207", "text": "public function index()\n {\n $articles = Article::all();\n $data[]=array(null,null, null,null);\n if (isset($articles)) {\n $data=array();\n foreach ($articles as $article) {\n $buttons = Functions::buttons($article->id,10,$this->configs['location'],true);\n $data[]=array(\n $article->title,\n $article->created_by,\n Functions::status($article->active),\n $buttons,\n );\n }\n }\n\n return view('admin.articles.listAll',[\n 'title_postfix' => 'Artigos',\n 'navigation' => $this->new_navigation,\n 'data' => $data,\n 'accesslevel' => 10,\n ]);\n }", "title": "" }, { "docid": "63964f8ce76a8a09b7346d32ee46e3e1", "score": "0.56023765", "text": "public function all_propertys()\n {\n $apartments=Apartment::all(); // dohvaćanje svih iz baze\n return view('user.all_propertys',compact('apartments',$apartments));// slanje u view dohvaćenih podataka\n }", "title": "" }, { "docid": "8515c32bb273c939079fe494608b7eaa", "score": "0.56006813", "text": "public function index()\n {\n $alunos = Aluno::paginate(10);\n return AlunoResource::collection($alunos);\n }", "title": "" }, { "docid": "a2c45a9a43e29e3c377b09ef962a0b19", "score": "0.5600542", "text": "public function index()\n {\n $lists = Animal_List::all()->sortBy('list_id');\n return view('animal_list.index', compact('lists'));\n }", "title": "" }, { "docid": "1cb39ced88950393b60a0e204beabcf3", "score": "0.55946696", "text": "public function index(Asistente $assistant)\n {\n $eventos = $assistant->eventos;\n\n return $this->showAll($eventos); \n }", "title": "" }, { "docid": "16419e1cfd1e0557c50e4295e6cbe840", "score": "0.5594372", "text": "public function show(Armario $armario)\n {\n //\n }", "title": "" }, { "docid": "f5347551e62d6110469ba3ee7849df18", "score": "0.5591178", "text": "public function show(Alumnos $alumnos)\n {\n //\n }", "title": "" }, { "docid": "f5347551e62d6110469ba3ee7849df18", "score": "0.5591178", "text": "public function show(Alumnos $alumnos)\n {\n //\n }", "title": "" }, { "docid": "6a7ad3aba7c2b7e30ec109cf7beb5bbb", "score": "0.55910105", "text": "public function index()\n {\n // paginado de 10 anuncios por pagina\n $anuncios = Anuncio::orderBy('id', 'DESC')->paginate(10);\n\n $total = Anuncio::count();\n\n return view('anuncios.list', [\n 'anuncios' => $anuncios,\n 'total' => $total\n ]);\n }", "title": "" }, { "docid": "e3819d76d0d376adf03db9eba8c58f16", "score": "0.5586599", "text": "public function index()\n {\n $movie = DB::table('movie')\n ->join('type_movie','type_movie.id_typemv','movie.id_typemv')\n ->join('language','language.id_language','movie.id_language')\n ->join('format','format.id_format','movie.id_format')\n ->get();\n return view('admin.movie.index', compact('movie'));\n }", "title": "" }, { "docid": "eac1a863c7daaaf3e2c1e0ddf45ace95", "score": "0.5581291", "text": "public function index()\n {\n $areas = Area::all();\n return view('intranet.areas')->with('areas',$areas);\n }", "title": "" }, { "docid": "64e7da72e4f67a5b6bfd26f7b39100e4", "score": "0.558021", "text": "public function displayAll()\n {\n $images = Artwork::getImagesByOrder();\n $imgArr = array();\n foreach ($images as $image) {\n array_push($imgArr, $image);\n }\n return view('admin.gallery')->with('data', $imgArr);\n }", "title": "" } ]
bf216a32e834d4a98e92a7e3506f0dfb
Validate zip code based on country code
[ { "docid": "4285239e477216525d252c7fce20ae73", "score": "0.7975013", "text": "function give_donation_form_validate_cc_zip( $zip = 0, $country_code = '' ) {\n\t$ret = false;\n\n\tif ( empty( $zip ) || empty( $country_code ) ) {\n\t\treturn $ret;\n\t}\n\n\t$country_code = strtoupper( $country_code );\n\n\t$zip_regex = array(\n\t\t'AD' => 'AD\\d{3}',\n\t\t'AM' => '(37)?\\d{4}',\n\t\t'AR' => '^([A-Z]{1}\\d{4}[A-Z]{3}|[A-Z]{1}\\d{4}|\\d{4})$',\n\t\t'AS' => '96799',\n\t\t'AT' => '\\d{4}',\n\t\t'AU' => '^(0[289][0-9]{2})|([1345689][0-9]{3})|(2[0-8][0-9]{2})|(290[0-9])|(291[0-4])|(7[0-4][0-9]{2})|(7[8-9][0-9]{2})$',\n\t\t'AX' => '22\\d{3}',\n\t\t'AZ' => '\\d{4}',\n\t\t'BA' => '\\d{5}',\n\t\t'BB' => '(BB\\d{5})?',\n\t\t'BD' => '\\d{4}',\n\t\t'BE' => '^[1-9]{1}[0-9]{3}$',\n\t\t'BG' => '\\d{4}',\n\t\t'BH' => '((1[0-2]|[2-9])\\d{2})?',\n\t\t'BM' => '[A-Z]{2}[ ]?[A-Z0-9]{2}',\n\t\t'BN' => '[A-Z]{2}[ ]?\\d{4}',\n\t\t'BR' => '\\d{5}[\\-]?\\d{3}',\n\t\t'BY' => '\\d{6}',\n\t\t'CA' => '^[ABCEGHJKLMNPRSTVXY]{1}\\d{1}[A-Z]{1} *\\d{1}[A-Z]{1}\\d{1}$',\n\t\t'CC' => '6799',\n\t\t'CH' => '^[1-9][0-9][0-9][0-9]$',\n\t\t'CK' => '\\d{4}',\n\t\t'CL' => '\\d{7}',\n\t\t'CN' => '\\d{6}',\n\t\t'CR' => '\\d{4,5}|\\d{3}-\\d{4}',\n\t\t'CS' => '\\d{5}',\n\t\t'CV' => '\\d{4}',\n\t\t'CX' => '6798',\n\t\t'CY' => '\\d{4}',\n\t\t'CZ' => '\\d{3}[ ]?\\d{2}',\n\t\t'DE' => '\\b((?:0[1-46-9]\\d{3})|(?:[1-357-9]\\d{4})|(?:[4][0-24-9]\\d{3})|(?:[6][013-9]\\d{3}))\\b',\n\t\t'DK' => '^([D-d][K-k])?( |-)?[1-9]{1}[0-9]{3}$',\n\t\t'DO' => '\\d{5}',\n\t\t'DZ' => '\\d{5}',\n\t\t'EC' => '([A-Z]\\d{4}[A-Z]|(?:[A-Z]{2})?\\d{6})?',\n\t\t'EE' => '\\d{5}',\n\t\t'EG' => '\\d{5}',\n\t\t'ES' => '^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$',\n\t\t'ET' => '\\d{4}',\n\t\t'FI' => '\\d{5}',\n\t\t'FK' => 'FIQQ 1ZZ',\n\t\t'FM' => '(9694[1-4])([ \\-]\\d{4})?',\n\t\t'FO' => '\\d{3}',\n\t\t'FR' => '^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$',\n\t\t'GE' => '\\d{4}',\n\t\t'GF' => '9[78]3\\d{2}',\n\t\t'GL' => '39\\d{2}',\n\t\t'GN' => '\\d{3}',\n\t\t'GP' => '9[78][01]\\d{2}',\n\t\t'GR' => '\\d{3}[ ]?\\d{2}',\n\t\t'GS' => 'SIQQ 1ZZ',\n\t\t'GT' => '\\d{5}',\n\t\t'GU' => '969[123]\\d([ \\-]\\d{4})?',\n\t\t'GW' => '\\d{4}',\n\t\t'HM' => '\\d{4}',\n\t\t'HN' => '(?:\\d{5})?',\n\t\t'HR' => '\\d{5}',\n\t\t'HT' => '\\d{4}',\n\t\t'HU' => '\\d{4}',\n\t\t'ID' => '\\d{5}',\n\t\t'IE' => '((D|DUBLIN)?([1-9]|6[wW]|1[0-8]|2[024]))?',\n\t\t'IL' => '\\d{5}',\n\t\t'IN' => '^[1-9][0-9][0-9][0-9][0-9][0-9]$', // India.\n\t\t'IO' => 'BBND 1ZZ',\n\t\t'IQ' => '\\d{5}',\n\t\t'IS' => '\\d{3}',\n\t\t'IT' => '^(V-|I-)?[0-9]{5}$',\n\t\t'JO' => '\\d{5}',\n\t\t'JP' => '\\d{3}-\\d{4}',\n\t\t'KE' => '\\d{5}',\n\t\t'KG' => '\\d{6}',\n\t\t'KH' => '\\d{5}',\n\t\t'KR' => '\\d{3}[\\-]\\d{3}',\n\t\t'KW' => '\\d{5}',\n\t\t'KZ' => '\\d{6}',\n\t\t'LA' => '\\d{5}',\n\t\t'LB' => '(\\d{4}([ ]?\\d{4})?)?',\n\t\t'LI' => '(948[5-9])|(949[0-7])',\n\t\t'LK' => '\\d{5}',\n\t\t'LR' => '\\d{4}',\n\t\t'LS' => '\\d{3}',\n\t\t'LT' => '\\d{5}',\n\t\t'LU' => '\\d{4}',\n\t\t'LV' => '\\d{4}',\n\t\t'MA' => '\\d{5}',\n\t\t'MC' => '980\\d{2}',\n\t\t'MD' => '\\d{4}',\n\t\t'ME' => '8\\d{4}',\n\t\t'MG' => '\\d{3}',\n\t\t'MH' => '969[67]\\d([ \\-]\\d{4})?',\n\t\t'MK' => '\\d{4}',\n\t\t'MN' => '\\d{6}',\n\t\t'MP' => '9695[012]([ \\-]\\d{4})?',\n\t\t'MQ' => '9[78]2\\d{2}',\n\t\t'MT' => '[A-Z]{3}[ ]?\\d{2,4}',\n\t\t'MU' => '(\\d{3}[A-Z]{2}\\d{3})?',\n\t\t'MV' => '\\d{5}',\n\t\t'MX' => '\\d{5}',\n\t\t'MY' => '\\d{5}',\n\t\t'NC' => '988\\d{2}',\n\t\t'NE' => '\\d{4}',\n\t\t'NF' => '2899',\n\t\t'NG' => '(\\d{6})?',\n\t\t'NI' => '((\\d{4}-)?\\d{3}-\\d{3}(-\\d{1})?)?',\n\t\t'NL' => '^[1-9][0-9]{3}\\s?([a-zA-Z]{2})?$',\n\t\t'NO' => '\\d{4}',\n\t\t'NP' => '\\d{5}',\n\t\t'NZ' => '\\d{4}',\n\t\t'OM' => '(PC )?\\d{3}',\n\t\t'PF' => '987\\d{2}',\n\t\t'PG' => '\\d{3}',\n\t\t'PH' => '\\d{4}',\n\t\t'PK' => '\\d{5}',\n\t\t'PL' => '\\d{2}-\\d{3}',\n\t\t'PM' => '9[78]5\\d{2}',\n\t\t'PN' => 'PCRN 1ZZ',\n\t\t'PR' => '00[679]\\d{2}([ \\-]\\d{4})?',\n\t\t'PT' => '\\d{4}([\\-]\\d{3})?',\n\t\t'PW' => '96940',\n\t\t'PY' => '\\d{4}',\n\t\t'RE' => '9[78]4\\d{2}',\n\t\t'RO' => '\\d{6}',\n\t\t'RS' => '\\d{5}',\n\t\t'RU' => '\\d{6}',\n\t\t'SA' => '\\d{5}',\n\t\t'SE' => '^(s-|S-){0,1}[0-9]{3}\\s?[0-9]{2}$',\n\t\t'SG' => '\\d{6}',\n\t\t'SH' => '(ASCN|STHL) 1ZZ',\n\t\t'SI' => '\\d{4}',\n\t\t'SJ' => '\\d{4}',\n\t\t'SK' => '\\d{3}[ ]?\\d{2}',\n\t\t'SM' => '4789\\d',\n\t\t'SN' => '\\d{5}',\n\t\t'SO' => '\\d{5}',\n\t\t'SZ' => '[HLMS]\\d{3}',\n\t\t'TC' => 'TKCA 1ZZ',\n\t\t'TH' => '\\d{5}',\n\t\t'TJ' => '\\d{6}',\n\t\t'TM' => '\\d{6}',\n\t\t'TN' => '\\d{4}',\n\t\t'TR' => '\\d{5}',\n\t\t'TW' => '\\d{3}(\\d{2})?',\n\t\t'UA' => '\\d{5}',\n\t\t'UK' => '^(GIR|[A-Z]\\d[A-Z\\d]??|[A-Z]{2}\\d[A-Z\\d]??)[ ]??(\\d[A-Z]{2})$',\n\t\t'US' => '^\\d{5}([\\-]?\\d{4})?$',\n\t\t'UY' => '\\d{5}',\n\t\t'UZ' => '\\d{6}',\n\t\t'VA' => '00120',\n\t\t'VE' => '\\d{4}',\n\t\t'VI' => '008(([0-4]\\d)|(5[01]))([ \\-]\\d{4})?',\n\t\t'WF' => '986\\d{2}',\n\t\t'YT' => '976\\d{2}',\n\t\t'YU' => '\\d{5}',\n\t\t'ZA' => '\\d{4}',\n\t\t'ZM' => '\\d{5}',\n\t);\n\n\tif ( ! isset( $zip_regex[ $country_code ] ) || preg_match( '/' . $zip_regex[ $country_code ] . '/i', $zip ) ) {\n\t\t$ret = true;\n\t}\n\n\treturn apply_filters( 'give_is_zip_valid', $ret, $zip, $country_code );\n}", "title": "" } ]
[ { "docid": "8fd78921270825f49cb06ae719f650b3", "score": "0.82997", "text": "function checkZipCode($code, $country) {\r\n\t$code = preg_replace(\"/[\\s|-]/\", \"\", $code);\r\n\t$length = strlen ($code);\r\n\r\n\tswitch ( strtoupper ($country) ) {\r\n\t\tcase 'US':\r\n\t\tcase 'MX':\r\n\t\t\tif ( ($length <> 5) && ($length <> 9) ) {\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\treturn isDigits($code);\r\n\t\tcase 'CA':\r\n\t\t\tif ($length <> 6) {\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\treturn preg_match (\"/([A-z][0-9]){3}/\", $code);\r\n\t}\r\n}", "title": "" }, { "docid": "071151df47b7891b2008e7db17fc06fe", "score": "0.7586229", "text": "public function validateZip($zip, $country='') {\n\t\t\t\n\t\t\tif (!$country) {\n\t\t\t\t$country = $this->defaultCountry;\n\t\t\t}\n\t\t\n\t\t\tswitch (strtolower($country)) {\n\t\t\t\t\n\t\t\t\t// Deutschland\n\t\t\t\tcase 'de':\n\t\t\t\tcase 'd':\n\t\t\t\t\t\n\t\t\t\t\t// Event. fuehrendes 'D-' entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/^\\s*D\\s*-\\s*/is', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = preg_replace('/[\\s\\t\\r\\n]/s', '', $zip);\n\n\t\t\t\t\t// 5 Zeichen Laenge ist Pflicht\n\t\t\t\t\tif (!preg_match('/^\\d{5}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Österreich\n\t\t\t\tcase 'at':\n\t\t\t\tcase 'a':\n\t\t\t\t\t\n\t\t\t\t\t// Event. fuehrendes 'A-' entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/^\\s*A\\s*-\\s*/is', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = preg_replace('/[\\s\\t\\r\\n]/s', '', $zip);\n\t\t\t\t\t\n\t\t\t\t\t// 4 Zeichen Laenge ist Pflicht\n\t\t\t\t\tif (!preg_match('/^\\d{4}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\t// Schweiz\n\t\t\t\tcase 'ch':\n\t\t\t\t\t// Event. fuehrendes 'CH-' entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/^\\s*CH\\s*-?\\s*/is', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = preg_replace('/[\\s\\t\\r\\n]/s', '', $zip);\n\t\t\t\t\t\n\t\t\t\t\t// 4 Zeichen Laenge ist Pflicht\n\t\t\t\t\tif (!preg_match('/^\\d{4}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// GB England\n\t\t\t\tcase 'gb':\n\t\t\t\tcase 'en':\n\t\t\t\t\t\n\t\t\t\t\t// Event. WhiteSpace am Anfang und Ende entfernen\n\t\t\t\t\t$zip = trim($zip);\n\t\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t// $zip = preg_replace('/[\\s\\t\\r\\n]/s', '', $zip);\n\t\t\t\t\t\n\t\t\t\t\t// Quelle: http://regexlib.com/REDetails.aspx?regexp_id=1047 Comment 10/23/2008 5:52:56 AM\n\t\t\t\t\t// if (!preg_match('/^((([BEGLMNS][1-9]\\d?)|(W[2-9])|((A[BL]|B[ABDHLNRST]|C[ABFHMORTVW]|D[ADEGHLNTY]|E[HNX]|F[KY]|G[LUY]|H[ADGPRSUX]|I[GMPV]|JE|K[ATWY]|L[ADELNSU]|M[EKL]|N[EGNPRW]|O[LX]|P[AEHLOR]|R[GHM]|S[AEGKL-PRSTWY]|T[ADFNQRSW]|UB|W[ADFNRSV]|YO|ZE)\\d\\d?)|(W1[A-HJKSTUW0-9])|(((WC[1-2])|(EC[1-4])|(SW1)|E1|W1)[ABEHMNPRVWXY]))(\\s*)?([0-9][ABD-HJLNP-UW-Z]{2}))$|^(GIR\\s?0AA)$|^(ASCN|BBND|BIQQ|FIQQ|PCRN|SIQQ|STHL|TDCU|TKCA)\\s?1ZZ$|^(BFPO\\s?\\d\\d?\\d?)$/', $zip)) {\n\t\t\t\t\t\n\t\t\t\t\tif (!preg_match('/^[A-Z]{1,2}[0-9R][0-9A-Z]? [0-9][ABD-HJLNP-UW-Z]{2}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Frankreich\n\t\t\t\tcase 'fr':\n\t\t\t\tcase 'f':\n\t\t\t\t\t\n\t\t\t\t\t// Event. fuehrendes 'F-' entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/^\\s*F\\s*-\\s*/is', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = preg_replace('/[\\s\\t\\r\\n]/s', '', $zip);\n\t\t\t\t\t\n\t\t\t\t\t// http://regexlib.com/REDetails.aspx?regexp_id=203\n\t\t\t\t\tif (!preg_match('/^((2[A|B])|[0-9]{2})[0-9]{3}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t// Spanien\t\t\t\t\n\t\t\t\tcase 'es': \n\t\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/[\\s\\t\\r\\n]/s', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\t// 19444 | 09444 | 10444 aber nicht 00444 \n\t\t\t\t\tif (!preg_match('/^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// Italia\t\n\t\t\t\tcase 'it': \n\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/[\\s\\t\\r\\n]/s', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\t// http://www.dbsoftlab.com/Regular-Expressions-/Is-Italian-Post-Code.html\n\t\t\t\t\tif (!preg_match('/^(V-|I-)?\\d{4}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// Niederlande\n\t\t\t\tcase 'nl': \n\t\t\t\t\n\t\t\t\t\t// Leerzeichen entfernen\n\t\t\t\t\t$zip = trim(preg_replace('/[\\s\\t\\r\\n]/s', '', $zip));\n\t\t\t\t\t\n\t\t\t\t\tif (!preg_match('/^[1-9][0-9]{3}\\s?[a-zA-Z]{2}$/', $zip)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t// trigger_error(\"Fehler! Nicht definierter Laenderkurzel - validateZIP\", E_USER_WARNING);\n\t\t\t\t\treturn false;\n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "8d6112a55ff46ac012b6b69e2674cac9", "score": "0.74702585", "text": "function validateCountryPostalCode($postalCode, $tbsCountriesCode){\r\n\t\t// build filter\r\n\t\t$filters = array(\r\n\t\t\tarray(\r\n\t\t\t\t\t\"field\" => 'NumericCode',\r\n\t\t\t\t\t\"filter\" => 'Equal',\r\n\t\t\t\t\t\"value\" => $tbsCountriesCode\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t// call resource\r\n\t\t$tbsResult = $this->getResource('countries', null, 'All', $filters);\r\n\t\t// appply the regex \r\n\t\tif(preg_match('/' . $tbsResult[0]->ZipcodeRegex . '/', $postalCode) === 1 || $tbsResult[0]->ZipcodeRegex == null) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "19e39f2efce54423cce54322a219ea2a", "score": "0.7332897", "text": "function checkZip(){\n if($this->data['Dealer']['country_id'] == 1 && (!is_numeric($this->data['Dealer']['zip']) || strlen($this->data['Dealer']['zip']) != 5)){\n return false;\n }elseif($this->data['Dealer']['country_id'] == 3 && strlen($this->data['Dealer']['zip']) != 6){ \n return false;\n }\n return true;\n }", "title": "" }, { "docid": "12e2fea0d4cbcf1b9fd44a0fc17d8fba", "score": "0.73031056", "text": "function postal_us($value) {\n $invalid_zip_codes = array('000', '001', '002', '003', '004', '099', '213', '269', '343', '345', '348', '353', '419', '428', '429', '516', '517', '518', '519', '529', '533', '536', '552', '568', '578', '579', '589', '621', '632', '642', '643', '659', '663', '682', '694', '695', '696', '697', '698', '699', '702', '709', '715', '732', '742', '771', '817', '818', '819', '839', '848', '849', '851', '854', '858', '861', '862', '866', '867', '868', '869', '876', '886', '887', '888', '892', '899', '909', '929', '987');\n\n $valid = false;\n\n // We do not use Cake's default validation, because we want users to be able to separate\n // the sections of the Zip+4 by either a dash, a space, or by nothing at all\n // The regular expression used here is from the Cake Validation class, modified to allow\n // dash, space, or no separator between sections of the Zip+4\n if (preg_match('/\\\\A\\\\b[0-9]{5}(?:[- ]?[0-9]{4})?\\\\b\\\\z/i', $value['value'])) {\n $firstThree = substr($value['value'], 0, 3);\n if(!empty($firstThree) && !in_array($firstThree, $invalid_zip_codes)) {\n $valid = true;\n }\n }\n\n return $valid;\n }", "title": "" }, { "docid": "816a73050cf5995ac2752f10a30f10ec", "score": "0.7267027", "text": "function is_zip ($zipcode = \"\")\r\n \t{\r\n \t\tif(empty($zipcode))\r\n \t\t{\r\n \t\treturn false;\r\n \t\t}\r\n \r\n \t\t$Bad = preg_replace(\"/([-0-9]+)/i\",\"\",$zipcode);\r\n \t\tif(!empty($Bad))\r\n \t\t{\r\n \t\treturn false;\r\n \t\t}\r\n \t\tif (strlen($zipcode)<>10){\r\n return false;\r\n }\r\n \r\n \t\tif ($zipcode[5] <> '-') {\r\n \t\t\treturn false;\r\n \t\t}\r\n \r\n \t\t$Num = preg_replace(\"/\\-/i\",\"\",$zipcode);\r\n \t\t$len = strlen($Num);\r\n \t\tif ($len <> 9)\t{\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n }", "title": "" }, { "docid": "f30d93733b3a092a3f9f6c13f066ba27", "score": "0.72668177", "text": "public function isValid($data)\n {\n if (!$this->site->id) {\n $country = $this->program->country;\n } else {\n $country = $this->site->country;\n }\n \n $locale = new \\Zend_Locale(\\Zend_Locale::getLocaleToTerritory(substr($country, 0, 2)));\n $zip = $this->getElement(\"zip\");\n $zip->clearValidators();\n\n if ($locale->getRegion()) {\n //Zend sometimes freaks out about postal codes for strange countries\n try {\n $zip->addValidator(new Zend_Validate_PostCode($locale));\n } catch (\\Zend_Validate_Exception $e) {\n $zip->clearValidators();\n }\n }\n\n return parent::isValid($data);\n }", "title": "" }, { "docid": "4b08089bbd1f85b047b6fe6f38e84a9b", "score": "0.7160682", "text": "public function validateZipCode(Request $request) {\n $client = new Client([\n 'timeout' => 15,\n ]);\n $_response = $client->get(\"http://www.geonames.org/postalCodeLookupJSON\", [\n 'query' => array(\n 'country' => 'US',\n 'callback' => '',\n 'postalcode' => $request->get('zip_code'),\n ),\n ]);\n $bodyObj = $_response->getBody();\n $response = (string)$bodyObj;\n $response = substr($response, 1, strlen($response) - 3);\n return response($response);\n }", "title": "" }, { "docid": "9a2a838f4e89af22a967fcde31cc2e90", "score": "0.71583956", "text": "private function checkZipCode($zipCode) {\n if (!preg_match('#[0-9]{5}#', $zipCode)){\n echo \"ERRORE nel CAP : \".$zipCode;\n \tthrow new InvalidArgumentException();\n }\n else return true;\n }", "title": "" }, { "docid": "773ee9f1e157b23252edca7f8bb78d0d", "score": "0.70126164", "text": "private function usaZipCode(string $country, $zipCode)\n {\n #Zip Code is required for USA and should only accept digits\n if ($country === 'United States (USA)') {\n if (empty($zipCode)) {\n throw new \\InvalidArgumentException('Zip code is required for United States');\n }\n\n $zipCodeIsValid = filter_var($zipCode, FILTER_VALIDATE_INT);\n\n if ($zipCodeIsValid === false) {\n throw new \\InvalidArgumentException('Zip Code must contain only digits for USA.');\n }\n }\n }", "title": "" }, { "docid": "902357faf6133fbbf539235be0c4e0cb", "score": "0.6973169", "text": "function validateZipCode($string){\n\tif($string == '') {return 'Zip code is required </br>';}\n\tif(!preg_match(\"/^[A-Za-z]\\d[A-Za-z] \\d[A-Za-z]\\d$/\", $string)){\n\t\treturn 'Zip code is invalid </br>';\n\t}\n\treturn '';\n}", "title": "" }, { "docid": "0c7d3c00017cb382f85cc10e001ecbe3", "score": "0.67502946", "text": "public function postalCode($field)\n\t{\n\t\t$pattern = '/^[A-Z]\\d[A-Z]\\s?\\d[A-Z]\\d$/i';\n\n\t\tif(preg_match($pattern, $this->post[$field]) !== 1) {\n\t\t\t$this->setError($field, \"Please enter valid {$this->label($field)}\n\t\t\t\t\t\t\t\t\t eg:E8K2H7\");\n\t\t}\n\t}", "title": "" }, { "docid": "79a423aa5820e1b35141fd40ca84b824", "score": "0.6696177", "text": "abstract public function postalCode();", "title": "" }, { "docid": "d54a28c81814f9c9cfe0138c53dd0e4c", "score": "0.6619176", "text": "private function countryValidation(array $data)\n {\n $valid = isset($data['country_id']) && strlen($data['country_id']) > 1 && strlen($data['country_id']) < 4;\n if (!$valid) {\n $error = Mage::helper('directory')->__('Invalid country code: %s', $data['country_id']);\n $this->addDetailedError($error, 'country_id');\n }\n\n return $valid;\n }", "title": "" }, { "docid": "024e4e0752f9fa8c34453db94c538cf1", "score": "0.65657777", "text": "public function getSanitizeZipCode($zipCode)\n {\n if (!is_string($zipCode) || strlen($zipCode) < 4) {\n return false;\n }\n\n $sanitizedZipCode = substr($zipCode, 0, 5);\n\n if (strlen($sanitizedZipCode) == 4) {\n $sanitizedZipCode = \"0\" . $sanitizedZipCode;\n //if last digit is an alfa in invalid (in france1), then cut off the last char, and insert left zero\n } else if (ctype_alpha($sanitizedZipCode[4])) {\n $sanitizedZipCode = \"0\" . $sanitizedZipCode;\n $sanitizedZipCode = substr($sanitizedZipCode, 0, 5);\n }\n\n return $sanitizedZipCode;\n }", "title": "" }, { "docid": "8fb0a53f0e556dbafdc23238e719ab35", "score": "0.65431947", "text": "public function boot()\n {\n \\Validator::extend('zip_validate', function($attribute, $value, $parameters, $validator) {\n if(isset($parameters[0])){\n $country = $parameters[0];\n }else{\n $country = \"1\"; //$country = \"Finland\";\n }\n\n $zipCodes=array(\n \"US\"=>\"^\\d{5}([\\-]?\\d{4})?$\",\n \"UK\"=>\"^(GIR|[A-Z]\\d[A-Z\\d]??|[A-Z]{2}\\d[A-Z\\d]??)[ ]??(\\d[A-Z]{2})$\",\n \"DE\"=>\"\\b((?:0[1-46-9]\\d{3})|(?:[1-357-9]\\d{4})|(?:[4][0-24-9]\\d{3})|(?:[6][013-9]\\d{3}))\\b\",\n \"CA\"=>\"^([ABCEGHJKLMNPRSTVXY]\\d[ABCEGHJKLMNPRSTVWXYZ])\\ {0,1}(\\d[ABCEGHJKLMNPRSTVWXYZ]\\d)$\",\n \"FR\"=>\"^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$\",\n \"IT\"=>\"^(V-|I-)?[0-9]{5}$\",\n \"AU\"=>\"^(0[289][0-9]{2})|([1345689][0-9]{3})|(2[0-8][0-9]{2})|(290[0-9])|(291[0-4])|(7[0-4][0-9]{2})|(7[8-9][0-9]{2})$\",\n \"NL\"=>\"^[1-9][0-9]{3}\\s?([a-zA-Z]{2})?$\",\n \"ES\"=>\"^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$\",\n \"DK\"=>\"^([D-d][K-k])?( |-)?[1-9]{1}[0-9]{3}$\",\n \"SE\"=>\"^(s-|S-){0,1}[0-9]{3}\\s?[0-9]{2}$\",\n \"BE\"=>\"^[1-9]{1}[0-9]{3}$\",\n \"1\"=>\"^(?:FI)*(\\d{5})$\", // Finland\n \"2\"=> \"^(?:SE)*(\\d{5})$\" // Sweden\n );\n\n if ($zipCodes[$country]) {\n\n if (!preg_match(\"/\".$zipCodes[$country].\"/i\",$value)){\n return false;\n\n } else {\n return true;\n }\n\n } else {\n\n //Validation not available\n\n }\n });\n\n\n /**\n * This is use for check is valid url\n */\n \\Validator::extend('url_validate', function($attribute, $value, $parameters, $validator) {\n\n if(!empty($value)){\n\n if(filter_var($value,FILTER_VALIDATE_URL)){\n return true;\n } else {\n return false;\n }\n } else {\n if(!empty($parameters[0]) && $parameters[0] == \"Link\"){\n return false;\n } else{\n return true;\n }\n }\n });\n\n\n /**\n *\n */\n \\Validator::extend('content_update', function($attribute, $value, $parameters, $validator) {\n\n if(!empty($parameters[0]) && $parameters[0] != \"Link\"){\n if(!empty($parameters[1])){\n return true;\n } else {\n return false;\n }\n } else{\n return true;\n }\n\n });\n\n\n Schema::defaultStringLength(191);\n }", "title": "" }, { "docid": "7c2c81dc9fa731cc23f2a002048c8e32", "score": "0.65011215", "text": "function isPostcodeValid($postcode)\n{\n //remove all whitespace\n $postcode = preg_replace('/\\s/', '', $postcode);\n \n //make uppercase\n $postcode = strtoupper($postcode);\n \n if(preg_match(\"/^[A-Z]{1,2}[0-9]{2,3}[A-Z]{2}$/\",$postcode)\n || preg_match(\"/^[A-Z]{1,2}[0-9]{1}[A-Z]{1}[0-9]{1}[A-Z]{2}$/\",$postcode)\n || preg_match(\"/^GIR0[A-Z]{2}$/\",$postcode))\n {\n return true;\n }\n else {\n return false;\n }\n}", "title": "" }, { "docid": "8d17bf2cd07279f00bb3f981c8547751", "score": "0.64809775", "text": "public static function validZipCode($value, $min = 5){\n\t\tif(preg_match('/(^\\d{5}(-\\d{4})?$)|(^[ABCEGHJKLMNPRSTVXYabceghjklmnprstvxy]{1}\\d{1}[A-Za-z]{1} *\\d{1}[A-Za-z]{1}\\d{1}$)/', $value)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "98af896e0c4a8869d1f8f6a7f12b955d", "score": "0.6466144", "text": "public function test_address_country_validation()\n {\n /*\n * Valid\n */\n $validCountryLocation = Location::factory()->make([\n 'addressCountry' => 'United Kingdom',\n ]);\n $validCountryData = $validCountryLocation->toArray();\n $this->post($this->route(), $validCountryData)->assertStatus(201);\n\n /*\n * Invalid: missing\n */\n $missingCountryLocation = Location::factory()->make();\n $missingCountryData = $missingCountryLocation->toArray();\n unset($missingCountryData['addressCountry']);\n\n $response = $this->post($this->route(), $missingCountryData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressCountry', 'The address country field is required.');\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressCountry' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressCountry', 'The address country must be a string.');\n }", "title": "" }, { "docid": "5fb44265868497c5fc4c947e43bf67ef", "score": "0.64614046", "text": "function estUnCp($codePostal) {\r\n return strlen($codePostal) == 5 && estEntier($codePostal);\r\n}", "title": "" }, { "docid": "3f9bd2ce5d63a0018213ac90ef92c422", "score": "0.6450847", "text": "function estUnCp($codePostal)\n{\n return strlen($codePostal)== 5 && estEntier($codePostal);\n}", "title": "" }, { "docid": "96044b844c083a6f1fac18d91ee64eb7", "score": "0.6386327", "text": "function setZipCode($value);", "title": "" }, { "docid": "a718f945f191ff595b1a12b04504b046", "score": "0.6380244", "text": "private function parseAndValidate($zip) {\n\t\t\t$zip = trim(preg_replace('([^0-9-\\s])', '-', $zip));\n\t\t\t$zip = preg_replace('([\\s\\+,])', '-', $zip);\n\t\t\tif (strlen($zip) < 5)\n\t\t\t\treturn $this->returnError('Zip code too short');\n\n\t\t\t// chunk by hyphens -- getting rid of the +4\n\t\t\t$parts = explode('-', $zip);\n\n\t\t\t// if there are too many parts, we probably got a crazy string\n\t\t\tif (count($parts) > 2)\n\t\t\t\treturn $this->returnError('Malformed zip code');\n\n\t\t\t// nothing we can do with non-numeric,\n\t\t\t// nb: though it isn't clear how it could be at this stage! -- pointless check?\n\t\t\tif (!is_numeric($parts[0]))\n\t\t\t\treturn $this->returnError('Non-numeric zip code');\n\t\t\treturn $parts[0];\n\t\t}", "title": "" }, { "docid": "7e7810acbc494a7dcfe68dbbc538a9a3", "score": "0.635577", "text": "public function testPostal()\n {\n $this->assertFalse(BrValidation::postal('111'));\n $this->assertFalse(BrValidation::postal('1111'));\n $this->assertFalse(BrValidation::postal('1234-123'));\n $this->assertFalse(BrValidation::postal('12345-12'));\n\n $this->assertTrue(BrValidation::postal('88000-123'));\n $this->assertTrue(BrValidation::postal('01234-123'));\n $this->assertTrue(BrValidation::postal('01234123'));\n }", "title": "" }, { "docid": "81eee1e360869bbbbb7466e90aaba597", "score": "0.63535243", "text": "public static function _postalcode($value, $field) {\n\t\t$regex = '/^[A-Za-z][0-9][A-Za-z] ?[0-9][A-Za-z][0-9]$/';\n\t\treturn (bool)preg_match($regex, $value);\n\t}", "title": "" }, { "docid": "3932a90758fb6ce12060812b2651ef50", "score": "0.6339095", "text": "function validatePostcode(&$errors, $field_list, $field_name)\n{\n\t$PostcodePat = '/^[0-9]{4}$/'; //postcode regex\n\tif (!isset($field_list[$field_name])|| empty($field_list[$field_name])) //checks if empty\n\t\t$errors[$field_name] = ' Required';\n\telse if (!preg_match($PostcodePat, $field_list[$field_name])) //checks if matches the given regex\n\t\t$errors[$field_name] = ' Invalid';\n}", "title": "" }, { "docid": "d711aab8471fcee30baf9990734cec7e", "score": "0.6326901", "text": "function checkPostcode(&$toCheck) {\n\t$alpha1 = \"[abcdefghijklmnoprstuwyz]\"; // Character 1\n\t$alpha2 = \"[abcdefghklmnopqrstuvwxy]\"; // Character 2\n\t$alpha3 = \"[abcdefghjkpmnrstuvwxy]\"; // Character 3\n\t$alpha4 = \"[abehmnprvwxy]\"; // Character 4\n\t$alpha5 = \"[abdefghjlnpqrstuwxyz]\"; // Character 5\n\t// Expression for postcodes: AN NAA, ANN NAA, AAN NAA, and AANN NAA with a space\n\t$pcexp[0] = '/^(' . $alpha1 . '{1}' . $alpha2 . '{0,1}[0-9]{1,2})([[:space:]]{0,})([0-9]{1}' . $alpha5 . '{2})$/';\n\n\t// Expression for postcodes: ANA NAA\n\t$pcexp[1] = '/^(' . $alpha1 . '{1}[0-9]{1}' . $alpha3 . '{1})([[:space:]]{0,})([0-9]{1}' . $alpha5 . '{2})$/';\n\n\t// Expression for postcodes: AANA NAA\n\t$pcexp[2] = '/^(' . $alpha1 . '{1}' . $alpha2 . '{1}[0-9]{1}' . $alpha4 . ')([[:space:]]{0,})([0-9]{1}' . $alpha5 . '{2})$/';\n\n\t// Exception for the special postcode GIR 0AA\n\t$pcexp[3] = '/^(gir)(0aa)$/';\n\n\t// Standard BFPO numbers\n\t$pcexp[4] = '/^(bfpo)([0-9]{1,4})$/';\n\n\t// c/o BFPO numbers\n\t$pcexp[5] = '/^(bfpo)(c\\/o[0-9]{1,3})$/';\n\n\t// Overseas Territories\n\t$pcexp[6] = '/^([a-z]{4})(1zz)$/';\n\n\t// Load up the string to check, converting into lowercase\n\t$postcode = strtolower($toCheck);\n\n\t// Assume we are not going to find a valid postcode\n\t$valid = false;\n\n\t// Check the string against the six types of postcodes\n\tforeach ($pcexp as $regexp) {\n\t\tif (preg_match($regexp, $postcode, $matches)) {\n\n\t\t\t// Load new postcode back into the form element\n\t\t\t$postcode = strtoupper($matches[1] . ' ' . $matches [3]);\n\n\t\t\t// Take account of the special BFPO c/o format\n\t\t\t$postcode = str_replace('C\\/O', 'c/o ', $postcode);\n\n\t\t\t// Remember that we have found that the code is valid and break from loop\n\t\t\t$valid = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return with the reformatted valid postcode in uppercase if the postcode was\n\t// valid\n\tif ($valid) {\n\t\t$toCheck = $postcode;\n\t\t$data['post_code'] = $postcode;\n\t\t$_POST['post_code'] = $postcode;\n\t\treturn true;\n\t} else\n\t\treturn false;\n}", "title": "" }, { "docid": "2836c974ea2d16de6183c9baf5b17720", "score": "0.63000274", "text": "public function testCountryCode()\n {\n\n $this->assertTrue(\\Validator::make(['a' => 'NL'],['a' => 'country_code'])->passes());\n $this->assertTrue(\\Validator::make(['a' => 'FR'],['a' => 'country_code'])->passes());\n $this->assertTrue(\\Validator::make(['a' => 'BE'],['a' => 'country_code'])->passes());\n\n $this->assertFalse(\\Validator::make(['a' => 'AA'],['a' => 'country_code'])->passes());\n $this->assertFalse(\\Validator::make(['a' => 1],['a' => 'country_code'])->passes());\n $this->assertFalse(\\Validator::make(['a' => null],['a' => 'country_code'])->passes());\n $this->assertFalse(\\Validator::make(['a' => 'fdsafgdsagfsda'],['a' => 'country_code'])->passes());\n\n }", "title": "" }, { "docid": "92213694fb7e46135056a5945cfb33fe", "score": "0.62259614", "text": "function _addresses_country_valid($country) {\n if (empty($country)) {\n return FALSE;\n }\n\n // Country codes are listed in lowercase throughout the system\n $country = drupal_strtolower($country);\n\n // Cache results to prevent _addresses_country_get() being ran unnecessarily\n // Won't be needed once http://drupal.org/node/680376 is complete\n static $countries = array(\n 'invalid' => array(),\n 'valid' => array()\n );\n // If country is in the invalid sub-array elseif in the valid sub-array\n if (array_search($country, $countries['invalid']) !== FALSE) {\n return FALSE;\n }\n elseif (array_search($country, $countries['valid']) !== FALSE) {\n return TRUE;\n }\n\n // See if country code is found by _addresses_country_get().\n if (!_addresses_country_get(array($country => ' '))) {\n $countries['invalid'][] = $country;\n return FALSE;\n }\n\n $countries['valid'][] = $country;\n return TRUE;\n}", "title": "" }, { "docid": "554764d7d7aab70c2cbb5bb672b00ad2", "score": "0.62023556", "text": "function zipValid($validationData)\n\t{\n\t\treturn preg_match('/^[0-9]{5}$/', $validationData) OR \n\t\t\t preg_match('/^[0-9]{5}\\-[0-9]{4}$/', $validationData) OR \n\t\t\t preg_match('/^[a-zA-Z][0-9][a-zA-Z]\\s[0-9][a-zA-Z][0-9]$/', $validationData);\n\t}", "title": "" }, { "docid": "e4553dabba07e233e0392f600b89d82e", "score": "0.61375976", "text": "function _addresses_province_valid($country, $province) {\n if (substr($country, 0, 4) == 'top_') {\n $country = substr($country, 4);\n }\n\n // Ensure that country code provided is valid\n if (!_addresses_country_valid($country)) {\n return FALSE;\n }\n\n $provinces = _addresses_province_get($country);\n\n // If the country chosen does not contain any provinces\n if (empty($provinces)) {\n return NULL;\n }\n\n // If $province provided matches ISO-3166-2 code.\n if ($provinces[strtoupper($province)]) {\n // Province supplied is ISO-3166-2 code.\n return $province;\n }\n\n // Flip array and change to lowercase to match names in key, can not use\n // array_search() or in_array() as they are case-sensitive.\n $provinces = array_change_key_case(array_flip($provinces));\n if ($provinces[strtolower($province)]) {\n // Return the ISO-3166-2 province code.\n return $provinces[strtolower($province)];\n }\n\n // $province provided did not return any valid matches.\n return FALSE;\n}", "title": "" }, { "docid": "3cc88d25bcf2d38d2319eda79da8c7b5", "score": "0.6122218", "text": "function isZipInCity($zip){\r\n\t\t$filters = array(\r\n\t\t\tarray(\r\n\t\t\t\t\t\"field\" => 'Zip',\r\n\t\t\t\t\t\"filter\" => 'Equal',\r\n\t\t\t\t\t\"value\" => $zip\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t$tbsResult = $this->getResource('lkzipcodes', null, 'All', $filters);\r\n\t\t$count = count($tbsResult);\r\n\t\t\tif($count > 1){\r\n\t\t\t\tforeach ($tbsResult as $zipCodeRecord) {\r\n\t\t\t\t\tif($zipCodeRecord->DEFAULT == \"Y\") {\r\n\t\t\t\t\t\t$inCity = $zipCodeRecord->INOUTCITY;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t} elseif ($count == 1){\r\n\t\t\t\t$inCity = $tbsResult[0]->INOUTCITY;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\tswitch($inCity){\r\n\t\t\tcase \"I\":\r\n\t\t\t// in city\r\n\t\t\treturn true;\r\n\r\n\t\t\tcase \"O\":\r\n\t\t\t// out of city\r\n\t\t\treturn false;\r\n\r\n\t\t\tcase \"B\":\r\n\t\t\t// both\r\n\t\t\treturn true;\r\n\r\n\t\t\tcase null:\r\n\t\t\t// not set\r\n\t\t\treturn false;\r\n\r\n\t\t\tdefault :\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4a39dc89079c31db7b5d77e73bc089c1", "score": "0.61124754", "text": "public static function zip($zip, $check_usps=true){\n\n\t\t$result = new sb_Validate_Results();\n\t\t$result->value = $zip;\n\t\t$result->is_valid = false;\n\n\t\tif(preg_match(\"/^(\\d{5})(-\\d{4})*$/\", $zip)){\n\t\t\t$result->message = \"Valid zip code format\";\n\t\t\t$result->is_valid = true;\n\n\t\t\tif($check_usps){\n\n\t\t\t\t$page = @file_get_contents(\"http://zip4.usps.com/zip4/zcl_3_results.jsp?zip5=\".substr($zip, 0, 5).\"&submit.x=50&submit.y=5&submit=Find+ZIP+Code\");\n\n\t\t\t\tif(!$page){\n\t\t\t\t\t$result->message .= ' cannot reach USPS site to validate zip code existence';\n\t\t\t\t} else {\n\t\t\t\t\tpreg_match(\"~<b>(.*?)</b>~\", $page, $city);\n\t\t\t\t\tif(isset($city[1])){\n\n\t\t\t\t\t\t$data = explode(\",\", strtolower($city[1]));\n\n\t\t\t\t\t\t$result->city = ucwords(trim($data[0]));\n\t\t\t\t\t\t$result->state = strtoupper(trim($data[1]));\n\t\t\t\t\t\t$result->message .= \" for \".$result->city.','.$result->state;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$result->message .= \" but city not found!\";\n\t\t\t\t\t\t$result->is_valid = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$result->message = \"Invalid zip code format \";\n\t\t}\n\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "11215dd75997dfa0bf0d077ad66c95c9", "score": "0.60912824", "text": "public function getZipCode(): string;", "title": "" }, { "docid": "b304147af2d5040378bfae37e94c5a66", "score": "0.6085631", "text": "function extractZipcode($address){\n if( preg_match('/\\d{5}(-\\d{4})?\\b/', $address, $matches) ){\n return $matches[0];\n }\n\n}", "title": "" }, { "docid": "6214096d5ac84a913a95395d5f3468f8", "score": "0.6060057", "text": "public function testValidatePhoneNumber__ReturnsValid_GivenCountrycodeNoDialingCodeRequiredTrue()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'Please enter a valid phone number',\n $person->validatePhoneNumber(\"+44 360832\", true)\n );\n }", "title": "" }, { "docid": "6778caf6e97cbaf8603a7817cc22ae4b", "score": "0.6049068", "text": "public function validate_state($state, $country)\n {\n }", "title": "" }, { "docid": "4f446963813638e4ac2477d7815541a7", "score": "0.60109025", "text": "public function countryCode();", "title": "" }, { "docid": "528030b4c5bf3a841ec8bef4a59f3b5e", "score": "0.5976432", "text": "public function validZIP($ZIP)\r\n\t{\r\n\t\treturn DB::table('zip_codes')->where('zip_code', $ZIP)->exists();\r\n\t}", "title": "" }, { "docid": "b27392bbdf85d21b5b0538231e403006", "score": "0.5971617", "text": "function _addresses_province_validate($form, &$form_state) {\n // Check if its a valid province.\n // It should be the Province code listed on the\n // given COUNTRY.inc file\n $province = $form['province']['#value'];\n $country = $form['country']['#value'];\n if (substr($country, 0, 4) == 'top_') {\n $country = substr($country, 4);\n }\n if ($country && $province) {\n $provinces = _addresses_province_get($country);\n if (empty($provinces[drupal_strtoupper($province)])) {\n\n // Get the province fieldname\n $field_name = $form['province']['#name'];\n $field_name = drupal_substr($field_name, 0, -1);\n $field_name = preg_replace('/([^]])\\[/', '\\1][', $field_name);\n\n $countries = _addresses_country_get();\n form_set_error($field_name, t('Could not find %province as a province from %country. Try to use the province abbreviation or number.', array(\n '%province' => $form['province']['#value'],\n '%country' => $countries[$country])));\n }\n }\n}", "title": "" }, { "docid": "65d256797a605de1ec89d941a66f84f5", "score": "0.59712917", "text": "public function is_valid_mobile_number_old($number='', $country_code='pk'){\n $is_valid_number=false;\n if(empty($number)){return false;}\n $number=$this->clean_string($number,array(' ','-',',','+'));\n $number=filter_var($number, FILTER_SANITIZE_NUMBER_FLOAT);\n $length=strlen($number);\n switch (strtolower($country_code)){\n case 'pk': { \n switch ($length){\n case 10 : { if(substr($number, 0, 1)=='3'){ $is_valid_number=true;} \n }break;\n case 11 : { if(substr($number, 0, 2)=='03'){ $is_valid_number=true;} \n }break;\n case 12 : { if(substr($number, 0, 3)=='923'){ $is_valid_number=true;} \n }break;\n case 13 : { if(substr($number, 0, 4)=='+923'){ $is_valid_number=true;} \n }break;\n }\n }break; \n default:{ \n switch ($length){\n case 10 : { if(substr($number, 0, 1)=='3'){ $is_valid_number=true;} \n }break;\n case 11 : { if(substr($number, 0, 2)=='03'){ $is_valid_number=true;} \n }break;\n case 12 : { if(substr($number, 0, 3)=='923'){ $is_valid_number=true;} \n }break;\n case 13 : { if(substr($number, 0, 4)=='+923'){ $is_valid_number=true;} \n }break;\n }\n }break;\n }\n return $is_valid_number;\n }", "title": "" }, { "docid": "5e24a29250d6c2a2193a8c7681628eae", "score": "0.5964276", "text": "public function testValidatePhoneNumber__ReturnsValid_GivenCountrycodeNoDialingCodeRequiredFalse()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'Please enter a valid phone number',\n $person->validatePhoneNumber(\"+44 360832\", false)\n );\n }", "title": "" }, { "docid": "b43d74e176e668a6c2706bd8d12bef60", "score": "0.5963667", "text": "public function getPostalCode();", "title": "" }, { "docid": "d2f825925dd67a7eb02e3f54bfada29d", "score": "0.5929694", "text": "public function _addPostalValidation($rule) {\r\n $regex = empty($rule->rule[1]) ? null : $rule->rule[1];\r\n $country = empty($rule->rule[2]) ? 'us' : $rule->rule[2];\r\n\r\n if ($regex === null) {\r\n switch ($country) {\r\n case 'uk':\r\n $regex = '/\\\\A\\\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\\\b\\\\z/i';\r\n break;\r\n case 'ca':\r\n $district = '[ABCEGHJKLMNPRSTVYX]';\r\n $letters = '[ABCEGHJKLMNPRSTVWXYZ]';\r\n $regex = \"/\\\\A\\\\b{$district}[0-9]{$letters} [0-9]{$letters}[0-9]\\\\b\\\\z/i\";\r\n break;\r\n case 'it':\r\n case 'de':\r\n $regex = '/^[0-9]{5}$/i';\r\n break;\r\n case 'be':\r\n $regex = '/^[1-9]{1}[0-9]{3}$/i';\r\n break;\r\n case 'us':\r\n $regex = '/\\\\A\\\\b[0-9]{5}(?:-[0-9]{4})?\\\\b\\\\z/i';\r\n break;\r\n }\r\n }\r\n\r\n return array(\r\n 'rule' => 'pattern',\r\n 'value' => $regex,\r\n );\r\n }", "title": "" }, { "docid": "ebafdb5867bbbd120513849c02ae44fc", "score": "0.5886227", "text": "public function test_postal_code_validation()\n {\n /*\n * Valid\n */\n $validPostalCodeLocation = Location::factory()->make([\n 'postalCode' => 'A9 9AA',\n ]);\n $validPostalCodeData = $validPostalCodeLocation->toArray();\n $this->post($this->route(), $validPostalCodeData)->assertStatus(201);\n\n /*\n * Invalid: missing\n */\n $missingPostalCodeLocation = Location::factory()->make();\n $missingPostalCodeData = $missingPostalCodeLocation->toArray();\n unset($missingPostalCodeData['postalCode']);\n\n $response = $this->post($this->route(), $missingPostalCodeData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.postalCode', 'The postal code field is required.');\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'postalCode' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.postalCode', 'The postal code must be a string.');\n\n /**\n * Invalid: No space\n */\n $noSpaceLocation = Location::factory()->make([\n 'postalCode' => 'A99AA',\n ]);\n $noSpaceData = $noSpaceLocation->toArray();\n\n $response = $this->post($this->route(), $noSpaceData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.postalCode', 'The postal code format is invalid.');\n\n /**\n * Invalid: Too many outcode characters\n */\n $outcodeSurplusLocation = Location::factory()->make([\n 'postalCode' => 'AA999 9AA',\n ]);\n $outcodeSurplusData = $outcodeSurplusLocation->toArray();\n\n $response = $this->post($this->route(), $outcodeSurplusData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.postalCode', 'The postal code format is invalid.');\n\n /**\n * Invalid: Too many incode characters\n */\n $incodeSurplusLocation = Location::factory()->make([\n 'postalCode' => 'AA99 9AAA',\n ]);\n $incodeSurplusData = $incodeSurplusLocation->toArray();\n\n $response = $this->post($this->route(), $incodeSurplusData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.postalCode', 'The postal code format is invalid.');\n }", "title": "" }, { "docid": "c3544212f8c787f1a61343a5dfe04df6", "score": "0.5885584", "text": "public function testValidatePhoneWithCountryFieldNoType()\n\t{\n\t\t$this->assertTrue($this->performValidation(['value' => '016123456', 'country' => 'BE']));\n\n\t\t// Validator with wrong country field supplied.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'country' => 'NL']));\n\t}", "title": "" }, { "docid": "0f82f2797dfebc5368ab5ed19bc49643", "score": "0.58782333", "text": "function is_valid_uk_postcode($postcode) {\n\t$postcode = str_replace(\" \", \"\", $postcode);\n\t$postcode = strtoupper($postcode);\n\t\tif ( eregi('^[A-Z]{1,2}[0-9]{1,2}[A-Z]? ?[0-9][A-Z]{2}$', $postcode) and \n\t\t ( strlen($postcode) < 8 ) and \n\t\t ( strlen($postcode) > 0 )\n\t\t ) {\n\t\n\t$halve[1] = substr($postcode, -3, 3);\n\t$position = strpos($postcode, $halve[1]);\n\t$halve[0] = substr($postcode, 0, $position);\n\t//return $halve;\n\treturn true;\n\t}\n\telse\n\treturn false;\n\t}", "title": "" }, { "docid": "b2a1bceaba7b3876d1d3b4edcb414622", "score": "0.58762014", "text": "static public function zipcode($zip)\n {\n //originalni hodnotu si necham pro pripat ze nebudu formatovat\n $orig_zip = $zip;\n\n $zip = str_replace(' ', '', $zip);\n //podle delky cisla zvolim formatovani\n if (strlen($zip) == 5)\n {\n return preg_replace(\"/([0-9]{3})([0-9]{2})/\", \"$1 $2\", $zip);\n }\n return $orig_zip;\n }", "title": "" }, { "docid": "f747da8a49a6e693e379111b6215014b", "score": "0.5873467", "text": "public function validateDeliveryAddress($street = '', $postcode = \"\", $city = \"\")\n {\n return $this->apiClient->doCall(\n \"get\",\n \"address?\" . http_build_query(\n array(\n 'street' => $street,\n 'postcode' => $postcode,\n 'city' => $city,\n )\n )\n );\n }", "title": "" }, { "docid": "a54a154910529342c8a80d2abc9405eb", "score": "0.5869228", "text": "public function getZipCode()\n {\n return parent::getValue('zip_code');\n }", "title": "" }, { "docid": "5022b309ef2987272ef211c024fd56de", "score": "0.5865023", "text": "public function test_it_includes_state_and_zip_on_error_response_when_zip_code_is_not_serviceable()\n {\n $parameters = [\n 'first_name' => 'Albus',\n 'last_name' => 'Dumbledore',\n 'email' => '[email protected]',\n 'password' => 'password',\n 'terms' => true,\n 'zip' => 10029\n ];\n\n $response = $this->post(route('users.store'), $parameters);\n\n $response->assertStatus(ResponseCode::HTTP_BAD_REQUEST);\n\n $response->assertJsonFragment([\n \"detail\" => [\n 'message' => 'Sorry, we do not service this zip.',\n 'city' => 'New York',\n 'state' => 'NY',\n ]\n ]);\n }", "title": "" }, { "docid": "aa41df425ca8e83dcffcf57b0ea898ba", "score": "0.5848832", "text": "abstract public function countryISOCode();", "title": "" }, { "docid": "d66577b51cf3cea0a9957bc0558af9c8", "score": "0.5810032", "text": "function _addresses_province_field_validate($form, &$form_state) {\n // If province is not required and empty then prevent validation\n if (!$form['province']['#required'] && $form['province']['#value'] == '') {\n return;\n }\n\n $province = _addresses_province_valid(\n $form['country']['#value'],\n $form['province']['#value']\n );\n\n // If province is valid or if the country does not have any provinces\n if ($province || is_null($province)) {\n // Find array's key path to province field's value in $form_state\n $form_state_province =& $form_state['values'];\n foreach ($form['province']['#parents'] as $v) {\n $form_state_province =& $form_state_province[$v];\n }\n\n // Set province to ISO-3166-2 code (properly uppercased)\n $form_state_province = $province;\n }\n // Prevent inability to alter CCK fields in some instances\n elseif ($form_state['values']['form_id'] != 'content_field_edit_form') {\n // Get the province fieldname\n $field_name = $form['province']['#name'];\n $field_name = drupal_substr($field_name, 0, -1);\n $field_name = preg_replace('/([^]])\\[/', '\\1][', $field_name);\n\n $countries = _addresses_country_get();\n form_set_error($field_name, t('Could not find %province as a province from %country. Try to use the province abbreviation or number.', array(\n '%province' => $form['province']['#value'],\n '%country' => $countries[$form['country']['#value']])));\n }\n}", "title": "" }, { "docid": "d362307cf2820c17fa1d580003c22c77", "score": "0.5805155", "text": "private function isAddressValid(array $address){\n //we need state, zip, street, city\n $streetNum = (isset($address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_STREET_NUMBER]) ?\n $address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_STREET_NUMBER] : \"\");\n $street = (isset($address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_STREET_NAME]) ?\n $address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_STREET_NAME] : \"\");\n $city = (isset($address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_CITY])?\n $address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_CITY] : \"\");\n $state = (isset($address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_STATE])?\n $address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_STATE] : \"\");\n $zip = (isset($address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_ZIP_CODE]) ?\n $address[FieldKeys::$EZ_QUOTE_ADDRESS_BASIC_INFO][FieldKeys::$VALIDATE_ADDRESS_PROPERTY_ZIP_CODE] : \"\");\n\n if(strlen($streetNum==0)||\n strlen($street)==0 ||\n strlen($city)==0 ||\n strlen($state)==0 ||\n strlen($zip)==0){ //empty zip code, bogus address returned\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "fb83719f12338e9776080db5354abff3", "score": "0.5766411", "text": "public function country_check(){\n\t\t\t$str = $this->input->post('vehicle_location_country');\n\t\t\tif ($str == '' || $str == '0'){\n\t\t\t\t$this->form_validation->set_message('country_check', 'Please select a country');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e43f35948983def4636fdc7c6743cd61", "score": "0.5754453", "text": "private function _validePostalCodeIsFull($postalCode) {\n\t\treturn preg_match(Configure::read('regex.postal_code'), $postalCode);\n\t}", "title": "" }, { "docid": "7c54a48961380bfe15afb3486b3e03c2", "score": "0.5752098", "text": "function isValidPostcodeField($strInputValue, &$returnedResult)\n{\n $strAllowableChars = \" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-\";\n $strInputValue = trim($strInputValue);\n $returnedResult = validateString($strInputValue, $strAllowableChars, FALSE, TRUE, 10, -1);\n\n if ($returnedResult == FIELD_VALID) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "8a15aa45ccf1b6201efe767cd091147f", "score": "0.57375026", "text": "public function testValidatePhoneWithCountryFieldWithType()\n\t{\n\t\t$this->assertTrue($this->performValidation(['value' => '0499123456', 'params' => 'mobile', 'country' => 'BE']));\n\n\t\t// Validator with correct country field supplied, wrong type.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'mobile', 'country' => 'BE']));\n\n\t\t// Validator with wrong country field supplied, correct type.\n\t\t$this->assertFalse($this->performValidation(['value' => '0499123456', 'params' => 'mobile', 'country' => 'NL']));\n\n\t\t// Validator with wrong country field supplied, wrong type.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'mobile', 'country' => 'NL']));\n\t}", "title": "" }, { "docid": "3f4a22ce68d05059cbcfc349832c95c0", "score": "0.57325613", "text": "public static function validate_zip( $field_names ) {\n\t\tif ( is_array( $field_names ) ) {\n\t\t\tforeach ( $field_names as $field )\n\t\t\t\tself::validate_zip( $field );\n\n\t\t\treturn; // We're done with this method at this point\n\t\t}\n\t\t\n\t\t// Don't try to validate blank data (this allows optional fields to be validated only if they've been filled out)\n\t\tif ( $_POST[$field_names] === '' )\n\t\t\treturn;\n\t\t\n\t\t// Check if the formatting is valid\n\t\tif ( ! preg_match( '/^\\d{5}(-\\d{4})?$/', $_POST[$field_names] ) && ! self::is_invalid( $field_names ) )\n\t\t\tself::log_error( $field_names, ERROR_ZIP_FORMAT );\n\t}", "title": "" }, { "docid": "7ce4559eb752603e9c87596f2581ed48", "score": "0.5728702", "text": "public function testValidatePhoneWithDefaultCountryNoType()\n\t{\n\t\t$this->assertTrue($this->performValidation(['value' => '016123456', 'params' => 'BE']));\n\n\t\t// Validator with wrong country value.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'NL']));\n\n\t\t// Validator with multiple country values, one correct.\n\t\t$this->assertTrue($this->performValidation(['value' => '016123456', 'params' => 'BE,NL']));\n\n\t\t// Validator with multiple wrong country values.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'DE,NL']));\n\t}", "title": "" }, { "docid": "b71166a0468c349b41f8f6e26ab8b874", "score": "0.5728466", "text": "public function cityname_validation($city) {\n $this->form_validation->set_message('cityname_validation', 'The %s field is not valid City or Destination Code');\n\n preg_match_all('/\\(([A-Za-z0-9 ]+?)\\)/', $city, $out);\n $cityCode = $out[1];\n\n if (!empty($cityCode))\n return TRUE;\n else\n return FALSE;\n }", "title": "" }, { "docid": "aeef1cad5c0560908211d07d9818af8e", "score": "0.57227546", "text": "function isValidCityField($strInputValue, &$returnedResult)\n{\n $strAllowableChars = \" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.',/\\\\()&:+\\n\\r\";\n $strInputValue = trim($strInputValue);\n $returnedResult = validateString($strInputValue, $strAllowableChars, TRUE, TRUE, 40, -1);\n\n if ($returnedResult == FIELD_VALID) {\n return TRUE;\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "b8f23c1e195c7ef8b2d2809ae91858af", "score": "0.5706566", "text": "public function setZip($zip)\n {\n if ($this->_validation->validateIsString($zip)) {\n $this->_zip = $zip;\n } else {\n throw new PiRatepay_Paypage_Util_ValidationException(109);\n }\n }", "title": "" }, { "docid": "3b353bc99a04c8b6143f813b9379cd25", "score": "0.56735337", "text": "function _addresses_validate_top_countries($element, &$form_state) {\n if (isset($element['#parents'][0])) {\n $field_name = $element['#parents'][0];\n }\n else {\n $field_name = 'addresses';\n }\n if (isset($form_state['values'][$field_name]['0']['country']) && $form_state['values'][$field_name]['0']['country'] == 'separator') {\n // the user selected the separator!\n $form_state['values'][$field_name]['0']['country'] = '';\n }\n elseif ($form_state['values'][$field_name]['country'] == 'separator') {\n // the user selected the separator!\n $form_state['values'][$field_name]['country'] = '';\n }\n elseif (isset($form_state['values'][$field_name]['0']['country']) && substr($form_state['values'][$field_name]['0']['country'], 0, 4) == 'top_') {\n $form_state['values'][$field_name]['0']['country'] = substr($form_state['values'][$field_name]['0']['country'], 4);\n }\n elseif (substr($form_state['values'][$field_name]['country'], 0, 4) == 'top_') {\n $form_state['values'][$field_name]['country'] = substr($form_state['values'][$field_name]['country'], 4);\n }\n}", "title": "" }, { "docid": "756c5a172c84b4a3de9c6b3d8296c86d", "score": "0.5672686", "text": "function isAddress($input)\n{\n $pattern = \"/^[a-zA-Z0-9]{33,34}$/\";\n return preg_match($pattern, $input);\n}", "title": "" }, { "docid": "5ff5fd4eadef88fb8b6b95e1399ae30f", "score": "0.56466705", "text": "static function checkAddress($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d,][\\W\\w\\d\\s,]{1,40}$/', $input)) {\r\n return true; //Illegal Character found!\r\n }\r\n else{\r\n echo PageBuilder::printError(\"Please enter alphabets and numbers with comma seperation, maximum of 40 characters.\");\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "011007dd424a00c4a7f70f0da21d6b95", "score": "0.56439346", "text": "public function validatePhoneNr($phone, $country='') {\n\n\t\t\tif (!$country) {\n\t\t\t\t$country = $this->defaultCountry;\n\t\t\t}\n\t\t\t\n\t\t\tswitch (strtolower($country)) {\n\t\t\t\t\n\t\t\t\t// Alle Laender\n\t\t\t\tcase 'de':\n\t\t\t\tcase 'at':\n\t\t\t\tdefault:\n\n\t\t\t\t\t// Leerzeichen, Tabs, Zeilen-Umbrueche entfernen\n\t\t\t\t\t$phone = trim(preg_replace('/[\\s\\t\\r\\n]/s', '', $phone));\n\t\t\t\t\t\n\t\t\t\t\t// 11.11.2009 rm - doch nicht hier - eher in cleanupPhoneNr() - oder\n\t\t\t\t\t// Doppelte Trennzeichen ..//-- entfernen\n\t\t\t\t\t// $phone = preg_replace('/[[:punct:]]([[:punct:]])+/s', '$1', $phone);\n\t\t\t\t\t// Am Anfang und Ende alle Zeichen wie .,-/ entfernen\n\t\t\t\t\t// $phone = preg_replace(array('/([[:punct:]]*)$/s', '/^([^0-9\\+]*)/s'), '', $phone);\n\t\t\t\t\t\n\t\t\t\t\t// if (!preg_match('/^[+\\d-\\/.]+$/s', $phone)) {\n\t\t\t\t\t// +49(711)323-1231 \n\t\t\t\t\t// -> http://www.pagecolumn.com/tool/pregtest.htm\n\t\t\t\t\t\n\t\t\t\t\t// mehrere ./- in Folge kann/soll nicht sein -> false\n\t\t\t\t\tif( preg_match('/^.*[-\\/\\.]{2,}.*$/s', $phone))\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t// if (!preg_match('/^((\\+)?(\\d+))*(\\(\\d+\\))*\\d{2}[\\d-\\/.]+\\d{2}$/', $phone)) {\n\t\t\t\t\t// if (!preg_match('/^((\\+)?(\\d+))*(\\(\\d+\\))*(\\d{2,}[\\d-\\/\\.]+\\d{2})|(\\d{7,})$/', $phone)) {\n\t\t\t\t\t// if( !preg_match('/^((\\+[1-9]\\d*)*\\d+)*(\\(\\d+\\))*(\\d{2,})|(\\d{7,})$/', $phone)) {\n\t\t\t\t\t// if( !preg_match('/^((\\+[1-9]\\d*)*\\d+)*(\\(\\d+\\))*\\d{2,})$/s', $phone)) {\n\t\t\t\t\t\n\t\t\t\t\tif( !preg_match('/^(\\+[1-9])*((\\(\\d+\\))(([\\d-\\/\\.]{2,}\\d{2,}))|([\\d-\\/\\.]{6,}\\d{2,})|(\\d{6,}))$/s', $phone)) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "08ac25118b454624c6df55b4700e751d", "score": "0.56423527", "text": "function country( $country_code ) {\n\t\tif( $country_code < 0 || !$country_code ) {\n\t\t\t$this->set_message( 'country', 'Please select your country.' );\n\t\t} else {\n\t\t\t$this->set_message( 'country', 'Country is not valid.' );\n\t\t}\n\n\t\t// Get countries list from database and check it\n\t\t$country_codes = $this->CI->app_model->get_country_codes();\n\n\t\t// Check countries exist in system\n\t\treturn ( in_array( $country_code, $country_codes ) ) ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "01a6cadaede52234b4a253f7a1fd6f14", "score": "0.5639561", "text": "function validate_phone($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($filtered_phone_number) != 12) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "bb39232d34092b8b8a664aedbfdc4fab", "score": "0.56380856", "text": "private static function checkCountryCode($countryCode) {\n $countryCode = strtolower($countryCode);\n\n if (empty($countryCode) === true || is_numeric($countryCode) === true) {\n throw new \\Exception('Invalid country code !');\n }\n\n return $countryCode;\n\n }", "title": "" }, { "docid": "0ba63f4cd75e7eab378bc104ae21babb", "score": "0.56342214", "text": "public function validateVATNumber(string $vatNumber, string $countryIso2): bool;", "title": "" }, { "docid": "009a479c7573a15a04ec64f7cb1dd0c6", "score": "0.56233054", "text": "function validate_phone_number($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($phone_to_check) < 8 || strlen($phone_to_check) > 14) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "3be509b1235f5661a2b18cac5ef4a021", "score": "0.5618919", "text": "public function testValidatePhoneWithDefaultCountryWithType()\n\t{\n\t\t$this->assertTrue($this->performValidation(['value' => '0499123456', 'params' => 'BE,mobile']));\n\n\t\t// Validator with correct country value, wrong type.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'BE,mobile']));\n\n\t\t// Validator with wrong country value, correct type.\n\t\t$this->assertFalse($this->performValidation(['value' => '0499123456', 'params' => 'NL,mobile']));\n\n\t\t// Validator with wrong country value, wrong type.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'NL,mobile']));\n\n\t\t// Validator with multiple country values, one correct, correct type.\n\t\t$this->assertTrue($this->performValidation(['value' => '0499123456', 'params' => 'BE,NL,mobile']));\n\n\t\t// Validator with multiple country values, one correct, wrong type.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'BE,NL,mobile']));\n\n\t\t// Validator with multiple country values, none correct, correct type.\n\t\t$this->assertFalse($this->performValidation(['value' => '0499123456', 'params' => 'DE,NL,mobile']));\n\n\t\t// Validator with multiple country values, none correct, wrong type.\n\t\t$this->assertFalse($this->performValidation(['value' => '016123456', 'params' => 'DE,NL,mobile']));\n\t}", "title": "" }, { "docid": "c5d740ff7ccf384c355ec0527ec2b674", "score": "0.5600277", "text": "public function testSetZipCode() {\n\n $obj = new Intervenants();\n\n $obj->setZipCode(\"zipCode\");\n $this->assertEquals(\"zipCode\", $obj->getZipCode());\n }", "title": "" }, { "docid": "6c7366ebe1f289d950e706404a7706b7", "score": "0.5599766", "text": "public function isZipInDistrict($zip, $district) {\n $current_district = $this->stockholm_districts[$district];\n if (array_search($zip, $current_district)) {\n print \"Should be true because zip is $zip\";\n return TRUE;\n }\n return FALSE;\n }", "title": "" }, { "docid": "848ea153a03c8f72fe66b253f9ffb579", "score": "0.55904037", "text": "public function zipCode($zipCode = \"\")\n {\n if ($zipCode != \"\") {\n return $this->builder->where(function ($query) use($zipCode) {\n $query->where('address.zip_code', 'LIKE', '%' . $zipCode . '%')->orWhere('zip_codes.zip_code', 'LIKE', '%' . $zipCode . '%');\n });\n }\n return $this->builder;\n }", "title": "" }, { "docid": "c0979f1b3ac20e01eece80d23c805194", "score": "0.5582099", "text": "public function validateUsPhone($filtered_phone_number) {\n $phone_number = filter_var($filtered_phone_number, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_number = str_replace(\"-\", \"\", $phone_number);\n // Remove \"+\" from number\n $phone_number = str_replace(\"+\", \"\", $phone_number);\n // Remove \".\" from number\n $phone_number = str_replace(\".\", \"\", $phone_number);\n // Check the lenght of number for US\n if (strlen($phone_number) == 10 || strlen($phone_number) == 11) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "029226cac341a5efa38e7e7c9b6b37fa", "score": "0.5575192", "text": "function formIsPostal($seshValue,$properName,$returnURL) {\r\n\tif(!eregi(\"^(^[0-9]{5}(\\-* *[0-9]{4})?$)|([a-ceghj-npr-tv-z]{1}[0-9]{1}[a-ceghj-npr-tv-z]{1} *[0-9]{1}[a-ceghj-npr-tv-z]{1}[0-9]{1})$\", $_SESSION[$seshValue])) { \r\n\t\tformError($seshValue,efr(\"Your entry for <em>\".$properName.\"</em> is not a valid postal code or zip code.\",\"Your entry for <em>\".$properName.\"</em> is not a valid postal code or zip code.\"));\t\r\n\t\t$GLOBALS['formIsError']=true;$GLOBALS['formRedirect']=$returnURL;\r\n\t} else {\r\n\t\t$_SESSION[$seshValue]=str_replace(\"--\", \"-\",str_replace(\" \", \" \", $_SESSION[$seshValue]));\r\n\t\t$_SESSION[$seshValue]=strtoupper($_SESSION[$seshValue]);\r\n\t\tif (strlen($_SESSION[$seshValue])==6) {\r\n\t\t\t$_SESSION[$seshValue]=substr_replace($_SESSION[$seshValue], ' ', 3, 0);\r\n\t\t} else if (strlen($_SESSION[$seshValue])==9) {\r\n\t\t\t$_SESSION[$seshValue]=substr_replace($_SESSION[$seshValue], '-', 5, 0);\r\n\t\t} else if (strlen($_SESSION[$seshValue])==10) {\r\n\t\t\t$_SESSION[$seshValue]=str_replace(' ', '-', $_SESSION[$seshValue]);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "8bd55cdf0ba6bd0cc9e02a46d088f6d1", "score": "0.55738115", "text": "static function lookupCity($zip_code = \"\") {\n\t\tif (($result = self::lookup($zip_code)) !== false) {\n\t\t\treturn $result->getCity();\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "3c2471a4998c71389acf3ac99bb25fa4", "score": "0.5562574", "text": "protected function _validateCountryCurrency()\n {\n $country_cur_serv = CountryCurrencyServiceFactory::build();\n if( $info = $country_cur_serv->getCountryCurrencyInfo($this->request->getCountryCurrencyCode()) )\n {\n $this->request->setCountryCode($info['country_code']);\n return $info;\n }\n\n $this->setErrorCode(MessageCode::CODE_COUNTRY_CURRENCY_INVALID_CURRENCY_CODE);\n return false;\n }", "title": "" }, { "docid": "933fe89203becc691f8461d7a98cfd9d", "score": "0.5551705", "text": "function geoip_country_name_by_code($gi, $country_name) {\r\n\t\r\n\tif($key = array_search ($country_name, $gi->GEOIP_COUNTRY_NAMES)) {\r\n\t\treturn $gi->GEOIP_COUNTRY_CODES[$key];\r\n\t}\r\n\r\n\treturn false;\r\n}", "title": "" }, { "docid": "86f78ed18fd12c452ee5e9046d42e5d1", "score": "0.5546898", "text": "function checkCountry($country) {\n\t\tif (empty($_POST['country'])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn !strcmp($country, $_POST['country']);\n\t\t}\n\t}", "title": "" }, { "docid": "f3f96ff40ba28e47afe4defaec634953", "score": "0.5546477", "text": "public static function state($state){\n\n\t\t$result = new sb_Validate_Results();\n\t\t$result->value = $state;\n\n\t\tif(in_array($state, array('AK', 'AL', 'AR', 'AZ', 'CA', 'CO', 'CT', 'DC', 'DE', 'FL', 'GA', 'HI', 'IA', 'ID', 'IL', 'IN', 'KS', 'KY', 'LA', 'MA', 'MD', 'ME', 'MI', 'MN', 'MO', 'MS', 'MT', 'NC', 'ND', 'NE', 'NH', 'NJ', 'NM', 'NV', 'NY', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VA', 'VT', 'WA', 'WV', 'WY'))){\n\n\t\t\t$result->is_valid = true;\n\t\t\t$result->message = 'Valid state code';\n\n\t\t} else {\n\n\t\t\t$result->is_valid = false;\n\t\t\t$result->message = 'Invalid state code, are you sure you are using a two letter abbreviation';\n\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "976be35139c9b616ef83a58f5fcecd6c", "score": "0.55332977", "text": "function venture_deal_validate_country($element) {\n global $form_values;\n if ($form_values['field_deal_country']['key'] == 'United States') {\n if ($profile = venture_profile_retrieve(arg(1))) {\n if (!venture_profile_is_accredited($profile)) {\n form_set_error('field_deal_country', 'Country field is invalid. United States deals may not be submitted to a non-accredited investor.');\n }\n }\n }\n}", "title": "" }, { "docid": "d55bb59d5481b0f82316310e1a63458e", "score": "0.5523626", "text": "function validateLatitude($lat) {\n return preg_match('/^(\\+|-)?(?:90(?:(?:\\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\\.[0-9]{1,32})?))$/', $lat);\n}", "title": "" }, { "docid": "45012f3d45f7c10db764579d3b7a4884", "score": "0.55197567", "text": "public function validateZip($attribute, $value, $parameters) {\n return preg_match('/^[0-9]{5}(\\-[0-9]{4})?$/', $value);\n }", "title": "" }, { "docid": "79d6d59c9c6e28be901184c6699c5f47", "score": "0.5517807", "text": "public function test_address_region_validation()\n {\n /*\n * Valid\n */\n $validRegionLocation = Location::factory()->make([\n 'addressRegion' => 'Greater Manchester',\n ]);\n $validRegionData = $validRegionLocation->toArray();\n $this->post($this->route(), $validRegionData)->assertStatus(201);\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressRegion' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressRegion', 'The address region must be a string.');\n }", "title": "" }, { "docid": "eef050fc927083f5e8993ef3741c5403", "score": "0.5516504", "text": "public function addPostalCode($postalCode);", "title": "" }, { "docid": "5dfd08e095162491e5bc43bfd9a9773d", "score": "0.55161566", "text": "public static function postalCode($value, $locale = 'US') {\n\t\ttry {\n\t\t\t// Setup\n\t\t\t$result = false;\n\t\t\t$length = strlen($value);\n\t\t\t$numeric = self::numeric($value);\n\t\t\t\n\t\t\t// Check Value\n\t\t\tswitch($locale) {\n\t\t\t\tdefault:\n\t\t\t\tcase 'US':\n\t\t\t\t\tif($length == (5 || 9) && $numeric) {\n\t\t\t\t\t\t$result = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// @todo implement support for additional locales\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\tcatch(\\Exception $ex) {\n\t\t\t\\Bedrock\\Common\\Logger::exception($ex);\n\t\t}\n\t}", "title": "" }, { "docid": "d4c2016447018b7f396bfd284fb0e81e", "score": "0.5515285", "text": "public static function postal($check) {\n\t\t$pattern = '/\\\\A\\\\b[A-Z]{1,2}[0-9][A-Z0-9]? [0-9][ABD-HJLNP-UW-Z]{2}\\\\b\\\\z/i';\n\t\treturn (bool)preg_match($pattern, $check);\n\t}", "title": "" }, { "docid": "06f68ceef167b7cca9eb62391ccbe885", "score": "0.5511126", "text": "function _commerce_dapi_orders_country($country) {\n $countries = _commerce_dapi_countries();\n\n // Country abbreviations will always be two uppercase letters. \n $country = drupal_strtoupper($country);\n if (!empty($country) && isset($countries[$country])) {\n return check_plain($countries[$country]);\n }\n return check_plain($country);\n}", "title": "" }, { "docid": "44f40e83523efbfa3b0446f11f1b6ece", "score": "0.5505713", "text": "public function setZipCode($value)\n {\n return $this->set('ZipCode', $value);\n }", "title": "" }, { "docid": "562b737f960bed09e539ba0dcc2b5b7c", "score": "0.5490398", "text": "public function validate_fields() {\n\t\tif ( empty( $_POST['billing_country'] ) ) {\n\t\t\twc_add_notice( __( 'Please specify country.', 'payex-woocommerce-payments' ), 'error' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $_POST['billing_postcode'] ) ) {\n\t\t\twc_add_notice( __( 'Please specify postcode.', 'payex-woocommerce-payments' ), 'error' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! in_array( mb_strtoupper( $_POST['billing_country'], 'UTF-8' ), array( 'SE', 'NO', 'FI' ) ) ) {\n\t\t\twc_add_notice( __( 'This country is not supported by the payment system.', 'payex-woocommerce-payments' ), 'error' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Validate country phone code\n\t\tif ( in_array( $_POST['billing_country'], [ 'SE', 'NO' ] ) ) {\n\t\t\t$phone_code = mb_substr( ltrim( $_POST['billing_phone'], '+' ), 0, 2, 'UTF-8' );\n\t\t\tif ( ! in_array( $phone_code, [ '46', '47' ] ) ) {\n\t\t\t\twc_add_notice( __( 'Invalid phone number. Phone code must include country phone code.', 'payex-woocommerce-payments' ), 'error' );\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif ( empty( $_POST['social-security-number'] ) ) {\n\t\t\twc_add_notice( __( 'Please enter your Social Security Number and confirm your order.', 'payex-woocommerce-payments' ), 'error' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "3fcba4b148d86153ae7f84c217019ea5", "score": "0.548207", "text": "public function getApplicantZipPostalCode()\n {\n return $this->getProperty('applicant_zip_postal_code');\n }", "title": "" }, { "docid": "dca72661e2281c466f29d028971c6528", "score": "0.54754704", "text": "public function zipCode1($zipCode = \"\")\n {\n if ($zipCode != \"\") {\n if(is_array($zipCode) && count($zipCode) == 1){\n $zipCode = explode(',', $zipCode[0]);\n }\n return $this->builder->whereIn('address.zip_code', $zipCode);\n }\n return $this->builder;\n }", "title": "" }, { "docid": "ead4d58a390abab467d390abba6c41c2", "score": "0.54675895", "text": "public function validate()\n\t{\n\t\t$props = array('to', 'content', 'countryCode');\n\n\t\tforeach ($props as $p) {\n\t\t\tif (empty($this->$p)){\n\t\t\t\tthrow new ValidationException(\"Message property '$p' is required\", ValidationException::CODE_REQUIRED, $p);\n\t\t\t}\n\t\t}\n\n\t\tif ( ! preg_match('/^(\\d{3}|\\d{5})$/', $this->countryCode)) {\n\t\t\tthrow new ValidationException(\"Country code must be exactly 3 or 5 digits long\", ValidationException::CODE_UNEXP_FORMAT, $p);\n\t\t}\n\t}", "title": "" }, { "docid": "7a7d7419d9abd6270bda81db33c658be", "score": "0.54579604", "text": "public function test_address_locality_validation()\n {\n /*\n * Valid\n */\n $validRegionLocation = Location::factory()->make([\n 'addressLocality' => 'Salford',\n ]);\n $validRegionData = $validRegionLocation->toArray();\n $this->post($this->route(), $validRegionData)->assertStatus(201);\n\n /**\n * Invalid: not a string\n */\n $nonStringLocation = Location::factory()->make([\n 'addressLocality' => ['invalid'],\n ]);\n $nonStringData = $nonStringLocation->toArray();\n\n $response = $this->post($this->route(), $nonStringData);\n $response->assertStatus(400);\n $response->assertJsonPath('meta.field_errors.addressLocality', 'The address locality must be a string.');\n }", "title": "" }, { "docid": "ebe3502e265fce66bc61b85019f3446b", "score": "0.54562086", "text": "function set_country_vat_registration_code($iso) {\n $code = $this->db->query_field('SELECT vat_registration FROM countries WHERE iso_code = UPPER(:iso);', array('iso' => $iso));\n return !empty($code) ? $code : false;\n }", "title": "" }, { "docid": "deeea426e7aaf3672b9ac943dc1b1f8a", "score": "0.545493", "text": "public function getZipcode()\n {\n return $this->zipcode;\n }", "title": "" }, { "docid": "b79c6822aae339c620285d8e76fff58c", "score": "0.5454426", "text": "public function validate()\n {\n if ($this->addressA->getCountryCode() !== $this->addressB->getCountryCode()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getZip() !== $this->addressB->getZip()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getCity() !== $this->addressB->getCity()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getStreet() !== $this->addressB->getStreet()) {\n $this->invalidate();\n return false;\n }\n\n if ($this->addressA->getAddressAdditional() !== $this->addressB->getAddressAdditional()) {\n $this->invalidate();\n return false;\n }\n\n return true;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "c4f1e36eff565171f824e91685d27abd", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n\n $this->validate($request, [\n 'nama_database' => 'required|unique:databases,nama_database',\n ]);\n $tanggal = date('Y-m-d');\n $id_user = Auth::user()->id;\n\n $database = Database::find($id);\n $nama_lama_database = $database->nama_database;\n $database->nama_database = $request->nama_database;\n $database->id_user = $id_user;\n $database->tanggal = $tanggal;\n $database->keterangan = $request->keterangan;\n $database->save();\n \n $history = new History();\n $history->id_user = $id_user;\n $history->kejadian = \"Mengubah nama database $nama_lama_database menjadi $database->nama_database\";\n $history->link = \"/tracking/database/$database->id\";\n $history->save();\n\n Session::flash(\"flash_notification\", [\n \"level\"=>\"success\",\n \"message\"=>\"Berhasil mengubah database $nama_lama_database menjadi $database->nama_database\"\n ]);\n\n return redirect('/tracking/database');\n }", "title": "" } ]
[ { "docid": "1e58026b8952df10026ace5fc59fe274", "score": "0.7425105", "text": "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "title": "" }, { "docid": "08694713de71165eda639b86061c2dd3", "score": "0.70612276", "text": "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "64141ab468cf691ac341537b76914234", "score": "0.6896673", "text": "public function updateStream($resource);", "title": "" }, { "docid": "896d8cce99ddf179cc210c3eea9dbc85", "score": "0.6582159", "text": "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "title": "" }, { "docid": "3a9725a518af00151301cd75bfacc9b9", "score": "0.64491373", "text": "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "title": "" }, { "docid": "a240b851b94ee0b2528d8320a97277d9", "score": "0.6346954", "text": "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "1833fc434e2b6d8845470c7071f16b05", "score": "0.62114537", "text": "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "e894dc3cd202ec4ba70765b750e0aef8", "score": "0.6145042", "text": "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "title": "" }, { "docid": "0926078283b626a7cbcf1c37921b4293", "score": "0.6119944", "text": "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "title": "" }, { "docid": "d897a40d307670c0a2b7bba76cbe8e66", "score": "0.61128503", "text": "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "title": "" }, { "docid": "7b0c66c5755e566e561fc492c4c6cef4", "score": "0.6099993", "text": "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "title": "" }, { "docid": "78d3c773d3a549209d09486c7233c7b5", "score": "0.6087866", "text": "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "title": "" }, { "docid": "f6f8def0ac709abf6dd95f0dfa35d868", "score": "0.6052593", "text": "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "title": "" }, { "docid": "5334ba4a6880a32048930c6aab0c2e72", "score": "0.6018941", "text": "public function update($path);", "title": "" }, { "docid": "b63b74da9b6109b98718289434f6d2cf", "score": "0.60060275", "text": "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "title": "" }, { "docid": "9f880585b8f772551748224960e1114a", "score": "0.59715486", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "title": "" }, { "docid": "5fcb6827bd712d2ceee63009eacfae99", "score": "0.5946516", "text": "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "title": "" }, { "docid": "8bf08d6952a759b61a0c0f2a1c1e4e68", "score": "0.59400934", "text": "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec460d4bbd98e23f7e38b492a7d650e", "score": "0.5860816", "text": "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.5855127", "text": "public function update($data) {}", "title": "" }, { "docid": "5dd04ceb203f7d30ce1633bff3acba55", "score": "0.5855127", "text": "public function update($data) {}", "title": "" }, { "docid": "c8cfc09f393219dca339ad89d530539a", "score": "0.58513457", "text": "public function putStream($resource);", "title": "" }, { "docid": "52b1b7a30044d88d43eaebbf3d0a34c5", "score": "0.5815068", "text": "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.5806887", "text": "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 }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "cbf8435986892ace3d4dbcfbf62f6804", "score": "0.5714311", "text": "public function isUpdateResource();", "title": "" }, { "docid": "c5002bf927543520ff53e2b1ecdcf2a1", "score": "0.5694472", "text": "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "title": "" }, { "docid": "8cfd45d18cf017442f2ebe0b78d0ddc0", "score": "0.5691319", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "title": "" }, { "docid": "7e42fedef6bb33a605a9a912390eb1f7", "score": "0.56879413", "text": "public function store($data, Resource $resource);", "title": "" }, { "docid": "8a46c9ac29aec2f0c66f61cd6abd3e2a", "score": "0.5669989", "text": "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "title": "" }, { "docid": "b247170cc6ffc22ce838d918ca6c8698", "score": "0.56565005", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "title": "" }, { "docid": "c59db4eff4b7b3a830f6e52a576536c0", "score": "0.56505877", "text": "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "title": "" }, { "docid": "9d8e7ab90193c578a62deba30a0b7c06", "score": "0.5646085", "text": "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "title": "" }, { "docid": "56c2b493ee3f6a8e2fe0dddef47259ba", "score": "0.5636683", "text": "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "title": "" }, { "docid": "0e9e693dffd49cdb7c6c20a03ff5efd8", "score": "0.5633498", "text": "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "title": "" }, { "docid": "f4e8f9eee2210f80fc3b28674c2ddfe5", "score": "0.5633378", "text": "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "title": "" }, { "docid": "509df81c3a0f4ec1c8e5ccbf89e5931d", "score": "0.5632906", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "title": "" }, { "docid": "bbd99fadb318f4a784afaa2bfa18ce90", "score": "0.5628826", "text": "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "title": "" }, { "docid": "8eb8ff4a40a42fb82a98ac5091c3a8b4", "score": "0.56196684", "text": "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "title": "" }, { "docid": "df5d4e0cf5f9405287ea81aaef9d998b", "score": "0.5609126", "text": "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "f646252110cf32a5b2f73f7d1462f12e", "score": "0.5601397", "text": "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "title": "" }, { "docid": "4c98bff950158ea59ef3f361bcba0f67", "score": "0.55944353", "text": "public function update(Qstore $request, $id)\n {\n //\n }", "title": "" }, { "docid": "87604b965f2923e2345b489944eb16ab", "score": "0.5582592", "text": "public function update(IEntity $entity);", "title": "" }, { "docid": "4a6724648abb94db5f42559e4cb12724", "score": "0.5581908", "text": "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "b1223c0e87edc0874663308fb5757224", "score": "0.5575312", "text": "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "07a38b06bdddb569c910315d5b73bb88", "score": "0.55717176", "text": "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "c596fddf408b359acc12fe17624de997", "score": "0.55624634", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "title": "" }, { "docid": "2f2babfe63e8f2a416fc581447274425", "score": "0.55614686", "text": "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "title": "" }, { "docid": "b3d8abec86ebbd8bf61bddeb5110ba38", "score": "0.55608666", "text": "abstract public function put($data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "90cec2e0050ecd5971be612c49157c4a", "score": "0.55573726", "text": "public function testUpdateSupplierUsingPUT()\n {\n }", "title": "" }, { "docid": "9c243572303715ea37744cfc162e1a3c", "score": "0.5556878", "text": "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "title": "" }, { "docid": "45212faae39cc84fb7d386bd5ccbacd2", "score": "0.5554201", "text": "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "title": "" }, { "docid": "137b494fd7c0c6a148f3726e66f7b425", "score": "0.5553069", "text": "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "title": "" }, { "docid": "012d802cdd39ad4f48a5d0ab5db49368", "score": "0.55530256", "text": "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "title": "" }, { "docid": "6e27acd0248f696913d7581142ab1983", "score": "0.5543788", "text": "public abstract function update($object);", "title": "" }, { "docid": "9bd927a2b7c7b6455cfb1d5512fcad31", "score": "0.55435944", "text": "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "title": "" }, { "docid": "1756a9bc04ac536de80753840f877cda", "score": "0.55412996", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "efa4460a1f0a94dc49a588c86ce1c95e", "score": "0.55393505", "text": "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "title": "" }, { "docid": "dbf9ef4add161249e917da82a07a52d8", "score": "0.55368495", "text": "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "title": "" }, { "docid": "c4d2a2fa9101020663f7a49d7cc6ddac", "score": "0.5535236", "text": "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "title": "" }, { "docid": "6e9e95959e33006f578a3965f633d7d6", "score": "0.5534954", "text": "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "title": "" }, { "docid": "294674761e7a90c0f3c7b7cbb244ad5a", "score": "0.55237365", "text": "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "title": "" }, { "docid": "f30d20b4690f862c2d69a1ff92501896", "score": "0.5520468", "text": "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "title": "" }, { "docid": "7f3bb76e340f6d3efbef92bcbabfbbfa", "score": "0.55163723", "text": "public function update($entity)\n {\n \n }", "title": "" }, { "docid": "2f7ad5c7cf9222645876124364520b78", "score": "0.55125296", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "title": "" }, { "docid": "f83dd36256d02e1f966e7e748f03289a", "score": "0.5511168", "text": "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "0dc3227cc620ff2bfcf02b42a09128f6", "score": "0.5508345", "text": "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "7cc9fd709d5dbe533ccc58575aee12e8", "score": "0.5502385", "text": "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "title": "" }, { "docid": "561edf3b1e08c4105ca00f8114894949", "score": "0.5502337", "text": "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "title": "" }, { "docid": "95f824afd6b94282d27a0d4cc2cee7bf", "score": "0.5501029", "text": "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "title": "" }, { "docid": "98955a07074c5f9d7b65cb4edac55bd6", "score": "0.54995877", "text": "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "title": "" }, { "docid": "b6c9eceaee979e0c01a261caf5a48b14", "score": "0.54979175", "text": "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "9ecc82591ba06b6a36749ed98ac6605d", "score": "0.54946727", "text": "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "title": "" }, { "docid": "48fef9aa4b1db49fbd41de594ae52cd6", "score": "0.5494196", "text": "public function put($path, $data = null);", "title": "" }, { "docid": "a3080528f24f5a6310506fe05f776170", "score": "0.54941916", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "title": "" }, { "docid": "04652c1da37c7a438475c8d281a1b9fb", "score": "0.54925025", "text": "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "title": "" }, { "docid": "d93eb8ea18e437ad56170f6f49f20674", "score": "0.5491807", "text": "public function update(Entity $entity);", "title": "" }, { "docid": "2a7096bf2a727a86ecc99d0ede5d263f", "score": "0.5483321", "text": "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "title": "" }, { "docid": "61329b7ef8ead3531f1a05acebdc3cd5", "score": "0.5479606", "text": "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "title": "" }, { "docid": "b03a96e7dd0db2b1c6ad43b7c2cb89da", "score": "0.5479408", "text": "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "title": "" }, { "docid": "2c0c433441de9cacab9878463a13e7bc", "score": "0.5478678", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "title": "" }, { "docid": "2ba9e2fb1c6450012bb0ef54decacbcc", "score": "0.54667485", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "title": "" }, { "docid": "dc09c6048588c09b320af9c0d862323d", "score": "0.5463411", "text": "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "title": "" }, { "docid": "3898cbff513b04923b83b4748c2c7fa8", "score": "0.5460588", "text": "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "title": "" }, { "docid": "5b72ae8e940480dd3b49bab90e39b090", "score": "0.5458525", "text": "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }", "title": "" } ]
c21dc80cd03290ce8968ef98028faea6
Transform a search string to an array converts a comma seperated string to an array
[ { "docid": "cb7e65076c761d165eedbc975715f587", "score": "0.75508213", "text": "protected function _searchToArray($search)\n {\n if(is_array($search)) {\n return $search;\n }\n \n if(!preg_match('/\\,/', $search)) {\n return array($search);\n }\n \n $search = explode(',', $search);\n foreach($search AS $key => $value) {\n $search[$key] = trim($value);\n }\n \n return $search;\n }", "title": "" } ]
[ { "docid": "8109032ed92c9fb980edc0ae79e5ed8f", "score": "0.662034", "text": "function explodeByComma($str)\n\t{\n\t\t$str = str_replace(\" \", \"\", $str);\t//remove spaces\n\t\tif( strpos($str, \",\") )\n\t\t{\n\t\t\t// remove bad comma ing\n\t\t\t$invalid_comma = array(\", \", \" ,\", \" , \");\n\t\t\t$str = str_replace($invalid_comma, \",\", $str);\n\t\t\t\n\t\t\t$arr = explode(\",\", $str);\n\t\t}\n\t\telse\n\t\t\t$arr = ($str == \"\") ? array() : array($str);\n\t\t\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "8020c9b5ff35fef22946b744518e5869", "score": "0.640406", "text": "public function string_to_array( $value ) {\n if ( ! $value ) {\n return array();\n }\n \n // Return if already an array\n if ( is_array( $value ) ) {\n return $value;\n }\n \n // Define output array\n $array = array();\n \n // Clean up value\n $items = preg_split( '/\\,[\\s]*/', $value );\n \n // Create array\n foreach ( $items as $item ) {\n if ( strlen( $item ) > 0 ) {\n $array[] = $item;\n }\n }\n \n // Return array\n return $array;\n }", "title": "" }, { "docid": "42a30c8c46daddfbd0ec3c03b5379ebc", "score": "0.6343978", "text": "public function string_to_array( $value ) {\n\t\t\tif ( ! $value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Return if already an array\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\treturn $value;\n\t\t\t}\n\n\t\t\t// Define output array\n\t\t\t$array = array();\n\n\t\t\t// Clean up value\n\t\t\t$items = preg_split( '/\\,[\\s]*/', $value );\n\n\t\t\t// Create array\n\t\t\tforeach ( $items as $item ) {\n\t\t\t\tif ( strlen( $item ) > 0 ) {\n\t\t\t\t\t$array[] = $item;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Return array\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "bacf0b2223693bb83fb5772b0ee74f3c", "score": "0.6307731", "text": "function search_split_terms($terms){\n \n $terms = preg_replace(\"/\\\"(.*?)\\\"/e\", \"search_transform_term('\\$1')\", $terms);\n $terms = preg_split(\"/\\s+|,/\", $terms);\n\n $out = array();\n\n foreach($terms as $term){\n\n $term = preg_replace(\"/\\{WHITESPACE-([0-9]+)\\}/e\", \"chr(\\$1)\", $term);\n $term = preg_replace(\"/\\{COMMA\\}/\", \",\", $term);\n\n $out[] = $term;\n }\n\n return $out;\n}", "title": "" }, { "docid": "1ac63546528c37e121484c1995c0c379", "score": "0.6303475", "text": "function explode_list($string) {\n $array = explode(',', $string);\n $array = array_map('trim', $array);\n return is_array($array) ? $array : array();\n }", "title": "" }, { "docid": "11471f31cd77f9ab8f6ff6f32593660d", "score": "0.6182157", "text": "function make_clean_array($str)\n{\n // delete whitespace\n $str = str_replace(\" \", \"\", $str);\n\n // check if list is empty\n if (empty($str)) {\n return array();\n }\n\n // return array with 1 element\n if (strpos($str, \",\") === false) {\n return [$str];\n }\n\n // remove last character if it is a coma\n $done = false;\n while (!$done) {\n\n if ($str[strlen($str) - 1] == \",\") {\n $str = substr($str, 0, -1);\n } else {\n $done = true;\n }\n }\n\n // make string into array\n $arr = explode(\",\", $str);\n\n // filter empty or false elements from the array\n return array_filter($arr);\n}", "title": "" }, { "docid": "a96ad3ee8fdb875650e898bd91092293", "score": "0.6135845", "text": "private function str_to_array($email) {\n if ( ! is_array($email)) {\n return (strpos($email, ',') !== FALSE)\n ? preg_split('/[\\s,]/', $email, -1, PREG_SPLIT_NO_EMPTY)\n : (array) trim($email);\n }\n return $email;\n }", "title": "" }, { "docid": "0d007d51f95ca2972f602a6ad32ee886", "score": "0.60746604", "text": "private function stringToArray($string)\n\t{\n\t\t$participants = explode(',', $string);\n\n\t\t// strip whitespaces from beginning and end of a tag text\n\t\tforeach ($participants as &$text) {\n\t\t\t$text = trim($text);\n\t\t}\n\n\t\t// removes duplicates\n\t\treturn array_unique($participants);\n\t}", "title": "" }, { "docid": "d29cd2e997e830b409068caa4f3bc9f1", "score": "0.6022493", "text": "function create_searcharray($searchstring)\n {\n $tmpstr = ''; // Just a buffer\n if ($searchstring == '') // If no data don't waste our time\n {\n return '';\n }\n $searchstring = str_replace('%', '\\%', $searchstring); // Replace special LIKE characters\n $searchstring = str_replace('_', '\\_', $searchstring); // Replace special LIKE characters\n if (strpos($searchstring, '\"') === false) // If there are no \" we can keep it simple\n {\n $searcharray = explode(' ', $searchstring);\n }\n else // If \" are present though\n {\n $searcharray = array();\n $quotecount = 0; // Indicates if we found a quote or not\n for ($i=0;$i<strlen($searchstring);$i++)\n {\n if ($searchstring[$i] == ' ' && ($quotecount == 0)) // Found a space not inside a quote\n {\n if ($tmpstr != '') // If buffers not empty\n {\n $searcharray[] = $tmpstr; // Add it to the search array\n $tmpstr = '';\n }\n }\n elseif ($searchstring[$i] == '\"') // If we find a quote\n {\n if ($tmpstr != '')\n {\n $searcharray[] = $tmpstr; // If buffer is not empty add it to the array\n $tmpstr = '';\n }\n $quotecount = ($quotecount == 0) ? 1 : 0; // Change our marker\n }\n else\n {\n $tmpstr .= $searchstring[$i]; // Anything left we dump in the array.\n }\n }\n }\n if ($tmpstr != '')\n {\n $searcharray2 = explode(' ', $tmpstr); // Dump remainder into a new array splitting at spaces\n foreach ($searcharray2 as $key=>$value) \n {\n $searcharray[] = $value;\t\n }\n }\n return $searcharray;\n }", "title": "" }, { "docid": "8dbea1fa8dce5f515330fb63ec7000a6", "score": "0.5990279", "text": "public function subscribersToArray($string){\r\n \r\n if (!$string){\r\n return array();\r\n }\r\n \r\n $subscribers = explode(',', $string);\r\n // Delete empty data from array\r\n foreach ($subscribers as $key => $subscriber) {\r\n if (!$subscriber) {\r\n unset($subscribers[$key]);\r\n }\r\n }\r\n return $subscribers;\r\n \r\n }", "title": "" }, { "docid": "a9ed8600f5cedb74128a817245e66d03", "score": "0.59830713", "text": "public static function makeArray($string='')\n\t{\n\t\t$string = preg_replace('/ /', ',', $string);\n\t\t$arr = explode(',', $string);\n\t\t$arr = self::cleanArray($arr);\n\t\t$arr = array_unique($arr);\n\n\t\treturn $arr;\n\t}", "title": "" }, { "docid": "b23d8119190dd7196805970867aebab3", "score": "0.59517074", "text": "function get_query_names_as_array($query_names) {\n $result = array();\n if (is_null($query_names))\n return $result;\n\n // STRING_SEPARATOR\n $items = explode(STRING_SEPARATOR, $query_names);\n foreach ($items as $item) {\n if ((!($item == ' ')) && (!($item == '')) && (!in_array($item, $result))) {\n array_push($result, $item);\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "26baa3ed97ae2e37fbd3284f6568fcb4", "score": "0.5930448", "text": "function csv_to_array($csv_string) {\n\t\t$csv = explode(\"\\n\", trim($csv_string));\n\t\tforeach( $csv as $key => $value) {\n\t\t\t$csv[$key] = array_map('trim', explode(\",\", trim($value)));\t\n\t\t}\n\n\t\treturn $csv;\n\t}", "title": "" }, { "docid": "fe43e1103f91701b24d08ad8dcc002e7", "score": "0.5785526", "text": "function splitvalues($str)\n{\n\t$arr=array();\n\t$start=0;\n\t$i=0;\n\t$inquot=false;\n\twhile($i<=strlen($str))\n\t{\n\t\tif($i<strlen($str) && substr($str,$i,1)=='\"')\n\t\t\t$inquot=!$inquot;\n\t\telse if($i==strlen($str) || !$inquot && substr($str,$i,1)==',')\n\t\t{\n\t\t\t$val=substr($str,$start,$i-$start);\n\t\t\t$start=$i+1;\n\t\t\tif(strlen($val) && substr($val,0,1)=='\"')\n\t\t\t{\n\t\t\t\t$val=substr($val,1,strlen($val)-2);\n\t\t\t\t$val=str_replace('\"\"','\"',$val);\n\t\t\t}\n\t\t\t$arr[]=$val;\n\t\t}\n\t\t$i++;\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "4a3b6ffc962e06812eedebf5f3198092", "score": "0.57812834", "text": "function metricsStringToArray($string) {\n\t\t$this->query_params['metrics'] = $string;\n\t\treturn explode(',', $string);\n\t}", "title": "" }, { "docid": "d56044df4097c0613e2113531b083a27", "score": "0.577996", "text": "function string_to_array($str)\n{\n return [$str];\n}", "title": "" }, { "docid": "cc97f5d5289c9310608c96caaf6bc8df", "score": "0.57559276", "text": "public function decodeVotes($str): array\r\n {\r\n // TODO: Implement decodeVotes() method.\r\n return explode(\",\", $str);\r\n }", "title": "" }, { "docid": "76987821b7ca91d3a17cdcb246b5aba5", "score": "0.5752835", "text": "function columns_string_to_array($p_string) {\n $t_columns = explode(',', $p_string);\n $t_count = count($t_columns);\n\n for ($i = 0; $i < $t_count; $i++) {\n $t_columns[$i] = trim($t_columns[$i]);\n }\n\n return $t_columns;\n}", "title": "" }, { "docid": "567452234bb7d01d6224d09ca39ba459", "score": "0.5752584", "text": "private static function csv_to_array($input, $delimiter=',') \n\t{ \n\t\t$header = null; \n\t\t$data = array(); \n\t\t$csvData = str_getcsv($input, \"\\n\"); \n\t\t\n\t\tforeach($csvData as $csvLine){ \n\t\t\tif(is_null($header)) $header = explode($delimiter, $csvLine); \n\t\t\telse{ \n\t\t\t\t\n\t\t\t\t$items = explode($delimiter, $csvLine); \n\t\t\t\t\n\t\t\t\tfor($n = 0, $m = count($header); $n < $m; $n++){ \n\t\t\t\t\t$prepareData[$header[$n]] = $items[$n]; \n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t$data[] = $prepareData; \n\t\t\t} \n\t\t} \n\t\t\n\t\treturn $data; \n\t}", "title": "" }, { "docid": "02ed4528b3db36dbff1c386e10f361eb", "score": "0.57521904", "text": "function getMatches($searchstring)\n {\n atkdebug(\"Performing search\");\n $result = array();\n\n if ($this->createDestinationInstance() && $searchstring!=\"\")\n {\n $tokens = explode(\",\", $searchstring);\n foreach ($tokens as $token)\n {\n $token = trim($token);\n if($token!=\"\")\n {\n $result[$token] = $this->getDestinationRecords($token); \n }\n }\n }\n return $result;\n }", "title": "" }, { "docid": "d9f2b4e242f6644769087ad76d6cec7a", "score": "0.56832427", "text": "public function getDataAsArray()\n {\n if (strpos($this->data,\",\") !== false) {\n return explode(\",\",$this->data);\n } else\n\n return array($this->data);\n }", "title": "" }, { "docid": "d4080e1572d227f54207bae82d7bac94", "score": "0.5649375", "text": "function splitter(string $county_string){\n\n $county_array = explode(\",\",$county_string);\n array_walk($county_array,'update_array');\n return $county_array;\n\n}", "title": "" }, { "docid": "0640f15700ca67fc1fd1772c549b2b28", "score": "0.56395525", "text": "function array_from_keywords($keywords)\n{\n $lower = strtolower($keywords);\n return array_filter(preg_split(\"/\\s+/\", $lower), function($elem) {return $elem != \"\";});\n}", "title": "" }, { "docid": "475390a78042e8a1a97e6471d6581552", "score": "0.55717677", "text": "private function parseSearch(): array\n {\n $conditions = [];\n $searchQuery = $this->funnel->getSearch();\n foreach ($this->funnel->getSearchableColumns() as $searchableColumn) {\n $conditions[] = $this->parseContains($searchableColumn, $searchQuery);\n }\n return $conditions;\n }", "title": "" }, { "docid": "aa8f7a1be6bae91c591b6cc34145466f", "score": "0.55567527", "text": "function explode_array(string|array $string, array|string $delimiters = [',']): array\n{\n $items = [];\n if (! is_array(value: $delimiters) && ! is_array(value: $string)) {\n //if neither the delimiter nor the string are arrays\n return explode(separator: $delimiters, string: $string);\n } elseif (! is_array(value: $delimiters) && is_array(value: $string)) {\n //if the delimiter is not an array but the string is\n foreach ($string as $item) {\n foreach (explode(separator: $delimiters, string: $item) as $subItem) {\n $items[] = $subItem;\n }\n }\n return $items;\n } elseif (is_array(value: $delimiters) && ! is_array(value: $string)) {\n //if the delimiter is an array but the string is not\n $stringArray[] = $string;\n foreach ($delimiters as $delimiter) {\n $stringArray = explode_array(string: $delimiter, delimiters: $stringArray);\n }\n return $stringArray;\n }\n return $items;\n}", "title": "" }, { "docid": "47cb0acdb91ed923582f501b1becf65a", "score": "0.5546416", "text": "function bimber_conver_string_to_bool_array( $string, $array ) {\n\t$string_arr = explode( ',', $string );\n\n\tforeach ( $array as $key => $value ) {\n\t\tif ( in_array( $key, $string_arr, true ) ) {\n\t\t\t$array[ $key ] = false;\n\t\t}\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "32f8bbbfcef5c44851d4781b3daa6033", "score": "0.553074", "text": "private function string_to_array($value)\n {\n }", "title": "" }, { "docid": "b68d9a57771d19d9495b2d6b745f89af", "score": "0.55268013", "text": "function arrayToIN($array) {\n\t$in = \"\";\n\tforeach ($array as $i => $item)\n\t{\n\t\t$in .= \"$item,\";\n\t}\n\t$in = rtrim($in,\",\");\n\treturn $in;\n}", "title": "" }, { "docid": "871d7abf6b8f2c3c2d14723ad5150c30", "score": "0.55159", "text": "function explodeString($string,$split_char=\",\")\n{\n $result=array();\n\n $string=trim($string);\n $values=explode($split_char,$string);\n\n foreach($values as $v)\n {\n $v=trim($v);\n\n if($v != false)\n $result[]=$v;\n }\n\n return $result;\n}", "title": "" }, { "docid": "612d88cc248e4decb629e5a2dadaf802", "score": "0.5500381", "text": "public function fromSearch(array $data);", "title": "" }, { "docid": "88ff0961ee4e1d83f67812b98004cc10", "score": "0.5488668", "text": "private function decodeSearchQuery($q) {\n $words = preg_split('|[\\r\\n\\t ]+|', trim($q));\n\n $words = array_map(\n function ($word) {\n return mb_strtolower($word, mb_detect_encoding($word));\n }, $words\n );\n $words = array_filter(\n $words, function ($word) {\n return strlen($word) >= 2;\n }\n );\n\n return array(\n 'valid' => count($words) > 0,\n 'in_q' => $q,\n 'use_q' => implode(' ', $words),\n 'words' => $words\n );\n }", "title": "" }, { "docid": "41eede2e15f73c01598fe02d22cd66f6", "score": "0.54783815", "text": "public function formOrderIdsArray($text)\n {\n $nodes = explode(',', $text);\n $orderIds = array();\n foreach ($nodes as $value) {\n $orderIds[] = preg_replace('/[^0-9]/', '', $value);\n }\n return $orderIds;\n }", "title": "" }, { "docid": "41eede2e15f73c01598fe02d22cd66f6", "score": "0.54783815", "text": "public function formOrderIdsArray($text)\n {\n $nodes = explode(',', $text);\n $orderIds = array();\n foreach ($nodes as $value) {\n $orderIds[] = preg_replace('/[^0-9]/', '', $value);\n }\n return $orderIds;\n }", "title": "" }, { "docid": "08ec455895653250c6ae7ed9cd6a1bcf", "score": "0.5471378", "text": "function smar_get_query_array($string) {\n\t\n\tif(strpos(' '.$string, '?') > 1)\n\t\t$string = explode('?', $string)[1];\n\t\n\t$params = explode('&', $string);\n\t\n\t$return = array();\n\tforeach($params as $param) {\n\t\t$parts = explode('=', $param);\n\t\tif(count($parts) == 2)\n\t\t\t$return[$parts[0]] = $parts[1];\n\t}\n\t\n\treturn $return;\n}", "title": "" }, { "docid": "a94c6f715cddbb515239b4a716df561c", "score": "0.5442399", "text": "public static function queryStringArr()\n {\n return parse_str(self::queryString());\n }", "title": "" }, { "docid": "1ff93f1fb382ad329d1f8f1dd733cc10", "score": "0.54291433", "text": "function explode_parameter($parameter) {\n if (! isset($parameter)) {\n $output = [];\n } else {\n $output = explode(\",\", $parameter);\n }\n return $output;\n }", "title": "" }, { "docid": "45e43ddece8f6674e00bc6844d2ce96b", "score": "0.54271877", "text": "function regionFiltersGetDistrictIDMultiple($criteria){\n $arr = array();\n foreach($criteria['district_id'] as $val) {\n $o = explode('_', $val);\n if(count($o) > 1){\n array_push($arr,$o[1]);\n }\n }\n return $arr;\n}", "title": "" }, { "docid": "54c8f8c5187abb0ed541b9cb215ac203", "score": "0.54018265", "text": "private function stringToArray($string)\n\t{\n\t\t// Explode the string by newlines and then by commas\n\t\t$entries = array_map(function ($x) {\n\t\t\treturn explode(\",\", $x);\n\t\t}, explode(\"\\n\", $string));\n\n\t\t// The array is now in the form of [ ['a', 'b'], ['c'] ] -- Convert to flattened form ['a', 'b', 'c']\n\t\t$entries = array_reduce($entries, function ($carry, $x) {\n\t\t\tif (empty($x))\n\t\t\t{\n\t\t\t\treturn $carry;\n\t\t\t}\n\n\t\t\treturn array_merge($carry, array_map(function ($item) {\n\t\t\t\treturn trim($item);\n\t\t\t}, $x));\n\t\t}, []);\n\n\t\t// Filter out empty elements and return the unique values\n\t\treturn array_unique(\n\t\t\tarray_filter($entries, function ($x) {\n\t\t\t\treturn !empty($x);\n\t\t\t})\n\t\t);\n\t}", "title": "" }, { "docid": "74d92ac6d2623325b4e74bfa344d8a2b", "score": "0.5388957", "text": "function dimensionsStringToArray($string) {\n\t\t$this->query_params['dimensions'] = $string;\n\t\treturn explode(',', $string);\n\t}", "title": "" }, { "docid": "bde8cb31d33506cde9c5567317e49ce9", "score": "0.53865945", "text": "function val2arr($val){\n\t\t\tif(strpos($val,\"|\")!==false){ $val=trim($val,'|'); $arr=explode(\"|\",$val); $newarr=array();\n\t\t\t\tforeach($arr as $k=>$v){ $newarr[$v]=$v; } return $newarr;\n\t\t\t} \n\t\t\treturn false; \n\t\t}", "title": "" }, { "docid": "8fd7f96ef629e002495cb56f15ded883", "score": "0.5320675", "text": "static private function _makeArray($string)\n {\n if (!$string)\n return null;\n $arr = explode(\";\", $string);\n $size = count($arr);\n for ($i = 0; $i < $size; $i ++)\n $arr[$i] = trim($arr[$i]);\n return $arr;\n }", "title": "" }, { "docid": "e09c77353e9de337bd1b8c5e767cb5a1", "score": "0.53130764", "text": "function stringtoarray ($string_agenda,&$array_agenda) {\n $a=explode (\";\",$string_agenda);\n for($i=0; $i<count($a); $i++) {\n $array_agenda[$a[$i]]=$a[$i+1];\n $i++;\n }\n return true;\n }", "title": "" }, { "docid": "ba8a18be7bab5a924b2d8f95e6694b13", "score": "0.5305564", "text": "function cleanData($string) {\n $string = str_replace('\"', '', $string); // Replaces all double-quotes with nothing.\n //$string = str_replace('\" \"', '', $string); // Replaces all double-quotes with nothing.\n //return $string;\n $string = preg_replace('/^\\[/', '', $string); // Removes special chars.\n $string = preg_replace('/\\]$/', '', $string); // Removes special chars.\n return explode(',', $string);\n }", "title": "" }, { "docid": "653a305c59e41fa940bcf41f4b0d0bce", "score": "0.5301802", "text": "public static function arrayInterests($interests)\n {\n return explode(',', $interests);\n }", "title": "" }, { "docid": "998247583fb8eb24481b1e4c58d2dc4c", "score": "0.52996707", "text": "public function splitString($string) {\n $token = strtok($string, \",\");\n while ($token != false) {\n $tmp[] = $token;\n $token = strtok(\",\");\n }\n return $tmp;\n }", "title": "" }, { "docid": "f8941e21efd35883bd35b899a7b2a102", "score": "0.5295163", "text": "function search($query){\n return array(array());\n }", "title": "" }, { "docid": "ae3f9e802081db25051d3daa7b0d6869", "score": "0.529213", "text": "private function list_to_array($commalist) {\n $list = explode(',', trim($commalist));\n return array_map('trim', $list);\n }", "title": "" }, { "docid": "16d0e912e2385067011bd5ac5c654830", "score": "0.52896905", "text": "function queryToArray($q) {\n if ($q == '' || $q == '?') return array();\n $assignments = explode('&', withoutPrefix($q, '?'));\n $queryVars = array();\n foreach ($assignments as $assignment) {\n $parts = explode('=', $assignment);\n $var = $parts[0];\n $val = null;\n if (count($parts) == 2) $val = $parts[1];\n else if (count($parts) > 2) throw new InvalidArgumentException(\"Component of query-string \" .\n \"contained multiple equal-signs\");\n $queryVars[$var] = urldecode($val);\n }\n return $queryVars;\n}", "title": "" }, { "docid": "dd06d9b61f1a5709f6da67cfce30b0e7", "score": "0.5268771", "text": "function static_sanitize_multiselect( $input ) {\r\n if ( ! is_array( $input ) ) {\r\n $output = explode( ',', $input );\r\n } else {\r\n $output = $input;\r\n }\r\n if ( ! empty( $output ) ) {\r\n return array_map( 'sanitize_text_field', $output );\r\n } else {\r\n return array();\r\n }\r\n }", "title": "" }, { "docid": "77b1c9b393f762d27abd43c803388f44", "score": "0.52585727", "text": "public static function string_to_array( $_option = '' ) {\n\t\tif ( empty( $_option ) || !is_string( $_option ) ) {\n\t\t\treturn array();\n\t\t}\n\t\telse {\n\t\t\treturn array_filter( array_map( 'trim', explode( ',', $_option ) ) );\n\t\t}\n\t}", "title": "" }, { "docid": "f3b562cc6eb041ab21f341615a398775", "score": "0.52485543", "text": "private function getArrayFrom($argument)\n {\n return (!is_array($argument)) ? preg_split('/ ?[,|] ?/', $argument) : $argument;\n }", "title": "" }, { "docid": "ccfb3f11d0ef7090cf4e66dee0d07cb1", "score": "0.52426076", "text": "function proper_parse_str($str) {\n # result array\n $arr = array();\n\n # split on outer delimiter\n $pairs = explode('&', $str);\n\n # loop through each pair\n foreach ($pairs as $i) {\n # split into name and value\n list($name,$value) = explode('=', $i, 2);\n\n # if name already exists\n if( isset($arr[$name]) ) {\n # stick multiple values into an array\n if( is_array($arr[$name]) ) {\n $arr[$name][] = $value;\n }\n else {\n $arr[$name] = array($arr[$name], $value);\n }\n }\n # otherwise, simply stick it in a scalar\n else {\n $arr[$name] = $value;\n }\n }\n\n # return result array\n return $arr;\n}", "title": "" }, { "docid": "2a04df26d06198a5bdbf585e4cdbce72", "score": "0.52340096", "text": "public static function camel_to_array($str){\r\n\t\t$str[0] = strtolower($str[0]);\r\n\t\t$func = create_function('$c', 'return \"/\" . strtolower($c[1]);');\r\n\t\t$aux = preg_replace_callback('/([A-Z])/', $func, $str);\r\n\t\t$aux2 = explode('/',$aux);\r\n\t\treturn $aux2;\r\n\t}", "title": "" }, { "docid": "7f135e8f7f803cd353cb1ae9ddb4b156", "score": "0.52259576", "text": "private function qToArray($q) {\r\n if (!$q) { return array(); }\r\n // change quoted sections to match exact word\r\n $q = preg_replace(\"/ (.+) /\",\"(?<=\\W)$1(?=\\W)\",$q);\r\n $q = str_replace(' ','_%',$q); // this compromizes exact match highlighting by matching partials within verse as well \r\n $arr_q = explode('_%',$q);\r\n foreach($arr_q as $qw) {\r\n if(substr_count('/i/I/b/B/u/U/','/'.$qw.'/')) {\r\n $qw = $qw.'(?=\\W)(?!>)';\r\n }\r\n if($qw) {\r\n $qw = addslashes($qw);\r\n $qw = str_replace('\\\\\\\\W','\\W',$qw);\r\n $key = str_pad(strlen($qw),2,'0',STR_PAD_LEFT).$qw; // indexed by length\r\n // any case, not inside of a tag\r\n $arr_q_reg[$key] = '\"((?i)'.$qw.')(?![^<]*>)\"';\r\n }\r\n }\r\n krsort($arr_q_reg); // find longest first\r\n return $arr_q_reg;\r\n }", "title": "" }, { "docid": "d05fb78bc98ba53315e60dd31e1ea265", "score": "0.5209255", "text": "public function convertTagsToArray($tags){\n\t\t\t$tags = explode(\", \",$tags); // split tags into array at seperator (which is a comma and a space)\n\t\t\treturn $tags;\n\t\t}", "title": "" }, { "docid": "f2783dceec4a475ba1530e855f09bf6d", "score": "0.5186093", "text": "protected static function eatArray($input)\n {\n $length = strlen($input);\n $array = [];\n $cluster = null;\n while(strlen($input)) {\n $c = $input[0];\n if ($c === ',') {\n $input = substr($input, 1);\n }\n else if ($c === ']') {\n $input = substr($input, 1);\n break;\n }\n $chunk = self::eatValue($input);\n $array[] = $chunk[0];\n $input = $chunk[1];\n }\n\n return [$array, $input];\n }", "title": "" }, { "docid": "b8ba253f4415ad8cb4b89a84c78dd158", "score": "0.5183688", "text": "public function getSearchParamsFromUrl($params) {\n\t\t$parameters = array();\n\t\t$datas= explode(\",\", substr($params,1,-1));\n\t\tif (count($datas) > 0) {\n\t\t\tforeach ($datas as $param) {\n\t\t\t\t$datas= explode(\"=\", $param);\n\t\t\t\tif (count($datas) == 2) {\n\t\t\t\t\t$parameters[$datas[0]] = $datas[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->getSearchParams($parameters);\n\t}", "title": "" }, { "docid": "f8d421a94495168daf2c52071fb62b97", "score": "0.5171827", "text": "function eng_list( $input_arr = array( ), $sep = ', ', $before = '\"', $after = '\"' ) {\n if ( ! is_array( $input_arr ) )\n return false;\n\n $_tmp = $input_arr;\n\n if ( count( $_tmp ) >= 2 ) {\n $end2 = array_pop( $_tmp );\n $end1 = array_pop( $_tmp );\n array_push( $_tmp, $end1 . $after . ' or ' . $before . $end2 );\n }\n\n return $before . implode( $before . $sep . $after, $_tmp ) . $after;\n}", "title": "" }, { "docid": "5527715ef3ccfe77a1255508681eb375", "score": "0.51649946", "text": "function stringtoarray ($string_agenda,&$array_agenda) {\n\t\t\t//Convierte la agenda de datos (string) en un array asociativo\n\t\t\t$a=explode (\";\",$string_agenda);\n\t\t\tfor($i=0; $i<count($a); $i++) {\n\t\t\t\t$array_agenda[$a[$i]]=$a[$i+1];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "563e2e569e3cd448a73a392ad8a92720", "score": "0.5159299", "text": "public function toSearch();", "title": "" }, { "docid": "acd6653dd49f47554a97e498b9d4588e", "score": "0.515367", "text": "private function extractSearchTerms(string $searchQuery): array\n {\n $terms = array_unique(explode(' ', $searchQuery));\n\n return array_filter($terms, function ($term) {\n return 2 <= mb_strlen($term);\n });\n }", "title": "" }, { "docid": "d54dae76989579899d7d9c085aeac220", "score": "0.5149631", "text": "public function fromStringArray($input_array, $replace_data = false)\n {\n return [];\n }", "title": "" }, { "docid": "19a0a65d7424c0704f3e44ce4c933f3c", "score": "0.51476", "text": "function getCampos($input){\n $filterParams = [];\n foreach($input as $param => $value){\n $filterParams[] = \"$param\";\n }\n return implode(\", \", $filterParams);\n}", "title": "" }, { "docid": "7ea1ad9e04671127662f0959eac2dd59", "score": "0.5139278", "text": "protected function buildQueryArrayFromTerms($terms)\n {\n if (is_array($terms)) {\n return $terms;\n }\n\n if (is_string($terms)) {\n return explode(' ', $terms);\n }\n\n throw new PixabayQueryException;\n }", "title": "" }, { "docid": "85eb4f0017bbcc135acea5ce4acaa181", "score": "0.51387453", "text": "protected function prepareSelectedFields(string $input): array\n {\n $fields = $this->validateSelectedFields(\n explode(',', $input)\n );\n\n return array_map(function ($field) {\n return strtolower(trim($field));\n }, $fields);\n }", "title": "" }, { "docid": "aa33ef94472759dc5481774408ae60c8", "score": "0.51172477", "text": "function semiToComma($entries){\n\tif(preg_match('/;/', $entries[0]) && !preg_match('/,/', $entries[0])){\n\t\tforeach($entries as $key => $value)\t$entries[$key] = preg_replace('/;/', \",\", $entries[$key]);\n\t}\n\treturn array_values($entries);\n}", "title": "" }, { "docid": "6405859fa10897677b764f08c31a60e9", "score": "0.51115996", "text": "public function toArray()\n\t{\n\t\treturn $this->grammar->compileSearch($this);\n\t}", "title": "" }, { "docid": "7559e180fcb4f8f16292272d3e512eb5", "score": "0.5110348", "text": "static public function parseCsvParamsStringToArray($aCsvString) {\n\t\t$theResult = array();\n\t\t//safely convert the string into array of key=value strings\n\t\t$theParamsStrList = self::parse_csv_to_array($aCsvString);\n\t\tif (!empty($theParamsStrList)) {\n\t\t\tforeach ($theParamsStrList as $theParamsStr) {\n\t\t\t\t//convert the key=value strs into a true associative array\n\t\t\t\t$theResult[] = self::cnvKeyValuePairsToAssociativeArray($theParamsStr);\n\t\t\t}\n\t\t}\n\t\treturn $theResult;\n\t}", "title": "" }, { "docid": "d2d1d3e339b1550b46af661e63c94133", "score": "0.5093893", "text": "private function extractSearchTerms(string $searchQuery): array\n {\n $terms = array_unique(explode(' ', $searchQuery));\n\n return array_filter(\n $terms,\n function ($term) {\n return 2 <= mb_strlen($term);\n }\n );\n }", "title": "" }, { "docid": "b815006f6f7515b7fe44059f2bbadea4", "score": "0.50808907", "text": "function explode_enum_string( $p_enum_string ) {\r\n\t\treturn explode( \",\", $p_enum_string );\r\n\t}", "title": "" }, { "docid": "d15ee59929a3eb5e9f35f2f7b6a27717", "score": "0.50731486", "text": "private function toArray($str)\n {\n if (!is_string($str)) {\n throw new \\InvalidArgumentException(sprintf(\n '%s: expects a string argument; received \"%s\"',\n __METHOD__,\n (is_object($str) ? get_class($str) : gettype($str))\n ));\n }\n \n // convert string to array.\n $options = array();\t \n if ($values = explode(',', $str)) {\n foreach ($values as $value) {\n $parts = explode('=', trim($value));\n if (is_array($parts) && count($parts) > 1) {\n $options[$parts[0]] = $parts[1];\n } else {\n $options[$parts[0]] = $parts[0];\n }\n }\n }\n return $options;\n }", "title": "" }, { "docid": "292e281bcdac97457fc013a8d5f7db70", "score": "0.5071594", "text": "protected function buildItems($itemsString) {\n\t\t$itemsString = trim($itemsString, ',');\n\t\tif (strpos($itemsString, ',') && strpos($itemsString, ';')) {\n\t\t\t$return = array();\n\t\t\t$items = explode(',', $itemsString);\n\t\t\tforeach ($items as $itemPair) {\n\t\t\t\t$item = explode(';', $itemPair);\n\t\t\t\t$return[$item[0]] = $item[1];\n\t\t\t}\n\t\t\treturn $return;\n\t\t} else if (strpos($itemsString, ',')) {\n\t\t\t$items = explode(',', $itemsString);\n\t\t\treturn array_combine($items, $items);\n\t\t} else {\n\t\t\treturn array($itemsString => $itemsString);\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "95d7f7f7f0c3c52c140059d16ea40214", "score": "0.5056415", "text": "public static function get_array_of_emails($value){\r\n $emails = explode(',',$value);\r\n foreach ($emails as $key => $email){\r\n $emails[$key] = control::get_email(trim($email));\r\n }\r\n return $emails;\r\n }", "title": "" }, { "docid": "9db5fa7f18fab45ff58a4e28d757d4b8", "score": "0.5055815", "text": "function get_search_query() {\n\t\tglobal $query_string;\n\n\t\t$query_args = explode( '&', $query_string );\n\t\t$search_query = array();\n\t\tforeach ( $query_args as $key => $string ) {\n\t\t\t$query_split = explode( '=', $string );\n\t\t\t$search_query[ $query_split[0] ] = isset( $query_split[1] ) ? urldecode( $query_split[1] ) : '';\n\t\t} // foreach\n\n\t\treturn $search_query;\n\t}", "title": "" }, { "docid": "97e7d3149cedd52199d22af2dac4e726", "score": "0.50505835", "text": "public function search(string $query): array\n {\n if ($query === \"\") return $this->jsonOptions()->toArray();\n\n return array_values($this->jsonOptions()->filter(function ($item) use ($query) {\n // return (stripos($item->label, $query) !== false);\n return preg_match(\"/$query/i\", $item->label); // case insensitive-search\n })->toArray());\n }", "title": "" }, { "docid": "d406167acf37e6544f6588270b3de09e", "score": "0.50432515", "text": "public function explodeTags($tags) {\n\t\t// This regexp allows the following types of user input:\n\t\t// this, \"somecompany, llc\", \"and \"\"this\"\" w,o.rks\", foo bar\n\t\t$regexp = '%(?:^|,\\ *)(\"(?>[^\"]*)(?>\"\"[^\"]* )*\"|(?: [^\",]*))%x';\n\t\tpreg_match_all($regexp, $tags, $matches);\n\t\t$typedTags = array_unique($matches[1]);\n\n\t\t$tags = [];\n\t\tforeach ($typedTags as $tag) {\n\t\t\t// If a user has escaped a term (to demonstrate that it is a group,\n\t\t\t// or includes a comma or quote character), we remove the escape\n\t\t\t// formatting so to save the term into the database as the user intends.\n\t\t\t/** @var string $replacedString */\n\t\t\t$replacedString = str_replace('\"\"', '\"', preg_replace('/^\"(.*)\"$/', '\\1', $tag));\n\t\t\t$tag = trim($replacedString);\n\t\t\tif ($tag) {\n\t\t\t\t$tags[] = $tag;\n\t\t\t}\n\t\t}\n\n\t\treturn $tags;\n\t}", "title": "" }, { "docid": "978d844f60d425c9572ef0cd1d9e4bcb", "score": "0.5034786", "text": "protected static function parseFromString(string $value): array\n {\n preg_match(\"/(?<currency>[A-Z]{3})? ?(?<amount>[\\d,\\.]*)/\", $value, $matches);\n\n return array_filter($matches);\n }", "title": "" }, { "docid": "9d5d277fdb14c0c8cf07ffa232123c76", "score": "0.5034282", "text": "function hestia_sanitize_multiselect( $value ) {\n\tif ( ! is_array( $value ) ) {\n\t\t$value = explode( ',', $value );\n\t}\n\n\treturn ! empty( $value ) ? array_map( 'sanitize_text_field', $value ) : array();\n}", "title": "" }, { "docid": "9f09eea9e1c0e54197341f54dc86ab3b", "score": "0.5034149", "text": "public function toSearchableArray(): array\n {\n $array = $this->toArray();\n\n // Customize array...\n\n return $array;\n }", "title": "" }, { "docid": "9f09eea9e1c0e54197341f54dc86ab3b", "score": "0.5034149", "text": "public function toSearchableArray(): array\n {\n $array = $this->toArray();\n\n // Customize array...\n\n return $array;\n }", "title": "" }, { "docid": "2d84e6e45fe1d1173949d3ba7128075c", "score": "0.5031151", "text": "function ussd_string_to_array($ussd_string){\n return explode(\"*\",$ussd_string);\n}", "title": "" }, { "docid": "bfe276c62cc618149076bdfb647872fe", "score": "0.50294775", "text": "function getLabelArray($str)\n {\n $ans = array();\n preg_match_all($this -> matchregexp, $str, $regans, PREG_SET_ORDER);\n foreach($regans as $x) {\n $ans[] = $x[1];\n } \n return $ans;\n }", "title": "" }, { "docid": "376879d0c3a852f0a8d809863c5bbe67", "score": "0.5029356", "text": "function getParams\n(\n string $params = NULL\n)\n:array\n{\n $result = NULL;\n\n# REMOVE DOUBLE SPACES\n while (strpos($params, ' ') ) {\n $params = str_replace(' ', ' ', $params);\n }\n\n# CONVERT TO ARRAY\n $result = explode(' ', $params);\n if( empty($result) ):\n $result[] = $params;\n endif;\n\n return $result;\n}", "title": "" }, { "docid": "7c747efdd0a8083566f92fb7a5e0ce97", "score": "0.50201344", "text": "public function toSearchableArray() {\n $array = $this->toArray();\n\n // Customize array...\n\n return $array;\n }", "title": "" }, { "docid": "4859f2da68ed1b8f3ec096be11b9991d", "score": "0.5012013", "text": "function prepare($day) {\n $references = array();\n foreach (explode(\";\", $day) as $ref) {\n if (strpos($ref, \",\") !== FALSE) {\n foreach (explode(\",\", $ref) as $str) {\n $references[] = trim(preg_replace('/[a-z]{1}(?=-|$)/', '', $str));\n }\n } else {\n $references[] = trim(preg_replace('/[a-z]{1}(?=-|$)/', '', $ref));\n }\n }\n return $references;\n}", "title": "" }, { "docid": "916800c49c7d22326e40cff7aece1c1e", "score": "0.5008942", "text": "public function convertToQueryIN($stringValue,$delimiter=',') {\n\t\tif(!is_array($stringValue))\n\t\t{\n\t\t\t$stringValue = explode($delimiter,$stringValue);\n\t\t}\n\t\t/*if(is_array($stringValue))\n\t\t{\n\t\t\t$stringValue = implode($delimiter,$stringValue);\n\t\t}*/\n\t\t$strQueryIDs = '';\n\t\tforeach($stringValue as $item)\n\t\t{\n\t\t\tif($item)\n\t\t\t{\n\t\t\t\t$strQueryIDs .= '\\''.$item.'\\',';\n\t\t\t}\n\t\t}\n\t\tif(strlen($strQueryIDs)>0)\n\t\t{\n\t\t\t$strQueryIDs = global_common::cutLast($strQueryIDs,1);\t\n\t\t}\n\t\treturn $strQueryIDs;\n\t}", "title": "" }, { "docid": "542b70d553d2ee00a55bda9b2d21c8a3", "score": "0.50080395", "text": "function config_array_from_str( $text) {\n\t$t = str_replace(\"[\", \"\", $text);\t// Remove '['\n\t$t = str_replace(\"'\", \"\", $t);\t\t// Remove '\n\t$t = str_replace(\"\\\"\", \"\", $t);\t\t// Remove \"\n\t$t = str_replace(\"]\", \" \", $t);\t\t// Convert ] to space\n\t$a = explode(\" \", trim($t));\n\tinit_config_arr($a);\n}", "title": "" }, { "docid": "b91d516f9b7b45eb1c59a49256428527", "score": "0.49987197", "text": "protected function getArray($argument)\n {\n return (!is_array($argument)) ? preg_split('/ ?[,|] ?/', $argument) : $argument;\n }", "title": "" }, { "docid": "3e829fd2e700997fdd0a30903240c246", "score": "0.499191", "text": "public function toSearchableArray()\n {\n $array = $this->toArray();\n // Customize array...\n return $array;\n }", "title": "" }, { "docid": "bac2aa28eee2532404ae1b11f4fc5ffc", "score": "0.4990652", "text": "public function unserializeIds($ids)\n {\n return array_filter(array_map(array($this->_table,'filterId'), explode(',', $ids)));\n }", "title": "" }, { "docid": "cd99ea5d1a3d0c4e80db2a938e0c640e", "score": "0.4990427", "text": "public function queryArray($xpath) {\n $arr = array();\n $result = $this->xpath->query($xpath);\n foreach ($result as $r) {\n if ($r instanceof DOMAttr) {\n array_push($arr, $r->value);\n } elseif ($r instanceof DOMText) {\n array_push($arr, trim($r->textContent));\n } else {\n throw new XMLSearchException($xpath, \"Unsupported resulttype: \" . get_class($r));\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "d06f90cb576e604436da256663d6722c", "score": "0.49832827", "text": "public function toSearchableArray()\n {\n $array = $this->toArray();\n\n // Customize array...\n\n return $array;\n }", "title": "" }, { "docid": "d06f90cb576e604436da256663d6722c", "score": "0.49832827", "text": "public function toSearchableArray()\n {\n $array = $this->toArray();\n\n // Customize array...\n\n return $array;\n }", "title": "" }, { "docid": "69700755a424adbedf36bb9af1913be3", "score": "0.49824584", "text": "public static function strToList($str, $separator = ',')\n {\n $str = str_replace(';', ',', $str);\n $str = str_replace(':', ',', $str);\n if ($separator)\n $str = str_replace($separator, ',', $str);\n return explode(',', $str);\n }", "title": "" }, { "docid": "a3a574d5ffef578d8977b8b1d62fdbdf", "score": "0.4979192", "text": "public static function toArray($string, $split = '/ ?[,|] ?/')\n {\n return (!is_array($string)) ? preg_split($split, $string) : $string;\n }", "title": "" }, { "docid": "bd53ebb3bd85d3da4e00c3bac20f99c3", "score": "0.49669138", "text": "public function getFactureSearchArray(): array\n {\n return array(\n '${NOMENTREPRISE}',\n '${TITREETUDE}',\n '${ADRESSEENTREPRISE}',\n '${CPENTREPRISE}',\n '${VILLEENTREPRISE}',\n '${PAYSENTREPRISE}',\n '${SIRETENTREPRISE}',\n '${DESCRIPTIONETUDE}',\n '${DATESIGCV}',\n '${DJOUR}',\n '${NOMUSER}',\n '${PRENOMUSER}',\n '${CIVILITEUSER}',\n '${IDENTITECONTACT}',\n '${INDENTITEUSER}',\n '${DATEFIN}',\n '${NOMPRESIDENT}',\n '${CIVPRESIDENT}',\n '${PRENOMPRESIDENT}',\n '${NOMTRESORIER}',\n '${CIVTRESORIER}',\n '${PRENOMTRESORIER}',\n '${IDENTITETRESORIER}',\n '${IDENTITEPRESIDENT}',\n '${NUMEROFACTURE}',\n '${MONTANTLETTREFACTURE}',\n '${MONTANTTTCFACTURE}',\n '${MONTANTHTFACTURE}',\n '${TVAFACTURE}',\n '${DUEDATE}',\n '${CREATEDDATE}',\n '${MONTANTTVAFACTURE}',\n '${POURCENTAGEFACTURE}',\n '${FENUMEROFACTURE}'\n );\n }", "title": "" }, { "docid": "a8169723353f8142e73a4ab15ea68351", "score": "0.49629244", "text": "public function hydrate($value)\n {\n return explode(',', trim($value, '{}'));\n }", "title": "" }, { "docid": "f2847acc02726f01960e08563abc4907", "score": "0.49625382", "text": "public function deepsearch(): array\n {\n if (!isset($_GET['search'])) {\n $searchopt = [\n 'id' => 1,\n 'title' => 1,\n 'description' => 1,\n 'content' => 1,\n 'other' => 0,\n 'casesensitive' => 0\n ];\n } else {\n $searchopt['id'] = $_GET['id'] ?? 0;\n $searchopt['title'] = $_GET['title'] ?? 0;\n $searchopt['description'] = $_GET['description'] ?? 0;\n $searchopt['content'] = $_GET['content'] ?? 0;\n $searchopt['other'] = $_GET['other'] ?? 0;\n $searchopt['casesensitive'] = $_GET['case'] ?? 0;\n }\n $regex = $_GET['search'] ?? '';\n return ['regex' => $regex, 'searchopt' => $searchopt];\n }", "title": "" }, { "docid": "33090b5095edce49f5b2da34fecfce04", "score": "0.49448365", "text": "public static function stringToArray($ids)\n {\n if (!is_array($ids)) {\n $ids = preg_split(\"/[\\s,]+/\", $ids);\n }\n\n // trim white space\n foreach ($ids as $key => $id) {\n $ids[$key] = stripslashes(trim($id));\n }\n\n if (count($ids) > 0 && $ids[0]) {\n return $ids;\n }\n\n return NULL;\n }", "title": "" }, { "docid": "b4797175f3097415270c7b1c6b577f42", "score": "0.49350744", "text": "public function getSearch(): array {\n return [$this->searchType, $this->searchValue];\n }", "title": "" } ]
448a57f558c34a4e2b433c3d63d9f5b2
Find all records in this model's database table. Sorts the results by the 'title' field ascending.
[ { "docid": "a5764b6687ce1aa40da0bc5bd8a75290", "score": "0.5875865", "text": "public function findAll()\n {\n $sql = \"SELECT * FROM {$this->tableName} WHERE deleted = 0 ORDER BY title ASC\";\n\n $this->pdo->prepared = $this->pdo->prepare($sql);\n $this->pdo->prepared->execute();\n\n $pages = $this->pdo->prepared->fetchAll(PDO::FETCH_ASSOC);\n\n $versions = new Versions();\n\n foreach ($pages as &$page) {\n $page[\"active_version\"] = $versions->findActiveVersion($page[\"id\"]);\n }\n\n $this->data[\"pages\"] = $pages;\n\n return $this->data;\n }", "title": "" } ]
[ { "docid": "65a1bc5313dc5f2389809af1166ee516", "score": "0.7009857", "text": "public function all()\n {\n return $this->model->all();//->sortBy('name');\n }", "title": "" }, { "docid": "401bab6f685a3aacb3fc237b1b509d3a", "score": "0.6891642", "text": "public function all()\n {\n return $this->model->all()->sortBy('name');\n }", "title": "" }, { "docid": "0042832979a0a30335b9ecbf95374e35", "score": "0.6840336", "text": "public function listByTitle() {\n return $this->select('id, title', null, array('order' => 'title ASC'));\n }", "title": "" }, { "docid": "7bc3d5e09501deaf5313e6aa50d81984", "score": "0.678063", "text": "public function getAll()\n {\n return $this->findBy([], ['created' => 'DESC']);\n }", "title": "" }, { "docid": "eb5f68f3c840ae18d43a208f0601e804", "score": "0.678052", "text": "public function findAll()\n {\n return parent::findBy([], ['index' => 'ASC']);\n }", "title": "" }, { "docid": "ff2c3fab49b8c1f06a89dcbbcc5853b0", "score": "0.67338324", "text": "public function all()\n {\n $model = $this->getModel();\n $rows = $model::all();\n\n if ($sort_by = Request::input(self::SORT_BY))\n {\n return $rows->sortBy($sort_by);\n }\n\n return $rows;\n }", "title": "" }, { "docid": "740bf9ea3711b378a09d78d2b34e2b73", "score": "0.6581494", "text": "public static function getAll ()\n\t{\n\t\t$db = self::_getDbTable(self::$_dbTable);\n\t\t\n\t\t$select = $db->select();\n\t\t\n\t\t$select->order('title');\n\n\t\t$resultSet = $db->fetchAll($select);\n\t\t\n\t\treturn self::_createArrayFromResultSet($resultSet, array(__CLASS__, '_initItem'));\n\t}", "title": "" }, { "docid": "6e1e363a5148617fba01fea6a4be1593", "score": "0.65579784", "text": "public function findAll()\n {\n return $this->findBy(array(), array('name' => 'ASC'));\n }", "title": "" }, { "docid": "f402a0191bc4fe6d0f4f3fbce1140473", "score": "0.6512407", "text": "public static function find_all()\n {\n //Query for selecting all the results\n $sql = \"SELECT * FROM \".static::$tbName.\" \".\"ORDER BY Id DESC\";\n //Returning the Object Array\n return static::find_by_sql($sql);\n }", "title": "" }, { "docid": "21fead5ac7c63f2b71bf143d3428b1f3", "score": "0.6491128", "text": "static function all()\n {\n return Model::db()->rows(\"SELECT * FROM \" . Self::render() . \" ORDER BY id DESC\");\n }", "title": "" }, { "docid": "65980ea1bfacca4f4a47d7489f861a79", "score": "0.6474344", "text": "public function getAll()\n {\n return $this->model::orderBy(\n 'id', Config::get('settings.admin.articles.orderBy')\n )->paginate(Config::get('settings.admin.articles.paginate'));\n\n }", "title": "" }, { "docid": "487964fb9d303034c3d49083d33201de", "score": "0.6431291", "text": "protected function query()\n {\n return $this->modelRepository->sort('name')\n ->search([], Configuration::FETCH_QUERY);\n }", "title": "" }, { "docid": "10939c6fbd0b0a712391b30f40187eae", "score": "0.6418977", "text": "public function getAllEntries()\n\t{\n\t\t$attributes\t= array('order' => 'name');\n\n\t\treturn $this->getCriteria($attributes)->find();\n\t}", "title": "" }, { "docid": "73a5116180d131e970cbebf18cb43fbc", "score": "0.64029044", "text": "public function findAll()\n {\n return $this->findBy(array(), array('created_at' => 'DESC'));\n }", "title": "" }, { "docid": "9da294b0a901d218cb6145db3779414c", "score": "0.63071704", "text": "public function getAll() {\n $sql = \"SELECT *\n FROM `{$this->table}`\n ORDER BY `name` ASC\";\n return $this->Db->fetchAll($sql);\n }", "title": "" }, { "docid": "bed1a5bbc95289078a5312eb7124acad", "score": "0.6304475", "text": "public function find()\n {\n #return a collection of models\n return $this->getResults($this->query_statement->getStatementString());\n }", "title": "" }, { "docid": "4f23c16f27afd2fb96dabd1c5f3b2278", "score": "0.62786835", "text": "public static function findAll() {\r\n\r\n\t\t$sql = \"SELECT *\r\n\t\t\tFROM `\". DB_PREFIX. self::$tablename. \"`\r\n\t\t\tORDER BY `surname`, `firstname`;\";\r\n\t\treturn self::findBySQL($sql);\r\n\t}", "title": "" }, { "docid": "64b5886588f0eef1000c7b7f2ce12092", "score": "0.6267384", "text": "public static function find_all()\n {\n\n return static::find_by_sql(\"SELECT * From \" . static::$table_name);\n }", "title": "" }, { "docid": "8d7ac3a013b55d64b602fd7bd4f22dd7", "score": "0.62651676", "text": "public function loopByTitle(): void\n {\n $this->select();\n $this->orderBy(tableField('books', 'title'));\n $this->iterate();\n }", "title": "" }, { "docid": "863c71a1571b5765009c164b03f3960b", "score": "0.6199211", "text": "public function getAll()\n {\n $stmt = $this->_connection->prepare(\"SELECT title FROM fields\");\n $stmt->execute();\n $data = $stmt->fetchAll();\n return $data;\n }", "title": "" }, { "docid": "8a8e937d2f7d04ebc339df5cae3c4ea6", "score": "0.61766434", "text": "public static function getAllTitles()\n {\n return R::getCol('SELECT `title` FROM `' . PREFIX. 'tag` ORDER BY `title` ASC');\n }", "title": "" }, { "docid": "2d61a84b4709878f2f051b9d72567fd1", "score": "0.61487895", "text": "public static function getAllData(){\r\n\t\t\treturn static::find_by_sql(\"SELECT * FROM \".static::$table_name.\" ORDER BY \".static::$db_fields[1].\" ASC\");\r\n\t\t}", "title": "" }, { "docid": "f59c13be3e45e92441f948e49e0fc23c", "score": "0.61374533", "text": "public function findAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "93eab5a638205ec98606ca29b4f67e9e", "score": "0.6111855", "text": "function readTitles(){\r\n //ORIGINAL WORKING QUERY --WITHOUT-- GROUP_CONCAT or COUNTING\r\n $query = \"SELECT b.ID, b.Title FROM \r\n \" . $this->tableName . \" AS b \r\n ORDER BY\r\n Title ASC\";\r\n \r\n $final = $this->dbConn->prepare($query);\r\n $final->execute();\r\n \r\n return $final;\r\n }", "title": "" }, { "docid": "bfda91d205e5ef67d014ebfa54a68398", "score": "0.61098695", "text": "public static function getAll()\n {\n return R::getAll('SELECT * FROM `' . PREFIX. 'tag` ORDER BY `title` ASC');\n }", "title": "" }, { "docid": "af94098d58bb5b8ae576a0a503dfba00", "score": "0.6107642", "text": "public function getAll(){\n $query = $this->query()\n ->orderBy('id', 'desc')\n ->paginate(sysdef()->name('pagination_high'));\n return $query;\n }", "title": "" }, { "docid": "9cb9f88061afe4f71a72998d4332e1a0", "score": "0.6106272", "text": "public static function listAll(){\n $sql = new Sql();\n return $sql->select(\"SELECT * FROM tb_categories ORDER BY cat_title ASC\");\n }", "title": "" }, { "docid": "b0da3b4ccaa2514284e088b173ab206e", "score": "0.6091093", "text": "public static function findAll( ) {\n $cons = \"select * from `\".articleClass::$tableName.\"`\";\n return articleClass::findByQuery( $cons );\n }", "title": "" }, { "docid": "b94ef3505da39cb4130532d834e3be02", "score": "0.6089109", "text": "public function listAll(){\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.60451037", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.60451037", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.60451037", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "62e82787d382ab4aa2a0f28958d28354", "score": "0.60451037", "text": "public function getAll()\n {\n return $this->findAll();\n }", "title": "" }, { "docid": "d17249b85767313331e37a0142c4a02c", "score": "0.60450864", "text": "function get_all() {\n $this->db->order_by($this->id, $this->order);\n return $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "f6f8565bc721dd4e52d0198780ca0c2c", "score": "0.59892464", "text": "public static function findAll() {\r\n $database = new Database();\r\n $query = \"SELECT * FROM todo_list_items ORDER BY `id` DESC\";\r\n $results = $database->query($query);\r\n $models = array();\r\n if (count($results) >= 1) {\r\n foreach ($results as $result) {\r\n $model = new self;\r\n\r\n $model->id = $result['id'];\r\n $model->title = $result['title'];\r\n $model->text = $result['text'];\r\n $model->date_created = $result['date_created'];\r\n $model->is_checked = $result['is_checked'];\r\n\r\n $models[] = $model;\r\n }\r\n }\r\n return $models;\r\n }", "title": "" }, { "docid": "5f03b8ea59df038afa6d1d0f7112bf7e", "score": "0.5988909", "text": "public function showAll()\n {\n return Song::paginate(9);\n }", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "4d3d89bbb13a9a2be087e750f70d82da", "score": "0.5988324", "text": "public function findAll();", "title": "" }, { "docid": "0d27d111b5a0e7cf0e7a7b8af18c3ae4", "score": "0.5976847", "text": "public function show_all()\n {\n $sql = \"SELECT * FROM articles\";\n\n $query = $this->db->query($sql);\n\n return $query;\n }", "title": "" }, { "docid": "e51b1935d559b372bf74e8932448b8ae", "score": "0.5968444", "text": "public static function getAll() {\n\t\t$Model = new self ( );\n\t\t$select = $Model->select ();\n\t\t$select->order('sqn');\n\t\treturn $Model->fetchAll ( $select );\n\t}", "title": "" }, { "docid": "0f6d81b1fb784c32a935090da4e0874b", "score": "0.5941688", "text": "public function findAll()\n {\n $sql = $this->makeQuerySelect()->sql();\n return $this->fetch($sql);\n }", "title": "" }, { "docid": "09865620e6af602dc6a42396a445c9da", "score": "0.59323144", "text": "public function findAll() {\n\t\treturn dibi::dataSource(\"SELECT * FROM %n\", $this->tableName());\n\t}", "title": "" }, { "docid": "4b4afe595a30a11a5a8cb7065d762cf0", "score": "0.59225565", "text": "function findAll() {\n\t\t$this->storage->selectAll($this->tableName);\n\t\treturn $this->storage->getRecords();\n\t}", "title": "" }, { "docid": "c3dbaafcfbfbed7c31d6084b5de7d5d8", "score": "0.5883899", "text": "public function findAll()\n {\n return $this->findBy(array('status' => 1), array('id' => 'ASC'));\n }", "title": "" }, { "docid": "47afb663fc584c9af74ccca0d8f5de1f", "score": "0.5883337", "text": "public function getAll()\n {\n return Post::paginate(10);\n }", "title": "" }, { "docid": "610e91e274cad9627ee27edb07e109d9", "score": "0.5882815", "text": "public function findAll() { ; }", "title": "" }, { "docid": "a883dcb7bd156bdd6c9098187b4a34ed", "score": "0.5879797", "text": "public function search () {\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('id', $this->id);\r\n\t\t$criteria->compare('title', $this->title, true);\r\n\t\t$criteria->compare('ownerId', $this->ownerId);\r\n\t\t$criteria->compare('ctime', $this->ctime);\r\n\t\t$criteria->compare('description', $this->description, true);\r\n\r\n\t\t$sort = Yii::app()->getRequest()->getParam('sort');\r\n\t\t/**\r\n\t\t * TODO: убрать все это в поведения\r\n\t\t */\r\n\t\t/**\r\n\t\t * подключаем таблицу счетчиков только если запрошена сортировка по счетчикам\r\n\t\t */\r\n\t\tif ( strpos($sort, 'commentsCount') !== false ) {\r\n\t\t\t$criteria->select = 't.*, cc.count AS commentsCount';\r\n\t\t\t$criteria->join = 'LEFT JOIN {{commentCounts}} cc ON ( cc.modelName = \\'' . $this->resolveClassName() . '\\' AND cc.modelId = t.id)';\r\n\t\t\t//$criteria->group = 't.id';\r\n\t\t}\r\n\t\t/**\r\n\t\t * подключаем таблицу рейтингов\r\n\t\t */\r\n\t\t//if ( strpos($sort, 'rating') !== false ) {\r\n\t\t$criteria->select = 't.*, r.rating AS rating';\r\n\t\t$criteria->join .= 'LEFT JOIN {{ratings}} r ON ( r.modelName = \\'' . $this->resolveClassName() . '\\' AND r.modelId = t.id)';\r\n\t\t//}\r\n\r\n\t\t$sort = new CSort($this);\r\n\t\t$sort->defaultOrder = 'rating DESC';\r\n\t\t$sort->attributes = array(\r\n\t\t\t'*',\r\n\t\t\t'rating' => array(\r\n\t\t\t\t'asc' => 'rating ASC',\r\n\t\t\t\t'desc' => 'rating DESC',\r\n\t\t\t),\r\n\t\t);\r\n\r\n return new CActiveDataProvider($this, array(\r\n 'criteria' => $criteria,\r\n 'sort' => $sort,\r\n 'pagination' => ['pageVar' => 'page'],\r\n ));\r\n\t}", "title": "" }, { "docid": "d12a51e6e1641d5fc265356cb1c1e6f3", "score": "0.5877062", "text": "public function getAll()\n {\n return $this->model\n ->get();\n }", "title": "" }, { "docid": "54e606f4cfb97463b99f39d5c2c9aaee", "score": "0.5876761", "text": "function all(){\n try {\n $q = \"SELECT * FROM $this->table\";\n $query = $this->con->prepare($q);\n $query->execute(array($this->table));\n\n return $query->fetchAll(PDO::FETCH_CLASS, $this->model);\n }catch (PDOException $e){\n print $e->getMessage();\n }\n }", "title": "" }, { "docid": "0f92243c611dab3cb94d90da79250ca7", "score": "0.5876411", "text": "function get_all() {\n\t\tglobal $_DB, $_DB_SCHEMA;\n\n\t\t$result = array();\n\t\t//modified from the original supplied version\n\t\t$order_by_statement = '';\n\t\tif (!empty ($this->orderby))\n\t\t\t$order_by_statement = ' ORDER BY '.$this->orderby.' '.(!empty($this->orderby)?$this->sort:'');\n\t\t\n\t\t$limit_statement = '';\n\t\tif (!empty ($this->limit))\n\t\t\t$limit_statement = ' LIMIT 0,'.$this->limit;\n\t\t$_DB->sql_query($this->select.' '.$this->where.$order_by_statement.$limit_statement.';');\n\t\t//echo $this->select.' '.$this->where.$order_by_statement.$limit_statement.';';exit;\n\t\twhile ($row = $_DB->sql_fetchrow()) {\n\t\t\t$result[] = new _record($row);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c2bf0c2fc3a668deba4477e8045678d2", "score": "0.5862373", "text": "public function findAll()\n {\n return $this->select()->from([\"`ALL`\" => $this->_tableName()])->execute();\n }", "title": "" }, { "docid": "c25261cc7d66f90b0d20c12686fc51b5", "score": "0.5854721", "text": "public function find()\n {\n $query = new Query();\n return $query->from($this->getModel()->tableName());\n }", "title": "" }, { "docid": "57ab655107e4a8de5bffec7dd8d8c95c", "score": "0.5854026", "text": "public function all() {\n $query = \"SELECT * FROM \" . $this->tableName . \";\";\n $query = DB::select(DB::raw($query));\n return $this->model->hydrate($query);\n }", "title": "" }, { "docid": "c8b3a0f9e34833874a49a5322a061cf8", "score": "0.58533955", "text": "public function findAll()\n\t{\n\t}", "title": "" }, { "docid": "c8b3a0f9e34833874a49a5322a061cf8", "score": "0.58533955", "text": "public function findAll()\n\t{\n\t}", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5852228", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5852228", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5852228", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5852228", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5852228", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "313e074477f1e0adcebc42073bd21c32", "score": "0.5848354", "text": "public function findAll() {\r\n\t\treturn $this->filter()->getQuery ()->execute ();\r\n\t}", "title": "" }, { "docid": "06c603873b80acc215c1a47bb39fe68a", "score": "0.5844954", "text": "public function all()\n {\n $sql = \"SELECT * FROM \" . $this->table;\n $query = $this->db->prepare($sql);\n $query->execute();\n return $this->toModel($query->fetchAll());\n }", "title": "" }, { "docid": "8d6222af8cd7baf87cdb65832fb47d53", "score": "0.5838171", "text": "public function findAll()\n {\n return parent::findAll();\n }", "title": "" }, { "docid": "2b2e8de9792c4c80ab71dedc330a0bf0", "score": "0.5836627", "text": "public static function findAll() {\n\t return self::find(\"all\");\n }", "title": "" }, { "docid": "54103fdff8cc681551c0a6b78eca5a6d", "score": "0.5830176", "text": "public function findAll()\n {\n $all = [];\n $array = DB::exec($stmt, \"SELECT * FROM {$this->class_name}\" . DB::sqlPaging());\n\n while ($stmt->fetch())\n {\n $all[] = DB::toObject($array);\n }\n\n return $all;\n }", "title": "" }, { "docid": "f2a3b56587d6b35f60c4387d7258f67a", "score": "0.5821858", "text": "public function getAll()\n {\n return $this->_model->all();\n }", "title": "" }, { "docid": "aab509833801030ef558b09b08d6c1d2", "score": "0.5817936", "text": "public function getAll(){\n $query = \"SELECT * FROM {$this->table}\";\n return $this->returnObjects($this->db->execute($query));\n }", "title": "" }, { "docid": "9d7706f808893c32b95200fa7f84707a", "score": "0.581554", "text": "public static function find_all(){\n\t\t// due to late static binding, I will be using the static:: call instead of self::\n\t\treturn static::find_by_query(\"SELECT * FROM \" . static::$db_table . \" \");\n\t}", "title": "" }, { "docid": "745ccbafebcb56ea72d9290813fdd7f0", "score": "0.58073944", "text": "public function findAll()\r\n {\r\n $sql = \"SELECT *\r\n FROM \" . $this->tableName . \" a\";\r\n\r\n return $this->getMultipleResults(\r\n DAO::select($sql),\r\n $this->className\r\n );\r\n }", "title": "" }, { "docid": "14e1342a33ff0d0313f73987a5ee3abf", "score": "0.5800041", "text": "function findall($args = null){\r\n\t\tif (key_exists('pageItems', $this->_controller)){\r\n\t\t\t$limitNum = $this->_controller['pageItems'];\r\n\t\t\t$pageNum = (isset($this->_controller['page'])) ? ($limitNum * ($this->_controller['page']-1)) : 0;\r\n\t\t\t$args['limit'] = ($pageNum !== false && $pageNum >= 0)?$pageNum.','.$limitNum:$limitNum;\r\n\t\t}\r\n\t\t$args['order'] = (key_exists('asort', $this->_controller))?$this->_controller['asort']:null;\r\n\t\t$args['order'] = (key_exists('dsort', $this->_controller))?$this->_controller['dsort']:null;\r\n\t\tif (empty($args['order'])){ unset($args['order']); }\r\n\t\t$ar = $this->getQuery($this->_model,$args);\r\n\t\treturn $ar;\r\n\t}", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.57903993", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.5780283", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "58b7eedd74511762657c8f45c0ccf180", "score": "0.57654387", "text": "public function findAll ();", "title": "" }, { "docid": "d22d5ff8735e598e3d7da63c61f80480", "score": "0.5760981", "text": "public function findAll() {\n $result = array();\n $sql = \"SELECT * FROM $this->table ORDER BY nome asc\";\n $stmt = Conexao::prepare($sql);\n $stmt->execute();\n if ($stmt->rowCount() > 0) {\n $result = $stmt->fetchAll();\n }\n return $result;\n }", "title": "" }, { "docid": "fae109aa984d53ef5cf558b4cf83a56c", "score": "0.5759895", "text": "public function readAll()\n {\n $query = 'SELECT * FROM articles ORDER BY id DESC';\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $articles = $stmt->fetchAll(PDO::FETCH_OBJ);\n return $articles;\n }", "title": "" }, { "docid": "d435a33f88be0bf6aea95ae5c9bb7938", "score": "0.5756981", "text": "public static function getAll(){\n\t\t$sql = \"select * from \".self::$tablename;\n\t\t$query = Executor::doit($sql);\n\t\treturn Model::many($query[0],new CategoryData());\n\t}", "title": "" }, { "docid": "03c5ef47de244cb2f79379749765a148", "score": "0.5750909", "text": "public function queryOrderByDate()\n {\n return $this->model\n ->select('title', 'alias', 'description', 'created_at')\n ->whereActive(true)\n ->latest();\n }", "title": "" }, { "docid": "a3b7bd449f068cba6adf03924240d4e1", "score": "0.57312", "text": "public function loadAll()\n {\n $sql = \"SELECT\n `id`,\n `title`,\n `description`,\n `visibility`,\n `rank`,\n `version`,\n `lock`,\n `identifier`,\n `allow_reinit`,\n `view_mode`,\n `encoding`\n FROM `\".$this->tblPath.\"`\n ORDER BY `rank`\";\n\n if ( false === ( $data = claro_sql_query_fetch_all_rows($sql) ) )\n {\n return false;\n }\n else\n {\n return $data;\n }\n }", "title": "" }, { "docid": "4ab6d277461d86148e6278459fc22a91", "score": "0.573084", "text": "public function findAll()\n {\n return $this->createQueryBuilder('p')\n ->where('p.suppressed = 0')\n ->orderBy('p.lastname', 'ASC')\n ->addOrderBy('p.firstname', 'ASC')\n ->getQuery()\n ;\n }", "title": "" }, { "docid": "3023f90177a0d27e2e84a2f917a7a63f", "score": "0.5722223", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('type', $this->type);\n $criteria->compare('group_id', $this->group_id);\n\n $sort = new CSort;\n $sort->attributes = [\n '*',\n 'title' => [\n 'asc' => 'title',\n 'desc' => 'title DESC',\n ],\n ];\n\n return new CActiveDataProvider(\n $this, [\n 'criteria' => $criteria,\n 'sort' => $sort\n ]\n );\n }", "title": "" }, { "docid": "f378eed0587a641784d62f982df28bc1", "score": "0.57152885", "text": "public function findAll()\n\t\t{\n\t\t return $this->createQuery()->execute();\n\t\t}", "title": "" }, { "docid": "ea8241d8498040bfb6fc13bb1bf25eaa", "score": "0.5709888", "text": "public static function findAll()\n {\n $db = DB::getInstance();\n $data = $db->query(\n 'SELECT * FROM ' . static::$table,\n []\n );\n return $data;\n }", "title": "" }, { "docid": "299a7dc8038f83f04e673b6a8b277bb6", "score": "0.5709456", "text": "public function findAll()\n {\n return $this->createQuery()->execute();\n }", "title": "" }, { "docid": "3d9fee78f7bf17ae608b6907dbb570ab", "score": "0.5701037", "text": "public static function findAll(){\n\t\treturn Module::find('all', array('order' => 'sequence desc'));\n\t}", "title": "" }, { "docid": "318e202c03df2ab5fa252d2d45dd17f8", "score": "0.5700604", "text": "public static function findAll()\n {\n try {\n $query = \"SELECT * FROM \" . static::TABLENAME . \" ORDER BY created DESC\";\n self::$db->query($query);\n $results = self::$db->resultset();\n\n if (!empty($results)) {\n return $results;\n } else {\n return [];\n }\n } catch (PDOException $err) {\n return $err->getMessage();\n }\n }", "title": "" }, { "docid": "49d86e998dce4b83f8eb91cebfd8c86c", "score": "0.5700179", "text": "public function getAll() : Collection\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "3ad8c720e13689aed6e50fa66780b9f8", "score": "0.56951463", "text": "public function all($order = 'DESC')\r\n {\r\n return $this->reset()\r\n ->order_by('date',$order)\r\n ->find_all();\r\n }", "title": "" }, { "docid": "87b4c1ddcd9d7d69f20efc4b477f854d", "score": "0.5689547", "text": "public static function getAll()\n {\n return Post::with(['photo', 'category'])\n ->orderBy('id', 'desc')\n ->paginate(25);\n }", "title": "" }, { "docid": "f7ba597fe53a44b575f530370e53e517", "score": "0.56882846", "text": "public static function all()\n {\n // erzeuge neue instanz der Klasse auf dem die statische Methode AUSGEFÜHRT wird\n $model = new static();\n // hole den namen der DB-tabelle\n $table = $model->getSource();\n // erstelle eine datenbankverbindung\n $pdo = $model->getPdo();\n // bereite den DB query vor\n $stmt = $pdo->prepare('SELECT * FROM `' . $table . '`');\n // execute it NOW\n $stmt->execute();\n // bekomme als Ergebnis ein array mit objekten der klasse auf der die statische methode ausgeführt wird -> the magic of pdo :-)\n return $stmt->fetchAll(\\PDO::FETCH_CLASS, get_class($model));\n }", "title": "" }, { "docid": "6c3be4ac267507e85aa1b0c4e127f36f", "score": "0.5683773", "text": "public function all()\n {\n\n $query = \"SELECT * FROM \" . $this->table_name . \" ORDER BY created_at DESC\";\n $stmt = $this->connection->prepare($query);\n $stmt->execute();\n\n return $stmt;\n\n }", "title": "" }, { "docid": "1fd94d47d782bcfb49034ffebfc908b8", "score": "0.5683749", "text": "public function all(){\n\t\t//$q = $this->sql(\"SELECT description FROM category WHERE id = 1\");\n\t\t//var_dump($q[0]['description']);\n\t\t//var_dump(mb_detect_encoding($q[0]['description']));\n\t\t//exit;\n\t\t$sql = \"\n\t\t\tSELECT \" . $this->table . \".*\n\t\t\tFROM \" . $this->table . \"\n\t\t\";\n\t\treturn $this->query($sql);\n\t}", "title": "" }, { "docid": "5d45009b76e84bd88f3c1f83349348fd", "score": "0.56791884", "text": "public function all() {\n return $this->model->all();\n }", "title": "" }, { "docid": "5d45009b76e84bd88f3c1f83349348fd", "score": "0.56791884", "text": "public function all() {\n return $this->model->all();\n }", "title": "" }, { "docid": "e0dc44f8e457eb5ce952c13ac482915a", "score": "0.5678426", "text": "public function all() {\n return $this->databaseManager->query('SELECT * FROM ' . $this->table);\n }", "title": "" }, { "docid": "2514080134928422d7cabae2a997e4b8", "score": "0.5678193", "text": "public function getAllSorted() {\n return Hash::extract($this->find('all', array(\n 'fields' => array(\n 'item_id', 'display_index', 'name', 'plural', 'short_name', 'buyable', 'price'\n )\n )), '{n}.Item');\n }", "title": "" } ]
b2da5520f15d60e86711cd8d6ffe5549
Get record count (for current List page)
[ { "docid": "8d9f85923dd595a91cc8e644050c6b0a", "score": "0.7132561", "text": "function SelectRecordCount() {\r\n\t\tglobal $conn;\r\n\t\t$origFilter = $this->CurrentFilter;\r\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\r\n\t\t$sSql = $this->SelectSQL();\r\n\t\t$cnt = $this->TryGetRecordCount($sSql);\r\n\t\tif ($cnt == -1) {\r\n\t\t\tif ($rs = $conn->Execute($sSql)) {\r\n\t\t\t\t$cnt = $rs->RecordCount();\r\n\t\t\t\t$rs->Close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->CurrentFilter = $origFilter;\r\n\t\treturn intval($cnt);\r\n\t}", "title": "" } ]
[ { "docid": "17ac79e27633e5c8448997520b15c964", "score": "0.8069798", "text": "public function getRecordCount()\n\t{\n\t\treturn $this->recordCount;\n\t}", "title": "" }, { "docid": "2c57383702338233d56dd1cdd18766b0", "score": "0.80511796", "text": "public function listRecordCount()\n {\n $filter = $this->getSessionWhere();\n AddFilter($filter, $this->CurrentFilter);\n $filter = $this->applyUserIDFilters($filter);\n $this->recordsetSelecting($filter);\n $select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : $this->getQueryBuilder()->select(\"*\");\n $groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n $having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n $sql = $this->buildSelectSql($select, $this->getSqlFrom(), $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n $cnt = $this->getRecordCount($sql);\n return $cnt;\n }", "title": "" }, { "docid": "ecdaf40f7d966e439be54404bb9e2b3c", "score": "0.80183595", "text": "public function recordsCount();", "title": "" }, { "docid": "61d5f7faf7452b27fcb1ab6f248bd229", "score": "0.79388565", "text": "public static function count() {\n return Database::recordcount();\n }", "title": "" }, { "docid": "c0140bbf277095612649ef1eb902be80", "score": "0.7846488", "text": "public function countRecords() {\n $total = $this->find('count');\n\n return $total;\n }", "title": "" }, { "docid": "6b904ffa4c9ab143bc0e9308c05704f2", "score": "0.7807341", "text": "function record_count() {\n return $this->db->count_all($this->_student);\n }", "title": "" }, { "docid": "f428a3dad1cdeaa1d746fd72238fe2d6", "score": "0.7766331", "text": "public function record_count() {\n\treturn $this->db->count_all(\"contents\");\n\t}", "title": "" }, { "docid": "15f03d55e372419608d0ffb7a6e2cef1", "score": "0.7738305", "text": "public function record_count() {\n\n global $wpdb;\n\n $table_name = $wpdb->prefix . 'external_links_masks';\n\n $sql = \"SELECT COUNT(id) FROM $table_name\";\n\n return $wpdb->get_var( $sql );\n\n }", "title": "" }, { "docid": "9fcdefe88606474e298a0cba2cddfb2f", "score": "0.7686685", "text": "function RecordCount()\n\t{\n\t\treturn $this->_numOfRows;\n\t}", "title": "" }, { "docid": "48c13f7a9d6b3e38c46cdb8402ecfa6c", "score": "0.7645482", "text": "public function count () {\n return count($this->records);\n }", "title": "" }, { "docid": "a8a96a7aa400c016f86025f2b0584ae2", "score": "0.7629643", "text": "public function record_count()\n {\n return $this->db->count_all('checklist_preno');\n }", "title": "" }, { "docid": "15ead9749964c7491ee58b014e5dcb32", "score": "0.76226765", "text": "public function count()\n {\n return count($this->records);\n }", "title": "" }, { "docid": "15ead9749964c7491ee58b014e5dcb32", "score": "0.76226765", "text": "public function count()\n {\n return count($this->records);\n }", "title": "" }, { "docid": "7c3696c4b684cbe6f9de9fcaa95172e9", "score": "0.76192844", "text": "public static function record_count()\r\n {\r\n // global $wpdb;\r\n\r\n // $sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}customers\";\r\n\r\n // return $wpdb->get_var($sql);\r\n }", "title": "" }, { "docid": "b11398101d169ec0ddb219597d0c470c", "score": "0.7603662", "text": "function readRecordCount()\r\n {\r\n if(!$this->_recordcount)\r\n {\r\n $query = $this->buildQuery();\r\n $this->_recordcount = (int) $this->_database->count($query, $this->_params);\r\n }\r\n return $this->_recordcount;\r\n }", "title": "" }, { "docid": "5814366e876d2083f22952acdd08a8aa", "score": "0.76024956", "text": "public function getNumRecords()\r\n\t{\r\n\t\treturn $this->numRecords;\r\n\t}", "title": "" }, { "docid": "c77821561fb9ee23dc3f97bbe0a787c6", "score": "0.75999236", "text": "function RecordCount() {return $this->_numOfRows;}", "title": "" }, { "docid": "d989e052cd62580d2b3a3ce7857fa789", "score": "0.7536519", "text": "public static function recordcount() {\n return count( Database::$query );\n }", "title": "" }, { "docid": "4ca31c7ab911af9c6dca709cc35d7474", "score": "0.753633", "text": "public function count() {\n return $this->list->count();\n }", "title": "" }, { "docid": "943f12f9a33a46028877ee65c24cb11b", "score": "0.7523619", "text": "public function record_count() {\n return $this->db->count_all(\"users\");\n }", "title": "" }, { "docid": "fe7fcbce853bc2f796ffd888b9757ed9", "score": "0.7506422", "text": "public function getTotalRecordCount () {\n return @$this->_result['response']['dataInfo']['totalRecordCount'];\n }", "title": "" }, { "docid": "daa3acebd531a420a21acf45adfbf0e6", "score": "0.7487795", "text": "public function count()\n\t{\n\t\tif (!$this->_pageCount) {\n\t\t\t$this->_pageCount = ceil($this->getRecordCount() / $this->getPageSize());\n\t\t}\n\n\t\treturn $this->_pageCount;\n\t}", "title": "" }, { "docid": "9148a15050e3632ea007ff7522a64885", "score": "0.7443863", "text": "public function getCount() {\n \treturn $this->count();\n }", "title": "" }, { "docid": "b38a7651c6096851d06f8fcae509632e", "score": "0.74291277", "text": "public function getCount()\n {\n\t return $this->count;\n }", "title": "" }, { "docid": "bfda1447a7dea881a758d5fd766df3eb", "score": "0.74096966", "text": "function RecordCount() {\r\n return @mysql_num_rows($this->resource);\r\n }", "title": "" }, { "docid": "6a880e21fbbeb00dcb6bd68ba7269930", "score": "0.7402051", "text": "public static function record_count() {\n\t\tglobal $wpdb;\n\n\t\t$sql = \"SELECT COUNT(*) FROM {$wpdb->prefix}chart_show\";\n\n\t\treturn $wpdb->get_var( $sql );\n\t}", "title": "" }, { "docid": "b096596a43993d02a6707b994402e794", "score": "0.7401042", "text": "public function record_count() {\n return $this->db->count_all(KYC_USERS);\n }", "title": "" }, { "docid": "e00c25dc75defe6999e96a01afe7b074", "score": "0.7400068", "text": "function count( ) {\n $sql = $this->all( );\n \n $dao = CRM_Core_DAO::executeQuery( $sql );\n return $dao->N;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.7390983", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "784e697c5bc8d1ed1618c04b0223ebc6", "score": "0.73811936", "text": "public function record_count() {\r\n return $this->db->count_all(\"operatipo\");\r\n }", "title": "" }, { "docid": "790ec4472e5ed8cca4fbb62b51134080", "score": "0.7348957", "text": "function getCount() {\n\t\treturn $this->_itemCount();\n\t}", "title": "" }, { "docid": "b3a1aeda700dbab319a7346d504ea96a", "score": "0.7346394", "text": "public function getCount() {\n return $this->count;\n }", "title": "" }, { "docid": "b3a1aeda700dbab319a7346d504ea96a", "score": "0.7346394", "text": "public function getCount() {\n return $this->count;\n }", "title": "" }, { "docid": "876beaccc373bfb5e7ab626fea11bdfa", "score": "0.7341419", "text": "public static function record_count() {\n\n $total_records = wp_count_posts( 'payment_list' );\n\n return $total_records->publish;\n\n }", "title": "" }, { "docid": "f30992b13131d43c47a0b5fb28ad3795", "score": "0.7319557", "text": "function count()\n {\n if ($this->_count == -1)\n {\n $params = $this->params;\n $params['count'] = '1';\n\n $res = $this->api->doRequest(\"GET\", $this->path, $params);\n $this->_count = (int)$res['count'];\n }\n return $this->_count;\n }", "title": "" }, { "docid": "20127b924aba5bcf79a705ca6c99dd13", "score": "0.7318756", "text": "public function getCount()\n {\n return $this->getValue('doc_count');\n }", "title": "" }, { "docid": "7fddf5a73c99b2f0361a494b42d9a10e", "score": "0.7313816", "text": "public function getCount() {\n\t\treturn $this->getMember('count');\n\t}", "title": "" }, { "docid": "629069c853db52858f90aa4db4b68fac", "score": "0.73099864", "text": "public function getCount()\n {\n return $this->count();\n }", "title": "" }, { "docid": "04695f149827f0046b2d362d8bbd3c7a", "score": "0.73014253", "text": "public function count(){\n $this->invoke_method = 'num_rows';\n return $this->_eval_queryset();\n }", "title": "" }, { "docid": "f708e2474bc96dd4915bdfc1e0d13143", "score": "0.7297198", "text": "public function record_count() \r\n\t{\r\n\t\tif($this->search) \r\n\t\t{ \r\n\t\t\t$this->db->like('name',$this->search); \r\n\t\t}\r\n\r\n\t\treturn $this->db->count_all_results($this->table);\r\n\t}", "title": "" }, { "docid": "98b6c923de237260d03ba6fb05082264", "score": "0.7287807", "text": "public function getCount()\n {\n return $this->Count;\n }", "title": "" }, { "docid": "98b6c923de237260d03ba6fb05082264", "score": "0.7287807", "text": "public function getCount()\n {\n return $this->Count;\n }", "title": "" }, { "docid": "98b6c923de237260d03ba6fb05082264", "score": "0.7287807", "text": "public function getCount()\n {\n return $this->Count;\n }", "title": "" }, { "docid": "98b6c923de237260d03ba6fb05082264", "score": "0.7287807", "text": "public function getCount()\n {\n return $this->Count;\n }", "title": "" }, { "docid": "afd98e37f55eb69d12d57bd36fb37e4f", "score": "0.72668105", "text": "public function count() {\n return !empty($this->data['count']) ? $this->data['count'] : 0;\n }", "title": "" }, { "docid": "e68d51762f8a5ffd04222904e7f1f991", "score": "0.7264097", "text": "public function getRecordCount(): string\n {\n return $this->_getHeaderValue('Recurly-Total-Records');\n }", "title": "" }, { "docid": "c40cd59df7ad18528e95f1dcd6c27b8f", "score": "0.72548467", "text": "public function getAllRecordCount() {\n $query = 'SELECT COUNT(*) AS count FROM '.ProgramDetails_DBTable::DB_TABLE_NAME\n . ' WHERE '.ProgramDetails_DBTable::IS_DELETED.'=0';\n $result = DBManager::executeQuery($query, array(), true);\n return $result[0]['count'];\n }", "title": "" }, { "docid": "f8a334e8d2b783113de123acd01d008b", "score": "0.72497725", "text": "public function getCount() : int\n {\n return $this->count;\n }", "title": "" }, { "docid": "9623a16ecd8c10241f2c708aacc4a163", "score": "0.724598", "text": "function getRecordCount()\r\n {\r\n if (isset($this->_dataSource)) {\r\n return $this->_dataSource->count();\r\n } else {\r\n // If there is no datasource then there is no data. The old way\r\n // of putting an array into the recordSet property does not exist\r\n // anymore. Binding an array loads the Array datasource driver.\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "ada715acd6ff72dadeda88ede548da0d", "score": "0.7236164", "text": "public function getCount(): int\n {\n return count($this->list);\n }", "title": "" }, { "docid": "8fa3a8611dc873c4c9245062a11fea7f", "score": "0.7231402", "text": "public function record_count()\n {\n return $this->db->count_all('tipologia_camera');\n }", "title": "" }, { "docid": "e75e7bfc465c0304accdbb19f1e5b0aa", "score": "0.72297776", "text": "function get_count() {\n\t\t$count=0;\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"select count(id) as num from \".$this->_db_table);\n\t\tif (!$rs) {\n\t\t\tprint $db->ErrorMsg();\n\t\t} else {\n\t\t\t$count = $rs->fields[\"num\"];\n\t\t}\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "28bc61b68b6dd44fa75042e11f16554b", "score": "0.721918", "text": "function getCount() \n {\n return parent::Count();\n }", "title": "" }, { "docid": "1c1752d799921ca6da81e6e7510f1054", "score": "0.7210169", "text": "public function getCount()\n\t{\n\t\treturn $this->data_source->count();\n\t}", "title": "" }, { "docid": "ac76ff6f25dc8990aab4af20f2eb1fe0", "score": "0.72054", "text": "public function getCount() {\n return $this->get(self::COUNT);\n }", "title": "" }, { "docid": "3e1e3643f1dad24d292ed3ea2989d6ab", "score": "0.7205252", "text": "public function get_count(){\r\n\t\treturn $this->count;\r\n\t}", "title": "" }, { "docid": "bd2874bc5ae6d860be7f634bf367dd2d", "score": "0.72032857", "text": "public static function getCount() {\n\t return static::$count;\n\t}", "title": "" }, { "docid": "f7701fca05b41d3fbdc4bae5dddaf980", "score": "0.719284", "text": "public function getCount() { return $this->data['count']; }", "title": "" }, { "docid": "87608879574184e392a676d7cdc3ed9d", "score": "0.7192685", "text": "public function getCount(): int\n {\n return $this->count;\n }", "title": "" }, { "docid": "0291441afaff2f1636fb1d50a023b659", "score": "0.7167676", "text": "function SelectRecordCount() {\n\t\tglobal $conn;\n\t\t$origFilter = $this->CurrentFilter;\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\n\t\t$sSql = $this->SelectSQL();\n\t\t$cnt = $this->TryGetRecordCount($sSql);\n\t\tif ($cnt == -1) {\n\t\t\tif ($rs = $conn->Execute($this->SelectSQL())) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\t$this->CurrentFilter = $origFilter;\n\t\treturn intval($cnt);\n\t}", "title": "" }, { "docid": "973c556387ca4b40e2764a7c3e19d673", "score": "0.7155031", "text": "public static function getCount(): int\n {\n return self::$count;\n }", "title": "" }, { "docid": "973c556387ca4b40e2764a7c3e19d673", "score": "0.7155031", "text": "public static function getCount(): int\n {\n return self::$count;\n }", "title": "" }, { "docid": "18c04c3e750724b194e3727351963531", "score": "0.7152629", "text": "protected function countRecords()\n {\n\n // Strip off limit and columns.\n $this->select->reset(Zend_Db_Select::LIMIT_COUNT);\n $this->select->reset(Zend_Db_Select::LIMIT_OFFSET);\n $this->select->reset(Zend_Db_Select::COLUMNS);\n\n // Count the total result size.\n $this->result['numFound'] = $this->select->columns('COUNT(*)')->\n query()->fetchColumn();\n\n }", "title": "" }, { "docid": "400df21004446b4b19ca454834432491", "score": "0.7149376", "text": "function RecordCount() {\r\n return mysql_num_rows( $this->result );\r\n }", "title": "" }, { "docid": "03c45a05b451a1d324d867c50b929f13", "score": "0.71469426", "text": "public static function getCount() {\r\n\t\t\t$dbAdapter = Zend_Db_Table_Abstract::getDefaultAdapter();\r\n\r\n\t $stmt = $dbAdapter->query(\"SELECT COUNT(*) as cntRow FROM search_post_index\");\r\n\t $list = $stmt->fetchAll();\r\n\t\t\t\r\n\t\t\treturn $list[0][\"cntRow\"];\r\n\t\t}", "title": "" }, { "docid": "bf9b9cc00d9e5f6093e9fbaf2153b571", "score": "0.7145575", "text": "public function count() {\r\n\treturn $this->count;\r\n }", "title": "" }, { "docid": "ede2f4a88aa60b496a4f0ffdf0f5eb6a", "score": "0.7132575", "text": "public function count() {\n return $this->count;\n }", "title": "" }, { "docid": "eebd3b739a3d4dd30c808235db292f5e", "score": "0.7123668", "text": "public function count()\n {\n return $this->_lists->count();\n }", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.7112908", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.7112908", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.7112908", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.7112908", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "ef8c6be249d5668860fd4dc21e5b27e6", "score": "0.7103816", "text": "function getTableRecordCount()\n {\n return $this->_impl->getTableRecordCount();\n }", "title": "" }, { "docid": "05860fa65659a22214634b47d4c29b91", "score": "0.7088925", "text": "public function count() {\n return $this->_count;\n }", "title": "" }, { "docid": "05860fa65659a22214634b47d4c29b91", "score": "0.7088925", "text": "public function count() {\n return $this->_count;\n }", "title": "" }, { "docid": "acd2ebefc185cc266dea35b4e496028f", "score": "0.70883226", "text": "public function getPageCount() {\n \treturn count(self::$page);\n }", "title": "" }, { "docid": "ce7b89e8c9fc4307186e6908ab548f06", "score": "0.7086716", "text": "public function count() {\n return count($this->list);\n }", "title": "" }, { "docid": "dd91e7361ed493327d69598778d9945c", "score": "0.7084022", "text": "function howmany(){\n\t\t\t//number of item in db listed by this object\n\t\t\treturn ((int)(count($this->toArray())));\n\t}", "title": "" }, { "docid": "26020612ab5c94659abc05f3aaecc006", "score": "0.7079088", "text": "public static function total() {\n return Database::recordcount();\n }", "title": "" }, { "docid": "f7ef7f9d641b7960f7e71bc3095d7476", "score": "0.70787346", "text": "public function count()\n {\n return self::$model->count();\n }", "title": "" }, { "docid": "94aec2d41e4a05d4cedadcbf00e9f595", "score": "0.70769686", "text": "public function getCount()\n {\n $myConfig = $this->getConfig();\n $oDb = oxDb::getDb();\n\n $sNewsViewName = getViewName('oxnews');\n $oBaseObject = $this->getBaseObject();\n //$sSelectFields = $oBaseObject->getSelectFields();\n\n if ($oUser = $this->getUser()) {\n // performance - only join if user is logged in\n $sSelect = \"select COUNT($sNewsViewName.`oxid`) from $sNewsViewName \";\n $sSelect .= \"left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where \";\n $sSelect .= \"oxobject2group.oxgroupsid in ( select oxgroupsid from oxobject2group where oxobjectid='\" . $oUser->getId() . \"' ) or \";\n $sSelect .= \"( oxobject2group.oxgroupsid is null ) \";\n } else {\n $sSelect = \"select COUNT($sNewsViewName.`oxid`) from $sNewsViewName \";\n $sSelect .= \"left join oxobject2group on oxobject2group.oxobjectid=$sNewsViewName.oxid where oxobject2group.oxgroupsid is null \";\n }\n\n $sSelect .= \" and \" . $oBaseObject->getSqlActiveSnippet();\n\n // loading only if there is some data\n $iRecCnt = (int) $oDb->getOne($sSelect);\n\n return $iRecCnt;\n }", "title": "" }, { "docid": "961976fe5159dd538969a7f21efbd351", "score": "0.70769614", "text": "abstract function numRecords();", "title": "" }, { "docid": "b62de9933da23de5542cc0823ae4ce5c", "score": "0.7073109", "text": "public function getCount() : int\n {\n return count ($this->data);\n }", "title": "" }, { "docid": "613d4b26162bcfbf89a2e94d3f170157", "score": "0.70684093", "text": "public function count() {\n\t\t// save it here before I remove it for the \"query all\"\n\t\t// get method\n\t\t$limit = $this->_data['limit'];\n\t\t$this->limit(0);\n\t\t$results = $this->get();\n\n\t\t// And now I restore the previous limit so that future\n\t\t// calls to \"get\" will return the correct number of results\n\t\t$this->limit($limit);\n\n\t\treturn count($results);\n\t}", "title": "" }, { "docid": "b5b133c8d392846b80d5ca4cdaba131e", "score": "0.7066591", "text": "public function count() {\n\t\treturn $this->_count;\n\t}", "title": "" }, { "docid": "9dcc2b277b0e8a266ed9b7b3c51c4f49", "score": "0.7062347", "text": "public function count() {\n\n\t\treturn $this->num;\n\n\t}", "title": "" }, { "docid": "3cceeb274d2f495ccc7fc07dd1320b2a", "score": "0.7060762", "text": "public function count()\n {\n return $this->_count;\n }", "title": "" }, { "docid": "3cceeb274d2f495ccc7fc07dd1320b2a", "score": "0.7060762", "text": "public function count()\n {\n return $this->_count;\n }", "title": "" }, { "docid": "3cceeb274d2f495ccc7fc07dd1320b2a", "score": "0.7060762", "text": "public function count()\n {\n return $this->_count;\n }", "title": "" }, { "docid": "24c4ffe8a466f2a0ad3d18ea22b7390f", "score": "0.705992", "text": "function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "d8adb9cfa7159ebc763b6e140d8c05a6", "score": "0.7058231", "text": "function getCount(){\n $manager = new ManageClient($this->getDataBase());\n return $manager->getAllCount();\n }", "title": "" } ]
cfa2c1b9b26836c96776f651f38bcec6
function that will display backend
[ { "docid": "351ab8daf8c20241a0ac9efeb86cfdf5", "score": "0.0", "text": "public function form( $instance ){\n\n echo '<p>You can manage this Widget from the <a href=\"./admin.php?page=carlos_practice\">Here!</a></p>';\n }", "title": "" } ]
[ { "docid": "371de04453ee51f0218960c6a7a8ceb4", "score": "0.75448227", "text": "public static function DisplayIndexBackend(){\n if(!Session::CheckAuthentication())\n Output::Redirect(Storage::Join(\"route.root\", \"login\"));\n \n maBase::SetBackendOutput(\"index.tpl\");\n Output::Send();\n }", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.7337742", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.7337742", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.7337742", "text": "public function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.72925246", "text": "public abstract function display();", "title": "" }, { "docid": "9fd15a3b7dcf1652a1139351526350e9", "score": "0.7203797", "text": "public function display() {}", "title": "" }, { "docid": "9fd15a3b7dcf1652a1139351526350e9", "score": "0.7203797", "text": "public function display() {}", "title": "" }, { "docid": "325757b0f60bcf514f6cbdff3e4584b5", "score": "0.7132407", "text": "abstract public function display();", "title": "" }, { "docid": "9474c348abc27609378adf206fc26f4f", "score": "0.6956671", "text": "public function view()\n {\n $data['basic_ext'] = $this->mdl->getBasicExtSp();\n $this->render($data);\n }", "title": "" }, { "docid": "2893f99492c0a221e7e81d80b64e1d01", "score": "0.69502926", "text": "abstract function show();", "title": "" }, { "docid": "8beddd76b0dfd4ee8fbc7e77c7941f9d", "score": "0.6938447", "text": "public function display()\n \t{\n \t\tparent::display();\n \t}", "title": "" }, { "docid": "9e67dbf2bc3d725b2786f28c56669bda", "score": "0.69140005", "text": "public function display() {\r\n\t\t$data = $this->data; // this piece of code must be with the next piece of code.\r\n\t\tinclude ($this->render);\r\n\t}", "title": "" }, { "docid": "f7f44b2afeafffb7dcfa0f77a20cf9e9", "score": "0.6903583", "text": "public function display()\n {\n\t\t// action links\n\t\techo '<div class=\"actions\" style=\"margin-bottom:20px\">';\n echo '<a href=\"grade_models.php\">'.Display::return_icon('back.png',get_lang('Back'),'', ICON_SIZE_MEDIUM).'</a>';\n\t\techo '<a href=\"'.api_get_self().'?action=add\">'.Display::return_icon('add.png', get_lang('Add'), '', ICON_SIZE_MEDIUM).'</a>';\n\t\techo '</div>';\n echo Display::grid_html('grade_model');\n\t}", "title": "" }, { "docid": "0d661a253e1ec0d0d7688ba0a262b814", "score": "0.6888463", "text": "public function Display()\n\t{\n\n\t}", "title": "" }, { "docid": "9c1e0e62126270031d851b06b32b2910", "score": "0.68743587", "text": "function display() {}", "title": "" }, { "docid": "f24a2f71be75af8805be9e0b727058dc", "score": "0.6853598", "text": "public function backend()\n {\n $data['title'] = 'Data Backend';\n $data['user'] = $this->user->getUserSession();\n $data['code'] = $this->backend->getDataBackend();\n $data['komponen'] = $this->backend->getDataKomponen();\n $data['kalkulasi'] = $this->backend->getDataCode();\n $data['tb_code'] = $this->backend->getDataKomponenAll();\n\n $this->load->view('templates/header', $data);\n $this->load->view('templates/sidebar', $data);\n $this->load->view('templates/topbar', $data);\n $this->load->view('code/backend', $data);\n $this->load->view('templates/footer', $data);\n }", "title": "" }, { "docid": "b20d8a15ecd9c2b3ff3953d7edba45d9", "score": "0.684691", "text": "public function display() {\n }", "title": "" }, { "docid": "6d86f09ad11adf788a71266b0c11fee5", "score": "0.67895395", "text": "function display()\r\n\t{\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "1730c4322aae43bba8b518f4ac5118d6", "score": "0.678561", "text": "function display()\n\t{\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "a37e1ae8aa98f2392762a7881b1989eb", "score": "0.6777389", "text": "function display () \n {\n print $this->render();\n }", "title": "" }, { "docid": "ddf7346026cf26f05e941df3911b76e4", "score": "0.67626566", "text": "function backend_view()\n { \n $Lw18nController = new \\LwI18n\\Controller\\I18nController($this->db, $this->response);\n $Lw18nController->execute( array($this->pluginname, \"lw_profile\"), \"de\", $this->collectDataforLwI18nPlugin(\"de\"));\n $Lw18nController->execute( array($this->pluginname, \"lw_profile\"), \"en\", $this->collectDataforLwI18nPlugin(\"en\"));\n \n $data = $this->repository->plugins()->loadPluginData($this->pluginname, $this->oid);\n \n $view = new \\lw_view(dirname(__FILE__).'/../Views/Templates/backendform.tpl.phtml');\n \n $view->data = $data;\n $view->actionUrl = $this->buildUrl(array(\"pcmd\"=>\"save\"));\n $view->jqUI = $this->config[\"url\"][\"media\"] . \"jquery/ui/jquery-ui-1.8.7.custom.min.js\";\n $view->jqUIcss = $this->config[\"url\"][\"media\"] . \"jquery/ui/css/smoothness/jquery-ui-1.8.7.custom.css\";\n $view->bootstrapCSS = $this->config[\"url\"][\"media\"] . \"bootstrap/css/bootstrap.min.css\";\n $view->bootstrapJS = $this->config[\"url\"][\"media\"] . \"bootstrap/js/bootstrap.min.js\";\n $view->Css = $this->config[\"url\"][\"resource\"] . \"plugins/lw_intranetuser/assets/css/lwIntranetuserBackend.css\";\n \n $view->de = $this->response->getOutputByKey(\"i18n_de\"); \n $view->en = $this->response->getOutputByKey(\"i18n_en\"); \n \n return $view->render();\n }", "title": "" }, { "docid": "6b227bc25873376907d884f45ae69810", "score": "0.67462915", "text": "function display() {\n //\n //Selecet all system tables of the current database (ignorig views)\n $sql = \"select\"\n . \" table_name\"\n . \" from information_schema.tables\"\n . \" where table_schema='\" . $this->dbname . \"' and table_type='base table'\";\n //\n //Now use the sql to query the database (connection). Abort the process in case \n //of error -- echoing the error message. We assume that teh sql was set by the \n //caller\n if (!$result = $this->conn->query($sql)) {\n die($sql . \"<br/>\" . $this->conn->error);\n }\n //\n //Define a table\n echo \"<table>\";\n echo \"<tr><th>Database Tables</th></tr>\";\n //\n //Visit all the listed records and create a table for each record\n while ($resulttype = $result->fetch_assoc()) {\n //Retrieve the table name\n $tname = $resulttype['table_name'];\n //\n echo \"<tr tname='$tname' onclick='new Row(this).select();'>\";\n echo \"<td>$tname</td>\";\n echo \"</tr>\";\n }\n echo \"</table>\";\n }", "title": "" }, { "docid": "a29889cdb6c530bb91bd81f5017e9f0c", "score": "0.6696952", "text": "public function display()\n\t{\n\t\t$this->driver->display();\n\t}", "title": "" }, { "docid": "00e8cb09cf6cadf14521783efd29c252", "score": "0.6671837", "text": "protected abstract function _show();", "title": "" }, { "docid": "f5f1fa09099b1f1d83e4b98eda388c21", "score": "0.6671716", "text": "public function display()\n {\n }", "title": "" }, { "docid": "8188dbc53bb469c5729a49cf0bc0eaa5", "score": "0.6650101", "text": "public function display()\n\t{\n\t\t$document = JFactory::getDocument();\n\t\t$id = JRequest::getInt('visualizationid');\n\t\t$viz = FabTable::getInstance('Visualization', 'FabrikTable');\n\t\t$viz->load($id);\n\t\t$modelpaths = JModel::addIncludePath(JPATH_SITE.DS.'plugins'.DS.'fabrik_visualization'.DS.$viz->plugin.DS.'models');\n\t\t$model = $this->getModel($viz->plugin);\n\t\t$model->setId($id);\n\t\t$pluginTask = JRequest::getVar('plugintask', '', 'request');\n\t\tif ($pluginTask !== '') {\n\t\t\techo $model->$pluginTask();\n\t\t}\n\t}", "title": "" }, { "docid": "dffabbd39fa01d27e5385af66489771e", "score": "0.6646574", "text": "public function show()\n\t{\n\n\n\n\t}", "title": "" }, { "docid": "f5e425e909baa048ea067f0e7e242e33", "score": "0.6613363", "text": "function display(){\n\t\t//nothing\n\t}", "title": "" }, { "docid": "33254a9ec6a04176cdc7a1b2de94ea00", "score": "0.6601155", "text": "function display()\r\n {\r\n parent::display();\r\n }", "title": "" }, { "docid": "9d9c8c0ed858b2891e2847c9e2b5c548", "score": "0.65902627", "text": "function display ()\n\t{\n\t\t$this->template->printToScreen();\n\t}", "title": "" }, { "docid": "4886c43bc3b28b56469cc3767e51591a", "score": "0.65901613", "text": "function display()\n {\n \t$viewName = JRequest::getVar('view', 'bbql');\n \t\n \t$view = &$this->getView($viewName, 'html');\n \t\n \t//if loading the statistics view...\n \tswitch ($viewName) {\n \t\tcase 'leagueLeaders':\n\t\t \t//grab the team model for use\n\t\t \t$model = &$this->getModel( 'league' );\n\t\t\t\t$view->setModel($model);\n\t\t\t\tbreak;\t\n \t\tcase 'statistics':\n\t\t \t//grab the team model for use\n\t\t \t$teamModel = &$this->getModel( 'team' );\n\t\t\t\t$view->setModel($teamModel);\n\t\t\t\tbreak;\t\n\t\t\tcase 'team':\n\t\t\t\t$model = &$this->getModel('bbql');\n\t\t\t\t$view->setModel($model);\n\t\t\t\tbreak;\n\t\t\tcase 'postMatch':\n\t\t\t\t$leagueModel = &$this->getModel('league');\n\t\t\t\t$view->setModel($leagueModel);\n\t\t\t\tbreak;\n\t\t\tcase 'player':\n\t\t\t\t$teamModel = &$this->getModel( 'team' );\n\t\t\t\t$view->setModel($teamModel);\n\t\t\t\tbreak;\n \t}\n \t\n parent::display();\n\t}", "title": "" }, { "docid": "7bed6ca735d75fda7897e61947cd08bb", "score": "0.65866834", "text": "function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "8e89887a9b51e361d7bd2d970b2fc9ea", "score": "0.65805084", "text": "abstract public function display_view();", "title": "" }, { "docid": "6bd053b923b63a1f9a1cfc5ee94f9a92", "score": "0.65738285", "text": "public static function display () {\n\t\t$r = self::get();\n\t\techo $r;\n\t}", "title": "" }, { "docid": "1831c5d8d1e1a7ff0795e0763cb973bb", "score": "0.6572401", "text": "public function display()\r\n\t{\r\n return;\r\n }", "title": "" }, { "docid": "a647d3316afdfe10781f6c73973c00c3", "score": "0.6560403", "text": "public function display(): void;", "title": "" }, { "docid": "a647d3316afdfe10781f6c73973c00c3", "score": "0.6560403", "text": "public function display(): void;", "title": "" }, { "docid": "cb82c31ce682e0634b1f8b096bb88bff", "score": "0.6550245", "text": "public function display()\r\n {\r\n echo $this->toHtml();\r\n }", "title": "" }, { "docid": "b7db07962e655d5cf29babde19e32a5a", "score": "0.6547345", "text": "public function display() {\n\t\techo 'Form will go here.';\n\t}", "title": "" }, { "docid": "a1f67579b3b20f5bd633f62ed2f4029e", "score": "0.6532589", "text": "public function get_display() {\n // return $this->config_backend->view->display_handler;\n return $this->config_backend->get_display();\n }", "title": "" }, { "docid": "bae1313dade170d2c4e2a7ee0c480072", "score": "0.6493808", "text": "function display()\n\t{\n\t\techo $this->build();\n\t}", "title": "" }, { "docid": "8c6f3b6e61dfd5f42524d00a06453632", "score": "0.6482251", "text": "function display() {\n\t?>\n\n\t<div id=\"rootPath\">\n\t\t<table class=\"widefat\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class=\"table-path\"></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody class=\"tableBody\">\n\t\t\t\t<tr class=\"loading-circle\"></tr>\n\t\t\t</tbody>\n\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class=\"table-path\"></th>\n\t\t\t\t</tr>\n\t\t\t</tfoot>\n\t\t</table>\n\t</div>\n\n\t<?php\n\t\\Sgdd\\Admin\\Options\\Options::$root_path->display();\n}", "title": "" }, { "docid": "1ed7113c3b1b6bce5bcab9a5e71d263a", "score": "0.6477832", "text": "public function display_page() {\n\t\t$this->prepare_items();\n\n\t\techo '<div class=\"wrap\">';\n\t\t$this->display_header();\n\t\t$this->display_admin_notices();\n\t\t$this->display_filter_by_status();\n\t\t$this->display_table();\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "478ee9b5773329f45fd5a1df30216513", "score": "0.6466418", "text": "function index(){\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "d538a344d0f1f47b2ed87ce2a8a47489", "score": "0.64571774", "text": "public function displaysExposed();", "title": "" }, { "docid": "76c7b4154b459610c366e1e30ee4efa8", "score": "0.64509016", "text": "function display()\r {\r parent::display();\r }", "title": "" }, { "docid": "ab6e21b9ccb423da575d02af9cc8a970", "score": "0.64483255", "text": "public function showPage() {\n $VHome= USingleton::getInstance('VHome');\n $VHome->visualize();\n \n }", "title": "" }, { "docid": "8fe5e98dac74b5fd205a0d3b9f3d7fb3", "score": "0.64409465", "text": "public function index(){\n \n $this->display();\n }", "title": "" }, { "docid": "0ac4e2c7936cc49882bc6c8042211e4b", "score": "0.64286214", "text": "public function newDisplay();", "title": "" }, { "docid": "3bee26c9df7e3095406b53ec7f577f5d", "score": "0.6427836", "text": "public function show()\n {\n ob_start();\n require A_PREFIX . 'public/theme/' . APP_TPL . '.php';\n ob_end_flush();\n exit(0);\n }", "title": "" }, { "docid": "0c9ce6854c989613805c96bc2f0165e5", "score": "0.64249444", "text": "public function display()\r\n\t{\r\n\t\t// If full callback is available, we need to call it\r\n\t\t$callback = $this->getEnvelopCallback( O_Dao_Renderer::KEY_LOOP,\r\n\t\t\t\tO_Dao_Renderer::CALLBACK_SHOW, parent::SUFF_CALLBACK );\r\n\t\tif ($callback) {\r\n\t\t\t$env_params = new O_Dao_Renderer_Show_Params( null, $this->class,\r\n\t\t\t\t\t$callback[ \"params\" ] );\r\n\t\t\t$env_params->setValue( $this->query );\r\n\t\t\tif ($this->layout)\r\n\t\t\t\t$env_params->setLayout( $this->layout );\r\n\t\t\tcall_user_func( $callback[ \"callback\" ], $env_params );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// If envelop callback is available, we need to do output bufferization\r\n\t\t$envelopCallback = $this->getEnvelopCallback( O_Dao_Renderer::KEY_LOOP,\r\n\t\t\t\tO_Dao_Renderer::CALLBACK_SHOW, parent::SUFF_ENVELOP );\r\n\t\tif ($envelopCallback) {\r\n\t\t\tob_start();\r\n\t\t}\r\n\r\n\t\tforeach ($this->query as $obj)\r\n\t\t\tO_Dao_Renderer::show( $obj, $this->layout, $this->type );\r\n\r\n\t\t// Calling envelop callback\r\n\t\tif (is_array( $envelopCallback )) {\r\n\t\t\t$env_params = new O_Dao_Renderer_Show_Params( null, $this->class,\r\n\t\t\t\t\t$envelopCallback[ \"params\" ] );\r\n\t\t\t$env_params->setValue( ob_get_clean() );\r\n\t\t\tif ($this->layout)\r\n\t\t\t\t$env_params->setLayout( $this->layout );\r\n\t\t\tcall_user_func( $envelopCallback[ \"callback\" ], $env_params );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ba9c5586ddbb257182347b6a86eb0209", "score": "0.63879925", "text": "public function display()\n\t{\n\t\t$model = new \\Models\\Category();\n\t\t$categories = $model -> getAllCategory();\n\t\t$model1 = new \\Models\\Product();\n\t\t$products = $model1 -> getAllProducts();\n $template = 'views/back-end/gestionProduct.phtml';\n include 'views/layout.phtml';\n\t}", "title": "" }, { "docid": "73ea9a512b4bdf3ee4af187a55c69286", "score": "0.637973", "text": "public function main()\n\t{\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "656fe493779bf91e119cf4af807d6ffc", "score": "0.63787925", "text": "public function show( )\n {\n //\n }", "title": "" }, { "docid": "8ec713eb218bca28751c49d0ccf46719", "score": "0.63558394", "text": "abstract public function displayContents();", "title": "" }, { "docid": "9da5e021d181a4c040f522a071a83bbc", "score": "0.6353217", "text": "public function display()\n {\n echo $this->returnForm();\n }", "title": "" }, { "docid": "e8c003d2f44655d9c9fa0ea319880952", "score": "0.63524216", "text": "function display()\n\t{\n\t$view = JRequest::getCmd('view');\n\tif(empty($view)) {\n\t\tJRequest::setVar('view', 'apolls');\n\t};\t\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "a0bc85eba3bf9a7248de034fbbb25784", "score": "0.63440406", "text": "public function display()\n {\n echo $this->getResponse();\n }", "title": "" }, { "docid": "3cde3748cb4331c569324f41b9bd3eb9", "score": "0.63394934", "text": "public function display()\n {\n $xml = new XML_Serializer();\n $xml->serialize($this->module->getData());\n\n header(\"Content-Type: text/xml\");\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.\"\\n\";\n echo $xml->getSerializedData()\n }", "title": "" }, { "docid": "bccefecde357912854c88f50e2c8d910", "score": "0.6331997", "text": "public function loadBackendWidgetAction()\n {\n $data = Shopware()->Models()->getRepository(RateLog::class)->getWidgetData();\n\n $this->View()->assign(array(\n 'success' => true,\n 'data' => $data\n ));\n }", "title": "" }, { "docid": "e2178d2eb344771c1dcba8a505d0cb1f", "score": "0.6317433", "text": "public function backend()\n {\n }", "title": "" }, { "docid": "2cde6e5234c48b6dbcddd25b38532492", "score": "0.6313182", "text": "public function backend($data)\r\n {\r\n $this->load->view('backend', $data);\r\n }", "title": "" }, { "docid": "8a45e6bb74a663a968fa11ace5387513", "score": "0.6298186", "text": "abstract public function display(OutputDevice $od);", "title": "" }, { "docid": "41e5ee3783ca0e67337c6b41b7d0ca62", "score": "0.62886536", "text": "public function display()\n {\n echo $this->fetch();\n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.62844914", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "57cf0ff07faea759ee79635f765678ad", "score": "0.62844914", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "4917dc667351bc9d785233c8a2be8750", "score": "0.62843287", "text": "public function show()\n {\n return view('backend::show');\n }", "title": "" }, { "docid": "b009d59975c60efc3f8569637aae6657", "score": "0.62689674", "text": "public function view() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('content', 'view')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\t// Load view.\n\t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/view.tpl');\n\t\t}", "title": "" }, { "docid": "f5bd80030133ecb48fd544cba1f674b6", "score": "0.6263127", "text": "function display() {\n\t\t$this->_summary();\n\t\tif ($this->nd > 0) $this->_toggleDebug();\n\t\tif ($this->hasErrors()) $this->_toggleError();\n\t\t$this->_pageEnd();\n\t}", "title": "" }, { "docid": "1addf18b617007e4a0b974db8b01fa76", "score": "0.62596136", "text": "function show() {\n require_once($this->getCurrentTemplatePath() . 'index.php');\n }", "title": "" }, { "docid": "37b286116f8e87fc1dd144d68a901cd1", "score": "0.6257363", "text": "function display_active() {\n $this->_activeform->display();\n }", "title": "" }, { "docid": "fe559bd815cfe1bb1dce1f0d470aa255", "score": "0.62538624", "text": "public function show() {\n \n }", "title": "" }, { "docid": "cca1cb9557211f2f0914018eb77ebecf", "score": "0.62492365", "text": "public function show() {\n\t\techo $this->_parseTemplate();\n\t}", "title": "" }, { "docid": "70aa9bc46f07e7c2bb6237a1a809da50", "score": "0.6244742", "text": "public function display(): void{\n\t\tif($this->checkPermissions())\n\t\t\t$this->render();\n\t}", "title": "" }, { "docid": "d99f987e67a0b77911e67874a37e2575", "score": "0.6231028", "text": "public function show() : void\n { \n $this->render('index.php');\n }", "title": "" }, { "docid": "4db67af42129a39021bb7cdcd91ee5cf", "score": "0.6229932", "text": "public function display() {\n extract($this->vars);\n require $this->tpl;\n return \"asfasd\";\n \n }", "title": "" }, { "docid": "530e69469d43036e7cb6b641c53985bc", "score": "0.62290066", "text": "public function display()\n {\n \\OWeb\\manage\\Events::getInstance()->sendEvent('DisplayContent_Start@OWeb\\manage\\Template');\n echo $this->content;\n \\OWeb\\manage\\Events::getInstance()->sendEvent('DisplayContent_End@OWeb\\manage\\Template');\n }", "title": "" }, { "docid": "d801e3851c621506ee7550e0f5362652", "score": "0.6225083", "text": "public function index()\n\t{\n\t\tView::template('backend/default');\n\t}", "title": "" }, { "docid": "72f9106806c48e05839b49b5a8bb324c", "score": "0.6221984", "text": "public function display()\n {\n echo $this->string();\n }", "title": "" }, { "docid": "9f391347e20e05cd99d4906740c5ad7a", "score": "0.6219938", "text": "public function show() {\n\t\tinclude_once HAM_ADMIN_PAGES_DIR . 'imex.php';\n\t}", "title": "" }, { "docid": "4cb0a759c6bdc8fe1475992a6896b101", "score": "0.62180364", "text": "public function display_admin_page() {\n\t\tinclude_once 'partials/ed-solr-admin-display.php';\n\t}", "title": "" }, { "docid": "a755018b7d7a4d9079abf8798d658dfc", "score": "0.6215972", "text": "public static function SetBackendOutput($sTemplate){ \n Output::SetNamespace(\"backend\");\n Output::SetTemplate(Storage::Join(\"dir.shell.backend.tpl\", $sTemplate), Storage::Join(\"dir.shell.backend.tpl\", \"masterpage.tpl\"));\n \n //CSS\n Output::AppendCSS(Storage::Join(\"dir.shell.backend.css\", \"font-awesome.css\"));\n Output::AppendCSS(Storage::Join(\"dir.shell.backend.css\", \"jquery.switchButton.css\"));\n Output::AppendCSS(Storage::Join(\"dir.shell.backend.css\", \"dataTables.bootstrap.css\"));\n Output::AppendCSS(Storage::Join(\"dir.shell.backend.css\", \"masterpage.css\"));\n \n //Javascript\n Output::AppendJS(Storage::Join(\"dir.shell.backend.js\", \"jquery.editinplace.js\"));\n Output::AppendJS(Storage::Join(\"dir.shell.nsave.adm.js\", \"jquery.switchButton.js\"));\n Output::AppendJS(Storage::Join(\"dir.shell.nsave.adm.js\", \"jquery.dataTables.js\"));\n Output::AppendJS(Storage::Join(\"dir.shell.nsave.adm.js\", \"jquery.mask.min.js\"));\n Output::AppendJS(Storage::Join(\"dir.shell.nsave.adm.js\", \"jquery.confirm.js\"));\n Output::AppendJS(Storage::Join(\"dir.shell.nsave.adm.js\", \"dataTables.bootstrap.js\"));\n Output::AppendJS(Storage::Join(\"dir.shell.backend.js\", \"masterpage.js\"));\n }", "title": "" }, { "docid": "e4d1e7ea646c41a68199376039f79a3b", "score": "0.6199457", "text": "function display()\n {\n }", "title": "" }, { "docid": "e4d1e7ea646c41a68199376039f79a3b", "score": "0.6199457", "text": "function display()\n {\n }", "title": "" }, { "docid": "e4d1e7ea646c41a68199376039f79a3b", "score": "0.6199457", "text": "function display()\n {\n }", "title": "" }, { "docid": "21cfc79a63172aa4ef111c19e98f54a8", "score": "0.6195328", "text": "public static function show()\n {\n self::$tpl->show();\n }", "title": "" }, { "docid": "0f1bfe71e22455b0d4cdfb95355bc7d7", "score": "0.61937207", "text": "public function display()\r\n {\r\n echo $this->twig->render($this->templateParams['templateName'], $this->templateParams['vars']);\r\n }", "title": "" }, { "docid": "97eab9d51e99c2a53b12711e284a2665", "score": "0.61929196", "text": "function display() {\n\t\t$this->getDefaultView()->setListingId(KRequest::getInt('listing_id'))->display();\n\t}", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.61918503", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.61918503", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "97c52673d8d6674587cc47b863f0a908", "score": "0.61918503", "text": "public function show()\n {\n \n }", "title": "" }, { "docid": "a657fa30a02f66986ce873e1f5ab445e", "score": "0.61916846", "text": "function display()\n\t{\n\t\t// By default, display the user profile page\n\t\t$this->profile();\n\t}", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.61911887", "text": "public function show()\n {\n }", "title": "" }, { "docid": "6820ec80865170aa2f1d6c3d9362bcac", "score": "0.61911887", "text": "public function show()\n {\n }", "title": "" }, { "docid": "0e97e1f42b63e1ac4dc67be7ec0147db", "score": "0.6188347", "text": "function backend_view() {\n $CI = & get_instance();\n //return the full file\n return $CI->config->item('backend_path');\n }", "title": "" }, { "docid": "8c6c92dca7be1af09c99f8f3d0192fb4", "score": "0.6186598", "text": "function display() {\n echo $this->get();\n }", "title": "" }, { "docid": "2bf28147cc214200a9ed7d2b83f0fa38", "score": "0.6182302", "text": "function display()\n {\n// \tJRequest::setVar('view','course');\n// parent::display();\n\t\t$view =& $this->getView('course','html');\n\t\t$view->setModel($this->getModel('course','SPHCourseDBModel'),true);\n\t\t$view->setLayout('default');\n\t\t$view->display();\n \t\n }", "title": "" }, { "docid": "d9cf0543665ca1bc36ad664b3c008c68", "score": "0.61811376", "text": "public function renderOverview();", "title": "" }, { "docid": "935e7813b3bca492f86754e38513cc46", "score": "0.6176368", "text": "abstract public function display($tpl_name);", "title": "" }, { "docid": "17ba01dc83ac8a6c56a5d3f10af68821", "score": "0.61692053", "text": "function _show() {\n\t}", "title": "" }, { "docid": "17ba01dc83ac8a6c56a5d3f10af68821", "score": "0.61692053", "text": "function _show() {\n\t}", "title": "" } ]
8b6aec6529b72082a90fbba56e42309d
Gets query for [[MAccessgroups]].
[ { "docid": "5f4f08b1e2d4c67f96f59c754f932545", "score": "0.70908487", "text": "public function getMAccessgroups()\n {\n return $this->hasMany(Accessgroup::className(), ['IdDoc' => 'IdDoc']);\n }", "title": "" } ]
[ { "docid": "8c1983096b26887ec828fa18a143c4a7", "score": "0.62988263", "text": "public function list_groups(){\r\n\t\t\t return $this->module_list_groups();\r\n\t\t }", "title": "" }, { "docid": "074e98b3940cb77dd5a2f5a99b58f5b8", "score": "0.6243414", "text": "public function getGroupList () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'getgrouplist'));\r\n\t}", "title": "" }, { "docid": "8ca48c995e4db4702b32003e2c201b47", "score": "0.624012", "text": "function get_group_by_id()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group \n\t\t\tWHERE grp_id=?\n\t\t\t\";\n $query = $this->db->query($sql, array($this->grp_id));\n return $query;\n }", "title": "" }, { "docid": "207fa39c3e79186f1730f03378f0276f", "score": "0.6220025", "text": "function get_assessor_by_group()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group_assessor \n WHERE gro_grp_id =? \n\t\t\t\";\n $query = $this->db->query($sql, array($this->gro_grp_id));\n return $query;\n }", "title": "" }, { "docid": "d0439139b164c3fff8d017952cc49313", "score": "0.6144369", "text": "public function getAllGroups()\n\t{\n\t\t$query = \"SELECT * FROM \".$this->_name;\n\t\tif(($result = $this->getQuery($query,false)) != NULL)\n {\n return $result;\n\t\t\t//print_r($result);\n }\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "981a9999bee1c1872154b00f3ec2d83a", "score": "0.6117847", "text": "function ad_groups_list() {\n return $this->hook(\"/ad_groups.xml\", \"ad_group\", null, \"GET\");\n }", "title": "" }, { "docid": "2b22ef894f2740cc1e588703a1acaa96", "score": "0.60133", "text": "public function get_info_groups($db){\n $query=\"SELECT * FROM groups\";\n $result=$db->select($query);\n return $result;\n }", "title": "" }, { "docid": "155ac14b316cc4d2a7a8fedefb815aeb", "score": "0.5982507", "text": "public function read_groups(){\n\t\t$results = $this->wp_db->get_results( 'SELECT id,name,description FROM '.$this->table_groups, OBJECT );\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "77febf33f1d1e45b02aebf220c553559", "score": "0.5969064", "text": "private function getGroups()\n\t{\n\t\t$group = new group();\n\t\treturn ($group-> getAllGroups($_SESSION['userid']));\n\t}", "title": "" }, { "docid": "0982a366ee5a947c3d9a22243ceed646", "score": "0.59658736", "text": "public function getGroupList()\n {\n $whereArray = [];\n\n $groupName = $this->request->input(\"group_name\");\n if ($groupName) {\n $whereArray[] = [\"group_name\", \"=\", $groupName];\n }\n\n $groupIdNotEqual = $this->request->input(\"group_id_not_equal\");\n if ($groupIdNotEqual) {\n $whereArray[] = [\"group_id\", \"!=\", $groupIdNotEqual];\n }\n\n if (count($whereArray) > 0) {\n $this->groupModel->setWhere($whereArray);\n }\n\n\n $groups = $this->groupModel->getGroupList();\n return $groups;\n }", "title": "" }, { "docid": "2e6672676be3ccdd3338af925681a9ae", "score": "0.596156", "text": "function readGroups()\n {\n $query = '\n SELECT\n GU.group_id\n FROM\n '.$this->prefix.'groupusers GU\n INNER JOIN\n '.$this->prefix.'groups G\n ON\n GU.group_id=G.group_id\n WHERE\n G.is_active=\\'Y\\'\n AND\n perm_user_id='.$this->permUserId;\n\n $result = $this->dbc->getCol($query);\n\n if (!DB::isError($result)) {\n $this->groupIds = $result;\n } else {\n $this->groupIds = array();\n }\n }", "title": "" }, { "docid": "934482248da51145ad287b8cc2b01a95", "score": "0.59388256", "text": "function getAllGroup(){\n\t\ttry{\n\t\t\t$groups\t= $this->db\n\t\t\t\t\t\t->select('g.*,gp.permission')\n\t\t\t\t\t\t->join('qw.qw_user_group_permission as gp','gp.group_id=g.group_id','left')\n\t\t\t\t\t\t->get('qw.qw_user_group as g')->result();\n\t\t\tif(!empty($groups)){\n\t\t\t\treturn $groups;\n\t\t\t}return false;\n\t\t}catch(Exception\t$ex){\n\t\t\tlog_message('error','Unable to get groups '.$ex->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "1cb7aafe9e598d0e1f51146e99bd5bbc", "score": "0.5924131", "text": "public function getAccessibleGroupForModule()\n\t{\n\t\t$curentUserPrivileges = \\Users_Privileges_Model::getCurrentUserPrivilegesModel();\n\t\tif ($this->currentUser->isAdmin() || $curentUserPrivileges->hasGlobalWritePermission()) {\n\t\t\t$groups = $this->getAccessibleGroups('');\n\t\t} else {\n\t\t\t$sharingAccessModel = $this->moduleName ? \\Settings_SharingAccess_Module_Model::getInstance($this->moduleName) : false;\n\t\t\tif ($sharingAccessModel && $sharingAccessModel->isPrivate()) {\n\t\t\t\t$groups = $this->getAccessibleGroups('private');\n\t\t\t} else {\n\t\t\t\t$groups = $this->getAccessibleGroups('');\n\t\t\t}\n\t\t}\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "dbf88373b2d97773cba3bc12ce41d15e", "score": "0.58997583", "text": "public function getIdGroups()\n {\n return $this->hasMany(Group::className(), ['IdGroup' => 'IdGroup'])->viaTable('m_accessgroup', ['IdDoc' => 'IdDoc']);\n }", "title": "" }, { "docid": "d9ca211db832165dad84663480b57a2c", "score": "0.5892122", "text": "public function get_groups() \n\t{\n\t\treturn $this->db->get('navigation_groups')->result();\n\t}", "title": "" }, { "docid": "73cd8e867e1b50849bff608ed235fa63", "score": "0.588166", "text": "function getAllGroups()\n {\n $query = $this->db->get('sys_groups');\n return $query->result();\n }", "title": "" }, { "docid": "c06af4e4291f3f14f74cd8a028d3859a", "score": "0.5860136", "text": "function get_group()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group AS grp INNER JOIN pefs_database.pef_section AS sec\n ON grp.grp_position_group=sec.sec_id\n\t\t\tWHERE CURDATE() <= grp.grp_date \n\t\t\t\";\n $query = $this->db->query($sql);\n return $query;\n }", "title": "" }, { "docid": "8c07120577062385843e06844bab676a", "score": "0.5858855", "text": "public function get_all_groups() {\n\t\t$result = CMS::Instance()->pdo->query(\"select * from groups\")->fetchAll();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4848e9328514a9169a686b6ae02e3df1", "score": "0.58512104", "text": "public function getAllGroup(){\n $query=$this->db->query('SELECT *FROM ms_group');\n return $query->result();\n }", "title": "" }, { "docid": "45e16b762406dce35462911c9fc7c89f", "score": "0.5843736", "text": "public function getAdminAccessModulesList()\n {\n $ADMIN_GROUP_NAME = $this->config->item('ADMIN_GROUP_NAME');\n $group_code = $this->session->userdata('vGroupCode');\n $group_id = $this->session->userdata('iGroupId');\n $group_menu_ids = array();\n $is_admin_group = FALSE;\n $db_group_assoc_rights = array();\n if ($group_code == $ADMIN_GROUP_NAME) {\n $is_admin_group = TRUE;\n } else {\n $extra_cond = $this->db->protect(\"mgr.iGroupId\") . \" = \" . $this->db->escape($group_id) . \" AND (IF(mam.eMenuType = 'Module', mgr.eList = 'Yes', 1))\";\n $db_group_assoc_rights = $this->getAdminGroupAccessRights($extra_cond, \"\", \"\", \"\", \"\", \"iAdminMenuId\");\n $group_menu_ids = (is_array($db_group_assoc_rights)) ? array_keys($db_group_assoc_rights) : array();\n }\n\n return array(\n 'is_admin' => $is_admin_group,\n 'menu_ids' => $group_menu_ids\n );\n }", "title": "" }, { "docid": "a3da06122637e04124f1ac4b4560f0cf", "score": "0.58358335", "text": "function getGroups() {\n\t\tglobal $fmdb;\n\t\t\n\t\t$group_list[0][] = null;\n\t\t$group_list[0][] = 0;\n\t\t\n\t\tbasicGetList('fm_groups', 'group_name', 'group_');\n\t\t\n\t\tfor ($i=0; $i<$fmdb->num_rows; $i++) {\n\t\t\t$group_list[$i+1][] = $fmdb->last_result[$i]->group_name;\n\t\t\t$group_list[$i+1][] = $fmdb->last_result[$i]->group_id;\n\t\t}\n\t\t\n\t\treturn (array) $group_list;\n\t}", "title": "" }, { "docid": "cf98dca197eb71f32021fb2a2a701763", "score": "0.58106786", "text": "public function listAttributeGroups() {\n\t\t\t$url = $this->f1CoreObj->baseUrl . $this->paths['listAttributeGroups'] . \".json\";\n\t\t\treturn $this->f1CoreObj->fetchGetJson($url);\t\t\t\n\t\t}", "title": "" }, { "docid": "f0ce2cf03c2670ef13ab296033630a82", "score": "0.5806817", "text": "public function showGroup() {\r\n $query = 'select * from tbl_group order by groupname ASC';\r\n $stmt = $this->dbObj->select($query);\r\n return $stmt;\r\n }", "title": "" }, { "docid": "da555b1af88e45075bcce7c38a47fab3", "score": "0.5784219", "text": "public function qry_all_group($use_cache=FALSE)\n {\n $stmt = 'Select Distinct\n G.C_CODE\n ,G.C_NAME\n From t_cores_group G';\n //Order by G.C_NAME';\n return ($use_cache) ? $this->db->cacheGetAssoc($stmt) : $this->db->getAssoc($stmt);\n }", "title": "" }, { "docid": "c676553e8d0dad6de9ac898efa72c304", "score": "0.5761601", "text": "public function group_list()\n\t{\n\t\treturn Model_User_Group::find('all');\n\t}", "title": "" }, { "docid": "dbe9e62bf667274d4f1fc08b59f36000", "score": "0.57583195", "text": "function groups()\n\t{\t\n\t\n\t\t$qry = $this->db->get('groups');\n\t\t\n\t\tif($qry->num_rows()>0)\n\t\t{\n\t\t\t$data['qry_success'] = 1;\n\t\t\t$data['qry_result'] = $qry->result();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['qry_success'] = 0;\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "adb5670deb1043159e63c9d2d4a03ca7", "score": "0.5739119", "text": "function get_nominee_by_group()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group_nominee AS nom INNER JOIN dbmc.employee AS emp \n ON emp.Emp_ID=nom.grn_emp_id\n INNER JOIN dbmc.sectioncode AS sec\n ON emp.Sectioncode_ID=sec.Sectioncode\n INNER JOIN dbmc.position AS pos\n ON pos.Position_ID = nom.grn_promote_to\n WHERE grn_grp_id =? \n\t\t\t\";\n $query = $this->db->query($sql, array($this->grn_grp_id));\n return $query;\n }", "title": "" }, { "docid": "215f6baae3dfd6807908defc9dcb5bf2", "score": "0.5738759", "text": "public function getGroupList()\r\n {\r\n $request = new Zend_Service_RememberTheMilk_Request();\r\n $request->setMethod('rtm.groups.getList');\r\n $request->useTimeline(false);\r\n\r\n $response = $this->_request($request);\r\n return new Zend_Service_RememberTheMilk_GroupList($response);\r\n }", "title": "" }, { "docid": "5e32207f0b96e519716d1eb0e8c266b8", "score": "0.5724476", "text": "public function getAccessGroup()\n\t{\n\t\treturn $this->accessgroup;\n\t}", "title": "" }, { "docid": "e51ee8e986da657f6c45949e0538e48b", "score": "0.5719436", "text": "public function list_groups()\r\n\t{\r\n\t\treturn $this->groups;\r\n\t}", "title": "" }, { "docid": "dd296c1bb22152066305ef652ad1d782", "score": "0.56883997", "text": "public function getAllGroupInfo () {\r\n\t$this->ensureLoggedIn();\r\n\r\n\treturn $this->request(array('req' => 'getallgroupinfo'));\r\n\t}", "title": "" }, { "docid": "4100f941d021771cae5c729f3ca49585", "score": "0.5684926", "text": "public function getGroups() {\n }", "title": "" }, { "docid": "77a2b068b9f3b83a734aea7a6632c46c", "score": "0.56841594", "text": "function oa_core_get_all_groups() {\n $query = db_select('node', 'n');\n $query->fields('n', array('nid', 'title'))\n ->condition('n.type', OA_GROUP_TYPE)\n ->addTag('node_access');\n return $query->execute()->fetchAllAssoc('nid');\n}", "title": "" }, { "docid": "77a2b068b9f3b83a734aea7a6632c46c", "score": "0.56841594", "text": "function oa_core_get_all_groups() {\n $query = db_select('node', 'n');\n $query->fields('n', array('nid', 'title'))\n ->condition('n.type', OA_GROUP_TYPE)\n ->addTag('node_access');\n return $query->execute()->fetchAllAssoc('nid');\n}", "title": "" }, { "docid": "84f97d905e5cdeca4d2f8d74ea28a67e", "score": "0.5640983", "text": "public static function get_group();", "title": "" }, { "docid": "2e5ef26d6048fe8b40401412d7a077fe", "score": "0.56366056", "text": "abstract public function getGroups();", "title": "" }, { "docid": "3b48f421264b29464c5842f07e9ff9e5", "score": "0.5625834", "text": "public function getGroups() {\n $appName = sfContext::getInstance()->getConfiguration()->getApplication();\n return $this->getMdPassport() ? $this->getMdPassport()->getApplicationGroups($appName) : array();\n }", "title": "" }, { "docid": "757ff576b500d2be426334bb4c287028", "score": "0.5624729", "text": "function getAllPermissionedGroupsOfGroup($group_id){\n\t\t$resultSet=getData(\"SELECT `permissioned_group_id` FROM `user_permissions_on_group` WHERE is_active =1 AND `group_id`=\".$group_id);\n\t\t$permissionedGroups=array();\n\t\tfor($i=0;$i<count($resultSet);$i++){\n\t\t\t$permissionedGroups[]=$resultSet[$i]['permissioned_group_id'];\n\t\t}\n\t\treturn $permissionedGroups;\n\t}", "title": "" }, { "docid": "1d15aac0893285e2ea9935dc9b958416", "score": "0.56152934", "text": "public function GetLimitGroups() {\n $value = $this->config->getAppValue($this->appName, $this->_groups, \"\");\n if (empty($value)) {\n return array();\n }\n $groups = json_decode($value, true);\n if (!is_array($groups)) {\n $groups = array();\n }\n return $groups;\n }", "title": "" }, { "docid": "904228247cc77bb77c5cb3feb18d3e99", "score": "0.5602369", "text": "function getAllAccessGroupID()\n {\n /*\n $accessGroup = new RowManager_AccessGroupManager();\n $seriesKey = moduleAccountAdmin::MULTILINGUAL_SERIES_KEY;\n $pageKey = RowManager_AccessGroupManager::XML_NODE_NAME;\n $multiLingualContext = new MultilingualManager( 1, $seriesKey, $pageKey );\n $labelBridge = $accessGroup->getRowLabelBridge( $multiLingualContext );\n\n $labelBridge->constructSearchCondition(\"label_label\", \"=\", RowManager_AccessGroupManager::ALL_ACCESS_LABEL, true);\n $labelBridgeList = $labelBridge->getListIterator();\n//var_export($labelBridgeList);\n $labelBridgeList->setFirst();\n $group = $labelBridgeList->getNext();\n // var_export($group);\n return $group->getID();\n */\n return $this->getAccessGroupID(RowManager_AccessGroupManager::ALL_ACCESS_LABEL);\n }", "title": "" }, { "docid": "e3a2b4d533af4963248e7c5bdac04e61", "score": "0.55981165", "text": "function get_groups()\n\t{\n\t\t$ds = ldap_connect(LDAP_HOST,LDAP_PORT);\n\t\n\t\t//Can't connect to LDAP.\n\t\tif(!$ds)\n\t\t{\n\t\t\t$error = 'Error in contacting the LDAP server.';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Make sure the protocol is set to version 3\n\t\t\tif(!ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3))\n\t\t\t{\n\t\t\t\t$error = 'Failed to set protocol version to 3.';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Connection made -- bind anonymously and get dn for username.\n\t\t\t\t$bind = @ldap_bind($ds);\n\t\t\t\t\n\t\t\t\t//Check to make sure we're bound.\n\t\t\t\tif(!$bind)\n\t\t\t\t{\n\t\t\t\t\t$error = 'Anonymous bind to LDAP failed.';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\n\t\t\t\t\t$search = ldap_search($ds, LDAP_BASEDN, \"(objectClass=apple-group)\");\n\t\t\t\t\t$info = ldap_get_entries($ds, $search);\n\t\n\t\t\t\t\t$groups = array();\n\t\t\t\t\tfor($i=0; $i<$info['count']; $i++)\n\t\t\t\t\t\t$groups[intval($info[$i]['gidnumber'][0])] = $info[$i]['cn'][0];\n\t\n\t\t\t\t\tldap_close($ds);\n\t\t\t\t\tksort($groups);\n\t\t\t\t\treturn $groups;\n\t\t\t\t}\n\t\t\t\tldap_close($ds);\n\t\t\t}\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "411c7148784521d8af162e76500b216b", "score": "0.55890393", "text": "public function list_group_membership() {\n\t\tglobal $group_dir;\n\t\treturn $group_dir->list_group_membership($this);\n\t}", "title": "" }, { "docid": "d2c3aef9dfe62c5d8d728862b07ab725", "score": "0.5577255", "text": "public function getContactGroups() {\n return $this->getParameter('contact_groups');\n }", "title": "" }, { "docid": "91862d925b6ca5c028d826a82d20f8a5", "score": "0.5569548", "text": "public function get_all_group($groupid,$type='id')//通过id获得验证码\n\t{\n //$result = $this->db->query($sql);\n\t\t\t//return $table_admins = $this->db->dbprefix('admins');\n\t\t\t$result = $this->db->where(array($type=>$groupid))->limit(1)->get('manager_group')->row();\n\t\t//\treturn $this->db->last_query();\n\t\t\treturn $result;\n\t\t\t\n\t}", "title": "" }, { "docid": "b84b79460f72091ab10e41d481547a01", "score": "0.5568297", "text": "function get_groups( $a )\n {\n return \"SELECT *, COUNT(\".SQL_PREFIX.\"members.id) as count FROM \".SQL_PREFIX.\"groups\n\t\t LEFT JOIN \".SQL_PREFIX.\"members ON (\".SQL_PREFIX.\"members.mgroup = \".SQL_PREFIX.\"groups.g_id)\n\t\t GROUP BY \".SQL_PREFIX.\"groups.g_id ORDER BY \".SQL_PREFIX.\"groups.g_title\";\n }", "title": "" }, { "docid": "6babb25fd8a5db2a614a95e266ee23e7", "score": "0.55437183", "text": "public function getListByGroup($group_id){\n\t\t\t\t\t$db \t\t= $this->getDbo();\n\t\t\t\t\t$query \t \t= $db->getQuery(true);\n\t\t\t\t\t$query \t\t=\"Select * FROM #__sfs_detail_group_share_room WHERE group_id='\".$group_id.\"'\";\n\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t$result= $db->loadObjectList();\n\t\t\t\t\treturn $result;\n\t\t\t\t}", "title": "" }, { "docid": "f8482be11e4834d73b75a831600a879c", "score": "0.55368865", "text": "public function getUsergroupList()\n\t{\n\t\t$db = Factory::getDatabase($this->getJname());\n\n\t\t$query = $db->getQuery(true)\n\t\t\t->select('id, title as name')\n\t\t\t->from('#__usergroups');\n\n\t\t$db->setQuery($query);\n\t\t//getting the results\n\t\treturn $db->loadObjectList();\n\t}", "title": "" }, { "docid": "29670ed49a97aed4feb90b4f774a2996", "score": "0.55337507", "text": "function get_course_groups()\r\n {\r\n $wdm = WeblcmsDataManager :: get_instance();\r\n $course_groups = $wdm->retrieve_course_groups_from_user($this->get_user(), $this->get_course())->as_array();\r\n return $course_groups;\r\n }", "title": "" }, { "docid": "a1815ca050b512f76e267c5c5cffe7f2", "score": "0.55055183", "text": "function pmp_groups_page() {\n\tif (!current_user_can('manage_options'))\n\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\n\t$sdk = new SDKWrapper();\n\t$result = $sdk->queryDocs(array(\n\t\t'profile' => 'group',\n\t\t'writeable' => true,\n\t\t'limit' => 20\n\t));\n\n\t$context = array(\n\t\t'groups' => $result->items(),\n\t\t'creators' => pmp_get_creators(),\n\t\t'default_group' => get_option('pmp_default_group', false)\n\t);\n\tpmp_render_template('groups.php', $context);\n}", "title": "" }, { "docid": "16fb83d76a420a8a37403deafecb775c", "score": "0.549631", "text": "public function getGroupsParam()\n {\n $this->mGroups = $this->removeEmpty($this->mGroups);\n return \"groups=\\\"\".implode(\",\", $this->mGroups).\"\\\"\";\n }", "title": "" }, { "docid": "cefc1b47e5da1100f52a5ffec6cc3d45", "score": "0.5492139", "text": "public function get_group_assoc($group_id) {\n \n $query_data = [$group_id, $group_id, $group_id, $group_id];\n // TODO check if result is unique without using DISTINCT\n $query = \"SELECT `r`.`roleid` as `id`, `r`.`name`, 'role' as `type`, `r`.`description`, 0 as `exid`, 'NULL' as `exname` \"\n . \"FROM \".$this->db->protect_identifiers('roles', TRUE).\" r \"\n . \"JOIN \".$this->db->protect_identifiers('access_assigns', TRUE).\" a ON `a`.`childid` = `r`.`roleid` \"\n . \"AND `a`.`childtype` = 'role' \"\n . \"WHERE `a`.`parenttype` = 'group' AND `a`.`parentid` = ? \"\n . \"LIMIT 50 \"\n . \"UNION \"\n . \"SELECT DISTINCT(`p`.`permid`), `p`.`name`, 'perm' as `type`, `p`.`description`, `m`.`moduleid`, `m`.`dispname` \"\n . \"FROM \".$this->db->protect_identifiers('permissions', TRUE).\" p \"\n . \"JOIN \".$this->db->protect_identifiers('modules', TRUE).\" m ON `m`.`moduleid` = `p`.`moduleid` \"\n . \"JOIN \".$this->db->protect_identifiers('access_assigns', TRUE).\" a ON `a`.`childid` = `p`.`permid` \"\n . \"AND `a`.`childtype` = 'perm' \"\n . \"WHERE (`a`.`parenttype` = 'group' AND `a`.`parentid` = ?) OR \"\n . \"(`a`.`parenttype` = 'role' AND `a`.`parentid` IN \"\n . \"(SELECT childid FROM \".$this->db->protect_identifiers('access_assigns', TRUE)\n . \"WHERE parentid = ? AND parenttype = 'group' AND childtype = 'role')) \"\n . \"LIMIT 50 \"\n . \"UNION \"\n . \"SELECT `u`.`userid`, CONCAT(u.lname,' ', u.fname), `u`.`usertype`, 'NULL', 0, 'NULL' \"\n . \"FROM \".$this->db->protect_identifiers('users', TRUE).\" u \"\n . \"JOIN \".$this->db->protect_identifiers('group_users', TRUE).\" g ON `g`.`userid` = `u`.`userid` \"\n . \"WHERE `g`.`groupid` = ? \"\n . \"LIMIT 50\";\n \n return $this->util_model->get_query_data($query, $query_data);\n }", "title": "" }, { "docid": "bb79930b285b09d6e3ff79c3ac6422f0", "score": "0.5491941", "text": "public function index()\n {\n /** @var User $user */\n $user = Auth::user();\n\n if ($user->super_admin) {\n return Group::all();\n }\n\n return $user->manageableGroups();\n }", "title": "" }, { "docid": "8ec1f711212b34e6b667ad7c25fdde2e", "score": "0.54879963", "text": "public static function getgroups()\n {\n self::initialize();\n static $allgroups = array();\n if (empty($allgroups)) {\n $query = \"SELECT r.id AS id, r.name AS name, r.users AS users, rm.parent_id AS parentid \n FROM \" . self::$rolestable . \" r LEFT JOIN \" . self::$rolememberstable . \" rm ON r.id = rm.role_id \n WHERE r.itemtype = ? AND r.state = ? ORDER BY r.name\";\n $bindvars[] = self::ROLES_GROUPTYPE;\n $bindvars[] = self::ROLES_STATE_ACTIVE;\n $dbconn = xarDB::getConn();\n $stmt = $dbconn->prepareStatement($query);\n $result = $stmt->executeQuery($bindvars, ResultSet::FETCHMODE_ASSOC);\n if(!$result) return; \n while($result->next()) $allgroups[] = $result->fields;\n }\n return $allgroups;\n }", "title": "" }, { "docid": "52962b68a0dd1f83d6b2671f8e6d8b97", "score": "0.54825056", "text": "public static function ADMIN_POST_GET_POST_GROUPS(){\n\t $SQL_String = \"SELECT ug_code,ug_name,ug_pri FROM user_group WHERE 1 ORDER BY ug_pri DESC,ug_no ASC;\";\n\t return $SQL_String;\n\t}", "title": "" }, { "docid": "42b2608c843e3662d4a35903178371ef", "score": "0.5474202", "text": "public abstract function get_group();", "title": "" }, { "docid": "88662ce2b955e5d5f8a34db82684c4fa", "score": "0.5470165", "text": "public function group_list()\n {\n if ($this->_check_permission('access_administrators')) {\n $data = $this->usergroups_model->get_all_groups();\n if ($data) {\n echo json_encode($data);\n }\n }\n }", "title": "" }, { "docid": "ab9379d9308287ee528fe4efe4452347", "score": "0.54646546", "text": "function list_groups($search = null, $mode = 0)\n {\n if (melanie2_logs::is(melanie2_logs::TRACE)) melanie2_logs::get_instance()->log(melanie2_logs::TRACE, \"melanie2_addressbook::list_groups($search, $mode)\");\n try {\n // Chargement du groupe depuis le cache\n $cache = \\melanie2::InitM2Cache();\n if (!isset($this->ctag)) {\n if (isset($cache['contacts'])\n && isset($cache['contacts'][$this->addressbook->id])\n && isset($cache['contacts'][$this->addressbook->id]['ctag'])\n && isset($cache['contacts'][$this->addressbook->id]['ctag_time'])\n && time() - $cache['contacts'][$this->addressbook->id]['ctag_time'] < self::CTAG_REFRESH) {\n $this->ctag = $cache['contacts'][$this->addressbook->id]['ctag'];\n } else {\n $this->ctag = $this->addressbook->getCTag();\n if (isset($cache['contacts'][$this->addressbook->id]['ctag_time'])) {\n $cache['contacts'][$this->addressbook->id]['ctag_time'] = time();\n }\n }\n }\n // Chargement des contacts depuis le cache\n if (isset($cache['contacts'])\n && isset($cache['contacts'][$this->addressbook->id])\n && !isset($search)\n && isset($cache['contacts'][$this->addressbook->id]['groups'])) {\n if ($cache['contacts'][$this->addressbook->id]['ctag'] == $this->ctag) {\n $ret = array();\n foreach ($cache['contacts'][$this->addressbook->id]['groups'] as $_g) {\n $_g = unserialize($_g);\n $group = melanie2_contacts_mapping::m2_to_rc_contact(null, $_g);\n $group['user_id'] = $this->user->uid;\n $group['changed'] = $_g->modified;\n $ret[] = $group;\n }\n return $ret;\n } else {\n unset($cache['contacts'][$this->addressbook->id]);\n }\n }\n\n $_group = new Melanie2\\Contact($this->user, $this->addressbook);\n $_group->type = Melanie2\\Contact::TYPE_LIST;\n $operators = array();\n if (!empty($search)) {\n if ($mode == 0) {\n $operators['lastname'] = LibMelanie\\Config\\MappingMelanie::like;\n $_group->lastname = '%'.$search.'%';\n } elseif ($mode == 1) {\n $_group->lastname = $search;\n $operators['lastname'] = LibMelanie\\Config\\MappingMelanie::eq;\n } elseif ($mode == 2) {\n $_group->lastname = $search.'%';\n $operators['lastname'] = LibMelanie\\Config\\MappingMelanie::like;\n }\n } else {\n if (!isset($cache['contacts'])) $cache['contacts'] = array();\n if (!isset($cache['contacts'][$this->addressbook->id])) $cache['contacts'][$this->addressbook->id] = array();\n $cache['contacts'][$this->addressbook->id]['groups'] = array();\n $cache['contacts'][$this->addressbook->id]['ctag'] = $this->ctag;\n $cache['contacts'][$this->addressbook->id]['ctag_time'] = time();\n }\n\n $ret = array();\n foreach ($_group->getList(array(), $filter, $operators, \"lastname\") as $_g) {\n if (!isset($search)) {\n $cache['contacts'][$this->addressbook->id]['groups'][$_g->id] = serialize($_g);\n }\n $group = melanie2_contacts_mapping::m2_to_rc_contact(null, $_g);\n $group['user_id'] = $this->user->uid;\n $group['changed'] = $_g->modified;\n $ret[] = $group;\n }\n // Sauvegarde dans le cache\n \\melanie2::SetM2Cache($cache);\n return $ret;\n }\n catch (LibMelanie\\Exceptions\\Melanie2DatabaseException $ex) {\n melanie2_logs::get_instance()->log(melanie2_logs::ERROR, \"[calendar] melanie2_addressbook::list_groups() Melanie2DatabaseException\");\n return false;\n }\n catch (\\Exception $ex) {\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "485e2359cfa5b5c7b442e18a6cf95b78", "score": "0.5451784", "text": "function getGroupDetails($group_id)\n\t{\n\t\treturn $resultSet = getRow(\"select * from user_groups where is_active =1 AND group_id='\".$group_id.\"'\");\n\t}", "title": "" }, { "docid": "209fe91aa729fb692eb845835da761bf", "score": "0.54492116", "text": "public function getGroups()\r\n {\r\n if (isset($this->a_Groups))\r\n {\r\n return($this->a_Groups);\r\n } /* if */\r\n else\r\n {\r\n return(null);\r\n } /* else */\r\n }", "title": "" }, { "docid": "5647c4f31fe5f592e03fdf3a5daf2af8", "score": "0.5446792", "text": "public static function queryByGroupIds($groupIds)\n {\n return self::where('permissionable_type', self::$availablePermissionables[\"groups\"][1])\n ->whereIn('permissionable_id', $groupIds);\n }", "title": "" }, { "docid": "9ddfc884211e1abd6ab1c92cb2dc3ad7", "score": "0.5440743", "text": "function listAllInfo($groupid = 1, $order = 'username') {\r\n\t\t$strWhere = ($groupid) ? ' AND g.groupid = '.$groupid : '';\r\n\t\t$query = $this->db->query('SELECT u.*, g.* FROM '.$this->prefix.'users u\r\n\t\t\t\t\t\t\t\tLEFT JOIN '.$this->prefix.'usersgroups ON('.$this->prefix.'usersgroups.userid = u.userid)\r\n\t\t\t\t\t\t\t\tLEFT JOIN '.$this->prefix.'groups g ON('.$this->prefix.'usersgroups.groupid = g.groupid)\r\n\t\t\t\t\t\t\t\tWHERE type = 0'.$strWhere);\r\n\t\t\r\n\t\treturn $query;\r\n\t}", "title": "" }, { "docid": "a26061dfeb8f1d7594822d9cbd02f30f", "score": "0.5438658", "text": "public function list_group_modul($group_id=null){\r\n $data[]=array();\r\n $this->db->select('appmodul.id as id,appmodul.name as modul, if(group_auth.readonly=1, \"checked\",\"\" ) as readonly,if(group_auth.group_id is null, \"\", \"checked\") as enable')\r\n ->from('appmodul')\r\n ->join('(select * from `group_auth` WHERE `group_auth`.`group_id` = '.$group_id.') as group_auth', 'appmodul.id = group_auth.modul_id','left'); \r\n return $this->db->get()->result(); \r\n \r\n }", "title": "" }, { "docid": "0e15e2387dea93b8fa4e8736539b7065", "score": "0.543392", "text": "function getAll() {\n $service = new Interface_V5();\n $ws = Configuration::getCleverReachWs();\n $apiKey = $ws['API_KEY'];\n\n try {\n $result = $service->groupGetList($apiKey);\n \n if ($result->status == \"SUCCESS\") { \n \n return array('success' => true, 'groups' => $result->data);\n \n } else { \n LOG::getInstance()->put(Log::$ERROR, __CLASS__, __METHOD__, $result->message);\n return array('success' => false, 'message' => $result->message);\n }\n \n } catch (Exception $e) {\n LOG::getInstance()->put(Log::$ERROR, __CLASS__, __METHOD__, $e->getMessage());\n return array('success' => false, 'message' => $e->getMessage());\n }\n }", "title": "" }, { "docid": "f8bc5cb5bb0eab88a14729a60bb031a3", "score": "0.5433751", "text": "public function searchGroups() {\n $Search = new LDAPGroupSearch($this);\n return $Search;\n }", "title": "" }, { "docid": "44575d20daa32329895cdf1b20d341e5", "score": "0.543232", "text": "function prli_get_all_groups()\n{\n global $prli_group;\n $groups = $prli_group->getAll('',' ORDER BY gr.name', ARRAY_A);\n return $groups;\n}", "title": "" }, { "docid": "bc682d0a4e5e47f8e98313dee41d7622", "score": "0.5429136", "text": "function fetch_group($groupID, $db) {\n \n $group_array = array();\n \n if ($groupID) {\n\n $command = \"SELECT * FROM groups WHERE group_id = '\". $db->real_escape_string($groupID) .\"';\";\n \n $result = $db->query($command);\n \n if ($result->num_rows > 0) {\n $group_array = $result->fetch_assoc();\n }\n }\n return $group_array; \n }", "title": "" }, { "docid": "b13182d4875259e84b44b54a0c730cb4", "score": "0.54242194", "text": "public function get_groups() {\n\t\tif (!$this->logged_in()) return array();\n\t\treturn $this->get_user()->get_groups();\n\t}", "title": "" }, { "docid": "b1dd45bf99b7d07ebadf165dd48507e3", "score": "0.5418579", "text": "function getGroupList($params, $context) {\n\t\tglobal $xmlConfig;\n\t\t// Validate the RPC caller context.\n\t\t$this->validateMethodContext($context, array(\n\t\t\t \"role\" => OMV_ROLE_ADMINISTRATOR\n\t\t ));\n\t\t// Validate the parameters of the RPC service method.\n\t\t$this->validateMethodParams($params, '{\n\t\t\t \"type\":\"object\",\n\t\t\t \"properties\":{\n\t\t\t\t \"start\":{\"type\":\"integer\"},\n\t\t\t\t \"limit\":{'.$GLOBALS['OMV_JSONSCHEMA_COUNTFIELD'].'},\n\t\t\t\t \"sortfield\":{'.$GLOBALS['OMV_JSONSCHEMA_SORTFIELD'].'},\n\t\t\t\t \"sortdir\":{'.$GLOBALS['OMV_JSONSCHEMA_SORTDIR'].'}\n\t\t\t }\n\t\t }');\n \n $xpath = \"//services/ldapserver\";\n\t\t$object = $xmlConfig->get($xpath);\n \n\t\t// Get the list of non-system groups if ldap server is enabled else return an empty array.\n\t\tif($object['enable']){\n $groups = $this->enumerateLdapGroups();\n }else{\n return array();\n }\n\t\tforeach($groups as $groupk => &$groupv) {\n\t\t\t// Get additional information stored in database.\n\t\t\t$xpath = sprintf(\"//system/usermanagement/groups/group[name='%s']\",\n\t\t\t $groupv['name']);\n\t\t\t$object = $xmlConfig->get($xpath);\n\t\t\tif(!is_null($object)) {\n\t\t\t\t$groupv['comment'] = $object['comment'];\n\t\t\t}\n\t\t}\n\t\t// Filter result.\n\t\treturn $this->applyFilter($groups, $params['start'],\n\t\t $params['limit'], $params['sortfield'], $params['sortdir']);\n\t}", "title": "" }, { "docid": "7346a7c02bf92696175798b5ca0065d1", "score": "0.5417985", "text": "function get_all_groups_details()\n\t\t {\n\t\t\t $query=\"SELECT * FROM edu_groups WHERE status='Active'\";\n \t $resultset=$this->db->query($query);\n\t\t $res=$resultset->result();\n\t\t\t return $res;\n\t\t }", "title": "" }, { "docid": "1e8175dc2f341aff16ea24b607e08523", "score": "0.541747", "text": "function get_repo_permission_groups()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->order_by('weight');\n\t\t$output=$this->db->get('repo_perms_groups')->result_array();\n\t\t\n\t\treturn $output;\n\t\n\t}", "title": "" }, { "docid": "56885012a17ee4b299d866bbb0ad0ed9", "score": "0.5413568", "text": "function groupInApByID($apid)\r\n\t{\r\n\t\t$this->db->select('apid');\r\n\t\treturn $this->db->get_where('groups', array('apid' => $apid));\r\n\t}", "title": "" }, { "docid": "a14241306194a00d8f12b7f1d8d2982e", "score": "0.54134196", "text": "function get_record_groups($id)\n {\n if (melanie2_logs::is(melanie2_logs::TRACE)) melanie2_logs::get_instance()->log(melanie2_logs::TRACE, \"melanie2_addressbook::get_record_groups($id)\");\n try {\n // Chargement du groupe depuis le cache\n $cache = \\melanie2::InitM2Cache();\n if (isset($cache['contacts'])\n && isset($cache['contacts'][$this->addressbook->id])\n && isset($cache['contacts'][$this->addressbook->id]['groups'])) {\n foreach($cache['contacts'][$this->addressbook->id]['groups'] as $group) {\n $group = unserialize($group);\n $members = unserialize($group->members);\n if (is_array($members)\n && in_array($id, $members)) $result[$group->id] = $group->lastname;\n }\n } else {\n $result = array();\n $_group = new Melanie2\\Contact($this->user, $this->addressbook);\n $_group->type = Melanie2\\Contact::TYPE_LIST;\n foreach($_group->getList() as $group) {\n $members = unserialize($group->members);\n if (is_array($members)\n && in_array($id, $members)) $result[$group->id] = $group->lastname;\n }\n }\n return $result;\n }\n catch (LibMelanie\\Exceptions\\Melanie2DatabaseException $ex) {\n melanie2_logs::get_instance()->log(melanie2_logs::ERROR, \"[calendar] melanie2_addressbook::get_record_groups() Melanie2DatabaseException\");\n return false;\n }\n catch (\\Exception $ex) {\n return false;\n }\n return false;\n }", "title": "" }, { "docid": "478ca34e7138e7c7d09c4ebc8ae08ac8", "score": "0.54058415", "text": "public function get_all_group()\n\t{\n\t\t$sql = \"SELECT id_user_group, name FROM acm_user_group order_ by name\";\n\t\t$data = $this->db->query($sql);\n\t\t$data = $data->result_array();\n\t\treturn (isset($data)) ? $data : array();\n\t}", "title": "" }, { "docid": "011abe453ae26d1cf6e88b93edc93930", "score": "0.53985864", "text": "function get_pos_nominee_by_group()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group_nominee AS nom INNER JOIN dbmc.employee AS emp \n ON emp.Emp_ID=nom.grn_emp_id\n INNER JOIN dbmc.sectioncode AS sec\n ON emp.Sectioncode_ID=sec.Sectioncode\n INNER JOIN dbmc.position AS pos\n ON pos.Position_ID = emp.Position_ID AND emp.Position_ID=pos.Position_ID\n WHERE grn_grp_id =? \n\t\t\t\";\n $query = $this->db->query($sql, array($this->grn_grp_id));\n return $query;\n }", "title": "" }, { "docid": "a9266c48ed4f38f8bde47873dcbcbf8d", "score": "0.5382013", "text": "public function getGroups()\n {\n try {\n $SQL = \"SELECT DISTINCT `name`, `group_id` FROM `\".CMS_TABLE_PREFIX.\"groups` ORDER BY `name` ASC\";\n $results = $this->app['db']->fetchAll($SQL);\n $groups = array();\n foreach ($results as $result) {\n $groups[] = array(\n 'id' => $result['group_id'],\n 'name' => $this->app['utils']->unsanitizeText($result['name'])\n );\n }\n return !empty($groups) ? $groups : false;\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }", "title": "" }, { "docid": "7439087e62b6ccc6a4437a1d844ad82e", "score": "0.5374201", "text": "public function getGroupsList() {\n $response = array();\n $where = array(\n 'trash' => 0,\n 'active_status' => 1\n );\n\n $sql = $this->db->select('id,group_code,group_name,created_by,created_on,trash,active_status')->from('ga_prod_groups_tbl')->where($where)->order_by('id', 'DESC')->get();\n $count = $sql->num_rows();\n $resposne['code'] = ($count > 0) ? 200 : 204;\n $resposne['message'] = ($count > 0) ? 'Success' : 'Fail';\n $resposne['description'] = ($count > 0) ? \"$count results found\" : 'No results found..!';\n $resposne['groups_list'] = ($count > 0) ? $sql->result() : array();\n return json_encode($resposne);\n }", "title": "" }, { "docid": "1bb3010e457f35e40649aa2bb5b67783", "score": "0.5368663", "text": "public function getGroupById($id){\n $query=$this->db->query('SELECT *FROM ms_group WHERE id='.$id);\n return $query->result();\n }", "title": "" }, { "docid": "817d8d8e5eb1110770f057d25a550603", "score": "0.5364905", "text": "public function getGroups() {\n\t$sql = \"SELECT g.`id` FROM `group_user` as gu, `groups` as g WHERE gu.`user`='\".$this->id.\"' AND gu.`group`=g.`id` ORDER BY g.`name` ASC;\";\n\t\n\t$query = $this->dbQuery($sql);\n\t\n\t$list = array();\n\t\n\tif ($query->rowCount() >= 1) {\n\t $rows = $query->fetchAll();\n\t foreach($rows as $row) {\n\t\t$group = Groups::load($row['id']);\n\t\tif ($group->isLoaded()) {\n\t\t $list[] = $group;\n\t\t}\n\t }\n\t}\n\t\n\treturn $list;\n }", "title": "" }, { "docid": "433be8942b94e7b08100cdf69cd4b261", "score": "0.5358375", "text": "function sap_item_groups_select_all() {\n\t\t$this->db->from('m_item_group');\n\n\t\t$query = $this->db->get();\n\n\t\tif($query->num_rows() > 0) {\n\t\t\treturn $query;\n\t\t}\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "7ccaa8229a22b042c16d56bf245eae9f", "score": "0.5357798", "text": "public function index()\n {\n $this->authorize('index', Group::class);\n\n return GroupResource::collection(\n Auth::user()->accessibleGroups(Auth::user())->paginate(15)\n );\n }", "title": "" }, { "docid": "5580749a4e31116963ce170d678a9479", "score": "0.5357335", "text": "function get_permissions()\n\t{\n\t\t$groups=$GLOBALS['FORUM_DRIVER']->get_usergroup_list(false,true);\n\t\t$output=array();\n\t\tforeach (array_keys($groups) as $group_id)\n\t\t{\n\t\t\t$value=post_param_integer('access_'.$group_id,0);\n\t\t\t$output[$group_id]=$value;\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5d2c08786b7853121fbd8cacad1f7a85", "score": "0.5352864", "text": "public function getGroups()\n\t{\n\t\t$select = $this->select();\n\t\t$select->order(array($this->_nameColumn . ' ASC'));\n\t\treturn $this->fetchAll($select);\n\t}", "title": "" }, { "docid": "9a927b629ce5d8ba1fc451f1dd54cb60", "score": "0.534789", "text": "public function getGroups()\r\n {\r\n $response = $this->rest->get('groups');\r\n return $response;\r\n }", "title": "" }, { "docid": "918b9f81176bbdb1fd1f252a9c8a0427", "score": "0.53475064", "text": "public function getGroup($id){\n return $this->securityDAO->getGroupDAO($id);\n }", "title": "" }, { "docid": "17cad3e76e1410d0c589ac352ca83464", "score": "0.5343433", "text": "protected function getGroups()\n {\n// $allGroups = CustomerGroup::all();\n// $groups = [];\n// foreach ($allGroups as $group) {\n// $groups[encrypt($group->id)] = $group->name;\n// }\n//\n// return $groups;\n\n }", "title": "" }, { "docid": "0ef8c5fd03e23098cc6dc64dffad65f3", "score": "0.5340172", "text": "public function getGroups()\n {\n return isset( $this->groups ) ? $this->groups : NULL;\n }", "title": "" }, { "docid": "37fff914d2e974832309347f3620cf87", "score": "0.5339954", "text": "public function ListGroups($parameters) {\n $groupsinfo = array();\n $groupslist = array();\n $searchQuery = array(\n \"searchQueryA\" => ' ',\n \"searchQueryB\" => ' ',\n \"searchQueryC\" => ' ',\n \"searchQueryD\" => ' ',\n \"searchQueryE\" => ' ',\n \"ListQuery\" => ' '\n );\n $obj = new enquiry();\n $obj->returnSearchQuery($searchQuery, $parameters);\n $query = 'SELECT grp.`id` AS grid,\n\t\t\t\t\tgrp.`name` AS gr_name,\n\t\t\t\t\tgrp.`owner` AS gr_own,\n\t\t\t\t\tgrp.`no_of_members` AS gr_mems,\n\t\t\t\t\tIF((SELECT COUNT(`id`) FROM `group_members` WHERE `group_id` = grp.`id`) = 2,\\'Couple\\',\\'Group\\') AS group_type,\n\t\t\t\t\tgrp.`mode_of_payment_id` AS gr_mop,\n\t\t\t\t\tgrp.`fee` AS gr_fee,\n\t\t\t\t\tgrp.`receipt_no` AS gr_rpt_no,\n\t\t\t\t\tgrp.`customer_pk` AS gr_user_pk\n\t\t\t\tFROM `groups` AS grp\n\t\t\t\tWHERE grp.`id` != \\'\\'\n\t\t\t\t' . $searchQuery[\"searchQueryE\"] . '\n\t\t\t\tAND grp.`status` != (SELECT `id` FROM `status` WHERE `statu_name`=\\'Delete\\' AND `status`=1 );';\n $res = executeQuery($query);\n if (mysql_num_rows($res)) {\n $j = 1;\n while ($row = mysql_fetch_assoc($res)) {\n $groupslist[$j]['grid'] = $row['grid'];\n $groupslist[$j]['gr_name'] = $row['gr_name'];\n $groupslist[$j]['gr_own'] = $row['gr_own'];\n $groupslist[$j]['gr_mems'] = $row['gr_mems'];\n $groupslist[$j]['gr_type'] = $row['group_type'];\n $groupslist[$j]['gr_mop'] = $row['gr_mop'];\n $groupslist[$j]['gr_fee'] = $row['gr_fee'];\n $groupslist[$j]['gr_rpt_no'] = $row['gr_rpt_no'];\n $groupslist[$j]['gr_user_pk'] = $row['gr_user_pk'];\n $j++;\n }\n $query1 = 'SELECT\n\t\t\t\te.`grid` AS gr_id,\n\t\t\t\te.`name` AS gr_name,\n\t\t\t\te.`no_of_members` AS gr_mems,\n\t\t\t\te.`group_type` AS gr_type,\n\t\t\t\te.`mode_of_payment_id` AS gr_mop,\n\t\t\t\te.`fee` AS gr_fee,\n\t\t\t\te.`receipt_no` AS gr_rpt_no,\n\t\t\t\ta.`id`,\n\t\t\t\ta.`name`,\n\t\t\t\ta.`email` AS email_id,\n\t\t\t\ta.`cell_number`,\n\t\t\t\ta.`is_group_owner`,\n\t\t\t\ta.`is_group_memer`,\n\t\t\t\ta.`dob`,\n\t\t\t\ta.`sex`,\n\t\t\t\ta.`acs_id`,\n\t\t\t\ta.`occupation`,\n\t\t\t\ta.`date_of_join` AS jnd,\n\t\t\t\ta.`fee` AS reg_fee,\n\t\t\t\ta.`receipt_no` AS reg_rpt_no,\n\t\t\t\ta.`photo`,\n\t\t\t\ta.`status`,\n\t\t\t\tb.`fee_pk`,\n\t\t\t\tb.`facility_type`,\n\t\t\t\tb.`offer_name`,\n\t\t\t\tb.`duration`,\n\t\t\t\tb.`fee_payment_date`,\n\t\t\t\tb.`valid_from`,\n\t\t\t\tb.`valid_till`,\n\t\t\t\tb.`fee_amount`,\n\t\t\t\tb.`fee_mop`,\n\t\t\t\tb.`rpt_no`,\n\t\t\t\tc.`pack_pk`,\n\t\t\t\tc.`package_type_id` AS package_type ,\n\t\t\t\tc.`number_of_sessions`,\n\t\t\t\tc.`pck_pay_date`,\n\t\t\t\tc.`pck_amount`,\n\t\t\t\tc.`pck_mop`,\n\t\t\t\tc.`pck_rpt_no`,\n\t\t\t\td.`attn_id`,\n\t\t\t\td.`in_time`,\n\t\t\t\td.`out_time`,\n\t\t\t\tf.`mt_pk`,\n\t\t\t\tf.`mt_uid`,\n\t\t\t\tf.`inv_tt`,\n\t\t\t\tf.`inv_tid`,\n\t\t\t\tf.`mt_pod`,\n\t\t\t\tf.`mt_rpt`,\n\t\t\t\tf.`tot_amt`,\n\t\t\t\tf.`mop`,\n\t\t\t\tf.`inv_urls`,\n\t\t\t\tf.`due_amount`,\n\t\t\t\tf.`due_date`,\n\t\t\t\tf.`due_status`\n\t\t\tFROM (\n\t\t\t\tSELECT u.*,\n\t\t\t\t\t IF((SELECT COUNT(`id`) FROM `groups` WHERE `customer_pk` = u.`id` AND `status` = (SELECT `id` FROM `status` WHERE `statu_name`=\"Show\" AND `status`=1 )),\n\t\t\t\t\t (SELECT `id` FROM `groups` WHERE `customer_pk` = u.`id`),0) AS is_group_owner,\n\t\t\t\t\t IF((SELECT COUNT(`id`) FROM `group_members` WHERE `customer_pk` = u.`id` AND `status` = (SELECT `id` FROM `status` WHERE `statu_name`=\"Joined\" AND `status`=1 )),\n\t\t\t\t\t (SELECT `group_id` FROM `group_members` WHERE `customer_pk` = u.`id`),0) AS is_group_memer,\n\t\t\t\t\t CASE WHEN u.`photo_id` IS NULL\n\t\t\t\t\t\t\tTHEN \"' . USER_ANON_IMAGE . '\"\n\t\t\t\t\t\t\tELSE CONCAT(\"' . URL . ASSET_DIR . '\",p.`ver3`)\n\t\t\t\t\t END AS photo\n\t\t\t\tFROM `customer` AS u\n\t\t\t\tLEFT JOIN `photo` AS p ON p.`id` = u.`photo_id`\n\t\t\t\tWHERE (u.`status` =(SELECT `id` FROM `status` WHERE `statu_name`=\"Registered\" AND `status`=1 ) OR u.`status` = (SELECT `id` FROM `status` WHERE `statu_name`=\"Joined\" AND `status`=1 ))\n\t\t\t\t' . $searchQuery[\"searchQueryA\"] . '\n\t\t\t)AS a\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT \tGROUP_CONCAT(DISTINCT (fe.`id`)) AS fee_pk,\n\t\t\t\t\tfe.`customer_pk` AS user_id,\n\t\t\t\t\tGROUP_CONCAT(fep.`facility_id`) AS facility_type,\n\t\t\t\t\tGROUP_CONCAT(fep.`name`) AS offer_name,\n\t\t\t\t\tGROUP_CONCAT(fep.`duration_id`) AS duration,\n\t\t\t\t\tGROUP_CONCAT(fe.`payment_date`) AS fee_payment_date,\n\t\t\t\t\tGROUP_CONCAT(fe.`valid_from`) AS valid_from,\n\t\t\t\t\tGROUP_CONCAT(fe.`valid_till`) AS valid_till,\n\t\t\t\t\tGROUP_CONCAT(fe.`amount`) AS fee_amount,\n\t\t\t\t\tGROUP_CONCAT(fe.`mode_of_payment_id`) AS fee_mop,\n\t\t\t\t\tGROUP_CONCAT(fe.`receipt_no`) AS rpt_no\n\t\t\t\tFROM `fee` AS fe\n\t\t\t\tINNER JOIN `offers` AS fep ON fep.`id` = fe.`offer_id`\n\t\t\t\tWHERE fep.`id` = fe.`offer_id`\n\t\t\t\t' . $searchQuery[\"searchQueryB\"] . '\n\t\t\t\tGROUP BY(fe.`customer_pk`)\n\t\t\t)AS b ON b.`user_id` = a.`id`\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT \tGROUP_CONCAT(DISTINCT (fepack.`id`)) AS pack_pk,\n\t\t\t\t\tpac.`package_type_id`,\n\t\t\t\t\tpac.`number_of_sessions`,\n\t\t\t\t\tGROUP_CONCAT(fepack.`payment_date`) AS pck_pay_date,\n\t\t\t\t\tGROUP_CONCAT(fepack.`amount`) AS pck_amount,\n\t\t\t\t\tGROUP_CONCAT(fepack.`mode_of_payment_id`) AS pck_mop,\n\t\t\t\t\tGROUP_CONCAT(fepack.`receipt_no`) AS pck_rpt_no,\n\t\t\t\t\tfepack.`customer_pk` AS user_id\n\t\t\t\tFROM \t`fee_packages` AS fepack\n\t\t\t\tINNER \tJOIN `packages` AS pac ON pac.`id` = fepack.`package_id`\n\t\t\t\tWHERE \tpac.`id` = fepack.`package_id`\n\t\t\t\t' . $searchQuery[\"searchQueryC\"] . '\n\t\t\t\tGROUP BY(fepack.`customer_pk`)\n\t\t\t) AS c ON c.`user_id` = a.`id`\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT \tGROUP_CONCAT(DISTINCT (attn.`id`)) AS attn_id,\n\t\t\t\t\tGROUP_CONCAT(attn.`in_time`) AS in_time,\n\t\t\t\t\tGROUP_CONCAT(attn.`out_time`) AS out_time,\n\t\t\t\t\tGROUP_CONCAT(attn.`facility_id`) AS facility_type,\n\t\t\t\t\tattn.`customer_pk` AS user_id\n\t\t\t\tFROM \t`customer_attendence` AS attn\n\t\t\t\tGROUP BY(attn.`customer_pk`)\n\t\t\t) AS d ON d.`user_id` = a.`id`\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT\n\t\t\t\t\tgrp.`id` AS grid,\n\t\t\t\t\tgrp.`name`,\n\t\t\t\t\tgrp_mem.`customer_pk`,\n\t\t\t\t\tgrp_mem.`group_id`,\n\t\t\t\t\tgrp.`no_of_members`,\n\t\t\t\t\tIF(grp.`no_of_members` = 2,\"Couple\",\"Group\") AS group_type,\n\t\t\t\t\tgrp.`mode_of_payment_id`,\n\t\t\t\t\tgrp.`fee`,\n\t\t\t\t\tgrp.`receipt_no`\n\t\t\t\tFROM `group_members` AS grp_mem\n\t\t\t\tLEFT JOIN `groups` AS grp ON grp.`id` = grp_mem.`group_id` AND grp.`status` = (SELECT `id` FROM `status` WHERE `statu_name`=\"show\" AND `status`=1 )\n\t\t\t\tWHERE grp.`id` != \"\"\n\t\t\t\t' . $searchQuery[\"searchQueryE\"] . '\n\t\t\t\tAND grp.`status` !=(SELECT `id` FROM `status` WHERE `statu_name`=\"Delete\" AND `status`=1 )\n\t\t\t\tORDER BY (grp_mem.`group_id`)\n\t\t\t) AS e ON e.`customer_pk` = a.`id`\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT\n\t\t\t\tGROUP_CONCAT(mtr.`id`) \t\t\t\tAS mt_pk,\n\t\t\t\tmtr.`customer_pk` \t\t\t\t\t\t\tAS mt_uid,\n\t\t\t\tGROUP_CONCAT(inv.`name`) \t\t\t\tAS inv_tt,\n\t\t\t\tGROUP_CONCAT(inv.`transaction_id`) \t\tAS inv_tid,\n\t\t\t\tGROUP_CONCAT((SELECT `pay_date` FROM `money_transactions` WHERE `id` = inv.`transaction_id`))\tAS mt_pod,\n\t\t\t\tGROUP_CONCAT(DISTINCT(mtr.`receipt_no`))AS mt_rpt,\n\t\t\t\tGROUP_CONCAT(temp1.`total`)\t\t\t\tAS tot_amt,\n\t\t\t\tGROUP_CONCAT(temp2.`gmop`)\t\t\t\tAS mop,\n\t\t\t\tGROUP_CONCAT(inv.`inv_urls`) \t\t\tAS inv_urls,\n\t\t\t\tdue.`duser` \t\t\t\t\t\t\tAS due_user,\n\t\t\t\tGROUP_CONCAT(due.`money_trans_id`) \t\tAS money_trans_id,\n\t\t\t\tGROUP_CONCAT(due.`due_id`) \t\t\t\tAS due_id,\n\t\t\t\tGROUP_CONCAT(due.`damt`) \t\t\t\tAS due_amount,\n\t\t\t\tGROUP_CONCAT(due.`ddate`) \t\t\t\tAS due_date,\n\t\t\t\tGROUP_CONCAT(due.`dstatus`) \t\t\tAS due_status\n\t\t\t\tFROM `money_transactions` AS mtr\n\t\t\t\tLEFT JOIN (\n\t\t\t\t\tSELECT\n\t\t\t\t\t\tIF(temp3.`due_id` IS NULL, \"NA\", temp3.`due_id`) AS due_id,\n\t\t\t\t\t\tIF(temp3.`due_amt` IS NULL, \"NA\", temp3.`due_amt`) AS damt,\n\t\t\t\t\t\tIF(temp3.`due_date` IS NULL, \"NA\", temp3.`due_date`) AS ddate,\n\t\t\t\t\t\tIF(temp3.`due_status` IS NULL, \"NA\", temp3.`due_status`) AS dstatus,\n\t\t\t\t\t\ttemp3.`duser` AS duser,\n\t\t\t\t\t\tIF(temp3.`money_trans_id` IS NULL, \"NA\", temp3.`money_trans_id`) AS money_trans_id,\n\t\t\t\t\t\ttemp3.`rrr`\n\t\t\t\t\tFROM (\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\ttmtr.`receipt_no` AS rrr,\n\t\t\t\t\t\t\ttinv.`id` \t\t\t\tAS due_id,\n\t\t\t\t\t\t\ttinv.`money_trans_id` \tAS money_trans_id,\n\t\t\t\t\t\t\ttinv.`due_amount` AS due_amt,\n\t\t\t\t\t\t\ttinv.`due_date` AS due_date,\n\t\t\t\t\t\t\ttmtr.`customer_pk` AS duser,\n\t\t\t\t\t\t\ttinv.`status` AS due_status\n\t\t\t\t\t\tFROM `money_transactions` AS tmtr\n\t\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t`id`,\n\t\t\t\t\t\t\t\t`money_trans_id`,\n\t\t\t\t\t\t\t\t`due_amount`,\n\t\t\t\t\t\t\t\t`due_date`,\n\t\t\t\t\t\t\t\t`customer_pk`,\n\t\t\t\t\t\t\t\t`status`\n\t\t\t\t\t\t\tFROM `money_trans_due`\n\t\t\t\t\t\t) AS tinv ON tmtr.`id` = tinv.`money_trans_id`\n\t\t\t\t\t\tGROUP BY (tmtr.`id`)\n\t\t\t\t\t) AS temp3\n\t\t\t\t\tGROUP BY (temp3.`rrr`)\n\t\t\t\t) AS due ON due.`rrr` = mtr.`receipt_no` AND mtr.`customer_pk` = due.`duser`\n\t\t\t\tLEFT JOIN (\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t`customer_pk`\tAS inv_users,\n\t\t\t\t\t\t`location` \tAS inv_urls,\n\t\t\t\t\t\t`transaction_id`,\n\t\t\t\t\t\t`name`\n\t\t\t\t\tFROM `invoice`\n\t\t\t\t\tGROUP BY(`transaction_id`)\n\t\t\t\t) AS inv ON inv.`transaction_id` = mtr.`id`\n\t\t\t\tLEFT JOIN(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t`id`,\n\t\t\t\t\t\t`receipt_no`,\n\t\t\t\t\t\tSUM(`total_amount`) AS total\n\t\t\t\t\tFROM `money_transactions`\n\t\t\t\t\tGROUP BY (`receipt_no`)\n\t\t\t\t) AS temp1 ON temp1.`id` = mtr.`id`\n\t\t\t\tLEFT JOIN(\n\t\t\t\t\tSELECT\n\t\t\t\t\t\t`id`,\n\t\t\t\t\t\t`receipt_no`,\n\t\t\t\t\t\tCONCAT(\\'(\\',GROUP_CONCAT(CONCAT(`total_amount` ,\\' through \\', (SELECT CASE WHEN `name` = \\'Cash\\' THEN \\'Cash\\' ELSE CASE WHEN `transaction_number` IS NULL THEN `name` ELSE CASE WHEN LENGTH(`transaction_number`) = 0 THEN CONCAT (`name`, \\' and \\', `name`, \\' No = Not provided\\') ELSE CONCAT (`name`, \\' and \\', `name`, \\' No = \\',`transaction_number`) END END END FROM `mode_of_payment` WHERE `id` = `mop_id` AND `status` = (SELECT `id` FROM `status` WHERE `statu_name`=\"Show\" AND `status`=1 )) )),\\')\\') AS gmop\n\t\t\t\t\tFROM `money_transactions`\n\t\t\t\t\tGROUP BY (`receipt_no`)\n\t\t\t\t) AS temp2 ON temp2.`id` = mtr.`id`\n\t\t\t\tGROUP BY (mtr.`customer_pk`)\n\t\t\t) AS f ON f.`mt_uid` = a.`id`\n\t\t\tWHERE a.`is_group_owner` != 0 OR a.`is_group_memer` != 0 ' . $searchQuery[\"searchQueryD\"] . ' ' . $searchQuery[\"ListQuery\"] . ' ;';\n $res = executeQuery($query1);\n if (mysql_num_rows($res)) {\n $i = 1;\n while ($row = mysql_fetch_assoc($res)) {\n $groupsinfo[$i]['id'] = $row['id'];\n $groupsinfo[$i]['name'] = $row['name'];\n $groupsinfo[$i]['email_id'] = $row['email_id'];\n $groupsinfo[$i]['cell_number'] = $row['cell_number'];\n $groupsinfo[$i]['is_group_owner'] = $row['is_group_owner'];\n $groupsinfo[$i]['is_group_memer'] = $row['is_group_memer'];\n $groupsinfo[$i]['date_of_join'] = date('F j, Y, g:i a', strtotime($row['jnd']));\n $groupsinfo[$i]['dob'] = $row['dob'];\n $groupsinfo[$i]['sex'] = $row['sex'];\n $groupsinfo[$i]['acs_id'] = $row['acs_id'];\n $groupsinfo[$i]['occupation'] = $row['occupation'];\n $groupsinfo[$i]['reg_fee'] = $row['reg_fee'];\n $groupsinfo[$i]['reg_rpt_no'] = $row['reg_rpt_no'];\n /* Photo */\n $groupsinfo[$i]['photo'] = $row['photo'];\n /* Fee history */\n $groupsinfo[$i]['avg_amt'] = 0;\n if ($row['fee_pk']) {\n $groupsinfo[$i]['fee'] = array();\n $groupsinfo[$i]['fee']['id'] = explode(\",\", $row['fee_pk']);\n $groupsinfo[$i]['fee']['facility_type'] = explode(\",\", $row['facility_type']);\n $groupsinfo[$i]['fee']['offer_name'] = explode(\",\", $row['offer_name']);\n $groupsinfo[$i]['fee']['duration'] = explode(\",\", $row['duration']);\n $groupsinfo[$i]['fee']['payment_date'] = explode(\",\", $row['fee_payment_date']);\n $groupsinfo[$i]['fee']['valid_from'] = explode(\",\", $row['valid_from']);\n $groupsinfo[$i]['fee']['valid_till'] = explode(\",\", $row['valid_till']);\n $groupsinfo[$i]['fee']['amount'] = explode(\",\", $row['fee_amount']);\n $groupsinfo[$i]['fee']['mode_of_payment'] = explode(\",\", $row['fee_mop']);\n $groupsinfo[$i]['fee']['receipt_no'] = explode(\",\", $row['rpt_no']);\n } else {\n $groupsinfo[$i]['fee'] = NULL;\n }\n /* Fee package history */\n if ($row['pack_pk']) {\n $groupsinfo[$i]['fee_package'] = array();\n $groupsinfo[$i]['fee_package']['id'] = explode(\",\", $row['pack_pk']);\n $groupsinfo[$i]['fee_package']['package_type'] = explode(\",\", $row['package_type']);\n $groupsinfo[$i]['fee_package']['num_sessions'] = explode(\",\", $row['number_of_sessions']);\n $groupsinfo[$i]['fee_package']['payment_date'] = explode(\",\", $row['pck_pay_date']);\n $groupsinfo[$i]['fee_package']['amount'] = explode(\",\", $row['pck_amount']);\n $groupsinfo[$i]['fee_package']['mode_of_payment'] = explode(\",\", $row['pck_mop']);\n $groupsinfo[$i]['fee_package']['receipt_no'] = explode(\",\", $row['pck_rpt_no']);\n } else {\n $groupsinfo[$i]['fee_package'] = NULL;\n }\n /* Attendance history */\n if ($row['attn_id']) {\n $groupsinfo[$i]['attendance'] = array();\n $groupsinfo[$i]['attendance']['id'] = explode(\",\", $row['attn_id']);\n $groupsinfo[$i]['attendance']['in_time'] = explode(\",\", $row['in_time']);\n $groupsinfo[$i]['attendance']['out_time'] = explode(\",\", $row['out_time']);\n $groupsinfo[$i]['attendance']['facility_type'] = explode(\",\", $row['facility_type']);\n } else {\n $groupsinfo[$i]['attendance'] = NULL;\n }\n /* Account stats */\n if ($row['mt_uid']) {\n $groupsinfo[$i]['accounts'] = array();\n $groupsinfo[$i]['accounts']['mt_uid'] = $row['mt_uid'];\n $groupsinfo[$i]['accounts']['inv_tt'] = explode(\",\", $row['inv_tt']);\n $groupsinfo[$i]['accounts']['mt_pod'] = explode(\",\", $row['mt_pod']);\n $groupsinfo[$i]['accounts']['mt_rpt'] = explode(\",\", $row['mt_rpt']);\n $groupsinfo[$i]['accounts']['tot_amt'] = explode(\",\", $row['tot_amt']);\n $groupsinfo[$i]['accounts']['mop'] = explode(\"),\", $row['mop']);\n $groupsinfo[$i]['accounts']['inv_urls'] = explode(\",\", $row['inv_urls']);\n $groupsinfo[$i]['accounts']['due_amount'] = explode(\",\", $row['due_amount']);\n $groupsinfo[$i]['accounts']['due_date'] = explode(\",\", $row['due_date']);\n $groupsinfo[$i]['accounts']['due_status'] = explode(\",\", $row['due_status']);\n } else {\n $groupsinfo[$i]['accounts'] = NULL;\n }\n if ($row['valid_till'])\n $groupsinfo[$i]['exp_date'] = date('j-M-Y', strtotime($groupsinfo[$i]['fee']['valid_till'][sizeof($groupsinfo[$i]['fee']['valid_till']) - 1]));\n else\n $groupsinfo[$i]['exp_date'] = NULL;\n $i++;\n }\n } else\n $groupsinfo = NULL;\n $_SESSION['groupsinfo'] = $groupsinfo;\n } else\n $groupslist = NULL;\n $_SESSION['listofgroups'] = $groupslist;\n }", "title": "" }, { "docid": "4f0b4970639dcf9300111ef534a70709", "score": "0.53392106", "text": "public function getGroup();", "title": "" }, { "docid": "4f0b4970639dcf9300111ef534a70709", "score": "0.53392106", "text": "public function getGroup();", "title": "" }, { "docid": "4f0b4970639dcf9300111ef534a70709", "score": "0.53392106", "text": "public function getGroup();", "title": "" }, { "docid": "aa3336de54a592cf2adbe8f4ed4c73d8", "score": "0.53377974", "text": "public function getGroups(){\n if (!$this->groups){\n $this->loadGroups();\n }\n return $this->groups;\n }", "title": "" }, { "docid": "80d111855031f6013defa5d501debf10", "score": "0.5337195", "text": "public function getGroupsByAccessLevel($access, $diagnostic = true)\n {\n static $cache = array();\n $cache_key = $access . '.' . strval($diagnostic);\n\n if (isset($cache[$cache_key])) {\n return $cache[$cache_key];\n }\n\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n $groups = array();\n $fields = ($diagnostic ? 'a.id' : 'a.id, a.lft, a.rgt');\n\n // Handle public access\n if ($access == '1') {\n $query->select($fields)\n ->from('#__usergroups AS a');\n\n $db->setQuery((string) $query);\n $groups = (array) $db->loadColumn();\n\n $cache[$cache_key] = $groups;\n\n return $cache[$cache_key];\n }\n\n\n // Get the groups of the access level\n $query->select('a.rules')\n ->from('#__viewlevels AS a')\n ->where('a.id = '. (int) $access);\n\n $db->setQuery((string) $query);\n $rules = $db->loadResult();\n $rules = (empty($rules) ? array() : json_decode($rules));\n\n if (!count($rules)) {\n $cache[$cache_key] = array();\n return $cache[$cache_key];\n }\n\n\n // Loop through the top groups to find the children\n $groups = array();\n foreach($rules AS $gid)\n {\n $gid = (int) $gid;\n\n // Load the group data\n $query->clear();\n $query->select('a.id, a.lft, a.rgt')\n ->from('#__usergroups AS a')\n ->where('a.id = ' . $db->quote($gid))\n ->join('LEFT', $query->quoteName('#__usergroups') . ' AS b ON a.lft > b.lft AND a.rgt < b.rgt')\n ->group('a.id')\n ->order('a.lft ASC');\n\n $db->setQuery((string) $query);\n\n $group = $db->loadObject();\n\n // Load child groups\n if (is_object($group)) {\n $groups[] = ($diagnostic ? $group->id : $group);\n\n $query->clear();\n $query->select($fields)\n ->from('#__usergroups AS a')\n ->join('LEFT', $query->quoteName('#__usergroups'). ' AS b ON a.lft > b.lft AND a.rgt < b.rgt')\n ->where('a.lft > ' . intval($group->lft) . ' AND a.rgt < ' . intval($group->rgt))\n ->group('a.id')\n ->order('a.lft ASC');\n\n $db->setQuery((string) $query);\n $children = (array) ($diagnostic ? $db->loadColumn() : $db->loadObjectList());\n\n foreach($children AS $child)\n {\n $groups[] = $child;\n }\n }\n }\n\n $cache[$cache_key] = $groups;\n\n return $cache[$cache_key];\n }", "title": "" }, { "docid": "211ee7aa978b4b3a0d8a4fc94a310d46", "score": "0.533015", "text": "public function getListByGroup($group)\n {\n global $cfg;\n \n $sql = \"SELECT\n *\n FROM\n \" . $this->_table . \"\n WHERE\n gm_id = '$group'\n ORDER BY\n menu_order ASC\";\n\n $res = array();\n \n try {\n $this->_dbObj->query($sql);\n \n $res = ($this->_dbObj->getNumRows()) ? $this->_dbObj->fetchAll() : array();\n } catch (DAALException $e) { Error::store($e->getMessage()); }\n\n return $res;\n }", "title": "" }, { "docid": "bacfad355599be71c61506948fcba589", "score": "0.5329911", "text": "public function list_groups_privileges() {\n $select = 'groups.group_id AS group_id, privileges.privilege_id AS privilege_id, '\n . 'privileges.name AS privilege_name, '\n . 'groups.name AS group_name, groups.description AS group_description, '\n . 'privileges.description AS privilege_description';\n\n $this->db->select($select);\n $this->db->join('groups', 'group_privilege.group_id = groups.group_id');\n $this->db->join('privileges', 'group_privilege.privilege_id = privileges.privilege_id');\n $query = $this->db->get('group_privilege');\n if ($query->num_rows() < 1) {\n return NULL;\n }\n\n return $query->result();\n }", "title": "" }, { "docid": "7c5402625658617e5cd6f1b7fb9d5fd6", "score": "0.5326914", "text": "function collect_groups()\n {\n //$sql =\"SELECT * FROM {$this->groupstable} WHERE minposts=-1\";\n\n // Use this version to include all SMF groups\n $sql =\"SELECT * FROM {$this->groupstable}\";\n\n $result = cpg_db_query($sql, $this->link_id);\n\n $udb_groups = array(1=>'Guests', 2=>'Registered');\n\n while ($row = mysql_fetch_assoc($result))\n {\n $udb_groups[$row[$this->field['grouptbl_group_id']]+100] = utf_ucfirst(utf_strtolower($row[$this->field['grouptbl_group_name']]));\n }\n\n return $udb_groups;\n }", "title": "" }, { "docid": "63ea66d9cceca663da5ec11312a7cd00", "score": "0.5324475", "text": "function getGroups()\n {\n return $this->arrayOfGroups;\n }", "title": "" }, { "docid": "b70db10b1922aec7052b81800382716d", "score": "0.5323943", "text": "function groups(){\n\t\t$query = $this->uri->uri_to_assoc(3);\n\n\t\t$this->load->model('groups');\n\t\t$groups = $this->groups->get($query['q']);\n\n\t\t$result = array();\n\t\tfor ($i = 0; $i < count($groups); $i++)\n\t\t{\n\t\t\t$result[] = array(\n\t\t\t\t'id' => $groups[$i]['group_id'],\n\t\t\t\t'value' => $groups[$i]['group_name']\n\t\t\t);\n\t\t}\n\n\n // return back to the JSON file\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode($result));\n\t}", "title": "" }, { "docid": "9c42b1b6442686cafb04de905f8392a9", "score": "0.5317095", "text": "public function getAdminAccessCapabilityList()\n {\n $ADMIN_GROUP_NAME = $this->config->item('ADMIN_GROUP_NAME');\n $group_code = $this->session->userdata('vGroupCode');\n $group_id = $this->session->userdata('iGroupId');\n $capability_ids = array();\n $is_admin_group = FALSE;\n $db_group_capabilities = array();\n if ($group_code == $ADMIN_GROUP_NAME) {\n $is_admin_group = TRUE;\n } else {\n $extra_cond = $this->db->protect(\"mgc.iGroupId\") . \" = \" . $this->db->escape($group_id);\n $db_group_capabilities = $this->getAdminGroupCapabilityList($extra_cond, \"\", \"\", \"\", \"\", \"iCapabilityId\");\n $capability_ids = (is_array($db_group_capabilities)) ? array_keys($db_group_capabilities) : array();\n }\n\n return array(\n 'is_admin' => $is_admin_group,\n 'capability_ids' => $capability_ids\n );\n }", "title": "" }, { "docid": "97f65b1959059eab9df3221124d5b106", "score": "0.53167355", "text": "public function getUserGroupsList()\r\n\t{\r\n\t\r\n\t\t$query = \"SELECT g.id, g.name FROM fh_user_groups g ORDER BY g.name ASC\";\r\n\t\t$res = $this->db->query($query);\r\n\t\t\r\n\t\t$arr = array();\r\n\t\t$fields = $this->getUserGroupsListFields();\r\n\t\tforeach($res->result() as $i=>$e){\r\n\t\t\t$item = array();\r\n\t\t\t$a = (array)$e;\r\n\t\t\tforeach ($fields as $j=>$f){\r\n\t\t\t\t$item[$j] = $a[$j];\r\n\t\t\t}\r\n\t\t\t$arr[] = $item;\r\n\t\t}\r\n\t\t\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "47918ea45d4396cbf34ddc7df2516f80", "score": "0.5298277", "text": "public function getOptionsGroups(){\n \n $db = Zend_Registry::get('dbAdapterReadOnly');\n return $db->query(\n \"SELECT mor.id, mor.name, mor.internalName \n FROM meal_options mo \n INNER JOIN meal_options_nn mon ON mo.id = mon.optionId \n INNER JOIN meal_options_rows mor ON mor.id = mon.optionRowId \n WHERE mo.id = ?\", $this->getId()\n )->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" } ]
9e172f16639d8f16483ef8e134a8c631
show my timetable page
[ { "docid": "e32fd9540d108112fbc28e1766febecd", "score": "0.6934464", "text": "public function show_my_timetable () \n\t{\n\t\t// get requested lessons \n\t\t$teacher_id = $this->session->userdata('teacher_id');\n\t\t$params = array('teacher_id' => $teacher_id);\n\t\t$result = $this->http_req->send_request(json_encode($params), $this->http_req->get_timetables);\n\t\t$result = json_decode($result);\n\t\t$result_code = $result->result_code;\n\t\t$result_data = $result->result_data;\n\t\t$timetables = json_decode(json_encode($result_data), true);\n\t\t\n\t\t// get data of calendar from teacher timetable\n\t\t$timetable_calendar_data = array();\n\t\tforeach($timetables as $timetable) {\n\t\t\t$title = 'timetalbe';\n\t\t\t$start_date = new DateTime($timetable['date']);\n\t\t\t$end_date = new DateTime($timetable['date']);\n\t\t\t$start_time = strtotime($timetable['start_time']);\n\t\t\t$end_time = strtotime($timetable['end_time']);\n\t\t\t\n\t\t\t$start_date->setTime(date('H', $start_time), date('i', $start_time));\n\t\t\t$end_date->setTime(date('H', $end_time), date('i', $end_time));\n\n\t\t\t$event = array('title' => $title, \n\t\t\t\t\t\t 'start' => date_format($start_date, 'Y-m-d H:i:s'), \n\t\t\t\t\t\t 'end' => date_format($end_date, 'Y-m-d H:i:s'));\n\t\t\tarray_push($timetable_calendar_data, $event);\n\t\t}\n\n\t\t$data = array('time_tables' => $timetables, 'timetable_calendar_data' => $timetable_calendar_data, 'teacher_id' => $teacher_id);\n\n\t\t$this->load->view('my_custom/include/header/header');\n\t\t$this->load->view('my_custom/include/header/teacher-main-tab');\n\t\t$this->load->view('my_custom/include/teacher-section/timetable', $data);\n\t\t$this->load->view('my_custom/include/footer/footer');\n\t}", "title": "" } ]
[ { "docid": "083ecccb61017966ec422a601860792c", "score": "0.7710273", "text": "public function show(TimeTable $timeTable)\n {\n //\n }", "title": "" }, { "docid": "6e4438b2bb812e15abc17359a6f1aa16", "score": "0.75477445", "text": "function view_all_timetable(){\n\t\t\n\t\t$con=$this->connect();\n\t\t\n\t\t$sql=\"SELECT * FROM timetable\";\n\t\t\n\t\t\n\t\t$res=$con->query($sql);\n\t\t\n\t\tif ($res->num_rows>0){\n\t\t\techo \"<div class='row'>\\n\";\n\t\t\twhile ($timetable = $res->fetch_assoc()) {\n\t\t\t\techo \"<div class='col-md-8 col-sm-12'>\".$timetable[\"Name\"].\"</div>\";\n\t\t\t\techo \"<div class='col-md-2 col-sm-6'><a href='./index.php?view=\".$timetable[\"iTT\"].\"'>Переглянути</a></div>\";\n\t\t\t\techo \"<div class='col-md-2 col-sm-6'><a href='./index.php?del=\".$timetable[\"iTT\"].\"'>Видалити</a></div>\";\n\t\t\t}\n\t\t\techo \"</div>\\n\";\n\t\t} else {\n\t\t\techo \"<div class='alert alert-danger text-center'>Розклади відсутні</div>\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "dc5a6422f83448ad85afc3b48e96a958", "score": "0.6741914", "text": "public static function display_section_timetable(){\n ?>\n <p class=\"section-description\">Section dédiée uniquement aux horaires d'ouverture</p>\n <?php\n }", "title": "" }, { "docid": "51a7cbcdfc29e4eb5a721f651be8de7b", "score": "0.66593945", "text": "function getTimetable()\n {\n }", "title": "" }, { "docid": "59161bbf83624700ef38b7e399fde434", "score": "0.6646558", "text": "public function index()\n {\n return view('admin.timing');\n }", "title": "" }, { "docid": "4cda198c7e9fc511a964385c89126a2d", "score": "0.6601245", "text": "public function index()\n\t{\n $this->data[\"title\"] = \"CST Timetable\";\n $this->data['pagebody'] = 'welcome';\n \n $this->data[\"daysofweek\"] = $this->Timetable->getDays();\n $this->data[\"courses\"] = $this->Timetable->getCourses();\n $this->data[\"periods\"] = $this->Timetable->getPeriods();\n \n $this->data['daysSearch'] = form_dropdown('day', $this->Timetable->getListOfDays());\n $this->data['periodSearch'] = form_dropdown('period', $this->Timetable->getListOfPeriods());\n \n $this->render();\n\t}", "title": "" }, { "docid": "191048b2646799e24095e579b5576b0c", "score": "0.65896297", "text": "public function index()\n {\n //\n $timetables = TimeTable::orderBy('days_id', 'ASC')->get();\n\n return view('admin.timetables.index', compact('timetables'));\n }", "title": "" }, { "docid": "3e0f9b20d6c1888aa4ae0072b048c663", "score": "0.6580762", "text": "public function actionTimeTable()\n\t{\n\t\t$this->layout='//layouts/column1';\n\t\t\n\t\t$criteria = new CDbCriteria();\n $criteria->condition = \"DATE_SUB(CURDATE(),INTERVAL 0 DAY) <= next_call\";\n //$criteria->order = 'next_call ASC';\n $criteria->select = 'id, next_call, company, call_status, next_meeting_date';\n\n\t\t$dataProvider=new CActiveDataProvider('CallerReport', array('criteria'=>$criteria, 'pagination' => array(\n 'pageSize' => 50,\n ),'sort' => array(\n 'defaultOrder' => 'next_call ASC',\n ),\n\t\t));\n\t\t$this->render('timeTable',array('dataProvider'=>$dataProvider, 'model'=>$model));\n\t}", "title": "" }, { "docid": "d39bb9659315f050d7eb615829ee9722", "score": "0.65738827", "text": "public function index(){\n $_SESSION['time'] = time();//存储当前时间\n $this->display();\n }", "title": "" }, { "docid": "d39bb9659315f050d7eb615829ee9722", "score": "0.65738827", "text": "public function index(){\n $_SESSION['time'] = time();//存储当前时间\n $this->display();\n }", "title": "" }, { "docid": "d39bb9659315f050d7eb615829ee9722", "score": "0.65738827", "text": "public function index(){\n $_SESSION['time'] = time();//存储当前时间\n $this->display();\n }", "title": "" }, { "docid": "d585f9c04bd3d3a4c43de1954858ad79", "score": "0.65667915", "text": "public function showWorkersTable()\r\n {\r\n $this->workerView->showWorkersTable();\r\n }", "title": "" }, { "docid": "17f8c962b7f182ddedc62e377b4cbaca", "score": "0.655776", "text": "function showTimetable($dayArray, $startTime, $endTime, $interval)\n{\n $start = explode(\":\", $startTime);\n $start = $start[0] * 60 + $start[1];\n\n $end = explode(\":\", $endTime);\n $end = $end[0] * 60 + $end[1];\n\n $interval = (int) $interval;\n\n # Draw the table\n echo \"<table>\";\n\n # Create the table header\n echo \"<tr>\";\n echo \"<th style='background: dodgerblue; '>Hora</th>\";\n foreach ($dayArray as $day) {\n echo \"<th>$day</th>\";\n }\n echo \"</tr>\";\n\n if ($start > $end) {\n\n $dayEnd = 24 * 60;\n $background = true;\n\n drawRows($dayArray,$start,$dayEnd,$interval);\n } else drawRows($dayArray,$start,$end,$interval);\n \n\n echo \"</table>\";\n}", "title": "" }, { "docid": "392b0ccec2126caa668c370f2bbd38e3", "score": "0.64897364", "text": "public function index()\n {\n $times = Time::get();\n return view('backend.time.index',compact('times'));\n }", "title": "" }, { "docid": "d84404d127f3b7b1ffe4d006f5191246", "score": "0.64860696", "text": "public function showTable(){\n\n $tasks = Todo::all();\n\n return view ('todo.pages.table', compact('tasks'));\n\n }", "title": "" }, { "docid": "3358b6d944a85a5cc033754e00167f01", "score": "0.64778274", "text": "public function index()\n {\n $x_times = Time::latest()->get();\n return view('admin.time.index', compact('x_times'));\n\n }", "title": "" }, { "docid": "64b671e05a439d31cac4a4aea3c8883e", "score": "0.64777696", "text": "function tableEvent()\n\t{\n\t\t$data['page'] = 'Listing Event';\n\t\t$data['title'] = '::listing event::';\n\t\t$this->template->views('shifting_report/tableEvent',$data);\n\t}", "title": "" }, { "docid": "e35d29f4ac962f330ad6a1a5b3f9182b", "score": "0.6476568", "text": "public function list_table_page()\n {\n $exampleListTable = new Halal_Data_Table();\n $exampleListTable->prepare_items();\n ?>\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Halal Data Table</h2>\n <?php $exampleListTable->display(); ?>\n </div>\n <?php\n }", "title": "" }, { "docid": "f963e0cbe4772cd6adf483505b193082", "score": "0.64285654", "text": "public function addtimetablt()\n {\n \tis_not_logged_in();\n\t\t$this->load->view('admin/header');\n\t\t$this->load->view('admin/add-timetablt');\n\t\t$this->load->view('admin/footer');\n }", "title": "" }, { "docid": "a41e722a2946f5949c8b1d13a2b6de36", "score": "0.64003307", "text": "public function actionIndex()\n {\n $searchModel = new TimetableSearch();\n $dataProvider = $searchModel->searchWithRelations(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "15bda66c0dd00f29c51fcc4434e76364", "score": "0.63932276", "text": "function displayTimetable($lineID, $dirID, $optID, $bookingTime){\n\t\t\n\t\t$html = \"\";\n\t\t$conn = createConnection ();\n\t\tdate_default_timezone_set(\"UTC\");\n\t\t$time = $bookingTime;\t\t\n\t\t$temptime = strtotime($time);\n\t\t$starttime = date('Y-m-d H:i:s',strtotime('-15 minutes', $temptime));\n\t\t$endtime = date('Y-m-d H:i:s',strtotime('+60 minutes', $temptime));\n\t\t\n\t\t\n\t\t$sql = \"select stop_id from stopsInOrder where dir_id=$dirID and line_id=$lineID order by order_id\";\n\t\t$result = getQueryResult($sql);\n\t\t$stopIDs = [];\n\t\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t\tarray_push($stopIDs, $row['stop_id']);\n\t\t}\n\t\t\n\t\t$sql = \"select run_id from timetable where line_id = $lineID and dir_id = $dirID \n\t\t\t\tand time_mel < '$endtime'\n\t\t\t\tand time_mel > '$starttime'\n\t\t\t\tand stop_id in (select stop_id\n\t\t\t\t\t\t\t\tfrom stopsInOrder\n\t\t\t\t\t\t\t\twhere order_id in (select order_id-1\n\t\t\t\t\t\t\t\t\t\t\t\t\tfrom stopsInorder\n\t\t\t\t\t\t\t\t\t\t\t\t\twhere line_id = $lineID\n\t\t\t\t\t\t\t\t\t\t\t\t\tand dir_id = $dirID\n\t\t\t\t\t\t\t\t\t\t\t\t\tand stop_id = $optID )\t\n\t\t\t\t\t\t\t\t\tand dir_id = $dirID\t\t\t\n\t\t\t\t)\n\t\t\t\torder by time_mel\";\n\t\t$result = getQueryResult($sql);\n\t\t$runIDs = [];\n\t\twhile ($row = mysqli_fetch_assoc($result) ) {\n\t\t\tif (!in_array($row['run_id'], $runIDs))\n\t\t\t\tarray_push($runIDs, $row['run_id']);\n\t\t}\n\n\t\t//display timetable\n\t\t$html = \"<br><table class='pure-table pure-table-bordered'>\";\n\t\tforeach ($stopIDs as $key => $value) {\n\t\t\t$html = $html.\"<tr>\";\n\t\t\t$html = $html.\"<td>\".getStopName($lineID,$dirID,$value).\"</td>\";\n\t\t\t$tempStopID = $value;\n\t\t\tforeach ($runIDs as $key2 => $value2) {\n\t\t\t\t$sql = \"select t.stop_id, run_id, time_mel from timetable as t, stops as s where t.stop_id=s.stop_id and t.stop_id=$value and t.run_id=$value2\";\n\t\t\t\t$result = getQueryResult($sql);\n\t\t\t\tif ($row = mysqli_fetch_assoc($result)) {\t\t\t\t\t\n\t\t\t\t\t$tempTime = $row['time_mel'];\n\t\t\t\t\t$tempTime = date(\"H:i\", strtotime($tempTime));\n\t\t\t\t\t$html = $html.\"<td style='text-align: center'>\".$tempTime.\"</td>\";\n\t\t\t\t} else {\n\t\t\t\t\tif($tempStopID == $optID){\n\t\t\t\t\t\t$preStopTime = getPreStopTime($lineID,$dirID,$value2,$optID);\n\t\t\t\t\t\t$preStopTime = date(\"H:i\", strtotime($preStopTime));\n\t\t\t\t\t\t$html = $html.\"<td style='text-align: center; background-color: #cc0000; color: white'><label><input class='optCheckbox' type='checkbox' name=$value2 value='$preStopTime'> \".$preStopTime.\"</label></td>\";\n\t\t\t\t\t}\n\t\t\t\t\telse $html = $html.\"<td style='text-align: center'> --- </td>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$html = $html.\"</tr>\";\n\t\t}\n\t\t$html = $html.\"</table> <br> <input id='bookChecked' type='button' class='pure-button pure-button-primary' value='Book Selected Stop(s)'> <br>\";\n\t\t$html = $html.\"<div id='bookingFeedback'> </div>\";\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "7ff40e244e19c6de5bff6c4e3f9e09ea", "score": "0.6385881", "text": "public function showtable(){\n $data = table::orderby('created_at' , 'desc')->paginate(10);\n return view('admin.pages.table')->with([\n 'data' => $data,\n ]);\n\n return view('admin.pages.table');\n }", "title": "" }, { "docid": "d0bb7e3131599c227c43d50f8977093b", "score": "0.63844323", "text": "function show_my_timetable_student($user_id, $db)\n {\n $query = \"SELECT * FROM terminy, kurzy, zapsane_kurzy, uzivatele WHERE zapsane_kurzy.student_ID = '$user_id' AND zapsane_kurzy.Kurzy_ID = kurzy.Kurzy_ID AND zapsane_kurzy.student_ID = uzivatele.Uzivatele_ID AND uzivatele.Uzivatele_ID = '$user_id' AND zapsane_kurzy.Kurzy_ID = terminy.Kurzy_ID ORDER BY terminy.datum ASC\";\n $result = mysqli_query($db, $query);\n if ($result->num_rows > 0) {\n echo \"<b>Vaše termíny:</b>\";\n echo\"<table>\";\n echo\"<tr>\";\n echo\"<th>Zkratka kurzu</th>\";\n echo\"<th>Datum konání termínu</th>\";\n echo\"<th>Čas konání termínu</th>\";\n echo\"<th>Místnost</th>\";\n echo\"<th>Typ termínu</th>\";\n echo\"<th>Doba trvání termínu</th>\";\n echo\"</tr>\";\n while($row = $result->fetch_assoc())\n {\n $course_id = htmlspecialchars($row['Kurzy_ID']);\n $date = htmlspecialchars($row['datum']);\n $time = htmlspecialchars($row['cas']);\n $time_cut = substr($time,0,5);\n $place = htmlspecialchars($row['mistnost_ID']);\n $type = htmlspecialchars($row['typ_termin']);\n $length = htmlspecialchars($row['doba_trvani']);\n if ($length == 0)\n {\n $length = '';\n }\n else\n {\n $length = $length.\" min\";\n }\n echo \"<tr><td><a href='./course?id=$course_id'>$course_id</a></td><td><b>$date</b></td><td><b>$time_cut</b></td><td><b>$place</b></td><td><a href='./event?id=$course_id&d=$date&t=$time&r=$place'>$type</a></td><td><b>$length</b></td></tr>\";\n }\n echo \"</table>\";\n }\n}", "title": "" }, { "docid": "504f3902c6cf8271555294f76c5354b7", "score": "0.6365039", "text": "public function show() {\n date_default_timezone_set('Europe/Copenhagen');\n\n $data = getdate();\n $weekday = $data['weekday'];\n $mday = $data['mday'];\n $month = $data['month'];\n $year = $data['year'];\n $hours = $data['hours'];\n $minutes = $data['minutes'];\n $seconds = $data['seconds'];\n\n $timeString = $weekday;\n $timeString .= ', the ';\n $timeString .= $mday;\n //adjustment for days of the month\n if ($mday == 1 || $mday == 21 || $mday == 31) {\n $timeString .= 'st of ';\n } else if ($mday == 2 || $mday == 22) {\n $timeString .= 'nd of ';\n } else if ($mday == 3 || $mday == 23) {\n $timeString .= 'rd of ';\n } else {\n $timeString .= 'th of ';\n }\n $timeString .= $month;\n $timeString .= ' ';\n $timeString .= $year;\n $timeString .= ', The time is ';\n $timeString .= $hours;\n $timeString .= ':';\n $timeString .= $minutes;\n $timeString .= ':';\n $timeString .= $seconds;\n\n echo '<p>' . $timeString . '</p>';\n }", "title": "" }, { "docid": "79d77fed3da6dbfb02b893cf2f944203", "score": "0.6355477", "text": "public function index()\n\t{\n\t\t$m_ts = $this->m_t->all();\n\n\t\treturn View::make('m_ts.index', compact('m_ts'));\n\t}", "title": "" }, { "docid": "07bb0085a7b738e9403925bda92e3bca", "score": "0.6296789", "text": "function tetap(){\n $this->template->display('klinik/medical_input/index-tetap');\n }", "title": "" }, { "docid": "05f439493104049f114b90cbc2e0566b", "score": "0.6286643", "text": "public function show(time $time)\n {\n //\n }", "title": "" }, { "docid": "45f43feb5fae38c95a929246572d7c6a", "score": "0.6263323", "text": "public function action_show() {\n $this->table = $this->loadTable($_GET['table']);\n require_once './app/views/table/show.php';\n }", "title": "" }, { "docid": "b5df412b4f5e0951f04ba0c0b801dc94", "score": "0.6260566", "text": "public function index()\n {\n $showTimes = ShowTime::fetchPrivateShowTime();\n $movies = Movie::all();\n $tickets = Ticket::all();\n $vouchers = Voucher::all();\n $screens = Screen::all(); \n return view('pages.admin.privateShowTime.viewPShowTimes', compact('showTimes', 'movies', 'tickets', 'vouchers', 'screens'));\n }", "title": "" }, { "docid": "500a05a140c102b43c74bef6e5a65bb6", "score": "0.6204571", "text": "function table_start()\n{\n\t$tbl_start = \"<div class=\\\"movietable\\\"><table>\"\n\t\t. \" <tr>\"\n\t\t. \" <th colspan=\\\"2\\\">&nbsp;</th>\";\n\t\t\n\tif (show_col('title')) $tbl_start .= \" <th>Title</th>\";\n\tif (show_col('rating')) $tbl_start .= \" <th>Rating</th>\";\n\tif (show_col('genre')) $tbl_start .= \" <th>Genre</th>\";\n\tif (show_col('format')) $tbl_start .= \" <th>Format</th>\";\n\tif (show_col('loanee')) $tbl_start .= \" <th>Loaned</th>\";\n\t\n\t$tbl_start .= \" </tr>\";\n\t\n\tprint($tbl_start);\n}", "title": "" }, { "docid": "2720d032ff0c5ada052574961cd122f4", "score": "0.6181792", "text": "public function index()\n {\n $data = $this->shiftsService->getShiftsWithTimeclocksForDate(new \\DateTime());\n\n return $this->render('shifts_display.html.twig', [\n 'shifts' => $data,\n ]);\n }", "title": "" }, { "docid": "0daaa84dc395d04b10f5d98b10b27b21", "score": "0.6176402", "text": "public function view() {\n\t\t\t$formatters = new FormatterIterator();\n\t\t\t\n\t\t\t$this->setPageType('table');\n\t\t\t$this->setTitle(__(\n\t\t\t\t'%1$s &ndash; %2$s',\n\t\t\t\tarray(\n\t\t\t\t\t__('Symphony'),\n\t\t\t\t\t__('Tests')\n\t\t\t\t)\n\t\t\t));\n\t\t\t\n\t\t\t$this->appendSubheading(__('Tests'));\n\t\t\t\n\t\t\t$table = new XMLElement('table');\n\t\t\t$table->appendChild(\n\t\t\t\tWidget::TableHead(array(\n\t\t\t\t\tarray(__('Name'), 'col'),\n\t\t\t\t\tarray(__('Location'), 'col'),\n\t\t\t\t\tarray(__('Description'), 'col'),\n\t\t\t\t\tarray(__('Preview'), 'col')\n\t\t\t\t))\n\t\t\t);\n\t\t\t\n\t\t\tif (!$formatters->valid()) {\n\t\t\t\t$table->appendChild(Widget::TableRow(array(\n\t\t\t\t\tWidget::TableData(\n\t\t\t\t\t\t__('None Found.'),\n\t\t\t\t\t\t'inactive',\n\t\t\t\t\t\tnull, 4\n\t\t\t\t\t)\n\t\t\t\t)));\n\t\t\t}\n\t\t\t\n\t\t\telse foreach ($formatters as $formatter) {\n\t\t\t\t$info = (object)$formatter->about();\n\t\t\t\t$row = new XMLElement('tr');\n\t\t\t\t\n\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\tWidget::Anchor(\n\t\t\t\t\t\t$info->name,\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t'%s/edit/%s/',\n\t\t\t\t\t\t\t$this->root_url,\n\t\t\t\t\t\t\t$formatter->handle\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\tif ($info->{'in-extension'}) {\n\t\t\t\t\t$extension = (object)Symphony::ExtensionManager()->create($info->{'extension'})->about();\n\t\t\t\t\t\n\t\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\t\t$extension->name\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if ($info->{'in-symphony'}) {\n\t\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\t\t__('Symphony'), 'inactive'\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if ($info->{'in-workspace'}) {\n\t\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\t\t__('Workspace'), 'inactive'\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\t\t__('None'), 'inactive'\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($info->description) {\n\t\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\t\t$info->description\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\t\t__('None'), 'inactive'\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$row->appendChild(Widget::TableData(\n\t\t\t\t\tWidget::Anchor(\n\t\t\t\t\t\t'Preview &rarr;',\n\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t'%s/preview/%s/',\n\t\t\t\t\t\t\t$this->root_url,\n\t\t\t\t\t\t\t$formatter->handle\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$table->appendChild($row);\n\t\t\t}\n\t\t\t\n\t\t\t$this->Form->appendChild($table);\n\t\t}", "title": "" }, { "docid": "908106b1b403736f86550a38d3ca8627", "score": "0.61607826", "text": "public function run ()\n {\n echo \"<table class=\\\"\". $this->htmlClass .\"\\\">\";\n \n if ($this->headerFormat != \"none\")\n {\n echo \"<tr>\";\n for ($i=0; $i<7; $i++)\n {\n echo \"<th>\". $this->_dayName ($i) .\"</th>\";\n }\n echo \"</tr>\";\n }\n \n while ($this->_nextDay())\n {\n if ($this->_isRowStart ())\n {\n echo \"<tr>\";\n }\n \n echo \"<td\". $this->_classes () .\"><div class=\\\"day\\\">\". \n $this->_current->format($this->format) . \"</div>\" . \n $this->_current->getHtml() . \"</td>\";\n \n if ($this->_isRowEnd ())\n {\n echo \"</tr>\";\n }\n }\n \n echo \"</table>\";\n }", "title": "" }, { "docid": "1d6a972896350d25770546be80db3fea", "score": "0.61274153", "text": "public function show(Time $time)\n {\n //\n }", "title": "" }, { "docid": "1d6a972896350d25770546be80db3fea", "score": "0.61274153", "text": "public function show(Time $time)\n {\n //\n }", "title": "" }, { "docid": "ee2800e2744ee8be9189e0a3a5bfc6c7", "score": "0.61085236", "text": "public function index()\n {\n $timetables = Timetable::paginate(15);\n return TimetableResource::collection($timetables);\n }", "title": "" }, { "docid": "10aa202e7d1adadda2e796cda9a35a02", "score": "0.6095148", "text": "function make_summary_table() {\n\t\t$table_data_3 = $this->get_the_list_of_the_teams();\n\t\t?>\n\t\t<table border=\"1\" cellpadding=\"10\">\n\t\t\t<tbody>\n\t\t\t<?php foreach ( $table_data_3 as $team ): ?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td><a href= <?php echo $team['url'] ?>> <?php echo $team['title']; ?></a></td>\n\t\t\t\t</tr>\n\n\t\t\t<?php endforeach; ?>\n\t\t\t</tbody>\n\t\t</table>\n\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "19361f5c3e1229d2a41c5b4340d6c7db", "score": "0.60940206", "text": "function getContent(){?>\n\t\t<table><?php\n\t\tforeach($this->activeShows as $show){\n\t\t\t$dateString = date('l, j M Y \\a\\t g:i a',strtotime($show['event_date'])); ?>\n\t\t\t<tr><td><a href=\"/admin/ticketlist/<?php echo $show['event_id']; ?>/<?php echo $this->showKeys[$show['event_id']]; ?>\">Ticket list</a> for <?php echo $show['show_name'] . ' on ' . $dateString; ?></td></tr>\n\t\t\t<?php\n\t\t}\n\t\t?>\n\t\t</table><?php\n\t}", "title": "" }, { "docid": "cc8d0300fda1d6c012a0a86b6ce0f09e", "score": "0.6060313", "text": "abstract public function showCreateTable(string $table);", "title": "" }, { "docid": "da3f269799f96520aa8f9c09945616f6", "score": "0.60579807", "text": "public function show(TQ $TQ)\n {\n //\n }", "title": "" }, { "docid": "d1aabb7f0a6f1421bb166ce3aefe7eb1", "score": "0.6049839", "text": "public static function startTable()\n {\n ?>\n <div id=\"toolbar\">\n <ul>\n <?php\n }", "title": "" }, { "docid": "ed3885f9daa0672a2cdd539117525072", "score": "0.60238767", "text": "public function weekviewAction() {\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$auth->setStorage(new Zend_Auth_Storage_Session('vazneyStorage'));\n\t\tif($auth->getIdentity()) {\n\t\t\t$options['userid'] =(int) $auth->getIdentity()->id;\n\t\t}\n\t\t$calendar = new ZFHtml_WeekTable($options);\n\t\t$this->view->calendar = $calendar->yield();\n\t}", "title": "" }, { "docid": "33ec5805dd0b79107b8636aaf2f12cae", "score": "0.6006734", "text": "function makeTable($schedtimes, $users) {\n\t\techo \"<table border = \\\"1\\\" id=\\\"table\\\">\";\n\t\techo \"<caption><h2> Select your Meeting Times </h2></caption>\";\n\t\techo \"<tr align = \\\"center\\\">\";\n\t\techo \"<th> User </th>\";\n\t\techo \"<th> Action</th>\";\n\t\tforeach ($schedtimes as $onetime):\n\t\t\techo \"<th> . $onetime . </th>\";\t\n\t\tendforeach;\t\n\t\techo \"</tr>\";\n\t\t\n\t\tforeach ($users as $oneuser => $histimes):\n\t\t\techo \"<tr align = \\\" center \\\">\";\n\t\t\techo \"<td>\" . $oneuser . \"</td>\";\n\t\t\tif (isset($_COOKIE[\"user\"][$oneuser])):\n\t\t\t\techo \"<td> <input type=\\\"submit\\\" name = \\\"edit[$oneuser]\\\" value = \\\"Edit\\\" > </td>\";\n\t\t\telse:\n\t\t\t\techo \"<td> </td>\";\n\t\t\tendif;\n\t\t\t$tmpctr = 0;\n\t\t\twhile ($tmpctr < count($schedtimes)):\n\t\t\t\tif (in_array($tmpctr, $histimes)):\n\t\t\t\t\techo \"<td>Y</td>\";\n\t\t\t\telse:\n\t\t\t\t\techo \"<td> </td>\";\n\t\t\t\tendif;\n\t\t\t\t$tmpctr++;\n\t\t\tendwhile;\n\t\tendforeach;\n\n\t \n\t}", "title": "" }, { "docid": "31dc9a7e2bdd213acc984344cd3bf410", "score": "0.59963363", "text": "public function index()\n {\n $this->template->title('Tables');\n $this->template->build('tables');\n }", "title": "" }, { "docid": "0efdade79ad8a3b6633d7ebba3bbacc9", "score": "0.5993788", "text": "function get_time_table_data()\n\t{\n\t $this->load->view('backend/teacher/get_time_table_data', $_POST['class_id'],$_POST['month'],$_POST['week']);\t\t\t\t\t\t\t }", "title": "" }, { "docid": "aeff2342684bae05634d5499e512e142", "score": "0.5991845", "text": "public function indexAction() {\n\t\t$month = $this->getRequest()->getParam('month');\n\t\t$year = $this->getRequest()->getParam('year');\n\t\t$options = array('month'=>$month,'year'=>$year,'action'=>'view/index');\n\t\t$calendar = new ZFHtml_Table($options);\n\t\t$this->view->calendar = $calendar->yield();\n\t}", "title": "" }, { "docid": "6d17aa611274bf8f79f909d41f89d003", "score": "0.59795916", "text": "function displayRunsTable($conn) {\n // get current page number\n if(!isset($_GET['page'])) {\n $page = 1;\n } else {\n $page = $_GET['page'];\n }\n\n // Pagination formula\n $results_per_page = 10;\n $page_first_result = ($page - 1) * $results_per_page; // which result to start on for the current page\n \n // get number of total rows/pages to display\n $stmt = $conn->prepare(\"SELECT count(*) FROM runs WHERE user_id = ?\");\n $user_id = 1;\n $stmt->execute([$user_id]); // TO DO: use user_id variable as argument when different users are accepted\n $number_of_results = $stmt->fetchColumn();\n $number_of_pages = ceil($number_of_results / $results_per_page);\n \n // query records\n $sql = 'SELECT DATE_FORMAT(run_date, \"%a %b. %e\") as run_date, run_type, distance, time_hours, time_minutes, time_seconds, average_pace, id ' \n . 'FROM runs '\n . ' WHERE user_id = 1 '\n . 'ORDER BY DATE_FORMAT(run_date, \"%Y-%m-%d\") DESC '\n . 'LIMIT ' . $page_first_result . ', ' . $results_per_page; // limit # results for pagination\n \n // display records\n foreach($conn->query($sql) as $row) {\n // Display data in table\n echo \"<tr>\", \"<td>\", $row['run_date'], \"</td>\";\n echo \"<td>\", $row['run_type'], \"</td>\";\n echo \"<td>\", $row['distance'], \"</td>\";\n echo \"<td>\", sprintf(\"%02d\", $row['time_hours']), \":\", sprintf(\"%02d\", $row['time_minutes']), \":\", sprintf(\"%02d\", $row['time_seconds']), \"</td>\";\n echo \"<td>\", $row['average_pace'], \"</td>\";\n\n // Display delete/edit buttons\n echo \"<td><form class=delete-form onsubmit='confirmDelete(\" . $row['id'] . \")'>\"; // Delete button\n echo \"<input type='submit' class='delete-button button' value='Delete'></input></form></td>\";\n //echo \"<td><a href='edit.php?id=\", $row['id'], \"'>Edit</a></td></tr>\"; // Edit button - TO DO: make it function\n }\n\n // Display page number buttons\n echo \"<tr><td colspan='6' class='page-number-row'>\";\n \n // previous button\n $previous_disabled = ($page <= 1) ? \"disabled\" : \"enabled\";\n echo \"<a href='index.php?page=\" . ($page - 1) . \"' class='page-number \" . $previous_disabled . \"'>Previous</a>\";\n \n // page number buttons\n for($page_number = 1; $page_number <= $number_of_pages; $page_number++) {\n $current_page = ($page == $page_number) ? \"current-page disabled\" : \"not-current-page\";\n echo \"<a href='index.php?page=\" . $page_number . \"' class='page-number \" . $current_page . \"'>\" . $page_number . \"</a>\";\n }\n \n // next button\n $next_disabled = ($page >= $number_of_pages) ? \"disabled\" : \"enabled\";\n echo \"<a href='index.php?page=\" . ($page + 1) . \"' class='page-number \" . $next_disabled . \"'>Next</a>\";\n echo \"</td></tr>\";\n }", "title": "" }, { "docid": "847cd11f82487fa71c29c66fd3f1e210", "score": "0.59778684", "text": "function display_table () {\n $strname = get_string(\"name\");\n $strsize = get_string(\"size\");\n $strmodified = get_string(\"modified\");\n\n echo \"<table name=\\\"sr_table_name\\\" class=\\\"sr_backup_files\\\">\";\n echo \"<tr>\";\n echo \"<th class=\\\"header name\\\" scope=\\\"col\\\">$strname</th>\";\n echo \"<th class=\\\"header size\\\" scope=\\\"col\\\">$strsize</th>\";\n echo \"<th class=\\\"header date\\\" scope=\\\"col\\\">$strmodified</th>\";\n echo \"</tr>\\n\";\n\n }", "title": "" }, { "docid": "b6e6d04fbdbc642480f755b1b05f7003", "score": "0.5949356", "text": "public function view_schedule(){\n\n $doctor_id = $this->model->doctor_model->get_doctor_id();\n $this->load->view('doctor_dashboard/schedule_view', $this->prepare_schedule($doctor_id));\n }", "title": "" }, { "docid": "c913a074665deac0651ee54ae144be7a", "score": "0.5944665", "text": "function display() {\n echo \"<table cols=\\\"3\\\" style=\\\"font-size:large; font-weight:bold\\\">\";\n echo \"<tr>\"; //open first row\n for ($pos = 0; $pos < 9; $pos++) {\n echo $this->show_cell($pos);\n if ($pos % 3 == 2)\n echo \"</tr><tr>\"; //start a new row for the next square\n }\n echo \"</tr>\"; //close the last row\n echo \"</table>\";\n }", "title": "" }, { "docid": "d412b2d8d41d230fc751014dcee1d7a2", "score": "0.59317094", "text": "public function action_get_custom_timetable()\n {\n $this->auto_render = FALSE;\n $data = $this->request->post();\n echo Model_Schedules::get_custom_timetable($data['selected_days']) ;\n// $this->response->body(json_encode(array('custom_timetable' => $custom_timetable)));\n }", "title": "" }, { "docid": "c853bfe9bec2f6c340a5058b8d53c920", "score": "0.5927384", "text": "function index()\r\n\t{\t\t\r\n\t\t$this->tpl_data += array(\r\n\t\t\t\"current_dts\" => date(\"Y-m-d: h:i:s\"),\r\n\t\t);\r\n\r\n\t\t// Call the display template (/apps/main/views/jqueryexample.php)\r\n\t\t$this->_tpl('jqueryexample');\r\n\t}", "title": "" }, { "docid": "15976b845f77a31cd8eb25630e8b9763", "score": "0.5914213", "text": "public function add_time_schedule()\n {\n return view('master_data.time_schedule.add_time_schedule');\n }", "title": "" }, { "docid": "9f1488a7a571535524d5c8b2f773036b", "score": "0.5913522", "text": "public function index()\r\n {\r\n $data['trip_data'] = $this->trip_model->fetch_trip_list();\r\n template($this, 'trip', $data);\r\n }", "title": "" }, { "docid": "d5133422bd4670f0442bbd330bfa9cff", "score": "0.5909675", "text": "function drawTable($patient, $test, $time,$stid){\n\techo '<table border=\"1\"> <tr>';\n\n\tif(!empty($patient)){\n\t\t//patient header\n\t\techo '<th>Patient name</th>';\n\t}\n\tif(!empty($test)){\n\t\t//Test type header\n\t\techo '<th>Test Type</th>';\n\t}\n\t//Lable the proper time header\n\tswitch($time){\n\t\tcase 'Week':\n\t\t\techo '<th>Week</th>';\n\t\t\tbreak;\n\t\tcase 'Month':\n\t\t\techo '<th>Month</th>';\n\t\t\tbreak;\n\t\tcase 'Year':\n\t\t\techo '<th>Year</th>';\n\t\t\tbreak;\n\t\tcase 'Total':\n\t\t\tbreak;\t\n\t}\n\t//Num Images always exists\n\techo \t'<th>Num Images</th> </tr>';\n\t//Output the data\n\twhile(($row = oci_fetch_array($stid, OCI_ASSOC))) {\n\t\techo '<tr>';\n\t\tforeach($row as $item){\n\t\t\techo '<td>';\n\t\t\techo $item;\n\t\t\techo '</td>';\n\t\t}\n\t\techo '</tr>';\n\t}\n\techo '</table>';\n}", "title": "" }, { "docid": "5da317a46243e931019eca506671af77", "score": "0.58999795", "text": "public function show(Table $table)\n {\n //\n }", "title": "" }, { "docid": "5da317a46243e931019eca506671af77", "score": "0.58999795", "text": "public function show(Table $table)\n {\n //\n }", "title": "" }, { "docid": "5da317a46243e931019eca506671af77", "score": "0.58999795", "text": "public function show(Table $table)\n {\n //\n }", "title": "" }, { "docid": "9516f942a237ef9cdeefba62206200e7", "score": "0.5895782", "text": "function EQ2_DisplayTableData($array, $header, $description, $headers) {\r\r\n\r\r\n $html = '';\r\r\n\r\r\n $html .= '<div class=\"container\"><h2>'.$header.'</h2><p>'.$description.'</p>';\r\r\n $html .= '<table class=\"table\"><thead><tr>';\r\r\n\r\r\n foreach ($headers as $value) {\r\r\n $html .= '<th>'.$value.'</th>';\r\r\n }\r\r\n\r\r\n $html .= '</thead><tbody>';\r\r\n\r\r\n for ( $i=0; $i<count($array); $i++) {\r\r\n\r\r\n $html .= '<tr>';\r\r\n\r\r\n foreach ($array[$i] as $key => $value) {\r\r\n if (isValidTimeStamp($value)) { $html .= '<td>'.gmdate(\"Y-m-d\", $value).'</td>'; }\r\r\n else { $html .= '<td>'.$value.'</td>'; }\r\r\n }\r\r\n }\r\r\n\r\r\n $html .= '</tr></tbody></table></div>';\r\r\n\r\r\n return $html;\r\r\n }", "title": "" }, { "docid": "9e5f23699d1f74c62eb399d13a72247d", "score": "0.588896", "text": "public function index()\n {\n\n $this->add('kiko','Steak','Reis');\n //$this->printBestellungen();\n return $this->mTm();\n\n }", "title": "" }, { "docid": "be855d6c1fa244765811efad3fe8df15", "score": "0.58818084", "text": "function ShowTable($dir, $pics, $camera, $sdatetime, $stadjust, $position, $scale, $pagerow, $pagecol) {\n\tfunction name_sort($a, $b) {\n\t\treturn (strcmp(substr($a, -18), substr($b, -18)));\n\t}\n\n\t// Anything to do?\n\t$pic_count = count($pics);\n\tif ($pic_count <= $position) return (\"Sorry, no images available.\");\n\t\n\t// Sort the the pics by trailing filename timestamp\n\tuksort($pics, \"name_sort\");\n\n\t// Skip any previous elements\n\t$pics = array_slice ($pics, $position);\n\t\n\t// Initialize the output string\n\t$images = \"<br><table border=1 cellpadding=1 cellspacing=0>\";\n\n\t// Build table\n\tforeach ($pics as $fname => $datetime) {\n\t\t$filetime_adj = filemtime($dir . $fname) + $stadjust;\n\t\tif ($position % $pagecol == 0) {\n\t\t\tif ($position != 0) $images .= \"</tr>\";\n\t\t\t$images .= \"<tr>\";\n\t\t}\n\t\t$position++;\n\t\t$images .= \"<td><a href=viewer.php?dir=$dir&img=$fname title=\\\"$fname\\\" style='text-decoration:none'>\";\n\t\t$images .= \"<img src=thumbgen.php?dir=$dir&img=$fname&scale=$scale alt=\\\"$fname\\\" border=0></a>\";\n\t\t$images .= \"<br><font size=-1>\".date(\"m.d H:i:s\", $filetime_adj).\"</font></td>\";\n\t\t\n\t\t// Done with this page?\n\t\tif ($position % ($pagecol * $pagerow) == 0) break;\n\t}\n\t$images .= \"</tr>\";\n\t$images .= \"</table>\";\n\n\t// More pages?\n\t$previousnext = \"\";\n\tif ($position > $pagecol*$pagerow) {\n\t\t$newposition = ceil(($position / ($pagecol*$pagerow)) - 2) * ($pagecol*$pagerow);\n\t\t$previousnext .= \"<a href='?camera=$camera&sdatetime=$datetime&position=$newposition' style='text-decoration:none'>&lt; Prev&nbsp;&nbsp;&nbsp;&nbsp;</a> \";\t\t\n\t} else $previousnext .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\n\tif ($pic_count > $position) {\n\t\t$newposition = min($pagecol*$pagerow, $pic_count - $position);\n\t\t$previousnext .= \"<a href='?camera=$camera&sdatetime=$datetime&position=$position' style='text-decoration:none'>Next $newposition &gt;&nbsp;&nbsp;&nbsp;&nbsp;</a> \";\t\t\n\t}\n\tif ($position + $pagecol*$pagerow < $pic_count) {\n\t\t$newposition = $pic_count - ((($pic_count - 1) % ($pagecol*$pagerow)) + 1);\n\t\t$previousnext .= \"<a href='?camera=$camera&sdatetime=$datetime&position=$newposition' style='text-decoration:none'>Last &gt;&gt;</a>\";\t\t\n\t}\n\t$images = \"<br>$sdatetime($pic_count) $previousnext\" . $images;\n\treturn ($images);\n}", "title": "" }, { "docid": "8555b4f31defd1237a3f5edd571b00d4", "score": "0.58742124", "text": "function opentable()\n {\n echo $GLOBALS['theme_engine']->themetable(true, 1);\n }", "title": "" }, { "docid": "5db2b85bf2dfcb39db308b21ed6b5e98", "score": "0.5872316", "text": "public static function show(){\n $sql=\"SELECT * FROM `monhoc`\";\n $monhoc=DataProvider::executeQuery($sql);\n while($row=mysqli_fetch_array($monhoc)){\n echo \"{$row['MaMH']} and {$row['TenMon']} and {$row['SoTC']}<br>\";\n }\n }", "title": "" }, { "docid": "ffa9510c99d19bb86ef349b1e07493f2", "score": "0.5868178", "text": "public function index()\n {\n //\n// return get_object_vars($this);\n return $this->calendar_table('table table-bordered');\n }", "title": "" }, { "docid": "fb77a8b5c6c7b3de181138cdd95ad7bc", "score": "0.58644825", "text": "public function displayFree2() {\r\n try {\r\n $query = \"select * from freetips_tb Limit 0,10\";\r\n $stmt = $this->connect()->prepare($query);\r\n $stmt->execute();\r\n if ($stmt->rowCount() > 0) {\r\n while ($data = $stmt->fetch(PDO::FETCH_ASSOC)) {\r\n $tabledisplay = '<tr>\r\n <td>' . $data['freetip_id'] . '</td>\r\n <td>' . $data['dataposted'] . '</td>\r\n <td>' . $data['country'] . '</td>\r\n <td>' . $data['club_names'] . '</td>\r\n <td>' . $data['category'] . '</td>\r\n <td></td>\r\n <td><a href=\"$this->getId()\" class=\"btn btn-secondary\"><i class=\"fa fa-angle-double-right\"></i> Details</a></td>\r\n </tr>';\r\n echo $tabledisplay;\r\n }\r\n }\r\n } catch (Exception $ex) {\r\n echo $ex->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "b1d9bde85959f453f9f302d071abab2b", "score": "0.58574736", "text": "public function cetakTabel(){\n $this->html .= $this->endTable();\n echo $this->html;\n }", "title": "" }, { "docid": "5783b287595042b70b18a291e96f30e9", "score": "0.584877", "text": "public function index()\n {\n $listTime = TimeModel::all();\n //$listTime = TimeModel::where('name_specialist','like',\"%$search%\")->paginate(5);\n return view('admin.time.index', [\n \"listTime\" => $listTime,\n // \"search\" => $search\n ]);\n }", "title": "" }, { "docid": "9ffae070e8432cf89027a9d17a3c6934", "score": "0.5836409", "text": "public function indexAction()\n\t{\n\t\t\n\t\t$date = new Zend_Date();\n\t\t$currentDate = $date->get(Zend_Date::DAY);\n\t\t$currentMonth = $date->get(Zend_Date::MONTH);\n\t\t$currentYear = $date->get(Zend_Date::YEAR);\n\t\t$currentHour = $date->get(Zend_Date::HOUR);\n\t\t$currentMinute = $date->get(Zend_Date::MINUTE);\n\t\t\t\n\t\t$today = $currentYear . \"-\" . $currentMonth . \"-\" . $currentDate;\n\t\t$pm = false;\n\t\t\t\n\t\tif($currentHour >= 12)\n\t\t{\n\t\t\t$pm = true;\n\t\t}\n\t\t\t\n\t\t$this->view->fromDate = $today;\n\t\t$this->view->toDate = $today;\n\t\t$this->view->fromHour = 0;\n\t\t$this->fromMinute = 0;\n\t\t$this->view->toHour = $currentHour;\n\t\t$this->view->toMinute = $currentMinute;\n\t\t$this->view->fromPM = false;\n\t\t$this->view->toPM = $pm;\n\t\t$this->view->items = 0;\n\t}", "title": "" }, { "docid": "8700fe3c1202ab57235c7a3d43759627", "score": "0.5788942", "text": "public function viewSchedule() \n {\n // Get all athlete IDs for User's team\n $athletes = Auth::user()->athlete->team->athletes()->get(['athlete_id']);\n\n // Get all future scheduled lifts for team mates\n $schedules = LiftSchedule::whereIn('athlete_id', $athletes)\n ->where([\n ['end_time', '=', null],\n ['start_time', '>=', Carbon::now()]\n ])\n ->orderBy('start_time', 'desc')\n ->with('athlete')\n ->paginate(50);\n\n return view('lifts/schedule-view', compact('schedules'));\n \n }", "title": "" }, { "docid": "4a1c2d97e0e8c841238a01920a590046", "score": "0.57879037", "text": "function dwin_table($title) {\n\t\t\tdwin_table_close();\n\t\t\techo '\n\t\t\t\t<table cellspacing=\"1\" cellpadding=\"2\" align=\"center\" width=\"800\">\n\t\t\t\t<tr><th colspan=\"3\" class=\"dbg_title\">'.$title.'</th></tr>';\n\t\t\t\n\t\t\tglobal $dbg_table_open;\n\t\t\t$dbg_table_open = TRUE; //We have just opened a table, eh?\n\t\t}", "title": "" }, { "docid": "6efc6be87b580b8246751832adee6e1d", "score": "0.5781758", "text": "public function actionIndex()\n {\n $searchModel = new UserTimetableSearch();\n \n $user = \\Yii::$app->user->identity->getUser(); \n /*@var $user \\app\\models\\User */ \n $users = $user->getFamilyUsers();\n \n $searchModel->user_id = array_keys($users);\n \n $dataProvider = $searchModel->search($this->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'types' => UserTimetable::getTypeList()\n ]);\n }", "title": "" }, { "docid": "6003e4a26dadc6ea5b530f2da9390d72", "score": "0.5780587", "text": "function timesheets() {\n $this->template->rander(\"settings/timesheets\");\n }", "title": "" }, { "docid": "2d488c6936d60e9fe278b6ee67311a63", "score": "0.57600945", "text": "public function index() {\n $q = \"SELECT *\n FROM income_tables\n WHERE user_id = \".$this->user->user_id.\"\n ORDER BY modified ASC\";\n\n # Query the database\n $user_tables = DB::instance(DB_NAME)->select_rows($q);\n\n #Pass to view\n $this->template->content = View::instance('v_tables_index');\n $this->template->title = $this->user->first_name.\"'s Tables\";\n\n\n # Pass data to the View\n $this->template->content->user_tables = $user_tables;\n\n # Load JS files relevant to adding tables via form\n $client_files_body = Array(\n \"/js/jquery-2.0.2.js\",\n \"/js/jquery.form.js\",\n \"/js/tables_add.js\"\n );\n\n $this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n # Render template\n echo $this->template;\n //\n\n }", "title": "" }, { "docid": "b3d9a12af698c6f1e227fe1855d5f5a8", "score": "0.5745152", "text": "public function index()\n\t{\n\t\t$data['riwayat']\t\t= $this->db->query(\"select * from riwayatkonsumsi,db_btu where riwayatkonsumsi.ID_BTU = db_btu.ID_BTU order by riwayatkonsumsi.date_time desc\");\n\t\t$this->load->view('databtukonsumsi', $data);\n\t}", "title": "" }, { "docid": "e313b863c2c16bc77115ad98122182d8", "score": "0.5734293", "text": "function print_tutor($index, &$day, $name, $num, $b_year, $b_day, $weekend, $location, $conn)\n{\n\t$color = array('blue', 'green', 'red', 'orange', 'purple');\n\n\tfor( $i=0; $i<$num; $i++ )\n\t{\n\t\t$j = $i % 5;\n\t\tif( $day[$i] >= $index )\n\t\t{\n\t\t\techo \"<font color=\" . $color[$j] . \" size=2>(\" . $name[$i] . \")</font><br>\";\n\t\t\techo \"</td></tr>\";\t// draw table\n\t\t\t\n\t\t\tp_link($b_year, $b_day, $weekend, $index, $location, $conn);\t// call the printing links function\n\t\t\t$day[$i] -= $index;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3556a8454005212d791e50ea8a718792", "score": "0.5733818", "text": "public function showTable()\n\t{\n\t\t$data = [$this->model->data];\n\t\t$data = $this->processData($data);\n\n\t\tif ($data) {\n\t\t\tdebug($this->model->data, $data);\n\t\t\t$s = new slTable($data, 'class=\"nospacing spaceBelow\"');\n\t\t\t$s->thes($this->thes);\n\t\t\t$content = $s->getContent();\n\t\t} else {\n\t\t\t$content = '<div class=\"message\">No data found.</div>';\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "743500c3c7e2b34427940ca3262589eb", "score": "0.5714679", "text": "private function createTable(){\n\n $i = 1; // Must be 1, so the table always starts from 1. Doesn't matter if it's ASC or DESC.\n $data = $this->fetchAllUsersByDate();\n echo \"<table>\";\n echo \"<tr><th>ID</th>\";\n echo \"<th>Username</th></tr>\";\n foreach ($data as $array){\n echo \"<tr><td>$i</td>\";\n echo \"<td>$array[username]</td></tr>\";\n $i++;\n }\n echo \"</table>\";\n\n }", "title": "" }, { "docid": "56ac84d5adf1d99b96f88dcc9880f775", "score": "0.57134306", "text": "public function action_index()\n\t{\n\t\t$config = Kohana::$config->load('trade.lots');\n\n\t\t$lots = ORM::factory('User_Trade')\n\t\t\t->order_by('user_trade.id', 'DESC');\n\n\t\t$paginate = Paginate::factory($lots, $config['pagination'])->execute();\n\n\t\t$this->_tpl = new View_Trades_Index;\n\t\t$this->_tpl->pagination = $paginate->render();\n\t\t$this->_tpl->lots = $paginate->result();\n\t}", "title": "" }, { "docid": "dcf4cd1cb52616824ca136022dabef64", "score": "0.5702901", "text": "public function index()\n {\n return view('admin.schedule.index');\n }", "title": "" }, { "docid": "0482662d119755af0e4e5b84bd925c3f", "score": "0.5692195", "text": "public function getTable(): string {\n $data = $this->getData();\n $output = '<table class=\"world-statistics\">';\n $output .= '<tr class=\"table-header\">';\n // Table header.\n foreach ($data[0] as $key => $value) {\n $class = ['sortable'];\n if ($key == $this->getOrder()) {\n $class[] = 'active';\n $class[] = $this->getDirection() == 'asc' ? 'asc' : 'desc';\n }\n $output .= '<th>';\n $output .= '<a href=\"#\" id=\"' . $key . '\" class = \"' . implode(' ', $class) . '\">' . $key . '</a>';\n $output .= '</th>';\n }\n $output .= '</tr>';\n\n // Table data.\n foreach ($data as $row) {\n $output .= '<tr>';\n foreach ($row as $cell) {\n $output .= '<td>';\n $output .= $cell;\n $output .= '</td>';\n }\n $output .= '</tr>';\n }\n\n $output .= '</table>';\n $output .= '<script src=\"/assets/js/statistics-table.js\"></script>';\n return $output;\n }", "title": "" }, { "docid": "2091288d77c34f29b87abeca4ae2c09b", "score": "0.5688763", "text": "public function show(Overtime $overtime)\n {\n //\n }", "title": "" }, { "docid": "eab62659f133f567b2d6822d9188ecee", "score": "0.5688607", "text": "public function tableExample(){\t\n\t\t$user = JFactory::getUser();\n\t\tif($user->id > 0 ){\n\t\t\t$this->checkUserDashboard();\n\t\t}\n\t\telse{\n\t\t\t//$this->userFormLogin();\t\n\t\t\t$document =& JFactory::getDocument();\n\t\t\t$viewName\t= \"tableExample\";\n\t\t\t//$model = $this->getModel('ZMiUne' , 'Model');\n\t\t\t$viewType\t= $document->getType();\n\t\t\t$view = &$this->getView($viewName, $viewType , 'View');\n\t\t\t//$view->setModel($model , true);\n\t\t\t$view->display();\t\n\t\t}\n\t}", "title": "" }, { "docid": "aeeb344d4c6d38d1fe25e5df0c944868", "score": "0.5687048", "text": "function tableoftime() {\n echo '<table>';\n echo '<tr>';\n\n for($s = 0; $s <= 100; $s++)\n {\n echo '<td>' . $s . '</td>';\n }\n\n for($row = 0; $row <= 100; $row++)\n {\n for($col = 0; $col <= 100; $col++)\n {\n if($col == 0)\n {\n echo '<tr><td>' . $row . '</td>';\n }\n else\n {\n echo '<td>' . $row * $col . '</td>';\n }\n }\n }\n\n echo '</tr>';\n echo '</table>';\n}", "title": "" }, { "docid": "279891ea592255a4fd0e56e0472f3161", "score": "0.5681602", "text": "public function displayTask()\n\t{\n\t\t$filters = array(\n\t\t\t'sort' => trim(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'name'\n\t\t\t)),\n\t\t\t'sort_Dir' => trim(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t))\n\t\t);\n\n\t\t$entries = Application::all();\n\n\t\t// Get records\n\t\t$rows = $entries\n\t\t\t->ordered('filter_order', 'filter_order_Dir')\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('rows', $rows)\n\t\t\t->set('filters', $filters)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "09d6ebee7e7b641ab3be7547864b13b7", "score": "0.56750965", "text": "function TableauChute(){\n\t$sql =\"SELECT * FROM VALUE WHERE ID_SENSOR = 4 AND ID_ROOM = 1 ORDER BY DTIME DESC\";\n\tglobal $conn;\n\t$result = $conn->query($sql);\n\tif ($result->num_rows > 0) {\n echo \"<table><th>La date</th> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<th>Les valeurs de chute</th><br>\";\n while($row = $result->fetch_assoc()) {\n echo \"<tr>\\n\\t<th>\".$row[\"DTIME\"].\"</th>&nbsp;&nbsp;&nbsp;&nbsp;\";\n echo \"\\t<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".$row[\"NUM\"].\"</th>\";\n }\n echo\"</table>\";\n \n } else {\n echo \"0 results\";\n }\n}", "title": "" }, { "docid": "35f720996fb78ef40930c7e8d33385d5", "score": "0.5674856", "text": "function setupTHeaders(){\n\t\t\n\t\t\techo \"<th>Application</th>\";\t\t\t\n\t\t\techo \"<th>Version</th>\";\t\t\t\n\t\t\techo \"<th>Status</th>\";\n\t\t\techo \"<th>Component Type</th>\";\n\t\t\techo \"<th>Request Status</th>\";\n\t\t\techo \"<th>Request Step</th>\";\n\t\t\techo \"<th>Notes</th>\";\n\t\t\t\n\t}", "title": "" }, { "docid": "477a21e1dd9692cf4153001f14f35df3", "score": "0.56657815", "text": "function TableauFour(){\n\t$sql =\"SELECT * FROM VALUE WHERE ID_SENSOR = 5 AND ID_ROOM = 1 ORDER BY DTIME DESC\";\n\tglobal $conn;\n\t$result = $conn->query($sql);\n\tif ($result->num_rows > 0) {\n echo \"<table><th>La date</th> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<th>Les valeurs du four</th><br>\";\n while($row = $result->fetch_assoc()) {\n echo \"<tr>\\n\\t<th>\".$row[\"DTIME\"].\"</th>&nbsp;&nbsp;&nbsp;&nbsp;\";\n echo \"\\t<th>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\".$row[\"NUM\"].\"</th>\";\n }\n echo\"</table>\";\n \n } else {\n echo \"0 results\";\n }\n}", "title": "" }, { "docid": "fb9e8163264d1a4132ddc9b6ec53ef52", "score": "0.5656534", "text": "public function index()\n {\n $date = (new DateTime())->getTimestamp();\n $today = strftime('%d de %B de %Y', $date);\n\n $user = Auth::user();\n $workingHours = WorkingHour::loadFromUserAndDate($user->sibscriber_id, $user->id, date('Y-m-d'));\n\n return view(\"admin.dayRecord\", [\n 'title' => (object) [\n 'icon' => 'icofont-check-alt',\n 'title' => __('custom.titles.dayRecord'),\n 'subtitle' => __('custom.titles.keep-your-point-consistent'),\n ],\n 'user' => Auth::user(),\n 'workingHours' => $workingHours,\n 'today' => $today\n ]);\n }", "title": "" }, { "docid": "2b2cb41ca00e2b64232d72c311d4a570", "score": "0.5653689", "text": "function pn_display_meta_weektime($name, $metas, $title, $trClass = \"\"){\n ?>\n <tr class=\"weekTime <?php echo $trClass; ?>\">\n <td style='width: 100px'><?php echo $title; ?>&nbsp;: </td>\n <td>\n <label>Lundi : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Lundi\", $metas); ?><br/>\n \n <label>Mardi : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Mardi\", $metas); ?><br/>\n \n <label>Mercredi : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Mercredi\", $metas); ?><br/>\n \n <label>Jeudi : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Jeudi\", $metas); ?><br/>\n \n <label>Vendredi : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Vendredi\", $metas); ?><br/>\n \n <label>Samedi : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Samedi\", $metas); ?><br/> \n \n <label>Dimanche : </label>\n <?php pn_display_meta_timeDebutFin($name.\"Dimanche\", $metas); ?><br/> \n </td>\n </tr>\n <?php \n}", "title": "" }, { "docid": "50cadfda3a5ee7308bbc20b5fc94604f", "score": "0.5650512", "text": "function display()\n{\n\t// Make all global variables available here\n\tforeach($GLOBALS as $arraykey=>$arrayvalue) \n\t{\n\t\tif ($arraykey[0]!='_' && $arraykey != \"GLOBALS\")\n\t\t\tglobal $$arraykey;\n\t}\n\t\n\t\n\t\n\t// Retrieve or set the page to list\n\t$pagenum = 1;\n\t$pagenum = (int) xl_get_parameter('page');\n\tif($pagenum == 0)\n\t\t$pagenum = 1;\n\t\n\t// Calculate next and previous page number\n\t$ww_prevpage = $pagenum - 1;\n\t$ww_nextpage = $pagenum + 1;\n\t\n\t// Compute table row cursor offset, offset starts at 0\n\t$ww_nx = $pagenum * $ww_listsize;\n\t\n\t// Build select string for SQL exec\n\tbldselstr(); \n\t\n\t// Store the last used order-by settings: \n\t$ww_program_state['ww_orddir'] = $ww_orddir;\n\t$ww_program_state['ww_ordby'] = $ww_ordby;\n\t$ww_program_state['ww_page'] = $pagenum;\n\t$_SESSION[$pf_scriptname] = $ww_program_state;\n\t\n\t// Build first page of table rows\n\tbldpage(); \n}", "title": "" }, { "docid": "6abffc64f95682c6163d22f0cc4f3473", "score": "0.5649353", "text": "public function index()\n\t{\n\t\t$gracetimes = GraceTime::all();\n\n\t\treturn View::make('grace_times.index', compact('gracetimes'));\n\t}", "title": "" }, { "docid": "c7e117f7cb4edb9aa8f2cd8326456131", "score": "0.5648208", "text": "public function index()\n {\n $undertimes = Undertime::byCreated(Auth::id());\n $uid = Auth::id();\n return view('undertime.index',compact('undertimes','uid'));\n \n }", "title": "" }, { "docid": "b4d37987bede4e21780671d116fe35e8", "score": "0.5642109", "text": "function\tshow_table_header_end()\n\t{\n\t\techo \"</td>\";\n\t\techo \"</tr>\";\n\t\techo \"</table>\";\n\t}", "title": "" }, { "docid": "7c3eea7b8568a5418cb6a58e6708d756", "score": "0.5641192", "text": "function timetableWorkflow ($inputdata){\n\t\t\t\n\t\trequire_once('database.php');\n\t\trequire_once('API_Function.php');\n\t\t\n\t\t$lineID = $inputdata[0];\n\t\t$dirID = $inputdata[1];\n\t\t$optID = $inputdata[2];\t\t\n\t\t$bookingTime = $inputdata[3];\n\t\tdate_default_timezone_set(\"UTC\");\n\t\t$bookingTime = date('Y-m-d H:i:s',strtotime($bookingTime));\t\t\n\t\t$bookingUTCTime = MelToutc($bookingTime);\n\t\t$html = \"\";\n\t\t\n\t\t$check = checkTimetable ($lineID, $dirID, $bookingTime); \n\t\t\n\t\tif($check) {\n\t\t\t$html = displayTimetable($lineID, $dirID, $optID, $bookingTime);\n\t\t} else {\n\t\t\tgenerateTimetable($lineID, $dirID, $bookingUTCTime);\n\t\t\tautoDriverAllocation ($lineID, $dirID, $bookingTime);\n\t\t\t$html = displayTimetable($lineID, $dirID, $optID, $bookingTime);\n\t\t}\n\t\t\n\t\techo json_encode($html);\n\t}", "title": "" }, { "docid": "06e694809436e448d0b7c5bbc74188d2", "score": "0.5641027", "text": "public function show_table_by_date()\n {\n if ($this->input->post('submit')) {\n $date_start = $this->input->post('date_first'); // รับค่าที่userกรอกไป input\n $date_end = $this->input->post('date_secon');\n $data['arr_emp'] = $this->PF->Get_emp_by($date_start, $date_end)->result();\n $data['CHART'] = $this->PF->get_data_chart_by($date_start, $date_end)->result();\n $this->output('performance/v_performance_result', $data);\n }\n }", "title": "" }, { "docid": "6b2d08146959980e975e47470d6cf141", "score": "0.56371474", "text": "function display_tabs( $t )\n\t{\n\t\t$this->page->tabpage = $t;\n\n\t\t$tabimage1 = \"images/tabsla.png\";\n\t\t$tabimage2 = \"images/tabprovisioning.png\";\n\t\t$tabimage3 = \"images/tabfinancial.png\";\n\t\t$tabimage4 = \"images/tabscript.png\";\n\t\t$tabimage5 = \"images/tabmenu.png\";\n\n\t\tswitch ( $this->page->tabpage )\n\t\t{\n\t\tcase\t5 :\n\t\t\t$tabimage5 = \"images/actmenu.png\";\n\t\t\tbreak;\n\t\tcase\t4 :\n\t\t\t$tabimage4 = \"images/actscript.png\";\n\t\t\tbreak;\n\t\tcase\t3 :\n\t\t\t$tabimage3 = \"images/actfinancial.png\";\n\t\t\tbreak;\n\t\tcase\t2 :\n\t\t\t$tabimage2 = \"images/actprovisioning.png\";\n\t\t\tbreak;\n\t\tcase\t1 :\n\t\t\t$tabimage1 = \"images/actsla.png\";\n\t\t\tbreak;\n\t\t}\n\n\t\t/* ------------------- */\n\t\t/* Page Header Section */\n\t\t/* ------------------- */\n\t\tprint \"<input type=hidden value='\".$this->page->tabpage.\"' readonly>\\n\";\n\t\tprint \"<tr><th colspan=6><table border=0><tr>\\n\";\n\t\tprint \"<th class='button'><a href='dashboard.php?action=page1'><img src='\".$tabimage1.\"'></a></th>\\n\";\n\t\tprint \"<th class='button'><a href='dashboard.php?action=page2'><img src='\".$tabimage2.\"'></a></th>\\n\";\n\t\tprint \"<th class='button'><a href='dashboard.php?action=page3'><img src='\".$tabimage3.\"'></a></th>\\n\";\n\t\tprint \"<th class='button'><a href='dashboard.php?action=page4'><img src='\".$tabimage4.\"'></a></th>\\n\";\n\t\tprint \"<th class='button'><a href='dashboard.php?action=page5'><img src='\".$tabimage5.\"'></a></th>\\n\";\n\t\tprint \"</tr></table></th>\\n\";\n\t}", "title": "" }, { "docid": "7cddd4d90c7f8ddc9981f95ac24d9155", "score": "0.56357986", "text": "function dentistView()\r\n {\r\n $result = $this->conn->query($this->sql);\r\n if ($result->num_rows >= 1) {\r\n $this->tableHeadersDentist();\r\n while ($row = $result->fetch_assoc()) {\r\n\r\n echo \"<tr>\r\n <td>\" . $row[\"Room\"] . \"</td>\r\n <td>\" . $row[\"Status\"] . \"</td>\r\n <td id='startTime\" . $row[\"Room\"] . \"'>\" . $row[\"ReadyTime\"] . \"</td>\r\n <td><form method='post'><button type='submit' name=clear\" . $row[\"Room\"] . \" class= 'clear'>Clear</button></form></td>\r\n </tr>\";\r\n }\r\n } else {\r\n $this->tableHeadersUser();\r\n $this->resultStatus = 'No Rooms Added';\r\n }\r\n\r\n echo \"</table>\";\r\n\r\n $this->tableStatus($result);\r\n }", "title": "" }, { "docid": "e693d105c1d5ce18efe60c7065bb4870", "score": "0.5634893", "text": "public function index()\n {\n\n $this->document->setTitle(\"Main page demo\");\n $this->document->setDescription(\"Main page demo\");\n\n $this->assign('current_datetime', new DateTime());\n $this->display();\n }", "title": "" }, { "docid": "2e7baa3c2ce6aa7c197f10fedc7db2ac", "score": "0.5634016", "text": "public function index()\n\t{\n\t\t$this->data['pageTitle'] = 'Homepage';\n\t\t// this is the view we want shown\n\t\t$this->data['pagebody'] = 'homepage';\n\t\t$this->data['days'] = $this->timetable->getDays();\n\t\t$this->data['periods'] = $this->timetable->getPeriods();\n\t\t$this->data['courses'] = $this->timetable->getCourses();\n\t\t$this->data['dayDDL'] = form_dropdown('day', $this->timetable->getWeekDays());\n $this->data['timeDDL'] = form_dropdown('time', $this->timetable->getTimeslots());\n $this->data['error'] = \"\";\n $this->data['bingo'] = \"\";\n $this->data['results'] = \"\";\n\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "23db6b1ac3ac0625d316133c8fe1c138", "score": "0.5632067", "text": "public function question_table(\\stdClass $openwebinar) {\n global $OUTPUT, $PAGE, $CFG;\n\n require_once($CFG->libdir . '/tablelib.php');\n\n $table = new \\mod_openwebinar\\table\\questions('outstation-list-table', $openwebinar);\n echo $OUTPUT->heading(get_string('text:question_table', 'openwebinar'));\n\n echo '<hr/>';\n\n $table->set_attribute('cellspacing', '0');\n $table->set_attribute('class', 'admintable generaltable');\n $table->initialbars(true); // Always initial bars.\n $table->define_columns(array(\n 'question_name',\n 'question_comment',\n 'question_type',\n 'action'\n ));\n\n $table->define_headers(array(\n get_string('heading:question_name', 'openwebinar'),\n get_string('heading:question_comment', 'openwebinar'),\n get_string('heading:question_type', 'openwebinar'),\n get_string('heading:action', 'openwebinar'),\n ));\n\n $table->no_sorting('action');\n $table->sortable(true, 'question_name', SORT_DESC);\n $table->define_baseurl(new moodle_url($PAGE->url, $PAGE->url->params()));\n $table->collapsible(false);\n $table->out(self::DEFAULT_TABLE_ROW_COUNT, true);\n }", "title": "" } ]
b70775277fdcc57fc35fe32d96c2675b
Creates a error message
[ { "docid": "6cf86c04a7e55d09b91923ba3234a65d", "score": "0.0", "text": "public function error(string $message): Message {\n $this->type = CONF_MESSAGE_ERROR;\n $this->icon = CONF_MESSAGE_ICONS[\"icon-error\"];\n $this->text = $this->filter($message);\n return $this;\n }", "title": "" } ]
[ { "docid": "8122ba68c8acb4be429c0d545bcf5b1e", "score": "0.7500433", "text": "public function createGenericErrorMessage(): string\n {\n return (string)__('Something went wrong while processing your order. Please try again later.');\n }", "title": "" }, { "docid": "19c2045640cfb5859528b97eb72da06b", "score": "0.7187642", "text": "protected function getCreationError(): string\n {\n return 'the file ' . basename($this->getPath()) . ' already exists';\n }", "title": "" }, { "docid": "30486fc11f1f568d5783aa7004c56c7f", "score": "0.69061816", "text": "public function errormessage() {\n \n }", "title": "" }, { "docid": "5861d4db533db5f2bc3d6b0432a96924", "score": "0.68662006", "text": "public function toString()\n {\n return 'Correct error message is displayed.';\n }", "title": "" }, { "docid": "7c64cc0224413d705d7cb2c9cca7033d", "score": "0.6803708", "text": "function makeError($message) {\n\treturn ['error' => $message];\n}", "title": "" }, { "docid": "b9305da8f276931b73c5489a9be941a3", "score": "0.67965186", "text": "public function get_error_message()\n {\n }", "title": "" }, { "docid": "026840b5b51507970e2ed5a3d5033511", "score": "0.6750321", "text": "function generate_error($errorStr) {\n\t\treturn array(\n\t\t\t\t'status' => 'error',\n\t\t\t\t'message' => $errorStr\n\t\t);\n\t}", "title": "" }, { "docid": "9ec5da5d297b83fa13a8de739e2d8c3e", "score": "0.666843", "text": "public function getMessage(): string\n {\n return \"The $this->name field must be accepted.\";\n }", "title": "" }, { "docid": "84a23e6209e4e60fc11679caf01917d1", "score": "0.6653099", "text": "public function getFailureMessage() {\n\t\treturn \"%1\\$s must be a minimum of {$this->minimum} characters.\";\n\t}", "title": "" }, { "docid": "dff9125900b6071886f7f7564ee12c82", "score": "0.65739346", "text": "public function error(): string\n {\n return sprintf(\n 'expected a value to be an instance of %s, instead got %s',\n static::typeToString($this->expected),\n static::typeToString($this->actual)\n );\n }", "title": "" }, { "docid": "3c4020c8c74dd47d0f3789cabe6e271e", "score": "0.6571826", "text": "private function buildErrorMsg($msg)\r\n {\r\n $this->error_msg .= '<div style=\"line-height:30px;border-radius:5px;border-bottom:1px solid #ac2925;background-color: #c9302c;margin:10px auto;\"><p style=\"color:#fff;text-align:center;font-size:16px;margin:0\">' . $msg . '</p></div>';\r\n }", "title": "" }, { "docid": "b9a6f0e63a34b9865065b8b3b3cf7f46", "score": "0.6536093", "text": "function msgFailureCreate($path)\n{\n return 'Object ' . msgWrap($path) . ' is not created.';\n}", "title": "" }, { "docid": "70b554bdca6786ea924c4015f3e2af1e", "score": "0.65078413", "text": "public static function createErrorMessage(string $baseMessage, string $path = null, array $parameters = []): string\n {\n $errorMessage = $baseMessage;\n if ($path !== null) {\n $errorMessage .= sprintf(\n static::PATH_MESSAGE,\n $path,\n Query::build($parameters)\n );\n }\n return $errorMessage;\n }", "title": "" }, { "docid": "9ab7e4a5f335c816d95a5a4fba6b1ab7", "score": "0.6495322", "text": "public function message()\n {\n return \"The validation error message.\";\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.6455926", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "4d8ac99816178399a9f036adabd07ec7", "score": "0.64537156", "text": "private function _buildErrorMessage($body)\n {\n $errorMessage = null;\n if ($body['error']['code'] == self::RESPONSE_CODE_INVALID_JSON_REQUEST\n || $body['error']['code'] == self::RESPONSE_CODE_INVALID_API_CREDENTIALS\n || $body['error']['code'] == self::RESPONSE_CODE_PARAMETER_VALIDATION_ERROR\n ) {\n $errorMessage = __('Your order cannot be confirmed, please try again.') .\n ' ' . __('If you keep getting this error please report it to us.');\n } else {\n $errorMessage = $body['error']['code'] . ': ' . $body['error']['message'];\n if (!empty($body['error']['processor_status'])) {\n $errorMessage = __('Your payment was rejected - ') . $errorMessage;\n } else {\n $errorMessage = __('Payment error - ') . $errorMessage;\n }\n }\n if($errorMessage){\n $this->vendoHelpers->log('Payment Error: ' . $errorMessage, LogLevel::ERROR);\n $errorMessage = self::GENERIC_ERROR_MESSAGE;\n }\n\n return __($errorMessage);\n }", "title": "" }, { "docid": "119a3d036103095de96c58c7fa0608b0", "score": "0.6442305", "text": "function getErrorMessage()\n {\n $message = \"<h3>Error</h3>\".$this->message.\"<br>\";\n $message .= \"<ul>\";\n foreach ($this->suggestedSolutions() as $solution) {\n $message .= \"<li>\".$solution;\n }\n $message .= \"</ul>\";\n return ($message);\n }", "title": "" }, { "docid": "55ec6544641ce43825298feef5b3e526", "score": "0.642566", "text": "abstract public function getErrorMessage();", "title": "" }, { "docid": "9f5d02daaaf28a480c5bc25e2945ab73", "score": "0.64247787", "text": "function generateError($reason){\n return \"{\\\"error\\\":\\\"true\\\", \\\"message\\\":\\\"\".$reason.\"\\\"}\";\n}", "title": "" }, { "docid": "1c4c43ab5aa7f43d9c7c7461b52929da", "score": "0.6415451", "text": "function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "5a8593e958a172cf9ef128a9f4e48642", "score": "0.6385514", "text": "private function createErrorMessage(array $responseData, string $defaultMessage): string\n {\n if (isset($responseData['statusCode'], $responseData['statusText'])) {\n return sprintf('%s (Error %s)', $responseData['statusText'], $responseData['statusCode']);\n }\n if (isset($responseData['code'], $responseData['detail'])) {\n return sprintf('%s (Error %s)', $responseData['detail'], $responseData['code']);\n }\n return $defaultMessage;\n }", "title": "" }, { "docid": "1cff148abefd2ffe69a922fe564fbafd", "score": "0.63836664", "text": "function createErrorObject(){\n $val = \"lang:'\" . lang('g.lang') . \"',\" .\n \"error:'\" . lang('g.error') . \"',\" .\n \"error_send:'\" . lang('g.error_send') . \"',\" .\n \"invalid_email:'\" . lang('g.invalid_email') . \"',\" .\n \"blank_pass:'\" . lang('g.blank_pass') . \"',\" .\n \"ban:'\" . lang('g.ban'). \"',\" .\n \"wrong_data:'\" . lang('g.wrong_data'). \"',\" .\n \"edit_info:'\" . lang('g.edit_info'). \"',\" .\n \"warning:'\" . lang('g.warning'). \"',\" .\n \"sel_sex:'\" . lang('g.sel_sex'). \"',\" .\n \"blank_name:'\" . lang('g.blank_name'). \"',\" .\n \"blank_surname:'\" . lang('g.blank_surname'). \"',\" .\n \"pass_length:'\" . lang('g.pass_length'). \"',\" .\n \"pass_match:'\" . lang('g.pass_match'). \"',\" .\n \"sel_birth:'\" . lang('g.sel_birth'). \"',\" .\n \"blank_cap:'\" . lang('g.blank_cap'). \"',\" .\n \"email_using:'\" . lang('g.email_using'). \"',\" .\n \"wrong_cap:'\" . lang('g.wrong_cap'). \"',\" .\n \"sign_failed:'\" . lang('g.sign_failed') .\"',\" .\n \"error_update:'\" . lang('g.error_update') . \"',\" . \n \"fail_update:'\" . lang('g.fail_update') . \"',\" .\n \"success_update:'\" . lang('g.success_update') . \"',\" .\n \"error_occurred:'\" . lang('g.error_occurred') . \"',\" .\n \"refresh:'\" . lang('g.refreshPage') . \"',\" .\n \"enter_int:'\" . lang('g.enter_int') .\"'\";\n\n return $val;\n }", "title": "" }, { "docid": "d15457c21092d836ede89ef4782b7d51", "score": "0.63722676", "text": "public function message()\n {\n return 'Validation Error';\n }", "title": "" }, { "docid": "03a3549c301cdaaaf9e417e9831db4cc", "score": "0.63424456", "text": "public function getErrorMessage() {\n return $this->error_message . \"<br><br>\"; \n }", "title": "" }, { "docid": "69ab146fff013275c509ee8928cc88be", "score": "0.63388705", "text": "public function getFormattedErrorMessage() {\n\t\treturn '[' . $this->code . '] ' . $this->message;\n\t}", "title": "" }, { "docid": "bcd1be6a179dd5f114c0790b841977b3", "score": "0.6330368", "text": "protected function getErrorMessage(): string\n {\n return str_replace(['{minFileSize}', '{maxFileSize}'], [$this->minFileSize, $this->maxFileSize], $this->message);\n }", "title": "" }, { "docid": "3bc4ff529936393ea9a191d80b289bf1", "score": "0.63176936", "text": "function __errormsg($msg)\n{\n return \"<div style='color:#F44;line-height:20px;margin-bottom:10px;'>Error: {$msg}</div>\";\n}", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.6314999", "text": "public function getErrorMessage();", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.6314999", "text": "public function getErrorMessage();", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.6314999", "text": "public function getErrorMessage();", "title": "" }, { "docid": "3781a037c21fc7e7218c3176f42c0c81", "score": "0.6307434", "text": "public function message()\n {\n return 'The value you have entered is invalid.';\n }", "title": "" }, { "docid": "6a86a221d46b721bd9a1810058b3ded5", "score": "0.62898386", "text": "public function toString()\n {\n return 'Correct specify search term error message is displayed.';\n }", "title": "" }, { "docid": "bc945f939bb9c6c6c997d739bb24393b", "score": "0.625397", "text": "abstract public function addErrorMessage($message);", "title": "" }, { "docid": "5549b1be7e743e8bbd198b9fdab46684", "score": "0.62455845", "text": "public function getErrorMessage()\n {\n return '';\n }", "title": "" }, { "docid": "bab50d491c8eddc4e01f20d2c830570b", "score": "0.6241127", "text": "function tqb_create_frontend_error_message( $text ) {\n\t$html = '';\n\tforeach ( $text as $error ) {\n\t\t$html .= '<div class=\"tqb-frontend-error-message-individual\"><p class=\"tqb-error-message\"><span>' . __( 'Error:', 'thrive-quiz-builder' ) . ' </span> ' . $error . '</p></div>';\n\t}\n\n\treturn $html;\n}", "title": "" }, { "docid": "5243b09e94da5d07d5690e85c067f5d1", "score": "0.62288547", "text": "function set_error_msg( $message ) {\n\t\t\t// Replace the space between the last two words with &nbsp; to prevent typographic widows\n\t\t\t$message = preg_replace( '/\\s([\\w]+[.,!\\:;\\\\\"-?]{0,1})$/', '&nbsp;\\\\1', $message, 1 );\n\n\t\t\t$this->error_message = $message;\n\n\t\t\treturn $this->error_message;\n\t\t}", "title": "" }, { "docid": "995a132a0a5b69009946d462f9e84d03", "score": "0.6218261", "text": "public function message()\n {\n return ':attribute 格式不正确.';\n }", "title": "" }, { "docid": "93f75109c124eafebb57126536af876a", "score": "0.62171006", "text": "public function getErrorMessage ();", "title": "" }, { "docid": "50dece3249511e9f90392a4e7acf3f69", "score": "0.6213894", "text": "public function message()\n {\n return 'Invalid email address.';\n }", "title": "" }, { "docid": "5cc85767385475419fa7fb57d48d7af7", "score": "0.6192318", "text": "public function message()\n {\n return 'This CNP is not valid!';\n }", "title": "" }, { "docid": "d60168f8dd383856caf91d8d4798aa3c", "score": "0.61914456", "text": "public function message()\n {\n return trans('projects.errorsValidations.name.uniqueName',['name' => $this->nameCompuest]);\n }", "title": "" }, { "docid": "2aa27a1f54b18c10a9e849cffd9edfa7", "score": "0.6168733", "text": "public function message()\n {\n return 'Komentar yang akan dibalas tidak valid.';\n }", "title": "" }, { "docid": "7de89d54d0436d52ddcccd9754c887dd", "score": "0.6163951", "text": "function format_input_error($error_message){\n [ $error_message , $error_code , $field_name ] = get_error_field( $error_message);\n $errors = construct_error( 400, $error_code , $error_message, $field_name);\n return $errors;\n }", "title": "" }, { "docid": "ab9f614614ff738179a195bf01b26b1a", "score": "0.6154676", "text": "public static function error()\n {\n if (self::get('error_message'))\n {\n foreach (self::get('error_message') as $error)\n {\n return '<div class=\"errormsg\">'.$error.'</div>';\n }\n }\n }", "title": "" }, { "docid": "4de19e6ed42425f007888d4709e8d413", "score": "0.61541677", "text": "public function message()\n {\n return 'The :attribute must be a valid CU email.';\n }", "title": "" }, { "docid": "1510fb06eb534416bb6491fd47b5313c", "score": "0.615076", "text": "function getMessage()\n\t{\n\t\treturn $this->errorMsg;\n\t}", "title": "" }, { "docid": "109bac46d9dd36b4456ca6fcf924b1fd", "score": "0.6140193", "text": "public static function errormessage($message) {\r\n\t\treturn '<div class=\"ui-widget\"><div class=\"ui-state-error ui-corner-all\" style=\"padding: 0 .7em;\"><p><span class=\"ui-icon ui-icon-alert\" style=\"float: left; margin-right: .3em;\"></span><strong>Alert:</strong>' . $message . '</p></div>';\r\n\t}", "title": "" }, { "docid": "8af2eead2111483fe56ea3cd706d916a", "score": "0.61367667", "text": "public function createMessage();", "title": "" }, { "docid": "33ea384141e7ebfcbd2347f9d186f394", "score": "0.6134131", "text": "function _error_message()\n\t{\n\t\tif (($error = ibase_errmsg()) == FALSE)\n\t\t\treturn \"\";\n\t\treturn $error;\n\t}", "title": "" }, { "docid": "85168d19fe1a5008da5d4d8ae55c829d", "score": "0.6133501", "text": "public function message()\n {\n return 'The provided image is not valid';\n }", "title": "" }, { "docid": "0f4dd196f7662905b063e5f351f2fa6c", "score": "0.61322975", "text": "public function toString()\n {\n return 'Error message is visible.';\n }", "title": "" }, { "docid": "342c678feb2a17af03d800f9fc7865d4", "score": "0.6126099", "text": "function get_error($code = '') {\n\tglobal $vibe_options;\n\tif(isset($vibe_options['disable_errors']) && $vibe_options['disable_errors']){return '';}\n\t $errorMessage ='<div class=\"alert alert-block\"><span class=\"error\"></span><button type=\"button\" class=\"close\" data-dismiss=\"alert\">×</button>';\n\t\t$errorMessage .= $this->errors->get_error_message($code);\n\t\tif ($errorMessage == null) {\n\t\t\treturn __(\"Unknown error.\", 'vibe');\n\t\t}\n\t\t$errorMessage .= ' ..<a href=\"http://vibethemes.com/forums/showthread.php?883-Error-Notices&p=2392\" target=\"_blank\">more..</a></div>';\n\t\treturn $errorMessage;\n\t}", "title": "" }, { "docid": "bef8eaa142f97c5027c62a20f809ef70", "score": "0.6124342", "text": "public function message()\n {\n return 'Invalid Cep.';\n }", "title": "" }, { "docid": "feac726049817db93852141e3a6542ef", "score": "0.61200774", "text": "protected function buildNotFoundExceptionMessage()\n {\n return $this->getTemplate() . \n $this->getTemplateExtension() . \n ' not found in any context. Controller = ' . \n $this->getController() . \n ' Action = ' . \n $this->getAction();\n }", "title": "" }, { "docid": "cf4ad1c2647d425915e6eb5779d3b269", "score": "0.61137784", "text": "public function createError($reason = NULL)\n\t{\n\t\tif( $this->verbose)\n\t\t{\n\t\t\tif( !is_null($reason) )\n\t\t\t\tthrow new mysqlClass_Create_Exception(self::MESSAGE_CREATE . \", reason: \" . strtolower($reason));\n\n\t\t\tthrow new mysqlClass_Create_Exception(self::MESSAGE_CREATE);\n\t\t}\n\n\t\tif( !is_null($reason) )\n\t\t{\n\t\t\t$this->printError(self::MESSAGE_CREATE . \", reason: \" . strtolower($reason));\n\t\t\treturn;\n\t\t}\n\n\t\t$this->printError(self::MESSAGE_CREATE . \"!\");\n\t}", "title": "" }, { "docid": "ef59b0c2a747412e6fd90fad337cb2fb", "score": "0.6111117", "text": "function error_msg($message) {\n\t\t$date = date(\"D M j G:i:s T Y\", time());\n\t\t$message .= \"\\n\\nThe following input was received from (and sent back to) PayPal:\\n\\n\";\n\t\twhile( @list($key,$value) = @each($this->paypal_post_vars) ){\n\t\t\t$message .= $key . ':' . \" \\t$value\\n\";\n\t\t}\n\t\t$message .= \"\\n\\n\" . $this->url_string . \"\\n\\n\" . $this->paypal_response;\n\n\t\t//send error email\n\t\tif( $this->error_email ){\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t\t$headers .= \"From: \".$this->fromemail.\"\\r\\n\";\n\t\t\t//mail($this->error_email, $date.\"<br/>\"$message, $headers);//Please uncomment of you need to send email,if error occured.\n\t\t}//End send error email\n\n\t\t// write error to file?\n\t\t$handle = fopen($this->filepath.\"/error_log_file.txt\", \"w+\");\n\t\tfwrite($handle, $message);\n\t\tfclose($handle);\n\t\texit;\n\t}", "title": "" }, { "docid": "5a62b34960d197f6d0ea4153d16ed72c", "score": "0.6110808", "text": "protected function generate_error($ex) {\n if ($this->restformat == 'json') {\n $errorobject = new stdClass;\n $errorobject->exception = get_class($ex);\n $errorobject->errorcode = $ex->errorcode;\n $errorobject->message = $ex->getMessage();\n if (debugging() and isset($ex->debuginfo)) {\n $errorobject->debuginfo = $ex->debuginfo;\n }\n $error = json_encode($errorobject);\n } else {\n $error = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.\"\\n\";\n $error .= '<EXCEPTION class=\"'.get_class($ex).'\">'.\"\\n\";\n $error .= '<ERRORCODE>' . htmlspecialchars($ex->errorcode, ENT_COMPAT, 'UTF-8')\n . '</ERRORCODE>' . \"\\n\";\n $error .= '<MESSAGE>'.htmlspecialchars($ex->getMessage(), ENT_COMPAT, 'UTF-8').'</MESSAGE>'.\"\\n\";\n if (debugging() and isset($ex->debuginfo)) {\n $error .= '<DEBUGINFO>'.htmlspecialchars($ex->debuginfo, ENT_COMPAT, 'UTF-8').'</DEBUGINFO>'.\"\\n\";\n }\n $error .= '</EXCEPTION>'.\"\\n\";\n }\n return $error;\n }", "title": "" }, { "docid": "5e030d199197b1700219aeae87fdf2f6", "score": "0.60985196", "text": "public function message()\n {\n switch($this->type)\n {\n case 0:\n return 'new password cannot be the same as old pasword';\n break;\n case 1:\n return 'password has no number';\n break;\n case 2:\n return 'password has no lower case letter';\n break;\n case 3:\n return 'password has no upper case letter';\n break;\n case 4:\n return 'password has no special characters';\n break;\n case 5:\n return 'password must be at least 8 characters';\n break;\n }\n \n }", "title": "" }, { "docid": "cac98fa0f0cde2c433694762631cfdd9", "score": "0.60880995", "text": "function yp_err_string($errorcode) {}", "title": "" }, { "docid": "e829bdd29ea74cf964527dd4b5778c11", "score": "0.60793304", "text": "static public function GetErrorMessage() {\n return (isset(self::$errormessage))?self::$errormessage:\"\";\n }", "title": "" }, { "docid": "98c75d2873e757b6bc6766bc0f42a6f4", "score": "0.60755646", "text": "public function message()\n {\n return 'The given IMDb Id is not valid. It must be in following format (example): tt1234567';\n }", "title": "" }, { "docid": "96adb42e7ec6131ab186d5e980deb42f", "score": "0.60734296", "text": "public function get_error_message ()\n {\n return $this->_errmsg;\n }", "title": "" }, { "docid": "6a8bcc13d90eb835983d4fb054d08370", "score": "0.6072047", "text": "public function showError($msgError){\n echo \"<h1>ERROR!</h1>\"; //imprimo \"ERROR!\"\n echo \"<h2>{$msgError}</h2>\"; //imprimo el mensaje de error que me fue pasado por parámetro\n}", "title": "" }, { "docid": "0e1ece2670b6f133d3f48cf25969febc", "score": "0.60643977", "text": "public function message()\n {\n return 'The :attribute must be '.$this->size.' character(s).';\n }", "title": "" }, { "docid": "2d59301bba046c813f74d8e112424c1e", "score": "0.60608643", "text": "function createMessage();", "title": "" }, { "docid": "a0a68590466f5a64f5556c2a60c44554", "score": "0.6057664", "text": "public function message()\n {\n return 'Invalid Recipient.';\n }", "title": "" }, { "docid": "526303893f3859f269acbc06f48e1dc2", "score": "0.60530293", "text": "public function message()\n {\n return 'Category is not valid!';\n }", "title": "" }, { "docid": "d30beeb4a93ec452b6cc9b270d0842da", "score": "0.6040807", "text": "public function message()\n {\n return 'The IC number is invalid. Invalid';\n }", "title": "" }, { "docid": "4a2c9b3d1a11efa1e2cf08669cb880a6", "score": "0.60396665", "text": "public static function strError(int $errorNum):string;", "title": "" }, { "docid": "216282f48ad794e36d607d9a8401269d", "score": "0.6038965", "text": "public function message()\n {\n return ':attribute format is wrong';\n }", "title": "" }, { "docid": "4d582032b3c8029bdd7acd51eb892788", "score": "0.6038662", "text": "function errorMsg($msg)\r\n {\r\n return \"<div class=\\\"errorMsg\\\">$msg</div>\";\r\n }", "title": "" }, { "docid": "80d238525c2125111629f1f2eac7e7bf", "score": "0.60384613", "text": "public function message() {\n return 'Значение должно быть датой или текстом \":valid_text\"';\n }", "title": "" }, { "docid": "7e03f664543df44b87e855081b39b0f1", "score": "0.60363996", "text": "public function getErrorMessage()\n\t{\n\t\t$html = \"<p>Det du sökte på gav inga träffar. Du måste söka på en blogg från blogg.se.</p>\";\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "16483335c3485b9cd0d1524e074ba4c9", "score": "0.6030283", "text": "private function generateErrorMessages(): array\n {\n return array_merge([\n 'triggers.*.required' => 'Trigger field is required.',\n 'triggers.*.string' => 'A trigger must be a string.',\n ], $this->handler->errorMessages());\n }", "title": "" }, { "docid": "5222e10ffbc6f3b839b0bc597f60d8fb", "score": "0.60254544", "text": "function _errstr($message)\r\n {\r\n\r\n return sprintf(\r\n $this->_error_pattern\r\n , $message\r\n );\r\n\r\n }", "title": "" }, { "docid": "6293a81ef7d4e465dba9592465581d0b", "score": "0.60221934", "text": "function construct_error($status , $code , $message, $field) {\n $fields = explode(\"|\",$field);\n if( count($fields)==1) {\n $fields = $field;\n }\n return [\n \"status\"=>$status,\n \"code\"=>$code,\n \"message\"=>$message,\n \"field\"=>$fields\n ];\n }", "title": "" }, { "docid": "6b7fbd96a3bf1f1bbf23678ad7b80ef1", "score": "0.60127443", "text": "public static function response_message_error() {\n\t\treturn _t('Transport.Messages.Error', 'Error');\n\t}", "title": "" }, { "docid": "e0d8e6380b87c780c07a5a3d1f005fb2", "score": "0.59997517", "text": "public function message()\n {\n return 'The ISBN is not valid.';\n }", "title": "" }, { "docid": "b636bfba275d3b9e559b5c5cceeafa83", "score": "0.5986497", "text": "public function message()\n {\n return $this->emailValidator->getError()->getMessage();\n }", "title": "" }, { "docid": "ea4ea4b8be59edc570036c92c3da2f81", "score": "0.59855145", "text": "function error_string($error_code) {}", "title": "" }, { "docid": "7d8ef18657340cf3044150ee6df1db3f", "score": "0.59853184", "text": "public function message()\n {\n return 'The diff_time format is invalid. The diff_time format accepts only a positive number.';\n }", "title": "" }, { "docid": "877e73f952829b02b29912da6cd81518", "score": "0.59777814", "text": "public function getError(): string\n {\n $errorMessage = '';\n\n if (isset($this->errorMessage)) {\n $errorMessage = $this->errorMessage;\n }\n\n return $errorMessage;\n }", "title": "" }, { "docid": "c2a13f3ba4fb05f43ba0673b53fbaed0", "score": "0.59733284", "text": "public function Error($message);", "title": "" }, { "docid": "8813782a5929f69b21d418cd40cbbddd", "score": "0.59685624", "text": "public function message()\n\t{\n\t\tif ($this->actionType->field_type === 'button') {\n\t\t\treturn 'The :attribute cannot be present.';\n\t\t}\n\t\treturn 'The :attribute is required.';\n\t}", "title": "" }, { "docid": "c7aee753a726fe70fb0a6428f098d480", "score": "0.59636664", "text": "public function buildTextFormatterErrorMessage(string $platform, string $message) : OpenDialogMessages;", "title": "" }, { "docid": "33c4ec69645fef1f1bf013a9486c7208", "score": "0.59561914", "text": "public function error_string() {\n if ($this->subtype == self::SUBTYPE_UNKNOWN_ERROR) {\n return $this->addinfo;\n }\n $a = new stdClass;\n $a->linefirst = $this->position->linefirst;\n $a->linelast = $this->position->linelast;\n $a->colfirst = $this->position->colfirst;\n $a->collast = $this->position->collast;\n $a->addinfo = $this->addinfo;\n return get_string($this->subtype, 'qtype_preg', $a);\n }", "title": "" }, { "docid": "1a6eb257561ee897a8016d16c3c3f9f1", "score": "0.5955907", "text": "public function createError($message, $code = BAD_REQUEST)\n {\n if (!headers_sent()) {\n $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ?\n $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');\n header($protocol . \" \" . $code);\n }\n $this->createResponse(array('error' => $message));\n }", "title": "" }, { "docid": "331756d7407a93281aa5d8291cc28cb5", "score": "0.5955394", "text": "public static function min_error_message($field, $min_length)\n {\n return \"Minimum length of {$field} is {$min_length} characters.\";\n }", "title": "" }, { "docid": "63b9422adc9959cd09a376b1386ca128", "score": "0.595463", "text": "public function toString()\n {\n return 'Fail message is displayed.';\n }", "title": "" }, { "docid": "0c33e026fd2ccab73df31da78ba5736a", "score": "0.5953377", "text": "public function message()\n {\n $message = null;\n\n switch ($this->error) {\n case self::NOT_FOUND:\n $message = 'This user does not exist.';\n break;\n case self::ALREADY_IN_A_TEAM:\n $message = 'This user already has a team.';\n break;\n }\n\n return $message;\n }", "title": "" }, { "docid": "1c9a2edaa82aaf52acecb455110945b1", "score": "0.59458244", "text": "public function message()\n {\n return 'The name has already been taken!';\n }", "title": "" }, { "docid": "3665372cca2a4ad73bc282985481f98c", "score": "0.59410596", "text": "public function validationError(PropertyValidatorInterface $validator): string\n {\n $exceptionConstructor = sprintf(\n 'new \\%s($value ?? null, ...%s)',\n $validator->getExceptionClass(),\n preg_replace('/\\'&(\\$\\w+)\\'/i', '$1', var_export($validator->getExceptionParams(), true))\n );\n\n if ($this->generatorConfiguration->collectErrors()) {\n return \"\\$this->_errorRegistry->addError($exceptionConstructor);\";\n }\n\n return \"throw $exceptionConstructor;\";\n }", "title": "" }, { "docid": "62f41ed4dedf8e102cde3e892c64ee42", "score": "0.5938816", "text": "function custom_custom_error_message($error) {\n return ( strpos(strtolower($error), 'error') ) ? _x('The credentials you supplied are invalid', 'theme') : $error;\n}", "title": "" } ]
19c89485abfe83fb1300ac262b823f4d
Return the arithmetic mean of numeric data.
[ { "docid": "0fb84f8076057eca9c48ccf697beba13", "score": "0.71271324", "text": "public function mean(): int|float|null\n {\n return Stat::mean($this->numericalArray());\n }", "title": "" } ]
[ { "docid": "6c5427209c68c8764f5fb766e2e1a1b0", "score": "0.7781155", "text": "public function mean() : float\n {\n return $this->sum() / $this->n;\n }", "title": "" }, { "docid": "12b3254da3678001ccc3f624abbd8d11", "score": "0.7247777", "text": "public function average()\n {\n $sum = 0;\n\n for ($i=0; $i < sizeof($this->values); $i++) {\n $sum += $this->values[$i];\n }\n return $sum / sizeof($this->values);\n }", "title": "" }, { "docid": "c13a4faf70e703af6a2105e5b66369a1", "score": "0.7112667", "text": "public function average()\n {\n return array_sum($this->data) / count($this->data);\n }", "title": "" }, { "docid": "be607f8b98022553e7b7a9b04ed564c5", "score": "0.71078795", "text": "function getMean() {\n return $this->p/($this->p+$this->q);\n }", "title": "" }, { "docid": "169ec99576564bbb2f4b22d9f6a9a45e", "score": "0.6723818", "text": "function mean($distribution) {\n $addition = 0.0;\n $count = 0.0;\n\n foreach($distribution as $value) {\n $addition += $value[0] * $value[1];\n $count += $value[1];\n } \n\n if ($count > 0) {\n return $addition/$count;\n }\n\n return NAN; \n\n}", "title": "" }, { "docid": "e2aaa6b03818d836bbc0b14811209549", "score": "0.66695106", "text": "public function average(){\t\t\n\n\t\ttry{\n\t\t\tif(!empty($this->data)){\n\n\t\t\t\t$i = 0;\n\t\t\t\t$sum = 0;\n\t\t\t\t$average = 0;\n\t\t\t\t\n\t\t\t\tforeach($this->data as $line){\t\n\t\t\t\t\t\n\t\t\t\t\tif($i!= 0){\n\t\t\t\t\t\t$sum +=$line[0];\t\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\n\t\t\t\t$this->average = $sum/($i-1);\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\techo \"Exception Caught\".$e->getMessage();\n\t\t}\n\t\t\t\t\n\t\treturn number_format($this->average,3);\n\t}", "title": "" }, { "docid": "5d7fe0d365acb5a654e1253abf4db213", "score": "0.64098865", "text": "public function testMean()\n {\n $expected = 33 / 7;\n $this->assertEquals($expected, functions\\mean(array(2, 2, 2, 2, 2, 20, 3)));\n }", "title": "" }, { "docid": "95269a012c32e63c02a34750a0f5000f", "score": "0.63651025", "text": "public static function GEOMEAN(...$args)\n {\n return Statistical\\Averages\\Mean::geometric(...$args);\n }", "title": "" }, { "docid": "b224d641f123d24b11be91c5e57115d2", "score": "0.63296366", "text": "function average() {\n \t\t$total = 0;\n \t\tforeach ($this->grades as $value)\n \t\t$total += $value;\n \t\treturn $total / count($this->grades);\n\t}", "title": "" }, { "docid": "70e68f21ba0829e818fd219ccc814eea", "score": "0.6320378", "text": "function average() {\r\n $total = 0;\r\n foreach ($this->grades as $value) {\r\n $total += $value;\r\n }\r\n return $total / count($this->grades);\r\n }", "title": "" }, { "docid": "528a5d86bb1d689b3aafbe8623fb81ba", "score": "0.63193536", "text": "function average() {\r\n $total = 0;\r\n foreach ($this->grades as $value)\r\n $total += $value;\r\n return $total / count($this->grades);\r\n }", "title": "" }, { "docid": "590a22cfc271917b61da7c5ace4da892", "score": "0.63178605", "text": "function average(){\r\n $total = 0;\r\n foreach ($this->grades as $value){\r\n $total += $value;\r\n }\r\n return $total/ count($this->grades);\r\n }", "title": "" }, { "docid": "24c9f72c9f7644d7a0ddab751d54bda5", "score": "0.6256037", "text": "function mean(array $numbers): ?float\n{\n $count = (float) count($numbers);\n if (0.0 === $count) {\n return null;\n }\n\n $mean = 0.0;\n foreach ($numbers as $number) {\n $mean += (float)$number / $count;\n }\n\n return $mean;\n}", "title": "" }, { "docid": "8c12f7772ed05b6a61a59b946eb16c75", "score": "0.62504774", "text": "function average($arr)\n {\n $sum = 0;\n for ($i = 0; $i < count($arr); $i++) {\n $sum += $arr[$i];\n }\n return $sum / count($arr);\n }", "title": "" }, { "docid": "fd7b1bb3c1632d6b5059c0a07a834d16", "score": "0.6194069", "text": "function average(array $nums) : float {\r\n\r\n $sum = 0;\r\n\r\n foreach($nums as $key => $value) {\r\n $sum += $value;\r\n }\r\n\r\n return $sum / count($nums);\r\n}", "title": "" }, { "docid": "e11b86b8c66e339a82c0b16c2acd3be5", "score": "0.61635476", "text": "public function getMeanWeight(): float\n {\n $meanWeight = 0;\n\n foreach ($this->list as $box) {\n $meanWeight += $box->getWeight();\n }\n\n return $meanWeight / count($this->list);\n }", "title": "" }, { "docid": "41ce96535fd8653f621e4767c4130559", "score": "0.6123027", "text": "public function geometricMean(?int $round = null): float\n {\n return Stat::geometricMean($this->numericalArray(), $round);\n }", "title": "" }, { "docid": "46b85dbe51f935e32ddd64550d717eed", "score": "0.61122185", "text": "function average($numbers)\n{\n $sum = 0;\n foreach ($numbers as $value) {\n $sum += $value;\n }\n return $sum / sizeof($numbers);\n}", "title": "" }, { "docid": "92c6cd5fc61f219e271711e524b0f427", "score": "0.6109989", "text": "function average($array){\r\n $total = 0;\r\n foreach($array as $value){\r\n $total += $value;\r\n }\r\n return $total/count($array);\r\n}", "title": "" }, { "docid": "fef62d23510aa5536cc78e3d50759e7b", "score": "0.6095665", "text": "public function getAverage() {\n\n return array_sum($this->readings) / count($this->components);\n }", "title": "" }, { "docid": "6dd401e5968b20622186ef2979884cb8", "score": "0.6062583", "text": "public static function average(){\n return array_sum(func_get_args())/func_num_args();\n }", "title": "" }, { "docid": "1f0c92f94b1ff7bfe908063f852fcf67", "score": "0.6051484", "text": "public function testMean()\n {\n $testHeader = 'z';\n\n $this->assertEquals(0.41, $this->stats->mean($testHeader));\n }", "title": "" }, { "docid": "d0b45a6943741601bba22492f1d2fcba", "score": "0.59953773", "text": "public function average()\n {\n $computedForecastsCount = $this->forecasts\n ->filter(function(Forecast $forecast) {\n return $forecast->computed();\n })->count();\n\n return $computedForecastsCount == 0 ? 0 : $this->points / $computedForecastsCount;\n }", "title": "" }, { "docid": "6a78e7f78f439a2c4ba4ee6b525fb852", "score": "0.5922972", "text": "public function GetAverage()\n\t{\n\t\treturn round(array_sum($this->rolls) / count($this->rolls), 1);\n\t}", "title": "" }, { "docid": "6fc606c591160f1fa90f992bab82389e", "score": "0.5903627", "text": "function average($values) {\n\t$total = 0;\n\t$count = 0;\n\tforeach ($values as $temperature) {\n\t\t$total += $temperature;\n\t\t$count++;\n\t}\n\t\n\treturn number_format(round($total / $count, 1), 1);\n}", "title": "" }, { "docid": "8d5a768c27dbd4426e83b73d8f9d87cd", "score": "0.5860212", "text": "public function testMeanNoValue()\n {\n $this->assertEquals(0, functions\\mean(array()));\n }", "title": "" }, { "docid": "97bb9ee2539acc0d8920c371a7edc975", "score": "0.58311987", "text": "function avg_array_value($in_array)\r\n{\r\n\t$avg_val=array_sum($in_array)/(sizeof($in_array));\r\n\treturn $avg_val;\r\n}", "title": "" }, { "docid": "c23f3e47844d6388615c0396a368fcd7", "score": "0.58289075", "text": "public function getAvgRating(): float{\n if(count($this->likes) == 0){\n return 0;\n }\n foreach($this->likes as $like){\n $notes[] = $like->getRating();\n }\n return round (array_sum($notes) / count($notes), 2);\n }", "title": "" }, { "docid": "f290ea22c27c98c6f0d4aad2ccf874cd", "score": "0.57946897", "text": "function print_average($array) {\n $sum = 0;\n foreach ($array as $integer) {\n $sum += $integer;\n }\n return ($sum/count($array));\n}", "title": "" }, { "docid": "d8887a88328151497d918400559ef02e", "score": "0.579232", "text": "public function calcAverage()\n {\n return EntryMap::create()->getEntryAverage($this->getId());\n }", "title": "" }, { "docid": "5f4ac21ff21791a661a45565d0e40bde", "score": "0.57844925", "text": "public static function avgOfArrayItems($array) {\n return array_sum($array) / count($array);\n }", "title": "" }, { "docid": "08cfc4ec569b7776c0e9534dea67b23a", "score": "0.5768616", "text": "public function getMeanStDev()\n {\n return (float) $this->xpath()->evaluate('sum(//stats/@stdev) div count(//stats)');\n }", "title": "" }, { "docid": "f2ba0673a30bda22c0bbaa1902a89a1c", "score": "0.5759209", "text": "public function getMeanTime()\n {\n return $this->getTotalTime() / $this->getNbRevolutions();\n }", "title": "" }, { "docid": "6e0331f4d2e8121593069f56db692e6e", "score": "0.57478756", "text": "public function getTaxesAvg()\n {\n return $this->taxesAvg;\n }", "title": "" }, { "docid": "467233295c26ea1c73f931c515ceda63", "score": "0.5743544", "text": "public function avgRating()\n\t{\n\t\t$avgRating = $this->ratings()->avg('rating');\n\t\t$rating = number_format($avgRating, 1);\n\t\treturn $rating;\n\t}", "title": "" }, { "docid": "e13ed5c7319b6fe1b484eb8042b313af", "score": "0.5722102", "text": "public static function mean($nums, $num_students) {\n $arr = explode(\",\", $nums);\n $sum = 0;\n for ($j = 0; $j < count($arr); $j++) {\n $sum += intval($arr[$j]);\n }\n // return 0 if no students (avoid div by 0)\n $mean = ($num_students > 0) ? $sum / $num_students : 0;\n return $mean;\n }", "title": "" }, { "docid": "c8ecb2d6506508595b52713f618a8329", "score": "0.5719654", "text": "public function avg()\n\t{\n\t\t$this->column = 'avg(' . $this->column . ')';\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "62607cfb283abb1851db63af3ede09fc", "score": "0.57167685", "text": "function avg($a,$b) {\r\n\treturn round(($a+$b)/2);\r\n}", "title": "" }, { "docid": "62d35151f3dbc110a79b1ee040c2c20b", "score": "0.5685972", "text": "function harmonicMean(array $a, array $b): float\n{\n $ans = 0;\n\n $total = \\count($a);\n for ($i = 0; $i < $total; $i++) {\n $ans += ($a[$i] * $b[$i]) / ($a[$i] + $b[$i]);\n }\n\n return 2 * $ans;\n}", "title": "" }, { "docid": "84fed89b0372f4211fe17482bef83caa", "score": "0.56769764", "text": "public function getAverage() {\n\t\treturn (float) $this->conn->fetchColumn('SELECT AVG(value) FROM data WHERE channel_id = ?' . parent::buildDateTimeFilterSQL($this->from, $this->to), array($this->channel->getId()), 0);\n\t}", "title": "" }, { "docid": "f24c628821e51c448b3a18208f66f8b5", "score": "0.5670592", "text": "public function harmonicMean(?int $round = null, ?array $weights = null): float\n {\n return Stat::harmonicMean($this->numericalArray(), $weights, $round);\n }", "title": "" }, { "docid": "eb9f3b8b2c4b973e193f59b2ceb33ec6", "score": "0.56508666", "text": "public function getAvgData()\n {\n return $this->round($this->getModel($this->modelName)->getCartProductsAmountAvgCount(\n Mage::helper('analytic_dashboard')->getDateFrom(true),\n Mage::helper('analytic_dashboard')->getDateTo(true),\n Mage::helper('analytic_dashboard')->getStore()\n ));\n }", "title": "" }, { "docid": "dded37d178edcd8e3264d5563593b090", "score": "0.5633358", "text": "public function getMeanItemWeight(): float\n {\n $meanWeight = 0;\n\n foreach ($this->list as $box) {\n $meanWeight += $box->getItemWeight();\n }\n\n return $meanWeight / count($this->list);\n }", "title": "" }, { "docid": "7115335993f5f3386c846f0fc3c69f76", "score": "0.56238425", "text": "function average( $collection ) {\n\t\t$sum = null;\n\t\t$divisor = 0;\n\n\t\tforeach ( $collection as $element ) {\n\t\t\tif ( is_numeric( $element ) ) {\n\t\t\t\t$sum += $element;\n\t\t\t\t++$divisor;\n\t\t\t}\n\t\t}\n\n\t\tif ( $sum === null ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $sum / $divisor;\n\t}", "title": "" }, { "docid": "1501a70e342dd41098c811afbc9db652", "score": "0.56074905", "text": "public function getMeanRelStDev()\n {\n $rStDevs = array();\n foreach ($this->query('//stats') as $stats) {\n $rStDevs[] = $stats->getAttribute('rstdev');\n }\n\n return Statistics::mean($rStDevs);\n }", "title": "" }, { "docid": "7c48112cd6644f5c1fa31451994602dd", "score": "0.56006247", "text": "function temp_inc_avg($data, $period) {\n\n $count = count($data);\n $temp_results = 0;\n // difference between all values on last period\n for($i = 1; $i <= $period; $i++){\n $result = $data[$count-$i] - $data[$count-($i+1)];\n if ($result >= 0){\n $temp_results += $result;\n }\n }\n return round($temp_results / $period , 2);\n}", "title": "" }, { "docid": "ea0309c42a44ac23e766f4ce16294512", "score": "0.5592525", "text": "public function average($attribute, $conditions = array())\n{\n\t$this->db->select_avg($attribute);\n\t$this->_find($conditions);\n\t\n\treturn (float)value_for_key($attribute, $this->db->get()->row());\n}", "title": "" }, { "docid": "e8d78d748316f7f9e0cad67a2592c72a", "score": "0.55890745", "text": "public static function average($values, $precision = 0) {\n\t\tif (!$values) {\n\t\t\treturn 0.0;\n\t\t}\n\n\t\treturn round(array_sum($values) / count($values), $precision);\n\t}", "title": "" }, { "docid": "30693d32e82fa2dbe7f3675234ce9089", "score": "0.55385536", "text": "function avg($field, $command=null)\n\t\t{\n\t\t\treturn $this->ARavg($field, $command);\n\t\t}", "title": "" }, { "docid": "9dbe62504a5a53396794811ed7e3d43a", "score": "0.55231255", "text": "public function calculate_GeometricMean($prices) {\r\n $priceCount = 0;\r\n $priceLog = 0;\r\n\r\n foreach ($prices as $price) {\r\n\r\n if ($price) {\r\n $priceCount++;\r\n $priceLog+=log($price);\r\n }\r\n }\r\n\r\n return $priceCount ? exp((1 / $priceCount) * $priceLog) : 0;\r\n }", "title": "" }, { "docid": "5ebe9e00c5ece987578c6ae1eaccb7cb", "score": "0.5487138", "text": "public static function average(array $values)\n {\n return array_sum($values) / count($values);\n }", "title": "" }, { "docid": "e9e0d6bf585a1ee4a72b4692af2b7d93", "score": "0.54747206", "text": "public function getAverageRating()\n {\n if (is_null($this->averageRating)) {\n /** @psalm-var ?float $data */\n $data = $this->raw(self::FIELD_AVERAGE_RATING);\n if (is_null($data)) {\n return null;\n }\n $this->averageRating = (float) $data;\n }\n\n return $this->averageRating;\n }", "title": "" }, { "docid": "c237af9c40902e95916ee0ce261dd017", "score": "0.5467623", "text": "public function getAvgAnnualOutputMwh(): float {\r\n return $this->avg_annual_output_mwh;\r\n }", "title": "" }, { "docid": "5491e6247cfb4fa15455ec1e866a9ecb", "score": "0.54460305", "text": "function average($array)\n{\n if (!empty($array))\n return array_sum($array) / count($array);\n \n return false;\n}", "title": "" }, { "docid": "c3b5ded7746ae959c3a84a690401663a", "score": "0.54416317", "text": "function average()\n\t{\n\t\t$collection = ee()->TMPL->fetch_param('collection');\n\t\t$decimals = ee()->TMPL->fetch_param('decimals', 2);\n\t\t$point = ee()->TMPL->fetch_param('point', '.');\n\t\t$thousands = ee()->TMPL->fetch_param('thousands', ',');\n\t\t\n\t\tif(isset($collection) && isset(ee()->session->cache['tally'][$collection]))\n\t\t{\n\t\t\t$average = number_format((array_sum(ee()->session->cache['tally'][$collection])/count(ee()->session->cache['tally'][$collection])), $decimals, $point, $thousands);\n\t\t\tif(empty(ee()->TMPL->tagdata))\n\t\t\t{\n\t\t\t\treturn $average;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn ee()->TMPL->parse_variables_row(ee()->TMPL->tagdata, array('tally_average' => $average));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b265e1cd2288e4d05a25b7220ad20123", "score": "0.5429137", "text": "function array_average($arr) {\n $score = ( count($arr) === 0 ) ? false : ( array_sum($arr) / count($arr) );\n\n if ($score !== false) {\n return number_format($score, 2, '.', '');\n }\n\n return false;\n}", "title": "" }, { "docid": "d0a49670cb5d8973febe6104b2886637", "score": "0.5424132", "text": "public function averageFormula(): string\n {\n return \"`\\overline{x} = {$this->format($this->avg('x'))} , \\overline{y} = {$this->format($this->avg('y'))}`\";\n }", "title": "" }, { "docid": "50677f842f7a67512d5a20d062d30647", "score": "0.5417314", "text": "public function getConsumptionAverage()\n {\n return $this->consumptionAverage;\n }", "title": "" }, { "docid": "729887b12a1c6b24e46a56a1abe56bc9", "score": "0.5411093", "text": "public function avgOfAnswers(){\r\n\t\t\r\n\t\tif(count($this->answers) == 0) return 0;\r\n\t\t\r\n\t\t$sum = 0;\r\n\t\tforeach($this->answers as $ca){\r\n\t\t\t$sum += $ca->answer;\r\n\t\t}\r\n\t\t\r\n\t\treturn round($sum / count($this->answers),2);\r\n\t}", "title": "" }, { "docid": "5632da79cfb2589f88829b4a19755432", "score": "0.54042584", "text": "function movavg($a,$n=1) { \n $n = max(1,$n);\n\n $len = count($a);\n $den = array_fill(0,$len,$n);\n array_splice($den,0,$n,range(1,min($len,$n)));\n return self::div(self::movacc($a,$n),$den);\n }", "title": "" }, { "docid": "22e22903d20506265f9b7e7df1d3efe5", "score": "0.5394458", "text": "public function getContactsAvg() {\n return $this->contactsAvg;\n }", "title": "" }, { "docid": "d47011b04a6d82d8e544970da1f80c87", "score": "0.53840786", "text": "public function getAgeAverage()\n {\n $ages = [];\n\n if (!count($this)) {\n throw new \\InvalidArgumentException('Can not calculate average age of empty group');\n }\n\n foreach ($this->users as $user) {\n $ages[] = $user->getAge();\n }\n\n return array_sum($ages) / count($ages);\n }", "title": "" }, { "docid": "683d1e0a81a83b03f1d01d75664f9864", "score": "0.53836507", "text": "public function meanField($value) {\n return $this->setProperty('meanField', $value);\n }", "title": "" }, { "docid": "026ea4e7903261a7cec8cc7cd2e460a6", "score": "0.53614277", "text": "public function sum() : float\n {\n return array_sum($this->a);\n }", "title": "" }, { "docid": "3ea13b3f26d5592771af99a91f725cdb", "score": "0.53509617", "text": "public function getAverageNote()\n {\n $totalNote =0;\n \n // Renvoie en tableua d'objet Rating \n $ratings = $this->getRatings();\n \n foreach($ratings as $rating)\n { \n $totalNote += $rating->getNotation();\n }\n \n return $totalNote/count($this->getRatings()); \n }", "title": "" }, { "docid": "49fc024ea3e268a0b3d3621e3df3c949", "score": "0.5344053", "text": "public function avgTemp(CouchDB $couchDB)\n {\n return $couchDB->get_average_temperature();\n }", "title": "" }, { "docid": "988efbb86b6712ec30564f2f4701c16f", "score": "0.53389657", "text": "public function getAverageTaxRate()\n {\n return $this->getOverallTax() / $this->country->getIncome();\n }", "title": "" }, { "docid": "bdcbd46a9e4f4f0a3d57139a4269dafc", "score": "0.53374475", "text": "public static function TRIMMEAN(...$args)\n {\n return Statistical\\Averages\\Mean::trim(...$args);\n }", "title": "" }, { "docid": "56a73b31853d427c613b4cba58355490", "score": "0.5335391", "text": "public static function HARMEAN(...$args)\n {\n return Statistical\\Averages\\Mean::harmonic(...$args);\n }", "title": "" }, { "docid": "4dfab3377dd1ee00cd4310656927bd83", "score": "0.5334976", "text": "public function avgAll($field)\n {\n return $this->sumAll($field) / $this->countAll($field);\n }", "title": "" }, { "docid": "b2bc1f55f18282df30321065658123ab", "score": "0.5325448", "text": "function average($collection)\n{\n InvalidArgumentException::assertCollection($collection, __FUNCTION__, 1);\n\n $sum = null;\n $divisor = 0;\n\n foreach ($collection as $element) {\n if (\\is_numeric($element)) {\n $sum += $element;\n ++$divisor;\n }\n }\n\n if ($sum === null) {\n return null;\n }\n\n return $sum / $divisor;\n}", "title": "" }, { "docid": "e0e3a229a5690aa1dde9be8872dae456", "score": "0.53143996", "text": "public function getAvgNumResults()\r\n {\r\n $sqlQuery = \"SELECT AVG(num_results) as avgresults FROM searchtracking\";\r\n $STH = $this->DBH->prepare($sqlQuery);\r\n $STH->execute();\r\n $STH->setFetchMode(PDO::FETCH_ASSOC);\r\n $row = $STH->fetch();\r\n return $row['avgresults'];\r\n }", "title": "" }, { "docid": "bf0097e3786dab973cd296f88e5e3663", "score": "0.5309913", "text": "public function getAverageRating()\n {\n return $this->averageRating;\n }", "title": "" }, { "docid": "3af5930a0265511e202e65e9e3f6f665", "score": "0.53089494", "text": "function glossary_get_ratings_mean($entryid, $scale, $ratings=NULL) {\n/// Scale is an array of possible ratings in the scale\n/// Ratings is an optional simple array of actual ratings (just integers)\n\n if (!$ratings) {\n $ratings = array();\n if ($rates = get_records(\"glossary_ratings\", \"entryid\", $entryid)) {\n foreach ($rates as $rate) {\n $ratings[] = $rate->rating;\n }\n }\n }\n\n $count = count($ratings);\n\n if ($count == 0) {\n return \"\";\n\n } else if ($count == 1) {\n return $scale[$ratings[0]];\n\n } else {\n $total = 0;\n foreach ($ratings as $rating) {\n $total += $rating;\n }\n $mean = round( ((float)$total/(float)$count) + 0.001); // Little fudge factor so that 0.5 goes UP\n\n if (isset($scale[$mean])) {\n return $scale[$mean].\" ($count)\";\n } else {\n return \"$mean ($count)\"; // Should never happen, hopefully\n }\n }\n}", "title": "" }, { "docid": "2fdce0569c24122e8b590add7b180070", "score": "0.53060484", "text": "protected function generateAverageStats() {\n if ($this->exists(\"transaction_age\")) {\n foreach ($this->get(\"transaction_age\") as $gateway => $transactionAges) {\n $gatewayTransactionAgeAverage = (is_array($transactionAges)) ? array_sum($transactionAges) / count($transactionAges) : $transactionAges;\n $this->add(\"average_transaction_age\", [$gateway => $gatewayTransactionAgeAverage]);\n }\n }\n\n if ($this->exists(\"enqueued_age\")) {\n foreach ($this->get(\"enqueued_age\") as $gateway => $enqueuedAges) {\n $gatewayEnqueuedAgeAverage = (is_array($enqueuedAges)) ? array_sum($enqueuedAges) / count($enqueuedAges) : $enqueuedAges;\n $this->add(\"average_enqueued_age\", [$gateway => $gatewayEnqueuedAgeAverage]);\n }\n }\n }", "title": "" }, { "docid": "d484456036d7f80415ca3c6af5e9c2ef", "score": "0.5292552", "text": "public static function calculateTrimmedMean($values, $trimmedMeanPercent = 0.1)\n {\n $g = $trimmedMeanPercent * count($values);\n if ($g >= 1) {\n sort($values, SORT_NUMERIC);\n $values = ArrayHelper::trimByPercents($values, $trimmedMeanPercent);\n }\n return static::average($values);\n }", "title": "" }, { "docid": "49139651a0e6738b809434554d04e4e6", "score": "0.5288608", "text": "public function getAverageRate()\n { \n\n $skillsRate = $this->getSkillsRate();\n $driversLicensesRate = $this->getDriversLicenseRate();\n \n $workPrefsRate = $this->getWorkPrefRate();\n $a = [$skillsRate, $driversLicensesRate, $workPrefsRate];\n if (count($a)) {\n $averageRate = array_sum($a) / count($a);\n }\n\n //get each array item and assign a job_rate to it\n return intval($averageRate);\n }", "title": "" }, { "docid": "a6ea9c27f5ffa4cdbf6f9d5960c8d13e", "score": "0.5288448", "text": "public function average() {\n $count = 0;\n $sum = 0;\n $rounds = Round::find_by_course($this->id);\n if(count($rounds)>0) {\n foreach ($rounds as $round) {\n $scores = $round->getScores();\n if(count($scores)>0) {\n foreach ($scores as $score) {\n $count++;\n $sum += $score->throws;\n }\n }\n }\n }\n $return = 0;\n if($count != 0) {\n $return = $sum/$count;\n }\n return $return;\n }", "title": "" }, { "docid": "93f5abc1b4f12ccc735be6e0a0e6dd49", "score": "0.5287905", "text": "public function getNumeric();", "title": "" }, { "docid": "b3d412ae15ef124c1fe1eeb7b66d011e", "score": "0.5241188", "text": "function average($array)\n{\n $total = 0;\n foreach ($array as $item) {\n $total += $item['review'];\n };\n return $total / count($array);\n}", "title": "" }, { "docid": "d8c4202f5f97120179fc81fad0f87a47", "score": "0.52390194", "text": "public function testMeanAllZeros()\n {\n $this->assertEquals(0, functions\\mean(array(0, 0, 0)));\n }", "title": "" }, { "docid": "32cda54cbcc400ad75cc9b2fc069ca4e", "score": "0.5219184", "text": "public function avg(): ?int\n {\n return (int) $this->_avg();\n }", "title": "" }, { "docid": "54bafb8e8ad473c13c965025fdeb0070", "score": "0.52139884", "text": "function calcAverage() {\n $total = 0;\t\t\t\t\t\t\t\n\n // find out how many arguments were given\n $arguments = func_num_args(); \t\n\n // loop to process each argument separately\n for ($i = 0; $i < $arguments; $i++) {\n // add the value in the current argument to the total\n $total += func_get_arg($i);\n }\n // after adding all arguments, calculate the average\n $average = $total / $arguments;\t\t\n\n // return the average\n return $average;\n}", "title": "" }, { "docid": "487c90e6bca733b036c119522f09c3d8", "score": "0.5206075", "text": "function mean_of_angles( $angles, $degrees = true ) {\n\t\tif ( $degrees ) {\n\t\t\t$angles = array_map(\"deg2rad\", $angles); // Convert to radians\n\t\t}\n\t\t$s_ = 0;\n\t\t$c_ = 0;\n\t\t$len = count( $angles );\n\t\tfor ($i = 0; $i < $len; $i++) {\n\t\t\t$s_ += sin( $angles[$i] );\n\t\t\t$c_ += cos( $angles[$i] );\n\t\t}\n\t\t// $s_ /= $len;\n\t\t// $c_ /= $len;\n\t\t$mean = atan2( $s_, $c_ );\n\t\tif ( $degrees ) {\n\t\t\t$mean = rad2deg( $mean ); // Convert to degrees\n\t\t}\n\t\tif ($mean < 0) {\n\t\t\t$mean_ok = $mean + 360;\n\t\t} else {\n\t\t\t$mean_ok = $mean;\n\t\t}\n\t\treturn $mean_ok;\n\t}", "title": "" }, { "docid": "fc369c4509dda066c90bfdef2f6066d3", "score": "0.5176161", "text": "function avg($blocks, $class = null, $uri = null, $decimals = 0) {}", "title": "" }, { "docid": "406e94a95290c9227c36b8110f25ce02", "score": "0.51747894", "text": "private function generateAverage() {\n\t\t$select_avg = \"SELECT avg(percentage) as percentage, year FROM $this->table GROUP BY year\";\n\n\t\t$result = $this->conn->query($select_avg);\n\n\t\t$list = $this->generateList($result);\n\n\t\t// Set avg variables.\n\t\t$this->years_avg \t= $list['years'];\n\t\t$this->data_avg \t= $list['percentage'];\n\t\t\t\n\t}", "title": "" }, { "docid": "24152c93569504e5909075723b7d2d95", "score": "0.5141672", "text": "public function avg($column) {\r\n return $this->aggregate(__FUNCTION__, array($column));\r\n }", "title": "" }, { "docid": "8dcc4959283fa56546f3931debff4e91", "score": "0.5133408", "text": "public static function computeUserMeanRatings($matrix) : array{\n $UserMeans = array();\n foreach ($matrix as $userID => $ItemRatingArray) { //for each user\n $ratings = 0;\n $counts = 0;\n foreach ($ItemRatingArray as $itemID => $rating) {\n $ratings += $rating ;\n $counts++;\n }\n if($counts != 0){\n $UserMeans[$userID] = $ratings/$counts;\n }else{\n $UserMeans[$userID] = 0;\n }\n }\n return $UserMeans;\n }", "title": "" }, { "docid": "2a6ec40e022afc2ebb19388176a97249", "score": "0.5124328", "text": "public function sum()\n {\n return $this->map(function ($v) {\n return (double) $v;\n })->inject(0, function ($m, $n) {\n return $m += $n;\n });\n }", "title": "" }, { "docid": "a131dcc3a87b86d88d9381d94b748106", "score": "0.5106987", "text": "function question_mean_score($quiz_id, $question_id){\n global $DB;\n $query= \" SELECT\n qst.question, AVG(grade) avg\n FROM\n {quiz_question_instances} qst\n WHERE\n qst.question = $question_id\n AND qst.quiz = $quiz_id\n GROUP BY\n qst.question\";\n\n $result = $DB->get_record_sql($query);\n return $result->avg;\n}", "title": "" }, { "docid": "47f813ece859cf10e7037c065b84f2af", "score": "0.5094939", "text": "public function getNumeric()\n {\n return $this->numeric;\n }", "title": "" }, { "docid": "47f813ece859cf10e7037c065b84f2af", "score": "0.5094939", "text": "public function getNumeric()\n {\n return $this->numeric;\n }", "title": "" }, { "docid": "d097f25ad5994d95d79ed931bc457a98", "score": "0.50923604", "text": "protected function average(array $pixels): float\n {\n // Calculate the average value from top 8x8 pixels, except for the first one.\n $n = count($pixels) - 1;\n\n return array_sum(array_slice($pixels, 1, $n)) / $n;\n }", "title": "" }, { "docid": "b82ad909fd12d9601cdedbea0960b9a3", "score": "0.50896907", "text": "function getCurrentAverage($entries)\n\t\t{\n\t\t\tdebug($entries);\n\t\t\t# How many possible points we do have?\n\t\t\t$total_points = $this->getTotalPossiblePoints();\n\t\t\tif ($this->calculation_type == 1)\n\t\t\t{\n\t\t\t\t# calculate based on weight (%)\n\t\t\t\t\t\n\t\t\t\treturn $avg;\n\t\t\t} else \n\t\t\t{\n\t\t\t\t# calculate based on points\n\t\t\t\treturn $avg;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3cba2d307fbfd12d55f8490e2c2aed6e", "score": "0.5086309", "text": "private function squareDeviation(){\n\n\t\t$i = 0;\n\t\t$sum_square_deviation = 0;\n\t\t\t\n\t\tforeach($this->data as $line){\t\n\t\t\t\t\t\n\t\t\tif($i!= 0){\n\t\t\t\t$sum_square_deviation += pow($line[0] - $this->average,2);\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\t$average_square_deviation = $sum_square_deviation/($i-1);\n\t\treturn $average_square_deviation;\n\t}", "title": "" }, { "docid": "3e0f9576b94af47616c18a3a8aa19a8e", "score": "0.5082487", "text": "public function getAverageRating()\n {\n $rating = (new Query())\n ->select([\n 'provider.id',\n 'ROUND(AVG(service_request.customer_rating), 2) average'\n ])\n ->from('provider')\n ->join('INNER JOIN', 'service_request', 'provider.id=service_request.provider_id')\n ->where(['not', ['customer_rating' => null]])\n ->where(['provider.id' => $this->id])\n ->groupBy([\n 'provider.id',\n ])\n ->one();\n\n return !empty($rating['average']) ? $rating['average'] : '-';\n\n }", "title": "" }, { "docid": "3563c349947dbd5bb954ca0060daa0f8", "score": "0.5082017", "text": "public function average($field, $alias = null);", "title": "" }, { "docid": "2996db301f26d1db096685718aa9dee9", "score": "0.5079735", "text": "function calculateNewMeans($newIteration,$currentRecord)\n{\n\t$itemId=$newIteration->ITEM_ID;\n\t$itemX=$newIteration->ITEM_X;\n\t$itemY=$newIteration->ITEM_Y;\n\n\t//calculate new mean\n\t$newCount = $currentRecord[2] + 1;\n\t$newMeanX = ( ( $currentRecord[0] * $currentRecord[2] ) + $itemX ) / $newCount;\n\t$newMeanY = ( ( $currentRecord[1]* $currentRecord[2] ) + $itemY ) /$newCount;\n\t\n\t$newRecord=array($itemId,$itemX,$itemY,$newCount,$newMeanX,$newMeanY);\t\n\treturn $newRecord;\n}", "title": "" }, { "docid": "7e6ba00d23771d59c3f03ac961341d9e", "score": "0.5075567", "text": "private function recalcAverage()\n\t{\n\t\tif (0 >= ($max = $this->getVar('site_maxscore')))\n\t\t{\n\t\t\t$avg = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sid = $this->getVar('site_id');\n\t\t\t$avg = GDO::table('WC_RegAt')->selectVar('IFNULL(AVG(regat_onsitescore),0)', \"regat_sid=$sid AND regat_onsitescore>0\");\n\t\t\t$avg /= $max;\n\t\t}\n\n\t\treturn $this->saveVar('site_avg', $avg);\n\t}", "title": "" }, { "docid": "3847f90550d65d666e3cd00a63bfafbe", "score": "0.50675774", "text": "public function average($array, $item_key) : float {\n $candidates = [];\n // @codingStandardsIgnoreStart\n array_walk($array, function ($item, $key) use (&$candidates, $item_key) {\n // @codingStandardsIgnoreEnd\n if (isset($item[$item_key])) {\n $candidates[] = $item[$item_key];\n }\n });\n return array_sum($candidates) / count($candidates);\n }", "title": "" } ]
b3ba039677f5b6f7021500a2f27fc58d
Constructor. Available options: global_prefix A prefix for all keys within the cache. This is useful to avoid colliding keys when using the same cache for different systems. prefix A "local" prefix for this wrapper. This is useful when reusing the same resolver for multiple filters. index_key The name of the index key being used to save a list of created cache keys regarding one image and filter pairing.
[ { "docid": "16a4c3d9fdf903b1c93ecfceec9430ed", "score": "0.0", "text": "public function __construct(Cache $cache, ResolverInterface $cacheResolver, array $options = array(), OptionsResolverInterface $optionsResolver = null)\n {\n $this->cache = $cache;\n $this->resolver = $cacheResolver;\n\n if (null === $optionsResolver) {\n $optionsResolver = new OptionsResolver();\n }\n\n $this->setDefaultOptions($optionsResolver);\n $this->options = $optionsResolver->resolve($options);\n }", "title": "" } ]
[ { "docid": "8b593bc4444590f186ed6e49ea1633b3", "score": "0.58316386", "text": "public function __construct($image_name, $cached_key_name)\n {\n $this->image_name = $image_name;\n $this->cached_key_name = $cached_key_name;\n }", "title": "" }, { "docid": "98e9d33c738aa86c408cb7950c8cce0c", "score": "0.57925653", "text": "public function keyIndex()\n {\n $key = Sanitize::toKey( $this->_name .\"_index\" );\n $this->_keys[ $key ] = \"CREATE INDEX `\".$key.\"` ON `\".$this->_name.\"` (`\".implode( \"`,`\", func_get_args() ).\"`)\";\n return $this;\n }", "title": "" }, { "docid": "57eaa5511b9d4e416c57b1e46d599623", "score": "0.5685703", "text": "public function __construct($key)\n {\n //\n $this->cacheKey = $key;\n }", "title": "" }, { "docid": "62e49b0e1e1d5846d8170acb504e2cfe", "score": "0.5664054", "text": "public function setCacheKeyPrefix($prefix);", "title": "" }, { "docid": "95d7bf49a4362f85d19af69373f48cb1", "score": "0.5475106", "text": "public function __construct()\n\t{\n\t\tif ( !defined( 'FILE_CACHE_LOCATION' ) ) {\n\t\t\tdefine( 'FILE_CACHE_LOCATION', FILMIO_PATH . '/user/cache/' );\n\t\t}\n\t\t$this->cache_location = FILE_CACHE_LOCATION;\n\t\t$this->index_file = $this->cache_location . md5( 'index' . Options::get( 'private-GUID' ) ) . '.data';\n\t\t$this->enabled = is_writeable( $this->cache_location );\n\t\tif ( $this->enabled ) {\n\t\t\tif ( file_exists( $this->index_file ) ) {\n\t\t\t\t$this->cache_files = unserialize( file_get_contents( $this->index_file ) );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tSession::error( _t( \"The cache directory '%s' is not writable - the cache is disabled. The user, or group, which your web server is running as, needs to have read, write, and execute permissions on this directory.\", array( $this->cache_location ) ), 'filecache' );\n\t\t\tEventLog::log( _t( \"The cache directory '%s' is not writable - the cache is disabled.\", array( $this->cache_location ) ), 'notice', 'cache', 'filmio' );\n\t\t}\n\t}", "title": "" }, { "docid": "5d3963e5493ec29b9f050669c43be26e", "score": "0.53248405", "text": "public function cacheResultsWithKey($key)\n {\n $this->shouldCache = true;\n $this->cacheKey = $key;\n\n return $this;\n }", "title": "" }, { "docid": "c40615107329c1ee146dfe0e22787546", "score": "0.52997524", "text": "protected abstract function GetCacheKey();", "title": "" }, { "docid": "c109372afa8c0cd3cbd6b6faa0795112", "score": "0.5250385", "text": "public function getCacheKeyPrefix();", "title": "" }, { "docid": "87c8dde6a89a8e4b6217b333a9612756", "score": "0.52404404", "text": "public function __construct() {\n parent::__construct();\n $this->cacheType = Gdn_Cache::CACHE_TYPE_MEMORY;\n\n $this->memcache = new Memcache;\n\n $this->registerFeature(Gdn_Cache::FEATURE_COMPRESS, MEMCACHE_COMPRESSED);\n $this->registerFeature(Gdn_Cache::FEATURE_EXPIRY);\n $this->registerFeature(Gdn_Cache::FEATURE_TIMEOUT);\n $this->registerFeature(Gdn_Cache::FEATURE_NOPREFIX);\n $this->registerFeature(Gdn_Cache::FEATURE_FORCEPREFIX);\n\n $this->StoreDefaults = [\n Gdn_Cache::FEATURE_COMPRESS => false,\n Gdn_Cache::FEATURE_TIMEOUT => false,\n Gdn_Cache::FEATURE_EXPIRY => false,\n Gdn_Cache::FEATURE_NOPREFIX => false,\n Gdn_Cache::FEATURE_FORCEPREFIX => null\n ];\n }", "title": "" }, { "docid": "aa15b7b2be0e7d45e7f7f39ffc963662", "score": "0.52392393", "text": "public function __construct($_options=[])\n\t{\t\n\t\t### set the options\n\t\t$this->setOptions($_options) ;\n\n\t\tif(null === self::$_cache)\t{\n\t\t\tself::$_cache = StorageFactory::factory($this->getOptions()) ;\t\t\t\t\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "ec70b6e52b219863b665231f622fd149", "score": "0.5187533", "text": "public function __construct() {\n // set $this->images_url_prefix\n $config = $this->getConfig();\n $imagesConfig = $config['images'];\n $imagesBaseUrl = $imagesConfig['base_url'];\n $this->images_url_prefix = $imagesBaseUrl.'original';\n\t}", "title": "" }, { "docid": "03530bac28d9e0f8c65dec5cb72800a2", "score": "0.5182629", "text": "public function __construct()\n {\n\n /*\n * There are two \"modes\" (see the mapper_okapi for details):\n * - without \"searchdata\" - the normal version.\n * - with \"searchdata\" - ONLY \"searchdata\" is taken into account. All other\n * parameters are ignored.\n */\n $searchData = $this->getSearchData();\n if (! is_null($searchData)) {\n\n if (! $this->loadSearchData($searchData)) {\n die();\n }\n } else {\n if (! $this->parseUrlSearchParams()) {\n // parseUrlSearchParams returns with error or contradictory set of caches\n // there is nothing more to do here\n die();\n }\n }\n\n $this->getCommonParams();\n\n //cache attributes we need from OKAPI...\n $fields = 'code|name|location|type|size2|' .\n 'recommendations|rating_votes|rating|' .\n 'willattends|status|owner|founds|' .\n 'notfounds|internal_id|date_hidden';\n\n\n $params = array();\n $params['search_method'] = 'services/caches/search/bbox';\n $params['search_params'] = json_encode($this->search_params);\n $params['retr_method'] = 'services/caches/geocaches';\n $params['retr_params'] = '{\"fields\":\"' . $fields . '\"}';\n $params['wrap'] = 'false';\n\n switch ($this->rspFormat) {\n case 'html':\n $this->htmlFormat($params);\n return;\n\n case 'url':\n default:\n $this->getUrlOnly($params);\n return;\n }\n }", "title": "" }, { "docid": "6a168d6e61e7e807f54d1d86680df6ba", "score": "0.5139684", "text": "protected function __get_index()\n\t{\n\t\tif ($this->use_cache)\n\t\t{\n\t\t\t$cache = new FileCache\n\t\t\t(\n\t\t\t\tarray\n\t\t\t\t(\n\t\t\t\t\tFileCache::T_REPOSITORY => $this->cache_repository,\n\t\t\t\t\tFileCache::T_SERIALIZE => true,\n\t\t\t\t\tFileCache::T_COMPRESS => true\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$index = $cache->load('modules_' . md5(implode($this->paths)), array($this, 'index_construct'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$index = $this->index_construct();\n\t\t}\n\n\t\t$this->descriptors = $index['descriptors'];\n\n\t\treturn $index;\n\t}", "title": "" }, { "docid": "3b96683f677d40a4c83639eb3ddebc31", "score": "0.511942", "text": "public function __construct($name, array $options, Cache $cache);", "title": "" }, { "docid": "1b8649f78db4dbed9d8960e949f8e779", "score": "0.5091031", "text": "abstract function initCache();", "title": "" }, { "docid": "b3581711065a3f0236c24d096df3b5ae", "score": "0.50822544", "text": "public function getCacheKey(): string\n {\n return $this->cache_prefix . '_' . md5(serialize([\n 'method' => $this->method,\n 'url' => $this->base_uri . $this->path,\n 'query' => $this->query,\n 'body' => $this->body,\n 'multipart' => $this->multipart,\n ]));\n }", "title": "" }, { "docid": "36286a3a93ffdd098f1ad7cccfd44ff4", "score": "0.5038192", "text": "protected function init_cache() {\n return FileCache::singleton();\n }", "title": "" }, { "docid": "c8e0f4372a3e3c82c70a34a033757200", "score": "0.50328267", "text": "protected function getCacheKey(): string\n {\n // create cache entry 'prefix-table-sha1' with key 'table'\n return config('autocache.prefix') . $this->from . '-' . sha1(config('autocache.key') . $this->toSql() . json_encode($this->getBindings()));\n }", "title": "" }, { "docid": "ada2258acc0f66b621b85a273a21c6ff", "score": "0.5012142", "text": "public function setCacheKey($cacheKey)\n {\n $this->cacheKey = $cacheKey;\n\n return $this;\n }", "title": "" }, { "docid": "95d0ab9d2254c1ad12577004b952860d", "score": "0.5010595", "text": "public function __construct() {\r\n\r\n // Define the cache file path.\r\n $this->cacheFile = APP_ROOT.'/'.self::CACHE_DIR.'/'.self::CACHE_FILENAME;\r\n\r\n // Import the cache data.\r\n $this->importCache();\r\n\r\n }", "title": "" }, { "docid": "185018152b00bd0af8b2ceeb8891cfd3", "score": "0.49632093", "text": "public function setCachePrefix($prefix)\n {\n $this->cachePrefix = $prefix;\n\n return $this;\n }", "title": "" }, { "docid": "386ff03ffee97a11d03806ab456997fa", "score": "0.49577263", "text": "protected function getCacheKey() {\n\n\t\t\tif (!empty($this->cacheKey))\n\t\t\t\treturn $this->cacheKey;\n\n\t\t\t$params = $this->fallbackLoader->getParameters();\n\n\t\t\t$this->cacheKey = 'dree_config_' . preg_replace('/[^A-z0-9]/', '_', get_class($this->fallbackLoader)) . '__' . sha1(serialize($params));\n\n\t\t\treturn $this->cacheKey;\n\t\t}", "title": "" }, { "docid": "de138ef30e8fd293a349d266e5f6c931", "score": "0.4949641", "text": "protected function getCacheKey() {\n $plugin_id = hash('sha256', $this->getPluginId());\n $uri = $this->config('uri');\n\n return $plugin_id . ':' . $uri;\n }", "title": "" }, { "docid": "7510c4983e0ffb3a1b9ab2e88b3e8911", "score": "0.49403286", "text": "static function getCache()\n {\n $args = func_get_args();\n\n // check to see if a single array was used instead of multiple arguments\n if (count($args) == 1 && is_array($args[0])) {\n $args = $args[0];\n }\n\n if (count($args) < 1) {\n throw new InvalidArgumentException('getCache function requires a cache name.');\n }\n\n $name = array_shift($args);\n\n // Check to see if keys were passed as an extended argument or a single array\n if (count($args) == 1 && is_array($args[0])) {\n $args = $args[0];\n }\n\n if (!isset(self::$handlers[$name])) {\n self::$handlers[$name] = new Ephemeral();\n }\n\n $stash = new Cache(self::$handlers[$name]);\n\n if (count($args) > 0) {\n $stash->setupKey($args);\n }\n\n return $stash;\n }", "title": "" }, { "docid": "c3108c11d07df8ba54ca316f38988148", "score": "0.49168304", "text": "public function __construct($key = self::KEY) {\n\t\t$this->key = $key;\n\t\t$this->setupStorage();\n\t}", "title": "" }, { "docid": "200e1bf1fd216ecd77d0a54794a6acc9", "score": "0.4910465", "text": "private function GetCacheKeyPrefix()\n\t{\n\t\t$cacheKeyPrefix = sha1(serialize(GitPHP_ProjectList::GetInstance()->GetConfig()));\n\t\tif ($this->project) {\n\t\t\t$cacheKeyPrefix .= '|' . sha1($this->project->GetProject());\n\t\t}\n\t\tif (isset($this->mark)) {\n\t\t\t$cacheKeyPrefix .= '|' . $this->mark;\n\t\t}\n\t\t\n\t\treturn $cacheKeyPrefix;\n\t}", "title": "" }, { "docid": "776b28c6fe2c76a966335ba2f380d024", "score": "0.49095878", "text": "public function initialise(cache_definition $definition) {\n $this->_defid = $definition->get_id();\n $this->_prefix = $definition->generate_single_key_prefix();\n $this->_simplekeys = $definition->uses_simple_keys();\n\n return parent::initialise($definition);\n }", "title": "" }, { "docid": "7b5f1878d9105481ea679f3e8f5a49b3", "score": "0.4895764", "text": "final protected function _buildKey($cacheKeyName, array $fieldVals=[]) {\n // each key is namespaced with the name of the class, then the name of the function ($cacheKey_name)\n $paramCount = count($fieldVals);\n if ($paramCount === 1) {\n return \"{$this->cacheKeyPrefix}:{$cacheKeyName}:\" . md5(reset($fieldVals) . ':' . key($fieldVals), $this->useBinaryCacheKeys);\n } else if ($paramCount === 0) {\n return \"{$this->cacheKeyPrefix}:{$cacheKeyName}:\";\n }\n\n ksort($fieldVals);\n foreach ($fieldVals as & $val) {\n $val = base64_encode($val);\n }\n\n return \"{$this->cacheKeyPrefix}:{$cacheKeyName}:\" . md5(\n json_encode($fieldVals),\n $this->useBinaryCacheKeys\n );\n }", "title": "" }, { "docid": "d34dd892fa36a7deb4d0012452e2a275", "score": "0.48932606", "text": "private function __buildCacheFileList() {\t\t\t\n\t\t\t\t// Check some initial characters\n\t\t\t\t$caches = Symphony::Database()->fetch(\"SELECT `datasource`,sum(`size`) size_tot,sum(`uncompressedsize`) uncompressedsize_tot, count(`datasource`) as nb FROM `tbl_dbdatasourcecache` group by 1\");\n\t\t\t\t\n\t\t\t\tforeach($caches as $cache){\n\t\t\t\t\t$this->_cachefiles[$cache['datasource']] = array(\n\t\t\t\t\t\t'count' => $cache['nb'],\n\t\t\t\t\t\t'size' => $cache['size_tot'],\n\t\t\t\t\t\t'uncompressedsize' => $cache['uncompressedsize_tot']\n\t\t\t\t\t\t// 'files' => array($cache['hash']),\n\t\t\t\t\t\t// 'last-modified' => $row['creation']\n\t\t\t\t\t);\t\n\t\t\t\t}\n \t \t\n \t \treturn $this->_cachefiles;\t\t\t\n\t\t}", "title": "" }, { "docid": "d29853db5f4ad2785cd6ec1ad27348b7", "score": "0.48767745", "text": "public function __construct(Kaishing $cache)\n {\n $this->cache = $cache;\n }", "title": "" }, { "docid": "e94594642a436c2fdf7466b16220e3dc", "score": "0.48730412", "text": "function __construct() {\n $this->hashMap = [[], false];\n }", "title": "" }, { "docid": "04eb0e5b09da2c75e28a150fe76a37f5", "score": "0.48628303", "text": "protected function _construct()\n {\n $this->setCacheKey('rss_catalog_new_'.$this->_getStoreId());\n $this->setCacheLifetime(600);\n }", "title": "" }, { "docid": "48ef374171a21813c174b76e75b99149", "score": "0.48403692", "text": "public function cache();", "title": "" }, { "docid": "64a46d79713c386cb045483b0077fd7b", "score": "0.48403", "text": "public function get_cache_key();", "title": "" }, { "docid": "42b60cab761dcb34610c29d3d3b8fb27", "score": "0.4836916", "text": "public function __construct($_name='plugin_cache',$_prefix='noname',$_ext='nbib'){\r\n global $conf;\r\n $this->namespace = strtolower($_name);\r\n $this->pdfDoiNS = strtolower($_name.\"/doi_pdf\");\r\n $this->pdfPmidNS = strtolower($_name.\"/pmid_pdf\");\r\n $this->prefix = strtolower($_prefix);\r\n $this->extension = strtolower($_ext);\r\n if (empty($_prefix)){\r\n $this->prefix = $_prefix;\r\n }else{\r\n $this->prefix = $_prefix.'_';\r\n }\r\n $delimiter = ($conf['useslash'])?'/':':';\r\n $this->mediaDir = $conf['mediadir'].'/'.$this->namespace;\r\n $this->mediaFormat = $this->mediaDir.'/'.$this->prefix.'%s.'.$this->extension;\r\n $this->linkFormat = $this->namespace.$delimiter.$this->prefix.'%s.'.$this->extension;\r\n $this->abstractTrFormat = $this->mediaDir.'/'.$this->prefix.'%s_fr.txt';\r\n\r\n $this->crossRefId = 'cross'; \r\n// echo \"<br/><br/><br/><pre>\".\r\n// \"NS: \". $this->namespace.PHP_EOL.\r\n// \"pdfDoiNS: \". $this->pdfDoiNS.PHP_EOL.\r\n// \"pdfPmidNS: \". $this->pdfPmidNS.PHP_EOL.\r\n// \"Prefix: \".$this->prefix.PHP_EOL.\r\n// \"extension: \".$this->extension.PHP_EOL.\r\n// \"delimiter: \".$delimiter.PHP_EOL.\r\n// \"mediaDir: \".$this->mediaDir.PHP_EOL.\r\n// \"mediaFormat: \".$this->mediaFormat.PHP_EOL.\r\n// \"linkFormat: \".$this->linkFormat.PHP_EOL.\r\n// \"crossRefId: \".$this->crossRefId.PHP_EOL.\r\n// \"abstractTrFormat: \".$this->abstractTrFormat.PHP_EOL.\r\n// \"</pre><br/>\";\r\n $this->checkDir();\r\n }", "title": "" }, { "docid": "1659acdc7651643a244d1d47bff9bfc2", "score": "0.48219377", "text": "public function __construct(CacheBackendInterface $consistent_backend, CacheBackendInterface $fast_backend, $bin) {\n $this->consistentBackend = $consistent_backend;\n $this->fastBackend = $fast_backend;\n $this->bin = 'cache_' . $bin;\n $this->lastWriteTimestamp = NULL;\n }", "title": "" }, { "docid": "cb1950092103e1e1586086da360ef071", "score": "0.48207125", "text": "public function __construct($cacheDirectory = 'cache') {\n $this->cacheDirectory = $cacheDirectory;\n }", "title": "" }, { "docid": "95be53916380ecf6cb0f152142646295", "score": "0.4815656", "text": "public function getCachePrefix()\n {\n return 'permissionsHandler'.$this->getTable().'_'.$this->id;\n }", "title": "" }, { "docid": "8f1119936b23b4ff0d0f1fa594325f24", "score": "0.48152602", "text": "protected function GetCacheKey()\n\t{\n\t\tif (isset($this->params['opml']) && ($this->params['opml'] === true)) {\n\t\t\treturn '';\n\t\t} else if (isset($this->params['txt']) && ($this->params['txt'] === true)) {\n\t\t\treturn '';\n\t\t}\n\t\treturn $this->params['order'] . '|' . (isset($this->params['search']) ? $this->params['search'] : '');\n\t}", "title": "" }, { "docid": "d2de3bfe3131c76fde6d25d317e55f43", "score": "0.48073557", "text": "private function initialize_cache(){\n\n if ( ! self::$cache ) self::$cache = new Fast_Cache(50);\n\n }", "title": "" }, { "docid": "e044c0f305538f3daf8376534cc11192", "score": "0.4801718", "text": "function set_cache_key($key, $query)\n{\n \n $queryKey = $key.md5($query);\n\n return $queryKey;\n\n}", "title": "" }, { "docid": "b42c6e5252487c4c20903ed2d27bbb0d", "score": "0.48000276", "text": "public function __construct(array $options = [])\n {\n $options = array_merge($this->defaultOptions, $options);\n $couchbaseCluster = $this->getCluster($options);\n $this->cacheBucket = $couchbaseCluster->openBucket($options['bucket'], $options['bucket_password']);\n $this->tagBucket = $couchbaseCluster->openBucket($options['tag_bucket'], $options['tag_bucket_password']);\n }", "title": "" }, { "docid": "f4823cf46197684e0a1cb6a72f6648c9", "score": "0.47955963", "text": "public function imageCache($pathtofile, $filter, $width=0, $height=0, $background='transparent')\n {\n //echo getcwd().$pathtofile.\" - \".$filter.\" W=\".$width.\" H=\".$height.\"<br/>\";\n $showFallback = false;\n if($width ==0 || $height==0 ){\n echo \"( Error: width or height not set )\";\n return false;\n }\n\n if(!file_exists(getcwd().$pathtofile)){\n $fallback = $this->container->getParameter('gregwar_image.fallback_image');\n $pathtofile = getcwd().\"/\".$fallback;\n }else{\n $pathtofile = getcwd().$pathtofile;\n }\n\n $file = explode('/', $pathtofile);\n $filename = end($file);\n $folder = $file[(count($file)-2)];\n $folder.= \"/\".$width.\"x\".$height;\n $cacheDir = getcwd().'/userfiles/image_cache/'.$folder;\n\n switch (strtolower($filter)) {\n case 'scaleresize':\n $generateFile = Image::open($pathtofile)->scaleResize($width,$height)->fixOrientation()\n ->fillBackground($background)->setCacheDir($cacheDir.'-sr')\n ->setPrettyName($filename,false)->guess(80);\n break;\n case 'cropresize':\n $generateFile = Image::open($pathtofile)->cropResize($width,$height)->fixOrientation()\n ->fillBackground($background)->setCacheDir($cacheDir.'-cr')\n ->setPrettyName($filename,false)->guess(80);\n break;\n case 'zoomcrop':\n $generateFile = Image::open($pathtofile)->zoomCrop($width,$height)->fixOrientation()\n ->fillBackground($background)->setCacheDir($cacheDir.'-zc')\n ->setPrettyName($filename,false)->guess(80);\n break;\n default:\n $generateFile = Image::open($pathtofile)->scaleResize($width,$height)->fixOrientation()\n ->fillBackground($background)->setCacheDir($cacheDir.'-sr')\n ->setPrettyName($filename,false)->guess(80);\n }\n //echo \"/userfiles/image_cache/\".$folder.\"/\".$filename;\n //echo $generateFile;\n\n echo str_replace(getcwd(),\"\",$generateFile);\n\n }", "title": "" }, { "docid": "442ed7b92e60d7b3137031778524f3a2", "score": "0.4782078", "text": "function acf_cache_key($key = '')\n{\n}", "title": "" }, { "docid": "a26b9181006b506a74079276d1f75756", "score": "0.4771443", "text": "public function __construct($memcache, $prefix = '')\n {\n $this->memcache = $memcache;\n $this->prefix = strlen($prefix) > 0 ? $prefix.':' : '';\n }", "title": "" }, { "docid": "342d8b12992bb648a7caae67628c781c", "score": "0.47637355", "text": "public function item_for_key($key, $options) {\n return new Cache_Engine_File_Item($this, $key, $options);\n }", "title": "" }, { "docid": "c52a6f3044dfb1c068d7f82428006f3a", "score": "0.4761838", "text": "final protected static function _build_key($cache_key_name, array $fieldvals=[]) {\n // each key is namespaced with the name of the class, then the name of the function ($cache_key_name)\n $param_count = count($fieldvals);\n if ($param_count === 1) {\n return static::CACHE_KEY . \":{$cache_key_name}:\" . md5(reset($fieldvals));\n } else if ($param_count === 0) {\n return static::CACHE_KEY . \":{$cache_key_name}:\";\n } else {\n ksort($fieldvals);\n foreach ($fieldvals as & $val) {\n $val = base64_encode($val);\n }\n // Use only the array_values() and not the named array, since each $cache_key_name is unique per function\n return static::CACHE_KEY . \":{$cache_key_name}:\" . md5(json_encode(array_values($fieldvals)));\n }\n }", "title": "" }, { "docid": "0d62b2a7a05efa6331ced8286372be02", "score": "0.4760584", "text": "public function cacheFor()\n {\n //\n }", "title": "" }, { "docid": "a83f0e6ee85b5a38e0a7ac3695b7b36b", "score": "0.47567782", "text": "public function getIndexStorage();", "title": "" }, { "docid": "de29848c8ae91ef4fae8a17fd53dcc5e", "score": "0.47533953", "text": "public function useKey(string $key): self;", "title": "" }, { "docid": "e3b6327570d80d01b61e7488f29ebc4d", "score": "0.4751448", "text": "public function __construct()\n {\n $this->keys = [];\n }", "title": "" }, { "docid": "0606e42c24c4d3e3cf468193b850e35d", "score": "0.47510108", "text": "public function getCacheKey()\n {\n return sprintf(\"%s/%s\",\n get_class($this),\n $this->getKey()\n ) . (isset($this->attributes['updated_at']) ? '-' . $this->updated_at->timestamp : '');\n }", "title": "" }, { "docid": "fee835100de48379bb114ed46e838100", "score": "0.47421548", "text": "public function __construct($cacheModel=null)\n\t{\n\t\t$this->_cache = new TMap;\n\t\t$this->_keyList = new TList;\n\t\t$this->_cacheModel=$cacheModel;\n\t}", "title": "" }, { "docid": "2fd75fdbc15d5c344af53b7ea58bcb23", "score": "0.47371432", "text": "function __construct()\n {\n $cache_handler = new esw_cache_handler();\n $this->cache = $cache_handler->get();\n }", "title": "" }, { "docid": "8351af33e5e5e791540abf853a41676b", "score": "0.4733763", "text": "public function __construct()\n {\n if (App::$Request->getLanguage() !== App::$Properties->get('baseLanguage')) {\n $this->cached = $this->load('Default');\n $this->indexes[] = 'Default';\n }\n }", "title": "" }, { "docid": "b932b37853cfebf55466896caf292e3b", "score": "0.47288948", "text": "public function __construct()\n\t{\n\t\tif ($this->_debug)\n\t\t{\n\t\t\t$this->setDebug(1);\n\t\t}\n\n\t\tif ($this->_cacheType == 'redis')\n\t\t{\n\t\t\t$this->_redis = new Redis();\n\t\t\t$this->_redis->connect('/tmp/redis.sock');\n\t\t\t$this->_redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);\n\t\t}\n\t}", "title": "" }, { "docid": "2f4fa3ffb5dcf740405c370e481486aa", "score": "0.47052646", "text": "public function init()\n\t{\n\t\tparent::init();\n\t\tif($this->keyPrefix===null)\n\t\t\t$this->keyPrefix=Yii::app()->getId();\n\t}", "title": "" }, { "docid": "a9c59942b99e749d7104d7b9a8fcdd84", "score": "0.47036767", "text": "static public function getCacheInstance()\n {\n if(null === self::$_cache){\n $options = Mage::app()->getConfig()->getNode('global/faonni_fpc');\n if(!$options){\n self::$_cache = Mage::app()->getCacheInstance();\n return self::$_cache;\n }\n $options = $options->asArray();\n foreach(array('backend_options', 'slow_backend_options') as $tag){\n if(!empty($options[$tag]['cache_dir'])){\n $options[$tag]['cache_dir'] = Mage::getBaseDir('var') . DS . $options[$tag]['cache_dir'];\n Mage::app()->getConfig()->getOptions()->createDirIfNotExists($options[$tag]['cache_dir']);\n }\n }\n self::$_cache = Mage::getModel('core/cache', $options);\n }\n return self::$_cache;\n }", "title": "" }, { "docid": "0db19df0a3384e9099338ab988a704b4", "score": "0.46986905", "text": "public function __construct(\n Cache $cache,\n \\Iterator $servers,\n string $cdnPath,\n array $hashes,\n ?string $wowPath = null\n ) {\n $this->cache = $cache;\n $this->servers = $servers;\n $this->cdnPath = $cdnPath;\n\n if (!is_null($wowPath)) {\n $wowPath = rtrim($wowPath, DIRECTORY_SEPARATOR);\n\n $this->indexPath = sprintf('%2$s%1$sData%1$sindices', DIRECTORY_SEPARATOR, $wowPath);\n if (!is_dir($this->indexPath)) {\n fwrite(STDERR, sprintf(\"Could not find remote indexes locally at %s\\n\", $this->indexPath));\n $this->indexPath = null;\n } else {\n $this->indexPath .= DIRECTORY_SEPARATOR;\n }\n }\n\n foreach ($hashes as $hash) {\n if ($this->indexPath && file_exists($this->indexPath . $hash . '.index')) {\n $this->indexLocations[$hash] = static::LOCATION_WOW;\n } elseif ($cache->fileExists(static::buildCacheLocation($hash))) {\n $this->indexLocations[$hash] = static::LOCATION_CACHE;\n } else {\n $this->indexLocations[$hash] = static::LOCATION_NONE;\n }\n }\n\n arsort($this->indexLocations);\n }", "title": "" }, { "docid": "e7672db86345523a66f9317ed9caefd7", "score": "0.46972805", "text": "protected function makeCacheKey()\n {\n return 'log' . $this->id;\n }", "title": "" }, { "docid": "02930258feaed7b875b3c100eb7f9c76", "score": "0.46908465", "text": "public function cache($options);", "title": "" }, { "docid": "ba32bc57227d46e23efc9c8b665dcc5e", "score": "0.4682903", "text": "public function withIndex(string $index): self\n {\n $metadata = clone $this;\n $metadata->index = $index;\n\n return $metadata;\n }", "title": "" }, { "docid": "56d258c744afcf4d9977130a7dcfc5af", "score": "0.46781948", "text": "public function __construct($key=''){\n\t\t$this->key = $key;\n\t}", "title": "" }, { "docid": "98802de61e752ba6a8f6ea8ff456eb68", "score": "0.46763867", "text": "public function getCacheKeyInfo()\n {\n $cacheId = parent::getCacheKeyInfo();\n $cacheId['can_show_navigation'] = Mage::helper('privatesales')->canShowNavigation();\n $cacheId['short_cache_id'] = md5(implode('|', array_values($cacheId)));\n return $cacheId;\n }", "title": "" }, { "docid": "8491320fce96afa7dcffb6e0ff4dde14", "score": "0.46687695", "text": "public function cache()\r\n\t{\r\n\t $this->_parts['sql']['SQL_CACHE'] = 'SQL_CACHE';\r\n\t return $this;\r\n\t}", "title": "" }, { "docid": "6851ba0ce038944e1794d5e6d798675d", "score": "0.466798", "text": "function __construct($gist_id, $file_name = null, $cache = true) {\n // create the urls\n $this->url = sprintf(Gist::EMBED_URL, $gist_id);\n $this->source_url = sprintf(Gist::RAW_URL, $gist_id);\n\n // does this gist use caching\n $this->cache = $cache;\n\n // encode the gist id for where to save it\n $this->cache_file_name = sha1($gist_id);\n\n /*\n * if using a file_name\n * then update the urls\n */\n if( $file_name !== null ) {\n $this->url .= '?file=' . $file_name;\n $this->source_url .= $file_name;\n\n $this->cache_file_name .= '-' . sha1($file_name);\n }\n }", "title": "" }, { "docid": "04cd7a7e3ed3c2d9858b077a9f86f2d0", "score": "0.46623707", "text": "private function initializeForPrefix(): void\n {\n $keys = AdapterUtil::getPropertyValue($this, 'keys');\n $values = AdapterUtil::getPropertyValue($this, 'values');\n\n if (null === $values) {\n $file = AdapterUtil::getPropertyValue($this, 'file');\n $values = @(include $file) ?: [];\n\n AdapterUtil::setPropertyValue($this, 'keys', $keys);\n AdapterUtil::setPropertyValue($this, 'values', $values);\n }\n }", "title": "" }, { "docid": "1a1d3332981a64ff37e0e61a70c372ee", "score": "0.46574637", "text": "protected function getCacheKey(){\r\n return md5(serialize([$this->fetchMode, $this->query]));\r\n }", "title": "" }, { "docid": "3c8788689bd10f68c03821ea4fb86465", "score": "0.4657207", "text": "public function getCacheKey()\n {\n return $this->country.'_'.$this->city.now()->format(\"Ymd\");\n }", "title": "" }, { "docid": "fed3effd905309c3f000a85cc595bcb5", "score": "0.46544152", "text": "public function initCache()\n {\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\MemoryStore();\n\n\n // create \\Memcached object pointing to your Memcached server\n $client = new \\Memcached();\n $client->addServer('localhost', 11211);\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\Memcached($client);\n\n\n // create \\Redis object pointing to your Redis server\n $client = new \\Redis();\n $client->connect('127.0.0.1');\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\Redis($client);\n\n\n // create \\CouchbaseBucket object pointing to your Couchbase server\n $cluster = new \\CouchbaseCluster('couchbase://localhost');\n $bucket = $cluster->openBucket('default');\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\Couchbase($bucket);\n\n\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\Apc();\n\n // create \\PDO object pointing to your MySQL server\n $client = new \\PDO('mysql:dbname=cache;host=127.0.0.1', 'root', '');\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\MySQL($client);\n\n\n // create Flysystem object\n $adapter = new \\League\\Flysystem\\Adapter\\Local('/path/to/cache', LOCK_EX);\n $filesystem = new \\League\\Flysystem\\Filesystem($adapter);\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\Flysystem($filesystem);\n\n\n // create Scrapbook cache object\n $cache = new \\MatthiasMullie\\Scrapbook\\Adapters\\MemoryStore();\n //____________________________________\n\n // set a value\n $cache->set('key', 'value'); // returns true\n\n // get a value\n $cache->get('key'); // returns 'value'\n }", "title": "" }, { "docid": "53dd11ac61b0ee0387912d453a5a493d", "score": "0.46523353", "text": "protected function create_cache_key($key)\n\t{\n\t\tif ($key === null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\treturn (ICanBoogie\\CACHE_ACTIVERECORDS ? 'ar:' . ICanBoogie\\DOCUMENT_ROOT : '') . $this->connection->id . '/' . $this->name . '/' . $key;\n\t}", "title": "" }, { "docid": "eab2ec92743795ae8b1540e502616b50", "score": "0.4645626", "text": "public function searchIndex()\n {\n $ft = $this->_sqlite ? \"\" : \" FULLTEXT\";\n $key = Sanitize::toKey( $this->_name .\"_search\" );\n $this->_keys[ $key ] = \"CREATE\".$ft.\" INDEX `\".$key.\"` ON `\".$this->_name.\"` (`\".implode( \"`,`\", func_get_args() ).\"`)\";\n return $this;\n }", "title": "" }, { "docid": "de8bb8fe8aaa330dd4e1be481311cb6d", "score": "0.46385902", "text": "public function __construct(array $options)\n {\n if (isset($options['filters'])) {\n $this->filters = $options['filters'];\n } else {\n throw new \\InvalidArgumentException('The \"filters\" attribute of MediaCacheableField is required.');\n }\n if (isset($options['path_getter'])) {\n $this->pathGetter = $options['path_getter'];\n } else {\n throw new \\InvalidArgumentException('The \"path_getter\" attribute of MediaCacheableField is required.');\n }\n }", "title": "" }, { "docid": "69df1355e700b2c49edbb1ca7f4ebb51", "score": "0.46363264", "text": "abstract protected function getCacheBackend();", "title": "" }, { "docid": "111cfe88b75406d844ff70a22c8a4b27", "score": "0.4633289", "text": "public function getCacheKey() {\n return $this->_cacheKey;\n }", "title": "" }, { "docid": "f48a0c51443abc5c3a7fcdd132535ddc", "score": "0.46272933", "text": "protected function GetCacheKey()\n\t{\n\t\treturn (isset($this->params['hash']) ? $this->params['hash'] : '') . '|' . (isset($this->params['file']) ? sha1($this->params['file']) : '') . '|' . $this->params['page'];\n\t}", "title": "" }, { "docid": "eb997022fe9a3f9d8d2a4d7749c2930b", "score": "0.4624423", "text": "function __construct($idBase=false, $cache = false){ \t\r\n\t\t\r\n\t\ttry {\r\n\t\t $this->getDb($idBase);\r\n\t \r\n\t $this->idInst = -1;\r\n\t \r\n\t\t\t$frontendOptions = array(\r\n\t 'lifetime' => 86400, // temps de vie du cache en seconde\r\n\t 'automatic_serialization' => true,\r\n\t \t'caching' => $cache //active ou desactive le cache\r\n\t ); \r\n\t $backendOptions = array(\r\n\t // Répertoire où stocker les fichiers de cache\r\n\t 'cache_dir' => '../tmp/'\r\n\t ); \r\n\t // créer un objet Zend_Cache_Core\r\n\t $this->cache = Zend_Cache::factory('Core',\r\n\t 'File',\r\n\t $frontendOptions,\r\n\t $backendOptions); \r\n\t\t}catch (Zend_Exception $e) {\r\n\t echo \"Récupère exception: \" . get_class($e) . \"\\n\";\r\n\t echo \"Message: \" . $e->getMessage() . \"\\n\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0012683a186b556a481c84315331fe34", "score": "0.46209535", "text": "public function __construct() {\n\t\t$this->sysconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mnogosearch']);\n\t\t$this->configFileName = $this->getTempFileName();\n\t\t$this->getSilenceOption();\n\t\t$this->getExtraIndexerArguments();\n\t}", "title": "" }, { "docid": "359ff9da88b177602cff32c0f38db043", "score": "0.46200415", "text": "public function __construct() {\n $this->storageEngine = new \\stdClass();\n $this->nodeKeys = [\n 'reference_fill',\n 'system_url',\n 'alias_url',\n 'edit_url',\n ];\n }", "title": "" }, { "docid": "8ca7e9cc5c4acc508de8b6a3320b77e5", "score": "0.46186227", "text": "private function encodeRasterCacheName() {\r\n\t\t$filename = md5(implode('.', $this->imageoptions));\r\n\r\n\t\t// Determine the directory for this cache file, based on the first two characters of the filename.\r\n\t\t$directory = $this->cachedir . '/' . substr($filename, 0, 2);\r\n\r\n\t\t// Return the full file path of the cache file.\r\n\t\treturn $directory . '/' . $filename;\r\n\r\n\t}", "title": "" }, { "docid": "b39b3797c8e243313c036c1b54d2f550", "score": "0.4605021", "text": "public function __construct()\n {\n $this->path = Constant::IMAGE_PATH;\n $this->storage = Storage::disk(Constant::DISK);\n\n }", "title": "" }, { "docid": "35a91a6d50d1cd039865a4e432a2c1d7", "score": "0.4592601", "text": "function coresys_cache_Initialize($storage='auto')\n{\n if ($storage !== phpFastCache::$storage) {\n phpFastCache::$storage = $storage;\n }\n return phpFastCache();\n}", "title": "" }, { "docid": "eb5d9513d8755cc68fceba7548e9f7a7", "score": "0.45862472", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->keys = collect([\n 'id',\n 'version',\n 'set_num',\n ]);\n }", "title": "" }, { "docid": "1db1e2cb068afc4426c2cbeb9f0724a4", "score": "0.45754886", "text": "public function __construct() {\n // Base key\n $this->prefix = '_presscount_shares_';\n\n // Allowed networks\n $this->networks = array(\n 'facebook',\n 'linkedin',\n 'pinterest'\n );\n\n add_action( 'wp_ajax_clear_presscount_cache', array( $this, 'ajax_clear_cache' ) );\n add_action( 'wp_ajax_nopriv_clear_presscount_cache', array( $this, 'ajax_clear_cache' ) );\n }", "title": "" }, { "docid": "29b1bc912f124073372ac01462341ea1", "score": "0.4575102", "text": "public function __construct(Repository $cache, $key, $limit, $time)\n {\n $this->cache = $cache;\n $this->key = $key;\n $this->limit = $limit;\n $this->time = $time;\n }", "title": "" }, { "docid": "2a30cec3cc350d466ecb334816f93b36", "score": "0.45738912", "text": "public function getCache();", "title": "" }, { "docid": "2a30cec3cc350d466ecb334816f93b36", "score": "0.45738912", "text": "public function getCache();", "title": "" }, { "docid": "2a30cec3cc350d466ecb334816f93b36", "score": "0.45738912", "text": "public function getCache();", "title": "" }, { "docid": "096dc5fbdf4f2dd3faab40cd3ff2e3a5", "score": "0.45653245", "text": "public function init()\n {\n parent::init();\n if (!$this->cache) {\n $this->setPrimary('cache');\n }\n }", "title": "" }, { "docid": "92940a53443ad1492bfef50243d067a8", "score": "0.4562657", "text": "public function __construct() {\n\t\t$sysconf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['mnogosearch']);\n\t\t$this->indexerPath = $sysconf['mnoGoSearchPath'] . '/sbin/indexer';\n\t}", "title": "" }, { "docid": "6593b210149b3fdfdfb1bcda8b2dcaf3", "score": "0.4562192", "text": "public function __construct()\n {\n self::$constCache = [];\n }", "title": "" }, { "docid": "9d645b810969c9dbad337cad724f5ccd", "score": "0.45603222", "text": "protected function _initCache() {\n // Db metadata cache\n $frontendOptions = array(\n 'automatic_serialization' => true\n );\n $backendOptions = array(\n 'cache_dir' => DATA_PATH . 'cache' . DS . 'dbMeta'\n );\n $cache = Zend_Cache::factory('Core', 'File', $frontendOptions, $backendOptions);\n Zend_Db_Table_Abstract::setDefaultMetadataCache($cache);\n }", "title": "" }, { "docid": "016b119739387e21ba2cb005edc805bf", "score": "0.45585683", "text": "public function GetCacheKey()\n\t{\n\t\t$key = parent::GetCacheKey();\n\t\tif (!empty($key))\n\t\t\t$key .= '|';\n\n\t\t$key .= 'tag|' . $this->refName;\n\t\t\n\t\treturn $key;\n\t}", "title": "" }, { "docid": "60c2e5552cc79a6e55e04eecfaee74ce", "score": "0.45476347", "text": "public function __construct($key, $baseUri, $timeout)\n {\n $this->api = new ApicacheApiClient($key, $baseUri, $timeout);\n $this->cache = new ApicacheCacheInterface();\n }", "title": "" }, { "docid": "fa57846161e388463dce38fbc453ba71", "score": "0.45453998", "text": "public function __construct(){\n\t\tglobal $prefix;\n\t\t$prefix = 'i4_';\n\t }", "title": "" }, { "docid": "78a69813836baefb87cdebf6600a2303", "score": "0.45384744", "text": "public function __construct($options = array())\n {\n if (!is_array($options)) {\n throw new \\InvalidArgumentException('File Cache require options as an array.');\n }\n\n if (!array_key_exists('directory', $options)) {\n throw new \\InvalidArgumentException(\n \t'File Cache require cache directory path in options. '.\n 'Example: new FileCache(array(\\'directory\\' => \\'/tmp\\'));'\n );\n }\n $directory = $options['directory'];\n\n if (!is_dir($directory) && ! @mkdir($directory, 0777, true)) {\n throw new \\InvalidArgumentException(sprintf(\n 'Cache directory \"%s\" does not exist and could not be created.',\n $directory\n ));\n }\n\n if (!is_writable($directory)) {\n throw new \\InvalidArgumentException(sprintf(\n 'The directory \"%s\" is not writable.',\n $directory\n ));\n }\n\n if (array_key_exists('dirlvl', $options)) {\n $dirlvl = (int)$options['dirlvl'];\n if ((int)$dirlvl > 32 ) {\n throw new \\InvalidArgumentException('Dir Level cant be greater than 32.');\n }\n }\n parent::setOptions($options);\n }", "title": "" }, { "docid": "2df506c5f32dba64635d3fd46d8fec38", "score": "0.45362097", "text": "protected function get_cache_key() {\n\t\t$cache_key = parent::get_cache_key();\n\n\t\tif ( $this->status ) {\n\t\t\t$cache_key .= '_' . $this->status;\n\t\t}\n\n\t\treturn $cache_key;\n\t}", "title": "" }, { "docid": "8bd6db23daca532621d46dc82ae62a20", "score": "0.45233396", "text": "public function getCacheKey(): string\n {\n return $this->cacheKey;\n }", "title": "" }, { "docid": "18b2d41938e6bc03422df027eedb8e71", "score": "0.45213118", "text": "protected function getPathnamesCacheId() {\n return \"system.{$this->type}.files\";\n }", "title": "" }, { "docid": "a3cb9b1a3427acbb2d39bc9dfc6f4264", "score": "0.45209232", "text": "private function _startCache() {\n\t\t$cache_engine = empty($this->_config['cache']['engine']) ?'NoCache' :$this->_config['cache']['engine'];\n\t\t$cache_engine = 'Zamp_Cache_'.$cache_engine;\n\t\t\n\t\t$cache_config = empty($this->_config['cache']) ?[] :$this->_config['cache'];\n\t\t\n\t\treturn $this->_cache = Zamp::$instances[$cache_engine] = new $cache_engine($cache_config);\n\t}", "title": "" }, { "docid": "fdfd2dd6272fdd1274990b43d780822d", "score": "0.45160013", "text": "public function init()\n\t{\n\t\tswitch (craft()->config->get('cacheMethod'))\n\t\t{\n\t\t\tcase CacheMethod::APC:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new ApcCache();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::Db:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new DbCache();\n\t\t\t\t$this->_cacheComponent->gCProbability = craft()->config->get('gcProbability', ConfigFile::DbCache);\n\t\t\t\t$this->_cacheComponent->cacheTableName = craft()->db->getNormalizedTablePrefix().craft()->config->get('cacheTableName', ConfigFile::DbCache);;\n\t\t\t\t$this->_cacheComponent->autoCreateCacheTable = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::EAccelerator:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new EAcceleratorCache();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::File:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new FileCache();\n\t\t\t\t$this->_cacheComponent->cachePath = craft()->config->get('cachePath', ConfigFile::FileCache);\n\t\t\t\t$this->_cacheComponent->gCProbability = craft()->config->get('gcProbability', ConfigFile::FileCache);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::MemCache:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new MemCache();\n\t\t\t\t$this->_cacheComponent->servers = craft()->config->get('servers', ConfigFile::Memcache);\n\t\t\t\t$this->_cacheComponent->useMemcached = craft()->config->get('useMemcached', ConfigFile::Memcache);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::Redis:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new RedisCache();\n\t\t\t\t$this->_cacheComponent->hostname = craft()->config->get('hostname', ConfigFile::RedisCache);\n\t\t\t\t$this->_cacheComponent->port = craft()->config->get('port', ConfigFile::RedisCache);\n\t\t\t\t$this->_cacheComponent->password = craft()->config->get('password', ConfigFile::RedisCache);\n\t\t\t\t$this->_cacheComponent->database = craft()->config->get('database', ConfigFile::RedisCache);\n\t\t\t\t$this->_cacheComponent->timeout = craft()->config->get('timeout', ConfigFile::RedisCache);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::WinCache:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new WinCache();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::XCache:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new XCache();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase CacheMethod::ZendData:\n\t\t\t{\n\t\t\t\t$this->_cacheComponent = new ZendDataCache();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Init the cache component.\n\t\t$this->_cacheComponent->init();\n\n\t\t// Init the cache service.\n\t\tparent::init();\n\t}", "title": "" } ]
ad56a0e3a4376b5766c92dce0ddc327e
Gets info about a category
[ { "docid": "4ac6a05a9ab4d27980511e763cd60f41", "score": "0.64158076", "text": "public function getInfo($category_id, $cleanName = false)\n {\n //Note: we don't ask for the leveled field ID here since that is unique\n //to the value ID.\n $db = DataAccess::getInstance();\n $category_id = (int)$category_id;\n $language_id = (int)geoSession::getInstance()->getLanguage();\n\n $row = $db->GetRow(\"SELECT * FROM \" . geoTables::categories_table . \" v, \" . geoTables::categories_languages_table . \" l WHERE l.category_id=v.category_id AND l.language_id={$language_id} AND v.category_id=?\", array($category_id));\n\n $row = $this->normInfo($row);\n //unescape name\n $row['name'] = geoString::fromDB($row['name']);\n if ($cleanName) {\n //some places need it raw, others need it already cleaned...\n $row['category_name'] = $row['name'];\n }\n $row['description'] = geoString::fromDB($row['description']);\n $row['category_image'] = geoString::fromDB($row['category_image']);\n\n $row['excluded_list_types'] = array();\n //get excluded list types\n $all = $db->Execute(\"SELECT * FROM \" . geoTables::category_exclusion_list . \" WHERE `category_id`=?\", array($category_id));\n if ($all) {\n foreach ($all as $exclude_row) {\n $row['excluded_list_types'][$exclude_row['listing_type']] = 1;\n }\n }\n return $row;\n }", "title": "" } ]
[ { "docid": "90d4003da8f182f1dc90cad950c541ac", "score": "0.7208945", "text": "public function getCategory()\n {\n return $this->get(self::category);\n }", "title": "" }, { "docid": "71473b8f21aef80fad5e5f00f46cbfe4", "score": "0.7148252", "text": "function category() {\n $category = $this->jsonData->entry->category[1]->{'label'};\n return $category;\n }", "title": "" }, { "docid": "9c900424e5793607de8378fb3869de74", "score": "0.71288127", "text": "public function getCategory(){\n echo $this->category;\n }", "title": "" }, { "docid": "91db86a81b591b578de9ca873186144b", "score": "0.71023476", "text": "public function getCategory()\n {\n return $this->httpGet('wxaapi/newtmpl/getcategory');\n }", "title": "" }, { "docid": "8fbc6c106d5a9427baef63f10587a65f", "score": "0.7074524", "text": "public function get_category() {\n\t\treturn unique_lookup(\"db_Categories\", $this->get(\"CategoryID\"),\n\t\t\t\"CategoryID\", \"Description\"); \n\t}", "title": "" }, { "docid": "31cc6e19276010c0914a3721c77a269e", "score": "0.7052687", "text": "public static function show_category($id){\n\n $info = Category::find($id);\n\n return $info;\n \n }", "title": "" }, { "docid": "4915dda2bf94468f24a6cf4db2d853a1", "score": "0.6943068", "text": "public function category();", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "ec27bcd7a203f23e0123967d154419de", "score": "0.6940915", "text": "public function getCategory()\n {\n return $this->category;\n }", "title": "" }, { "docid": "bd3f9a70586294e5c9308032800e9de1", "score": "0.6926529", "text": "public function getCategory() \n {\n return $this->category;\n }", "title": "" }, { "docid": "3d04de9a814101605446fdbbbe6cc312", "score": "0.69222945", "text": "public function get($category_id);", "title": "" }, { "docid": "8056a4fd1ec6adee07e90853d97c06f5", "score": "0.69131064", "text": "public function getCategory(){ return CategoryData::getById($this->CATEGORIA_ID);}", "title": "" }, { "docid": "0bb1916ce92419f164a41be152df56c1", "score": "0.6866331", "text": "public function getCategory()\n {\n }", "title": "" }, { "docid": "660a79a2178efcfbed3a66d751449202", "score": "0.686089", "text": "public function getCategory() {\n return $this->category;\n }", "title": "" }, { "docid": "660a79a2178efcfbed3a66d751449202", "score": "0.686089", "text": "public function getCategory() {\n return $this->category;\n }", "title": "" }, { "docid": "660a79a2178efcfbed3a66d751449202", "score": "0.686089", "text": "public function getCategory() {\n return $this->category;\n }", "title": "" }, { "docid": "660a79a2178efcfbed3a66d751449202", "score": "0.686089", "text": "public function getCategory() {\n return $this->category;\n }", "title": "" }, { "docid": "49194641c179069177590053314d5b5d", "score": "0.685192", "text": "public function getCategory()\n {\n $c = Category::All();\n return response()->json([\n 'statusCode' => $this->ok,\n 'msg' => 'ok',\n 'category' => $c,\n ], $this->ok);\n }", "title": "" }, { "docid": "e33a2a13bbb1012757feeff7aea1d75a", "score": "0.6850034", "text": "public static function getCategory()\n\t{\n\t\treturn self::$category[0];\n\t}", "title": "" }, { "docid": "b1fccb11fc16857fd17acdaaa0c306b6", "score": "0.68355757", "text": "public function getCategory()\n {\n return KraCategory::get(['id', 'name']);\n \n }", "title": "" }, { "docid": "1d114efb0e31c1ef1106506f4e0dfdfb", "score": "0.6820948", "text": "public function getCategory() {\n\t\treturn $this->category;\n\t}", "title": "" }, { "docid": "1d114efb0e31c1ef1106506f4e0dfdfb", "score": "0.6820948", "text": "public function getCategory() {\n\t\treturn $this->category;\n\t}", "title": "" }, { "docid": "1d114efb0e31c1ef1106506f4e0dfdfb", "score": "0.6820948", "text": "public function getCategory() {\n\t\treturn $this->category;\n\t}", "title": "" }, { "docid": "00619d776532bb140c313f289b91f710", "score": "0.68203634", "text": "public function getCategory()\n {\n return $this->_category;\n }", "title": "" }, { "docid": "00619d776532bb140c313f289b91f710", "score": "0.68203634", "text": "public function getCategory()\n {\n return $this->_category;\n }", "title": "" }, { "docid": "b55d7e37f7172c4d6c39d3d818d12bb3", "score": "0.67536247", "text": "public function getCategory(): string\n {\n return $this->category;\n }", "title": "" }, { "docid": "6d3aad9fe5ec673cce71ada7e4b3b8a4", "score": "0.66878724", "text": "function getCategory()\r\n\t {\r\n\t \t$db = & JFactory::getDBO();\r\n\t\t\t$query = 'select category_id,category_name from #__vm_category';\r\n\t\t\t$db->setQuery($query);\r\n\t\t\t$db->query();\r\n\t\t\t$result = $db->loadObjectList();\r\n\t\t\treturn $result;\r\n\t }", "title": "" }, { "docid": "b9ce96626196ee2518ae0cb03d465202", "score": "0.6682632", "text": "function view_category() {\n if($this->request->isApiCall()) {\n if($this->active_category->isLoaded()) {\n $this->response->respondWithData($this->active_category, array(\n 'as' => 'category', \n \t'detailed' => true, \n ));\n } else {\n $this->response->notFound();\n } // if\n } else {\n $this->response->badRequest();\n } // if\n }", "title": "" }, { "docid": "2c9342a6f3c2ae19d4d6a97bace5e242", "score": "0.6631605", "text": "public function getCategory(): string\n\t{\n\t\treturn $this->category;\n\t}", "title": "" }, { "docid": "e4b2a9f6c1742dfed7cecc42f6898217", "score": "0.66238123", "text": "public static function getBasicInfo($category_id = 0, $language_id = 0)\n {\n $db = DataAccess::getInstance();\n if (!$category_id) {\n //TODO: get this text from the DB somewhere...\n return array('category_name' => \"Main\");\n }\n if (!$language_id) {\n $language_id = $db->getLanguage();\n }\n if (isset(self::$_getInfoCache[$category_id][$language_id])) {\n return self::$_getInfoCache[$category_id][$language_id];\n }\n\n $sql = \"SELECT l.`category_name`,l.`seo_url_contents`,l.`category_cache`,l.`cache_expire`,l.`description`,c.`parent_id` FROM \" . geoTables::categories_languages_table . \" l, \" . geoTables::categories_table . \" c WHERE l.category_id=c.category_id AND c.enabled='yes' AND c.`category_id` = ? AND l.language_id = ? LIMIT 1\";\n $result = $db->Execute($sql, array($category_id, $language_id));\n if (!$result || $result->RecordCount() == 0) {\n trigger_error('ERROR CATEGORY SQL: Cat not found for id: ' . $category_id . ', Sql: ' . $sql . ' Error Msg: ' . $db->ErrorMsg());\n return false;\n }\n $show = $result->FetchRow();\n if ($show['parent_id'] > 0 && !geoCategory::isEnabled($show['parent_id'])) {\n //one of the parents is not enabled\n trigger_error('ERROR CATEGORY: One of the category parents is disabled');\n return false;\n }\n $show['category_name'] = geoString::fromDB($show['category_name']);\n $show['description'] = geoString::fromDB($show['description']);\n $show['seo_url_contents'] = geoString::fromDB($show['seo_url_contents']);\n //save it, so we don't query the db a bunch\n self::$_getInfoCache[$category_id][$language_id] = $show;\n return $show;\n }", "title": "" }, { "docid": "32b7830d6bb3582a1f21a8cd759a153a", "score": "0.6617737", "text": "public function getCategory() {\n\t\treturn $this->channel->category;\n\t}", "title": "" }, { "docid": "1d5b8f61b8fab532790b0cfc368dc463", "score": "0.65901744", "text": "public function getCategory()\n {\n return isset($this->category) ? $this->category : null;\n }", "title": "" }, { "docid": "1d5b8f61b8fab532790b0cfc368dc463", "score": "0.65901744", "text": "public function getCategory()\n {\n return isset($this->category) ? $this->category : null;\n }", "title": "" }, { "docid": "0980c6b325dbb76bafb990a83abcb6dc", "score": "0.6581469", "text": "function getInfosCategory(){\n\t$db = dbConnect();\n\n\t$infosCategory = $db->prepare('SELECT id,name, priority FROM category');\n\t$infosCategory->execute();\n\n\treturn $infosCategory;\n}", "title": "" }, { "docid": "0dc371c2254e794e5b179a256a9938bc", "score": "0.6580791", "text": "public function get_category_info( $id_category_ )\n\t\t{\n\t\t\t// Select the necessary data from DB\n\t\t\t$sql = \"SELECT `ID_CATEGORIA`, `NOME`\n\t\t\tFROM \n\t\t\t\t`categorias`\n\t\t\tWHERE \n\t\t\t\t`ID_CATEGORIA` = \" . $id_category_ . \" AND\n\t\t\t\t`DATA_FECHA` IS NULL\";\n\n\t\t\t// Execute the query\n\t\t\t$query = $this->db->query($sql);\n\n\t\t\t// Check if query worked\n\t\t\tif ( $query )\n\t\t\t\treturn $query->fetchAll();\n\t\t\telse\n\t\t\t\treturn 0;\n\t\t}", "title": "" }, { "docid": "7ada2d2c5e0255765eb7efb8176d2720", "score": "0.65759194", "text": "function cbnetdpppGetCategory() {\n\t\tglobal $wp_query;\n\t\tglobal $wpdb;\n\t\t\n\t\tif ( $wp_query->is_category ) {\n\t\t\tif ( !($category_id = $wp_query->get('cat')) ) {\n\t\t\t\t$category = $wp_query->get('category_name');\n\t\t\t\tif ( $this->cbnetdppp_wp_version < 2.3 ) {\n\t\t\t\t\t$sqlstr = \"SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '\". $wpdb->escape($category) .\"'\";\n\t\t\t\t} else {\n\t\t\t\t\t$sqlstr = \"SELECT term_id FROM $wpdb->terms WHERE slug = '\". $wpdb->escape($category) .\"'\";\n\t\t\t\t}\n\t\t\t\t$category_id = (int) $wpdb->get_var($sqlstr);\n\t\t\t}\n\t\t\tif ( $this->cbnetdppp_values['cat_'.$category_id] ) {\n\t\t\t\t$this->cbnetdppp_cat = 'cat_'.$category_id;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e53d5ceef7983ac0f2929e24d090341e", "score": "0.654508", "text": "protected function ResponseInfo()\n {\n $response = array();\n $CategoryType = new CategoryType($this->app);\n\n foreach (self::$categories as $category_id) {\n if (false !== ($category = $CategoryType->select($category_id))) {\n $response[] = $category;\n }\n }\n\n return $response;\n }", "title": "" }, { "docid": "46336daeaad08954f1f5c3a2570f82c9", "score": "0.6532755", "text": "public function getCategory() {\n return !empty($this->data->category) ? $this->data->category : null;\n }", "title": "" }, { "docid": "e53934a93bc1d1218dae00ee4679afd0", "score": "0.65264857", "text": "public function _retrieve()\n {\n return $this->getCategory()->getData();\n }", "title": "" }, { "docid": "5b50afb6d2152de49ee55a0965c9c93f", "score": "0.651643", "text": "function get_category($category_name){\n\tglobal $no, $GO_SECURITY;\n\t$category = $no->get_category_by_name($category_name);\n\tif($category)\n\t\treturn $category;\n\n\t$category['name']=$category_name;\n\t$category['user_id']=1;\n\t$category['acl_id']=$GLOBALS['GO_SECURITY']->get_new_acl('notes', $category['user_id']);\n\t$category['id']=$no->add_category($category);\n\n\treturn $category;\n}", "title": "" }, { "docid": "3ce737db94fff5b2186371af9c7c5f14", "score": "0.64916056", "text": "public function getSongInfoByCategory($category){\n $query=$this->db->query('SELECT *FROM ms_article WHERE category='.$category.' ORDER BY created DESC');\n return $query->result();\n }", "title": "" }, { "docid": "3e5e0467450e91875f9476f1608a2cfe", "score": "0.6490696", "text": "public function get_details($category_id){\n\t\t\t\t\n // Open db instance\n $db = new DB();\n\t\t\n\t\t$conn = $db->connect_db();\n $result = pg_query($conn, \"select * from category where category_id=\".$category_id);\n\t if (!$result) {\n\t\terror_log( \"An error occurred while retrieving category details.\\n\");\n\t\texit;\n\t }\n\t\treturn pg_fetch_all($result);\n\t}", "title": "" }, { "docid": "28ba5df94ad3c691c77f452f5931319b", "score": "0.64780724", "text": "function displayCategory()\n\t{\n\t\t//include(\"classes/Display/DCategorySelection.php\");\n\t\t$sql = \"SELECT * FROM category_table where category_parent_id=0\";\n\t\t$query = new Bin_Query();\n\t\tif($query->executeQuery($sql))\n\t\t\treturn $this->data['showcategory'] = Display_DFeaturedItems::listCategory($query->records);\n\t}", "title": "" }, { "docid": "64e00a647fcba409c13da03ede607e36", "score": "0.64712054", "text": "public function categoryList () {\n\t\t$args = array();\n\n\t\treturn $this->getData('category/list', $args);\n\t}", "title": "" }, { "docid": "8017c872fa2eb5776dabeb8498eb92b0", "score": "0.64682317", "text": "function tsd_json_plugin_get_category_info( $post ) {\n $primary_category_id = get_post_meta( $post->ID, '_yoast_wpseo_primary_category', true );\n $primary_category = null;\n if ( empty( $primary_category_id ) ) {\n $main_categories = [ 'featured', 'NEWS', 'SPORTS', 'opinions', 'thegrind', 'arts-life' ];\n foreach ( $main_categories as $main_category ) {\n if ( in_category( $main_category, $post ) ) {\n $primary_category = get_category_by_slug( $main_category );\n break;\n }\n }\n if ( is_null( $primary_category ) ) {\n // If the post is not in any `$main_categories`, simply get the first post category.\n $post_categories = get_the_category( $post->ID );\n if ( count( $post_categories ) > 0 ) {\n $primary_category = $post_categories[0];\n }\n }\n } else {\n $primary_category = get_category( $primary_category_id );\n }\n\n if ( ! is_null( $primary_category ) ) {\n return tsd_json_plugin_get_category( $primary_category );\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "78c8dc6b0fb5a3cd8ba803b77e237ac9", "score": "0.646761", "text": "function getCategoryList(){\n }", "title": "" }, { "docid": "69062ad4096158fc3184a4d7c003e0a7", "score": "0.64637303", "text": "public function getCategory()\n\t\t{\n\t\t\t$this->layout = \"index\";\n\t\t\t$this->set('title', 'Category (Linnworks API)');\n\t\t}", "title": "" }, { "docid": "eb34799d570a4775a8f62c7d35b1e32f", "score": "0.64561987", "text": "function load_category() {\n $this->category = $this->get_category();\n return $this->category;\n }", "title": "" }, { "docid": "28c6cf76a7a37496a41884d69d36b0b1", "score": "0.64452666", "text": "public function getCategoryDetail() {\n\n if (func_num_args() > 0) {\n $categoryname = func_get_arg(0);\n try {\n $select = $this->select()\n ->from(array('c' => 'category'), 'category_id')\n ->setIntegrityCheck(false)\n ->join(array('tc' => 'teachingclasses'), 'c.category_id = tc.category_id', array('tc.user_id','tc.class_id','tc.class_title'))\n ->join(array('tcv'=>'teachingclassvideo'),'tc.class_id = tcv.class_id',array('tcv.video_thumb_url', 'tcv.class_video_url'))\n ->join(array('u'=>'users'),'u.user_id = tc.user_id',array('u.first_name', 'u.last_name'))\n ->join(array('um' => 'usersmeta'), 'u.user_id = um.user_id', array('um.user_profile_pic'))\n ->where('category_name = ?', $categoryname);\n\n $result = $this->getAdapter()->fetchAll($select);\n// echo \"<pre>\"; print_r($result); echo \"</pre>\"; die('123');\n } catch (Exception $e) {\n throw new Exception('Unable To Insert Exception Occured :' . $e);\n }\n\n if ($result) {\n return $result;\n }\n } else {\n throw new Exception('Argument Not Passed');\n }\n }", "title": "" }, { "docid": "0cdc43570159acbc8838266252182f16", "score": "0.6431236", "text": "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 }", "title": "" }, { "docid": "fbac7bd9ddcc612d39e21a9cdc821eef", "score": "0.6401652", "text": "public function getCategory() {\r\n if (!isset($this->_category)) {\r\n $this->_category = $this->_title;\r\n }\r\n return $this->_category;\r\n }", "title": "" }, { "docid": "f66402a86e8d3c7bd68d02f768060337", "score": "0.64004207", "text": "public function get_category(){\n\t\t$this->load->database();\n\t\t$query = $this->db->get(\"category\");\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "57c43026f432ee1d6e7f1ae3c8c030cb", "score": "0.6379527", "text": "public function getCategoryObject()\n {\n return $this->categoryObject;\n }", "title": "" }, { "docid": "d918ad70c47a959446f494677f2c9d25", "score": "0.63793427", "text": "public function getCategoryById($id);", "title": "" }, { "docid": "e1592cfe7137fb2249aee3016cd65471", "score": "0.63769484", "text": "public function showCategory()\n\t{\n\t\techo \"男性用户偏好的分类!\\n\";\n\t}", "title": "" }, { "docid": "7ac5b1ffa45c1929b2a14308d7bb366c", "score": "0.6376336", "text": "public function categoryAction()\n\t{\n\n\t\t//Get Category Module\n\t\t$Module = Modules::find(\"status = '1'\");\n\n\t\tif ($Module != FALSE) {\n\t\t\t$this->view->setVar(\"ListModule\", $Module);\n\t\t}\n\n\t\t// Get category\n\t\t$Cat = Pages::find(array(\"order\" => \"seq\", \"page_id ='0' AND status = '1'\"));\n\n\t\tif ($Cat != FALSE) {\n\t\t\t$this->view->setVar(\"ListCategories\", $Cat);\n\t\t}\n\t}", "title": "" }, { "docid": "9d4c724c921ec22b00b0936e1aff6036", "score": "0.6375617", "text": "protected function getCategory($catid)\n {\n $query = $this->_db->getQuery(true)\n ->select('cid, owner')\n ->from(_JOOM_TABLE_CATEGORIES)\n ->where('cid = '.$catid);\n $this->_db->setQuery($query);\n return $this->_db->loadObject();\n }", "title": "" }, { "docid": "165658247b047fe39b00a039fece4ba8", "score": "0.6375114", "text": "function bm_categoryDetails ($id) {\n\t\n\tbm_getCategories ();\n\t\n\tglobal $bmCategoryList;\n\n\tforeach ($bmCategoryList as $cat) {\n\t\tif ($cat->term_id == $id) {\n\t\t\treturn $cat;\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "d57646e1099c09f85050a8fcdd840459", "score": "0.6362043", "text": "function ciniki_ags_categoryGet(&$ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'permalink'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Category Permalink'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'ags', 'private', 'checkAccess');\n $rc = ciniki_ags_checkAccess($ciniki, $args['tnid'], 'ciniki.ags.categoryGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $strsql = \"SELECT detail_key, detail_value \"\n . \"FROM ciniki_ags_settings \"\n . \"WHERE detail_key LIKE 'category-\" . ciniki_core_dbQuote($ciniki, $args['permalink']) . \"-%' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.ags', 'item');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.ags.237', 'msg'=>'Unable to load item', 'err'=>$rc['err']));\n }\n $category = array(\n 'image' => 0,\n 'description' => '',\n );\n if( isset($rc['rows']) ) {\n foreach($rc['rows'] as $row) {\n if( $row['detail_key'] == \"category-{$args['permalink']}-image\" ) {\n $category['image'] = $row['detail_value'];\n } elseif( $row['detail_key'] == \"category-{$args['permalink']}-description\" ) {\n $category['description'] = $row['detail_value'];\n }\n }\n }\n \n return array('stat'=>'ok', 'category'=>$category);\n}", "title": "" }, { "docid": "1349a7665b9e6a6ee2c56116527728f4", "score": "0.6358031", "text": "function getCategory( $id )\r\n\t\t{\r\n\t\t\techo $this->theCategory( $id );\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.63470113", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.63470113", "text": "public function getCategories();", "title": "" }, { "docid": "5df1635bcdfc20524d79929c28baaf6a", "score": "0.63470113", "text": "public function getCategories();", "title": "" }, { "docid": "03d3ddb313017e162dfbff09ddbd18b4", "score": "0.63381606", "text": "public function getByCategory($category_id);", "title": "" }, { "docid": "f3196e714b9441ff0103c822af6defa3", "score": "0.63243663", "text": "public function get($request)\n {\n $category = $this->repo->fetch($request['id'],['nodes','items']);\n $category = $this->extractDescription($category);\n\n return\n $category->first()->toArray();\n }", "title": "" }, { "docid": "20ae82528b154c6c5d4b187c472e50b9", "score": "0.6311043", "text": "function helper_get_category($category_id)\n {\n $ci =& get_instance();\n return $ci->category_model->get_category($category_id);\n }", "title": "" }, { "docid": "bb1a4cf8cd85ee9c674d0fa5dd2af56f", "score": "0.63100463", "text": "private function getCategoryByID($CatID){\r\n $pdo = Logger::connect();\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $sql = \"Select c.Category from Category c where ID = :uuid\" ;\r\n $q = $pdo->prepare($sql);\r\n $q->bindParam(':uuid',$CatID);\r\n if ($q->execute()){\r\n $row = $q->fetch(PDO::FETCH_ASSOC);\r\n return $row[\"Category\"];\r\n } else {\r\n return \"\";\r\n }\r\n Logger::disconnect();\r\n }", "title": "" }, { "docid": "bbf30d117352a00cd70191b838b200fd", "score": "0.6308808", "text": "public function get_Category()\n {\n if (empty($this->cat)) {\n return 2;\n }\n return $this->cat;\n }", "title": "" }, { "docid": "69faf85a6e609f455944ad048ba9b7fe", "score": "0.63086617", "text": "public function categories()\n\t{\n\t\t$response = $this->client->sendRequest(self::ENDPOINT_PATH, 'GET');\n\t\t$dataCollector = new DataCollector($this->client, $response);\n\t\treturn $dataCollector->getData();\n\t}", "title": "" }, { "docid": "4ceb4312ed50c6d1ea2ccb0b7e4c850e", "score": "0.63041496", "text": "public function getCategoryName(){\n\t\treturn $this->categoryName;\n\t}", "title": "" }, { "docid": "6aed5ea5c5aeabf76906af1b496e3510", "score": "0.6303665", "text": "public function getCategories(){\n return $this->performRequest('GET', '/categories');\n }", "title": "" }, { "docid": "7efdc79c6ca8f9b1a333288c6f932e04", "score": "0.6302944", "text": "public function show(Category $category): Response\n {\n //\n }", "title": "" }, { "docid": "a6830fd7d3b31bbf493d61d8d8c50af3", "score": "0.6299884", "text": "public function show(Category $category)\n {\n\n }", "title": "" }, { "docid": "a6830fd7d3b31bbf493d61d8d8c50af3", "score": "0.6299884", "text": "public function show(Category $category)\n {\n\n }", "title": "" }, { "docid": "a6830fd7d3b31bbf493d61d8d8c50af3", "score": "0.6299884", "text": "public function show(Category $category)\n {\n\n }", "title": "" }, { "docid": "91aa1b78df3396c15c34b7f7de1eb0fc", "score": "0.6292766", "text": "public function __getCategoryName( ){\n\t\treturn $this->categoryName;\n\t}", "title": "" }, { "docid": "e8db59d0d45416516392c095e3fde9bd", "score": "0.62893724", "text": "public function categoryAction() {\n\n //Validate Heder params\n $headersParams = $this->validateHeaderParams();\n\n $userAgent = $headersParams['userAgent'];\n $chapId = $headersParams['chapId'];\n\n //Get all categories\n $ApiModel = new Nexva_Api_NexApi();\n $allCategories = $ApiModel->categoryAction($chapId);\n //$cat_list = array();\n //$cat_list[\"category\"]=$allCategories;\n if (count($allCategories) > 0) \n {\n $this->getResponse()\n ->setHeader('Content-type', 'application/json');\n \n echo str_replace('\\/','/',json_encode($allCategories));\n $this->loggerInstance->log('Response ::' . json_encode($allCategories),Zend_Log::INFO);\n \n\t \n } \n else \n {\n $this->__dataNotFound();\n }\n }", "title": "" }, { "docid": "93ce1628a263947418673249c1fbbb2d", "score": "0.62817186", "text": "public function getCats(Request $request)\n {\n return Category::get([\n 'id', 'categoryName'\n ]);\n }", "title": "" }, { "docid": "bd3723ad48619429a94f02da32e74962", "score": "0.6280193", "text": "public function show(Category $category)\n {\n \n }", "title": "" }, { "docid": "bd3723ad48619429a94f02da32e74962", "score": "0.6280193", "text": "public function show(Category $category)\n {\n \n }", "title": "" }, { "docid": "9c8583f73d193adecd9fff49a0335969", "score": "0.6279775", "text": "public function show_category()\n {\n $query = \"SELECT * FROM tbl_category order by catId desc\";\n $result = $this->db->select($query);\n return $result;\n }", "title": "" }, { "docid": "560f251da4b621cb0523c79c91db22e5", "score": "0.6270603", "text": "public function getCategory()\n {\n $this->db->order_by('category_name', 'asc');\n return $this->db->get('tb_category');\n }", "title": "" }, { "docid": "9f2174e6e711ca3afd25ba946ecaebc0", "score": "0.6270222", "text": "public function getCategoryByName($name);", "title": "" }, { "docid": "992f9c2d20a0482634e175652324e791", "score": "0.62673795", "text": "public function get_category() {\n\t\tif($this->prdcat_id!=\"\" and $this->prd_id !=\"\")\n\t\t{\n\t\t$this->sql = \t'SELECT a.prdcat_id, b.cat_id, b.cat_desc, b.cattype_id, c.cattype_desc\n\t\t\t\t\t\tFROM product_cat a\n\t\t\t\t\t\tINNER JOIN category b ON a.cat_id = b.cat_id\n\t\t\t\t\t\tINNER JOIN category_type c ON b.cattype_id = c.cattype_id\n\t\t\t\t\t\tWHERE a.prd_id = '.$this->prd_id.' \n\t\t\t\t\t\tAND a.prdcat_id = '.$this->prdcat_id.'\n\t\t\t\t\t\tORDER BY c.cattype_desc, b.cat_desc';\t\n\t\t$this->connect->query($this->sql);\n\t\t$result = $this->connect->resultArray();\n\t\tif(!empty($result[0]))\n\t\t{\n\t\treturn $result[0];\n\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "5ff93790013e19ad3061e962201062c7", "score": "0.6266949", "text": "public function getCategory()\n {\n return $this->registry->registry('kb_current_category');\n }", "title": "" }, { "docid": "b8e4ca13a9560ba457574e18775d4ada", "score": "0.6260036", "text": "public function get_category()\n {\n return C__CATG__NETWORK;\n }", "title": "" }, { "docid": "9abffa004605f0bb9de3f34d8d6aaf5f", "score": "0.6258616", "text": "public function getCategory()\n {\n if ($this->category === null) {\n $category = $this->db->fetchAssoc('SELECT * FROM category WHERE id = ?', array((int)$this->category_id));\n if ($category !== false) {\n $this->category = $category;\n }\n }\n\n return $this->category;\n }", "title": "" } ]
888ccfb7a4854c575a89d4db05df4a3d
Clean up after running all test cases
[ { "docid": "e7bbc9a236453f2c87265a2bf8372202", "score": "0.0", "text": "public static function tearDownAfterClass()\n {\n }", "title": "" } ]
[ { "docid": "9f3d312881bd28694d82fe3989df315c", "score": "0.78126293", "text": "function teardown() {\n // clean any files you've created, close database handles, etc.\n @unlink('sometestfile');\n }", "title": "" }, { "docid": "b0aaac782a2875520f2fa38b9123d07c", "score": "0.7748191", "text": "abstract function clean_up();", "title": "" }, { "docid": "83c921ab4a34e25f2bacc8d41e002c05", "score": "0.77384174", "text": "public function cleanup() {\n\t\t//TODO\n\t}", "title": "" }, { "docid": "325d351c69a0c007556e72863010cf64", "score": "0.7655234", "text": "public function cleanUp(): void;", "title": "" }, { "docid": "974542422ef9b957a4954fd0db80155d", "score": "0.7649545", "text": "public function cleanup()\n {\n // nothing to do\n }", "title": "" }, { "docid": "3cd0f501310d298bbd57fd8294479c71", "score": "0.7648834", "text": "public function tearDown()\n {\n $this->cleanUp();\n }", "title": "" }, { "docid": "f534ef9d650af83c75a2e11438b2334d", "score": "0.76358247", "text": "protected function tearDown() {\r\n\t\t$this->cabinaFactory = null;\r\n\t\t$this->verificador = null;\r\n\t}", "title": "" }, { "docid": "031cb3006b5943c84b0bf05acc860684", "score": "0.75950783", "text": "public function _cleanup() {\n }", "title": "" }, { "docid": "749407c38c12a8006ed6535b7272bdfb", "score": "0.7587248", "text": "protected function tearDown()\n {\n unset($this->refIndex);\n unset($this->t3libRefindex);\n unset($this->typo3Db);\n }", "title": "" }, { "docid": "0e379895e487a1c83d89513f56dd7fe3", "score": "0.7586029", "text": "public function tearDown() {\n $this->preparation = null;\n $this->request = null;\n $this->container = null;\n $this->event = null;\n }", "title": "" }, { "docid": "0e379895e487a1c83d89513f56dd7fe3", "score": "0.7586029", "text": "public function tearDown() {\n $this->preparation = null;\n $this->request = null;\n $this->container = null;\n $this->event = null;\n }", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.75827014", "text": "public function cleanup();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.75827014", "text": "public function cleanup();", "title": "" }, { "docid": "2f2ab1b83d572d6a84e1fa6ae8b7801d", "score": "0.7578796", "text": "public function cleanup() {\n\t\t// no-op\n\t}", "title": "" }, { "docid": "76d27eb570a0ead3702c7b840e4ee0ea", "score": "0.7558877", "text": "protected function teardown () {\n\t\t$this->urls\t\t\t\t\t= [];\n\t\t$this->titles\t\t\t\t= [];\n\t\t$this->html_hashes\t\t\t= [];\n\t\t/**\n\t\t * Clearing Extra-specific variables.\n\t\t */\n\t\t$this->footnotes\t\t\t= [];\n\t\t$this->footnotes_ordered\t= [];\n\t\t$this->footnotes_ref_count\t= [];\n\t\t$this->footnotes_numbers\t= [];\n\t\t$this->abbr_descriptions\t= [];\n\t\t$this->abbr_word_re\t\t\t= '';\n\t}", "title": "" }, { "docid": "22d4326327d41f84c5ac463f91741806", "score": "0.7557434", "text": "public function _cleanup()\n {\n }", "title": "" }, { "docid": "93af169e4351d760a2e5172f1ad5da13", "score": "0.75324315", "text": "public function endTest() {\n unset($this->GenericContent);\n unset($this->Article);\n ClassRegistry::flush();\n }", "title": "" }, { "docid": "7aaf015e65948eb819dec0e2d9bf9d8d", "score": "0.75279284", "text": "public function cleanUp()\n\t{\n\t}", "title": "" }, { "docid": "7aaf015e65948eb819dec0e2d9bf9d8d", "score": "0.75279284", "text": "public function cleanUp()\n\t{\n\t}", "title": "" }, { "docid": "9ca23a6d340e2c3e86d4045a4f2634fb", "score": "0.75198346", "text": "public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeCacheFileDir);\n $fs->remove($this->fakeProjectFileDir);\n\n unset($this->fetch);\n unset($this->fs);\n unset($this->config);\n unset($this->zippy);\n unset($this->finderFactory);\n unset($this->finder);\n }", "title": "" }, { "docid": "0d7528f9a8d3ef574195467d7015a7a4", "score": "0.7517694", "text": "public function tearDown() {\n $this->checklist = null;\n }", "title": "" }, { "docid": "bed9c90f62bcf1b401c51929ebfbdade", "score": "0.7498826", "text": "public function tearDown()\n {\n $this->clean($this->workspace);\n\n parent::tearDown();\n }", "title": "" }, { "docid": "3e725d43173e801f070de9f23845b7fc", "score": "0.74891645", "text": "protected function tearDown()\n {\n parent::tearDown();\n\n unset($this->testInstance);\n unset($this->publisherScanner);\n unset($this->inputMock);\n unset($this->outputMock);\n\n $this->prepareFolder();\n }", "title": "" }, { "docid": "733432786f1652d89d0d74612cf4671f", "score": "0.7482226", "text": "public function cleanup()\n {\n }", "title": "" }, { "docid": "0e14130a029279974a7a9e264a6c757a", "score": "0.7476987", "text": "function cleanup() {\n\t\t\n }", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.74720556", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.74720556", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "54ce364e671d590db2515f4505e162f0", "score": "0.74720556", "text": "public function cleanup()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "283485f45ae06456e9989aba7cf18458", "score": "0.7470892", "text": "public function cleanup()\n {}", "title": "" }, { "docid": "ef05a0b3b74d7132216af51e7313c2af", "score": "0.7459465", "text": "protected function tearDown() {\r\n\t\tunset ( $this->cleanerStrategy );\r\n\t}", "title": "" }, { "docid": "eee7992c1cbd9aca631f3f9ce5803cf0", "score": "0.7456845", "text": "public function tearDown(): void\n {\n R::nuke();\n R::close();\n $this->bbs = null;\n system(\"rm -rf \".self::DATA);\n }", "title": "" }, { "docid": "3f4b8db21ad858e8fc5e9865e87f8087", "score": "0.7445665", "text": "protected function tearDown()\n {\n unlink(\"{$this->dir}/file1.mock\");\n unlink(\"{$this->dir}/file2.mock\");\n unlink(\"{$this->dir}/dir1/file3.mock\");\n unlink(\"{$this->dir}/dir1/file4.mock\");\n rmdir(\"{$this->dir}/dir1\");\n rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "title": "" }, { "docid": "8517ee4fafb41b3c3d2829381706cc21", "score": "0.74398416", "text": "public function tearDown()\n {\n $this->clearRequest();\n $this->clearTmpFiles();\n }", "title": "" }, { "docid": "0a94d86bec40b72be68c58ccee543680", "score": "0.74385977", "text": "public function _cleanup(){\n\n\t\tunset($this->result);\n\t\tunset($this->{'full_table_'.static::$table});\n\t\tunset(static::$_inst->{'full_table_'.static::$table});\n\t\t$this->sleep();\n\t\t$this->__sleep();\n\t\t$this->__destruct();\n\t}", "title": "" }, { "docid": "cef5232c7583380514bb5c7ef796cdcc", "score": "0.74278903", "text": "public function tearDown()\n {\n unset($this->rubricData);\n unset($this->level);\n }", "title": "" }, { "docid": "dafe32ecbc0e9d794f143b2f2b8c4248", "score": "0.74226123", "text": "protected function tearDown(): void\n {\n $this->instance = null;\n $this->container = null;\n $this->config = null;\n $this->layerReflector = null;\n $this->tokenTool = null;\n }", "title": "" }, { "docid": "7a65abdf0eb11519fd919868fcefd0d6", "score": "0.7418781", "text": "protected function tearDown()\n {\n unset($this->app);\n unset($this->command);\n }", "title": "" }, { "docid": "22543c330f025f664411ee0e9ab26323", "score": "0.7410841", "text": "public function teardown()\r\n\t{\t\r\n\t\tglobal $wisconsin, $iowacity;\r\n\r\n\t\t//delete test apartments\r\n\t\tdeleteTestApartment($wisconsin['apartment_id']);\r\n\t\tdeleteTestApartment($iowacity['apartment_id']);\r\n\t}", "title": "" }, { "docid": "d94cff4974ea084222af4e3b5abf6d6b", "score": "0.73912513", "text": "public static function cleanup();", "title": "" }, { "docid": "8b41e2fd2d5a7cfa36eec1c9d00d68dc", "score": "0.7382659", "text": "public function tearDown()\n\t{\n\t\t$this->calculator = null;\n\t}", "title": "" }, { "docid": "c166b42108c9e3193024903c67f43b57", "score": "0.73823994", "text": "function endTest() {\n\t\tunset($this->Article);\n\t\tunset($this->User);\n\n\t\tClassRegistry::flush();\n\t}", "title": "" }, { "docid": "67c3824315e434e273e1edf84fe6c39f", "score": "0.7377978", "text": "protected function tearDown(): void\n {\n $finder = rex_finder::factory(rex_path::addonCache('structure'))\n ->recursive()\n ->childFirst()\n ->ignoreSystemStuff(false);\n rex_dir::deleteIterator($finder);\n\n // reset static properties\n $class = new ReflectionClass(rex_article::class);\n $classVarsProperty = $class->getProperty('classVars');\n $classVarsProperty->setValue(null);\n\n rex_article::clearInstancePool();\n }", "title": "" }, { "docid": "f4b9eeda5c7b0b38d87d92eb8bf2c9c0", "score": "0.737126", "text": "public function tearDown() {\n $this->manager = null;\n $this->container = null;\n }", "title": "" }, { "docid": "8b691aa2fcda1858a5c709ed2e3a667e", "score": "0.7369039", "text": "public function tearDown(): void\n {\n unset($this->dataMapper);\n unset($this->pdo);\n unset($this->adapter);\n unset($this->logger);\n\n if (\\file_exists($this->dbFile))\n \\unlink($this->dbFile);\n }", "title": "" }, { "docid": "b5b0a22a6d10bfa41bd81ed369675fc4", "score": "0.73567665", "text": "protected function tearDown()\n {\n $this->_clearFile();\n }", "title": "" }, { "docid": "2d789d4e41a8f692612decde78b2ab60", "score": "0.73521423", "text": "protected function tearDown()\n {\n $this->cleanPoolsData();\n Magento_PHPUnit_Initializer_Factory::cleanInitializers();\n }", "title": "" }, { "docid": "5c4754d2a800b8f7968ffbbad212898d", "score": "0.734943", "text": "public function _afterSuite()\n {\n $this->unloadFixtures();\n }", "title": "" }, { "docid": "aa5cfae133c75577941102350590ff99", "score": "0.7337291", "text": "function cleanup() {\n\t}", "title": "" }, { "docid": "0262d0b5c9e3926695e6359106c6b396", "score": "0.7334476", "text": "protected function tearDown()\n {\n /* @TODO allow to configure purging during tearDown execution\n $purger = new MongoDBPurger(static::$dm);\n $purger->purge();\n */\n if (null !== static::$kernel) {\n static::$kernel->shutdown();\n }\n $this->speedUpTestExecution();\n }", "title": "" }, { "docid": "244e5d88e99840ac78eeae81aad2c0dc", "score": "0.7321149", "text": "public function teardown() {\n foreach (IO_FS::Dir('test/data/Mail/List')->query(IO_FS::Query()->recursive()) as $f)\n IO_FS::rm($f);\n foreach (IO_FS::Dir('test/data/Mail/List') as $d)\n IO_FS::rm($d->path);\n }", "title": "" }, { "docid": "d5977541be9895d1ec480aaec8f7e7ea", "score": "0.73192793", "text": "public function tearDown()\n {\n foreach (glob($this->dir . '/*') as $file) {\n unlink($file);\n }\n rmdir($this->dir);\n }", "title": "" }, { "docid": "3cf863fe068bcfe3dcb068183b5f10ce", "score": "0.73188823", "text": "protected function tearDown()\n\t{\n\t\t// We need this to be empty.\n\t}", "title": "" }, { "docid": "83e71f7333e665afb206623ee21a2d42", "score": "0.7308982", "text": "protected function tearDown() {\n $this->osapiIdSpec = null;\n $this->jsonspec = null;\n $this->type = null;\n parent::tearDown();\n }", "title": "" }, { "docid": "5f56dd3154e69c4c81d72b4ce9be5a55", "score": "0.7307601", "text": "public function tearDown() {\n $this->calculadora = null;\n }", "title": "" }, { "docid": "c9cd527d2f0f4974b53531bfe4eb8614", "score": "0.7306836", "text": "function _cleanup() {\r\n\t\tglobal $database,$JPConfiguration;\r\n\r\n\t\tCJPLogger::WriteLog(_JP_LOG_INFO,_JP_CLEANUP);\r\n\t\t// Define which entries to keep in #__jp_packvars\r\n\t\t$keepInDB = array('CUBEArray');\r\n\r\n\t\t$folderPath = $JPConfiguration->TempDirectory;\r\n\t\t$file1 = $folderPath.'/joostina.sql';\r\n\t\t$file2 = $folderPath.'/sample_data.sql';\r\n\r\n\t\t$this->_unlinkRecursive($file1);\r\n\t\t$this->_unlinkRecursive($file2);\r\n\r\n\t\t// Clean database\r\n\t\t// ---------------------------------------------------------------------\r\n\t\t$sql = 'SELECT `key` FROM #__jp_packvars';\r\n\t\t$database->setQuery($sql);\r\n\t\t$keys = $database->loadResultArray();\r\n\r\n\t\tforeach($keys as $key) {\r\n\t\t\tif(!in_array($key,$keepInDB)) {\r\n\t\t\t\t$JPConfiguration->DeleteDebugVar($key);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tunset($keys);\r\n\t}", "title": "" }, { "docid": "b2680488ffa17e06791c2a262cbeccfc", "score": "0.73034793", "text": "public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }", "title": "" }, { "docid": "6672f6425998d09904dfb22741029bb1", "score": "0.7298248", "text": "protected function tearDown() {\n\t\t$this->assertNoLogEntries();\n\n\t\t$this->expectedLogEntries = 0;\n\n\t\t$GLOBALS['TCA'] = $this->originalTca;\n\t\tunset($this->originalTca);\n\n\t\t$GLOBALS['TYPO3_CONF_VARS'] = $this->originalConvVars;\n\t\tunset($this->originalConvVars);\n\n\t\t$GLOBALS['BE_USER'] = $this->originalBackendUser;\n\t\tunset($this->originalBackendUser);\n\t\tunset($this->backendUser);\n\n\t\tunset($GLOBALS['T3_VAR']['getUserObj']);\n\n\t\tt3lib_div::purgeInstances();\n\t\t$this->dropDatabase();\n\t}", "title": "" }, { "docid": "ae697c2497e93b549eb825e6d7de46fe", "score": "0.7294363", "text": "public function tearDown(): void\n {\n parent::tearDown();\n foreach ($this->files as $file) {\n @unlink($file);\n }\n @rmdir(self::TEST_NESTED_DIR_TMP);\n @rmdir(self::TEST_TEST_DIR_TMP);\n }", "title": "" }, { "docid": "618db687011acd336446dd567c04ba5c", "score": "0.7292108", "text": "protected function tearDown(): void\n\t{\n\t\t// remove useless data.\n\t\t// leave database in initial state!\n\t}", "title": "" }, { "docid": "f9af805ed8bbd51b7087a4a56ba2a329", "score": "0.7279498", "text": "protected function tearDown(): void\n {\n static::cleanEnvsAndConfigs();\n }", "title": "" }, { "docid": "8f7b20aad17ed039ae8705d2f5f317cc", "score": "0.72791165", "text": "public function tearDown()\n {\n $this->factory = null;\n }", "title": "" }, { "docid": "7f71a81eddbcecfe2a3118251419fe3c", "score": "0.726762", "text": "protected function tearDown()\n {\n unset($this->ubuntuData);\n unset($this->droplet);\n }", "title": "" }, { "docid": "c0d1855f7208d93b55f000be820ef110", "score": "0.7266036", "text": "public function tearDown()\r\n {\r\n\r\n // clear cache\r\n $this->setUpFiles();\r\n }", "title": "" }, { "docid": "eb478a727049559187aa8197e32bde9e", "score": "0.7242439", "text": "protected function tearDown()\n {\n unset($this->rmvApiMock);\n unset($this->infoParserMock);\n }", "title": "" }, { "docid": "7a3320701ca806446b34eb27e6fb3afe", "score": "0.72405535", "text": "protected function tearDown()\r\n {\r\n unset($this->css);\r\n }", "title": "" }, { "docid": "0667a9447b96c72cd2d68ddffcc17474", "score": "0.72344774", "text": "public function tearDown()\n {\n unset($this->unit);\n }", "title": "" }, { "docid": "d3080d4f2ee965b5978e2a526643e0d5", "score": "0.7234444", "text": "public function tearDown(): void\n {\n parent::tearDown();\n unset($this->kernelBrowser);\n foreach ($this->testFiles as $path) {\n $this->fileSystem->remove($path);\n }\n unset($this->fs);\n unset($this->fileSystem);\n }", "title": "" }, { "docid": "b7ec876bee82ced38f013d805630ac1d", "score": "0.7205982", "text": "protected function tearDown()\n\t{\n\t Output::clear(); \n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "e17d09b14526f9858e55765671ca1b0b", "score": "0.7199212", "text": "protected function tearDown(): void\n {\n $this->cleanUp();\n parent::tearDown();\n }", "title": "" }, { "docid": "d4ef7a3dca94d86c2fca35cebccb7b38", "score": "0.71933275", "text": "public function cleanUp()\n {\n $this->listenerTimes = null;\n $this->content = null;\n $this->tokens = null;\n $this->metricTokens = null;\n $this->tokenizer = null;\n $this->fixer = null;\n $this->config = null;\n $this->ruleset = null;\n\n }", "title": "" }, { "docid": "36552fd0448d61c04df63f3154859942", "score": "0.71814775", "text": "protected function tearDown()\n {\n $oActShop = $this->getConfig()->getActiveShop();\n $oActShop->setLanguage(0);\n oxRegistry::getLang()->setBaseLanguage(0);\n $this->cleanUpTable('oxuser');\n $this->cleanUpTable('oxorderarticles');\n $this->cleanUpTable('oxarticles');\n\n $this->cleanUpTable('oxremark', 'oxparentid');\n\n parent::tearDown();\n }", "title": "" }, { "docid": "13000fb9668ae5e6a688b4759866de46", "score": "0.71809673", "text": "protected function tearDown()\n {\n // deleting articles+variants\n if ($this->oArticle) {\n $this->oArticle->delete();\n $this->oArticle = null;\n }\n\n // deleting category\n if ($this->oCategory) {\n $this->oCategory->delete();\n $this->oCategory = null;\n }\n\n // deleting selection lists\n if ($this->oSelList) {\n $this->oSelList->delete();\n $this->oSelList = null;\n }\n\n // deleting delivery address info\n if ($this->oDelAdress) {\n $this->oDelAdress->delete();\n $this->oDelAdress = null;\n }\n\n // deleting demo wrapping\n if ($this->oCard) {\n $this->oCard->delete();\n $this->oCard = null;\n }\n\n if ($this->oWrap) {\n $this->oWrap->delete();\n $this->oWrap = null;\n }\n\n // deleting vouchers\n if ($this->aVouchers) {\n foreach ($this->aVouchers as $oVoucher) {\n $oVoucher->delete();\n }\n $this->aVouchers = null;\n }\n\n if ($this->oVoucherSerie) {\n $this->oVoucherSerie->delete();\n $this->oVoucherSerie = null;\n }\n\n // deleting discounts\n if ($this->aDiscounts) {\n foreach ($this->aDiscounts as $oDiscount) {\n $oDiscount->delete();\n }\n $this->aDiscounts = null;\n }\n\n $this->oVariant = null;\n\n\n oxDb::getDb()->execute('delete from oxuserbaskets');\n oxDb::getDb()->execute('delete from oxuserbasketitems');\n\n $sName = $this->getName();\n if ($sName == 'testBasketCalculationWithSpecUseCaseDescribedAbove' ||\n $sName == 'testBasketCalculationWithSpecUseCaseDescribedAboveJustDiscountIsAppliedByPrice' ||\n $sName == 'testUpdateBasketTwoProductsWithSameSelectionList'\n ) {\n $this->_cleanupDataAfterTestBasketCalculationWithSpecUseCaseDescribedAbove();\n }\n\n $this->cleanUpTable('oxdiscount');\n $this->cleanUpTable('oxartextends');\n $this->cleanUpTable('oxseo', 'oxobjectid');\n $this->cleanUpTable('oxprice2article');\n $this->cleanUpTable('oxobject2discount');\n\n $this->addTableForCleanup('oxarticles');\n $this->addTableForCleanup('oxseo');\n $this->addTableForCleanup('oxobject2selectlist');\n $this->addTableForCleanup('oxselectlist');\n\n $this->addTableForCleanup('oxselectlist2shop');\n $this->addTableForCleanup('oxarticles2shop');\n $this->addTableForCleanup('oxdiscount2shop');\n\n oxArticleHelper::cleanup();\n $this->getConfig()->setConfigParam('bl_perfLoadSelectLists', $this->blPerfLoadSelectLists);\n parent::tearDown();\n }", "title": "" }, { "docid": "28d879697a897d441bc644f225a4cb7a", "score": "0.7180476", "text": "public function tearDown()\n {\n unset($this->helper, $this->view);\n }", "title": "" }, { "docid": "21bfdf435ac8dbdd3af261d25b370fb6", "score": "0.7173872", "text": "public function tearDown()\n {\n // call p4 library shutdown functions\n if (class_exists('P4\\Environment\\Environment', false)) {\n P4\\Environment\\Environment::runShutdownCallbacks();\n }\n\n // disconnect the p4 connection, if exists\n if (isset($this->p4)) {\n $this->p4->disconnect();\n }\n\n // clear default connection\n if (class_exists('P4\\Connection\\Connection', false)) {\n Connection::clearDefaultConnection();\n }\n\n // clear out shutdown callbacks\n if (class_exists('P4\\Environment\\Environment', false)) {\n P4\\Environment\\Environment::setShutdownCallbacks(null);\n }\n\n // forces collection of any existing garbage cycles\n // so no open file handles prevent files/directories\n // from being removed.\n gc_collect_cycles();\n\n // remove testing directory\n $this->removeDirectory(DATA_PATH);\n\n parent::tearDown();\n\n // if phpunit wants to use a bunch of memory after a test runs (e.g. for code coverage) so be it\n ini_set('memory_limit', -1);\n }", "title": "" }, { "docid": "d3313b584b67d5830961af945f6a6381", "score": "0.71736294", "text": "protected function tearDown()\n {\n \tunset($this->object);\n }", "title": "" }, { "docid": "d3313b584b67d5830961af945f6a6381", "score": "0.71736294", "text": "protected function tearDown()\n {\n \tunset($this->object);\n }", "title": "" }, { "docid": "2152bbf453c5bde27398dfd96a014ea1", "score": "0.71630806", "text": "public function tearDown() {\n\n $allFiles = array_merge($this->sourceFiles, $this->destFiles, $this->sharedFiles);\n\n foreach($allFiles as $filename) {\n foreach($this->folders as $folderPath) {\n $filePath = \"{$folderPath}/{$filename}\";\n\n if(file_exists($filePath)) unlink($filePath);\n }\n }\n\n /*\n * Remove the folders\n */\n\n foreach($this->folders as $folderPath) {\n rmdir($folderPath);\n }\n }", "title": "" }, { "docid": "bdf16eabefd01886e028e7b3abf7c617", "score": "0.71578085", "text": "public function tearDown() {\n unset($this->Vehicle);\n unset($this->VehiclePart);\n\t\tunset($this->Mongo);\n\t\tunset($this->mongodb);\n parent::tearDown();\n\t}", "title": "" }, { "docid": "6bfe7704bd2bdc04025d6386ce6207e3", "score": "0.7154356", "text": "private function cleanup()\n {\n if ($this->cleanup) {\n ($this->cleanup)();\n }\n\n $this->cleanup = null;\n }", "title": "" }, { "docid": "6bfe7704bd2bdc04025d6386ce6207e3", "score": "0.7154356", "text": "private function cleanup()\n {\n if ($this->cleanup) {\n ($this->cleanup)();\n }\n\n $this->cleanup = null;\n }", "title": "" }, { "docid": "7323d2a08baf9536b41a78b0c644a4b9", "score": "0.71487457", "text": "protected function tearDown()\n {\n $this->filesystem->remove($this->baseDir);\n\n $this->filesystem = null;\n $this->cache = null;\n }", "title": "" }, { "docid": "500a1ad9c99fbf7f8186882d52b9b827", "score": "0.7141952", "text": "protected function teardown()\n\t{\n\t\t$allposts = Posts::get(array('nolimit' => 1));\n\t\t$allposts->delete();\n\t}", "title": "" }, { "docid": "94820c4eb489b6fb74b76691f1ad73a7", "score": "0.7139464", "text": "public function tearDown()\n {\n parent::tearDown();\n\n foreach (glob($this->getPath('*')) as $file) {\n //@codingStandardsIgnoreLine\n unlink($file);\n }\n }", "title": "" }, { "docid": "cfb0a464347e1739bbcfe6add2fda7eb", "score": "0.71348464", "text": "public function tearDown() {\n\t\tunset($this->Article);\n\t\tunset($this->User);\n\t\tunset($this->Tag);\n\t\tparent::tearDown();\n\t}", "title": "" }, { "docid": "0e4c22a87632a170f70e419dc0ec9a52", "score": "0.7133523", "text": "protected function tearDown()\n {\n unset($this->extConf, $this->subject, $GLOBALS['TSFE'], $_SESSION);\n parent::tearDown();\n }", "title": "" }, { "docid": "cebb97dcbcdaafda1a82e7494513dee2", "score": "0.71273786", "text": "protected function tearDown() {\r\n\t\tunset ( $this->contentProcessorDefinition );\r\n\t}", "title": "" }, { "docid": "a0f0182570baf0dcdbe158728c976228", "score": "0.71234477", "text": "public static function tearDownAfterClass():void {\n\n Env::reset();\n\n }", "title": "" }, { "docid": "6cbf72cb409155bbb2d49bfc690cb10c", "score": "0.71232605", "text": "protected function tearDown(): void\n {\n $this->cleanUpTable('oxlinks');\n $this->cleanUpTable('oxorder');\n $this->cleanUpTable('oxcontents');\n $this->cleanUpTable('oxobject2category');\n\n if (isset($_POST['oxid'])) {\n unset($_POST['oxid']);\n }\n\n $this->getConfig()->setGlobalParameter('ListCoreTable', null);\n\n parent::tearDown();\n }", "title": "" }, { "docid": "28328d21c17fd8b4ac16f0675c5556aa", "score": "0.71223956", "text": "public function testCleanup()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "2d918169898a497ce8a97d3ffee9fa58", "score": "0.71177965", "text": "protected function tearDown()\n {\n system(\"rm -rf \".escapeshellarg('logs'));;\n }", "title": "" }, { "docid": "5a61c5796459be2bbf5bb61a5ff9946e", "score": "0.7113504", "text": "public function tearDown()\n\t{\n\t\t$this->req = null;\n\t\t$this->res = null;\n\t}", "title": "" }, { "docid": "2321639c7b4cb2db3e74533259016dea", "score": "0.7107267", "text": "function endTest()\n {\n unset($this->SlugArticle);\n\n ClassRegistry::flush();\n }", "title": "" }, { "docid": "8d1ea84cbc2b80427e30fd0abb7584c3", "score": "0.70998704", "text": "public function tearDown() {\n unset($this->Calculator);\n }", "title": "" }, { "docid": "9cba007c99caa1693cd5eac5dde6a0de", "score": "0.70938057", "text": "public function tearDown() {\n $this->event = null;\n $this->request = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->manager = null;\n $this->event = null;\n }", "title": "" }, { "docid": "4880310818472c9973a828538bc34a86", "score": "0.7093498", "text": "public static function tearDownAfterClass(): void\n {\n self::$url = null;\n self::$content = null;\n }", "title": "" }, { "docid": "2989c5935d3a340a7d7ead09460d18df", "score": "0.70927924", "text": "public function tearDown()\n {\n self::_removeTempFiles();\n }", "title": "" }, { "docid": "14566fb6f30bee7c002bab41146503b3", "score": "0.709006", "text": "private function _resetTests() {\n $this->_test = null;\n $this->_result = null;\n $this->_testsData = [];\n //--array structure--//\n $this->_testsData[0] = [\"status\" => null, \"test\" => null, \"result\" => null];\n }", "title": "" }, { "docid": "9442dde313db57f050e6ce84bdfa2887", "score": "0.70833796", "text": "protected function tearDown()\n {\t\n foreach ($this->_toDelete['phone'] as $phone) {\n $phoneTemplate = $this->_json->getSnomTemplate($phone['template_id']['value']);\n $this->_json->deleteSnomPhones(array($phone['id']));\n $this->_json->deleteSnomLocations(array($phone['location_id']['value']));\n $this->_json->deleteSnomSettings(array($phoneTemplate['setting_id']['value']));\n $this->_json->deleteSnomTemplates(array($phone['template_id']['value']));\n $this->_json->deleteSnomSoftwares(array($phoneTemplate['software_id']['value']));\n }\n \n foreach ($this->_toDelete['sippeer'] as $sippeer) {\n $this->_json->deleteAsteriskSipPeers(array($sippeer['id']));\n }\n\n // delete all contexts\n $search = $this->_json->searchAsteriskContexts('', '');\n foreach ($search['results'] as $result) {\n try {\n $this->_json->deleteAsteriskContexts($result['id']);\n } catch (Zend_Db_Statement_Exception $zdse) {\n // integrity constraint\n }\n }\n }", "title": "" }, { "docid": "0bea69aa42fac7fd703a069ed89e1273", "score": "0.70791036", "text": "public static function tearDownAfterClass() {\r\n // remove all records\r\n //self::$instance->deleteAll();\r\n }", "title": "" }, { "docid": "a76160b62e83abbfd26ab1bfc70d6683", "score": "0.70758337", "text": "public function tearDown()\n {\n// $filesystem->cleanDirectory(static::$jsDir);\n// $filesystem->cleanDirectory(static::$cssDir);\n }", "title": "" }, { "docid": "1f2d22588ba738db5586737a476e45a2", "score": "0.70757324", "text": "protected function tearDown() {\n\t\t$this->object = NULL;\n\t}", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "92163c1ebf467c20dd009634c3d28399", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'user_type_id'=>['required'],\n 'first_name'=>['required'],\n 'last_name'=>['required'],\n 'email'=>['required', \"unique:users,email,$id\"],\n 'mobile_no'=>['required', \"unique:users,mobile_no,$id\",'min:10','max:10'],\n // 'dob'=>['required'],\n 'gender'=>['required'],\n // 'pan_no'=>['required'],\n // 'nominee_name'=>['required'],\n // 'nominee_relation'=>['required'],\n // 'nominee_dob'=>['required'],\n // 'add1'=>['required'],\n 'pincode_id'=>['required'],\n 'city_id'=>['required'],\n 'state_id'=>['required'],\n // 'is_current'=>['required'],\n // 'add_proof_no'=>['required'],\n // 'name_on_bank'=>['required'],\n // 'bank_id'=>['required'],\n // 'account_no'=>['required'],\n // 'ifsc_code'=>['required'],\n // 'uploads'=>['required'],\n // 'qualification'=>['required'],\n // 'pos_income_id'=>['required'],\n // 'total_fn_yr'=>['required'],\n // 'total_fn_month'=>['required'],\n // 'office_space'=>['required'],\n // 'did_sell'=>['required'],\n // 'pos_licence'=>['required'],\n // 'total_bus_anum'=>['required'],\n // 'gst_no'=>['required']\n ]);\n $user_id=$request->admin_id;\n $path = 'public/admins/'.$user_id;\n // if(!Storage::exists($path)){\n // Storage::makeDirectory($path);\n // }\n $upload_qual_doc = \"\";\n $upload_pan_no = \"\";\n $upload_gst_no = \"\";\n $id_doc_front = \"\";\n $id_doc_back = \"\";\n $upload_doc = \"\";\n if($request->hasFile('upload_qual_doc')){\n // $file=$request->file('upload_qual_doc');\n // $file->getClientOriginalName();\n $upload_qual_doc = substr(str_replace(\" \",\"-\",$request->file('upload_qual_doc')->getClientOriginalName()),-10);\n $upload_qual_doc = time().$upload_qual_doc;\n $request->file('upload_qual_doc')->storeAs($path, $upload_qual_doc);\n }\n if($request->hasFile('upload_pan_no')){\n $upload_pan_no = substr(str_replace(\" \",\"-\",$request->file('upload_pan_no')->getClientOriginalName()),-10);\n $upload_pan_no = time().$upload_pan_no;\n $request->file('upload_pan_no')->storeAs($path, $upload_pan_no);\n }\n if($request->hasFile('upload_gst_no')){\n $upload_gst_no = substr(str_replace(\" \",\"-\",$request->file('upload_gst_no')->getClientOriginalName()),-10);\n $upload_gst_no = time().$upload_gst_no;\n $request->file('upload_gst_no')->storeAs($path, $upload_gst_no);\n }\n if($request->hasFile('id_doc_front')){\n $id_doc_front = substr(str_replace(\" \",\"-\",$request->file('id_doc_front')->getClientOriginalName()),-10);\n $id_doc_front = time().$id_doc_front;\n $request->file('id_doc_front')->storeAs($path, $id_doc_front);\n }\n if($request->hasFile('id_doc_back')){\n $id_doc_back = substr(str_replace(\" \",\"-\",$request->file('id_doc_back')->getClientOriginalName()),-10);\n $id_doc_back = time().$id_doc_back;\n $request->file('id_doc_back')->storeAs($path, $id_doc_back);\n }\n if($request->hasFile('upload_doc')){\n $upload_doc = substr(str_replace(\" \",\"-\",$request->file('upload_doc')->getClientOriginalName()),-10);\n $upload_doc = time().$upload_doc;\n $request->file('upload_doc')->storeAs($path, $upload_doc);\n }\n// die($upload_doc);\n $users = Admin::find($user_id);\n $users->first_name = $request->first_name;\n $users->last_name = $request->last_name;\n $users->email = $request->email;\n $users->mobile_no = $request->mobile_no;\n $users->dob = date('Y-m-d',strtotime($request->dob));\n $users->nominee_name = $request->nominee_name;\n $users->nominee_relation = $request->nominee_relation;\n $users->nominee_dob = date('Y-m-d',strtotime($request->nominee_dob));\n $users->gender = $request->gender;\n $users->qualification = $request->qualification;\n if($upload_qual_doc != \"\") $users->upload_qual_doc = $upload_qual_doc;\n $users->pos_income_id = $request->pos_income_id;\n $users->total_fn_yr = $request->total_fn_yr;\n $users->total_fn_month = $request->total_fn_month;\n $users->office_space = $request->office_space;\n // $users->did_sell = $request->did_sell;\n $users->pos_licence = $request->pos_licence;\n $users->total_bus_anum = $request->total_bus_anum;\n $users->pan_no = $request->pan_no;\n if($upload_pan_no != \"\") $users->upload_pan_no = $upload_pan_no;\n $users->gst_no = $request->gst_no;\n if($upload_gst_no != \"\") $users->upload_gst_no = $upload_gst_no;\n $users->user_type_id = $request->user_type_id;\n $users->are_you = $request->are_you;\n $users->firm_name = $request->firm_name;\n $users->user_status = $request->user_status;\n $users->update();\n\n // $pincode_id = DB::table('pincodes')->where('pincode', $request->pincode_id)->first();\n $pincode_id = $request->pincode_id;\n // print_r($pincode_id);die;\n if(isset($users->address->id)){\n $addresses = admin_addresses::find($users->address->id);\n $addresses->admin_id = $user_id;\n $addresses->add1 = $request->add1;\n $addresses->pincode_id = $pincode_id;\n $addresses->city_id = $request->city_id;\n $addresses->state_id = $request->state_id;\n $addresses->is_current = $request->is_current;\n $addresses->add_proof = $request->add_proof;\n $addresses->add_proof_no = $request->add_proof_no;\n if($id_doc_front != \"\") $addresses->id_doc_front = $id_doc_front;\n if($id_doc_back != \"\") $addresses->id_doc_back = $id_doc_back;\n $addresses->update();\n }else{\n $addresses = new admin_addresses();\n $addresses->admin_id = $user_id;\n $addresses->add1 = $request->add1;\n $addresses->pincode_id = $request->pincode_id;\n $addresses->city_id = $request->city_id;\n $addresses->state_id = $request->state_id;\n $addresses->is_current = $request->is_current??\"y\";\n $addresses->add_proof = $request->add_proof??\"d\";\n $addresses->add_proof_no = $request->add_proof_no;\n $addresses->id_doc_front = $id_doc_front;\n $addresses->id_doc_back = $id_doc_back;\n $addresses->save();\n }\n\n if($request->bank_id != \"\"){\n if(isset($users->relbank->id)){\n $relBanks = admin_rel_banks::find($users->relbank->id);\n $relBanks->bank_id = $request->bank_id;\n $relBanks->admin_id = $user_id;\n $relBanks->name_on_bank = $request->name_on_bank;\n $relBanks->account_no = $request->account_no;\n $relBanks->ifsc_code = $request->ifsc_code;\n $relBanks->uploads = $request->uploads;\n if($upload_doc != \"\") $relBanks->upload_doc = $upload_doc;\n $relBanks->update();\n }else{\n $relBanks = new admin_rel_banks();\n $relBanks->bank_id = $request->bank_id;\n $relBanks->admin_id = $user_id;\n $relBanks->name_on_bank = $request->name_on_bank;\n $relBanks->account_no = $request->account_no;\n $relBanks->ifsc_code = $request->ifsc_code;\n $relBanks->uploads = $request->uploads??'cheque';\n $relBanks->upload_doc = $upload_doc;\n $relBanks->save();\n }\n }\n // $2y$10$GgNELAgC9tE.Mw/u70XULu1knQVFbw7.nwDjbqU8TpmB14op0wZJS\n admin_rel_fins::where('admin_id', $user_id)->delete();\n $relFin = [];\n if(!empty($request->did_sell))\n foreach($request->did_sell as $value){\n if($value != \"\")\n $relFin[] = [\n 'admin_id' => $user_id,\n 'fin_product_id' => $value\n ];\n }\n if(!empty($relFin)) admin_rel_fins::insert($relFin);\n\n return redirect()->route('admins')->with('success', 'User updated successfully.');\n }", "title": "" } ]
[ { "docid": "ae90a700efd6cf3cd7c51c1c4442503a", "score": "0.7658553", "text": "public function update(ResourceInterface $resource);", "title": "" }, { "docid": "33eafa1267660ce479c92ad656dea136", "score": "0.7497171", "text": "function updateResource(){\n\t\t$resource = $this->getResource()->update();\n\t}", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3edf989e06553ae1b0e42f6e1554b8cc", "score": "0.6981674", "text": "public function update(Request $request, resource $resource)\n {\n //\n }", "title": "" }, { "docid": "79163632c1ee775bbfdb37df0ed49f7a", "score": "0.69713145", "text": "public function update($resource, $entity, $id);", "title": "" }, { "docid": "abd2d9691e5bed830d5a50ddc78e9666", "score": "0.67193717", "text": "protected function updateResource(): void\n {\n /* Set the controller resource name. */\n $this->name = $this->getName();\n\n /* Get the ability map */\n $map = $this->resourceAbilityMap();\n\n /* Store the resource permissions on DB */\n $this->registerPermissions($map);\n\n /* Store the resource module on DB */\n $this->updateModule($this->name, $map);\n\n $this->updateSettings();\n }", "title": "" }, { "docid": "872fee47b4f9bc0a0da99279df7e8203", "score": "0.6609197", "text": "protected function update($resource){\n $entity = $this->dataService->update($resource);\n\n return $entity;\n }", "title": "" }, { "docid": "2941dd64817aec2862ad3945616aabfa", "score": "0.65418714", "text": "public function update(ResourcesRequest $request, Resource $resource) {\n $request->validated();\n $resource->fill($request->all())->save();\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated!');\n }", "title": "" }, { "docid": "988b9db60f871096839ee3c5b440e154", "score": "0.6525437", "text": "public function update(Request $request, Resource $resource)\n {\n $this->allowedAdminAction();\n \n $rules=[\n 'name' =>'string|min:2',\n 'description' =>'string|min:2', \n 'type' =>'string|min:2',\n ];\n $this->validate($request,$rules);\n if($request->has('name')){\n $resource->name=$request->name;\n }\n if($request->has('description')){\n $resource->description=$request->description;\n }\n if($request->has('type')){\n $resource->type=$request->type;\n }\n if(!$resource->isDirty()){\n return $this->errorResponse('Se debe especificar al menos un valor diferente para actualizar',422);\n }\n $resource->save();\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "0a8ff6c637e4445b87c5b9716fa41192", "score": "0.6509508", "text": "public function update(SpecificateRequest $request, $id)\n {\n //\n $storage = Storage::findOrFail($id);\n $storage->update([\n 'storage' => $request->storage,\n ]);\n $storage->save();\n return redirect()->route('admin.specificate.storage.show', $storage->id);\n }", "title": "" }, { "docid": "645a8e4f0c0ac4fe3a6cff897cedd569", "score": "0.63936436", "text": "public function update(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "8ef8bfa47ef7d30297a02f132b09c19c", "score": "0.63837194", "text": "public function put(ApiResource $resource);", "title": "" }, { "docid": "cbcff9a7ae5b1d786f46919932ecccc1", "score": "0.62448", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n $resource->update($request->validated());\n $resource = new ResourceResource($resource);\n return $this->success('Resource Updated Successfully.', $resource);\n }", "title": "" }, { "docid": "f9c2b1bc5036ac76b3ea95ba3fbc61e8", "score": "0.6183787", "text": "public function update(Request $request, $id)\n {\n //更新操作\n $result = Storage::find($id);\n $result->storage_name = $request->storage_name;\n $result->storage_code = $request->storage_code;\n $result->storage_address = $request->storage_address;\n $result->show = $request->show;\n return $result->save()?'0':'1';\n }", "title": "" }, { "docid": "2cc3cab36436f9f12f05025ca511d3b4", "score": "0.6089192", "text": "public function updateResource(\n Resource\\ResourceType $resourceType,\n Resource\\ResourceData $resourceData\n );", "title": "" }, { "docid": "2b8a79adbe1af409adcb87f83c9169f6", "score": "0.59985447", "text": "function refresh($resource)\n {\n $this->getCache()->removeItem(get_class($resource) . $resource->getId());\n $resource->_load($resource->getId());\n }", "title": "" }, { "docid": "6822b36ec42f6f57430782d13125b59a", "score": "0.5963711", "text": "function update_resource($data, $id)\n\t{\n\t\t# Update the record \n\t\t$this -> db -> where('id', $id);\n\t\t$query = $this -> db -> update('gh_resource', $data);\n\t\treturn $query;\t\t\n\t}", "title": "" }, { "docid": "06f480d5aa69c73bbcf80fa0d7349713", "score": "0.59046763", "text": "public function updateStream($path, $resource, Config $config)\n\t{\n\t\t$this->delete($path);\n\t\treturn $this->writeStream($path, $resource, $config);\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "97b6e3224737bc7e7e679cae8ecba355", "score": "0.58905315", "text": "private function update()\n {\n $this->save();\n $this->load();\n }", "title": "" }, { "docid": "0cfc587ef3ef12b2896188cd18843c4e", "score": "0.5886223", "text": "public function update(Request $request)\n {\n $item = $this->storageRepository->find($request->id);\n if (empty($item)) {\n\n return response(null, 404);\n }\n $data = $request->all();\n $result = $item->fill($data)->save();\n\n //todo: подумать над кодом ошибки\n //Что должно вовзращать при ошибке сохранения\n if (!$result) {\n return response(null, 404);\n }\n else return response(null, 200);\n }", "title": "" }, { "docid": "50a2469e575685d948691687a87b3018", "score": "0.58826905", "text": "public function updateStream($path, $resource, Config $config)\n {\n // Todo\n }", "title": "" }, { "docid": "7fb849d8b455c566201a86dfb43be07f", "score": "0.5880392", "text": "public function updateStream ($path, $resource, Config $config)\n {\n return $this->upload ($path, $resource, true);\n }", "title": "" }, { "docid": "b23963f9ffa0d4dd76bb7372985b4dcd", "score": "0.5847549", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $response = $product->update([\n 'name' => $request->name,\n 'price' => $request->price,\n 'quantity' => $request->quantity,\n ]);\n\n if ($response && $request->file('avatar')) {\n if ($product->avatar && \\Storage::disk('local')->exists($product->avatar)) {\n \\Storage::delete($product->avatar);\n }\n $product->update([\n 'avatar' => $request->file('avatar')->store('public/avatar'),\n ]);\n }\n return redirect('product');\n }", "title": "" }, { "docid": "c69feb2ecc7f5393f2375122a9d3041c", "score": "0.58427507", "text": "protected function updateInformation()\n {\n parent::updateInformation();\n $this->_updateResource();\n }", "title": "" }, { "docid": "d69db4f2a0dc00982a1f889bd5e3e833", "score": "0.5830592", "text": "public function update($id)\n\t{\n\t\t$input = Input::all();\n\t\t$input['ip_address'] = Request::getClientIp();\n $validation = Validator::make($input, Resources::$rules);\n if ($validation->passes())\n {\n $resource = Resources::find($id);\n $resource->update($input);\n return Redirect::route('secureadmin.resources.index');\n }\n\t\treturn Redirect::route('secureadmin.resources.edit', $id)\n ->withInput()\n ->withErrors($validation)\n ->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "320ba9944f4c2ee76e642401a7fc9dca", "score": "0.5824011", "text": "public function update(Request $request, $id)\n {\n $path=\"\";\n $slide=Slide::where('id',$id)->first();\n if($request->hasFile('image')){\n $path=$request->old_image;\n if($path!=null&&file_exists(\"/storage/$path\")){\n unlink(\"storage/\".$path);\n }$path=$request->file('image')->store('Slides');\n }else{\n $path=$request->old_image;\n }\n \n \n $slide->image=$path;\n $slide->save();\n return redirect()->route('listSlide');\n }", "title": "" }, { "docid": "ff532344ab178d688587c7da12273ec4", "score": "0.5812807", "text": "public function updateStream($path, $resource, \\League\\Flysystem\\Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "63ab5cefaa3e5c0b3403f60763069aa0", "score": "0.58026063", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "7f72d6356b07bb9a7b5f966d552003cb", "score": "0.5800651", "text": "public function update(Request $request, Product $product)\n {\n $product->product_name = $request->product_name;\n $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->price = $request->price;\n $product->description = $request->description;\n if($request->hasFile('image')){\n $product->image = $this->uploadImage($request);\n }\n $product->status = $request->status;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "379ccf05ba613aad88534619cf8d15fd", "score": "0.5760052", "text": "public function update(ThumbRequest $request, $id)\n {\n // $data = $request->all();\n // $data['thumb'] = $request->file('thumb')->store(\n // 'assets/thumb',\n // 'public'\n // );\n\n // $item = Thumb::findOrFail($id);\n // $item->update($data);\n\n // return redirect()->route('thumb.index');\n }", "title": "" }, { "docid": "f9f7b2aeec9eec47f3fa1be7250f25ee", "score": "0.57584673", "text": "public function update(Request $request, Product $product)\n {\n $this->validate(\n $request,\n [\n 'image' => 'required|image|mimes:jpeg,png,jpg,gif|max:3000',\n 'product_name' => 'required',\n 'unit_price' => 'required',\n 'quantity' => 'required',\n 'store' => 'required',\n\n ]\n );\n $image_name = time() . '_' . $request->store . '.' . $request->image->extension();\n\n $path = $request->file('image')->storeAs('images/prod_images', $image_name, 'public');\n $filePath = '/storage/'. $path;\n\n $product->update([\n 'image'=> $filePath ,\n 'product_name' => $request->input('product_name'),\n 'unit_price' => $request->input('unit_price'),\n 'quantity' => $request->input('quantity'),\n 'store' => $request->input('store'),\n 'category_id' => $request->input('category_id'),\n ]);\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.5752699", "text": "public function updateExisting();", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "58af7069ccd84811f59fa519443b29b7", "score": "0.5742609", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')) {\n $resources = $request->session()->get('resources');\n if(isset($resources[$id])) {\n $resource = $resources[$id];\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $precioInput = $request-> input('precio');\n $resource['id'] = $idInput;\n $resource['name'] = $nameInput;\n $resource['precio'] = $precioInput;\n if(isset($resources[$idInput]) && $id != $idInput) {\n return back()->withInput();\n } \n unset($resources[$id]);\n $resources[$idInput] = $resource;\n \n $request->session()->put('resources', $resources);\n return redirect('resource');\n }\n }\n return back()->withInput();\n }", "title": "" }, { "docid": "b7966c379f90ae2061930029bb3777f6", "score": "0.57385576", "text": "public function update(Request $request, $resource, $id)\n {\n $command = $this->translator->getCommandFromResource($resource, 'update');\n\n $this->runBeforeCommands($command);\n\n $data = $this->dispatchFrom($command, $request);\n\n $this->fireEventForResource($resource, 'update', $data);\n\n return $this->success($data);\n }", "title": "" }, { "docid": "6f20a1779e33227cfc4451ace6ab29af", "score": "0.57327956", "text": "public function edit(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "d6f7ceba30cd1fa1f963d331a704f50e", "score": "0.5719147", "text": "public function update(PostRequest $request, Storage $storage, Post $post)\n {\n // Update data\n $post->update($request->validated());\n\n // Process Image then add to post\n $this->saveFeaturedImage($request, $storage, $post);\n\n return new PostResource($post->load('owner'));\n }", "title": "" }, { "docid": "70bd037614d311211369ca22a9f666ad", "score": "0.570673", "text": "public function update(Request $r, $id) {\n\t\t$data = $this->validate(request(),\n\t\t\t[\n\t\t\t\t'' => 'required',\n\t\t\t\t\n\t\t\t\t'logo' => 'sometimes|nullable|'.v_images(),\n\t\t\t], [], [\n\t\t\t\t'' => trans('admin.'),\n\t\t\t\t\n\t\t\t\t'logo' => trans('admin.logo'),\n\t\t\t]);\n\t\tif (request()->hasFile('logo')) {\n\t\t\t$data['logo'] = up()->upload([\n\t\t\t\t\t'file' => 'logo',\n\t\t\t\t\t'path' => 'countries',\n\t\t\t\t\t'upload_type' => 'single',\n\t\t\t\t\t'delete_file' => Country::find($id)->logo,\n\t\t\t\t]);\n\t\t}\n\t\tProduct::where('id', $id)->update($data);\n\t\tsession()->flash('success', trans('admin.record_updated'));\n\t\treturn redirect(aurl('products'));\n\t}", "title": "" }, { "docid": "369171ed590b58ee7cf2cce5a7475211", "score": "0.5706556", "text": "public function updateStreamAsync($path, $resource, array $config = []);", "title": "" }, { "docid": "099b7bf4723843472514004918e11afd", "score": "0.56880456", "text": "public function updating($entity) {}", "title": "" }, { "docid": "223e71d8a07c8027ab5aeccbe0abe839", "score": "0.56874144", "text": "public function update(Request $request, $id)\n {\n\n try {\n // dd($request->all());\n $asset_name = Str::uuid() . '.' . $request->file('file_path')->getClientOriginalExtension();\n $user_provider_release = Release::where('id', $id)->first();\n\n if (Storage::disk('s3')->exists($user_provider_release->file)) {\n Storage::disk('s3')->delete($user_provider_release->file);\n }\n\n $user_provider_release->update([\n 'releases_name' => $request->input('releases_name'),\n 'file' => $request->file('file_path')->storeAs(\n $asset_name, #$fileName\n ['disk' => 's3']#$options\n ),\n // 'file' => Storage::disk('s3')->put($user_provider->provider_key . '/' . $asset_name, $request->file('file_path')),\n 'file_size' => $request->input('file_size'),\n ]);\n\n return $this->sendResponse($user_provider_release, trans('actions.created.success'));\n } catch (ValidationException $ex) {\n return $this->sendError([], $ex->getMessage());\n } catch (Exception $ex) {\n return $this->sendError([], $ex->getMessage());\n }\n }", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "7dec9cec9d7076e6ea452e8d03c2611f", "score": "0.5659796", "text": "public function put($resource = '', array $params = [], array $options = [])\n\t{\n\t\treturn $this->api($resource, 'put', $params, $options);\n\t}", "title": "" }, { "docid": "c23871337ecfebeb8791f86a8676b910", "score": "0.5646621", "text": "public function updateStream($path, $resource, Config $config) {\n return $this->write($path, $resource, $config);\n }", "title": "" }, { "docid": "b547e1879af26ac25f46448832af936b", "score": "0.56463546", "text": "public function update_put()\n {\n $id = $this->get('id');\n \n $response = [\n 'status' => FALSE,\n 'message' => 'Invalid ID Found!',\n 'id' => $id,\n ];\n \n // Validate the id.\n if (! ctype_digit($id)) {\n // Invalid id, set the response and exit.\n $this->response($response, parent::HTTP_BAD_REQUEST);\n }\n\n $product = $this->_validate($this->put(), $err, TRUE);\n if (empty($product)) {\n // Invalid data, set the response and exit.\n $response['message'] = $err;\n $this->response($response, parent::HTTP_BAD_REQUEST);\n }\n\n $n = $this->product_model->update($product, $id);\n if ($n && ES_ENABLE) {\n $product = $this->product_model->get_product($id);\n $this->elasticsearch->add($this->es_type, $id, [$product]);\n }\n \n $response = [\n 'status' => $n,\n 'message' => $n ? 'Updated Successfully' : 'Product not found!',\n 'id' => $id,\n ];\n\n $this->set_response($response, parent::HTTP_ACCEPTED);\n }", "title": "" }, { "docid": "08d68444721a437dc3de2117d3a1e2e7", "score": "0.56340516", "text": "public function update(Request $request, $id)\n {\n DB::beginTransaction();\n try{\n $product = Product::findOrFail($id);\n $data = $request->all();\n if (!empty($data['image'])) {\n $this->unlink($product->image);\n $image_name = $this->uploadImage($data['image'], $request->title);\n $data['image_url'] = asset('products/' . $image_name);\n $data['image'] = $image_name;\n }\n $product->update($data);\n }catch (QueryException $e){\n DB::rollBack();\n return response()->json(['status'=>'error','message'=>$e->getMessage()]);\n }\n DB::commit();\n return response()->json(['status'=>'success','message'=>'Updated Successfully !']);\n }", "title": "" }, { "docid": "d4074248e0a1fab1615f9e277478c327", "score": "0.5631618", "text": "public function update(Request $request, $id)\n {\n// dd($request);\n $id = Product::find($id);\n $id->name = $request->name;\n if($request->image){\n \\Storage::disk('public')->delete($id->image);\n $id->image = $request->image->store('img', 'public');\n }\n $id->price = $request->price;\n\n $id->save();\n $id->sizes()->sync($request->size);\n session()->flash('update','تم تحديث القسم بنجاح');\n return redirect('products');\n\n }", "title": "" }, { "docid": "d60e4a66b566bb76d21dd14ffcb9658b", "score": "0.56287634", "text": "public function updatePhoto(UploadedFile $photo, $storage)\n {\n tap($this -> photoColumn(), function ($previous) use ($photo, $storage) {\n $this -> forceFill([\n $this -> photoColumn() => $photo -> storePublicly(\n $storage, ['disk' => $this -> photoDisk()]\n ),\n ]) -> save();\n\n if ($previous) {\n Storage::disk($this -> photoDisk()) -> delete($previous);\n }\n });\n }", "title": "" }, { "docid": "bbe4927402086e2ac59fa99f10f7099c", "score": "0.5621518", "text": "public function updateProduct($request, $product);", "title": "" }, { "docid": "11cbd279ad105d4859bedb4e70e50376", "score": "0.56115353", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'title' => 'required', \n 'price' => 'required|numeric|min:0', \n 'quantity' => 'required|numeric|min:1|',\n 'weight' => 'numeric|min:0',\n 'shipping_cost' => 'numeric|min:0',\n 'file' => 'mimes:jpeg,png,jpg,gif,svg|max:2048'\n ]);\n \n $data = $request->all();\n unset($data['_token']);\n $data['supplier_id'] = Auth::user()->id;\n $data['updated_at'] = date('Y-m-d H:i:s');\n\n if ($request->file()) {\n $col = DB::table('products')->select('file_path')->where('id', $id)->get();\n unlink($col[0]->file_path);\n\n $f = $data['file'];\n unset($data['file']);\n\n $origianlName = $f->getClientOriginalName();\n $fileName = time().'_'.$origianlName;\n $filePath = $request->file('file')->storeAs('uploads', $fileName, 'public');\n \n $data['file_name'] = $origianlName;\n $data['file_path'] = 'storage/' . $filePath;\n }\n \n DB::table('products')->where('id', $id)->update($data);\n return redirect('/supplier/product');\n }", "title": "" }, { "docid": "a53529e9cb9a8139e2baa6d25d9036a1", "score": "0.5605788", "text": "public function update_resources(Request $request, $id)\n {\n $gallery = Gallery::find($id);\n $gallery->fill($request->all());\n $gallery->save();\n $gallery->resources()->sync($request->resources);\n return redirect()->route('gallery.index');\n }", "title": "" }, { "docid": "51435ade6c2668fe55d1c7f77189c706", "score": "0.56055146", "text": "public function update($bucket, $object, \\Google\\Service\\Storage\\StorageObject $postBody, $optParams = array())\n {\n $params = array('bucket' => $bucket, 'object' => $object, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('update', array($params), 'Google\\Service\\Storage\\StorageObject');\n }", "title": "" }, { "docid": "b7bac3ceb1b9b8584ebd61b08fa09788", "score": "0.5604227", "text": "public function putAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Updated', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "92a495162690e82a01f773b8e7ed8f2b", "score": "0.5602022", "text": "public function update(Request $request, $id)\n {\n\n $products = Products::find($id);\n $products->product_name = $request->product_name;\n $products->product_description = $request->product_description;\n $products->amount=$request->amount;\n $products->phone_number=$request->phone_number;\n\n //resize photo\n if($request->hasFile('product_image')){\n $avatar = $request->file('product_image');\n $filename = time() . '.' . $avatar->getClientOriginalExtension();\n $size = getimagesize($avatar);\n if ($size[0]>1280 && $size[1]>720){\n Image::make($avatar)->resize(1280,720)->save(public_path('photo/').$filename);\n }\n else{\n Image::make($avatar)->save(public_path('photo/').$filename);\n\n }\n $oldFilename = $products->product_image;\n //update the database\n $products->product_image=$filename;\n //Delete the old photo\n Storage::delete($oldFilename);\n\n }\n\n $products->save();\n\n\n\n return redirect('/home') -> with('edit','');\n }", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "861587caf58c3f620dbafce99fe22615", "score": "0.56020206", "text": "public function update($id, $request);", "title": "" }, { "docid": "9a7fd1cb16f74652db2cbc25a7bffef7", "score": "0.55910134", "text": "public function update(Request $request, $id)\n {\n $Product = products::findOrFail($id);\n $Product->Product_Name = $request->Product_Name;\n $Product->Price = $request->Price;\n $Product->Quantity = $request->Quantity;\n $Product->Product_Detail = $request->Product_Detail;\n $Product->Category_id = $request->category;\n\n $current = $Product->Product_Image;\n if($request->hasFile('image')){\n $image = $request->image;\n $image_new_name = time().$image->getClientOriginalName();\n $image->move('Uploads/Artists',$image_new_name);\n $img = 'Uploads/Artists/'.$image_new_name;\n $Product->Product_Image = $img;\n\n if($current != $img){\n unlink($current);\n }\n }\n $Product->save();\n return redirect()->route('AdminViewProducts');\n }", "title": "" }, { "docid": "4c27f86a48a9e3de14bac6ad42c242c6", "score": "0.5589116", "text": "public function update(Request $request, $id)\n {\n $product = product::find($id);\n\n $imgName = $product->img_path;\n if ($request->img_path) {\n $imgName = $request->img_path->getClientOriginalName() . '-' . time();\n $request->img_path->move(public_path('image'), $imgName);\n }\n\n $product -> name = $request -> name;\n $product -> price = $request -> price;\n $product -> description = $request -> description;\n $product -> stock = $request -> stock;\n $product -> img_path = $imgName;\n\n $product -> save();\n\n return redirect('/product');\n }", "title": "" }, { "docid": "9f97386359fae88a2b45d3b14d379734", "score": "0.55884373", "text": "public function update($id, Request $request)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n 'status' => 'required',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n\n try {\n //Update \n $data = [\n 'title' => request('title'),\n 'slug' => str_slug(request('slug')), \n 'body' => request('body'),\n 'header_img' => request('header_img'),\n 'status' => request('status'),\n 'user_id' => request('user_id'),\n ];\n\n $resource = Resource::find($id);\n $tags = json_decode(request('tags'));\n\n //If new tags then create and add for sync\n foreach($tags as $tagK => $tagV){\n if(!is_int($tags[$tagK])){\n if($tag = Tag::create([\n 'title' => $tagV,\n 'slug' => str_slug($tagV),\n ]))\n {\n $tag->resources()->sync($id);\n unset($tags[$tagK]);\n\n $tags[] = $tag->id;\n }\n }\n }\n\n if($resource->update($data) && $resource->tags()->sync($tags) && $resource->quote()->update(['message' => request('quote')])) \n {\n return $this->respondSuccess('Successful edit.');\n }\n\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondInvalid('Invalid.', ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "b55844482d03418d91c721f346f2b8e5", "score": "0.5578638", "text": "public function update(User $user, Resource $resource): Response\n {\n return $user->id === $resource->user_id\n ? Response::allow()\n : Response::deny('You cannot edit this resource.');\n }", "title": "" }, { "docid": "28d5bec9027248d2c146179bcd10f0c3", "score": "0.55759186", "text": "function update_resource_plugin($tablename, $resource) {\n\n return $this->update_record($tablename, $resource);\n }", "title": "" }, { "docid": "9fe43bb7a01e7955489b2fff4393a98b", "score": "0.5575356", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $input = $request->all();\n// need to unlink the old img\n if($image = $request->file('image')){\n if($product->imgurl){unlink(public_path().$product->imgurl);}\n $img_name = \"shop_\".time(). $image->getClientOriginalName();\n $img_name = str_replace(\" \", \"_\", $img_name);\n $image->move('images', $img_name);\n Photo::create(['path'=>$img_name]);\n }\n\n if($file = $request->file('file')){\n if($product->file['filename']){Storage::delete($product->file['filename']);}\n $file_name = \"storage_\".$file->getClientOriginalName();\n $file_name = str_replace(\" \", \"_\", $file_name);\n // $file->move('products', $file_name);\n\n $extension = $file->getClientOriginalExtension();\n Storage::disk('local')->put($file_name, File::get($file));\n\n $entry = new \\App\\File();\n // $entry-> = $file->getClientOriginalExtension();\n $entry->mime = $file->getClientMimeType();\n $entry->filename = $file_name;\n $entry->original_filename = $file->getClientOriginalName();\n $entry->save();\n }\n\n if(isset($img_name)){\n $input['imageurl'] = $img_name;\n }\n if(isset($entry->id)){\n $input['file_id'] = $entry->id;\n }\n\n $product->update($input);\n\n if(isset($product->file_id)){\n $file = $product->hasFile($product->file_id);\n $file->update(['product_id'=>$product->id]);\n }\n\n return redirect('/admin/shop/products');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "773e44111ac6b9307c71a255a478a41a", "score": "0.55630225", "text": "public function update(Request $request, $id)\n {\n $product=Product::find($id);\n $validator = Validator::make($request->all(), [\n 'price'=>'required',\n 'discount'=>'required',\n 'description'=>'required',\n 'image_1'=>'required|image',\n 'color'=>'required',\n 'product_name'=>'required',\n 'quantity'=>'required',\n 'id_departmant'=>'required',\n ]);\n\n if ($validator->fails()) {\n return $this->sendError('Validate Error',$validator->errors());\n }\n\n $product->price= $request->input('price');\n $product->discount= $request->input('discount');\n $product->description= $request->input('description');\n $product->image_1=$request->file('image_1')->store('products');\n $product->color= $request->input('color');\n $product->product_name= $request->input('product_name');\n $product->quantity= $request->input('quantity');\n $product->id_departmant= $request->input('id_departmant');\n\n $product->save();\n return $this->sendResponse(new ProductResources($product), 'Product updated Successfully!');\n\n }", "title": "" }, { "docid": "e892ca85154974bbdf6924de5bbfbb7e", "score": "0.5562889", "text": "public function updateById($id, $data);", "title": "" }, { "docid": "c7a6fd0923fd6923716704c3e0ead706", "score": "0.5562537", "text": "public function update(Request $request, $id)\n { if (auth()->user()->role->name == 'super admin') {\n $service=Service::find($id);\n if ($request->file('image')) {\n\n $filename = $this->globalclass->storeS3($request->file('image'), 'construction/service');\n $service->update($request->except('image') + [\"image\" => $filename]);\n } else {\n $service->update($request->except('image'));\n }\n }\n return redirect()->route('services.index');\n }", "title": "" }, { "docid": "fc4b493da0edca2fd04fda410f514b2c", "score": "0.55605084", "text": "public function write($resource) {\n $this->fill();\n parent::write($resource);\n }", "title": "" }, { "docid": "db2bf6303069858bbe73f4ca2c2dd771", "score": "0.5560327", "text": "public function update($bucket, $object, StorageObject $postBody, $optParams = [])\n {\n $params = ['bucket' => $bucket, 'object' => $object, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('update', [$params], StorageObject::class);\n }", "title": "" }, { "docid": "0fe165fb2ee0e358e23629542836c73f", "score": "0.5549928", "text": "public function update(ElementSLAStoreRequest $request, $id)\n {\n \n$ElementSLA=ElementSLA::get()->where('id',$id)->first();\n if($ElementSLA->update($request->toArray())) {\n return new ElementSLAResource($ElementSLA);\n }\n }", "title": "" }, { "docid": "6047899fb72f8829f2cc03aebb4c3bb3", "score": "0.5540523", "text": "function set_resource($resource) {\n\n return $this->update_record('block_assmgr_resource', $resource);\n }", "title": "" }, { "docid": "5aed89390836b61bf6d700fce636230f", "score": "0.55287766", "text": "public function update(Request $request, $id)\n {\n // The updated flow :\n // 1. When empty use the data from DB\n // 2. So this flow haven't validation flow\n\n\n // 1. Get data from DB use ID parameter\n $product = Product::find($id);\n\n // 2. Update the field value using $request->input\n if ($request->has('name')) {\n $product->name = $request->input('name');\n }\n\n if ($request->has('indexing_name')) {\n $product->indexing_name = $request->input('indexing_name');\n }\n \n if ($request->has('url_ecommerce')) {\n $product->url_ecommerce = $request->input('url_ecommerce');\n }\n \n if ($request->has('price')) {\n $product->price = $request->input('price');\n }\n\n if ($request->has('show')) {\n $product->show = $request->input('show') == \"true\" ? true : false;\n }\n\n if ($request->has('description')) {\n $product->description = $request->input('description');\n }\n \n // 3. Update the image and get the link\n // 2. Save the image and get the link\n $max_image = 5;\n for ($i=1; $i <= $max_image ; $i++) { \n $index = \"image_path_{$i}\";\n\n if ($request->hasFile(\"image_{$i}\")) {\n $image = $request->file(\"image_{$i}\");\n $file_name = time() . '.' . $image->getClientOriginalExtension();\n $image_url = asset('storage/product/'.$file_name);\n \n // Put the file to storage\n // Use file_get_content to get the image/file from object $image\n Storage::disk('public')->put('product/'.$file_name, file_get_contents($image));\n \n // Update URL using new image updated\n $product->{$index} = $image_url;\n }\n }\n \n $product->save();\n\n $message = [\n 'message' => 'Success update product!'\n ];\n return response()->json($message, 200);\n }", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.5526578", "text": "public abstract function update($data);", "title": "" }, { "docid": "0735b88fa99945515b020a6550c7d695", "score": "0.5523289", "text": "public function update(Request $request, $id)\n {\n $pro=Product::find($id);\n $pro->fill($request->all());\n $pro->save();\n $pro->sizes()->sync($request->size);\n $price= Price::where(\"product_id\",\"=\",$id)->first();\n $price->price=$request->price;\n $price->save();\n return redirect()->action(\"StockController@index\");\n \n \n }", "title": "" }, { "docid": "e3ae1f82414c2fe1454cbdd2580b9252", "score": "0.5516162", "text": "public function update(Request $request, $id)\n {\n // Get user from $request token.\n // if (! $user = auth()->setRequest($request)->user()) {\n // return $this->responseUnauthorized();\n // }\n\n // Admin can only update data.\n if (auth()->user()->role !== 'admin') {\n return $this->responseUnauthorized();\n }\n\n // Validates data.\n $validator = Validator::make($request->all(), [\n 'name' => 'required'\n ]);\n\n if ($validator->fails()) {\n return $this->responseUnprocessable($validator->errors());\n }\n\n try {\n $product = Product::where('id', $id)->firstOrFail();\n if (request('name')) {\n $product->name = request('name');\n }\n $product->save();\n return $this->responseResourceUpdated();\n } catch (\\Exception $e) {\n return $this->responseServerError('Error updating resource.');\n }\n }", "title": "" }, { "docid": "19663296ebc49734460cd3e85ba50418", "score": "0.55061334", "text": "public function update(Request $request, $id)\n {\n $item = $request->item;\n VertStorage::find($id)->update($item);\n return response()->json(VertStorage::with(['catalog', 'category'])->find($id));\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "c164d7026174bb67053b77eb09e80d64", "score": "0.54943293", "text": "public function update(Request $request, $id)\n { \n\n \n $product = Product::find($id);\n $product->name = $request->name;\n\n $img = $request->img;\n $img_new_name = time().$img->getClientOriginalName();\n $img->move('uploads/',$img_new_name);\n $product->img = 'uploads/'.$img_new_name;\n $product->save();\n\n return redirect()->route('products');\n }", "title": "" }, { "docid": "4e47d4dc028ea28ff1177255c879c482", "score": "0.5494305", "text": "public function update(Request $request, $id)\n {\n $data_international = International::find($id);\n\n $request->validate([\n 'title' => 'required|max:200',\n 'short_description' => 'required',\n 'description' => 'required',\n 'icon' => 'image'\n ]);\n\n if ($request->file('icon')) {\n $file = $request->file('icon');\n $path = $file->store(\"cooperation\");\n\n if (@$data_international->icon && Storage::exists($data_international->icon)) {\n Storage::delete($data_international->icon);\n }\n }\n\n $data_international->fill([\n 'title' => $request->title,\n 'short_description' => $request->short_description,\n 'description' => $request->description,\n 'url' => $request->url,\n 'url_website' => $request->url_website,\n 'icon' => ($request->file('icon') ? $path : ($data_international->icon != null ? $data_international->icon : null))\n ])->save();\n\n return redirect()->route('admin.international.index')->with(['status' => 'success', 'message' => 'International Updated Successfully']);\n }", "title": "" }, { "docid": "ca5509e96386bb6933d62097aed5ce81", "score": "0.54937387", "text": "public function update(Request $request, $id)\n {\n $this->validateProduct($request,$id);\n $product = Product::findOrFail($id);\n $old_image = $product->image;\n if($request->hasFile('image')){\n $image = $this->uploadProductImage($request);\n Storage::delete('public/products/'.$old_image);\n \n }else{\n $image = '';\n }\n $this->createOrUpdateProduct($request,$product,$image);\n return redirect()\n ->route('admin.products.index')\n ->with('status','Selected Product has been updated!');\n }", "title": "" }, { "docid": "3d8bf3989e6d607ede812c04d29b3205", "score": "0.54916", "text": "public function update(Request $request, $id)\n {\n $file = $request->file('path2');\n $upload = 'public/images_ready';\n $file_name = $file->getClientOriginalName();\n Storage::putFileAs($upload, $file, $file_name);\n $ap = Application::find($id);\n $ap->path2 = url('public/storage/images_ready/' . $file_name);\n $ap->prichina = $request->input('prichina');\n $ap->status_id = $request->input('status');\n $ap->save();\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "630c0491c19401c99ce9452f492c62fd", "score": "0.5484033", "text": "public function updated($entity) {}", "title": "" }, { "docid": "e16acf9713c8c3f5cfd99fb0c548a300", "score": "0.54830205", "text": "public function updateResources($resource_id,$name,$rate,$description,$type){\n\t\t$sql = \"UPDATE resource SET name='\".$name.\"',rate='\".$rate.\"',description='\".$description.\"',type='\".$type.\"' WHERE resource_id=\".$resource_id.\";\";\n\t\t\n\t\t$result = $this->db->query($sql);\n\t\t\n\t\treturn $this->db->countAffected();\n\t}", "title": "" }, { "docid": "43a03b07d905c05a02472b9ff319b7f7", "score": "0.54800415", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n if($product->name != $request['name']) {\n $productImages = Images::where('product_id', $id)->get();\n foreach($productImages as $productImage) {\n $pathArray = explode('/', $productImage->img_path);\n $pathArray[count($pathArray) - 1] = $request['name'];\n $updatedPath = implode('/', $pathArray);\n \n $updatedSlug = implode('-', explode(' ', $request['name']));\n $updatedSlug = $updatedSlug . '-' . $productImage->img_name . '.jpg';\n Storage::move('public/' . $productImage->img_path . '/'.$productImage->img_name . '.jpg', 'public/' . $updatedPath . '/'.$productImage->img_name . '.jpg');\n // Storage::deleteDirectory('public/' . $productImage->img_path);\n $productImage->update(['img_path' => $updatedPath, 'slug' => $updatedSlug]);\n }\n }\n\n $product->update($request->all());\n return $product;\n }", "title": "" }, { "docid": "68b81bcd25140dd49661e608e6da07e4", "score": "0.54704595", "text": "public function update(Request $request, $id)\n {\n\n //\n $validator = Validator::make($request->input(), Product::rulesUpdate($id), Product::$messages);\n if ($validator->fails()){\n return response()->json([\n 'error' => true,\n 'message' => $validator->errors()\n ], 422);\n }\n\n\n $producto = Product::find($id);\n $producto->codigo = $request->codigo;\n $producto->descripcion = $request->descripcion;\n $producto->categoria_id = $request->categoria_id;\n $producto->stock = $request->stock;\n $producto->precio_compra = $request->precio_compra;\n $producto->precio_venta = $request->precio_venta;\n\n\n $photo = $request->file('imagen');\n if($photo){\n\n if($producto->imagen){\n //eliminar\n $photoPath = str_replace('storage', 'public', $producto->imagen);\n Storage::delete($photoPath);\n }\n\n $namefile = 'producto/'.time() . $photo->getClientOriginalName();\n $result = Storage::disk('images')->put($namefile, \\File::get($photo));\n $producto->imagen = Storage::disk('images')->url($namefile);\n }\n\n $producto->save();\n\n return response()->json([\n 'error' => false,\n 'message' => 'El producto se guardo con exito.'\n ], 200);\n }", "title": "" }, { "docid": "73910df553bfa029428fd28ff71bb764", "score": "0.54704195", "text": "protected function _updateResource()\n {\n $params = $this->_getImageCreationParameters($this->_subType);\n $createFunction = $params['createFunction'];\n $this->_resource = $createFunction($this->_fullPath);\n if ($this->_resource == null) {\n throw new Lib_Exception(\"An error occured while loading image file '$this->_fullPath'\");\n }\n }", "title": "" }, { "docid": "f8d6001ac2ab84858440a1f39d3cd6c3", "score": "0.5468607", "text": "public function update(Request $request, Product $product)\n {\n // only authorize role id can touch spicific button or page\n $this->authorize('update', $product);\n $validatedData = $request->validate([\n\n 'name' => 'required|string',\n 'price' => 'required|numeric',\n 'description' => 'required',\n 'category_id' => 'required',\n 'image' => 'image|max:2000'\n ]);\n \n // update product\n $product->update($validatedData);\n\n // check if there's image uploaded.\n // if there's and image, save it and get the url\n if($request->hasFile('image')){\n\n // store the image\n $path = $request->file('image')->store('public/products');\n\n // this will return the url of the saved image\n $url = Storage::url($path);\n\n // set the new url image\n $product->image = $url;\n }\n\n\n // save product\n $product->save();\n\n return redirect(route('products.show', $product->id))\n ->with('message', \"Product is updated successfully\");\n\n\n }", "title": "" }, { "docid": "6dbe9a80c3cc7c4c7214a73b919cb78b", "score": "0.54670787", "text": "public function update($request);", "title": "" }, { "docid": "bc4833cc8fefd6bb389f4233f8156c0e", "score": "0.5465375", "text": "public function update(Request $request, $id)\n {\n //return $request->all();\n\n if( $request->file('product_img') ){\n $fileObj = $request->file('product_img');\n $fileOriginalName = $fileObj->getClientOriginalName();\n $uniqueName = $fileObj->hashName();\n $filePath = ( $this->variables->awsFolderName() ).\"/$fileOriginalName/$uniqueName\";\n $request['img_url'] = $filePath;\n\n $pathToUpload = ( $this->variables->awsFolderName() ).\"/\".$fileOriginalName;\n Storage::disk('s3')->put($pathToUpload, $fileObj, \"public\");\n }\n\n unset($request['_token']);\n unset($request['_method']);\n\n //return $request->except(['product_img']);\n\n Products::where('id', $id)->update($request->except(['product_img']));\n\n return redirect('/product');\n }", "title": "" }, { "docid": "6dfdb976d3f3913cf8013159c3cf0071", "score": "0.5463308", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->title = $request->get('title');\n $product->description = $request->get('description');\n $product->price = $request->get('price');\n\n if($product->image && file_exists(storage_path('app/public/' . $product->image)))\n {\n Storage::delete('public/'.$product->avatar);\n $file = $request->file('image')->store('img/product', 'public');\n $product->image = $file;\n }\n\n $product->material = $request->get('material');\n $product->stock = $request->get('stock');\n $product->size = $request->get('size');\n $product->status = $request->get('status');\n $product->category = $request->get('category');\n\n return redirect()\n ->route('products.index')\n ->with('status','Great! Product updated successfully');\n }", "title": "" }, { "docid": "bbb0907862893d6cc949de90a08b7c28", "score": "0.5461275", "text": "public function flush($resource);", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "4a265ec0ce4a35c698470132f29a7e0f", "score": "0.54604995", "text": "abstract function update($object);", "title": "" }, { "docid": "19323452d4f8b1e3cc766b966234512d", "score": "0.54551905", "text": "public function update($obj) {\n }", "title": "" } ]
b742d967813a6c46963d25a496465196
Fetch the data from GitHub
[ { "docid": "0ec73389dd4d69af4ae68df078cc6b8d", "score": "0.53982556", "text": "private function _fetch_data($url)\n {\n \t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\t$returned = curl_exec($ch);\n\t\t$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t\tcurl_close ($ch);\n\n\t\tif ($status == '200'){\n\t\t\treturn json_decode( $returned );\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "090d78180730850aaab718ebe3b52389", "score": "0.7383918", "text": "public function fetch()\n {\n $this->repo()->run('fetch', ['--all']);\n }", "title": "" }, { "docid": "b311eaab39b6ca5c95eb8d8ac974f530", "score": "0.6819666", "text": "public function fetchData(){\n $this->json = file_get_contents('https://www.reddit.com/r/LucidDreaming/new.json?limit=50');\n }", "title": "" }, { "docid": "0ffcf929763c1b07959a0097a90df0eb", "score": "0.6575346", "text": "public function getRepoContents(){\n $this->_request( sprintf( $this->src_userRepoContents, $this->user, $this->repo ) );\n if( $this->responseCode != 200 ){\n echo 'GitHub server error...'; // e.g\n }\n return json_decode( $this->responseText );\n }", "title": "" }, { "docid": "0ae01c7df0194722b585ae2422a1080b", "score": "0.65480417", "text": "public function getGitHubData()\n {\n return $this->gitHubData;\n }", "title": "" }, { "docid": "aa5987d13d396e2c462713e89f4dadaa", "score": "0.6510398", "text": "private function getProjects(string $url)\n {\n // using a JSON file to save the recovered data is strongly recommended.\n //\n\n $file = $_SERVER['DOCUMENT_ROOT'] . 'public/data/gitHubRepositories.json';\n $content = '';\n\n //Last update < 1day\n if (\n file_exists($file) &&\n time() - filemtime($file) <= 86400\n ) {\n $result = $this->contentsFileToProjects($file, $url);\n if ($result) {\n return $result;\n }\n }\n\n //Last update > 1day or $file not exist\n $opts = [\n 'http' => [\n 'method' => 'GET',\n 'header' => [\n 'User-Agent: PHP'\n\n ],\n \"content\" => $content,\n \"ignore_errors\" => true,\n ]\n ];\n $context = stream_context_create($opts);\n $response = @file_get_contents(\n \"$url\",\n false,\n $context\n );\n\n $status_line = $http_response_header[0];\n\n preg_match('{HTTP\\/\\S*\\s(\\d{3})}', $status_line, $match);\n\n $status = $match[1];\n $response = preg_replace('/ \\(But (.*)/', '\"}', $response);\n if ($status !== \"200\") {\n $this->httpResponseCode($status);\n throw new RuntimeException(\"Error $status<br>Unexpected response status: {$status_line}<br />\" . $response);\n }\n\n //$content = @file_get_contents($url);\n if ($response && $url == 'https://api.github.com/users/h-boudaoud/repos') {\n // delete file\n if (\n file_exists($file)\n ) {\n unlink($file);\n }\n\n $data = json_decode($response);\n foreach ($data as $item) {\n\n $readMe_url = \"https://raw.githubusercontent.com/h-boudaoud/{$item->name}/master/readme.md\";\n $item->readMe = \"URL : $readMe_url\";\n\n $content = @file_get_contents(\n $readMe_url,\n false,\n $context\n );\n if($content){\n $item->readMe = $content;\n }\n\n $content = @file_get_contents(\n $item->languages_url,\n false,\n $context\n );\n $item->languages = array_keys(get_object_vars(json_decode($content)));\n }\n $content = json_encode($data);\n // save data to file\n $pathInfo = pathinfo($file);\n if (!is_dir($pathInfo['dirname'])) {\n mkdir($pathInfo['dirname'], 777, true);\n }\n $f = fopen($file, 'w');\n fwrite($f, $content);\n fclose($f);\n return $data;\n }\n\n //if url!= 'https://api.github.com/users/h-boudaoud/repos'\n\n return $this->contentsFileToProjects($file, $url);\n }", "title": "" }, { "docid": "d5f47bda159d8094c61355657c6be081", "score": "0.64324963", "text": "public function fetch()\n {\n return array(\n 'provider_name' => 'Github Gist',\n 'provider_url' => 'https://gist.github.com/',\n 'type' => 'link',\n 'version' => '1.0',\n 'title' => $this->id,\n 'html' => '<script type=\"text/javascript\" src=\"http'\n . ($this->secure ? 's' : '') . '://gist.github.com/'\n . $this->id . '.js\"></script>'\n );\n }", "title": "" }, { "docid": "d45e1cc7cef50723f7b46bbb954c661f", "score": "0.6374167", "text": "private function fetch(): void\n {\n $resource = $this->reader->download($this->url);\n $parser = $this->reader->getParser(\n $resource->getUrl(),\n $resource->getContent(),\n $resource->getEncoding()\n );\n $feed = $parser->execute();\n\n $this->source = $feed;\n }", "title": "" }, { "docid": "f54b64f30b9a6c45cb8efe80c25f32f1", "score": "0.63479567", "text": "public function fetch()\n {\n $endpoint = $this->getBranchUrl();\n $parameters = $this->getReturnsQueryParameters();\n\n return $this->get($endpoint, $parameters);\n }", "title": "" }, { "docid": "a7646f5e77d082c35355863285d09089", "score": "0.629923", "text": "private function fetchRepositories()\n {\n // @todo (Pablo - 2018-12-13) - Support authenticated requests\n $this->oOutput->write('Fetching repositories from GitHub... ');\n\n $iPage = 1;\n $aRepositories = [];\n\n while (($sResponse = Curl::get('https://api.github.com/orgs/nails/repos?page=' . $iPage)) !== '[]') {\n $aResponse = json_decode($sResponse);\n if (is_array($aResponse)) {\n foreach ($aResponse as $oRepository) {\n $aRepositories[] = $oRepository;\n }\n } else {\n throw new FetchException('Failed to retrieve repositories from GitHub (rate limited)');\n }\n $iPage++;\n }\n\n sort($aRepositories);\n\n $aOut = [];\n foreach ($aRepositories as $oRepository) {\n $aOut[] = new Repository($oRepository);\n }\n\n $this->oOutput->writeln('received ' . count($aOut) . ' repositories');\n\n return $aOut;\n }", "title": "" }, { "docid": "6236a8de94af870cc6dcf900cb613f48", "score": "0.6229246", "text": "function get_repos($u){\n $c=curl_init();\n curl_setopt($c,CURLOPT_URL,$u);\n curl_setopt($c,CURLOPT_USERAGENT, \"GH_CloneRepos.php\");\n curl_setopt($c,CURLOPT_HEADER, 0);\n curl_setopt($c,CURLOPT_RETURNTRANSFER, true);\n curl_setopt($c,CURLOPT_TIMEOUT, 10);\n $o=curl_exec($c);\n curl_close($c);\n return $o;\n}", "title": "" }, { "docid": "2c6f2527deff9ff3731cb043dd33bda0", "score": "0.617252", "text": "public function getRepoDetails(){\n $this->_request( sprintf( $this->src_userRepoDetails, $this->user, $this->repo ) );\n if( $this->responseCode != 200 ){\n echo 'GitHub server error...'; // e.g\n }\n return json_decode( $this->responseText );\n }", "title": "" }, { "docid": "afa50f59adba9be77fa7a1541291ba08", "score": "0.6135615", "text": "public function run()\n {\n $since = rand(0, 46735000);\n $curl = new Curl;\n $j = 50;\n do{\n echo (((50-$j)/50.0)*100).\"%\\n\";\n echo \"Requesting...\\n\";\n $curl->get(\"https://api.github.com/repositories?since=$since&client_id=3389257578926deac1d1&client_secret=3930b2c6f0cf91c3e2b83873db15cc26368fe792\");\n echo \"done! since = $since\\n\";\n $resp = json_decode($curl->response);\n for ($i=0; $i < count($resp); $i++) {\n try{\n $user = new App\\User;\n $user->id = $resp[$i]->owner->id;\n $user->login = $resp[$i]->owner->login;\n $user->avatar_url = $resp[$i]->owner->avatar_url;\n $user->url = $resp[$i]->owner->html_url;\n $user->name = \"010temp\";\n $user->save();\n }catch(QueryException $e){\n echo \"Same user for repo\".$resp[$i]->full_name.\"\\n\";\n }\n // try{\n $repo = new App\\Repository;\n $repo->id = $resp[$i]->id;\n $repo->name = $resp[$i]->name;\n $repo->full_name = $resp[$i]->full_name;\n $repo->description = $resp[$i]->description;\n $repo->url = $resp[$i]->html_url;\n $repo->owner_id = $resp[$i]->owner->id;\n $repo->save();\n // }catch(QueryException $e){\n // echo \"Getting same repos, skiping.\\n\";\n // }\n }\n\n $since = rand(0, 46735000);\n $j--;\n }while($j>0);\n }", "title": "" }, { "docid": "2cb361a866c7382de985125f759931a8", "score": "0.61113167", "text": "public function github()\n {\n $pinnedJson = $this->githubApiService->getUserPinnedItems('Colbydude');\n $pinnedJson = $pinnedJson->data->repositoryOwner->itemShowcase->items->edges;\n\n // Store pinned repositories.\n Storage::put('code/pinned.json', json_encode($pinnedJson));\n\n // Fetch top languages from GitHub.\n $languages = [];\n $page = 1;\n\n $repoJson = $this->githubApiService->getUserRepos($page);\n\n // Iterate through pages.\n while (count($repoJson) >= 30) {\n array_push($languages, Arr::pluck($repoJson, 'language'));\n $page++;\n $repoJson = $this->githubApiService->getUserRepos($page);\n }\n\n $languages = Arr::flatten($languages); // Combine response arrays.\n $languages = array_diff($languages, [null]); // Strip out null values.\n $languages = array_count_values($languages); // Count the repeating values and key them.\n $languages = Arr::sort($languages); // Sort (lowest to highest).\n $languages = array_reverse($languages); // Flip to arrange by highest to lowest.\n\n // Store the top languages.\n Storage::put('code/top-languages.json', json_encode($languages));\n\n return response()->json(['message' => 'OK'], 200);\n }", "title": "" }, { "docid": "73dcdcbc0e3703b7a92c8167b81f2733", "score": "0.60860306", "text": "public function index()\n {\n\n \t$client = new Client(array( 'curl' => array( CURLOPT_SSL_VERIFYPEER => false, ), ));\n \t// $client->setHttpClient($client);\n \t$res = $client->request('GET', 'https://api.github.com/user', [\n \t 'auth' => ['[email protected]', '01731898165gias']\n \t]);\n \t// $res = $client->request('GET', 'https://swapi.co/api/people/1/');\n \t\n \t// echo $res->getStatusCode();\n \t// \"200\"\n \t// echo $res->getHeader('content-type');\n \t// // 'application/json; charset=utf8'\n \t// echo $res->getBody();\n \t// {\"type\":\"User\"...'\n \t$arr_res = json_decode($res->getBody(), true);\n \techo \"<pre>\";\n\t\t print_r( $arr_res );\n \techo \"</pre>\";\n\n \techo $arr_res['login'];\n\t\t// foreach ($arr_res as $results) {\n\t\t// \techo $results;\n\t\t// }\n \t//Send an asynchronous request.\n \t// echo \"<br/>\";\n \t// echo \"<br/>\";\n \t// $request = new \\GuzzleHttp\\Psr7\\Request('GET', 'http://httpbin.org');\n \t// $promise = $client->sendAsync($request)->then(function ($response) {\n \t// echo 'I completed! ' . $response->getBody();\n \t// });\n \t// $promise->wait();\n }", "title": "" }, { "docid": "d6aec0c32f3cec9208e7083dc6049a68", "score": "0.6073264", "text": "private function fetchData()\n {\n $this->_data = json_decode(file_get_contents($this->_dataUrl), true);\n }", "title": "" }, { "docid": "9a53af70fe5e81cc35e5750d69287d79", "score": "0.602353", "text": "private function fetch() {\r\n\t\tif ($this->ErrorOrNot[\"status\"]) {\r\n\t\t\tfile_put_contents($this->dir_name.$this->filename, time());\r\n\t\t\t$curl = curl_init($this->url_api);\r\n\t\t\tcurl_setopt_array($curl, [\r\n\t\t\t\t\tCURLOPT_RETURNTRANSFER => true,\r\n\t\t\t\t\tCURLOPT_TIMEOUT => 1\r\n\t\t\t]);\r\n\t\t\t$data = curl_exec($curl);\r\n\t\t\tif (curl_getinfo($curl)[\"http_code\"] != 200) {\r\n\t\t\t\t$this->ErrorOrNot = [\r\n\t\t\t\t\t\"status\" => false,\r\n\t\t\t\t\t\"message\" => \"Curl Error: \".curl_getinfo($curl)[\"http_code\"],\r\n\t\t\t\t\t\"curl\" => curl_getinfo($curl)\r\n\t\t\t\t];\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\r\n\t\t\t\treturn $data;\r\n\t\t\t}\r\n\t\t\tcurl_close($curl);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "dee28d27c9e4db6f1970f7ad050d7a1a", "score": "0.6021243", "text": "public function getJson()\r\n {\r\n $url = 'https://api.github.com/repos/' .\r\n $this->repository . '/contents/' . $this->repoPath . '?ref=master'; // make url with repository and path name\r\n $resp = (object)json_decode($this->request($url)); // request github api\r\n foreach ($resp as $repo) {\r\n switch ($repo->type) { // verify type of return\r\n case 'dir': // if is a dir\r\n $dir = json_decode($this->request($repo->url)); // request the content on dir\r\n foreach ($dir as $value) { // runs the repository looking for files\r\n if ($this->isJson($value->name)) { // if file is a json file\r\n $json = json_decode($this->request($value->url)); // request the json content\r\n $this->data = base64_decode($json->content); // decode the content\r\n $this->make(); // call the make(); function to send json to elastic search api\r\n }\r\n }\r\n break;\r\n case 'file': // if is a file\r\n if ($this->isJson($repo->name)) { // verify if it's is a valid json file\r\n $json = json_decode($this->request($repo->url)); // request the json content\r\n $this->data = base64_decode($json->content); // decode the content\r\n $this->make(); // call the make(); function to send json to elastic search api\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "611e01aae48a044d8d409dc1530c5fa4", "score": "0.6007453", "text": "function _curl_fetch($url) {\n\t\t$ch = curl_init(); \n\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, 1);\n\t\t\n\t\t$data = curl_exec($ch);\n\t\t\n\t\tcurl_close($ch);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "6c67226bb244872a7a4c0f4aaea45e1b", "score": "0.5982712", "text": "public function download_csse_covid_19_data()\n {\n if (!$filename = $this->getOption('file')) return false;\n\n $opts = array(\n 'http'=>array(\n 'method'=>\"GET\",\n 'header'=>\"Accept: application/vnd.github.v3+json\\r\\n\" .\n \"User-Agent: Mozilla/5.0 (compatible; Joker/1.0; +https://github.com/miamibc/joker-telegram-bot)\\r\\n\"\n )\n );\n $context = stream_context_create($opts);\n if (!$content = file_get_contents( self::LIST_URL , false, $context)) return false;\n if (!$list = json_decode( $content, true)) return false;\n\n /* here we have array of items, like this\n {\n \"name\": \"01-22-2020.csv\",\n \"path\": \"csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv\",\n \"sha\": \"26a4512a85668bebac38522fe6579ccb05a434c3\",\n \"size\": 1675,\n \"url\": \"https://api.github.com/repos/CSSEGISandData/COVID-19/contents/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv?ref=master\",\n \"html_url\": \"https://github.com/CSSEGISandData/COVID-19/blob/master/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv\",\n \"git_url\": \"https://api.github.com/repos/CSSEGISandData/COVID-19/git/blobs/26a4512a85668bebac38522fe6579ccb05a434c3\",\n \"download_url\": \"https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv\",\n \"type\": \"file\",\n \"_links\": {\n \"self\": \"https://api.github.com/repos/CSSEGISandData/COVID-19/contents/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv?ref=master\",\n \"git\": \"https://api.github.com/repos/CSSEGISandData/COVID-19/git/blobs/26a4512a85668bebac38522fe6579ccb05a434c3\",\n \"html\": \"https://github.com/CSSEGISandData/COVID-19/blob/master/csse_covid_19_data/csse_covid_19_daily_reports/01-22-2020.csv\"\n }\n }\n */\n\n $result = [];\n foreach ($list as $item)\n {\n if ($item['type'] != 'file') continue;\n if (substr( $item['name'], -4) !== '.csv') continue;\n $name = substr( $item['name'], 0, -4 );\n $parts = explode( '-', $name);\n $result[ $parts[2] . $parts[0] . $parts[1] ] = $item;\n }\n\n // sort by key (date from filename)\n ksort($result);\n\n // get last element\n $last = array_pop($result);\n\n // download csv\n if (!$content = file_get_contents( $last['download_url'], false, $context)) return false;\n\n // create directory, if not exists\n if (!file_exists(dirname($filename)))\n mkdir(dirname($filename), 0777, true);\n\n // save csv\n file_put_contents( $filename , $content);\n\n return true;\n }", "title": "" }, { "docid": "c40a86621ff9bbf7d650be9c2cd28cc4", "score": "0.5981368", "text": "function callGitHubApi($uri, $method = 'GET', $postData = null) \n{\n if (!isset($handle)) {\n $handle = curl_init();\n }\n\n $options = array(\n CURLOPT_HEADER => false,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_TIMEOUT => 10,\n CURLOPT_URL => GITHUB_API_BASE_URL . $uri,\n CURLOPT_CUSTOMREQUEST => $method,\n CURLOPT_USERAGENT => 'MongoGento Installer'\n );\n\n if ($postData !== null && $method == 'POST') {\n $options[CURLOPT_POSTFIELDS] = '$postData';\n }\n\n curl_setopt_array($handle, $options);\n $response = curl_exec($handle);\n\n if (!$response) {\n trigger_error(curl_error($handle));\n }\n\n $response = json_decode($response, true);\n \n return $response;\n}", "title": "" }, { "docid": "9af7205774e4c11aac8c364380d3156e", "score": "0.59341794", "text": "public function show($number)\n {\n return Http::withBasicAuth(env('GITHUB_USER'), env('GITHUB_TOKEN'))->\n get('https://api.github.com/repos/juan149609/99minutos-fullstack-interview-test/pulls/' . $number);\n }", "title": "" }, { "docid": "3171ec3d6e97b32753239f26a231de6f", "score": "0.58852035", "text": "public function view()\n {\n $ch = curl_init();\n curl_setopt_array($ch, array(\n CURLOPT_USERAGENT => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13',\n CURLOPT_RETURNTRANSFER => 1,\n CURLOPT_URL => 'https://api.github.com/search/repositories?q=language:php&sort=stars&order=desc&per_page=100&page='\n ));\n $result = curl_exec($ch);\n $json = json_decode($result, true);\n\n // Counters\n $added = 0;\n $updated = 0;\n\n // Treat data\n foreach($json['items'] as $repo) {\n // Check whether this repository already on database\n $repository = Repository::where('repository_id', $repo['id'])->first();\n if ($repository) {\n $updated += 1;\n } else {\n $added += 1;\n $repository = new Repository;\n }\n\n // Save data\n $repository->repository_id = $repo['id'];\n $repository->name = $repo['full_name'];\n $repository->url = $repo['html_url'];\n $repository->created_date = new Carbon($repo['created_at']);\n $repository->last_pushed = new Carbon($repo['pushed_at']);\n $repository->description = $repo['description'];\n $repository->stars = $repo['stargazers_count'];\n $repository->save();\n }\n\n // Retrieve results \n $repositories = Repository::take(1000)->get();\n // return response()->json(['message' => 'Added ' . $added . ' repository(ies) and updated ' . $updated . ' repository(ies)']);\n return view('welcome', ['repositories' => $repositories]);\n\n }", "title": "" }, { "docid": "fa12848a143d8ce322f7bb3c5be3d3cd", "score": "0.5880891", "text": "function getRepos()\r\n{ \r\n return file_get_contents(realpath('../res/codingprojects_git.json'));\r\n}", "title": "" }, { "docid": "1aabc37ce483e4c8db639433b7a03a3f", "score": "0.586767", "text": "function fetch_curl($url) {\n $ch = curl_init($url); //initialize the fetch command\n //prevent automatic output to screen\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // in case of MAMP issues\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\n $results = curl_exec($ch); //execute the fetch command\n curl_close($ch); //close curl request\n //decode JSON that is returned\n $data = json_decode($results);\n return $data;\n}", "title": "" }, { "docid": "c7810e7a312b4001faa9ea248f77a467", "score": "0.5866361", "text": "public function fetch ();", "title": "" }, { "docid": "8d37dd8a39e28acc359baad80d36440c", "score": "0.58562523", "text": "public function fetch()\n {\n }", "title": "" }, { "docid": "bfa648cfa1a6bdcca336552aa3be8445", "score": "0.58395505", "text": "protected function fetchAccessToken(){\n\t\t$url = \"https://github.com/login/oauth/access_token?client_id=\".$this->app_id.\"&redirect_uri=\".$this->redirect_uri.\"&client_secret=\".$this->app_secret.\"&code=\".$this->code.\"&state=\".$_SESSION[$this->app_id.\"GITHUB_STATE\"];\n\t\t$result = $this->curl($url, \"POST\");\n\t\tparse_str($result,$result1);\n\t\t$this->access_token = $result1['access_token'];\n\t\t$_SESSION[$this->app_id.'GIT_ACCESS_TOKEN'] = $this->access_token;\n\t}", "title": "" }, { "docid": "1db260c96d625adcf18153bdcc1f4a89", "score": "0.58250004", "text": "public function listRepos(){\n $this->_request( sprintf( $this->src_userRepos, $this->user ) );\n if( $this->responseCode != 200 ){\n echo 'GitHub server error...'; // e.g\n }\n return json_decode( $this->responseText );\n }", "title": "" }, { "docid": "8683ba62f4d7c92032dfe68fd30a0497", "score": "0.57961446", "text": "private function fetch_contents(\n $fetch_url,\n $auth_login = false,\n $auth_pass = false\n ) {\n $fetch_url = str_replace(\"http://\", \"https://\", $fetch_url);\n\n $options = array(\n 'url' => $fetch_url,\n 'login' => $auth_login,\n 'pass' => $auth_pass,\n 'useragent' => $this->user_agent(),\n 'followlocation' => false,\n );\n \n $contents = fetch_file_contents($options);\n $contents = $this->ungzipSafe($contents);\n\n // _debug(\"FETCH_CONTENTS: \" . var_export($options, true)); _debug(\"FETCH_CONTENTS: contents:\\n\" . htmlspecialchars($contents) . \"\\n#######\");\n return $contents;\n }", "title": "" }, { "docid": "4ba7660ccf296d0a1c6e44699a087272", "score": "0.5794383", "text": "final private function fetch($url) {\n \n $curl = curl_init();\n \n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_FRESH_CONNECT, true);\n curl_setopt($curl, CURLOPT_REFERER, \"http://{$_SERVER['HTTP_HOST']}/{$_SERVER['REQUEST_URI']}\");\n \n $result = curl_exec($curl);\n \n curl_close($curl);\n \n return $result; \n }", "title": "" }, { "docid": "434943e5f93c7fb74f940fb75424523a", "score": "0.5766344", "text": "public function get_commits(){\n\t\t$data = array();\n\t\tif(!empty($this->repository)){\n\t\t\t$contents = $this->get_response('repos/' . $this->username . '/' . $this->repository . '/commits');\n\t\t\tif($contents == true) {\n\t\t\t\t$data = array_merge($data, json_decode($contents));\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// Fetch all public repositories\n\t\t\t$repos = $this->get_repositories();\n\t\t\tif($repos == true) {\n\t\t\t\t// Loop through public repos and get all commits\n\t\t\t\tforeach($repos as $repo){\n\t\t\t\t\t$contents = $this->get_response('repos/' . $this->username . '/' . $repo->name . '/commits');\n\t\t\t\t\tif($contents == true) {\n\t\t\t\t\t\t$data = array_merge($data, json_decode($contents));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Sort response array\n\t\tusort($data, array($this, 'order_commits'));\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "66e17dbb45fd3eb59f072d12b9ba164b", "score": "0.57579386", "text": "public function getFetcher();", "title": "" }, { "docid": "cb5ae9399b4c9e45f031b951edc50979", "score": "0.5723925", "text": "function candidateFetch()\n {\n return $this->repoPort->candidateFetch();\n\n }", "title": "" }, { "docid": "4afedc7b104301004f59749a98d09c9b", "score": "0.5706035", "text": "public function fetch();", "title": "" }, { "docid": "39bda5243adb549cad9d6fffe1b0d622", "score": "0.57013696", "text": "function fetchData($url){\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 20);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n }", "title": "" }, { "docid": "065f3edf5ccf8a732fa7219fb8498ac9", "score": "0.5635635", "text": "public function fetchData();", "title": "" }, { "docid": "2f35f92a0ddbd5719e98c742b125fffe", "score": "0.56201094", "text": "public function fetch()\n {\n $account = $this->config['account'];\n $result = [];\n try {\n $settings = [\n 'oauth_access_token' => $this->config['oauth_access_token'],\n 'oauth_access_token_secret' => $this->config['oauth_access_token_secret'],\n 'consumer_key' => $this->config['consumer_key'],\n 'consumer_secret' => $this->config['consumer_secret'],\n ];\n\n $url = \"https://api.twitter.com/1.1/statuses/user_timeline.json\";\n $requestMethod = 'GET';\n $curlOptions = [\n CURLOPT_SSL_VERIFYPEER => 0\n ];\n\n $twitter = new \\TwitterAPIExchange($settings);\n $response = $twitter->setGetfield('?screen_name=' . $account . '&count=10')\n ->buildOauth($url, $requestMethod)\n ->performRequest(true, $curlOptions);\n\n $response = str_replace('\\u2026', '', $response);\n $result = json_decode($response, true);\n } \n catch(\\Exception $e) {\n if (config('app.debug') === true) {\n throw $e;\n }\n return []; \n }\n return $result;\n }", "title": "" }, { "docid": "a2f5c60303005d82905895d00f38b36f", "score": "0.5618147", "text": "private function get_repo_release_info() {\n\t\tif ( !empty( $this->api_result ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Query the GitHub API\n\t\t$url = \"https://api.github.com/repos/ShawONEX/{$this->repo}/releases\";\n\n\t\t// We need the access token for private repos\n\t\tif ( !empty( $this->access_token ) ) {\n\t\t\t$url = add_query_arg( array( 'access_token' => $this->access_token ), $url );\n\t\t}\n\n\t\t// Get the results\n\t\t$this->api_result = wp_remote_retrieve_body( wp_remote_get( $url ) );\n\t\tif ( !empty( $this->api_result ) ) {\n\t\t\t$this->api_result = @json_decode( $this->api_result );\n\t\t}\n\n\t\t// Use only the latest release\n\t\tif ( is_array( $this->api_result ) ) {\n\t\t\t$this->api_result = $this->api_result[0];\n\t\t}\n\t}", "title": "" }, { "docid": "c352a47e2a74699bd7d843acad63cb17", "score": "0.5596939", "text": "public function index()\n {\n $response = Http::withBasicAuth(env('GITHUB_USER'), env('GITHUB_TOKEN'))->\n get('https://api.github.com/repos/juan149609/99minutos-fullstack-interview-test/pulls?state=all');\n return view('pull-request', ['data' => $response->json()]);\n }", "title": "" }, { "docid": "8912ad16ba5bf727677b582117826eda", "score": "0.55851513", "text": "public function get_remote_readme() {\n\t\t$this->get_remote_api_readme( 'github', '/repos/:owner/:repo/contents/readme.txt' );\n\t}", "title": "" }, { "docid": "00ecce1740ca0d2a8ad21a15de7a1c45", "score": "0.55369276", "text": "public function load(array $git, $url = '')\n {\n if (empty($url)) {\n $url = 'https://api.github.com/orgs/' . $git['org'] . '/repos';\n }\n $key = md5(serialize($git) . $url);\n if (!empty($this->_cache) && $this->_cache->exists($key, $this->_lifetime)) {\n $this->_dependencies->getOutput()->info('Using cached data for ' . $url);\n $response = unserialize($this->_cache->get($key, $this->_lifetime));\n } else {\n $this->_dependencies->getOutput()->info('Listing repositories from ' . $url);\n $http_client = new Horde_Http_Client();\n $response = $http_client->get($url);\n if ($response->code == 200) {\n $body = json_decode($response->getBody());\n }\n if ($this->_cache) {\n $this->_cache->set($key, serialize($response));\n }\n }\n $rate_reset = $response->headers['x-ratelimit-reset'];\n $rate_remaining = $response->headers['x-ratelimit-remaining'];\n if ($response->code != 200) {\n if (!empty($body->message)) {\n $message = $body->message . \"\\n You can retry at: \" . date('r', $response->headers['x-ratelimit-reset']);\n throw new Exception($message);\n } else {\n throw new Exception();\n }\n }\n $this->_dependencies->getOutput()->info('You have ' . $rate_remaining . ' GitHub API requests left until ' . date('r', $response->headers['x-ratelimit-reset']));\n $this->_parseRepositories(json_decode($response->getBody()));\n\n // Pagination\n if (!empty($response->headers['link'])) {\n $links = $this->_parseLinks($response->headers['link']);\n if (!empty($links['next'])) {\n $this->load($git, $links['next']);\n }\n }\n }", "title": "" }, { "docid": "63f35bfa85ac3f5fc90e5331710c790e", "score": "0.5532335", "text": "public function fetch()\n {\n $this->action = 'fetch';\n return $this->execute();\n }", "title": "" }, { "docid": "17067e63672a43579c727809209b56b7", "score": "0.5524732", "text": "private function fetch_contents_ch(\n $fetch_url,\n $auth_login = false,\n $auth_pass = false\n ) {\n global $fetch_last_error;\n\n // Save me a migration to https\n $fetch_url = str_replace(\"http://\", \"https://\", $fetch_url);\n\n // Can most likely be omitted as tumbler changed its behaviour.\n // Leave it for now for consistency\n $useragent = $this->user_agent();\n\n $ch = curl_init($fetch_url);\n\n // curl_setopt($ch, CURLOPT_VERBOSE, true); // true to output verbose information. Writes output to STDERR, or the file specified using CURLOPT_STDERR.\n // curl_setopt($ch, CURLINFO_HEADER_OUT, true); // true to track the handle's request string.\n curl_setopt($ch, CURLOPT_HEADER, true); // true to include the header in the output.\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);\n curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // true to return the transfer as a string of the return value of curl_exec() instead of outputting it directly.\n\n\n curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);\n // curl_setopt($ch, CURLOPT_ENCODING, \"\");\n // curl_setopt($ch, CURLOPT_COOKIEJAR, \"/dev/null\");\n\n// return false;\n\n if ($auth_login && $auth_pass) {\n curl_setopt($ch, CURLOPT_USERPWD, \"$login:$pass\");\n }\n\n $ret = @curl_exec($ch);\n\n // _debug(\"FETCH_CONTENTS_CH: curl_error: \" . curl_error($ch)); // https://curl.se/libcurl/c/libcurl-errors.html\n // _debug(\"FETCH_CONTENTS_CH: ret[\" . strlen($ret) . \"]:\\n\" . $this->str2hex($ret));\n // _debug(\"FETCH_CONTENTS_CH: ret[\" . strlen($ret) . \"]:\\n\" . $this->hex_dump($ret));\n \n // _debug(\"FETCH_CONTENTS_CH: CURL_GETINFO: \" . var_export(curl_getinfo($ch), true));\n\n\n $headers_length = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n $headers = explode(\"\\r\\n\", substr($ret, 0, $headers_length));\n $contents = substr($ret, $headers_length);\n\n // _debug(\"FETCH_CONTENTS_CH: headers: \" . var_export($headers, true));\n // _debug(\"FETCH_CONTENTS_CH: contents[\" . strlen($contents) . \"]:\\n\" . $this->hex_dump($contents));\n\n if (! $contents) {\n $fetch_last_error = curl_errno($ch) . \" \" . curl_error($ch);\n curl_close($ch);\n return false;\n }\n\n curl_close($ch);\n\n $contents = $this->ungzipSafe($contents);\n\n // _debug(\"FETCH_CONTENTS_CH: final contents[\" . strlen($contents) . \"]:\\n\" . htmlspecialchars($contents));\n\n return $contents;\n }", "title": "" }, { "docid": "d4748a594d8aa39e544a77eb38a33889", "score": "0.5520738", "text": "function feed_retrieve()\r\n\t{\r\n\t\t\r\n\t\t//conectarse y obtener la respuesta en formato nativo\t\t\r\n\t\tfeedsProcessingAPI::feedsProcessingAPI();\r\n\t\tfeedsProcessingAPI::get($this->feed_url); // si es un feed valido\r\n\r\n\t\t//parserar xml del feed a arreglo asociativo\r\n\t\t$this->respuesta_raw = feedsProcessingAPI::parse_assoc_array(0); \r\n\t\t//parsear resultados obtenidos del feed a formato findjira\r\n\t\t$this->respuesta_findjira = $this->feed_parse();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9f4e4f6c01f39e28877cb9c9c8a80ca7", "score": "0.5519337", "text": "public function getRepoDetails($userName, $repo)\n {\n // create curl resource \n $ch = curl_init(); \n\n // set url \n curl_setopt($ch, CURLOPT_URL, 'https://api.github.com/repos/' . $userName . '/' . $repo); \n\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';\n curl_setopt($ch, CURLOPT_USERAGENT, $agent);\n\n //return the transfer as a string \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n // $output contains the output string \n $output = curl_exec($ch);\n\n if (isset($output->message) && $output->message == 'Not Found'){\n return ['error' => 'Repo not found!'];\n }\n else{\n $repo = json_decode($output, true);\n }\n // close curl resource to free up system resources \n curl_close($ch); \n\n if (isset($repo['message'])){\n return [];\n }\n \n $row = [];\n $row['name'] = $repo['name'];\n $row['description'] = $repo['description'];\n $row['stars'] = $repo['stargazers_count'];\n $row['language'] = $repo['language'];\n $row['url'] = $repo['html_url'];\n \n return $row;\n }", "title": "" }, { "docid": "3d46eda1684f280573a403e7be6def21", "score": "0.5515493", "text": "public static function get($url, $server_name) {\n //Check the cache first.\n if (self::$cache[$url] != null) {\n return self::$cache[$url];\n }\n\n if (self::get_curl()) {\n $options = array(\n CURLOPT_RETURNTRANSFER => true, // return web page\n CURLOPT_HEADER => false, // don't return headers\n CURLOPT_FOLLOWLOCATION => true, // follow redirects\n CURLOPT_ENCODING => \"\", // handle all encodings\n CURLOPT_USERAGENT => \"GitHub Pull Request Bot\", // who am i\n CURLOPT_AUTOREFERER => true, // set referer on redirect\n CURLOPT_REFERER => isset($_SERVER['HTTPS']) ? 'https://' . $server_name : 'http://' . $server_name, //setting the referer\n CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect\n CURLOPT_TIMEOUT => 120, // timeout on response\n CURLOPT_MAXREDIRS => 10, // stop after 10 redirects\n );\n\n $ch = curl_init($url);\n\n // fix for people who are still running old versions of PHP\n if (function_exists('curl_setopt_array')) {\n curl_setopt_array($ch, $options);\n } else {\n foreach ($options as $option => $value) {\n curl_setopt($ch, $option, $value);\n }\n }\n\n $content = curl_exec($ch);\n self::$last_error = curl_error($ch);\n\n curl_close($ch);\n\n if (self::$last_error != 0) {\n return false;\n }\n\n //Add to cache\n self::$cache[$url] = $content;\n\n return $content;\n\n } else if (self::get_allow_url_fopen()) {\n //Check cache first\n if (self::$cache[$url] != null) {\n return self::$cache[$url];\n }\n\n //Get content and add it to the cache\n $content = file_get_contents($url);\n self::$cache[$url] = $content;\n\n //Return the content\n return $content;\n } else {\n self::$last_error = 'cURL not loaded and allow_url_fopen set to\n false. Cannot load web page.';\n return false;\n }\n }", "title": "" }, { "docid": "8d8dec732b6e729cae085820a44ea278", "score": "0.5514527", "text": "private function lastUpdateGitHub() {\n //api https://api.github.com/repos/nmarulo/softn-cms/branches/develop\n $xmlUrlDevelop = 'https://github.com/nmarulo/softn-cms/commits/develop.atom';\n $xmlUrlMaster = 'https://github.com/nmarulo/softn-cms/commits/master.atom';\n\n return [\n 'master' => $this->xmlGitHub($xmlUrlMaster),\n 'develop' => $this->xmlGitHub($xmlUrlDevelop),\n ];\n }", "title": "" }, { "docid": "154c79067484574785b0a91c33e58226", "score": "0.5508712", "text": "private function getRemoteData() {\n // $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1';\n // $agent = 'curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5';\n // $agent = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0';\n $agent = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $this->url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\n // curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');\n // curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n // curl_setopt($ch, CURLOPT_AUTOREFERER, true);\n curl_setopt($ch, CURLOPT_REFERER, 'http://www.google.com');\n curl_setopt($ch, CURLOPT_USERAGENT, $agent);\n\n $data = curl_exec($ch);\n curl_close($ch);\n\n return $this->extractData($data);\n }", "title": "" }, { "docid": "bbfafb5a87a634a9987013dd17870814", "score": "0.55005795", "text": "private static function fetch() {\n\n\t\treturn ( $path = self::path() ) ? (array) json_decode( file_get_contents( $path ), true ) : [];\n\n\t}", "title": "" }, { "docid": "5c6bd1cf13c9af813f4ac2858843cf09", "score": "0.5497936", "text": "function goFetch($url, $params = null)\n{\n\t// Our cookies.\n\tglobal $mmmCookies;\n\t// The cURL handle.\n\t$ch = curl_init($url);\n\t// If we got some POST params to use.\n\tif(is_array($params))\n\t{\n\t\t// Sort the params.\n\t\tcurl_setopt($ch, CURLOPT_POST, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($params));\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"Content-Type: application/x-www-form-urlencoded\"));\n\t}\n\t// Set a modern UA string.\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\"User-Agent: EVHighwayStatus.co.uk - Hope you don't mind Simon, only once every 30 minutes, until API ready? :) Andrew \"));\n\t// Follow redirects if we get them.\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t// Return the output as a string instead of outputting it.\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t// How long to wait before we give up on Nissan.\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 5);\n\t// Where to save cookies when we're done.\n\tcurl_setopt($ch, CURLOPT_COOKIEJAR, $mmmCookies);\n\t// Which cookies to use.\n\tcurl_setopt($ch, CURLOPT_COOKIEFILE, $mmmCookies);\n\t// Execute the request.\n\t$response = curl_exec($ch);\n\t// If cURL returned an error.\n\tif(curl_error($ch) != \"\"){\n // TODO - The request failed. Do something.\n\t\treturn false;\n\t}\n\t\n\t// Return the response.\n\treturn $response;\n}", "title": "" }, { "docid": "cf6988f584541c5bb38d2dc7551c9d72", "score": "0.54930794", "text": "public function collectData(){\n $device = $this->getInput('device');\n \n // Retrieve webpage\n if (empty($device))\n returnClientError('Invalid device: ' . $device);\n \n $pageUrl = 'https://raw.githubusercontent.com/Viper-Devices/official_devices/master/' . urlencode($device) . '/build.json';\n \n\t\t$html = getContents($pageUrl)\n\t\t\tor returnServerError('Could not request raw.githubusercontent.com.');\n $data = json_decode($html);\n \n $this->feedTitle = $device;\n\n\t\t// Process articles\n foreach($data->response as $element) {\n $article_title = $element->filename;\n $article_uri = $element->url;\n $article_content = $element->romtype . ' ViperOS build for ' . $device . ':<br><a href=\"' . $element->url . '\">Download ' . $element->version . '</a> ('. number_format($element->size / 1048576, 2) . ' MB, MD5: '. $element->id . ')';\n $article_timestamp = $element->datetime;\n \n if (!empty($article_title) && !empty($article_uri)) {\n\t\t\t\t$item = array();\n\t\t\t\t$item['title'] = $article_title;\n\t\t\t\t$item['uri'] = $article_uri;\n\t\t\t\t$item['content'] = $article_content;\n $item['timestamp'] = $article_timestamp;\n\t\t\t\t$this->items[] = $item;\n }\n\t\t}\n\t}", "title": "" }, { "docid": "560382b68b07355db830d38d120ff2cb", "score": "0.54791856", "text": "function fetchData($url){\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, $url);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\tcurl_setopt($ch, CURLOPT_TIMEOUT, 20);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $result;\n}", "title": "" }, { "docid": "fa058cf3c19bdaf510aed00d532d170c", "score": "0.54781485", "text": "public function getData($dbh) {\r\n $sth = $dbh->prepare(\"SELECT `repo_id` as `id`, `name`, `url` as `html_url`, `created` as `created_at`, `last_push` as `pushed_at`, `desc` as `description`, `stars` as `stargazers_count` FROM repos\");\r\n $sth->execute();\r\n\r\n /* Fetch all of the remaining rows in the result set */\r\n return $sth->fetchAll(PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "65780ed412821538e7839f1267781c7c", "score": "0.5456189", "text": "private function _fetchData()\n\t{\n\t\t// Respect the headers\n\t\t$this->_processHeaders();\n\n\t\t// Now the body of the response\n\t\t$response = '';\n\n\t\tif (!empty($this->_content_length))\n\t\t{\n\t\t\t$response = stream_get_contents($this->_fp, $this->_content_length);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$response .= stream_get_contents($this->_fp);\n\t\t}\n\n\t\t$this->_response['body'] = $this->_unChunk($response);\n\t\t$this->_response['size'] = strlen($this->_response['body']);\n\t}", "title": "" }, { "docid": "87e11f564a5d97456d98b552e0eb32ee", "score": "0.5447592", "text": "public static function PullContentFromRepo( $parser ) {\n\t\tglobal $wgGit2PagesDataDir;\n\t\t$opts = array();\n\t\tfor ( $i = 1; $i < func_num_args(); $i++ ) {\n\t\t\t$opts[] = func_get_arg( $i );\n\t\t}\n\t\t$options = Git2PagesHooks::extractOptions( $opts );\n\t\t$url = $options['repository'];\n\t\t$gitFolder = $wgGit2PagesDataDir . DIRECTORY_SEPARATOR . md5( $url );\n\t\tif( !isset( $options['repository'] ) || !isset( $options['filename'] ) ) {\n\t\t\treturn 'repository and/or filename not defined.';\n\t\t}\n\t\t$gitRepo = new GitRepository( $url );\n\t\t$gitRepo->CloneGitRepo( $url, $gitFolder );\n\t\tif( isset( $options['branch'] ) ) {\n\t\t\t$gitRepo->GitCheckoutBranch( wfEscapeShellArg($options['branch'] ), $gitFolder );\n\t\t}\n\t\telse {\n\t\t\t$gitRepo->GitCheckoutBranch( 'master', $gitFolder );\n\t\t}\n\t\t$startLine = isset( $options['startline'] ) ? $options['startline'] : 1;\n\t\t$endLine = isset( $options['endline'] ) ? $options['endline'] : -1;\n\t\tif( !self::isint( $startLine ) ) {\n\t\t\treturn '<strong class=\"error\">startline is not an integer.</strong>';\n\t\t}\n\t\tif( $endLine != -1 && !self::isint( $endLine ) ) {\n\t\t\treturn '<strong class=\"error\">endline is not an integer.</strong>';\n\t\t}\n\t\ttry {\n\t\t\t$fileContents = $gitRepo->FindAndReadFile( $options['filename'], $gitFolder, $startLine, $endLine );\n\t\t\t$output = '<pre>' . htmlspecialchars( $fileContents ) . '</pre>';\n\t\t} catch( Exception $ex ) {\n\t\t\t$output = '<strong class=\"error\">' . $ex->getMessage() . '</strong>';\n\t\t}\n\t\treturn array( $output, 'nowiki' => true, 'noparse' => true, 'isHTML' => true );\n\t}", "title": "" }, { "docid": "53dbcc703c8601f986c42c9acb5bc61b", "score": "0.544431", "text": "public function __construct(){\n ini_set(\"user_agent\" , \"Codiad\");\n $this->remote_list = 'https://api.github.com/repos/Codiad/Codiad/pulls';\n $this->request = 'https://api.github.com/repos/Codiad/Codiad/pulls/';\n }", "title": "" }, { "docid": "a401c9897230173e710dc81c46a120e7", "score": "0.54382634", "text": "public function retrieveUsersRepositories($userName)\n {\n $ch = curl_init(\"https://api.github.com/users/\" . $userName . \"/repos\");\n\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_ENCODING, \"\");\n\n curl_setopt($ch,CURLOPT_USERAGENT, \"simple Symfony APP\");\n curl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\n curl_setopt($ch, CURLOPT_FAILONERROR, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, TRUE);\n\n\n // grab URL and pass it to the browser\n $results = curl_exec($ch);\n\n $info = curl_getinfo($ch);\n\n // close cURL resource, and free up system resources\n curl_close($ch);\n\n return $results;\n }", "title": "" }, { "docid": "b8d448f4941cdbfd478a78a40d1b9270", "score": "0.5429226", "text": "public function get_file_info($repo_id='') {\n global $USER;\n $cloud = self::cloud_info();\n $consumer = self::consumer_tokens();\n $usertoken = self::user_tokens($USER->get('id'));\n if (!empty($consumer['key']) && !empty($consumer['secret'])) {\n $url = $cloud['baseurl'].$cloud['version'].'/repos/'.$repo_id;\n $method = 'GET';\n $port = $cloud['ssl'] ? '443' : '80';\n $params = array('access_token' => $usertoken['access_token']);\n $config = array(\n CURLOPT_URL => $url.'?'.oauth_http_build_query($params),\n CURLOPT_PORT => $port,\n CURLOPT_POST => false,\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_SSL_VERIFYHOST => 2,\n CURLOPT_SSL_VERIFYPEER => true,\n CURLOPT_CAINFO => get_config('docroot').'artefact/cloud/cert/cacert.crt'\n );\n $result = mahara_http_request($config);\n if ($result->info['http_code'] == 200 && !empty($result->data)) {\n $data = json_decode($result->data, true);\n $type = strtolower($data['language']);\n $info = array(\n 'id' => $data['id'],\n 'repoicon' => (in_array($type, self::get_available_repo_icons()) ? $type : 'repo'),\n 'name' => $data['name'],\n 'fullname' => $data['full_name'],\n 'branch' => $data['master_branch'],\n 'preview' => $data['html_url'],\n 'description' => $data['description'],\n 'language' => $data['language'],\n 'bytes' => $data['size']*1024, // By default size is returned in kB!\n 'size' => bytes_to_size1024($data['size']*1024),\n 'created' => ($data['created_at'] ? format_date(strtotime($data['created_at']), 'strfdaymonthyearshort') : null),\n 'updated' => ($data['updated_at'] ? format_date(strtotime($data['updated_at']), 'strfdaymonthyearshort') : null),\n );\n return $info;\n } else {\n return null;\n }\n } else {\n throw new ConfigException('Can\\'t find GitHub consumer ID and/or consumer secret.');\n }\n }", "title": "" }, { "docid": "59799968a6265b68fb3c5e2c40343c29", "score": "0.54272205", "text": "private function xmlGitHub($xmlUrl) {\n $github = \\get_object_vars(\\simplexml_load_file($xmlUrl));\n $leng = \\count($github['entry']);\n $forEnd = $leng > 5 ? 5 : $leng;\n $dataGitHub = [\n 'lastUpdate' => $github['updated'],\n 'entry' => [],\n ];\n\n /*\n * Indices de $elements \"id\", \"link\"=>\"@attributes\"=>\"href\", \"title\",\n * \"updated\", \"author\"=>\"name\", \"author\"=>\"uri\", \"content\"\n */\n for ($i = 0; $i < $forEnd; ++$i) {\n $element = \\get_object_vars($github['entry'][$i]);\n $element['link'] = \\get_object_vars($element['link']);\n $element['author'] = \\get_object_vars($element['author']);\n $dataGitHub['entry'][] = [\n 'authorName' => $element['author']['name'],\n 'authorUri' => $element['author']['uri'],\n 'linkHref' => $element['link']['@attributes']['href'],\n 'title' => $element['title'],\n ];\n }\n\n return $dataGitHub;\n }", "title": "" }, { "docid": "f6a430464cb369e119e8fc10079cb56e", "score": "0.5426385", "text": "private static function fetch($url) {\n \n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_TIMEOUT, 3);\n $result = curl_exec($ch);\n curl_close($ch);\n return $result;\n }", "title": "" }, { "docid": "b4eb798fcbc911cb9a5df683e11569f0", "score": "0.5425099", "text": "public function fetch()\n {\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n CURLOPT_URL => \"http://capi.tokeet.com/v1/task?account=1499700995.4461\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"GET\",\n CURLOPT_HTTPHEADER => array(\n \"Authorization: 0aad3f53-e918-4ea5-b1fc-08a72670bc9e\",\n \"Accept: application/json\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n $status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n curl_close($curl);\n\n\n if ($status_code == 200) {\n Task::truncate();\n $tasks = json_decode($response, true)['data'];\n foreach ($tasks as $task) {\n Task::create($task);\n }\n\n return redirect()->route('tasks.index')->with(['alert-type' => 'success', 'message' => 'Fetched successfully']);\n } else {\n return redirect()->route('tasks.index')->with(['alert-type' => 'error', 'message' => 'Fetched Failed']);\n }\n }", "title": "" }, { "docid": "d93633e52e2f44be8fa1684aa1395c3e", "score": "0.53988314", "text": "public function fetchLatestProjects();", "title": "" }, { "docid": "f697ef4e099ddc382b0a42515b0f5bc4", "score": "0.5389965", "text": "public function getRepos($userName)\n {\n // create curl resource \n $ch = curl_init(); \n\n // set url \n curl_setopt($ch, CURLOPT_URL, 'https://api.github.com/users/' . $userName . '/repos'); \n\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\n $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';\n curl_setopt($ch, CURLOPT_USERAGENT, $agent);\n\n //return the transfer as a string \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n // $output contains the output string \n $output = curl_exec($ch);\n\n if (isset($output->message) && $output->message == 'Not Found'){\n return ['error' => 'Repo not found!'];\n }\n else{\n $repos = json_decode($output, true);\n }\n // close curl resource to free up system resources \n curl_close($ch); \n $allRepositories = [];\n if (isset($repos['message'])){\n return [];\n }\n foreach ($repos as $key => $repo){\n $allRepositories[$key]['name'] = $repo['name'];\n $allRepositories[$key]['fullName'] = $repo['full_name'];\n $allRepositories[$key]['htmlUrl'] = $repo['html_url'];\n $allRepositories[$key]['stars'] = $repo['stargazers_count'];\n }\n return $allRepositories;\n }", "title": "" }, { "docid": "48351bed5a1a2ea20d5f5e0a2a04963f", "score": "0.53608125", "text": "public function download(): ?string {\n\t\t$target = $this->get_local_path();\n\n\t\tif ( is_dir( $target ) ) {\n\t\t\t$current_dir = getcwd();\n\t\t\tchdir( $target );\n\t\t\texec( escapeshellcmd( 'git reset --hard -q' ), $output, $status );\n\t\t\texec( escapeshellcmd( 'git pull -q' ), $output, $status );\n\t\t\tchdir( $current_dir );\n\n\t\t\treturn 0 === $status ? $target : null;\n\t\t}\n\n\t\texec(\n\t\t\tescapeshellcmd(\n\t\t\t\tsprintf(\n\t\t\t\t\t'git clone --depth=1 %1$s %2$s -q',\n\t\t\t\t\tescapeshellarg( $this->get_clone_url() ),\n\t\t\t\t\tescapeshellarg( $target )\n\t\t\t\t)\n\t\t\t),\n\t\t\t$output,\n\t\t\t$status\n\t\t);\n\n\t\treturn 0 === $status ? $target : null;\n\t}", "title": "" }, { "docid": "6f7b0812f0eaa49f2b333025c62838e7", "score": "0.535816", "text": "public function github()\n {\n $this->step1('Github');\n }", "title": "" }, { "docid": "c1d37da7758a20667c9ebc787bdc53ed", "score": "0.5354797", "text": "function getReleases() \n{\n $result = array('master' => 'https://github.com/' . GITHUB_REPO_OWNER . '/' . GITHUB_REPO_NAME . '/archive/master.tar.gz');\n\n $uri = '/repos/' . GITHUB_REPO_OWNER . '/' . GITHUB_REPO_NAME . '/releases';\n $releasesListResponse = callGitHubApi($uri);\n \n foreach ($releasesListResponse as $currentRelease) {\n $result[$currentRelease['tag_name']] = $currentRelease['tarball_url']; \n }\n\n return $result;\n}", "title": "" }, { "docid": "a5c3af6399b8ee0f97433be99d7e473a", "score": "0.53543377", "text": "protected function fetch_feed() {\n\n\t\t$response = wp_remote_get( self::SOURCE_URL );\n\n\t\tif ( is_wp_error( $response ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$body = wp_remote_retrieve_body( $response );\n\n\t\tif ( empty( $body ) ) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn $this->verify( json_decode( $body, true ) );\n\t}", "title": "" }, { "docid": "de0e8ff356905144f9ff67651f0e9dfb", "score": "0.53511965", "text": "function get_todays_commits($project = ''){\n\t$curl_url = 'https://git.urtp.pl/api/workspaces/earth-people/projects/'.$project.'/repository/commits?page=1&per_page=250&since='.date('Y-m-d').'T00:00:00&until='.date('Y-m-d').'T23:59:59';\n\n\t$ch = curl_init($curl_url);\n\t#echo $curl_url;\n\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t\t'Authorization: Bearer '.$buddytoken,\n\t\t'Content-Type: application/json'\n\t));\n\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t$result = curl_exec($ch);\n\t#echo $result;\n\tcurl_close($ch);\n\t$json_result = json_decode($result);\n\n\t$gits = array();\n\n\tif(isset($json_result->commits)){\n\t\tforeach($json_result->commits as $commit){\n\t\t\tif(date('Y-m-d', strtotime($commit->commit_date)) == date('Y-m-d') ){\n\t\t\t\t$gits[$commit->committer->name] = $commit->message;\n\t\t\t\t#print_r($commit);\n\t\t\t}\n\t\t}\n\t}\n\treturn $gits;\n}", "title": "" }, { "docid": "b61bc947ce1513b21fe2972eb9f7d544", "score": "0.53491277", "text": "public function index ()\n\t{\n $repos = [];\n $totalRepos = 'who knows how many';\n\n // All of out repo logic is in the Github model\n // Get the repo info\n $git = new Github();\n $result = $git->getRepos();\n\n // If it succeed, gather the infor to display it\n if ( $result['status'] == 'success' ) {\n $repos = $result['items'];\n $totalRepos = $result['total'];\n }\n\n // Render the home page\n $this->app->render('home/index.php', [\n 'title' => \\Model\\Config::$instance->app->name,\n 'total' => $totalRepos,\n 'repos' => $repos\n ]);\n\t}", "title": "" }, { "docid": "36c8aa2f64b98611f2bf723b6a27cdcb", "score": "0.5343018", "text": "public function get_issues(){\n\t\t$data = array();\n\t\tif(!empty($this->repository)){\n\t\t\t$contents = $this->get_response('repos/' . $this->username . '/' . $this->repository . '/issues');\n\t\t\tif($contents == true) {\n\t\t\t\t$data = json_decode($contents);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// Fetch all public repositories\n\t\t\t$repos = $this->get_repositories();\n\t\t\tif($repos == true) {\n\t\t\t\t// Loop through public repos and get all issues\n\t\t\t\tforeach($repos as $repo){\n\t\t\t\t\t$contents = $this->get_response('repos/' . $this->username . '/' . $repo->name . '/issues');\n\t\t\t\t\tif($contents == true) {\n\t\t\t\t\t\t$data = array_merge($data, json_decode($contents));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Sort response array\n\t\tusort($data, array($this, 'order_issues'));\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e23582770b080a019fd544e3a5b23aee", "score": "0.5338213", "text": "public function getRepoReleaseInfo() {\r\n\t\tif(!empty($this->gitHubAPIResult)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Github API query\r\n\t\t$url = \"https://api.github.com/repos/{$this->username}/{$this->repo}/releases\";\r\n\t\t\r\n\t\t// Acces token for private repo\r\n\t\tif (!empty($this->accesToken)) {\r\n\t\t\t$url = add_query-arg(array(\"acces_token\" => $this->accesToken), $url);\r\n\t\t}\r\n\t\t\r\n\t\t// Get API results\r\n\t\t$this->gitHubAPIResult = wp_remote_retrieve_body(wp_remote_get($url));\r\n\t\tif(!empty($this->gitHubAPIResult)) {\r\n\t\t\t$this->gitHubAPIResult = @json_decode($this->gitHubAPIResult);\r\n\t\t}\r\n\t\t\r\n\t\t// use latest release only\r\n\t\tif(is_array($this->gitHubAPIResult)) {\r\n\t\t\t$this->gitHubAPIResult = $this->gitHubAPIResult[0];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d1431617793de66aac9495b31689da2f", "score": "0.5337216", "text": "public function pull()\n {\n $this->git->pull($this->path);\n }", "title": "" }, { "docid": "897e9a57cca365336383df9f6df3e39b", "score": "0.53297484", "text": "abstract function fetch();", "title": "" }, { "docid": "44ec2ac89c77ded206c16da7329f2d9c", "score": "0.5326909", "text": "protected function getModuleLatestVersion()\n {\n $curl = curl_init();\n $agent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)';\n curl_setopt_array($curl, [\n CURLOPT_URL => 'https://api.github.com/repos/Midtrans/Midtrans-Magento2/releases/latest',\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => '',\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 0,\n CURLOPT_FOLLOWLOCATION => true,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_USERAGENT => $agent,\n CURLOPT_CUSTOMREQUEST => 'GET',\n ]);\n\n $response = curl_exec($curl);\n $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n curl_close($curl);\n\n if ($httpCode === 200) {\n return \\Zend_Json::decode($response);\n } else {\n $response = [];\n return $response;\n }\n }", "title": "" }, { "docid": "2d21e1b80d5e3c06802b3a2cb4ef5bf8", "score": "0.532275", "text": "public function get_response($path){\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->api_url . $path);\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'wp-github');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HTTPGET, true);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "e5663fa788f1c9c1f0c6eb28afa4bd81", "score": "0.53191173", "text": "private static function getApiData()\n {\n $str = file_get_contents('https://gitlab.iterato.lt/snippets/3/raw');\n self::$users = json_decode($str, false);\n }", "title": "" }, { "docid": "5bf922b9df7607b75e49e438f81f4661", "score": "0.5315326", "text": "public abstract function fetch();", "title": "" }, { "docid": "8920ebf659760acaae7fed9e9886fc2c", "score": "0.5313889", "text": "public function fetch($remote)\n {\n }", "title": "" }, { "docid": "2564f008cb9cc0c2ef0fa7ffea4af584", "score": "0.53127927", "text": "public function lazyRetrieval(){\n\t\tif($this->localCopyExists()){\n\t\t\treturn $this->retrieveFromRepo();\n\t\t}else{\n\t\t\t$content = $this->retrieveFromWeb();\n\t\t\t$this->saveInRepo($content);\n\t\t\treturn $content;\n\t\t}\n\t}", "title": "" }, { "docid": "50a8159f10bf62abf6d003974c1230da", "score": "0.5301044", "text": "public function testFetch(): void {\n $websiteDataFetcher = new WebsiteDataFetcher(\n $this->getHttpClientMock(self::TEST_WEBSITE_DATA),\n $this->getParameterBagMock(self::TEST_WEBSITE_CONFIG),\n $this->getLoggerMock(),\n $this->getWebsiteDataCacheMock()\n );\n\n $expectedData = $this->getExpectedWebsiteDataResult();\n\n // We should get the website data result for both websites.\n $websiteData = $websiteDataFetcher->fetch(FALSE);\n $this->assertCount(2, $websiteData);\n $this->assertEquals($expectedData, $websiteData);\n }", "title": "" }, { "docid": "524e4de1acc48decf8bb9cfb0912dbef", "score": "0.5297449", "text": "function remote_data()\n\t{\n\t\t$remote_url = $this->remote_data_url();\n\t\t$post['token'] = $this->get_token();\n\t\t$this->CI->curl->add_session($remote_url, 'post', $post);\n\t\t$data = $this->CI->curl->exec();\n\t\tif ($this->CI->curl->has_error())\n\t\t{\n\t\t\t$this->log_message(lang('sync_error_remote_data', current($this->CI->curl->error())));\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "995a167162e0f15a222e8ef346ef50f8", "score": "0.5281901", "text": "private function fetch( $request ) {\n\t\t\t$response = wp_remote_get( $request );\n\t\t\t$code = wp_remote_retrieve_response_code( $response );\n\t\t\tif ( 200 !== $code ) {\n\t\t\t\treturn new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'wp-dropbox-api' ), $code ) );\n\t\t\t}\n\t\t\t$body = wp_remote_retrieve_body( $response );\n\t\t\treturn json_decode( $body );\n\t\t}", "title": "" }, { "docid": "a2c145eb530eb2473e5060fe8483d104", "score": "0.5265856", "text": "public function main()\n {\n if (!isset($this->url)) {\n throw new BuildException(\"Missing attribute 'url'\");\n }\n\n if (!isset($this->dir)) {\n throw new BuildException(\"Missing attribute 'dir'\");\n }\n\n\t$this->log(\"Fetching \" . $this->url);\n\n $request = new HTTP_Request2($this->url);\n\t$response = $request->send();\n\tif ($response->getStatus() != 200) {\n\t\tthrow new BuildException(\"Request unsuccessfull. Response from server: \" . $response->getStatus() . \" \" . $response->getReasonPhrase());\n\t}\n\t$content = $response->getBody();\n\tif ($this->filename) {\n\t\t$filename = $this->filename;\n\t} elseif ($disposition = $response->getHeader('content-disposition')\n\t && 0 == strpos($disposition, 'attachment')\n\t\t&& preg_match('/filename=\"([^\"]+)\"/', $disposition, $m)) {\n\t\t$filename = basename($m[1]);\n\t} else {\n\t\t$filename = basename(parse_url($this->url, PHP_URL_PATH));\n\t}\n\n\tif (!is_writable($this->dir)) {\n\t\tthrow new BuildException(\"Cannot write to directory: \" . $this->dir);\n\t}\n\t$filename = $this->dir . \"/\" . $filename;\n\tfile_put_contents($filename, $content);\n\t$this->log(\"Contents from \" . $this->url . \" saved to $filename\");\n }", "title": "" }, { "docid": "48cc30e0e5e657e01ce0eceab0669966", "score": "0.52480775", "text": "private function fetch( $request ) {\n\t\t\t$response = wp_remote_get( $request );\n\t\t\t$code = wp_remote_retrieve_response_code( $response );\n\t\t\tif ( 200 !== $code ) {\n\t\t\t\treturn new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'wp-packagist-api' ), $code ) );\n\t\t\t}\n\t\t\t$body = wp_remote_retrieve_body( $response );\n\t\t\treturn json_decode( $body );\n\t\t}", "title": "" }, { "docid": "a49d22c7c1a7ec420271b824f23cca03", "score": "0.52476203", "text": "function curl_get_contents($url)\r\n {\r\n $ch = curl_init($url);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\r\n $data = curl_exec($ch);\r\n curl_close($ch);\r\n return $data;\r\n }", "title": "" }, { "docid": "ee833f4561b2b6277d08e066ebe1f6df", "score": "0.5246507", "text": "function requestDataAPI($uri){\n $api = 'https://crnzwhack.herokuapp.com';\n $request_url = $api. '/' . $uri;\n $response = file_get_contents($request_url);\n return $response;\n\n}", "title": "" }, { "docid": "ae2f675af81e6008aa8697e1239c01f6", "score": "0.52406824", "text": "public function retrieveFromRepo(){\n\t\t$fn = $this->repoDir.$this->localPath;\n\t\tif($this->localCopyExists()){\n\t\t\treturn file_get_contents($fn);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f2f484e003416ce5102d29ec07845141", "score": "0.5232258", "text": "function read_repository()\n\t{\n\t\treturn $this->data = $this->account_id ? $this->read($this->account_id,true) : array();\n\t}", "title": "" }, { "docid": "95b3346548205a008b5cfa1a9548e758", "score": "0.5226712", "text": "protected function fetchData()\n\t{\n\t\treturn $this->getData();\n\t}", "title": "" }, { "docid": "7fbf86c2315b36c654a8e7fb0e1fe5a7", "score": "0.52257854", "text": "public function fetch() {\n echo CLI::h2('Fetch', HEADER_FILL);\n// echo CLI::dotFill('fetching structure', DOT_FILL);\n\n foreach ($this->fetchers as $fetcher) {\n $fetcher->fetch();\n }\n $this->setRelationships();\n $this->addManyToMany();\n \n echo CLI::h2('-----', HEADER_FILL);\n// echo CLI::color(\"done\", green) . \"\\n\";\n return $this;\n }", "title": "" }, { "docid": "6d531d60111d130a6ae452c4d3c95eec", "score": "0.51953334", "text": "private function fetch( $request ) {\n\t\t\t$request .= '?api_token=' .static::$api_token;\n\t\t\t$response = wp_remote_get( $request );\n\t\t\t$code = wp_remote_retrieve_response_code( $response );\n\t\t\tif ( 200 !== $code ) {\n\t\t\t\treturn new WP_Error( 'response-error', sprintf( __( 'Server response code: %d', 'wp-ringcentral-api' ), $code ) );\n\t\t\t}\n\t\t\t$body = wp_remote_retrieve_body( $response );\n\t\t\treturn json_decode( $body );\n\t\t}", "title": "" }, { "docid": "e94ace81c4a0ed4c8b6ce3e186d5b2a1", "score": "0.5193793", "text": "public function pull(){\n \n $cli_params = array();\n $cli_params[] = \"--non-interactive\";\n if( $this->username != '' ){\n $cli_params[] = \"--username \" . $this->username;\n }\n if( $this->password != ''){\n //Need to clean up the password so it can be passed to the cli, If anyone find's or thinks of more let me know [email protected]\n $this->password = str_replace( array(\"*\",\"^\",\"&\",'\"') , array('\\*','\\^','\\&','\\\"') , $this->password);\n $cli_params[] = \"--password \" . $this->password;\n }\n \n \n \n \n if($this->svnrepo){\n if(!$this->isAbsPath($this->path)) {\n if(!file_exists(WORKSPACE . '/' . $this->path)) {\n $this->command_exec = \"cd \" . WORKSPACE . \" && svn co \\\"\" . $this->svnrepo . \"\\\" \".$this->path.\" \" . implode(\" \" , $cli_params);\n } else {\n die(formatJSEND(\"success\",array(\"message\"=>\"Folder already exists\")));\n }\n } else {\n if(!file_exists($this->path)) {\n $this->command_exec = \"cd \" . WORKSPACE . \" && svn co \\\"\" . $this->svnrepo . \"\\\" \".$this->path.\" \" . implode(\" \" , $cli_params);\n } else {\n die(formatJSEND(\"success\",array(\"message\"=>\"Folder already exists\")));\n }\n }\n \n if($this->newproject){\n $this->projects = getJSON('projects.php');\n $this->projects[] = array(\"name\"=>$this->name,\"path\"=>$this->path);\n saveJSON('projects.php',$this->projects);\n }\n \n $this->ExecuteCMD();\n \n echo formatJSEND(\"success\",array(\"message\"=>\"Repo cloned\"));\n } else {\n echo formatJSEND(\"error\",array(\"message\"=>\"No Repo specified\"));\n }\n }", "title": "" }, { "docid": "4231926e1de0b0372089824420628b5e", "score": "0.5187152", "text": "function fetch() {\n $url = 'http://www.vegvesen.no/trafikk/xml/search.xml?searchFocus.counties=2&searchFocus.counties=9&searchFocus.counties=6&searchFocus.counties=20&searchFocus.counties=4&searchFocus.counties=12&searchFocus.counties=15&searchFocus.counties=17&searchFocus.counties=18&searchFocus.counties=5&searchFocus.counties=3&searchFocus.counties=11&searchFocus.counties=14&searchFocus.counties=16&searchFocus.counties=8&searchFocus.counties=19&searchFocus.counties=10&searchFocus.counties=7&searchFocus.counties=1&searchFocus.messageType=17&searchFocus.messageType=19&searchFocus.messageType=20&searchFocus.messageType=18&searchFocus.messageType=38&searchFocus.messageType=22&searchFocus.messageType=23&searchFocus.messageType=21&searchFocus.sortOrder=3';\n // use curl to fetch it\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $response = curl_exec($ch);\n curl_close($ch);\n \n // digest the file and spit it out as json\n App::import('Xml');\n $xml =& new XML($response);\n $xml = Set::reverse($xml);\n $json = json_encode($xml);\n return $json;\n }", "title": "" }, { "docid": "48d963805af4f1ddca63019fd50d2807", "score": "0.5182424", "text": "private function fetch_data()\n {\n //\n $ListGetFromParentBranch = $this->CoreModel('ListGetFromParentBranch');\n\n $params = array('id_list' => $this->id_list) ;\n\n $this->view->list_branch_result = $ListGetFromParentBranch->run( $params );\n\n // get only languages that are flagged enabled=true\n //\n $LanguagesGet = $this->CoreModel('LanguagesGet');\n $params = array('enable' => 'true');\n\n $this->view->languages = $LanguagesGet->run( $params );\n\n // get all attribute groups related to lists (id_table = 2)\n //\n $AttributeGroupsGet = $this->CoreModel('AttributeGroupsGet');\n\n $params = array('id_table' => 3);\n\n $this->view->attribute_groups = $AttributeGroupsGet->run( $params );\n }", "title": "" }, { "docid": "256bc2a87c49c231241478e195275632", "score": "0.5178211", "text": "public function getRepositoryUrl(): string;", "title": "" }, { "docid": "37bd8cc3f8e168102814041148ca56f8", "score": "0.5169297", "text": "function userFetch()\n {\n return $this->repoPort->userFetch();\n }", "title": "" }, { "docid": "05ab44bba97e7db2ca96a39e8e64394a", "score": "0.5150751", "text": "public function fetchData()\n\t{\n\t\t$title = IPSText::parseCleanValue( base64_decode($_REQUEST['title']) );\n\t\t$url = IPSText::parseCleanValue( base64_decode($_REQUEST['url']) );\n\t\n\t\t$return = array( 'title' => '', 'content' => '', 'topicData' => array() );\n\t\t$return['title']\t= $title;\n\t\t$return['content']\t= \"<br /><br /><br />{$this->lang->words['bt_source']} [url=\\\"{$url}\\\"]{$title}[/url]<br />\";\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "bf24df5a129a7441ba2b278d728480c2", "score": "0.51452804", "text": "function url_get_contents ($Url) {\n\t\t\t if (!function_exists('curl_init')){ \n\t\t\t die('CURL is not installed!');\n\t\t\t }\n\t\t\t $ch = curl_init();\n\t\t\t curl_setopt($ch, CURLOPT_URL, $Url);\n\t\t\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t $output = curl_exec($ch);\n\t\t\t curl_close($ch);\n\t\t\t return $output;\n\t\t\t }", "title": "" }, { "docid": "134e5eff7d690b4b82b63e147aa30eec", "score": "0.51445657", "text": "function get_data($url) {\n $ch = curl_init(); \n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($ch);\n curl_close($ch);\n return $data;\n}", "title": "" }, { "docid": "cdd4da8338e4b7d8f9801af903bdb88e", "score": "0.5141114", "text": "function loadJSONData(){\n // Load and store portfolio data\n $info_file = file_get_contents(\"data/info.json\");\n $github_file = file_get_contents(\"data/github.json\");\n\n // Convert from JSON\n $info_json = json_decode($info_file, true);\n $github_json = json_decode($github_file, true);\n\n // Assign to variables\n $data['info'] = $info_json['information'];\n $data['projects'] = $info_json['projects'];\n $data['github'] = $github_json['projects'];\n\n // Add meta\n $data['meta']['dir'] = __DIR__;\n\n // Return data\n return $data;\n }", "title": "" } ]
cbd26b59e706fca0ee5028ce794f0e91
Deletes a particular model. If deletion is successful, the browser will be redirected to the 'index' page.
[ { "docid": "1972b950e946fc98066e5d6aeef931c8", "score": "0.70939475", "text": "public function actionDelete($id)\n\t{\n\t\t$model=$this->loadModel($id);\n\t\t$model->delete();\n\t\t// if AJAX request (triggered by deletion via index grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}", "title": "" } ]
[ { "docid": "e92d42a775193058275341fa35e61b9d", "score": "0.8027941", "text": "public function actionDelete()\n {\n $id = Yii::$app->request->get('id', 0);\n $this->findModel($id)->delete();\n \n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "dffacf26ced23b35f12f46ef6139e608", "score": "0.7786148", "text": "public function delete(){\n\t\t$this->_load()->delete();\t// load model & hapus data\n\t\theader(\"Location:\".$this->createUrl('index'));\n\t}", "title": "" }, { "docid": "64c9946ed7fdc706fdc1dc3ba95a8832", "score": "0.7541166", "text": "public function actionDelete($id) \n { \n $this->findModel($id)->delete(); \n \n return $this->redirect(['index']); \n }", "title": "" }, { "docid": "d9ca9df7059ca383deacac657871b7ad", "score": "0.7468696", "text": "public function actionDelete()\n {\n $model = $this->findModel(Yii::$app->request->get('id'));\n return $this->commonDelete($model);\n }", "title": "" }, { "docid": "2a11669e7fb256b1478b76e696dbd303", "score": "0.74035347", "text": "public function actionDelete($id)\n{\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n}", "title": "" }, { "docid": "457861b02e68998c661edc49ac30dc19", "score": "0.73316586", "text": "public function actionDelete($id) {\n// $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ef38a32c9a9a06d368483c1f21a7745c", "score": "0.73014724", "text": "public function actionDelete($id)\n {\n// $this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->status = $model::STATUS_DELETE;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "73b510e9887f6c29e3f5ea0cef1673cd", "score": "0.72668463", "text": "public function actionDelete()\n {\n return $this->commonLogicDelete($this->model);\n }", "title": "" }, { "docid": "5ac27219cf3b816f7502fa8b5680c4c0", "score": "0.72415286", "text": "public function actionDelete()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n $this->deleteChildren($model->id);\n return $model->delete() !== false ? $this->success() : $this->fail();\n }", "title": "" }, { "docid": "70421c29ceb1166e24e8d6bd41b9b283", "score": "0.72366357", "text": "public function actionDelete(int $id) {\n\t\t$model = $this->findModel($id);\n\t\tif (static::canDelete($model)) {\n\t\t\t$model->delete();\n\t\t}\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "30084a63e8248d9425835a0b5828a782", "score": "0.72292125", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "93b8ab0bbec01775c98be718df030c18", "score": "0.72214395", "text": "public function actionDelete(int $id) {\n\t\t$model = $this->findModel($id);\n\t\t$model->delete();\n\t\treturn $this->redirect(Url::previous());\n\t}", "title": "" }, { "docid": "96a1e0407c0e39cc94ea3e191c544532", "score": "0.71922296", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "96a1e0407c0e39cc94ea3e191c544532", "score": "0.71922296", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "0c9906a26116e5ad9d0b955ccdbca5dd", "score": "0.718381", "text": "public function delete_model() {\n if ($this->checkLogin('O') == '') {\n redirect(OPERATOR_NAME);\n } else {\n $model_id = $this->uri->segment(4, 0);\n $condition = array('_id' => MongoID($model_id));\n $this->brand_model->commonDelete(MODELS, $condition);\n $this->setErrorMessage('success', 'Model deleted successfully','admin_brand_model_deleted_success');\n redirect(OPERATOR_NAME.'/brand/display_model_list');\n }\n }", "title": "" }, { "docid": "9e655ee507fbb18eab886c6622d69112", "score": "0.71721184", "text": "public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $model->enable_view=0;\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "639ffdf296dcb35b82f383488decae5e", "score": "0.7159129", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->deleteModel();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "5e652d26331deb0b3c2a59f0c81d38a4", "score": "0.71554255", "text": "public function actionDelete($id)\n {\n \t$this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "6c1ed0de4b74c0c8877e8d5ba2d2ab67", "score": "0.7154559", "text": "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n // return $this->redirect(['index']);\n }", "title": "" }, { "docid": "67b86164d037811fe65d7a4deef22f2e", "score": "0.71540844", "text": "public function actionDelete()\n {\n\n $id = $_POST['id'];\n\n $model = $this->loadModel($id);\n\n foreach ($model->citas as $cita) {\n $cita->delete();\n }\n\n $model->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n//\t\tif(!isset($_GET['ajax']))\n//\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }", "title": "" }, { "docid": "ee432c8cf936ec897e46096426a9c0e9", "score": "0.7149754", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "337c82fb010da40ca56e1a29990da0f5", "score": "0.7149478", "text": "public function actionDelete($id)\n {\n $model=$modelall=$this->findModel($id);\n $modelall->delete();\n return $this->redirect(['index', 'id' => $model->criteria_id]);\n }", "title": "" }, { "docid": "39eded6dfdeccda18ac5c3fc5e1960f9", "score": "0.7144315", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "9d1df1784695a3389dd79f7f75935c3d", "score": "0.713567", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n //return $this->goBack();\n }", "title": "" }, { "docid": "e69ef8d8577b5aa72e0aff89491eaf28", "score": "0.71172947", "text": "public function actionDelete( $id )\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "79b0b72ebe6aa671fe71722be884f590", "score": "0.7107033", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model['is_delete'] = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "fb48cd56d6befe9cdf114a8066db7f05", "score": "0.7090232", "text": "public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $model->status=$model::STATUS_DELETED;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "85558120cb0a1b4a2f6881601447c912", "score": "0.70882213", "text": "public function actionDelete($id)\n {\n\t\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.70764136", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.70764136", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.70764136", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "f38714a91a38301033a539c22bbdb89a", "score": "0.7069615", "text": "public function actionDelete($id)\n {\n $model= $this->findModel($id);\n $model->enabel_view=0;\n \n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "97cb7e97caaa39f1bb5a2a639dfc67d6", "score": "0.7065596", "text": "public function actionDelete($id) {\n\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "b06cd9f0ddd4dbb0a96b420181d25496", "score": "0.70638263", "text": "public function actionDelete($id)\n { \n $connection = \\Yii::$app->db;\n $transaction = $connection->beginTransaction();\n \n try {\n $model = $this->findModel($id);\n\n $this->deshacer_renglones($model);\n\n $model->delete();\n \n $transaction->commit();\n \n return $this->redirect(['index']);\n\n }\n catch (\\Exception $e) {\n $transaction->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "bd6c0bd70acba2ea46d39e260018b536", "score": "0.70625174", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "a35a3f4cd2c34c534d2346345a16da90", "score": "0.706203", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "2fe75046ebae4bb6f1056c159d1f4259", "score": "0.70545304", "text": "public function actionDelete($id)\n {\n //$this->findModel($id);//->delete();\n //$this\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "7ebc6e5077b9c0eef01d6529a5ac0847", "score": "0.70513", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->isDel = 1;\n $model->save(false);\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ea813e95cca2739bbb2c5e6c7b444263", "score": "0.70447767", "text": "public function delete($model);", "title": "" }, { "docid": "ea813e95cca2739bbb2c5e6c7b444263", "score": "0.70447767", "text": "public function delete($model);", "title": "" }, { "docid": "ea813e95cca2739bbb2c5e6c7b444263", "score": "0.70447767", "text": "public function delete($model);", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.70426595", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "3ac73329b97015d4230b3bf1ec6df60c", "score": "0.7034584", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index',Yii::$app->request->queryParams]);\n }", "title": "" }, { "docid": "e7e7566d47b92cd51c3012fca2040615", "score": "0.70293343", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.7029302", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e5603c8d4310cf44db4e5abdf354995d", "score": "0.7008272", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->dt_deleted_at = date(\"Y-m-d h:i:s\");\n $model->save();\n //$this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "82f0ca3f231e6b7bc93f5872d8a93c6f", "score": "0.69969505", "text": "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "title": "" }, { "docid": "66be71ee05a59c6bf416d13db1d3acf0", "score": "0.69915193", "text": "public function actionDelete()\n\t{\n parent::actionDelete();\n\t\t $model=$this->loadModel($_POST['id']);\n\t\t $model->recordstatus=0;\n\t\t $model->save();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "title": "" }, { "docid": "ad64fd4d772460e31e28ebd92b969dc0", "score": "0.6991078", "text": "public function actionDelete()\n\t{\n parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->recordstatus=0;\n\t\t $model->save();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.69761074", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "12cbcc3f1fffad08e2122bd3904b8bb9", "score": "0.6975011", "text": "public function actionDelete($id)\n {\n $model= $this->findModel($id);\n $model->estatus= 0;\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e95c7599d337bd7075edef17db56cfa5", "score": "0.69592685", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n if (Yii::$app->request->isAjax) {\n $this->actionIndex();\n }\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "212a507f8c8aa15582220cb0b2683476", "score": "0.69464636", "text": "public function actionDelete($id)\n {\n exit;\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "8e2acf03bfa5eb99c6e1925f62641941", "score": "0.6945053", "text": "public function delete()\r\n {\r\n $model = new ProductModel();\r\n\r\n $model->loadData($this->request->all());\r\n $model->loadData($model->one(\"id = $model->id\"));\r\n\r\n echo $this->view(\"productDelete\", \"main\", $model);\r\n }", "title": "" }, { "docid": "bc7a389d4c1b557f78bc6b294d997ef2", "score": "0.694108", "text": "public\n function actionDelete( $id )\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" } ]
d8bb7fe72025affc2d6f6abe4c29a993
A basic feature test example.
[ { "docid": "8fbb7cbe7e12cd6d7ed38f8b5ce605aa", "score": "0.0", "text": "public function testProcessWithExistInputs()\n {\n\n $curr = \"USD\";\n $products = [\"T-shirt\",\"T-shirt\",\"Shoes\",\"Jacket\"];\n $currObject = new CurrencyService();\n $subTotal=0.00;$taxes=0.00;$discounts=[];$discountsAmount=0.00;$total=0.00;\n $i = 0;\n $len = count($products);\n foreach($products as $key => $product){\n \n //initialising new object for ProductService Class\n $prodObject = new ProductService();\n\n //Match(Find) The Product\n $mainProduct = $prodObject->getProduct($product);\n \n //calculate subTotal\n $subTotal += $currObject->getPriceAccordingCurrentCurrency($curr,$mainProduct['amount']);//$mainProduct['amount'];\n \n \n // calculate discounts\n $proc = $prodObject->processProductDiscount($product,array_count_values($products));\n $discounts[] = $proc['query'];\n $discountsAmount += $proc['discount'];\n\n \n\n //calculate taxes\n if ($i == $len - 1) {//check if last iteration to add the taxes\n $taxes = ($subTotal * Tax::getTax());\n $totalAmount = (($subTotal + $taxes) - $discountsAmount) ;\n }\n\n $i++;\n }\n\n }", "title": "" } ]
[ { "docid": "597b9e62da897a1296a3a7ff4b51ff92", "score": "0.754761", "text": "public function testBasicExample()\n {\n\n }", "title": "" }, { "docid": "8884558ce299cb0d10781a516c7769b1", "score": "0.7023433", "text": "public function testBasicExample()\n {\n //$this->visit('/exams')\n // ->click('添加新考试')\n // ->see('考试描述')\n // ->see('考试时间')\n // ->seePageIs('/exams/create');\n }", "title": "" }, { "docid": "0fcd471d9ec3e9d8e3c1da9a0676bd9e", "score": "0.70232284", "text": "function test_sample() {\n\t\t// Replace this with some actual testing code.\n\t\t$this->assertTrue( true );\n\t}", "title": "" }, { "docid": "f7c556d7261c1a52746415700b65d4f9", "score": "0.7000255", "text": "public function testExample()\n {\n $this->mistake();\n $this->success();\n }", "title": "" }, { "docid": "1f03cda9271ee4cd2ad11a4ae36de2a6", "score": "0.6945264", "text": "public function test_example()\n {\n\n }", "title": "" }, { "docid": "72ddcee0b8cebb205f398c92ce024af9", "score": "0.6922299", "text": "public function testBasicExample()\n {\n //$this->visit('/')\n //->see('Laravel 5');\n $tenista = \\App\\Tenista::find(1);\n $this->actingAs($tenista, 'tenista')\n ->visit('/tenista')\n ->see('Tenista '. $tenista->nome)\n ->click('torneio_1')\n ->see('Detalhes do Torneio')\n ->check('termos')\n ->press('Inscrever');\n }", "title": "" }, { "docid": "6b80d9211e0430929e9492b094fae923", "score": "0.6916525", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->type('Taylor', 'author')\n ->type('testtext','text')\n ->press('Submit');\n \n }", "title": "" }, { "docid": "47f2ad0df0eec185eff7a48f42455e93", "score": "0.6912219", "text": "public function test()\n\t\t{\n\t\t}", "title": "" }, { "docid": "d27c78f1a0303657c7dc3067d9073440", "score": "0.6903378", "text": "public function testGetCategoryFeatures()\n {\n\n }", "title": "" }, { "docid": "90c19d0b4f1740739a3b055d06e93afc", "score": "0.68999845", "text": "public function testBasicExample() {\n $this->visit('/')\n ->click('Home')\n ->see('ABOUT US');\n $this->visit('/')\n ->click('Contact')\n ->see('CONTACT FORM');\n $this->visit('/')\n ->click('Services')\n ->see('Start');\n $this->visit('/')\n ->click('Login')\n ->see('LOG IN');\n }", "title": "" }, { "docid": "7b34d85011c2e675f339bb6697e121ca", "score": "0.6872526", "text": "public function testExample()\n {\n $this->browse(function ($first) {\n $first->loginAs(User::find(1))\n ->visit('/posts')\n ->assertSee('All posts');\n });\n }", "title": "" }, { "docid": "6639326186a743f118607b6d25699e61", "score": "0.68033326", "text": "public function testBasicExample()\n {\n // $this->visit('/')\n // ->see('Laravel 5');\n\n\n //Temp modify\n // $this->visit('/test_sample')\n // ->see('for Phpunit test');\n\n\n //Laracast practice\n\n //1. Visit the test_sample page\n $this->visit('/test_sample');\n //2. Click on the link 'Click Me'\n $this->click('Click Me');\n //3. See 'Whazzup bro'\n $this->see('Whazzup bro');\n //4. Verify the page /whazzup\n $this->seePageIs('/whazzup');\n \n }", "title": "" }, { "docid": "614de6763bdd4e9ab1e6afd7cc51d8d3", "score": "0.6803173", "text": "public function testBasicExample()\n {\n /*\n $this->visit('/')\n ->see('Se parte del futuro.');\n */\n $this->visit('/')\n ->type('80938', 'cod')\n ->type('josef', 'user')\n ->type('1234', 'pass')\n ->press('btn_ingresar')\n ->seePageIs('usuario')\n ->see('Bienvenido, Jose Fuentes');//verifica que se haya ingresado a esta pagina\n }", "title": "" }, { "docid": "8eae254203ca142c8553fe2d6584e45b", "score": "0.6741721", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->assertSee('Laravel Unittesting')\n ->clickLink('Form Products')\n ->assertPathIs('/unittesting2/unittesing/public/products/create')\n ->value('#name', 'speelgoedauto')\n ->value('#description', 'Een mooie speelgoedauto')\n ->click('input[type=\"submit\"]')\n ->assertPathIs('/unittesting2/unittesing/public/products');\n });\n }", "title": "" }, { "docid": "4aa94d21b0e6022983e71e274c8cd3e6", "score": "0.6689913", "text": "public function testFeatureCreation()\n {\n $feature = Feature::fromNameAndStatus('my.feature', false);\n\n $this->assertEquals('my.feature', $feature->getName());\n $this->assertFalse($feature->isEnabled());\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "68c66e96c5e19d6ae7db7168b28b265c", "score": "0.6640096", "text": "public function testExample()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "8e0ea47dc846d7a0bc3423eb4b68993e", "score": "0.66365665", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel');\n }", "title": "" }, { "docid": "626eeb637d86fbbb8682d6b05744e14d", "score": "0.66351175", "text": "public function test_basic_example()\n {\n $user = factory(\\App\\User::class)->create([\n 'name' => 'Yony Brondy',\n 'email' => '[email protected]',\n ]);\n $this->actingAs($user, 'api')\n ->visit('api/user')\n ->see('Yony Brondy')\n ->see('[email protected]');\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "304d138957781970cb5e9449e76ad833", "score": "0.6604926", "text": "public function test()\n {\n $this->executeScenario();\n }", "title": "" }, { "docid": "5206edc2a16a4a8673d371a5e2a7eb76", "score": "0.65999097", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "title": "" }, { "docid": "5206edc2a16a4a8673d371a5e2a7eb76", "score": "0.65999097", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->see('Laravel 5');\n }", "title": "" }, { "docid": "631d7fd2b569c689cd9aa9da1f944143", "score": "0.65924424", "text": "public function testBasicExample()\n {\n// $this->visit('/')\n// ->see('Laravel 5');\n }", "title": "" }, { "docid": "f48cb577893920d6876dfa1f5ba5fd3c", "score": "0.65687007", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n // 1. Visit the homepage\n // 2. Press a \"Click Me\" link\n // 3. See \"You've been clicked, punk\"\n // 4. Assert that the current url is /feedback\n $browser->visit(\"/\")\n ->clickLink(\"Click Me\")\n ->assertSee(\"You've been clicked, punk.\")\n ->assertPathIs('/feedback');\n });\n }", "title": "" }, { "docid": "ba5b969b03398e4b417638bf7505fd3b", "score": "0.6559009", "text": "public function demo()\n\t{\n\n\t}", "title": "" }, { "docid": "1b6cdc77a6a94b2e810558d9b7fcaadd", "score": "0.65422565", "text": "public function test()\n\t{\n\t}", "title": "" }, { "docid": "0e121a603a7547e49deaeea029d992d2", "score": "0.65330654", "text": "public function testGreet()\n {\n }", "title": "" }, { "docid": "cf687da2e6b3b1dc0a4ad642958513e7", "score": "0.65125906", "text": "public function testBasicExample()\n {\n $this->visit('/')\n ->click('Click Me')\n ->see('You\\'ve been clicked, punk.')\n ->seePageIs('click-me');\n }", "title": "" }, { "docid": "126bde91a0fead79144c57c213092289", "score": "0.65123993", "text": "public function test_example()\n {\n $response = $this->visit('/');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "fe793a9674309d569ab939bc983debb3", "score": "0.6501398", "text": "public function basicExample()\n\t{\n\t\t$this->visit('/')\n\t\t\t->see('Staff Directory');\n\t}", "title": "" }, { "docid": "d8181ca7a4d4b884983448d3217110a5", "score": "0.6494699", "text": "public function testExample()\n {\n\t\t$crawler = new Crawler();\n\t\t$ret = $crawler->crawl('FoodsXiangke', ['name' => '西红柿 螃蟹']);\n\t\tfwrite(STDERR, print_r($ret, TRUE));\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "51ab8b873213f7ae397b093677cb8927", "score": "0.6494002", "text": "public function test_defaults_to_enabled()\n {\n $this->assertTrue(feature('no_such_feature'));\n }", "title": "" }, { "docid": "2eaf4c6d47984b42408bd1ceb86f69d6", "score": "0.64539343", "text": "function test_basic_example()\n {\n $name='Luis Casiano';\n $email='[email protected]';\n $user= factory(\\App\\User::class)->create([\n 'name'=>$name,\n 'email'=>$email,\n ]);\n $this->actingAs($user,'api')\n ->visit('/api/user')\n ->see($name)\n ->see($email);\n }", "title": "" }, { "docid": "be984ec1ce590dc6cb650f287418b306", "score": "0.64362", "text": "public function testExample()\n {\n $this->assertTrue(true);\n /*\n $this->visit('/registroEmpleado')\n ->type('1093', 'documento')\n ->type('jhon', 'nombre')\n ->type('ramirez', 'apellido')\n ->type('12345', 'nacionalidad')\n ->type('3162953', 'celular')\n\t\t\t->type('jhon', 'telefono')\n\t\t\t->type('mz 30 #12', 'direccion')\n\t\t\t->type('1992/05/13', 'Fecha Nacimiento')\n\t\t ->type('universitario', 'estudiosRealizados')\n\t\t\t->type('pregrado', 'nivel')\n\t\t\t->type('Uq', 'lugarEstudios')\n\t\t\t->type('docente', 'cargo')\n\t\t\t->type('5B', 'grado')\n\t\t\t->type('Uq', 'tiempoTrabajo')\n\t\t\t->type('17/04/2017', 'fechaIngreso')\n\t\t\t->type('1200000', 'valorNomina')\n\t\t\t->type('casado', 'EstadoCivil')\n ->press('Registrar')\n ->see('register')\n ->seeInDatabase('Empleado'); \n */\n }", "title": "" }, { "docid": "61e7f3451b26cccfba33cab87572e351", "score": "0.6430125", "text": "public function testAttachFeaturesToCategory()\n {\n\n }", "title": "" }, { "docid": "f71acc10bebede84f33a88e28c2b3dea", "score": "0.6426961", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n //$browser->visit('/')\n\t\t\t$browser->visit('Laravel+Yii2_comment_widget/blog_Laravel/public')\n ->assertSee('Laravel');\n });\n }", "title": "" }, { "docid": "dff738d4701ac876babc90672386a054", "score": "0.6420684", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/')\n ->clickLink('Login')\n ->type('email', '[email protected]')\n ->type('password', '123123')\n ->click('button[type=\"submit\"]')\n ->assertPathIs('/home')\n ->assertSee('You are logged in!');\n });\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.639634", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.639634", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.639634", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.639634", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "ae6f56f66f77ffd2ee3ec82c29e23478", "score": "0.639634", "text": "public function test_example()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "d6f8dd81d8a7c949861605ef898a0da1", "score": "0.6395203", "text": "public function testBasicExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/register')\n ->value('#email', '[email protected]')\n ->value('#password', 'secret')\n ->value('#password-confirm', 'secret')\n ->click('button[type=\"submit\"]')\n ->assertPathIs('/home')\n ->assertSee('Questions')\n ->clickLink('Create a Question')\n ->assertSee('Create Question')\n ->value('#body', 'how are you?')\n ->click('button[type=\"submit\"]')\n ->assertSee('IT WORKS!')\n ->clickLink('View')\n ->assertSee('Question')\n ->clickLink('Answer Question')\n ->value('#body', 'am good')\n ->click('button[type=\"submit\"]')\n ->assertSee('Saved')\n ->clickLink('View')\n ->clickLink('Edit Answer')\n ->value('#body', 'am not good')\n ->click('button[type=\"submit\"]')\n ->assertSee('Updated')\n ->clickLink('Correct')\n ->assertSee('Answer is correct.');\n });\n }", "title": "" }, { "docid": "249a980a9a845f116714438d3bfda611", "score": "0.6393163", "text": "public function testBasicExample()\n {\n $this->json('GET', '/api/request/1')\n ->seeJson([\n 'id' => 2,\n ]);\n }", "title": "" }, { "docid": "9a3156cc423d471a832287def69bafd7", "score": "0.639022", "text": "public function testExample()\n {\n $this->assertEquals(1, 1);\n }", "title": "" }, { "docid": "814cc4223532ab18a13fe88a987866b8", "score": "0.6379299", "text": "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $user = factory(User::class)->create();\n $browser->pause(1000);\n $browser->visit('/login')\n ->type('email', $user->email)\n ->type('password', 'secret')\n ->press('Login');\n $browser->visit('/quotes/create')\n ->type('text', 'Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.')\n ->type('author', 'Lorem ipsum')\n ->select('category')\n ->select('subcategory')\n ->press('Submit');;\n $browser->assertSee('Task was successful!');\n });\n }", "title": "" }, { "docid": "8a311fac611348f687342f9f57861163", "score": "0.6378567", "text": "public function example()\n {\n //\n }", "title": "" } ]
ac03f7a8dd56d7ac570214dad44ca080
Load Categories by ID
[ { "docid": "b337b18833f270a6b7cdc9606e01891e", "score": "0.0", "text": "public function get_categories_by_ids($ids) {\n $categories = [];\n foreach ($this->load_data_from_scoutnet([], ['categories' => ['uid' => $ids]]) as $record) {\n if ($record['type'] === 'categorie') {\n $categories[] = $this->converter->convertApiToCategorie($record['content']);\n }\n }\n return $categories;\n }", "title": "" } ]
[ { "docid": "72bccfa95d525beae18df53009b79acc", "score": "0.7828144", "text": "public function getCategory($id);", "title": "" }, { "docid": "d918ad70c47a959446f494677f2c9d25", "score": "0.7802302", "text": "public function getCategoryById($id);", "title": "" }, { "docid": "63f5501261fe9f01c9e2221ad1805195", "score": "0.74391496", "text": "private function _loadCategories() {\n\n // Retrieve data from DB\n $query = $this->db->get_where(XCMS_Tables::TABLE_ARTICLES_CATEGORIES, array(\n \"article_id\" => $this->get(\"id\")\n ));\n\n // Populate model\n foreach ($query->result() as $row) {\n $this->_categories[] = $row->category_id;\n }\n\n }", "title": "" }, { "docid": "279bf4bc6a544668b1705e0d55483ae5", "score": "0.733487", "text": "function forId($id) {\n\t\treturn Category::find($id);\n\t}", "title": "" }, { "docid": "8a4e1dabd0e80708854345f42257ebfd", "score": "0.73280996", "text": "private function loadCategory() {\n\n\t\t$dbs = Database::getDB();\n\t\t$fields = array(\n\t\t\t'id',\n\t\t\t'name',\n\t\t\t'parent_category_id',\n\t\t\t'type',\n\t\t\t'description');\n\t\t$conds = array('id = ?', 'i', array($this->id));\n\t\t$res = $dbs->select('categories', $fields, $conds);\n\n\t\tif(count($res) != 1)\n\t\t\treturn;\n\n\t\t$this->name = $res[0]['name'];\n\t\t$this->type = $res[0]['type'];\n\t\t$this->parent = $res[0]['parent_category_id'];\n\t\t$this->description = $res[0]['description'];\n\n $this->children = array();\n\n if ($this->type == self::CAT_TYPE_TOP) {\n $fields = array('id');\n $conds = array('parent_category_id = ?', 'i', array($this->id));\n $res = $dbs->select('categories', $fields, $conds);\n\n if (count($res)) {\n foreach ($res as $sub_category) {\n $this->children[] = new Category($sub_category['id']);\n }\n }\n }\n\n\n\t\t$this->loaded = true;\n\t}", "title": "" }, { "docid": "6f33c5bdb748158aab2b2bfb16490b68", "score": "0.72264063", "text": "public function loadCategories()\n {\n $this->category_ids = [];\n if (!empty($this->id)) {\n $rows = PageCategory::find()\n ->select(['category_id'])\n ->where(['page_id' => $this->id])\n ->asArray()\n ->all();\n foreach($rows as $row) {\n $this->category_ids[] = $row['category_id'];\n }\n }\n }", "title": "" }, { "docid": "a7282b6822c486d879292bb39ebf70a0", "score": "0.714708", "text": "public function getById($id)\n {\n $category = Table\\Categories::findById($id);\n if (isset($category->id)) {\n $data = $category->getColumns();\n $data['category_parent_id'] = $data['parent_id'];\n unset($data['parent_id']);\n $this->data = array_merge($this->data, $data);\n }\n }", "title": "" }, { "docid": "1a6991e303c73643d7b9061c49a997a1", "score": "0.710295", "text": "function loadCategoryById($id){\n\n $id = $id;\n\n // Connection to the database\n include('db.php');\n\n //Request to select the Category data from the DB\n /** @var TYPE_NAME $db */\n $req = $db->prepare('SELECT name FROM category WHERE idCategory = \"'.$id.'\" ');\n $req->execute();\n $dataCategory = $req->fetchAll();\n\n $req->closeCursor();\n\n return $dataCategory;\n}", "title": "" }, { "docid": "8e381fe9f0c84cf6c789999c8a34a7f9", "score": "0.70899016", "text": "public function load()\n {\n return $this->data((new CategoryApi())->find($this->categoryId));\n }", "title": "" }, { "docid": "9021801eccf7c230a5f194daef437bb4", "score": "0.7056744", "text": "public function loadCategoryIds() {\n $this->query = self::LOAD_CATEGORY_IDS;\n return $this->load();\n }", "title": "" }, { "docid": "fb51ea3e1f282d46178512346c75e19c", "score": "0.70265573", "text": "public function getById($id) {\n\n $sql = \"SELECT * FROM inauguration_category WHERE id = {$id}\";\n\n return $this->query($sql);\n }", "title": "" }, { "docid": "70ff51abb56206c2e7076ac0bafd575a", "score": "0.701846", "text": "function getCategoryById($id = NULL)\n {\n $connection = $this->ConnectDatabase();\n mysql_query(\"SET character_set_client=utf8\", $connection);\n // GENERATE QUERY\n $sql = \"SELECT *\";\n $sql .= \" FROM \" . $this->prefix() . \"m2bmusic_category \";\n $sql .= \" WHERE \" . $this->prefix() . \"m2bmusic_category.cat_id = \" . (int) $id;\n\n $categorylist = null;\n $index = 0;\n $resource = mysql_query($sql) or die(mysql_error() . \" <b>SQL was: </b>$sql\");\n while ($obj = mysql_fetch_assoc($resource))\n {\n $index++;\n $obj['index'] = $index;\n $categorylist = $obj;\n }\n //mysql_close($connection);\n return $categorylist;\n }", "title": "" }, { "docid": "4054d019188c4ab0ea8e8f1a03bc4bf5", "score": "0.69692934", "text": "public static function getById($id) {\n return CategoryDAO::selectById($id);\n }", "title": "" }, { "docid": "3a4b5731566b0736b079ade6efe855ae", "score": "0.6939698", "text": "public static function byID($id)\n {\n \t$id = (int)$id;\n \t\n \tif($id < 1)\n \t\treturn false;\n \t\t\n \t$sql = self::getSelect() . 'WHERE C.Category_ID=?';\n \t\n $params = array('i',$id);\n \n return self::queryDB(get_class(),$sql,$params,true); // Category object(s) if sucessful\n\t}", "title": "" }, { "docid": "eeef629786e00f3caf8414ef9b57bef8", "score": "0.69042194", "text": "abstract protected function loadCategoryItems();", "title": "" }, { "docid": "c9b10d54e622dd74e09cc3cca012c1c9", "score": "0.68774617", "text": "public function getCategoryById($id){\n// $em = $this->getEntityManager();\n//\n// //$query = $em->createQuery('SELECT c FROM RemoteStaff\\Entities\\Category c WHERE c.status = :category_status ORDER BY c.category_name ASC');\n// $query = $em->createQuery('SELECT c FROM RemoteStaff\\Entities\\Category c WHERE c.id = :categoryId ORDER BY c.categoryName ASC');\n//\n// $query->setParameter('categoryId', $id);\n//\n// $categories = $query->getResult();\n// return $categories;\n\n\n\n if($id === null){\n throw new \\Exception(\"Category ID is required.\");\n }\n\n $category = $this->getEntityManager()->getRepository('RemoteStaff\\Entities\\Category')->find($id);\n\n return $category;\n }", "title": "" }, { "docid": "79245f29ca31aaf24f542a38a8f2ed13", "score": "0.6858172", "text": "function get_categoria($id){\r\n }", "title": "" }, { "docid": "0036d6e6ea49df470adf11357186bf47", "score": "0.68579715", "text": "public function load(){\n global $wpdb;\n\n // only run if this category has an id\n if($this->id > 0){\n $rtnObj = $wpdb->get_row(\"SELECT * FROM {$wpdb->prefix}en_categories WHERE id = {$this->id} LIMIT 1;\");\n if($rtnObj){\n foreach($rtnObj as $field => $value){\n $this->$field = $value;\n }\n }\n }\n }", "title": "" }, { "docid": "e6894a15e0d2b7138dacd006ed8014e7", "score": "0.6852102", "text": "public function getById(int $id)\n {\n return Category::findorfail($id);\n }", "title": "" }, { "docid": "5783d8b44685f0dd6da5a2cdfc5ead10", "score": "0.67487574", "text": "public function getOneCategory($id){\n\n\t\t$id = addslashes(htmlspecialchars($id));\n\t\t$sql = 'SELECT * FROM categories WHERE id='.$id ;\n\t\t$stmt = $this->getEntityManager()->getConnection();\n\t\t$result = $stmt->executeQuery($sql);\n\t\t$result = $result->fetchAll();\n\t\t$result = ($result)?$result: false;\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b1a606eff47759eee44126ed15ada45e", "score": "0.674843", "text": "function __construct($id) {\n\t\t$this->id = $id;\n\t\t$this->loadCategory();\n\t}", "title": "" }, { "docid": "253c0ebc93d6ad31476d6000190b98c2", "score": "0.67276955", "text": "public function show($id) {\n return Category::find($id);\n }", "title": "" }, { "docid": "30886e9ec92d5dd3057e8885e730f886", "score": "0.669274", "text": "public function getCategoryByID($id){\n\t\t$query = \"SELECT * FROM tbl_category WHERE catId='$id'\";\n\t\t$result = $this->db->select($query);\n\t\tif ($result) {\n\t\t\treturn $result;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0aa6e0b50195b8198f26778b20622bc5", "score": "0.66757905", "text": "public static function categories(string $id = null): Category {\n return self::api(self::prepare(new Category(self::authorize()), $id ?? $id));\n }", "title": "" }, { "docid": "a59771c902b3e511ffdf7b57d8c5930e", "score": "0.66744673", "text": "public function list_categories($id){ \n\t\t$this->db->where(array('store_categories' => $id)); \n\t\treturn $this->db->get($this->_table['store_categories'])\n\t\t\t\t\t->row(); \n\t}", "title": "" }, { "docid": "83b519481b2b922531de33afd76efa43", "score": "0.66631335", "text": "public function show($id) {\n $data = Category::find($id);\n return $data;\n }", "title": "" }, { "docid": "3616c9274d30b386a4d62547c11e39a8", "score": "0.6654406", "text": "public static function getCategory($id)\n {\n return self::getResource('/categories/' . $id, 'Category');\n }", "title": "" }, { "docid": "9008c8ba45be21718943940b91cc64af", "score": "0.66529083", "text": "public function showCategoria($id)\n {\n return Categoria::find($id);\n }", "title": "" }, { "docid": "57309b8eee9b6d32da8afde38989d469", "score": "0.6644222", "text": "public function getById(int $id): Categoria {\r\n $query = \"SELECT * FROM categorias WHERE id_categorias = ?\";\r\n\r\n $stmt = $this->db->prepare($query);\r\n $stmt->execute([$id]);\r\n $stmt->setFetchMode(PDO::FETCH_CLASS, Categoria::class);\r\n\r\n $category = $stmt->fetch();\r\n\r\n return $category;\r\n }", "title": "" }, { "docid": "c7ded5800e0ce81581a9915c9eaf4187", "score": "0.6642768", "text": "function get_category($id) {\n return $this->db->get_where('categories', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "e8ef15685969cf61f64510eaa51b91be", "score": "0.6628192", "text": "public function fetchCategoryIdById($id)\r\n {\r\n return $this->findColumnByPk($id, 'category_id');\r\n }", "title": "" }, { "docid": "03f1f7ce4ade531de9457724f0908cc7", "score": "0.66278464", "text": "public function getCategory(int $id)\n {\n return Db::getInstance()->executeS(\n 'SELECT * FROM ' . _DB_PREFIX_ . 'category_lang \n WHERE `id_category` =' . pSQL($id)\n );\n }", "title": "" }, { "docid": "e7fdd5d163d85f8b78be15bc892d2408", "score": "0.6617373", "text": "public function getSingle(int $id): Categories\n {\n $category = $this->_doctrine->getRepository(Categories::class)->find($id);\n\n if (!$category)\n throw new NotFoundHttpException();\n\n return $category;\n }", "title": "" }, { "docid": "c2c8d42c80dace3403c62cdac2a3bac6", "score": "0.6607841", "text": "public function GetCategory($id) \n {\n $data = $this->db\n ->select('*')\n ->select(\"{$this->primaryKey} as id\")\n ->where($this->primaryKey, $id)\n ->limit(1)\n ->get($this->table)\n ->row_array();\n\n if ($data) {\n $locales = $this->db\n ->where($this->primaryKey, $id)\n ->order_by($this->foreign_key_localization, 'asc')\n ->get($this->child_table_detail)\n ->result_array();\n foreach ($locales as $row => $local) {\n $data['locales'][$local[$this->foreign_key_localization]]['title'] = $local['title'];\n $data['locales'][$local[$this->foreign_key_localization]]['description'] = $local['description'];\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "6d21fada57a9a109cd030d5c443f88a2", "score": "0.6607709", "text": "public function find(int $id): Category\n {\n return Category::find($id);\n }", "title": "" }, { "docid": "1901b5e450b894e4b045172575974910", "score": "0.65688664", "text": "public static function find($id){\n $query = DB::connection()->prepare('SELECT * FROM Kategoria WHERE id = :id LIMIT 1');\n $query->execute(array('id' => $id));\n $row = $query->fetch();\n \n if ($row){\n $category = new Kategoria(array(\n 'id' => $row['id'],\n 'nimi' => $row['nimi']\n ));\n return $category;\n }\n \n return null; \n }", "title": "" }, { "docid": "4c583ecb363787fe51e7cdf8f108029a", "score": "0.65627104", "text": "function getCategory($id_cat) {\n\n // condition\n $condition = $id_cat != \"\" ? \"where id_cat=$id_cat\" : \"\";\n\n\t\t// Alle Kategorien aus DB:\n $sql = \"select * from `category` \" . $condition;\n $dbcon = dbConnect(DBUSER,DBPW);\n $result = $dbcon->query($sql);\n dbClose($dbcon);\n\n return($result);\n\n}", "title": "" }, { "docid": "a89866f0c079b2763fb52120a674dab3", "score": "0.6556251", "text": "function LoadCategories() {\n return $this->LoadAll(\"select * from \" . $this->config[\"table_prefix\"] . \"pages where tag like 'Category%' and latest = 'Y' order by tag\");\n }", "title": "" }, { "docid": "d19b2d7cd3a3d109cee2f67790a60c3d", "score": "0.6538443", "text": "public function show($id)\n {\n $data = $this->categories->find($id);\n dd($data);\n }", "title": "" }, { "docid": "b87ff4974944f16ddb020045ba4f7c75", "score": "0.6535241", "text": "public static function getIcoCategory($id){\n return Category::where('id','=',$id)->first();\n\t}", "title": "" }, { "docid": "096b5d4e237035cf953aecfe7c553f81", "score": "0.65236586", "text": "public function categoryById()\n {\n }", "title": "" }, { "docid": "c78d7cc8f7eb3cb6483e02316805d97e", "score": "0.6516385", "text": "public function getCategoryById(int $id) : Category\n {\n Log::channel('api')->info(\"CategoryService called --> Request getCategoryById() function\");\n\n try {\n Log::channel('api')->info(\"CategoryService called --> Return category by id : $id\");\n\n return $this->categoryRepository->getCategoryById($id);\n } catch (\\Exception $exception) {\n throw new NotFoundRecordException(__('exception.notFoundRecord'), $exception->getCode());\n }\n }", "title": "" }, { "docid": "51dd8ffb9ee7fe32a4f606981dbf404b", "score": "0.65072465", "text": "public function get_categories($id){\n $branch = DB::table('tblBranches')->where('id',$id)->get();\n $temp = $branch->restraunt_id;\n $categories = tblMenuCategory::where('rest_id',$temp)->get();\n return $categories;\n }", "title": "" }, { "docid": "1fb0a7e64f128b5f3ebfd9fa5ae3c423", "score": "0.6491357", "text": "public function show($id)\n {\n return Category::findOrFail($id);\n }", "title": "" }, { "docid": "1fb0a7e64f128b5f3ebfd9fa5ae3c423", "score": "0.6491357", "text": "public function show($id)\n {\n return Category::findOrFail($id);\n }", "title": "" }, { "docid": "8c7a2f4e800d8c6bcbfc38bc6de62ad9", "score": "0.64810693", "text": "public function __construct($id,$categories)\n {\n $this->id = $id;\n $this->categories = $categories;\n }", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.6476729", "text": "public function load($id);", "title": "" }, { "docid": "02ff696baf24f34721bef97365404a7e", "score": "0.64690477", "text": "protected function resolveCategory(int $id): Category\n {\n return Category::withoutEvents(\n fn () => Category::withoutGlobalScopes()\n ->withOnly([])\n ->findOrFail($id, ['id'])\n );\n }", "title": "" }, { "docid": "5f03aa202fb5377c889a57387d171fab", "score": "0.6463213", "text": "public function getCategory($id)\n {\n $category = $this->repository->find($id);\n\n return $category;\n }", "title": "" }, { "docid": "adf9a733406590533ecad01ff6f214ca", "score": "0.64439654", "text": "public static function actionLoadcategory()\n {\n // seems like function not in use\n if (Yii::$app->request->isAjax) {\n $data = Yii::$app->request->post();\n }\n \n $categoryid = Vendor::find()->select('category_id')\n ->where(['vendor_id' => $data['id']])\n ->andwhere(['category_level' => 0])\n ->andwhere(['!=', 'trash', 'Deleted'])\n ->andwhere(['parent_category_id' => null])\n ->one();\n\n $k = explode(',', $categoryid['category_id']);\n $category = Category::find()->select('category_id,category_name')->where(['category_id' => $k])->all();\n echo '<option value=\"\">Select...</option>';\n foreach ($category as $key => $val) {\n echo '<option value=\"'.$val['category_id'].'\">'.$val['category_name'].'</option>';\n }\n die; // action used by vendor module also.\n }", "title": "" }, { "docid": "eda1f16ed2d8f4e7d72e2f9fc4ff52b0", "score": "0.6438155", "text": "function getCategoria($id){\n\n\t\t$resultado = array();\n\t\t$conecta = new \\Conexion\\Conexion(BDNOMBRE, HOST, USUARIO, CONTRA, CHARSET);\n\t\t$sql= 'SELECT * from categoria WHERE id=:id ORDER BY id';\n\t\t$conecta->abrirConexion();\n\t\t$valor= array(\":id\"=>$id);\n\t\t$resultado = $conecta->consultaPreparada($sql, $valor);\n\t\t\n\t\t$conecta->cerrarConexion();\n\t\t\n\t\treturn $resultado;\n\n\t}", "title": "" }, { "docid": "7fbcd88a964143ffdc97712b08d7b744", "score": "0.64349484", "text": "public function loadModel($id)\n {\n $model = CatCategory::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }", "title": "" }, { "docid": "a205abb66610cf4aa7e10f86084dd432", "score": "0.6428934", "text": "public function getcatbyid($id){\n\t\t\t$stmt = Conexion::conectar()->prepare('select id,categorias from blog_post');\n\t\t\t$respuesta = $stmt->execute();\n\t\t\t$respuesta = $stmt->fetchAll();\n\t\t\t/*Filtrar los post que tienen la categoria que se recibe*/\n\t\t\tforeach ($respuesta as $key => $value) {\n\t\t\t\t$comparacion = strpos($value['categorias'], $id);\n\t\t\t\tif($comparacion !== FALSE){\n\t\t\t\t $posts [] = array(\"postid\" =>$value['id']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t/*Obtener todo el contenido de los posts y generar un array de ellos*/\n\t\t\tif(isset($posts)){/*Se verifica si existe array de post validos*/\n\t\t\t\tforeach ($posts as $key => $value) {\n\t\t\t\t\t$stmt = Conexion::conectar()->prepare('select * from blog_post where id=:id');\n\t\t\t\t\t$stmt->bindParam(\":id\", $value['postid'], PDO::PARAM_INT);\n\t\t\t\t\t$respuesta = $stmt->execute();\n\t\t\t\t\t$respuesta = $stmt->fetch();\n\t\t\t\t\t $pcontent [] = array($respuesta);\n\t\t\t\t}\n\t\t\t\t\treturn $pcontent;\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3cf0ad4e7e14f7b00e88891fefce21ea", "score": "0.640852", "text": "function pegarCategoriaPorId($id){\r\n $sql = \"SELECT * FROM categoria WHERE idcategoria = $id\";\r\n $resul = mysqli_query(conn(), $sql);\r\n $categoria = mysqli_fetch_assoc($resul);\r\n return $categoria;\r\n }", "title": "" }, { "docid": "13559d210c6db877dd752ae3a2f16072", "score": "0.64005786", "text": "public function getCategory($id)\n {\n if ($id == null)\n {\n $this->errors[] = \"ID of the category are required!\";\n return false;\n } \n \n if ($this->client)\n {\n $result = $this->getListItems('itilcategories',$id);\n \n if (!empty($result))\n {\n return $result[0];\n }\n else\n {\n return false;\n }\n }\n else\n {\n $this->errors[] = 'SOAP client not connected! Use GlpiWebService->connect() method.';\n return false;\n }\n }", "title": "" }, { "docid": "3f7c3141656ceea80b7fe6358ceef81b", "score": "0.6390736", "text": "public function get($idcategory)\n {\n $sql = new Sql();\n\n $results = $sql->select(\"SELECT * FROM tb_categories WHERE idcategory = :idcategory\", array(\n \":idcategory\" => $idcategory\n )\n );\n\n $this->setData($results[0]);\n }", "title": "" }, { "docid": "219c79a610809512354067fc568adfe1", "score": "0.63897157", "text": "public function getCategoryById($id)\n {\n $this->db->query(\"SELECT * FROM categories WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }", "title": "" }, { "docid": "c3ae1c8ae5e8771e76cd18cbfd824fb2", "score": "0.63885456", "text": "public function fetch($id)\n {\n $category=Category::find($id);\n abort_if($category==null,404,'Category could not be found!');\n\n return json_encode($category);\n\n }", "title": "" }, { "docid": "bb79afd6158ce8aa81de77c15a2684c2", "score": "0.63817877", "text": "public static function load($id);", "title": "" }, { "docid": "66b48f82d2f4e65ac41c7f182dade00c", "score": "0.6379216", "text": "function getCatById($id)\n{\n\t$cat = query(\"SELECT * FROM categories WHERE id=\".escapeString($id));\n\tconfirm($cat);\n\t$row = fetchArray($cat);\n\treturn $row;\n}", "title": "" }, { "docid": "c0c86052753e89ebd0eeff974a05b5ad", "score": "0.6377015", "text": "public function getCategory($id)\n {\n $this->db->where('id', $id);\n $r = $this->db->get('category');\n return $r->result_array();\n }", "title": "" }, { "docid": "c9d3e679a50740f60fcd5ff0bf855629", "score": "0.6368019", "text": "function loadCategories($cid = null, $statusIds = null, $children = false) {\n\t// get config\n\t$config = $GLOBALS['config'];\n\t// connect to db\n\t$db = new MysqliDb($config['db_host'], $config['db_user'], $config['db_pass'], $config['db_name']);\n\t// if cid is not empty, set the where clause\n\tif(isset($cid)) {\n\t\t$db->where('categoria_id', $cid);\n\t}\n\n\t$statusWhere = Array();\n\tfor($s = 0; $s < count($statusIds); $s++) {\n\t\t$statusWhere[] = 'estado = ?';\n\t}\n\n\t$statusWhere = '('.implode(' or ', $statusWhere).')';\n\n\t// Where clause for status\n\t$db->where($statusWhere, $statusIds);\n\n\t// get categories\n\t$cats = $db->get('categoria');\n\n\tif($children) {\n\t\tfor($cat = 0; $cat < count($cats); $cat++) {\n\t\t\t$cats[$cat]['subcategorias'] = loadCategories($cats[$cat]['id'], array(5));\n\t\t}\n\t}\n\n\t// return categories\n\treturn $cats;\n}", "title": "" }, { "docid": "5b09a33c2860d151d1c82477fbbf285b", "score": "0.6366721", "text": "public function show($id)\n {\n //\n $category = Category::find($id);\n return $category;\n }", "title": "" }, { "docid": "1f8f75dccf8dfdad1fa8aedd96cfdead", "score": "0.63634014", "text": "public function getCategories($id = null)\n {\n\n $data = [];\n if ($id != null) {\n //get specific category\n if ($stmt = $this->Database->\n prepare(\"SELECT id, name FROM \" . $this->dbTable . \" WHERE id=? LIMIT 1;\")) {\n\n $stmt->bind_param(\"i\", $id);\n $stmt->execute();\n $stmt->store_result();\n $stmt->bind_result($catId, $catName);\n $stmt->fetch();\n\n if ($stmt->num_rows > 0) {\n $data = array('id' => $catId, 'name' => $catName);\n }\n $stmt->close();\n }\n } else {\n //get all categories\n if ($result = $this->Database->query(\"SELECT * FROM \" . $this->dbTable . \" ORDER BY name;\")) {\n\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_array()) {\n $data[] = array('id' => $row['id'], 'name' => $row['name']);\n }\n }\n }\n }\n return $data;\n }", "title": "" }, { "docid": "0cd79a01e8dea2fd32b9b4e0677c3c1c", "score": "0.63591087", "text": "public static function find($id)\n\t{\n\t\t$category = Category::where('id', $id);\n\t\treturn $category->firstOrFail();\n\t}", "title": "" }, { "docid": "aceaf7693f24b500185b20ff943a4cbb", "score": "0.6347174", "text": "function getCategories($id)\n {\n\n $this->db->select(\"cvt_category.category_name\")\n ->from($this->table)\n ->where(\"cvt_resume_idcvt_resume\", $id)\n ->join($this->jointable, \"idcvt_category = cvt_category.idcvt_category\");\n\n return $this->db->get();\n }", "title": "" }, { "docid": "035eda708379d18a4deeb849e09b84b3", "score": "0.6341185", "text": "public function show($id)\n {\n return $this->categoryRepository->find($id);\n }", "title": "" }, { "docid": "98f070efd5eeb2aec600f08fed7ecfe7", "score": "0.6338186", "text": "public function show($id)\n {\n //\n $category = Category::find($id);\n return $category;\n }", "title": "" }, { "docid": "eb06292ee762adb447602f756b1c2866", "score": "0.63364166", "text": "public static function findById ($idCategories)\n\t{\n\t\t$db = self::_getDbTable(self::$_dbTable);\n\n\t\t$select = $db->select();\n\n\t\t$select->where('id = ?', $idCategories);\n\n\t\t$result = $db->fetchRow($select);\n\n\t\treturn self::_initItem($result);\n\t}", "title": "" }, { "docid": "e69646f5ecdea5e0b91ab5be34c63b38", "score": "0.63343346", "text": "public function getCat()\n {\n $id = $_GET['id'];\n $requete = $this->connexion->prepare(\"SELECT * FROM category WHERE id = :id\");\n $requete->bindParam(':id', $id);\n $resultat = $requete->execute();\n $cat = $requete->fetch(PDO::FETCH_ASSOC);\n return $cat;\n }", "title": "" }, { "docid": "417d46e0498cfbca892fc63b1b1af842", "score": "0.6322472", "text": "public function index($id = null) {\n if ($id == null) {\n return Category::orderBy('id', 'asc')->get();\n } else {\n return $this->show($id);\n }\n }", "title": "" }, { "docid": "c22a0571bc433746e33ceaaf83f8b52f", "score": "0.6319779", "text": "static public function getCategorySet($id)\n {\n global $container;\n\n $sql = \"select c.id, c.name, c.name_clean, b.blog_id from blog_category c\"\n . \" left outer join blog_to_category b on b.category_id = c.id\"\n . \" and b.blog_id = :blogid order by c.name\";\n $qry = $container->get('dbq');\n $results = $qry->arraySet($sql, ['blogid' => $id], ['blogid' => Column::BIND_PARAM_INT]);\n $values = [];\n $slugs = [];\n $available = [];\n if (!empty($results)) {\n foreach ($results as $row) {\n if ($row['id'] > 0) {\n $name = $row['name'];\n if ($row['blog_id'] > 0) {\n $values[] = $name;\n $slugs[] = $row['name_clean'];\n } else {\n $available[] = $name;\n }\n }\n }\n }\n $catset = new \\stdClass();\n $catset->cat_blogid = $id;\n $catset->catlist = $results;\n $catset->values = $values;\n $catset->available = $available;\n $catset->slugs = $slugs;\n return $catset;\n }", "title": "" }, { "docid": "5b49a1491f11ef11d0902d95c7f7937d", "score": "0.6309805", "text": "public function categoryAction($id)\r\n {\r\n return $this->indexAction($id);\r\n }", "title": "" }, { "docid": "b91297697617ee541d1018ebbfa52da6", "score": "0.6304354", "text": "function en_get_category_name($id){\n $category = new en_Category();\n $category->id = $id;\n $category->load();\n\n return $category->name;\n}", "title": "" }, { "docid": "03fd63afac7068b6e6f08843a3b3ca3b", "score": "0.63036424", "text": "public function getWithCategory($id)\n {\n $article = DB::table('articles')\n ->join('categories', 'articles.cat_id', '=', 'categories.id')\n ->select('articles.*', 'categories.title as category_name')\n ->where('articles.id', $id)\n ->first();\n return $article;\n }", "title": "" }, { "docid": "15a01310eaa1904ef3a11b26415b5475", "score": "0.6299434", "text": "function getCategoria($id_categoria) {\n \n // 2. Envio consulta (2 pasos: prepare y execute. Consulto a las dos tablas para obtener categoria con INNER JOIN)\n $query = $this->db->prepare('SELECT * FROM libro INNER JOIN categoria ON libro.id_categoria = categoria.ide \n WHERE id_categoria = ?');\n $query->execute([$id_categoria]);\n \n // 3. Obtengo la respuesta con un fetchAll (porque son muchos)\n $libros = $query->fetchAll(PDO::FETCH_OBJ); // arreglo de libros\n \n return $libros;\n }", "title": "" }, { "docid": "9f493f1c46f241dacb96628d3105b6fc", "score": "0.62968856", "text": "public function getFileCategories($id = false)\n {\n return !$id ? $this->call('get','FileFileCategories') : $this->call('get','FileFileCategories/'.$id);\n }", "title": "" } ]
bda361e10bea8dcd5ae097f34b521b47
Fires off the asynchronous http request to run the cleanup routine in a background process. Two birds with one stone, if I'm lucky; no additional load time on the users end, and all the time in the world to complete.
[ { "docid": "915c7c0a7bae5e6d14f8023eb9c4f17f", "score": "0.0", "text": "function kstats_trigger_async( $url = '', $params = array(), $timeout = 10, $method = 'POST' ) {\r\n\r\n\tif ( empty( $url ) )\r\n\t\treturn FALSE;\r\n\r\n\tif ( ! empty( $params ) && is_array( $params ) ) {\r\n\r\n\t\tforeach ( $params as $key => &$val ) {\r\n\r\n\t\t\tif ( is_array( $val ) )\r\n\t\t\t\t$val = implode( ',', $val );\r\n\r\n\t\t\t$post_parts[] = $key . '=' . urlencode( $val );\r\n\r\n\t\t}\r\n\r\n\t\t$post = implode( '&', $post_parts );\r\n\r\n\t}\r\n\r\n\r\n\t$default_port = ( isset( $_SERVER['PORT'] ) ? $_SERVER['PORT'] : 80 );\r\n\r\n\t$method = ( $method == 'POST' ? 'POST' : 'GET' );\r\n\r\n $url = parse_url( $url );\r\n\r\n $fp = fsockopen( $url['host'], ( isset( $url['port'] ) ? $url['port'] : $default_port ), $errno, $errstr, $timeout );\r\n\r\n\tif ( $fp ) {\r\n\r\n\t\t$output = $method . ' ' . $url['path'] . \" HTTP/1.1\\r\\n\";\r\n\t\t$output .= 'Host: ' . $url['host'] . \"\\r\\n\";\r\n\t\t$output .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\r\n\t\t$output .= 'Content-Length: ' . strlen( $post ) . \"\\r\\n\";\r\n\t\t$output .= \"Connection: Close\\r\\n\\r\\n\";\r\n\r\n\t\tif ( isset( $post ) )\r\n\t\t\t$output .= $post;\r\n\r\n\t fwrite( $fp, $output );\r\n\t fclose( $fp );\r\n\t\t\r\n\t\treturn TRUE;\r\n\r\n\t}\r\n\r\n\treturn FALSE;\r\n\r\n}", "title": "" } ]
[ { "docid": "5c7c27513246a1f2015b649fe3a3bf12", "score": "0.58253074", "text": "function kstats_cleanup_handler() {\r\n\tglobal $blog_id;\r\n\r\n\t// If and when this function is tripped, we can't afford for it to abort halfway through.\r\n\tignore_user_abort( 1 );\r\n\tset_time_limit( 0 );\r\n\r\n\t$result = FALSE;\r\n\r\n\tif ( function_exists( 'fsockopen' ) ) {\r\n\r\n\t\t$async = array();\r\n\t\t$async['abspath'] = ABSPATH;\r\n\r\n\t\tif ( isset( $blog_id ) ) {\r\n\t\t\t$async['blog_id'] = $blog_id;\r\n\t\t}\r\n\r\n\t\tif ( ! $key = get_option( 'kstats_async' ) ) {\r\n\t\t\t$key = sha1( kstats_generate_key( 32, TRUE ) );\r\n\t\t\tadd_option( 'kstats_async', $key );\r\n\t\t}\r\n\r\n\t\t$async['key'] = $key;\r\n\r\n\t\t$result = kstats_trigger_async( KSTATS_PLUGIN_URL . 'lib/_async.php', $async );\r\n\r\n\t}\r\n\r\n\r\n\tif ( $result === FALSE ) {\r\n\t\t$rows_affected = kstats_cleanup();\r\n\t}\r\n\r\n\r\n}", "title": "" }, { "docid": "1f0d03294ef04e4d0bf69d08c5265f31", "score": "0.57385623", "text": "public function finalize()\n {\n if (is_resource($this->curl)) {\n curl_close($this->curl);\n $this->curl = null;\n }\n }", "title": "" }, { "docid": "29ea02379965879fc44e6cdaf56d4fe0", "score": "0.55449605", "text": "public static function end_request()\n\t{\n\t\t$instance = Instrumentation::get_instance();\n\t\t$usage = getrusage();\n\t\t\n\t\t$instance->set('cpu_user', (($usage[\"ru_utime.tv_sec\"]*1e6+$usage[\"ru_utime.tv_usec\"]) - $instance->get('cpu_user')) / 1e6);\t\n\t\t$instance->set('cpu_system', (($usage[\"ru_stime.tv_sec\"]*1e6+$usage[\"ru_stime.tv_usec\"]) - $instance->get('cpu_system')) / 1e6);\n\t\t$instance->set('total_cpu_time', ($instance->get('cpu_user') + $instance->get('cpu_system')) );\n\t\t$instance->set('memory_usage', memory_get_usage($instance->get('memory_usage')));\n\t\t\n\t\t$instance->set('php_service_time', microtime(true) - $instance->get('php_service_time'));\n\t\tapache_setenv('php_instrumented', 1);\n\t\t\n\t\t$instance->export_counters();\n\t}", "title": "" }, { "docid": "ca29e7f699e3f2e6c8a1453813dbd7a6", "score": "0.5267766", "text": "private function service__continue_shutdown() {\n\t\tif ( $this->requests_started )\n\t\t\treturn;\n\t\tevent_base_loopbreak( $this->event_base );\n\t\tforeach ( $this->workers_alive as $pid => $time )\n\t\t\tposix_kill( $pid, SIGKILL );\n\t\t$this->service__unlink_pidfile();\n\t\terror_log( \"Prefork service shutdown complete\" );\n\t\tif ( $this->received_SIGINT ) {\n\t\t\tpcntl_signal( SIGINT, SIG_DFL );\n\t\t\tposix_kill( posix_getpid(), SIGINT );\n\t\t\t// The following unreachable line is merely informative\n\t\t\texit(130);\n\t\t}\n\t\tif ( $this->received_SIGTERM ) {\n\t\t\tpcntl_signal( SIGTERM, SIG_DFL );\n\t\t\tposix_kill( posix_getpid(), SIGTERM );\n\t\t\t// The following unreachable line is merely informative\n\t\t\texit(143);\n\t\t}\n\t\texit(0);\n\t}", "title": "" }, { "docid": "96ce42a40de3ca438cf0d7f9aa5fd660", "score": "0.52326554", "text": "public function __destruct () {\n\t\t// Close cURL\n\t\tif (!is_null($this->handle)) {\n\t\t\tcurl_close($this->handle);\n\t\t\t$this->handle = null;\n\t\t}\n\t}", "title": "" }, { "docid": "ab5a42a3596165724f50a2383fcda451", "score": "0.52257717", "text": "public static function tear_down_after_test() {\n\t\tif (isset(self::$curl_handle) && is_resource(self::$curl_handle)) {\n\t\t\tcurl_close(self::$curl_handle);\n\t\t}\n\n\t\tif (isset(self::$dir_handle)) {\n\t\t\tclosedir(self::$dir_handle);\n\t\t}\n\t}", "title": "" }, { "docid": "c8a7dee441d0532d8fdb986839cdbfd0", "score": "0.5193985", "text": "public function __destruct() {\n\t\t\tcurl_close($this->getHandle());\n\t\t}", "title": "" }, { "docid": "6254edf8c96012956bce9f6c251dec0d", "score": "0.517934", "text": "function close()\n\t{\n\t\tcurl_close($this->curlh);\n\t\t$this->curlh = null;\n\t}", "title": "" }, { "docid": "55cfc541f72f3fbe61b2b8824846098c", "score": "0.5178948", "text": "function __destruct() {\n\t\tcurl_close($this->curl);\n\t}", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.5161294", "text": "public function cleanup();", "title": "" }, { "docid": "d58932eda003bb55429b31ccc54c4688", "score": "0.5133378", "text": "public function __destruct() {\n\t\t\tcurl_multi_close($this->getMultiHandle());\n\t\t}", "title": "" }, { "docid": "a912d014172c9aa759b6bbe452765af5", "score": "0.5108185", "text": "public function close()\n\t\t{\n\t\t\t$this->cfs_http->close();\n\t\t}", "title": "" }, { "docid": "0a4eadf501db59b5043b0b36a6d704c2", "score": "0.50793844", "text": "function _close()\n {\n if( is_resource( $this->_curlHandle ) )\n curl_close( $this->_curlHandle );\n \n @unlink( $this->_cookieJar );\n }", "title": "" }, { "docid": "1193b41c09cc17a39d439f8446d1d2c6", "score": "0.50755197", "text": "public static function run()\n {\n $delay = (int) Yii::$app->params['sleep_error_interval'];\n\n while(true) {\n try {\n self::handle();\n } catch(PDOException $exception) {\n DB::dropInstance();\n Yii::error('DB ERROR: ' . str_replace(\"\\n\", \" \", $exception->getMessage()), 'sync-info');\n Yii::info(\"Memory usage: \" . memory_get_usage(), 'sync-info');\n Yii::info(\"...........Sleep...............\", 'sync-info');\n gc_collect_cycles();\n sleep($delay);\n } catch (HttpException $exception) {\n Yii::error('CURL ERROR[' . $exception->getCode() . ']. ' . $exception->getMessage(), 'sync-info');\n Yii::info(\"Memory usage: \" . memory_get_usage(), 'sync-info');\n Yii::info(\"...........Sleep...............\", 'sync-info');\n gc_collect_cycles();\n sleep($delay);\n }\n }\n }", "title": "" }, { "docid": "3fcbafb22772794ce058fc0781a1dfd2", "score": "0.5054712", "text": "public function cleanup(): void;", "title": "" }, { "docid": "b70561aeca58ef55ffaa6f55ed9cb984", "score": "0.5051279", "text": "function done($message = '', $http_response_code = 200) {\n\tglobal $conn;\n\t$conn->close();\n\thttp_response_code($http_response_code);\n\texit($message);\n}", "title": "" }, { "docid": "f53bf77a5c112e1e5730179868720b8d", "score": "0.5047595", "text": "public function __destruct()\n {\n if (!empty($this->promises)) {\n Promise\\settle($this->promises)->wait();\n }\n }", "title": "" }, { "docid": "4fb4303b68b09e16ecc743fda379388c", "score": "0.5040028", "text": "public function __destruct()\n {\n if (is_resource($this->curlMHandle)) {\n curl_multi_close($this->curlMHandle);\n }\n }", "title": "" }, { "docid": "0c13ea4a3b2dce01af3437127b63f379", "score": "0.50334984", "text": "function __destruct() {\n\t\tfputs($this->conn, 'QUIT' . $this->newline);\n\t\t$this->getServerResponse();\n\t\tfclose($this->conn);\n\t}", "title": "" }, { "docid": "1ded388bed5ead3c2dacea6e29ed29e7", "score": "0.5029547", "text": "public function cleanUpTest()\n\t{\n\t\t// Stop background status collectors\n\t\t$this->stopBackgroundTestStatus();\n\t\t\n\t\t// Close SSH processes\n\t\t$this->closeTestServerSshProcs();\n\t\t\n\t\t// Add this load balancer back to the pool\n\t\tif ($this->serverAddr)\n\t\t{\n\t\t\t$serverManager = new RsuServerManager();\n\t\t\t$serverManager->addIpAddressesToLoadBalancer(array($this->serverAddr));\n\t\t}\n\t\t\n\t\t// Enable notifications\n\t\t$this->dbh->loadModule('Notifications');\n\t\t$this->dbh->enabledTemporarilyDisabledRaceNotifications($this->loadTest['race_id']);\n\t}", "title": "" }, { "docid": "18cda0a81209b71c137c44610e0b5c37", "score": "0.50209355", "text": "public function __destruct()\n {\n $result = $this->processQueue();\n if ($result !== true && is_array($result)) {\n foreach ($result as $error) {\n // throw our errors that were caught\n trigger_error('File grabber curl error: ' . $error['error']->getMessage(), E_USER_WARNING);\n }\n }\n }", "title": "" }, { "docid": "a52c3daef8e7f355564691970d956c63", "score": "0.5016344", "text": "public function __destruct()\n {\n curl_close($this->client);\n }", "title": "" }, { "docid": "5baec5b563219786f150b8566ef9cbea", "score": "0.50149226", "text": "public function close() {\n foreach ($this->curl_handle as $key => $handle) {\n curl_multi_remove_handle($this->curl_multi_handle, $this->curl_handle[$key]);\n curl_close($this->curl_handle[$key]);\n }\n $this->curl_handle = null;\n // keep the multihandle in order to reuse sockets\n //curl_multi_close($this->curl_multi_handle);\n //$this->curl_multi_handle = null ;\n }", "title": "" }, { "docid": "305247361c63c96bb6c5aaa203607589", "score": "0.50143915", "text": "public function __destruct()\n\t{\n\t\tif (is_resource($this->handle))\n\t\t{\n\t\t\tcurl_close($this->handle);\n\t\t}\n\t}", "title": "" }, { "docid": "2ecbb24d549b92c695a4339f0785046e", "score": "0.50109076", "text": "public function onFinish()\n {\n foreach ($this->services as $service) {\n $service->finish();\n }\n $this->services = null;\n $this->cleanupEventHandlers();\n $this->cleanup();\n parent::onFinish();\n }", "title": "" }, { "docid": "521e4a2a5dc42c68f53bdb1b637a4a4e", "score": "0.5004678", "text": "public function service__SIGCHLD() {\n\t\twhile ( true ) {\n\t\t\t$pid = pcntl_wait( $status, WNOHANG );\n\t\t\tif ( $pid < 1 )\n\t\t\t\tbreak;\n\t\t\t$this->service__remove_worker( $pid );\n\t\t}\n\t\t$this->service__supervise_workers();\n\t}", "title": "" }, { "docid": "f36d776c666876489362036bc96449f2", "score": "0.4989038", "text": "public function execute()\n {\n //the request map that maps the request queue to request curl handles\n $requests_map = array();\n $multi_handle = curl_multi_init();\n $num_outstanding = 0;\n //start processing the initial request queue\n $num_initial_requests = min($this->_maxConcurrent, count($this->requests));\n for ($i = 0; $i < $num_initial_requests; $i++) {\n $this->initRequest($i, $multi_handle, $requests_map);\n $num_outstanding++;\n }\n do {\n do {\n $mh_status = curl_multi_exec($multi_handle, $active);\n } while ($mh_status == CURLM_CALL_MULTI_PERFORM);\n if ($mh_status != CURLM_OK) {\n break;\n }\n //a request is just completed, find out which one\n while ($completed = curl_multi_info_read($multi_handle)) {\n $this->processRequest($completed, $multi_handle, $requests_map);\n $num_outstanding--;\n //try to add/start a new requests to the request queue\n while (\n $num_outstanding < $this->_maxConcurrent && //under the limit\n $i < count($this->requests) && isset($this->requests[$i]) // requests left\n ) {\n $this->initRequest($i, $multi_handle, $requests_map);\n $num_outstanding++;\n $i++;\n }\n }\n usleep(15); //save CPU cycles, prevent continuous checking\n } while ($active || count($requests_map)); //End do-while\n $this->reset();\n curl_multi_close($multi_handle);\n }", "title": "" }, { "docid": "c7f0c01d51d210bf151e22becf75bcbf", "score": "0.49803278", "text": "public function __destruct()\n {\n foreach ($this->children as $child) {\n \\curl_multi_remove_handle($this->connection, $child);\n }\n \\curl_multi_close($this->connection);\n }", "title": "" }, { "docid": "f6f5bc14c96866d16953747ec635dba7", "score": "0.49717346", "text": "public function __destruct() {\n curl_close($this->curl);\n }", "title": "" }, { "docid": "b72c1017640d68fbc4e4e3567e168c89", "score": "0.49701756", "text": "public function __destruct()\n {\n if ($this->db instanceof mysqli)\n {\n $this->db->close();\n }\n $response = [\n 'status' => $this->status_code,\n 'message' => $this->message\n ];\n\n header(\"HTTP/1.1 {$response['status']}\");\n header(\"Content-type: application/json; charset: UTF-8\");\n die(json_encode($response));\n\n }", "title": "" }, { "docid": "29adccf99da2ae6490cd7f86fcb9bb67", "score": "0.49629676", "text": "public function closeRequest() {\r\n curl_close($this->request);\r\n }", "title": "" }, { "docid": "ef88d98a90c577f79540c5a782f8e6a3", "score": "0.49619144", "text": "public function __destruct() {\n if (is_resource($this->handle)) {\n curl_close($this->handle);\n }\n }", "title": "" }, { "docid": "20b00ff6a8ab8e2eb9d8cf47eb61fa7f", "score": "0.49511808", "text": "public function __destruct()\n {\n if (is_resource($this->curl)) {\n curl_close($this->curl);\n }\n }", "title": "" }, { "docid": "449402ac7aa8555f37338e7321042919", "score": "0.49218598", "text": "function cleanup()\r\n\t{\r\n\t}", "title": "" }, { "docid": "e4312d0275097e30feb3c262b7d13bbc", "score": "0.49135745", "text": "public function shutdown(): void\n {\n if (! empty($this->ch)) {\n curl_close($this->ch);\n $this->ch = false;\n }\n }", "title": "" }, { "docid": "5144c5086093fc2f6f337dfd9a2c14e8", "score": "0.49010924", "text": "public function __destruct()\n {\n curl_close($this->uploadHandle);\n curl_close($this->downloadHandle);\n }", "title": "" }, { "docid": "99e02046c77cb412dbea8d0e8d86a646", "score": "0.48944825", "text": "public function __destruct(){\n curl_close($this->curl);\n }", "title": "" }, { "docid": "cf86b6589a11c04c4298944e59d52160", "score": "0.48918957", "text": "public function finalize(HTTPRequest $request)\n {\n $this->set('HTTP_USER_AGENT', $this->userAgent($request));\n }", "title": "" }, { "docid": "1a7a380d3ea2968646869ce2b02e689f", "score": "0.48868442", "text": "public function __sleep()\n {\n $protocols = $this->_unregisterProtocols();\n if ($protocols) $this->_unregisteredProtocolsOnSleep = $protocols;\n if ($this->_curlHandle) curl_close($this->_curlHandle);\n }", "title": "" }, { "docid": "dbb83cfc03c257b2684a88ec47894b13", "score": "0.4886806", "text": "function finishRequest() {\r\n\r\n\t\t// If a Reader has been acquired, close it\r\n\t\tif($this->reader != NULL) {\r\n\t\t\t$this->reader->close();\r\n\t\t}\r\n\r\n\t\t// If a ServletInputStream has been acquired, close it\r\n\t\tif($this->stream != NULL) {\r\n\t\t\t$this->stream->close();\r\n\t\t}\r\n\r\n\t\t// The underlying input stream (perhaps from a socket)\r\n\t\t// is not our responsibility\r\n\r\n\t}", "title": "" }, { "docid": "2f991441beee7894d9d89c85e43306ad", "score": "0.48775575", "text": "public function dispatchLoopShutdown()\r\n {}", "title": "" }, { "docid": "3a2f06bac53277be988a6522c856ef7e", "score": "0.48520225", "text": "public static function tearDownAfterClass(): void\n {\n usleep(250 * 1000);\n self::$_process->stop(1, 9); // TODO we may need to add pcntl_async_signals/pcntl_signal to CoverageUtil.php\n self::$_process = null;\n\n parent::tearDownAfterClass();\n }", "title": "" }, { "docid": "b0e6217d19c8d7e74e2e1206ab7facdc", "score": "0.48412246", "text": "public function cleanup()\n {\n $this->pid = 0;\n $this->exceptions = [];\n $this->status = [];\n }", "title": "" }, { "docid": "577e97884846009727d24e394a001c86", "score": "0.48358843", "text": "function SendAsyncRequest($relative_url) {\n $protocol = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_SSL']) && $_SERVER['HTTP_SSL'] == 'On')) ? 'https' : 'http';\n $url = \"$protocol://{$_SERVER['HTTP_HOST']}$relative_url\";\n $local = GetSetting('local_server');\n if ($local)\n $url = \"$local$relative_url\";\n if (function_exists('curl_init')) {\n $c = curl_init();\n curl_setopt($c, CURLOPT_URL, $url);\n curl_setopt($c, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);\n curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 1);\n curl_setopt($c, CURLOPT_TIMEOUT, 1);\n curl_exec($c);\n curl_close($c);\n } else {\n $context = stream_context_create(array('http' => array('header'=>'Connection: close', 'timeout' => 1)));\n file_get_contents($url, false, $context);\n }\n}", "title": "" }, { "docid": "9481705a55a1248cedf22730a1bc3e0e", "score": "0.48319006", "text": "public function dispatchLoopShutdown()\n\t{}", "title": "" }, { "docid": "dd751921e8d318a17043ebb051770178", "score": "0.48285425", "text": "protected function close()\n\t{\n\t\t$this->ioHandler->close();\n\n\n\n\t\tif(BENCHMARK)\n\t\t{\n\t\t\t$requestInfo = new RequestStatistics();\n\t\t\t$requestInfo->saveToFile();\n\t\t}\n\n\n\t\t//no more database access after this point!\n\t\tDatabaseConnection::close();\n\t}", "title": "" }, { "docid": "411ea60b09b0e7346094ae0e20f3557e", "score": "0.48082554", "text": "public function dispatchLoopShutdown()\n {\n if (null === self::$_cache)\n {\n self::setCache();\n }\n\n $data = $this->getResponse()->getBody();\n $data = $this->_replaceEsiIncludes($data);\n $this->getResponse()->setBody($data);\n }", "title": "" }, { "docid": "a9c7b5066b4d02ada83a1782c0acbf02", "score": "0.47970065", "text": "public function execute()\n {\n \n curl_exec($this->rqtHandel);\n curl_close($this->rqtHandel);\n \n }", "title": "" }, { "docid": "a2e4302659864cdf366a2371687e3d89", "score": "0.4766328", "text": "public function finalize(): void\n {\n // Update files to ensure they are correct.\n $this->update();\n if (isset($this->fetchFile)) {\n // Clean up fetch files downloaded to generate checksums.\n $this->fetchFile->cleanup();\n }\n }", "title": "" }, { "docid": "d4adadcabcff02965839d9360c8b30d4", "score": "0.47543836", "text": "public function addProduct(Request $request) //TODO- NOT COMPLETED\n {\n /* ob_end_clean();\n header(\"Connection: close\\r\\n\");\n header(\"Content-Encoding: none\\r\\n\");\n ignore_user_abort(true); // optional\n ob_start();\n echo ('Text user will see');\n $size = ob_get_length();\n header(\"Content-Length: $size\");\n ob_end_flush(); // Strange behaviour, will not work\n flush(); // Unless both are called !\n ob_end_clean();\n//do processing here\n sleep(5);\n $objFeatureVariantsModel = ProductFeatureVariants::getInstance();\n $dataAddFV = array('variant_name' => \"OB test\", 'description' => \"OB test description\", 'feature_id' => \"10000\");\n $result = $objFeatureVariantsModel->addFeatureVariant($dataAddFV);\n echo('Text user will never see');\n//do some processing\n die; */\n /*OUTPUT BUFFERING TEST FOR BROWSER CLOSE BY USER END*/\n\n $objModelCategory = ProductCategory::getInstance();\n $objModelFeatures = ProductFeatures::getInstance();\n $objModelProducts = Products::getInstance();\n $objModelProductMeta = ProductMeta::getInstance();\n $objModelProductImage = ProductImage::getInstance();\n $objModelProductOptionVariant = ProductOptionVariant::getInstance();\n $objModelProductOptionVariantRelation = ProductOptionVariantRelation::getInstance();\n $objModelProductFeatureVariantRelation = ProductFeatureVariantRelation::getInstance();\n $objModelProductOptVarCombination = ProductOptionVariantsCombination::getInstance();\n\n $userId = Session::get('fs_admin')['id'];\n\n $whereForCat = ['rawQuery' => 'category_status =?', 'bindParams' => [1]];\n $allCategories = $objModelCategory->getAllCategoriesWhere($whereForCat);\n\n $whereForFeatureGroup = ['rawQuery' => 'group_flag =? and status = ?', 'bindParams' => [1, 1]];\n $allFeatureGroups = $objModelFeatures->getAllFeaturesWhere($whereForFeatureGroup);\n\n $objModelProductOption = ProductOption::getInstance();\n $whereForOptions = ['rawQuery' => 'status = 1'];\n $allOptions = $objModelProductOption->getAllOptionsWhere($whereForOptions);\n// print_a($allOptions);\n if ($request->isMethod('post')) {\n// $inputData = $request->input('product_data');//Excludes image\n $inputData = $request->all()['product_data'];//Includes image\n\n// print_a($inputData['options']);\n// print_a($_FILES);\n\n\n $rules = [\n 'product_name' => 'required',\n 'price' => 'required',\n 'in_stock' => 'required',\n 'comment' => 'max:100',\n 'mainimage' => 'required|image|mimes:jpeg,bmp,png|max:1000'\n ];\n\n $messages['mainimage.required'] = 'Please select a main image for the product.';\n $validator = Validator::make($inputData, $rules, $messages);\n if ($validator->fails()) {\n return Redirect::back()\n ->with([\"status\" => 'error', 'msg' => 'Please correct the following errors.'])\n ->withErrors($validator)\n ->withInput();\n } else {\n\n $errors = array();\n $productData = array();\n $productData['product_name'] = trim($inputData['product_name']);\n $productData['for_shop_id'] = $inputData['shop_id'];\n if (array_key_exists('product_type', $inputData))\n $productData['product_type'] = 1;\n $productData['min_qty'] = $inputData['minimum_order_quantity'];\n $productData['max_qty'] = $inputData['maximum_order_quantity'];\n $productData['category_id'] = $inputData['category_id'];\n $productData['for_gender'] = $inputData['for_gender'];\n $productData['price_total'] = $inputData['price'];\n $productData['list_price'] = $inputData['list_price'];\n $productData['in_stock'] = $inputData['in_stock'];\n $productData['added_date'] = time();\n $productData['added_by'] = $userId;\n $productData['status_set_by'] = $userId;\n\n $insertedProductId = $objModelProducts->addNewProduct($productData);\n if ($insertedProductId > 0) {\n //--------------------------PRODUCT-METADATA----------------------------//\n $productMetaData['product_id'] = $insertedProductId;\n $productMetaData['full_description'] = trim($inputData['full_description']);\n $productMetaData['short_description'] = trim($inputData['short_description']);\n\n if (array_key_exists('options', $inputData)) {\n $finalOptionVariantRelationData = array();\n $varDataForCombinations = array();\n foreach ($inputData['options'] as $key => $optionValue) {\n $optionVariantRelationData['product_id'] = $insertedProductId;\n $optionVariantRelationData['option_id'] = $optionValue['option_id'];\n $optionVariantRelationData['status'] = $optionValue['status'];\n\n $tempOptionVariantData = array();\n $variantIds = array();\n //-------------------------OLD OPTION VARIANT START-----------------------//\n /*\n if (array_key_exists('variantData', $optionValue)) {\n foreach ($optionValue['variantData'] as $variantKey => $variantValue) {\n $temp = array();\n if ($variantValue['variant_id'] == 0) {\n $variantData['option_id'] = $optionValue['option_id'];\n $variantData['variant_name'] = $variantValue['variant_name'];\n $variantData['added_by'] = $userId;\n $variantData['status'] = $variantValue['status'];\n $variantData['created_at'] = NULL;\n\n $insertedVariantId = $objModelProductOptionVariant->addNewVariantAndGetID($variantData);\n if ($insertedVariantId > 0) {\n array_push($variantIds, $insertedVariantId);\n $temp['VID'] = $insertedVariantId;\n $temp['VN'] = $variantValue['variant_name'];\n $temp['PM'] = $variantValue['price_modifier'];\n $temp['PMT'] = $variantValue['price_modifier_type'];\n $temp['WM'] = $variantValue['weight_modifier'];\n $temp['WMT'] = $variantValue['weight_modifier_type'];\n $temp['STTS'] = $variantValue['status'];\n }\n } else {\n array_push($variantIds, $variantValue['variant_id']);\n $temp['VID'] = $variantValue['variant_id'];\n $temp['VN'] = $variantValue['variant_name'];\n $temp['PM'] = $variantValue['price_modifier'];\n $temp['PMT'] = $variantValue['price_modifier_type'];\n $temp['WM'] = $variantValue['weight_modifier'];\n $temp['WMT'] = $variantValue['weight_modifier_type'];\n $temp['STTS'] = $variantValue['status'];\n }\n $tempOptionVariantData[] = $temp;\n }\n if (!empty($variantIds) && !empty($tempOptionVariantData)) {\n $optionVariantRelationData['variant_ids'] = implode(',', $variantIds);\n $optionVariantRelationData['variant_data'] = json_encode($tempOptionVariantData);\n }\n }\n */\n //-------------------------OLD OPTION VARIANT END-----------------------//\n\n //-------------------------NEW OPTION VARIANT START---------------------//\n if (array_key_exists('variantData', $optionValue)) {\n foreach ($optionValue['variantData'] as $variantKey => $variantValue) {\n $temp = array();\n array_push($variantIds, $variantValue['variant_id']);\n $temp['VID'] = $variantValue['variant_id'];\n $temp['VN'] = $variantValue['variant_name'];\n $temp['PM'] = $variantValue['price_modifier'];\n $temp['PMT'] = $variantValue['price_modifier_type'];\n $temp['WM'] = $variantValue['weight_modifier'];\n $temp['WMT'] = $variantValue['weight_modifier_type'];\n $temp['STTS'] = $variantValue['status'];\n $tempOptionVariantData[] = $temp;\n }\n }\n if (array_key_exists('variantDataNew', $optionValue)) {\n foreach ($optionValue['variantDataNew'] as $variantKey => $variantValue) {\n $temp = array();\n $variantData['option_id'] = $optionValue['option_id'];\n $variantData['variant_name'] = $variantValue['variant_name'];\n $variantData['added_by'] = $userId;\n $variantData['status'] = $variantValue['status'];\n $variantData['created_at'] = NULL;\n $insertedVariantId = $objModelProductOptionVariant->addNewVariantAndGetID($variantData);\n if ($insertedVariantId > 0) {\n $varDataForCombinations[$variantValue['variant_id']] = $insertedVariantId;\n array_push($variantIds, $insertedVariantId);\n $temp['VID'] = $insertedVariantId;\n $temp['VN'] = $variantValue['variant_name'];\n $temp['PM'] = $variantValue['price_modifier'];\n $temp['PMT'] = $variantValue['price_modifier_type'];\n $temp['WM'] = $variantValue['weight_modifier'];\n $temp['WMT'] = $variantValue['weight_modifier_type'];\n $temp['STTS'] = $variantValue['status'];\n }\n $tempOptionVariantData[] = $temp;\n }\n }\n if (!empty($variantIds) && !empty($tempOptionVariantData)) {\n $optionVariantRelationData['variant_ids'] = implode(',', $variantIds);\n $optionVariantRelationData['variant_data'] = json_encode($tempOptionVariantData);\n }\n //-------------------------NEW OPTION VARIANT END---------------------//\n\n $finalOptionVariantRelationData[] = $optionVariantRelationData;\n }\n if (!empty($finalOptionVariantRelationData)) {\n $objModelProductOptionVariantRelation->addNewOptionVariantRelation($finalOptionVariantRelationData);\n }\n\n //------------------------PRODUCT OPTION COMBINATIONS START HERE---------------------//\n foreach ($inputData['opt_combination'] as $keyCombination => $valueCombination) {\n $flags = explode(\"_\", $valueCombination['newflag']);\n $combinationVarIds = explode(\"_\", $keyCombination);\n $flagKeys = array_keys($flags, \"1\");\n foreach ($flagKeys as $keyFK => $valueFK) {\n $combinationVarIds[$keyFK] = $varDataForCombinations[$combinationVarIds[[$keyFK]]];\n }\n //TODO ADD BARCODE, shippig info and image data for the combination here\n $dataCombinations['product_id'] = $insertedProductId;\n $dataCombinations['variant_ids'] = implode(\"_\", $combinationVarIds);\n $dataCombinations['quantity'] = $valueCombination['quantity'];\n $dataCombinations['exception_flag'] = 0;\n if (isset($valueCombination['excludeflag']) && $valueCombination['excludeflag'] == 'on') {\n $dataCombinations['exception_flag'] = 1;\n }\n $objModelProductOptVarCombination->addNewOptionVariantsCombination($dataCombinations);\n\n }\n //------------------------PRODUCT OPTION COMBINATIONS END HERE---------------------//\n\n }\n $productMetaData['weight'] = $inputData['shipping_properties']['weight'];\n $productMetaData['shipping_freight'] = $inputData['shipping_properties']['shipping_freight'];\n\n $shippingParams = array();\n $shippingParams['min_items'] = $inputData['shipping_properties']['min_items'];\n $shippingParams['max_items'] = $inputData['shipping_properties']['min_items'];\n\n if (array_key_exists('box_length', $inputData['shipping_properties']))\n $shippingParams['box_length'] = $inputData['shipping_properties']['box_length'];\n if (array_key_exists('box_width', $inputData['shipping_properties']))\n $shippingParams['box_width'] = $inputData['shipping_properties']['box_width'];\n if (array_key_exists('box_height', $inputData['shipping_properties']))\n $shippingParams['box_height'] = $inputData['shipping_properties']['box_height'];\n\n $productMetaData['shipping_params'] = json_encode($shippingParams);\n $productMetaData['quantity_discount'] = json_encode($inputData['quantity_discount']);\n $productMetaData['product_tabs'] = json_encode($inputData['product_tabs']);\n\n $insertedProductMetaId = $objModelProductMeta->addProductMetaData($productMetaData);\n if (!$insertedProductMetaId)\n $errors[] = 'Sorry, some of the product data were not added, please update the same on the edit section.';\n //--------------------------END PRODUCT-METADATA----------------------------//\n\n\n //----------------------------PRODUCT-IMAGES------------------------------//\n $productImages = $_FILES['product_data'];\n $imageData = array();\n if ($productImages['error']['mainimage'] == 0) {\n $mainImageURL = uploadImageToStoragePath($productImages['tmp_name']['mainimage'], 'product_' . $insertedProductId, 'product_' . $insertedProductId . '_0_' . time() . '.jpg', 724, 1024);\n if ($mainImageURL) {\n $mainImageData['for_product_id'] = $insertedProductId;\n $mainImageData['image_type'] = 0;\n $mainImageData['image_upload_type'] = 0;\n $mainImageData['image_url'] = $mainImageURL;\n $imageData[] = $mainImageData;\n }\n } else {\n $errors[] = 'Sorry, something went wrong. Main image could not be uploaded, You can upload it on edit section.';\n }\n\n if (array_key_exists('otherimages', $productImages['name'])) {\n foreach ($productImages['tmp_name']['otherimages'] as $otherImageKey => $otherImage) {\n if ($otherImage != '') {\n $otherImageURL = uploadImageToStoragePath($otherImage, 'product_' . $insertedProductId, 'product_' . $insertedProductId . '_' . ($otherImageKey + 1) . '_' . time() . '.jpg', 724, 1024);\n if ($otherImageURL) {\n $otherImageData['for_product_id'] = $insertedProductId;\n $otherImageData['image_type'] = 1;\n $otherImageData['image_upload_type'] = 0;\n $otherImageData['image_url'] = $otherImageURL;\n $imageData[] = $otherImageData;\n }\n }\n }\n }\n if (!empty($imageData)) {\n $objModelProductImage->addNewImage($imageData);\n }\n //--------------------------END PRODUCT-IMAGES----------------------------//\n\n //------------------------PRODUCT FEATURES START HERE---------------------//\n if (array_key_exists('features', $inputData)) {\n $productDataFeatures = $inputData['features'];\n $fvrDataToInsert = array();\n foreach ($productDataFeatures as $keyPDF => $valuePDF) {\n if (array_key_exists(\"single\", $productDataFeatures[$keyPDF])) {\n// $fvrDataToInsert[] = ['product_id' => $insertedProductId, 'feature_id' => $keyPDF, 'variant_ids' => 0, 'display_status' => $productDataFeatures[$keyPDF]['status']];\n $objModelProductFeatureVariantRelation->addFeatureVariantRelation(['product_id' => $insertedProductId, 'feature_id' => $keyPDF, 'variant_ids' => 0, 'display_status' => $productDataFeatures[$keyPDF]['status']]);\n } else if (array_key_exists(\"muliple\", $productDataFeatures[$keyPDF])) {\n// $fvrDataToInsert[] = ['product_id' => $insertedProductId, 'feature_id' => $keyPDF, 'variant_ids' => implode(\",\", array_keys($valuePDF['multiple'])), 'display_status' => $valuePDF['status']];\n $objModelProductFeatureVariantRelation->addFeatureVariantRelation(['product_id' => $insertedProductId, 'feature_id' => $keyPDF, 'variant_ids' => implode(\",\", array_keys($valuePDF['multiple'])), 'display_status' => $valuePDF['status']]);\n } else if (array_key_exists(\"select\", $productDataFeatures[$keyPDF])) {\n// $fvrDataToInsert[] = ['product_id' => $insertedProductId, 'feature_id' => $keyPDF, 'variant_ids' => $valuePDF['select'], 'display_status' => $valuePDF['status']];\n $objModelProductFeatureVariantRelation->addFeatureVariantRelation(['product_id' => $insertedProductId, 'feature_id' => $keyPDF, 'variant_ids' => \"\" . $valuePDF['select'], 'display_status' => $valuePDF['status']]);\n }\n }\n// $objModelProductFeatureVariantRelation->addFeatureVariantRelation($fvrDataToInsert);\n }\n //------------------------PRODUCT FEATURES END HERE---------------------//\n\n }\n\n if ($insertedProductId || isset($insertedProductMetaId)) {\n return Redirect::back()->with(['status' => 'success', 'msg' => 'New product \"' . $productData['product_name'] . '\" has been added.']);\n } else {\n return Redirect::back()->with(['status' => 'error', 'msg' => 'Something went wrong, please reload the page and try again.']);\n }\n }\n }\n foreach ($allCategories as $key => $value) {\n $allCategories[$key]->display_name = $this->getCategoryDisplayName($value->category_id);\n }\n return view('Admin/Views/product/addProduct', ['code' => '', 'allCategories' => $allCategories, 'allOptions' => $allOptions, 'featureGroups' => json_decode($allFeatureGroups, true)]);\n }", "title": "" }, { "docid": "d92bf12d3aed1b7347c44b12d875b0e2", "score": "0.47502014", "text": "private function cleanup()\n {\n // delete all cookies\n Cookies::clear();\n \n // refresh static ID\n ID::refresh();\n }", "title": "" }, { "docid": "f11481bd9cdfc5c477c088d7f6a8ad86", "score": "0.47434804", "text": "public function __destruct() {\n if (isset($this->ch)) curl_close($this->ch);\n }", "title": "" }, { "docid": "ededf4ea7b9e78fd0f7d6eb22ff07767", "score": "0.47411412", "text": "public function flushResponse()\n\t{\n\t\t$this->http_response = null;\n\t}", "title": "" }, { "docid": "6b74f907a0e6c34b2f26fa7165693038", "score": "0.47351316", "text": "public function closeCurl()\n{\t// close handle\n\tcurl_close ($this->curl);\n}", "title": "" }, { "docid": "19280a5d2b25ab8d3604e38a0ee492bd", "score": "0.47268853", "text": "function cot_shutdown()\n{\n\tglobal $cache, $db;\n\t// Clear import buffer if everything's OK on POST\n\tif ($_SERVER['REQUEST_METHOD'] == 'POST' && !cot_error_found())\n\t{\n\t\tunset($_SESSION['cot_buffer']);\n\t}\n\twhile (ob_get_level() > 0)\n\t{\n\t\tob_end_flush();\n\t}\n\t// Need to destroy cache before DB connection is lost\n\t$cache && $cache->db && $cache->db->flush();\n\t$cache = null;\n\t$db = null;\n}", "title": "" }, { "docid": "d4ba34026b8ce44276509fc1cbba892d", "score": "0.4725168", "text": "public function shutdownCrawler(){\n $this->sys_events->RegShutdown();\n }", "title": "" }, { "docid": "f74293785eb6dbaf17e9323a508003fe", "score": "0.47243842", "text": "function app_curl_del($url) {\n\n\t\t$ch = curl_init();\n\n\t\t// set URL and other appropriate options\n\t\tcurl_setopt($ch, CURLOPT_URL, $url); // use Random to generate unique URL every connect\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE'); \n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.2; rv:17.0) Gecko/20100101 Firefox/17.0');\n\t\t//curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');\n\t\t//curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_ENCODING, 'UTF-8');\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 30);\n\t\t//curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // follow 302 header\n\t\tcurl_setopt($ch, CURLOPT_FRESH_CONNECT, TRUE); //Don't use cache version, \"Cache-Control: no-cache\"\n //curl_setopt($ch, CURLOPT_VERBOSE, 1); //for get header\n //curl_setopt($ch, CURLOPT_HEADER, 1); //for get header\n\t\t// grab URL and pass it to the browser\n\t\t$response = curl_exec($ch);\n\n // Then, after your curl_exec call:\n //$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\n //$header = substr($response, 0, $header_size);\n //$body = substr($response, $header_size);\n\n //Log::info($header);\n\n // close cURL resource, and free up system resources\n curl_close($ch);\n\n //return (string) $body;\n return (string) $response;\n }", "title": "" }, { "docid": "98ee994894f5b3acd0ca70bdf08831a0", "score": "0.47219968", "text": "public function __destruct()\n {\n $onComplete = $this->config['onComplete'];\n\n if ($onComplete instanceof Closure)\n {\n $onComplete($this->results);\n }\n }", "title": "" }, { "docid": "4b412e77ba1b02261926201ac1c1fd95", "score": "0.47216707", "text": "public function __destruct()\n {\n $this->responseText;\n }", "title": "" }, { "docid": "08b58032d0fcac8aac5a42f6c1a9864e", "score": "0.4716053", "text": "public function close_request()\n\t{\n\t\tparent::remove();\n\t}", "title": "" }, { "docid": "70567d03cb459655f5ec79078ce6deea", "score": "0.4711296", "text": "function finesse_process_newsletter_unsubscribe_request()\n{\n global $newsletter_manager;\n $GLOBALS['unsubscription_success'] = $newsletter_manager->unsubcribe($_REQUEST['uuid']);\n include FINESSE_FUNCTIONS_FILE_PATH . '/api/newsletter/unsubscribe-message.php';\n die();\n}", "title": "" }, { "docid": "3eb89f63763dea51dfcb9be54cf46bf5", "score": "0.4699164", "text": "public function __destruct()\n {\n $this->client->close();\n }", "title": "" }, { "docid": "42f20a256370fb0f09e614aa22c86791", "score": "0.46938142", "text": "public function cleanup()\n {\n // Do nothing here\n }", "title": "" }, { "docid": "fef79e966997be429746426c746bcd16", "score": "0.46924466", "text": "function __destruct () {\r\n\t\tcurl_close($this->ch);\r\n\t\t@unlink('/tmp/cluewikibot.cookies.'.$this->uid.'.dat');\r\n\t}", "title": "" }, { "docid": "095a267dc4453cb5f061687caff881d0", "score": "0.46805906", "text": "function kill(){\n return_response();\n }", "title": "" }, { "docid": "59ade02217daef08c0da91a43cc96423", "score": "0.4678369", "text": "public function close()\n {\n if ($this->cHandler !== null) {\n Yii::trace('Closing curl connection: YQL' , __METHOD__);\n curl_close($this->cHandler);\n $this->cHandler = null;\n }\n }", "title": "" }, { "docid": "2c2160ecc94b1092e5208b9606e877db", "score": "0.46714643", "text": "function __destruct () {\n\t\t\tcurl_close( $this->ch );\n\t\t\t@unlink( '/tmp/cluewikibot.cookies.' . $this->uid . '.dat' );\n\t\t}", "title": "" }, { "docid": "be1c888006393c740809d4d47604721b", "score": "0.46709105", "text": "private function remove(GETRequest $request) {\n\t\t\tunset($this->executing[(int)$request->getHandle()]);\n\t\t\tcurl_multi_remove_handle($this->getMultiHandle(), $request->getHandle());\n\t\t}", "title": "" }, { "docid": "b349c0e7aca38c4bd105155c48aa6bd7", "score": "0.4658424", "text": "public function exec(){\n\t\t// execute the handles\n\t\t$running = null;\n\t\tdo {\n\t\t\tcurl_multi_exec($this->mh, $running);\n\t\t} while($running > 0);\n\t\t\n\t\t$result = array();\n\t\t\n\t\t// get content and remove handles\n\t\tforeach($this->curls as $key=>$ch) {\n\t\t\tarray_push($result, array(\n 'request'=>$this->requests[$key],\n 'info'=>$this->info[$key],\n 'result' => curl_multi_getcontent($ch)\n ));\n\t\t\tcurl_multi_remove_handle($this->mh, $ch);\n\t\t}\n\t\t\t\n\t\t// all done\n $this->curls = array();\n\t\tcurl_multi_close($this->mh);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "376cfb66e07e796f9c85d36a1931d615", "score": "0.46522212", "text": "public function dispatchLoopShutdown()\n\t{\n\t\tif ($this->getRequest()->isXmlHttpRequest()) {\n\t\t\treturn;\n\t\t}\n\n\t\t$layout = Zend_Layout::getMvcInstance();\n\t\tif (!$layout) {\n\t\t\treturn;\n\t\t}\n\n\t\t$headers = $this->_response->getHeaders();\n\t\t$contentTypeExceptions = array(\n\t\t\t'text/html',\n\t\t);\n\t\tforeach ($headers as $key => $header) {\n\t\t\tif ($header['name'] == 'Content-Type' &&\n\t\t\t\t$header['value'] != 'text/html') {\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->_output();\n\t}", "title": "" }, { "docid": "dcac3359450699d69c74f64ea4819148", "score": "0.4621951", "text": "public function __destruct()\n {\n if( gettype($this->ch) == 'resource' and get_resource_type($this->ch) == 'curl' )\n {\n curl_close($this->ch);\n }\n }", "title": "" }, { "docid": "5c8a278c9bfee154d15bb06f26cb6086", "score": "0.46194005", "text": "public function finalise() {\n\t\t\t// make sure everything is in order\n\t\t\t$this->validate();\n\n\t\t\t// set options that Crackle requires to operate\n\t\t\tcurl_setopt_array($this->getHandle(), array(\n\t\t\t\t\tCURLOPT_HEADER => true,\n\t\t\t\t\tCURLOPT_URL => $this->getUrl(),\n\t\t\t\t\tCURLOPT_RETURNTRANSFER => true));\n\n\t\t\t// add any additional headers to the session\n\t\t\t$this->getHeaders()->addTo($this->getHandle());\n\n\t\t\t// add authentication if specified\n\t\t\tif ($this->getCredentials() !== null) {\n\t\t\t\t$this->getCredentials()->addRequestCredentialsTo($this->getHandle());\n\t\t\t}\n\n\t\t\t// add proxy if configured\n\t\t\tif ($this->getProxy() !== null) {\n\t\t\t\t$this->getProxy()->addTo($this->getHandle());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b05a1837893b43521368754ebb242f73", "score": "0.4614112", "text": "public function clean_request(){\n\t\tif(isset($this->requests[$this->request_total])){\n\t\t\tif(is_array($this->requests[$this->request_total])){\n\t\t\t\tforeach($this->requests[$this->request_total] as $last_request){\t\n\t\t\t\t\tif(in_array($last_request,$this->no_log)){\n\t\t\t\t\t\tarray_pop($this->requests);\n\t\t\t\t\t\t$this->request_total--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}//\\\\//\n\t\t$this->post_controller = null;\n\t\t$this->get_controller = null;\n\t\t$this->get_controller_object = null;\n\t\t$this->post_controller_object = null;\n\t}", "title": "" }, { "docid": "9da115f78a43ff3c2b7f795148bcb105", "score": "0.46105263", "text": "protected function restart()\n {\n curl_close($this->client);\n $this->client = $this->createCurlHandle();\n }", "title": "" }, { "docid": "81341040cce27080de37ddf1780f0271", "score": "0.4604812", "text": "protected function _after(DHttp_Request $req, DHttp_Response $res)\n {\n }", "title": "" }, { "docid": "a3ca78d0570b99846954ce7021dc8138", "score": "0.46004298", "text": "public static function clearHttpClient()\n {\n self::$httpClient = null;\n }", "title": "" }, { "docid": "acc9359e312aed004bf40000788ad3a8", "score": "0.45937502", "text": "private static function _requestComplete($url) {\n $urls = self::getActiveDownloads();\n if (isset($urls[$url])) {\n unset($urls[$url]);\n self::_setActiveDownloads($urls);\n }\n }", "title": "" }, { "docid": "62f2ed4a94b5d126dcdfc1eb9d2e0964", "score": "0.45819992", "text": "abstract protected function doShutdown();", "title": "" }, { "docid": "4c2f535d0a8098740eadeea82f95cf06", "score": "0.45765322", "text": "public function __destruct()\n {\n Promise\\unwrap(self::$promises);\n }", "title": "" }, { "docid": "c0ccb43affcff83de6682ab4a3da39c4", "score": "0.45729837", "text": "public function restart()\n {\n curl_close($this->curl);\n\n $this->cookies = array();\n $this->curl = $this->createCurlHandle();\n }", "title": "" }, { "docid": "8a41a855a6dfdfe12c7d44e21660a60e", "score": "0.45726293", "text": "public function terminate($request, $response);", "title": "" }, { "docid": "12369de51fd19b509c50444deba60ba9", "score": "0.45692593", "text": "public function dispatchLoopShutdown()\n {\n $sentType = false;\n $sentTag = false;\n \n $response = $this->getResponse();\n foreach( $response->getHeaders() as $header ) {\n if ( !strcasecmp($header['name'], 'content-type') ) {\n $sentType = true;\n }\n if ( !strcasecmp($header['name'], 'etag') ) {\n $sentTag = true;\n }\n }\n \n if ( !$response->isRedirect() && !$sentType && !$sentTag ) {\n // these are basically the same anti-cache headers that PHP sends\n $response->setRawHeader('Cache-Control: no-store, no-cache, must-revalidate, max-age=0, pre-check=0');\n $response->setRawHeader('Pragma: no-cache');\n $response->setRawHeader('Expires: ' . gmdate('D, d M Y H:i:s', strtotime('-20 years')) . ' GMT');\n // also send content-length\n $response->setRawHeader('Content-Length: ' . strlen($response->getBody()));\n }\n if ( $sentTag && !$sentType ) { // last-mod responses, but not files\n $response->setRawHeader('Content-Length: ' . strlen($response->getBody()));\n }\n }", "title": "" }, { "docid": "0250cf33a0229322b3a3255e3dc5667f", "score": "0.4562468", "text": "static public function gaze( $aGet=array() ) {\n\n if ( isset( $_GET['doing_wp_cron'] ) ) return; // WP Cron\n if ( isset( $GLOBALS['pagenow'] ) && $GLOBALS['pagenow'] == 'admin-ajax.php' ) return; // WP Heart-beat API \n \n // Ensures the task is done only once in a page load.\n static $_bIsCalled;\n if ( $_bIsCalled ) return;\n $_bIsCalled = true;\n \n self::_loadBackgroundPageWithDelay( 0, $aGet );\n \n }", "title": "" }, { "docid": "d154fc8e29c89f1a61bc9b3a63ee6073", "score": "0.45554563", "text": "function __destruct() {\n curl_close($this->_ch);\n }", "title": "" }, { "docid": "58a9a3cde4f414e9e9da1f0152a4a07c", "score": "0.45536885", "text": "public function processDeferred()\n {\n $storage = $this->serviceContainer->get('storage');\n\n if ($storage instanceof DeferredStorageInterface) {\n $storage->processDeferred();\n }\n\n /** @var FileFetcherInterface $fetcher */\n $fetcher = $this->serviceContainer->get('file_fetcher');\n $fetcher->cleanup();\n }", "title": "" }, { "docid": "76d9e921a43d4c24bd167190b022dbbc", "score": "0.45530933", "text": "public static function tearDownAfterClass() : void\n {\n posix_kill(self::$greenmailPid, SIGKILL);\n // Close the hosting process\n proc_terminate(self::$greenmailProc, SIGKILL);\n proc_close(self::$greenmailProc);\n }", "title": "" }, { "docid": "11326b965c9847f99d98b2b0b76fe07a", "score": "0.45466378", "text": "private function _purge($url){\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $this->_config['METHOD']);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n\n if(curl_error($ch)) {\n throw new Kohana_Exception(\"Curl failed for $url: \" . curl_error($ch));\n }\n\n if(( $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE) ) != $this->_config['SUCCESS_HTTP_CODE']){\n curl_close($ch);\n throw new Kohana_Exception(\"Purge failed for $url with HTTP code $httpCode\");\n }\n\n curl_close($ch);\n\n return $result;\n }", "title": "" }, { "docid": "53ec7ac1d7f6a75eec01ea636607d3cb", "score": "0.4543946", "text": "public function cleanup() {\r\n if(($result = $this->Engines->kill(php_uname('n'), getmypid())) !== true) {\r\n $this->Queue->engineAudit('Error unregistering engine process [pid] for [hostname]', [\r\n '[hostname]' => php_uname('n'),\r\n '[pid]' => getmypid(),\r\n 'errors' => $result\r\n ], 'error');\r\n }\r\n }", "title": "" }, { "docid": "46ce3c53cb12e609f4e7faba7d97384d", "score": "0.4539178", "text": "public function deleteFileAsync($request) \n {\n $returnType = '';\n $isBinary = false;\n $hasReturnType = false;\n $request = $this->getHttpRequest($request, 'DELETE');\n $options = $this->createHttpClientOptions();\n\n return $this->client\n ->sendAsync($request, $options)\n ->then(\n function ($response) use ($request, $hasReturnType, $returnType, $isBinary) {\n return $this->processResponse($request, $response, $hasReturnType, $returnType, $isBinary);\n },\n function ($exception) use ($request) {\n $this->processException($exception);\n }\n );\n }", "title": "" }, { "docid": "3336d1c431591eea48a82e5e66e3a6f1", "score": "0.4538456", "text": "public function onShutdown()\n {\n $error = error_get_last();\n if ($error && static::isFatalError($error['type'])) {\n $this->logError($error['message'], $error['file'], $error['line']);\n if (! headers_sent()) {\n die(json_encode([\n 'success' => false,\n 'error' => [\n 'message' => $error['message'],\n 'details' => $error['file'] . ' at line ' . $error['line']\n ]\n ]));\n }\n }\n }", "title": "" }, { "docid": "94208bf995609c29882a1c2de172c392", "score": "0.45226273", "text": "public function shutdown();", "title": "" }, { "docid": "94208bf995609c29882a1c2de172c392", "score": "0.45226273", "text": "public function shutdown();", "title": "" }, { "docid": "90ea3eb2f4f9e60bd210657c5a086ac1", "score": "0.4519221", "text": "public function closeCurl() {\r\n curl_close($this->curl);\r\n }", "title": "" }, { "docid": "39e7ead3b7df3c1747b2fa814cfbf0c0", "score": "0.45037472", "text": "function otputils_cleanup() {\n\tglobal $otputils_script_start_time;\n\tglobal $otputils_prepapre;\n\tglobal $otputils_script_id;\n\tglobal $otputils_error_count;\n\tglobal $otp_ini;\n\tglobal $otputils_msg_log;\n\tglobal $otputils_run_type;\n\tglobal $script_file_name;\n\t\n\t# write script close and all other messages to msg log file\n\tif (isset($otputils_msg_log)) {\n\t\totp_msg('--- finished', 'flush');\n\t}\n\t\t\n\t# write runtime data to the scripts log file\n\t$errors = 'errors: '. $otputils_error_count;\n\t$memory = otputils_memory();\n\t$time_taken = round(microtime(true) - $otputils_script_start_time, 3) . ' sec';\n\t$message = date(\"Y/m/d H:i:s\").\", $otputils_run_type, \". basename($script_file_name) .\", $otputils_script_id, $time_taken, $memory, $errors\";\n\totputils_msg_to_log($message, 'script');\n}", "title": "" }, { "docid": "4906a93dfacefce7c34fb5c3889e2a32", "score": "0.45022088", "text": "public function flush()\r\n {\r\n $this->http->send();\r\n }", "title": "" }, { "docid": "428f54c9e94445e70623d73696e303d9", "score": "0.44984895", "text": "public function sayGoodbyeTelegramAndContinueEvent($timeLimit = 900)\n {\n set_time_limit($timeLimit);\n ignore_user_abort(true);\n $response = json_encode(['ok']);\n\n header('Connection: close');\n header('Content-Length: ' . strlen($response));\n header(\"Content-type:application/json\");\n\n echo $response;\n\n flush();\n\n if (function_exists('fastcgi_finish_request')) {\n fastcgi_finish_request();\n }\n }", "title": "" }, { "docid": "5ac5b27c1dd65617b618147cc027b496", "score": "0.4493255", "text": "public function Close()\n {\n curl_close($this->handle);\n }", "title": "" }, { "docid": "c5afc3cb2a16a175be622b410287e271", "score": "0.4487129", "text": "public function shutdown() {}", "title": "" }, { "docid": "c5afc3cb2a16a175be622b410287e271", "score": "0.4487129", "text": "public function shutdown() {}", "title": "" }, { "docid": "c5afc3cb2a16a175be622b410287e271", "score": "0.4487129", "text": "public function shutdown() {}", "title": "" }, { "docid": "423c4317e2e7fc1bfc572a1f860aaf10", "score": "0.4479134", "text": "public function run()\n\t{\n\t foreach (array('SystemTL.php', 'ZipReaderTL.php', 'ZipWriterTL.php') as $file)\n\t {\n\t // Purge the file\n \t\tif (is_file(TL_ROOT . '/system/modules/easyupdate3/'.$file))\n \t\t{\n \t\t $objFile = new File('system/modules/easyupdate3/'.$file);\n \t\t $objFile->delete();\n \t\t $objFile->close();\n \t\t $objFile=null;\n \t\t unset($objFile);\n \t\t}\n\t }\n\t}", "title": "" } ]